Skip to content

Port selective Zoo Code review changes (#538, #710) - #18

Open
simurg79 wants to merge 2 commits into
mainfrom
feat/port-zoo-538-710-review-changes
Open

Port selective Zoo Code review changes (#538, #710)#18
simurg79 wants to merge 2 commits into
mainfrom
feat/port-zoo-538-710-review-changes

Conversation

@simurg79

@simurg79 simurg79 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Selectively ports review-driven refinements from Zoo Code (Zoo-Code-Org/Zoo-Code) into this fork. This is not a wholesale merge: Roo branding, setting names, local VS Code LM model limits, and other fork customizations are preserved.

Zoo RooCodeInc#538 (8faea4603) — rootResolution review changes (commit 0b0c9f6eb)

  • Added "scope": "machine" to the existing roo-cline.workspace.rootResolution contribution in src/package.json; setting name, enum, and default untouched.
  • Replaced the hardcoded "roo-cline" config-section literal in src/utils/path.ts with the existing Package.name constant. No dependency cycle: src/shared/package.ts imports only ../package.json, and sibling utilities (storage.ts, networkProxy.ts, autoImportSettings.ts) already do the same.
  • Adopted Zoo's test-mock cleanup and added one focused test asserting getConfiguration is called with Package.name.

Zoo RooCodeInc#710 (9a2e8d866) — VS Code LM condensing (commit a2118309d)

  • An unknown VS Code LM model family now resolves to the curated default row rather than the inflated live context window; only a non-positive static maxInputTokens falls back to the live window.
  • The "available input space" percentage is now gated to VS Code LM via an opt-in useAvailableInputForContextPercent flag. Previously the fork applied it to every provider — this was the real bug. All other providers revert to the original (100 * prevContextTokens) / contextWindow.
  • willManageContext and manageContext now share a single computeContextPercent helper so they cannot disagree; the maxTokens > 0 reserve guard is preserved on both paths.

Zoo RooCodeInc#563 (ccd37d1ec) — deliberately not ported

The e2e fixture stabilization depends on Zoo's mock-LLM fixture harness, which does not exist in this fork (no apps/vscode-e2e/fixtures/ or src/fixtures/; a repo-wide search for the harness symbols returns nothing). This fork's e2e suite runs against a live OpenRouter model, so there is no fixture matcher to disambiguate. The one applicable line (the hello-world prompt marker) was intentionally skipped: against a live model it provides no stabilization and would likely stop the model emitting "My name is Roo", which the test asserts — making it more flaky, not less. Porting this meaningfully requires importing Zoo's mock-LLM harness first, which is a separate, larger design decision.

Also deliberately not ported

Zoo's VS Code LM model catalog and its packages/types spec (asserts Zoo's table literals; this fork's curated table and default claude-opus-5 differ intentionally); Zoo's useSelectedModel.ts and spec (this fork resolves supportsImages per-family, Zoo hardcodes false — the fork is newer); Zoo's TaskHeader.tsx change (reserve guard already present); Zoo's Task.dispose.test.ts mock changes (an unrelated Vitest teardown flake fix); the zoo-code.* setting rename and all Zoo-branded NLS strings; Zoo's deletion of docs/design/workspace-root-resolution.md; and all Zoo branding, provider changes, dependency updates, release metadata, and refactors.

Testing

Command Result
cd src && npx vitest run utils/__tests__/path.spec.ts 31/31 passed (was 30, +1 new)
cd src && npx vitest run core/context-management/__tests__/context-management.spec.ts api/providers/__tests__/vscode-lm.spec.ts 92/92 passed
cd src && npx vitest run core/task/__tests__ __tests__/provider-delegation.spec.ts __tests__/history-resume-delegation.spec.ts 175 passed, 4 skipped (no delegation regression)
cd src && npx tsc --noEmit clean
node scripts/find-missing-translations.js all 17 locales complete
prettier + turbo lint clean at --max-warnings=0

Note: before the gating flag was threaded through, exactly the 4 tests relying on the ungated denominator failed — confirming the non-VS-Code-LM default path genuinely changed and is now correctly opt-in. webview-ui and packages/types were not modified. The e2e suite was not run (it requires a VS Code host and a live OPENROUTER_API_KEY).

Review note

Both this fork and Zoo infer "is VS Code LM" from the presence of the optional getCondenseContextWindow method. If another provider ever implements it, that provider would silently inherit the available-input denominator. A named capability flag would be more robust; left matching Zoo to stay in scope.

Agent notes

Bertan Ari added 2 commits August 7, 2026 19:01
…ooCodeInc#538 review changes)

Applies the remaining review-driven refinements from Zoo PR RooCodeInc#538 (commit 8faea46) on top of the fork's existing rootResolution feature:

- src/package.json: add "scope": "machine" to the rootResolution contribution. - src/utils/path.ts: read the config section via the existing Package.name constant instead of the hardcoded "roo-cline" literal (no dependency cycle: shared/package.ts imports only package.json, and sibling utils already depend on it). - src/utils/__tests__/path.spec.ts: route the throwing-config case through withWorkspaceMock so it restores getConfiguration, and add one test asserting the setting is read from Package.name's section.

Fork setting name, translations, and existing tests preserved; Zoo branding and unrelated changes not ported.
…known families (port Zoo RooCodeInc#710 review changes)

Ports the remaining review refinements from Zoo PR RooCodeInc#710 (squash 9a2e8d8) onto the fork's newer VS Code LM work. The fork's curated model table, local model limits, image support and reliability fixes are preserved; only these three behaviors were adopted:

- getCondenseContextWindow() resolves the curated default row for an unrecognized/absent VS Code LM family (catalog drift) instead of trusting the live window, which VS Code inflates for some models. Only a non-positive static maxInputTokens still falls back to the live window.

- The available-input-space condense percentage is now opt-in via useAvailableInputForContextPercent and scoped to VS Code LM (gated on the provider implementing getCondenseContextWindow). Every other provider keeps dividing by the full context window. The maxTokens <= 0 reserve guard remains global.

- Extracted the duplicated percentage math into computeContextPercent, shared by willManageContext and manageContext so the gate and the action cannot disagree.

Ref: Zoo RooCodeInc#710, commit 9a2e8d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant