Repository navigation
Commit 510689f
committed
fix(webview): isolate parallel mode and provider profile writes
Port vps2 F3 (mode/profile writes) from upstream 978, hunk-by-hunk against
the F1c..CS residual:
- ClineProvider: add repointPersistedViewStates() to re-point
currentApiConfigName across per-view entries when a profile is renamed
or replaced, and prune orphaned entries; validate handleModeSwitch slugs
against the custom-modes manager and no-op with a log on unknown modes;
drop the as-any cast in delegateParentAndOpenChild.
- Task: route mode switches through provider.handleModeSwitch(task) and
keep the submitted message on failure instead of setMode().
- SwitchModeTool and specs: durable per-view mode writes.
- webviewMessageHandler: no change vs base - the kimi-code OAuth hunk in
the residual is CS-only divergence (not-ported register item 1), not
part of #978/#979.
- webviewMessageHandler.spec: ported only #979's 4 mock fields +
defaultModeSlug import; the stack-side legacy-repair test, Key-aware
getValue mock and em-dash comment are retained (register item 4).
#979's mode-routing WMH.spec describe ("routes mode messages through
handleModeSwitch instead of writing ContextProxy directly") exists in
neither CS nor the stack and is ported by no unit (open question,
logged).
- Tests: H3/H4 durable handleModeSwitch writes in ClineProvider.spec.ts;
profile-mutation, profile-activation and handleModeSwitch-integration
describes (incl. A4 non-focused-target regression and new
mutation-killing tests) in ClineProvider.parallelMode.spec.ts;
sticky-mode and webviewMessageHandler spec updates; retain the
setViewStateId __proto__ guard + spec test - shipped F1a hardening;
the residual's guard removal is lineage divergence, not F3 content.
- eslint-suppressions.json: no-explicit-any counts decrease for
core/webview/ClineProvider.ts (12 -> 11) and
core/webview/__tests__/ClineProvider.sticky-mode.spec.ts (36 -> 33).
Upstream: #978 (vps2 F3) - issue #978; content ported
hunk-by-hunk from the F1c..CS residual, cross-checked against upstream PR1 parent dbd7ec2 commit 510689f
10 files changed
Lines changed: 915 additions & 65 deletions
File tree
- src
- core
- task
- __tests__
- tools
- __tests__
- webview
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1676 | 1676 | | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | | - | |
1680 | | - | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
1681 | 1695 | | |
1682 | 1696 | | |
1683 | 1697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
1411 | 1414 | | |
1412 | 1415 | | |
1413 | 1416 | | |
| 1417 | + | |
1414 | 1418 | | |
1415 | 1419 | | |
1416 | 1420 | | |
| |||
1966 | 1970 | | |
1967 | 1971 | | |
1968 | 1972 | | |
1969 | | - | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1970 | 1980 | | |
1971 | 1981 | | |
1972 | 1982 | | |
| |||
1975 | 1985 | | |
1976 | 1986 | | |
1977 | 1987 | | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1978 | 1992 | | |
1979 | 1993 | | |
1980 | 1994 | | |
| |||
1987 | 2001 | | |
1988 | 2002 | | |
1989 | 2003 | | |
1990 | | - | |
| 2004 | + | |
1991 | 2005 | | |
1992 | 2006 | | |
1993 | 2007 | | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
1994 | 2032 | | |
1995 | 2033 | | |
1996 | 2034 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
168 | | - | |
169 | | - | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
| |||
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
187 | | - | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| |||
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
247 | | - | |
| 250 | + | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
303 | 306 | | |
304 | 307 | | |
305 | 308 | | |
306 | | - | |
| 309 | + | |
307 | 310 | | |
308 | 311 | | |
309 | 312 | | |
| |||
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
328 | | - | |
| 331 | + | |
329 | 332 | | |
330 | | - | |
331 | | - | |
332 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
333 | 338 | | |
334 | 339 | | |
335 | 340 | | |
336 | 341 | | |
337 | 342 | | |
338 | | - | |
| 343 | + | |
| 344 | + | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
344 | | - | |
345 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
346 | 355 | | |
347 | 356 | | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
351 | | - | |
352 | | - | |
| 360 | + | |
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
| |||
0 commit comments