Port selective Zoo Code review changes (#538, #710) - #18
Open
simurg79 wants to merge 2 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (commit0b0c9f6eb)"scope": "machine"to the existingroo-cline.workspace.rootResolutioncontribution insrc/package.json; setting name, enum, and default untouched."roo-cline"config-section literal insrc/utils/path.tswith the existingPackage.nameconstant. No dependency cycle:src/shared/package.tsimports only../package.json, and sibling utilities (storage.ts,networkProxy.ts,autoImportSettings.ts) already do the same.getConfigurationis called withPackage.name.Zoo RooCodeInc#710 (
9a2e8d866) — VS Code LM condensing (commita2118309d)maxInputTokensfalls back to the live window.useAvailableInputForContextPercentflag. Previously the fork applied it to every provider — this was the real bug. All other providers revert to the original(100 * prevContextTokens) / contextWindow.willManageContextandmanageContextnow share a singlecomputeContextPercenthelper so they cannot disagree; themaxTokens > 0reserve guard is preserved on both paths.Zoo RooCodeInc#563 (
ccd37d1ec) — deliberately not portedThe e2e fixture stabilization depends on Zoo's mock-LLM fixture harness, which does not exist in this fork (no
apps/vscode-e2e/fixtures/orsrc/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/typesspec (asserts Zoo's table literals; this fork's curated table and defaultclaude-opus-5differ intentionally); Zoo'suseSelectedModel.tsand spec (this fork resolvessupportsImagesper-family, Zoo hardcodesfalse— the fork is newer); Zoo'sTaskHeader.tsxchange (reserve guard already present); Zoo'sTask.dispose.test.tsmock changes (an unrelated Vitest teardown flake fix); thezoo-code.*setting rename and all Zoo-branded NLS strings; Zoo's deletion ofdocs/design/workspace-root-resolution.md; and all Zoo branding, provider changes, dependency updates, release metadata, and refactors.Testing
cd src && npx vitest run utils/__tests__/path.spec.tscd src && npx vitest run core/context-management/__tests__/context-management.spec.ts api/providers/__tests__/vscode-lm.spec.tscd src && npx vitest run core/task/__tests__ __tests__/provider-delegation.spec.ts __tests__/history-resume-delegation.spec.tscd src && npx tsc --noEmitnode scripts/find-missing-translations.jsturbo lint--max-warnings=0Note: 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-uiandpackages/typeswere not modified. The e2e suite was not run (it requires a VS Code host and a liveOPENROUTER_API_KEY).Review note
Both this fork and Zoo infer "is VS Code LM" from the presence of the optional
getCondenseContextWindowmethod. 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
8faea4603(New Roo Tool insert and search replace tools RooCodeInc/Roo-Code#538),9a2e8d866(History: click to open but delete instead RooCodeInc/Roo-Code#710); skippedccd37d1ec(Display reasoning for supported openrouter models RooCodeInc/Roo-Code#563).feat/port-zoo-538-710-review-changesfromfork/main=cbb768872; commits0b0c9f6eb,a2118309d; 8 files changed.