Repository: vscode
Issue: `replaceActive` context key is not set
Labels: bug,search,confirmed

Type: <b>Bug</b>

At some point this context key changed behavior. Previously:
* `workbench.action.findInFiles` would focus the search view in find mode and leave `replaceActive` set to false
* `workbench.action.replaceInFiles` would focus the search view in replace mode and leave `replaceActive` set to true

This is no longer the case. The replacement mode of the search view no longer sets `replaceActive` unless you focus the _results_. It's not set when focusing the _input boxes_.

That means there are no context keys different between `findInFiles` and `replaceInFiles` and there's no way to tell them apart.

Any user keybindings that depend on this context key are currently broken. In my case, I have keybindings to focus find and replace if they aren't and close them if they are (effectively turning Ctrl+Shift+F/H into toggles).
```
{
  "key": "ctrl+shift+f",
  "command": "workbench.action.toggleSidebarVisibility",
  "when": "sideBarFocus && searchInputBoxFocus && !replaceActive"
},
{
  "key": "ctrl+shift+h",
  "command": "workbench.action.toggleSidebarVisibility",
  "when": "sideBarFocus && searchInputBoxFocus && replaceActive"
},
```

VS Code version: Code - Insiders 1.85.0-insider (a9d8fbca9ec9a7914f2077a83ca66a08c7e10f83, 2023-11-02T09:02:24.464Z)
OS version: Windows_NT x64 10.0.19045
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD Ryzen Threadripper PRO 3945WX 12-Cores      (24 x 3992)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|63.86GB (39.30GB free)|
|Process Argv|--crash-reporter-id 2860e056-a3df-4573-a10a-18ca229997c6|
|Screen Reader|no|
|VM|0%|
</details>Extensions: none<details>
<summary>A/B Experiments</summary>

```
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
py29gd2263:30784851
vscaat:30438846
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
a9j8j154:30646983
showlangstatbar:30737417
ecj1e332:30687743
pythonfmttext:30716741
fixshowwlkth:30771523
showindicator:30805243
pythongtdpath:30726887
i26e3531:30792625
welcomedialog:30812478
pythonnosmt12:30779711
pythonidxpt:30768918
pythonnoceb:30776497
dsvsc013:30777762
dsvsc014:30777825
pythonmpsinfo:30859869
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2cf:30871583
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898

```

</details>

<!-- generated by issue reporter -->