Skip to content

Commit 24dee10

Browse files
Merge upstream/main 73931fe into vps2/f7-viewstate-loaded
Rehearsed first with git merge --no-commit --no-ff against a freshly read git ls-remote --heads upstream refs/heads/main, which named 73931fe: 105 staged paths, 0 conflicted paths. Aborted, head and worktree verified unchanged (1fa4e5a, clean), then merged for real as one merge commit named in this message. Resolution notes for the nine paths whose merged blob equals neither parent; the other 96 paths carry the upstream blob unchanged: - .gitignore: upstream added apps/vscode-e2e/heap-results/ at :31; this branch added ten scratch and log ignore lines after roo-cli-*.tar.gz* at :63. Both sides land. - apps/vscode-e2e/src/runTest.ts: upstream added the write-to-file fixture helper import (+5 at :24), a line at :102, a line at :226 and a 13-line block at :234; this branch added the restart coordinator import (+2 at :26) and the 35-line restart scenario block at :148. Distinct regions, both sides land. - src/core/task/Task.ts: upstream 129+/93- across 15 hunks (the usage-collection timeout constant, a 61-line block at :1758, deletions at :2026 :2067 :2069); this branch 46+/12- across 10 hunks (additions at :908 and :915, a 34-line block at :2581, deletions at :4327 :4379 :4395). Distinct regions, both sides land. - src/core/task/__tests__/Task.spec.ts: upstream added 90 lines at :2550 and 166 at :4515; this branch added 259 lines across 8 hunks (the McpServerManager import, TaskTestAccess fields, blocks at :4127-:4153). Both sides land. - src/core/webview/ClineProvider.ts: upstream 11+/17- across 8 hunks (an import removal at :120, the readTaskMessages import at :155, the 2721-2728 region); this branch 2473+/250- across 102 hunks. Distinct regions, both sides land. - src/core/webview/__tests__/ClineProvider.spec.ts: upstream added a 76-line block at :7949; this branch added 5612 lines across 65 hunks. Both sides land. - src/eslint-suppressions.json: upstream deleted a 115-line entry block at :1012 and changed no count; this branch dropped 8 lines and edited 3, all reductions in files it fixed. The merge keeps the upstream deletions and this side reductions: 264 entries / 2852 suppressed, against 287 entries / 3283 on this branch parent and 265 entries / 2870 on upstream, with no entry increased over either parent. ContextProxy.ts carries no entry because this branch removed its only suppression; three specs sit below upstream because this branch fixed suppressions in them (ClineProvider.spec 188 vs 195, ClineProvider.sticky-mode 23 vs 27, webviewMessageHandler 29 vs 35). - src/extension/api.ts: upstream added three hunks (the TaskMessagesReadError, getErrorCode and tracePersistenceEvent imports at :36, a 9-line block at :366 and a 3-line change at :377); this branch 34 hunks (the module-level key helpers, the save section and its rollback). Distinct regions, both sides land. - src/package.json: upstream bumped version 3.94.0 to 3.96.0 at :6 and the ai dependency 7.0.148 to 7.0.162 at :569; this branch contributed 20 command entries at :98. Distinct regions, both sides land. pnpm install --frozen-lockfile ran before any gate (10.1 s, lockfile left unmodified, the prepare husky step re-ran). Gates on the merged tree, all exit 0, using each package own scripts rather than a root eslint invocation: pnpm --dir src run lint, pnpm --dir src run check-types, pnpm --dir webview-ui run lint, pnpm --dir webview-ui run check-types, pnpm --dir apps/vscode-e2e run lint, pnpm --dir apps/vscode-e2e run check-types, and prettier --check --ignore-unknown over all 105 merged paths. Survivor pass against the staged index, by blob identity against both parents: 96 paths equal the upstream blob, 9 equal neither parent (the nine above), 0 equal this branch parent, so nothing from either side was dropped. Test-title arithmetic over the 32 spec and test paths in the change set: merge-base e943530 900, upstream 962, this branch 1057, merged 1119, and 1119 = 1057 + (962 - 900), so the merge lost no title from either side; the whole-src census (11024 / 11086 / 11411 / 11473) is additive in the same way.
2 parents 1fa4e5a + 73931fe commit 24dee10

105 files changed

Lines changed: 3907 additions & 1501 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/e2e.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,18 @@ jobs:
162162
if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true'
163163
run: TEST_FILE=restart-persistence.test USE_MOCK=true xvfb-run -a pnpm --filter @roo-code/vscode-e2e exec node ./out/runTest.js
164164

165+
- name: Upload restart-persistence failure artifacts
166+
# runTest.js preserves a failed scenario workspace (phase results,
167+
# VS Code logs, task files) under apps/vscode-e2e/test-failures/
168+
# instead of deleting it, so the interrupted-write state from
169+
# issue #2130-style failures stays inspectable.
170+
if: failure()
171+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
172+
with:
173+
name: restart-persistence-failure
174+
path: apps/vscode-e2e/test-failures/
175+
if-no-files-found: ignore
176+
165177
- name: Explain skipped mocked E2E pass marker
166178
if: steps.e2e-marker.outputs.cache-hit != 'true' && steps.run-e2e.outcome == 'success' && steps.vscode-fallback.outputs.used == 'true'
167179
run: echo "Skipping mocked E2E pass marker because tests ran against a stale cached VS Code binary (VS Code download endpoints unreachable)."

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ AGENTS.local.md
2828
apps/vscode-e2e/playwright-report-electron/
2929
apps/vscode-e2e/test-results-electron/
3030
apps/vscode-e2e/heap-results/
31+
apps/vscode-e2e/test-failures/
3132

3233
# Docs
3334
docs/_site/

‎CHANGELOG.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
# Zoo Code Changelog
22

3+
## [3.96.0]
4+
5+
- ✨ **New chat settings and diagnostics:** Show message timestamps with configurable time and date formats, tune the prompt-cache TTL for Anthropic profiles, and generate privacy-safe diagnostics reports.
6+
- 💸 **More accurate provider costs and caching:** Keep Anthropic tool results intact, adopt cumulative output tokens in Anthropic and MiniMax costs, read DeepSeek prompt-cache counters, target the xAI Responses cache, and bill Mistral cache reads at 0.1x.
7+
- 🧭 **More reliable and faster chats:** Resume completed tasks after a restart, restore checkpoints when the saved commit is missing, auto-reload a dead webview renderer, throttle streaming updates, and load locales on demand.
8+
9+
### New Chat Settings and Diagnostics
10+
11+
- Add time and date format settings and message timestamps (#2221 by @KarthickMahalingam, PR #2223 by @KarthickMahalingam)
12+
- Add a user-facing prompt-cache TTL for Anthropic profiles (PR #2271 by @simurg79)
13+
- Add privacy-safe diagnostics reports (PR #2292 by @app/zoomote2)
14+
15+
### More Accurate Provider Costs and Caching
16+
17+
- Keep tool_result blocks contiguous in Anthropic requests by grouping image blocks separately (#1307 by @alaskanloosemoose-dotcom, PR #2243 by @myk1yt)
18+
- Adopt cumulative message_delta output tokens in Anthropic and MiniMax cost (#1727 by @myk1yt, PR #2242 by @myk1yt)
19+
- Read documented top-level prompt-cache counters for DeepSeek (PR #2252 by @myk1yt)
20+
- Send body prompt_cache_key for xAI Responses cache affinity (PR #2256 by @myk1yt)
21+
- Bill Mistral cache reads at 0.1x instead of the full input price (PR #2257 by @myk1yt)
22+
- Map xAI tool_choice to the Responses API shape with a typed request body (PR #2036 by @easonLiangWorldedtech)
23+
- Add MiMo V2.6 Flash and Pro model configurations for OpenCode Go (#1997 by @WebMad, PR #2246 by @myk1yt)
24+
25+
### More Reliable and Faster Chats
26+
27+
- Resume completed tasks after a restart when a message write is interrupted (#2130 by @edelauna, PR #2297 by @app/zoomote2)
28+
- Restore checkpoints when the saved commit is missing (PR #2269 by @simurg79)
29+
- Detect a dead webview renderer via heartbeat and auto-reload (PR #1715 by @myk1yt)
30+
- Report emergency condense like the automatic path (PR #1838 by @PierrunoYT)
31+
- Summarize only the API-visible history when condensing (#1342 by @RemainIndoors1, PR #2300 by @RytisLT)
32+
- Propagate beyond-EOF read-file errors instead of reporting the file as empty (PR #1734 by @myk1yt)
33+
- Throttle partial message updates while streaming (PR #2120 by @PierrunoYT)
34+
- Replace axios with fetch in key-info hooks (PR #2261 by @myk1yt)
35+
- Load locales on demand instead of eager-globbing all 18 (PR #2267 by @myk1yt)
36+
- Replace the debounce package with a local leading-edge helper (PR #2268 by @myk1yt)
37+
38+
### New Features and Integrations
39+
40+
- Add a dependency-free BM25 ranker tool (PR #1207 by @edelauna)
41+
- Add abort-signal wiring for lm-studio and qwen-code (PR #1309 by @easonLiangWorldedtech)
42+
- Add Keenable to the MCP marketplace (#2312 by @ilya-bogin-keenable, PR #2313 by @ilya-bogin-keenable)
43+
44+
### Testing, CI, and Repository Automation
45+
46+
- Cancel obsolete PR CI runs and remove duplicate builds (#2289 by @edelauna, PR #2294 by @app/zoomote2)
47+
- Post surviving mutants as a PR comment (#2287 by @edelauna, PR #2293 by @app/zoomote2)
48+
- Run webview CI tests with four workers (#2288 by @edelauna, PR #2308 by @app/zoomote2)
49+
- Use plugin-side related-test discovery for the extension package mutation gate (PR #2211 by @easonLiangWorldedtech)
50+
- Add test-utils guardrails and convert remaining stragglers (PR #2279 by @app/zoomote2)
51+
- Drop test-only tool-use interfaces from shared/tools (PR #2258 by @myk1yt)
52+
- Show the Zoo Code panel in the Solheim smoke video and bound the apt step (#2158 by @edelauna, PR #2195 by @app/zoomote2)
53+
54+
### Refactoring and Code Health
55+
56+
- Move default provider ID functionality into the provider definition (PR #2233 by @p12tic)
57+
- Resolve profile model IDs through provider definitions (PR #2239 by @p12tic)
58+
- Remove no-explicit-any suppressions in utils (PR #2281 by @app/zoomote2)
59+
- Remove no-explicit-any suppressions in small directories (PR #2286 by @app/zoomote2)
60+
- Close lint coverage and knip hygiene gaps (PR #2280 by @app/zoomote2)
61+
- Sweep dead locale keys behind an AST gate (PR #2263 by @myk1yt)
62+
- Remove dead CSS classes from the global stylesheet (PR #2251 by @myk1yt)
63+
64+
### Dependencies and Maintenance
65+
66+
- Update @tanstack/react-query to v5.105.0 (PR #2180 by @app/renovate)
67+
- Update ignore to v7.0.14 (PR #2181 by @app/renovate)
68+
- Update posthog-js to v1.440.0 (PR #2182 by @app/renovate)
69+
- Update posthog-node to v5.57.2 (PR #2183 by @app/renovate)
70+
- Update GitHub Actions (PR #2186 by @app/renovate)
71+
- Update qs to v6.16.1 [security] (PR #2214 by @app/renovate)
72+
73+
### Housekeeping
74+
75+
- Merge the **previous v3.94.0 release preparation** after its publication; this is prior-release housekeeping, not a v3.96.0 feature (PR #2272 by @app/zoomote2)
76+
377
## [3.94.0]
478

579
- ✨ **Broader model and provider support:** Use Claude Haiku 5.5 through Anthropic, send images to compatible VS Code LM models, tune temperature for OpenCode Go Responses models, and cancel requests cleanly across more providers.

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ Zoo Code builds on the foundation created by Roo Code and continues to expand it
4646
- **More dependable terminal and editing workflows** — fixes for premature terminal completion, task-state races, context management, diff editing, and provider-specific tool use.
4747
- **More control over your workspace** — rules management, per-mode MCP restrictions, multi-root path controls, model reasoning options, and completion change review actions.
4848

49-
## What's New in v3.94.0
49+
## What's New in v3.96.0
5050

51-
- ✨ **Broader model and provider support:** Use Claude Haiku 5.5 through Anthropic, send images to compatible VS Code LM models, tune temperature for OpenCode Go Responses models, and cancel requests cleanly across more providers.
52-
- 🔐 **More flexible MCP OAuth:** Configure static OAuth client settings, use custom callback paths, discover authentication details from `WWW-Authenticate`, and see callback failures before retrying.
53-
- 🧭 **Smoother chats and long sessions:** Rename tasks in history, drag files into chat without holding Shift, reduce memory retained during long sessions, and keep subtask links and replaced webviews stable.
51+
- ✨ **New chat settings and diagnostics:** Show message timestamps with configurable time and date formats, tune the prompt-cache TTL for Anthropic profiles, and generate privacy-safe diagnostics reports.
52+
- 💸 **More accurate provider costs and caching:** Keep Anthropic tool results intact, adopt cumulative output tokens in Anthropic and MiniMax costs, read DeepSeek prompt-cache counters, target the xAI Responses cache, and bill Mistral cache reads at 0.1x.
53+
- 🧭 **More reliable and faster chats:** Resume completed tasks after a restart, restore checkpoints when the saved commit is missing, auto-reload a dead webview renderer, throttle streaming updates, and load locales on demand.
5454

5555
<details>
5656
<summary>🌐 Available languages</summary>

‎apps/vscode-e2e/src/restart/scenarioWorkspace.ts‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,56 @@ export async function removeScenarioWorkspace(scenarioWorkspace: ScenarioWorkspa
5656

5757
await fs.rm(root, { recursive: true, force: true })
5858
}
59+
60+
const FAILURE_ARTIFACTS_DIR = "test-failures"
61+
62+
/**
63+
* Copies the diagnosable parts of a failed scenario workspace into a stable
64+
* directory inside the checkout, then removes the temporary scenario root.
65+
* CI uploads that directory as a run artifact, so the failure that used to be
66+
* deleted in the cleanup path stays inspectable: phase results, VS Code logs,
67+
* and the extension's global storage with the task files.
68+
*
69+
* The directory is keyed by the unique scenario root name and cleared before
70+
* copying, so retried runs cannot mix artifacts from different failures.
71+
*/
72+
export async function preserveScenarioWorkspace(scenarioWorkspace: ScenarioWorkspace): Promise<string> {
73+
const destinationRoot = path.resolve(
74+
__dirname,
75+
"../../",
76+
FAILURE_ARTIFACTS_DIR,
77+
path.basename(scenarioWorkspace.root),
78+
)
79+
await fs.rm(destinationRoot, { recursive: true, force: true })
80+
await fs.mkdir(destinationRoot, { recursive: true })
81+
82+
const selections: Array<{ label: string; source: string; destination: string }> = [
83+
{
84+
label: "phase results",
85+
source: scenarioWorkspace.results,
86+
destination: path.join(destinationRoot, "phase-results"),
87+
},
88+
{
89+
label: "VS Code logs",
90+
source: path.join(scenarioWorkspace.userData, "logs"),
91+
destination: path.join(destinationRoot, "vscode-logs"),
92+
},
93+
{
94+
label: "task files",
95+
source: path.join(scenarioWorkspace.userData, "User", "globalStorage"),
96+
destination: path.join(destinationRoot, "global-storage"),
97+
},
98+
]
99+
100+
for (const selection of selections) {
101+
try {
102+
await fs.cp(selection.source, selection.destination, { recursive: true, force: true })
103+
} catch (error) {
104+
// A missing subdirectory must not hide the other artifacts.
105+
console.error(`Failed to preserve ${selection.label} from ${selection.source}:`, error)
106+
}
107+
}
108+
109+
await removeScenarioWorkspace(scenarioWorkspace)
110+
return destinationRoot
111+
}

‎apps/vscode-e2e/src/runTest.ts‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ import { addSearchFilesResultFixtures } from "./fixtures/search-files"
2121
import { addSubtaskFixtures } from "./fixtures/subtasks"
2222
import { addUseMcpToolResultFixtures } from "./fixtures/use-mcp-tool"
2323
import { addWriteToFileResultFixtures } from "./fixtures/write-to-file"
24-
import { createScenarioWorkspace, removeScenarioWorkspace } from "./restart/scenarioWorkspace"
24+
import {
25+
createScenarioWorkspace,
26+
preserveScenarioWorkspace,
27+
removeScenarioWorkspace,
28+
} from "./restart/scenarioWorkspace"
2529
import { runRestartScenario } from "./restart/vscodeCoordinator"
2630
import { toolResultContains } from "./fixtures/tool-result"
2731
import { addViewStateFixtures } from "./fixtures/view-state"
@@ -97,6 +101,7 @@ async function main() {
97101

98102
let testWorkspace: string | undefined
99103
let scenarioWorkspace: Awaited<ReturnType<typeof createScenarioWorkspace>> | undefined
104+
let runFailed = false
100105

101106
try {
102107
// Create a temporary workspace folder for regular tests. Restart scenarios own
@@ -255,14 +260,27 @@ async function main() {
255260
})
256261
}
257262
} catch (error) {
263+
runFailed = true
258264
console.error("Failed to run tests", error)
259265
process.exitCode = 1
260266
} finally {
261267
if (testWorkspace) {
262268
await fs.rm(testWorkspace, { recursive: true, force: true })
263269
}
264270
if (scenarioWorkspace) {
265-
await removeScenarioWorkspace(scenarioWorkspace)
271+
// A failed restart scenario must stay inspectable: the phase
272+
// results, VS Code logs, and task files are copied to a stable
273+
// directory for CI artifact upload before the temp root goes away.
274+
if (runFailed) {
275+
try {
276+
const preservedAt = await preserveScenarioWorkspace(scenarioWorkspace)
277+
console.error(`Restart scenario workspace preserved for failure inspection: ${preservedAt}`)
278+
} catch (preserveError) {
279+
console.error("Failed to preserve the restart scenario workspace:", preserveError)
280+
}
281+
} else {
282+
await removeScenarioWorkspace(scenarioWorkspace)
283+
}
266284
}
267285
await mock?.stop()
268286
}

‎apps/vscode-e2e/src/suite/restart-persistence.test.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ async function runCreate(api: RooCodeAPI): Promise<void> {
5454
await waitUntilCompleted({ api, taskId })
5555
assert.strictEqual(sawMarker, true, `Completion should include ${MARKER}`)
5656

57-
// TaskCompleted fires before the final saveClineMessages() write is
58-
// necessarily durable on disk. Wait until the completion marker is
59-
// persisted in ui_messages.json before quitting, so the verify phase
60-
// never reads a task directory whose final write has not landed yet.
57+
// TaskCompleted and the UI marker do not acknowledge all three files.
58+
// Check both persisted histories and the store's published history item.
59+
// TaskHistoryStore publishes newly created cache entries only after writing them.
6160
const createdTaskId: string = taskId
6261
await waitFor(() => api.hasTaskUiMessageText(createdTaskId, MARKER))
62+
await waitForMarkedCompletion(api, createdTaskId)
63+
await waitFor(async () => (await api.getTaskHistoryItem(createdTaskId)) !== undefined)
6364

6465
const result: PhaseResult = {
6566
version: PHASE_RESULT_VERSION,

0 commit comments

Comments
 (0)