Repository navigation
Commit 332d30f
feat(settings): dynamic thinking effort experimental toggle (DTE-1) (Zoo-Code-Org#1521)
* feat(settings): dynamic thinking effort experimental toggle (DTE-1)
* feat(settings): dynamic thinking effort experimental toggle (DTE-1)
* test(settings): assert false and unset dynamicThinkingEffort persistence in the updateSettings payload
* test(settings): restore the blanket auto-deny specs to their upstream text
Out of Scope Changes: the two blanket auto-deny tests in SettingsView.spec.tsx had been
reformatted - comments and blank lines dropped, the Save click inlined, and the
updatedSettings assertion collapsed onto one line. None of that has anything to do with
dynamicThinkingEffort, and it made unrelated behaviour look like part of this change.
The whole describe block is now byte-identical to upstream/main again, so the diff for
this file contains only what the feature needs: the imports the new experimental-settings
tests use, the new Experimental Settings round-trip tests, and the openAiStrictToolSchemas
save round-trip tests. No changed line in the diff mentions auto-deny any more.
Local: syntax gate clean (0 TS1xxx). The restored block is upstream's own text against an
unchanged renderSettingsView helper, so its behaviour is what upstream CI already covers.
* style(webview): drop the duplicated blank line the merge left behind
* style(webview): drop the duplicated blank line the merge left between describes
* chore: empty commit to re-trigger the pre-merge checks after the linked-issue body fix
* chore: empty commit to re-trigger the pre-merge checks after the closing-reference body fix
* style: apply repo Prettier to the merge resolution
* chore: re-trigger CI after a vitest environment-teardown flake
The webview suites all passed (2106/2106) but vitest exited 1 on two EnvironmentTeardownError unhandled rejections originating from ModelSelector.spec.tsx, a file this PR does not touch. Re-run the lanes.
* fix(i18n): describe the dynamic-thinking toggle as preparing a later feature
* test(webview): give the experimental settings fixture the required apiConfiguration prop
* build(stryker): drop the comment-only mutation-gate hunks
Both stryker-diff hunks in this PR rewrote comments only: the extension entry
already carries vitestRelated: true / discoverRelatedTests: false on main
(scripts/stryker-diff.mjs:69-70 of a15ba8c), and the assertions in
scripts/stryker-diff.test.mjs already match main. Restore both files to the
merge base so the mutation-gate settings and their explanatory comments stay in
one place; this unit is the dynamicThinkingEffort flag.
* test(webview): regenerate the experimental settings visual baselines
The four baselines were measured against the pre-refresh gallery rendering.
Upstream main renders the real @vscode/webview-ui-toolkit in the gallery (the
toolkit mock is gone), so the story is 46 px taller and CI's required
webview-visual check failed all four themes.
Reproduced first, in the image pinned by visual-regression.yml
(mcr.microsoft.com/playwright:v1.64.1-noble@sha256:47b510dd9..., chromium build
1248, tree = this branch merged with a15ba8c - the same content as the PR merge
ref):
Error: expect(locator).toHaveScreenshot(expected) failed
Expected an image 488px by 543px, received 488px by 589px. 37618 pixels
(ratio 0.14 of all image pixels) are different.
with 16638 / 40967 / 16740 differing pixels for light / high-contrast /
high-contrast-light - byte-for-byte the same diff counts CI reported for head
301c1c5, which is the evidence that this container reproduces the CI rendering.
Then regenerated with test:visual:docker:update scoped to the story (--grep
"renders the experimental settings" --update-snapshots), which re-wrote exactly
these four files: sha256 of every other __screenshots__/*.png is identical before
and after. All four are 488x589, matching the measured CI height; no dimensions
were hand-edited.
* test(dte): make the saved-false projection answer a real edit, and stop promising an in-chat control
The description of settings.experimental.DYNAMIC_THINKING_EFFORT promised a manual
in-chat control that this PR does not ship. The second sentence is dropped from every
locale file that carries the key (all 18), so the copy fix is locale-complete: the
first sentence and the (experimental) tag stay. check-translations runs
node scripts/find-missing-translations.js, which checks key parity rather than prose,
and that script exits 0 in this tree with these files in place.
ClineProvider.spec.ts: the saved-false getStateToPostToWebview test now stores a
second enabled experiment next to the false flag, so a projection that fell back to
experimentDefault whenever the flag was false can no longer pass while discarding an
enabled experiment.
SettingsView.spec.tsx: the toggle test asserts that no updateSettings message reaches
the extension host before Save, and a new test hydrates an explicit false and edits a
different experiment, so the save payload has to carry the hydrated false back.
Gate accounting: packageForPath() in scripts/stryker-diff.mjs returns null for
webview-ui/src/i18n/locales/en/settings.json (a .json path) and for every path in this
commit that is a test file, so the mutation-diff leg charges 0 changed lines for it,
even though executableChangedLines() counts 957 executable lines in the en locale file
alone (of 1,127 total). A null package cancels that leg; it does not make these paths
green.
This answers the copy ask. It does not implement the control: implementing the in-chat
control is the charged route (webview-ui/**/*.tsx maps to the webview package), which
is the route the blocker accounting priced. Copy here is documentation, not the control.
* test(webview): regenerate the four experimental settings visual baselines
The previous commit on this PR replaced the experimental-mode setting copy in 18
locales, and the ExperimentalSettings visual story renders that copy, so the four
committed baselines went stale: the advisory webview-visual leg failed on exactly
experimental-settings-dark.png, -light.png, -high-contrast.png and
-high-contrast-light.png at the merge shape while all six required arms stayed green.
Reproduced locally at CI's merge shape: a scratch branch merging main
(e487cd7) with this PR's head c48ac56
02d2a7cf72fd6790d2 (merge commit 45595b9bbad54f3b699379e42942e475de019f8d), copied into
the pinned image mcr.microsoft.com/playwright:v1.64.1-noble@
sha256:47b510dd9230bf0b9bfc9b20102241e577ea7a99334ab4c3ca19f19770e9b8ea with a
container-side frozen install. The check run at CI's worker count printed
'Running 101 tests using 2 workers' and 4 failed | 97 passed, naming those four
snapshots (504, 584, 590 and 535 pixels different). At the container default of 16
workers the same tree printed 8 failed, the extra four being
RenderedContentContrast.parallelism artifacts, so only the 2-worker run is quoted.
The update run (same image, --workers=2 --update-snapshots=all, restricted to
ExperimentalSettings.visual.tsx) re-generated those four files and passed; nothing
else in the tree changed.
Tooling finding for whoever owns webview-ui/playwright: run-docker.mjs bind-mounts the
host tree, so from a Windows-pnpm host the container dies before any assertion with
"Cannot find module '/work/webview-ui/node_modules/@playwright/test/cli.js'
(MODULE_NOT_FOUND, ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL, exit 1 in ~4 s) because the
mounted node_modules are Windows junctions; it also needs a pnpm shim on PATH for the
config's webServer command. The regeneration above therefore ran from a container-side
install of a copy, with the host tree mounted read-only.
Gate accounting: packageForPath() maps these paths to the webview package, but the
files are binary so parseChangedLines sees no added or removed lines and
executableChangedLines charges 0 lines for them - a binary asset is not executable
source.
Disclosed: this is the second and last push on this PR in the current cycle, spent on
a leg the unit's own commit broke rather than on freshness.
---------
Co-authored-by: Eason Liang <[email protected]>
Co-authored-by: easonLiangWorldedtech <[email protected]>
Co-authored-by: lead <lead@local>1 parent d3d9cd4 commit 332d30f
33 files changed
Lines changed: 428 additions & 2 deletions
File tree
- packages/types/src
- __tests__
- src
- core/webview/__tests__
- webview-ui
- playwright/gallery
- src
- components/settings/__tests__
- __screenshots__
- i18n/locales
- ca
- de
- en
- es
- fr
- hi
- id
- it
- ja
- ko
- nl
- pl
- pt-BR
- ru
- tr
- vi
- zh-CN
- zh-TW
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4308 | 4308 | | |
4309 | 4309 | | |
4310 | 4310 | | |
| 4311 | + | |
| 4312 | + | |
| 4313 | + | |
| 4314 | + | |
| 4315 | + | |
| 4316 | + | |
| 4317 | + | |
| 4318 | + | |
| 4319 | + | |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
4311 | 4352 | | |
4312 | 4353 | | |
4313 | 4354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
2973 | 2974 | | |
2974 | 2975 | | |
2975 | 2976 | | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
2976 | 3031 | | |
2977 | 3032 | | |
2978 | 3033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
69 | 96 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
36 | 110 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments