Skip to content

Enforce vitest strict equality in tests (Fixes #1569)#1901

Open
acoliver wants to merge 25 commits intomainfrom
issue1569c
Open

Enforce vitest strict equality in tests (Fixes #1569)#1901
acoliver wants to merge 25 commits intomainfrom
issue1569c

Conversation

@acoliver
Copy link
Copy Markdown
Collaborator

@acoliver acoliver commented Apr 16, 2026

Summary

  • enforce strict equality expectations in test suites as part of issue Enable strict lint and complexity rules on core/cli #1569 lint hardening
  • promote vitest prefer-strict-equal from warning to error and migrate in-scope assertions
  • keep behavior unchanged by using strict-match alternatives only where object shape contains intentional undefined/omitted optional fields

What changed

  • enabled error-level enforcement for vitest prefer-strict-equal in eslint.config.js
  • added a scoped codemod script at scripts/codemods/pse-fix.mjs to migrate reported sites
  • updated assertion sites across CLI/Core tests from toEqual to toStrictEqual where semantically correct
  • adjusted selected assertions to toMatchObject or explicit shape checks in places where strict equality would incorrectly fail due to optional undefined keys
  • fixed regressions surfaced by strict equality migration in targeted test files:
    • packages/core/src/core/turn.test.ts
    • packages/core/src/code_assist/converter.test.ts
    • packages/core/src/mcp/oauth-utils.test.ts
    • packages/core/src/services/environmentSanitization.test.ts
    • packages/core/src/auth/proxy/tests/proxy-token-store.test.ts
    • packages/cli/src/ui/hooks/useSlashCompletion.test.ts
    • packages/cli/src/ui/commands/schema/argumentResolver.test.ts

Verification

  • npm run test
  • npm run lint
  • npm run typecheck
  • npm run format
  • npm run build
  • node scripts/start.js --profile-load synthetic "write me a haiku and nothing else"

@github-actions github-actions bot added the maintainer:e2e:ok Trusted contributor; maintainer-approved E2E run label Apr 16, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 16, 2026

Summary by CodeRabbit

  • Chores
    • Refactored internal code organization and import structure for improved maintainability
    • Enhanced test suite with stricter equality assertions across multiple modules
    • Updated ESLint configuration rules and severity levels
    • Reorganized control flow structures for improved code clarity

Walkthrough

This PR refactors a2a-server agent task handling by extracting helper utilities into a new module, modernizes test assertions to use strict equality, introduces type-only imports across the codebase for compilation optimization, adjusts ESLint rules, and applies optional chaining and nullish coalescing patterns throughout.

Changes

Cohort / File(s) Summary
ESLint Configuration
eslint.config.js
Raises TypeScript type-import rule severity to error for main sources; disables multiple SonarJS rules; broadens Vitest glob pattern and adjusts test-file ESLint overrides.
A2A Server Agent Task Refactoring
packages/a2a-server/src/agent/executor.ts, packages/a2a-server/src/agent/task.ts, packages/a2a-server/src/agent/task-support.ts (new)
Extracts ~700 lines of task/tool handling, message building, and event dispatch logic into centralized task-support.ts module; refactors executor.ts with private helper methods for socket handling, task hydration, agent loops, and error handling; removes monolithic inline logic from task.ts in favor of delegating to shared utilities.
A2A Server Supporting Changes
packages/a2a-server/src/agent/task.test.ts, packages/a2a-server/src/commands/extensions.ts, packages/a2a-server/src/config/config.ts, packages/a2a-server/src/utils/testing_utils.ts, packages/a2a-server/src/http/app.ts
Task tests updated to toStrictEqual; extensions logic uses explicit length comparison; config uses nullish coalescing; mock config adds getProvider; HTTP handler unindents non-streaming path.
CLI Auth Module Imports
packages/cli/src/auth/*.ts, packages/cli/src/auth/__tests__/*.spec.ts
Consolidates type-only imports for OAuthToken, TokenStore, OAuthProvider; converts method checks to optional chaining; updates types.ts to use named imported types instead of inline import(...) expressions; tightens test assertions to toStrictEqual.
CLI Config & Extension Imports
packages/cli/src/config/*.ts, packages/cli/src/config/extensions/*.ts, packages/cli/src/commands/extensions/*.ts
Converts multiple type references to import type form; simplifies control flow by removing else blocks in favor of unconditional returns; updates extension/settings logic with optional chaining and type-only imports.
CLI Commands & UI Imports
packages/cli/src/ui/commands/*.ts, packages/cli/src/ui/commands/test/*.ts, packages/cli/src/ui/components/*.tsx
Splits type vs. runtime imports (e.g., SlashCommand, CommandContext, Config, React); converts all to type-only where appropriate; simplifies prompt/settings logic with optional chaining; unindents conditional branches into trailing returns.
Test Assertion Tightening
packages/a2a-server/src/**/*.test.ts, packages/cli/src/**/*.test.ts, packages/cli/src/**/*.spec.ts (100+ files)
Systematically replaces toEqual(...) with toStrictEqual(...) for arrays, objects, and scalar comparisons across all test suites (e.g., extensions, config, integration tests, auth behavioral tests).
Runtime & Provider Imports
packages/cli/src/runtime/*.ts, packages/cli/src/providers/*.ts, packages/cli/src/services/*.ts, packages/cli/src/storage/*.ts, packages/cli/src/test-utils/*.ts, packages/cli/src/nonInteractiveCli.ts, packages/cli/src/gemini.tsx
Converts Config, SettingsService, MessageBus, IProvider, IModel, Profile, ToolCallRequestInfo, and related symbols to type-only imports; removes runtime import side effects while preserving TypeScript type safety.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 With helpers extracted and types made pure,
Assertions grow stricter, control flow's sure.
Optional chains dance where once stood guards,
And tests demand exactness—no more half-hearts.
A2A's loops tamed, the CLI imports aligned,
One hop closer to code so refined!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue1569c

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

LLxprt PR Review – PR #1901

Issue Alignment

PR #1901 correctly addresses issue #1569 lint hardening:

  • eslint.config.js: Promoted vitest/prefer-strict-equal from 'warn' to 'error' [OK]
  • scripts/codemods/pse-fix.mjs: Added scoped codemod to automate toEqualtoStrictEqual migration [OK]
  • Test updates: Migrated 1004 files, replacing toEqual with toStrictEqual where semantically correct [OK]
  • Appropriate use of toMatchObject: Used where strict equality fails due to undefined properties (settings.test.ts, converter.test.ts, argumentResolver.test.ts) [OK]
  • Explicit undefined handling: Added traceId: undefined etc. where actual objects contain those keys (turn.test.ts) [OK]

The PR description accurately reflects the changes made.

Side Effects

Unrelated code changes bundled with test migration:

  1. packages/a2a-server/src/agent/task-support.tsNEW 771-line file added (not test migration)
  2. packages/a2a-server/src/agent/executor.ts — 704 lines changed (significant refactor)
  3. packages/a2a-server/src/agent/task.ts — 594 lines changed (significant refactor)
  4. packages/core/src/policy/config.ts — 251 lines changed (restructured)
  5. packages/core/src/utils/toolOutputLimiter.ts — 94 lines changed (refactored control flow)

These additions/refactors are substantial and were not mentioned in the issue. The PR description says "keep behavior unchanged" but these non-test changes could affect behavior. They appear to be refactoring for maintainability but are outside the scope of "enforce strict equality."

Positive side effects:

  • @typescript-eslint/consistent-type-imports promoted to 'error' (aligned with issue requirements)
  • Multiple source files updated type imports (import type vs import) — follows TS best practices
  • Idiomatic conditional logic improvements (e.g., if (x?.trim()))

Code Quality

  • Codemod script: Well-structured with proper error handling, back-to-front processing to avoid offset shifts [OK]
  • Type imports: Correctly separated import type from value imports across many files [OK]
  • Control flow refactors: In policy/config.ts and toolOutputLimiter.ts, early-return patterns improve readability, but they change behavior and should be verified
  • No obvious bugs detected in reviewed changes

Tests and Coverage

  • Coverage impact: unchanged — test assertions updated, behavior preserved
  • No mock theater detected — tests verify behavioral outcomes, not implementation details
  • Appropriate assertion strategy:
    • toStrictEqual for complete object matches
    • toMatchObject for partial matches where undefined properties cause strict equality failures
    • Explicit undefined in expected values where actual objects contain those keys

Verdict: Needs Work

Rationale: While the core strict-equality migration is correctly implemented, the PR bundles ~2200 lines of unrelated code changes (a2a-server additions, policy config refactor, tool output limiter changes) that were not part of issue #1569 scope. This violates scope discipline and creates risk of regressions unrelated to the stated goal. The PR should either:

  1. Split into separate PRs (strict-equality migration vs. other refactors)
  2. Or remove the unrelated changes and keep only the test assertion updates

The vitest/prefer-strict-equal enforcement and test updates are ready to merge once isolated from the bundled refactors.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/a2a-server/src/agent/task-support.ts`:
- Around line 468-473: The comment about "!==
ToolConfirmationOutcome.ModifyWithEditor does not work!" is misleading; update
it to explain why comparing against the enum member fails and clarify the
correct check used: explain that confirmationOutcome is a runtime string (not
the enum type) so we must compare to the literal 'modify_with_editor' rather
than the enum member, or alternatively compare to
ToolConfirmationOutcome.ModifyWithEditor if you change the caller to pass the
enum value; reference the variables confirmationOutcome and
context.pendingToolConfirmationDetails and mention
ToolConfirmationOutcome.ModifyWithEditor so reviewers know where to look.
- Around line 729-731: The AnsiOutput type import currently appears at the
bottom of the file after its usage by convertAnsiOutputToString; move the import
"AnsiOutput" from '@vybestack/llxprt-code-core' into the main import block at
the top alongside the other imports from that module (so
convertAnsiOutputToString clearly has its type available near related imports),
then remove the duplicate bottom import lines that are currently at the end of
the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9277bde3-adc1-415f-bc53-91b0908ca88f

📥 Commits

Reviewing files that changed from the base of the PR and between 74ef2d7 and 750133b.

⛔ Files ignored due to path filters (9)
  • project-plans/issue1569c/BATCH_INVENTORY.md is excluded by !project-plans/**
  • project-plans/issue1569c/BATCH_TEMPLATE.md is excluded by !project-plans/**
  • project-plans/issue1569c/PLAN.md is excluded by !project-plans/**
  • project-plans/issue1569c/rule-family-01-test-discipline.md is excluded by !project-plans/**
  • project-plans/issue1569c/rule-family-02-type-imports.md is excluded by !project-plans/**
  • project-plans/issue1569c/rule-family-03-readability.md is excluded by !project-plans/**
  • project-plans/issue1569c/rule-family-04-boolean-nullish.md is excluded by !project-plans/**
  • project-plans/issue1569c/rule-family-05-complexity.md is excluded by !project-plans/**
  • project-plans/issue1569c/rule-family-06-sonar-maintainability.md is excluded by !project-plans/**
📒 Files selected for processing (13)
  • eslint.config.js
  • packages/a2a-server/src/agent/executor.ts
  • packages/a2a-server/src/agent/task-support.ts
  • packages/a2a-server/src/agent/task.test.ts
  • packages/a2a-server/src/agent/task.ts
  • packages/a2a-server/src/commands/extensions.test.ts
  • packages/a2a-server/src/commands/extensions.ts
  • packages/a2a-server/src/commands/restore.test.ts
  • packages/a2a-server/src/config/config.ts
  • packages/a2a-server/src/utils/testing_utils.ts
  • packages/core/src/config/config.test.ts
  • packages/core/src/policy/config.test.ts
  • packages/core/src/providers/anthropic/AnthropicApiExecution.ts

Comment thread packages/a2a-server/src/agent/task-support.ts
Comment thread packages/a2a-server/src/agent/task-support.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 58.38% 58.38% 66.85% 80.1%
Core 78.23% 78.23% 78.17% 81.53%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   58.38 |     80.1 |   66.85 |   58.38 |                   
 src               |   56.54 |    57.25 |    62.5 |   56.54 |                   
  gemini.tsx       |    50.4 |    56.81 |   54.54 |    50.4 | ...1195,1203-1222 
  ...ractiveCli.ts |   60.92 |    55.33 |   55.55 |   60.92 | ...06-613,615-624 
  ...liCommands.ts |   97.22 |       60 |     100 |   97.22 | 39-40             
  ...ActiveAuth.ts |   59.42 |    70.58 |     100 |   59.42 | ...0,78-93,97-106 
 src/auth          |    80.8 |    88.39 |   88.43 |    80.8 |                   
  ...andlerImpl.ts |   85.83 |    87.38 |   91.66 |   85.83 | ...49,578,593-594 
  ...henticator.ts |     100 |    95.65 |   83.33 |     100 | 170               
  ...ketManager.ts |     100 |      100 |     100 |     100 |                   
  ...andlerImpl.ts |   25.49 |      100 |      50 |   25.49 | 53-92,98-102      
  ...h-provider.ts |   78.28 |    85.96 |      80 |   78.28 | ...33-448,460-483 
  ...chestrator.ts |   89.33 |    86.59 |     100 |   89.33 | ...96,650-665,671 
  ...us-service.ts |   90.84 |    88.73 |     100 |   90.84 | ...54-358,445-446 
  auth-utils.ts    |   77.35 |    83.33 |     100 |   77.35 | 23-30,84-85,89-90 
  ...h-provider.ts |   73.95 |    63.15 |    87.5 |   73.95 | ...68,474,484-526 
  ...h-provider.ts |   19.55 |      100 |   34.78 |   19.55 | ...52-483,501-520 
  ...l-oauth-ui.ts |   96.42 |      100 |     100 |   96.42 | 52,89             
  ...h-callback.ts |   82.94 |    75.67 |    90.9 |   82.94 | ...74-775,788-790 
  migration.ts     |       0 |        0 |       0 |       0 | 1-70              
  oauth-manager.ts |   95.58 |    97.91 |   97.29 |   95.58 | 405,471-480       
  ...vider-base.ts |     100 |    96.96 |     100 |     100 | 83                
  ...al-manager.ts |   86.68 |    96.25 |   93.75 |   86.68 | ...94-395,426-467 
  profile-utils.ts |   77.27 |    69.23 |     100 |   77.27 | ...8-89,97-98,110 
  ...r-registry.ts |   97.46 |     87.5 |     100 |   97.46 | 79-80             
  ...usage-info.ts |   99.45 |    97.22 |     100 |   99.45 | 237               
  ...h-provider.ts |   58.29 |    66.66 |   72.72 |   58.29 | ...00-338,346-387 
  ...oordinator.ts |   87.92 |    90.24 |     100 |   87.92 | ...01-905,918,934 
  ...ver-helper.ts |   89.53 |    88.88 |     100 |   89.53 | 82,96,128-133,141 
  ...e-resolver.ts |   96.07 |     90.9 |     100 |   96.07 | 42,73-74,80       
  ...esh-helper.ts |   91.51 |    86.48 |     100 |   91.51 | ...46,179,186,209 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/auth/proxy    |   82.31 |    78.01 |   82.35 |   82.31 |                   
  ...oxy-server.ts |   84.53 |    74.58 |   96.66 |   84.53 | ...-960,1079-1084 
  ...re-factory.ts |     100 |      100 |     100 |     100 |                   
  ...on-manager.ts |   98.16 |    94.11 |     100 |   98.16 | 51-52             
  ...-scheduler.ts |    92.3 |    84.61 |     100 |    92.3 | 56-59             
  ...th-adapter.ts |   63.54 |    66.66 |    64.7 |   63.54 | ...44-245,256,260 
  ...oordinator.ts |   98.98 |    82.05 |     100 |   98.98 | 156               
  ...-lifecycle.ts |    59.5 |    66.66 |   33.33 |    59.5 | ...92,199,241-242 
 src/commands      |   78.35 |      100 |   44.44 |   78.35 |                   
  extensions.tsx   |   55.88 |      100 |       0 |   55.88 | 25-38,42          
  hooks.ts         |   61.53 |      100 |       0 |   61.53 | 14-17,20          
  mcp.ts           |   94.11 |      100 |      50 |   94.11 | 26                
  skills.tsx       |     100 |      100 |     100 |     100 |                   
  utils.ts         |     100 |      100 |     100 |     100 |                   
 ...nds/extensions |   74.07 |       92 |   67.34 |   74.07 |                   
  config.ts        |   93.36 |    88.88 |     100 |   93.36 | ...25-226,228-233 
  disable.ts       |     100 |      100 |     100 |     100 |                   
  enable.ts        |     100 |      100 |     100 |     100 |                   
  install.ts       |   77.61 |    71.42 |   66.66 |   77.61 | ...10,156,159-166 
  link.ts          |   64.15 |    83.33 |      25 |   64.15 | 30,53-64,66-71    
  list.ts          |      90 |      100 |   33.33 |      90 | 35-37             
  new.ts           |     100 |      100 |     100 |     100 |                   
  settings.ts      |   71.02 |      100 |   66.66 |   71.02 | 32-80,222-226,229 
  uninstall.ts     |   78.43 |      100 |   66.66 |   78.43 | 54-59,62-66       
  update.ts        |   11.42 |      100 |       0 |   11.42 | ...44-159,161-166 
  utils.ts         |   13.33 |      100 |       0 |   13.33 | 29-60             
  validate.ts      |   89.36 |     87.5 |      75 |   89.36 | 50-53,60,112-116  
 .../hooks/scripts |       0 |        0 |       0 |       0 |                   
  on-start.js      |       0 |        0 |       0 |       0 | 1-8               
 ...les/mcp-server |       0 |        0 |       0 |       0 |                   
  example.js       |       0 |        0 |       0 |       0 | 1-60              
 ...commands/hooks |    9.37 |      100 |       0 |    9.37 |                   
  migrate.ts       |    9.37 |      100 |       0 |    9.37 | ...60-170,172-174 
 src/commands/mcp  |   96.73 |    85.48 |    90.9 |   96.73 |                   
  add.ts           |   99.51 |    92.59 |     100 |   99.51 | 50                
  list.ts          |   90.43 |    82.14 |      80 |   90.43 | ...14-116,149-151 
  remove.ts        |     100 |    71.42 |     100 |     100 | 21-25             
 ...ommands/skills |   60.85 |     92.3 |   31.25 |   60.85 |                   
  disable.ts       |      54 |      100 |   33.33 |      54 | 40-52,54-63       
  enable.ts        |   72.22 |      100 |   33.33 |   72.22 | 33-37,39-43       
  install.ts       |   42.69 |      100 |      25 |   42.69 | ...71-100,102-109 
  list.ts          |   84.72 |       80 |   33.33 |   84.72 | ...78,91-95,97-99 
  uninstall.ts     |   57.89 |      100 |   33.33 |   57.89 | 47-64,66-71       
 src/config        |    88.3 |    81.27 |    83.5 |    88.3 |                   
  ...deResolver.ts |   94.54 |    95.45 |     100 |   94.54 | 50-52             
  auth.ts          |   84.61 |    82.35 |     100 |   84.61 | 18-19,22-23,53-54 
  cliArgParser.ts  |   90.57 |    86.95 |     100 |   90.57 | ...53-256,286-289 
  ...alSettings.ts |   86.66 |    88.23 |     100 |   86.66 | 40-41,44-47       
  config.ts        |     100 |      100 |     100 |     100 |                   
  configBuilder.ts |   96.28 |      100 |    87.5 |   96.28 | 109-115,235-236   
  ...mentLoader.ts |   83.78 |    60.86 |     100 |   83.78 | ...23-125,133-136 
  extension.ts     |   77.34 |    86.63 |   77.14 |   77.34 | ...1117,1120-1121 
  ...iveContext.ts |   93.61 |    91.42 |     100 |   93.61 | 79,81,87-92,231   
  ...iateConfig.ts |   94.93 |    96.66 |     100 |   94.93 | 76,84-86          
  keyBindings.ts   |     100 |      100 |     100 |     100 |                   
  ...rverConfig.ts |   85.85 |    94.44 |     100 |   85.85 | 23-36             
  paths.ts         |     100 |      100 |     100 |     100 |                   
  policy.ts        |   80.76 |      100 |      50 |   80.76 | 45-49             
  ...figRuntime.ts |   88.68 |       84 |     100 |   88.68 | ...21-428,439-442 
  ...eBootstrap.ts |   89.31 |    84.55 |      90 |   89.31 | ...72-774,783-784 
  ...Resolution.ts |   69.86 |     62.5 |   83.33 |   69.86 | ...29-230,266-285 
  ...pplication.ts |   91.17 |    76.19 |     100 |   91.17 | ...31,155,182,187 
  ...elResolver.ts |   92.59 |    83.33 |     100 |   92.59 | 40,42-43,79       
  sandboxConfig.ts |    66.9 |    48.35 |   89.47 |    66.9 | ...93-500,518-519 
  ...oxProfiles.ts |    8.53 |      100 |       0 |    8.53 | 47-48,51-129      
  settingPaths.ts  |     100 |      100 |     100 |     100 |                   
  ...validation.ts |   84.67 |    82.35 |     100 |   84.67 | ...59,262-266,269 
  settings.ts      |    79.6 |     71.3 |   74.19 |    79.6 | ...1154,1189-1190 
  ...ingsSchema.ts |    99.9 |     90.9 |     100 |    99.9 | 59-60             
  ...Governance.ts |   95.83 |    90.62 |     100 |   95.83 | 52,124-127        
  ...tedFolders.ts |    95.2 |    95.91 |     100 |    95.2 | 93,119-125        
  welcomeConfig.ts |   22.41 |      100 |       0 |   22.41 | ...71,74-79,82-83 
  yargsOptions.ts  |   98.65 |    94.44 |   85.71 |   98.65 | 116,125-128       
 ...fig/extensions |   73.34 |    83.77 |   90.78 |   73.34 |                   
  consent.ts       |    82.6 |    86.95 |   91.66 |    82.6 | ...70-371,374-375 
  ...Enablement.ts |   93.87 |    96.05 |     100 |   93.87 | ...98-204,265-267 
  ...onSettings.ts |     100 |      100 |     100 |     100 |                   
  github.ts        |   64.45 |       79 |     100 |   64.45 | ...59-562,567-568 
  hookSchema.ts    |     100 |      100 |     100 |     100 |                   
  ...ntegration.ts |   55.31 |    84.44 |      50 |   55.31 | ...61,402,426-427 
  ...ingsPrompt.ts |   72.72 |    94.44 |      80 |   72.72 | 92-121            
  ...ngsStorage.ts |   84.61 |    75.92 |     100 |   84.61 | ...86-287,305-308 
  update.ts        |   62.57 |    46.66 |   66.66 |   62.57 | ...23-151,168-176 
  ...ableSchema.ts |     100 |      100 |     100 |     100 |                   
  variables.ts     |   95.45 |       90 |     100 |   95.45 | 32-33             
 src/constants     |     100 |      100 |     100 |     100 |                   
  historyLimits.ts |     100 |      100 |     100 |     100 |                   
 src/extensions    |   65.75 |    57.89 |      75 |   65.75 |                   
  ...utoUpdater.ts |   65.75 |    57.89 |      75 |   65.75 | ...50-451,460,462 
 src/generated     |     100 |      100 |     100 |     100 |                   
  git-commit.ts    |     100 |      100 |     100 |     100 |                   
 ...egration-tests |   91.46 |    85.18 |     100 |   91.46 |                   
  test-utils.ts    |   91.46 |    85.18 |     100 |   91.46 | ...17,235-236,246 
 src/patches       |       0 |        0 |       0 |       0 |                   
  is-in-ci.ts      |       0 |        0 |       0 |       0 | 1-17              
 src/providers     |   83.41 |    73.57 |   77.35 |   83.41 |                   
  IFileSystem.ts   |   65.51 |      100 |   57.14 |   65.51 | 45-46,49-54,67-68 
  ...Precedence.ts |   94.59 |    86.66 |     100 |   94.59 | 40-41             
  index.ts         |       0 |        0 |       0 |       0 | 1-19              
  ...gistration.ts |   77.94 |    68.75 |   33.33 |   77.94 | ...97-101,107-108 
  ...derAliases.ts |   82.97 |    82.97 |     100 |   82.97 | ...37-243,248-249 
  ...onfigUtils.ts |   92.45 |       75 |     100 |   92.45 | 26-30             
  ...erInstance.ts |   84.13 |    69.86 |   83.33 |   84.13 | ...89-793,911-912 
  types.ts         |       0 |        0 |       0 |       0 | 1-8               
 ...viders/logging |   87.59 |    88.63 |   63.63 |   87.59 |                   
  ...rvice-impl.ts |   44.44 |        0 |       0 |   44.44 | 21-22,25-30,36-37 
  git-stats.ts     |   94.59 |    90.69 |     100 |   94.59 | ...48-149,180-181 
 src/runtime       |   79.61 |    78.72 |   88.37 |   79.61 |                   
  ...imeAdapter.ts |   97.65 |    92.15 |     100 |   97.65 | ...18-219,308-309 
  ...etFailover.ts |   97.05 |    91.66 |     100 |   97.05 | 31-32,215         
  messages.ts      |   63.07 |    66.66 |      75 |   63.07 | 51,74-102         
  ...pplication.ts |   88.51 |    82.11 |      80 |   88.51 | ...63-666,762-763 
  ...leSnapshot.ts |   47.28 |    50.87 |   53.84 |   47.28 | ...16-518,521-545 
  ...rMutations.ts |   83.43 |    85.71 |   86.66 |   83.43 | ...20-424,438-439 
  ...iderSwitch.ts |   85.76 |    80.68 |     100 |   85.76 | ...84-601,638,743 
  ...eAccessors.ts |   70.05 |    60.97 |     100 |   70.05 | ...09-510,518-519 
  ...extFactory.ts |   91.26 |    70.96 |     100 |   91.26 | ...10-313,400-407 
  ...eLifecycle.ts |   84.31 |     87.5 |     100 |   84.31 | ...11-120,154-158 
  ...meRegistry.ts |   90.67 |    91.22 |     100 |   90.67 | ...55-159,165-166 
  ...meSettings.ts |     100 |      100 |     100 |     100 |                   
  ...gsResolver.ts |   74.52 |    75.86 |      75 |   74.52 | ...47-158,174-182 
  ...sHardening.ts |   58.42 |       85 |    87.5 |   58.42 | ...77,90-91,97-98 
 src/services      |   82.38 |    80.82 |   86.36 |   82.38 |                   
  ...mandLoader.ts |   79.48 |    71.42 |      80 |   79.48 | ...06-120,160-177 
  ...ardService.ts |    91.3 |    33.33 |     100 |    91.3 | 35-36             
  ...andService.ts |     100 |      100 |     100 |     100 |                   
  ...mandLoader.ts |   89.47 |    88.88 |     100 |   89.47 | ...83-188,262-269 
  ...omptLoader.ts |   71.05 |    76.74 |   83.33 |   71.05 | ...41,208,260-261 
  performResume.ts |   86.13 |    79.31 |     100 |   86.13 | ...85-188,194-195 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...mpt-processors |   97.57 |    94.11 |     100 |   97.57 |                   
  ...tProcessor.ts |     100 |      100 |     100 |     100 |                   
  ...lProcessor.ts |   97.38 |    93.61 |     100 |   97.38 | 77-78,203-204     
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...o-continuation |   85.18 |    82.14 |   94.11 |   85.18 |                   
  ...ionService.ts |   85.18 |    82.14 |   94.11 |   85.18 | ...90,549,575-576 
 src/settings      |   85.96 |     64.7 |     100 |   85.96 |                   
  ...alSettings.ts |   94.44 |       70 |     100 |   94.44 | 74-75             
  ...aramParser.ts |   71.42 |    57.14 |     100 |   71.42 | 21-22,24-25,30-31 
 src/test-utils    |    76.7 |     90.9 |   27.27 |    76.7 |                   
  async.ts         |       0 |        0 |       0 |       0 | 1-34              
  ...eExtension.ts |     100 |      100 |     100 |     100 |                   
  ...omMatchers.ts |   18.75 |      100 |       0 |   18.75 | 17-45             
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
  render.tsx       |   94.84 |    96.66 |      25 |   94.84 | ...51-156,259-260 
  ...e-testing.tsx |       0 |        0 |       0 |       0 | 1-56              
  ...iderConfig.ts |       0 |        0 |       0 |       0 | 1-19              
 src/ui            |   37.93 |    93.44 |   30.48 |   37.93 |                   
  App.tsx          |   37.25 |      100 |       0 |   37.25 | 64-91,97-104      
  AppContainer.tsx |     100 |      100 |     100 |     100 |                   
  ...erRuntime.tsx |   14.43 |      100 |   16.66 |   14.43 | 66-395            
  ...tionNudge.tsx |       8 |      100 |       0 |       8 | 25-100            
  colors.ts        |   37.14 |      100 |   20.33 |   37.14 | ...03-304,306-307 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  debug.ts         |     100 |      100 |     100 |     100 |                   
  ...derOptions.ts |     100 |      100 |     100 |     100 |                   
  keyMatchers.ts   |   88.63 |       84 |     100 |   88.63 | 18,20-21,28-29    
  ...ntsEnabled.ts |     100 |      100 |     100 |     100 |                   
  ...submission.ts |     100 |      100 |     100 |     100 |                   
  ...tic-colors.ts |   78.94 |      100 |      60 |   78.94 | 15-16,24-25       
  textConstants.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/commands   |   67.47 |    74.69 |   71.98 |   67.47 |                   
  aboutCommand.ts  |   73.13 |    26.08 |     100 |   73.13 | ...14-115,135-138 
  authCommand.ts   |   50.47 |    77.33 |   58.33 |   50.47 | ...42-645,656-694 
  ...urlCommand.ts |      30 |      100 |       0 |      30 | 20-40             
  bugCommand.ts    |    62.5 |    23.07 |     100 |    62.5 | ...,71-98,123-132 
  chatCommand.ts   |   69.95 |    80.64 |   63.63 |   69.95 | ...26-527,575-586 
  clearCommand.ts  |   86.88 |    86.66 |     100 |   86.88 | 71-78             
  ...essCommand.ts |   99.09 |    91.66 |     100 |   99.09 | 98                
  ...nueCommand.ts |     100 |      100 |     100 |     100 |                   
  copyCommand.ts   |   98.33 |    94.44 |     100 |   98.33 | 36                
  debugCommands.ts |   13.29 |      100 |       0 |   13.29 | ...48,455,462,469 
  ...icsCommand.ts |   66.83 |    45.83 |      75 |   66.83 | ...53-357,468-473 
  ...ryCommand.tsx |   88.82 |     87.5 |     100 |   88.82 | ...,47-55,179-187 
  docsCommand.ts   |     100 |      100 |     100 |     100 |                   
  ...extCommand.ts |   93.18 |    77.77 |     100 |   93.18 | 108-113           
  editorCommand.ts |     100 |      100 |     100 |     100 |                   
  ...onsCommand.ts |   39.27 |    87.17 |   63.63 |   39.27 | ...94-324,334-482 
  ...ionSection.ts |   83.33 |    93.33 |     100 |   83.33 | 28-34             
  helpCommand.ts   |     100 |      100 |     100 |     100 |                   
  hooksCommand.ts  |   89.62 |    87.27 |     100 |   89.62 | ...54,344-345,459 
  ideCommand.ts    |   66.97 |    68.96 |   55.55 |   66.97 | ...25-228,237-244 
  initCommand.ts   |   80.26 |    71.42 |   66.66 |   80.26 | 35-39,41-88       
  keyCommand.ts    |   89.84 |    79.74 |     100 |   89.84 | ...93,416-417,516 
  ...ileCommand.ts |   11.11 |      100 |       0 |   11.11 | 23-134            
  ...ingCommand.ts |   10.96 |      100 |       0 |   10.96 | ...60-529,546-557 
  logoutCommand.ts |   15.87 |      100 |       0 |   15.87 | 21-84             
  lspCommand.ts    |    90.9 |    87.17 |     100 |    90.9 | ...18-123,145-147 
  mcpCommand.ts    |   82.19 |    79.09 |   83.33 |   82.19 | ...93-494,512-513 
  memoryCommand.ts |   86.24 |    77.55 |     100 |   86.24 | ...73,235,261,268 
  modelCommand.ts  |   98.92 |    93.02 |     100 |   98.92 | 121               
  mouseCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...onsCommand.ts |    93.9 |    88.88 |     100 |    93.9 | 58-62             
  ...iesCommand.ts |   97.05 |    80.55 |     100 |   97.05 | 27,40-41          
  ...acyCommand.ts |   61.53 |      100 |       0 |   61.53 | 22-26             
  ...ileCommand.ts |   52.84 |    58.24 |   61.53 |   52.84 | ...1047,1068-1084 
  ...derCommand.ts |   53.94 |    28.94 |      80 |   53.94 | ...63-267,275-280 
  quitCommand.ts   |   36.66 |      100 |       0 |   36.66 | 17-36             
  ...oreCommand.ts |   92.59 |     87.5 |     100 |   92.59 | ...,90-91,120-125 
  setCommand.ts    |   75.48 |    74.28 |   72.72 |   75.48 | ...41-546,588-601 
  ...ngsCommand.ts |     100 |      100 |     100 |     100 |                   
  setupCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...hubCommand.ts |   91.38 |    82.85 |     100 |   91.38 | ...13-216,223-227 
  skillsCommand.ts |   82.37 |       76 |     100 |   82.37 | ...86-287,300-301 
  statsCommand.ts  |   70.67 |    65.71 |      75 |   70.67 | ...32-541,549-626 
  ...entCommand.ts |   76.72 |    70.66 |   81.81 |   76.72 | ...08-614,625-631 
  tasksCommand.ts  |   78.75 |    78.78 |     100 |   78.75 | ...78-186,247-254 
  ...tupCommand.ts |     100 |      100 |     100 |     100 |                   
  themeCommand.ts  |     100 |      100 |     100 |     100 |                   
  todoCommand.ts   |   65.52 |    69.53 |    92.3 |   65.52 | ...1256,1268-1275 
  ...matCommand.ts |   26.66 |      100 |       0 |   26.66 | 33-92             
  ...keyCommand.ts |   98.88 |     92.3 |     100 |   98.88 | 34                
  ...ileCommand.ts |    99.1 |    94.11 |     100 |    99.1 | 36                
  toolsCommand.ts  |   85.88 |    76.11 |     100 |   85.88 | ...87-296,309-310 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...ileCommand.ts |   27.77 |        0 |       0 |   27.77 | 11-23             
  vimCommand.ts    |   44.44 |      100 |       0 |   44.44 | 15-25             
 ...ommands/schema |   96.22 |    91.13 |    92.3 |   96.22 |                   
  index.ts         |   96.45 |    91.71 |     100 |   96.45 | ...08-412,423-424 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/ui/components |   10.14 |    30.76 |    2.08 |   10.14 |                   
  AboutBox.tsx     |    4.46 |      100 |       0 |    4.46 | 26-147            
  AnsiOutput.tsx   |    8.33 |      100 |       0 |    8.33 | 25-90             
  AppHeader.tsx    |   22.58 |      100 |       0 |   22.58 | 26-54             
  AsciiArt.ts      |     100 |      100 |     100 |     100 |                   
  AuthDialog.tsx   |    6.29 |      100 |       0 |    6.29 | 23-190            
  ...nProgress.tsx |       0 |        0 |       0 |       0 | 1-63              
  ...Indicator.tsx |   15.15 |      100 |       0 |   15.15 | 17-47             
  ...firmation.tsx |    7.43 |      100 |       0 |    7.43 | 49-178            
  ...tsDisplay.tsx |    7.69 |      100 |       0 |    7.69 | 23-34,38-156      
  CliSpinner.tsx   |       0 |        0 |       0 |       0 | 1-22              
  Composer.tsx     |    8.62 |      100 |       0 |    8.62 | 24-81             
  ...entPrompt.tsx |   18.75 |      100 |       0 |   18.75 | 21-51             
  ...ryDisplay.tsx |   21.05 |      100 |       0 |   21.05 | 17-35             
  ...ryDisplay.tsx |    5.71 |      100 |       0 |    5.71 | 30-141            
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-37              
  ...gProfiler.tsx |   16.86 |      100 |       0 |   16.86 | ...73-118,122-224 
  ...esDisplay.tsx |   10.52 |      100 |       0 |   10.52 | 24-82             
  ...ogManager.tsx |    8.62 |      100 |       0 |    8.62 | 71-591            
  ...ngsDialog.tsx |    6.53 |      100 |       0 |    6.53 | 30-192            
  ...rBoundary.tsx |   10.16 |        0 |       0 |   10.16 | ...19-164,182-194 
  ...ustDialog.tsx |   16.66 |      100 |       0 |   16.66 | 31-123            
  Footer.tsx       |    9.25 |        0 |     100 |    9.25 | ...35-518,522-539 
  ...ngSpinner.tsx |    40.9 |      100 |       0 |    40.9 | 31-47             
  Header.tsx       |    17.5 |      100 |       0 |    17.5 | 22-62             
  Help.tsx         |    3.96 |      100 |       0 |    3.96 | 18-179            
  ...emDisplay.tsx |   18.54 |      100 |       0 |   18.54 | 54-203            
  ...usDisplay.tsx |       0 |        0 |       0 |       0 | 1-47              
  InputPrompt.tsx  |   42.65 |    33.33 |   66.66 |   42.65 | ...1181,1188-1199 
  ...tsDisplay.tsx |    4.41 |      100 |       0 |    4.41 | 26-37,41-249      
  ...utManager.tsx |       0 |        0 |       0 |       0 | 1-99              
  ...ileDialog.tsx |    6.89 |      100 |       0 |    6.89 | 21-120            
  ...Indicator.tsx |   14.28 |      100 |       0 |   14.28 | 25-89             
  ...ingDialog.tsx |    4.54 |      100 |       0 |    4.54 | ...9,84-90,93-354 
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-41              
  ModelDialog.tsx  |    1.79 |      100 |       0 |    1.79 | 48-71,74-624      
  ...tsDisplay.tsx |    4.84 |      100 |       0 |    4.84 | 28-220            
  ...fications.tsx |   15.65 |      100 |       0 |   15.65 | 36-151            
  ...odeDialog.tsx |     7.4 |      100 |       0 |     7.4 | 32-141            
  ...ustDialog.tsx |    6.21 |      100 |       0 |    6.21 | 30-237            
  PrepareLabel.tsx |   13.33 |      100 |       0 |   13.33 | 20-48             
  ...ailDialog.tsx |   11.58 |      100 |       0 |   11.58 | 58-69,72-344      
  ...ineEditor.tsx |    2.59 |      100 |       0 |    2.59 | 26-66,70-358      
  ...istDialog.tsx |    2.99 |      100 |       0 |    2.99 | 35-369            
  ...derDialog.tsx |    3.84 |      100 |       0 |    3.84 | 22-272            
  ...Indicator.tsx |       0 |        0 |       0 |       0 | 1-21              
  ...eKeyInput.tsx |       0 |        0 |       0 |       0 | 1-139             
  ...serDialog.tsx |    1.96 |      100 |       0 |    1.96 | 41-49,56-588      
  ...ryDisplay.tsx |      50 |      100 |       0 |      50 | 15-17             
  ...ngsDialog.tsx |    1.69 |      100 |       0 |    1.69 | ...2-161,164-1623 
  ...putPrompt.tsx |   16.21 |      100 |       0 |   16.21 | 19-53             
  ...Indicator.tsx |   44.44 |      100 |       0 |   44.44 | 12-17             
  ...MoreLines.tsx |      28 |      100 |       0 |      28 | 18-40             
  StatsDisplay.tsx |    4.82 |      100 |       0 |    4.82 | ...03-241,250-413 
  ...usDisplay.tsx |       0 |        0 |       0 |       0 | 1-59              
  StickyHeader.tsx |    7.14 |      100 |       0 |    7.14 | 20-78             
  ...nsDisplay.tsx |    7.76 |      100 |       0 |    7.76 | 49-164            
  Table.tsx        |    7.54 |      100 |       0 |    7.54 | 27-87             
  ThemeDialog.tsx  |    5.22 |      100 |       0 |    5.22 | 47-422            
  ...dGradient.tsx |      25 |      100 |       0 |      25 | 27-46             
  Tips.tsx         |      16 |      100 |       0 |      16 | 17-45             
  TodoPanel.tsx    |    5.55 |      100 |       0 |    5.55 | 27-75,78-246      
  ...tsDisplay.tsx |    7.42 |      100 |       0 |    7.42 | 30-53,56-228      
  ToolsDialog.tsx  |    7.95 |      100 |       0 |    7.95 | 24-119            
  ...ification.tsx |   36.36 |      100 |       0 |   36.36 | 15-22             
  ...ionDialog.tsx |    7.52 |      100 |       0 |    7.52 | 18-123            
  todo-utils.ts    |       0 |        0 |       0 |       0 | 1-7               
 ...leCreateWizard |   19.22 |       50 |       0 |   19.22 |                   
  ...aramsStep.tsx |    5.82 |      100 |       0 |    5.82 | 28-245            
  ...ationStep.tsx |    4.82 |      100 |       0 |    4.82 | 28-295            
  ...onfigStep.tsx |   11.23 |      100 |       0 |   11.23 | 26-120            
  ...electStep.tsx |    6.11 |      100 |       0 |    6.11 | 29-237            
  ...ationMenu.tsx |       0 |        0 |       0 |       0 | 1-102             
  ...eSaveStep.tsx |    6.28 |      100 |       0 |    6.28 | 34-258            
  ...ssSummary.tsx |   12.12 |      100 |       0 |   12.12 | 23-88             
  ...electStep.tsx |   16.92 |      100 |       0 |   16.92 | 28-95             
  TextInput.tsx    |     5.5 |      100 |       0 |     5.5 | 29-172            
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.tsx        |    6.27 |      100 |       0 |    6.27 | 29-297            
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |    5.22 |      100 |       0 |    5.22 | ...46-350,355-372 
  validation.ts    |   11.23 |      100 |       0 |   11.23 | ...97-104,107-111 
 ...gentManagement |    6.24 |      100 |       0 |    6.24 |                   
  ...entWizard.tsx |    4.11 |      100 |       0 |    4.11 | 33-237            
  ...ionWizard.tsx |    2.26 |      100 |       0 |    2.26 | 31-443            
  ...eteDialog.tsx |    6.59 |      100 |       0 |    6.59 | 22-128            
  ...tEditForm.tsx |    3.37 |      100 |       0 |    3.37 | 32-350            
  ...tListMenu.tsx |    3.97 |      100 |       0 |    3.97 | 26-237            
  ...tMainMenu.tsx |   16.66 |      100 |       0 |   16.66 | 22-62             
  ...gerDialog.tsx |    3.66 |      100 |       0 |    3.66 | 27-473            
  ...tShowView.tsx |    4.96 |      100 |       0 |    4.96 | 28-212            
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...comeOnboarding |   13.04 |        0 |       0 |   13.04 |                   
  ...ethodStep.tsx |   22.47 |      100 |       0 |   22.47 | 44-129            
  ...ationStep.tsx |    5.42 |      100 |       0 |    5.42 | 28-183            
  ...etionStep.tsx |    5.08 |      100 |       0 |    5.08 | 23-166            
  ...electStep.tsx |    7.95 |      100 |       0 |    7.95 | 31-132            
  ...electStep.tsx |   34.48 |      100 |       0 |   34.48 | 51-120            
  SkipExitStep.tsx |    12.5 |      100 |       0 |    12.5 | 18-59             
  ...omeDialog.tsx |   12.38 |      100 |       0 |   12.38 | 38-147            
  WelcomeStep.tsx  |    10.2 |      100 |       0 |    10.2 | 23-74             
  index.ts         |       0 |        0 |       0 |       0 | 1-13              
 ...nents/messages |   20.14 |    88.09 |   13.33 |   20.14 |                   
  ...onMessage.tsx |   12.28 |      100 |       0 |   12.28 | 24-86             
  DiffRenderer.tsx |    3.33 |      100 |       0 |    3.33 | ...80-361,364-382 
  ErrorMessage.tsx |   22.22 |      100 |       0 |   22.22 | 16-31             
  ...niMessage.tsx |   14.51 |      100 |       0 |   14.51 | 28-95             
  ...geContent.tsx |   20.83 |      100 |       0 |   20.83 | 26-46             
  InfoMessage.tsx  |   19.23 |      100 |       0 |   19.23 | 19-41             
  ...rlMessage.tsx |   11.36 |      100 |       0 |   11.36 | 18-65             
  ...geMessage.tsx |     100 |      100 |     100 |     100 |                   
  ...ckDisplay.tsx |      20 |      100 |       0 |      20 | 43-64             
  ...onMessage.tsx |    4.01 |      100 |       0 |    4.01 | 46-464            
  ...upMessage.tsx |   10.55 |      100 |       0 |   10.55 | ...7,70-85,89-262 
  ToolMessage.tsx  |    8.38 |      100 |       0 |    8.38 | 48-221            
  ...ltDisplay.tsx |    87.5 |    84.61 |     100 |    87.5 | 58-60,116-132     
  ToolShared.tsx   |   64.61 |       90 |   33.33 |   64.61 | 78-99,102-105     
  UserMessage.tsx  |     100 |      100 |     100 |     100 |                   
  ...llMessage.tsx |   36.36 |      100 |       0 |   36.36 | 17-25             
  ...ngMessage.tsx |   26.31 |      100 |       0 |   26.31 | 17-32             
 ...ponents/shared |   41.59 |    60.76 |    43.1 |   41.59 |                   
  ...ctionList.tsx |    5.55 |      100 |       0 |    5.55 | 53-184            
  MaxSizedBox.tsx  |   48.69 |    56.16 |   88.88 |   48.69 | ...68-572,615-616 
  ...tonSelect.tsx |   12.76 |      100 |       0 |   12.76 | 66-113            
  ...lableList.tsx |    6.21 |      100 |       0 |    6.21 | 44-221            
  ...lizedList.tsx |    2.29 |      100 |       0 |    2.29 | 56-486            
  ...operations.ts |   75.67 |    48.14 |     100 |   75.67 | ...31-232,255-264 
  ...er-reducer.ts |   28.25 |    51.11 |   33.33 |   28.25 | ...30,632,644,687 
  buffer-types.ts  |     100 |      100 |     100 |     100 |                   
  text-buffer.ts   |   57.36 |    69.56 |    7.89 |   57.36 | ...15,561,566-570 
  ...formations.ts |   42.42 |    71.42 |      80 |   42.42 | ...27-134,158-204 
  ...n-handlers.ts |   33.99 |    61.53 |   23.25 |   33.99 | ...47-755,758-762 
  ...er-actions.ts |   93.84 |     87.5 |     100 |   93.84 | 91-93,100         
  visual-layout.ts |    90.2 |    71.73 |     100 |    90.2 | ...48-350,372-373 
  ...navigation.ts |   56.46 |    60.93 |   77.77 |   56.46 | ...20-332,358-380 
 ...mponents/views |    7.36 |      100 |       0 |    7.36 |                   
  ChatList.tsx     |    14.7 |      100 |       0 |    14.7 | 18-51             
  ...sionsList.tsx |    7.59 |      100 |       0 |    7.59 | 19-102            
  HooksList.tsx    |    5.06 |      100 |       0 |    5.06 | 17-106            
  SkillsList.tsx   |    6.06 |      100 |       0 |    6.06 | 18-99             
 src/ui/constants  |   56.16 |     92.3 |      50 |   56.16 |                   
  ...ollections.ts |     100 |      100 |     100 |     100 |                   
  tips.ts          |       0 |        0 |       0 |       0 | 1-164             
 src/ui/containers |       0 |        0 |       0 |       0 |                   
  ...ontroller.tsx |       0 |        0 |       0 |       0 | 1-355             
  UIStateShell.tsx |       0 |        0 |       0 |       0 | 1-15              
 ...ainer/builders |   98.37 |      100 |   83.33 |   98.37 |                   
  ...dUIActions.ts |     100 |      100 |     100 |     100 |                   
  buildUIState.ts  |     100 |      100 |     100 |     100 |                   
  ...onsBuilder.ts |   66.66 |      100 |       0 |   66.66 | 21-22             
  ...ateBuilder.ts |   66.66 |      100 |       0 |   66.66 | 21-22             
 ...ontainer/hooks |   51.42 |    82.35 |   51.28 |   51.42 |                   
  ...pBootstrap.ts |   94.71 |    58.33 |     100 |   94.71 | ...20-223,227-229 
  useAppDialogs.ts |   40.97 |      100 |   42.85 |   40.97 | ...55-157,174-376 
  ...ntHandlers.ts |     100 |      100 |     100 |     100 |                   
  useAppInput.ts   |     5.6 |      100 |       0 |     5.6 | 100-517,520-524   
  useAppLayout.ts  |    8.14 |      100 |       0 |    8.14 | 89-290,293-296    
  ...reenAction.ts |   13.63 |      100 |       0 |   13.63 | 23-42             
  ...nSelection.ts |      20 |      100 |       0 |      20 | 27-48             
  ...hestration.ts |     100 |      100 |     100 |     100 |                   
  ...references.ts |      10 |      100 |       0 |      10 | 51-104            
  ...itHandling.ts |   89.79 |      100 |     100 |   89.79 | 131-139,143       
  ...textBridge.ts |   33.33 |      100 |       0 |   33.33 | 23-30             
  ...tartHotkey.ts |   26.66 |      100 |       0 |   26.66 | 23-33             
  ...omptSubmit.ts |    6.12 |      100 |       0 |    6.12 | 26-74             
  ...utHandling.ts |   90.32 |    86.66 |     100 |   90.32 | 59,106-113        
  ...yBootstrap.ts |      30 |      100 |       0 |      30 | 28-34             
  ...eybindings.ts |   85.36 |    70.83 |     100 |   85.36 | ...05-207,241-242 
  ...easurement.ts |   15.38 |      100 |       0 |   15.38 | 45-95             
  ...reshAction.ts |   79.16 |     37.5 |     100 |   79.16 | 51,81-84,86-95    
  ...untimeSync.ts |     100 |      100 |     100 |     100 |                   
  ...elTracking.ts |   28.57 |      100 |     100 |   28.57 | 37-83             
  ...laceholder.ts |      15 |      100 |       0 |      15 | 13-18,21-34       
  ...rorTimeout.ts |   17.64 |      100 |       0 |   17.64 | 24-39             
  ...astructure.ts |   73.91 |      100 |      20 |   73.91 | 53,57,61,75-83    
  ...ebugLogger.ts |   17.24 |      100 |       0 |   17.24 | 23-51             
  ...ialization.ts |   70.93 |    84.61 |     100 |   70.93 | 68-92,124-125     
  ...sAutoReset.ts |   21.87 |      100 |       0 |   21.87 | 28-54             
  ...andActions.ts |     100 |      100 |     100 |     100 |                   
  ...eshManager.ts |     100 |      100 |     100 |     100 |                   
  ...uationFlow.ts |    7.93 |      100 |       0 |    7.93 | 54-150            
  ...csTracking.ts |   98.15 |    81.48 |     100 |   98.15 | 88,107-108        
  ...uthBridges.ts |   36.84 |      100 |     100 |   36.84 | 47-70,74-78       
 src/ui/contexts   |   54.21 |    76.75 |   46.55 |   54.21 |                   
  ...chContext.tsx |    64.7 |      100 |      50 |    64.7 | 25-30             
  FocusContext.tsx |       0 |        0 |       0 |       0 | 1-11              
  ...ssContext.tsx |   81.62 |    84.05 |     100 |   81.62 | ...78-679,734-735 
  MouseContext.tsx |   74.72 |       75 |      80 |   74.72 | ...00-101,112-125 
  ...erContext.tsx |       0 |        0 |       0 |       0 | 1-121             
  ...owContext.tsx |   21.42 |      100 |   33.33 |   21.42 | 34,40-88          
  ...meContext.tsx |   53.12 |    36.36 |   57.14 |   53.12 | ...87,195-196,201 
  ...lProvider.tsx |   90.61 |     70.9 |     100 |   90.61 | ...74-375,387-388 
  ...onContext.tsx |     6.7 |      100 |       0 |     6.7 | ...91-285,290-297 
  ...teContext.tsx |       0 |        0 |       0 |       0 | 1-57              
  ...gsContext.tsx |      50 |      100 |       0 |      50 | 15-20             
  ...ngContext.tsx |   42.85 |      100 |       0 |   42.85 | 15-22             
  TodoContext.tsx  |   54.54 |      100 |       0 |   54.54 | 28-31,33-36,39-40 
  TodoProvider.tsx |    5.55 |      100 |       0 |    5.55 | 25-127            
  ...llContext.tsx |     100 |      100 |       0 |     100 |                   
  ...lProvider.tsx |    6.75 |      100 |       0 |    6.75 | 24-118            
  ...nsContext.tsx |      25 |      100 |       0 |      25 | 203-214,217-222   
  ...teContext.tsx |      50 |       50 |      50 |      50 | 250-259,264-265   
  ...deContext.tsx |   11.11 |      100 |       0 |   11.11 | 30-82,85-90       
 src/ui/editors    |   98.18 |     87.5 |     100 |   98.18 |                   
  ...ngsManager.ts |   98.18 |     87.5 |     100 |   98.18 | 59                
 src/ui/hooks      |    62.6 |    83.87 |   73.68 |    62.6 |                   
  ...dProcessor.ts |   71.03 |     75.6 |      75 |   71.03 | ...71-693,715-721 
  index.ts         |       0 |        0 |       0 |       0 | 1-9               
  keyToAnsi.ts     |    3.92 |      100 |       0 |    3.92 | 19-77             
  ...dProcessor.ts |   94.81 |       75 |     100 |   94.81 | ...05-306,311-312 
  ...dProcessor.ts |   25.91 |       55 |      50 |   25.91 | ...28-429,434-975 
  toolMapping.ts   |    91.3 |    92.85 |     100 |    91.3 | 130,157-167       
  ...nateBuffer.ts |      50 |      100 |       0 |      50 | 16-18             
  ...dScrollbar.ts |   96.77 |      100 |     100 |   96.77 | 112-114           
  ...Completion.ts |   94.75 |       89 |     100 |   94.75 | ...13,336,383-384 
  ...uthCommand.ts |      16 |      100 |       0 |      16 | 13-36             
  ...tIndicator.ts |     100 |     92.3 |     100 |     100 | 57                
  useBanner.ts     |     100 |    81.81 |     100 |     100 | 22,45             
  ...chedScroll.ts |   16.66 |      100 |       0 |   16.66 | 14-32             
  ...ketedPaste.ts |      20 |      100 |       0 |      20 | 20-38             
  ...ompletion.tsx |   93.11 |    81.81 |      50 |   93.11 | ...32-233,237-244 
  useCompletion.ts |    92.4 |     87.5 |     100 |    92.4 | 68-69,93-94,98-99 
  ...leMessages.ts |   96.25 |    90.47 |     100 |   96.25 | 56-57,63          
  ...ntHandlers.ts |    32.6 |      100 |     100 |    32.6 | 43-68,72-80       
  ...fileDialog.ts |   16.12 |      100 |       0 |   16.12 | 17-47             
  ...orSettings.ts |   11.86 |      100 |       0 |   11.86 | 31-87             
  ...AutoUpdate.ts |    9.52 |      100 |       0 |    9.52 | 18-58             
  ...ionUpdates.ts |   66.66 |    76.92 |   66.66 |   66.66 | ...75-181,196-213 
  ...erDetector.ts |     100 |      100 |     100 |     100 |                   
  useFocus.ts      |     100 |      100 |     100 |     100 |                   
  ...olderTrust.ts |   86.27 |    94.11 |     100 |   86.27 | 95-108            
  ...BranchName.ts |     100 |    89.47 |     100 |     100 | 58,61             
  ...oryManager.ts |   96.37 |     92.1 |     100 |   96.37 | ...75-176,219-220 
  ...splayState.ts |     100 |      100 |     100 |     100 |                   
  ...stListener.ts |   12.12 |      100 |       0 |   12.12 | 17-50             
  ...ivityTimer.ts |   76.19 |    66.66 |     100 |   76.19 | 30-35             
  ...putHistory.ts |    92.5 |    85.71 |     100 |    92.5 | 62-63,71,93-95    
  ...storyStore.ts |     100 |    94.11 |     100 |     100 | 67                
  useKeypress.ts   |   22.22 |      100 |       0 |   22.22 | 21-36             
  ...rdProtocol.ts |       0 |        0 |       0 |       0 | 1-26              
  ...fileDialog.ts |    5.71 |      100 |       0 |    5.71 | 27-135            
  ...gIndicator.ts |     100 |      100 |     100 |     100 |                   
  useLogger.ts     |   93.75 |      100 |     100 |   93.75 | 27                
  useMcpStatus.ts  |   90.47 |    66.66 |     100 |   90.47 | 19,33-35          
  ...oryMonitor.ts |     100 |      100 |     100 |     100 |                   
  ...ssageQueue.ts |     100 |      100 |     100 |     100 |                   
  useMouse.ts      |   77.77 |    66.66 |     100 |   77.77 | 31-34             
  useMouseClick.ts |     100 |      100 |     100 |     100 |                   
  ...eSelection.ts |    3.04 |      100 |       0 |    3.04 | 36-103,106-322    
  ...hestration.ts |      10 |      100 |       0 |      10 | 28-63             
  ...oviderInfo.ts |       0 |        0 |       0 |       0 | 1-80              
  ...odifyTrust.ts |    9.09 |      100 |       0 |    9.09 | 43-134            
  ...raseCycler.ts |   79.16 |    71.42 |     100 |   79.16 | ...69,72-73,89-91 
  ...cySettings.ts |   85.84 |    81.81 |     100 |   85.84 | ...,88-92,120-131 
  ...Management.ts |     2.4 |      100 |       0 |     2.4 | 21-62,74-438      
  ...Completion.ts |   29.56 |       40 |     100 |   29.56 | ...13-226,235-241 
  ...iderDialog.ts |    6.81 |      100 |       0 |    6.81 | 31-126            
  ...lScheduler.ts |   67.25 |    76.47 |      60 |   67.25 | ...60,467-489,494 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  useResponsive.ts |     100 |      100 |     100 |     100 |                   
  ...ompletion.tsx |   69.56 |      100 |     100 |   69.56 | 45-47,51-66,78-81 
  useRewind.ts     |     100 |      100 |     100 |     100 |                   
  ...ectionList.ts |   87.29 |    88.04 |     100 |   87.29 | ...10-411,420-423 
  useSession.ts    |       0 |        0 |       0 |       0 | 1-23              
  ...ionBrowser.ts |   89.59 |    84.61 |    91.3 |   89.59 | ...68-669,726-727 
  ...ngsCommand.ts |   18.75 |      100 |       0 |   18.75 | 10-25             
  ...ellHistory.ts |   91.66 |    79.41 |     100 |   91.66 | ...69,117-118,128 
  ...Completion.ts |   96.29 |    79.31 |     100 |   96.29 | 88-90,117-118     
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-63              
  ...ompletion.tsx |   82.12 |    85.02 |      75 |   82.12 | ...00-901,912-913 
  ...leCallback.ts |     100 |      100 |     100 |     100 |                   
  ...tateAndRef.ts |   59.09 |      100 |     100 |   59.09 | 23-31             
  ...oryRefresh.ts |     100 |      100 |     100 |     100 |                   
  ...rminalSize.ts |   11.42 |      100 |       0 |   11.42 | 13-55             
  ...emeCommand.ts |    6.03 |      100 |       0 |    6.03 | 26-151            
  useTimer.ts      |    87.5 |    85.71 |     100 |    87.5 | 44-45,50-52       
  ...ntinuation.ts |   90.96 |    91.89 |     100 |   90.96 | ...50-151,176-185 
  ...ePreserver.ts |   57.14 |      100 |      80 |   57.14 | 58-76             
  ...oolsDialog.ts |    4.67 |      100 |       0 |    4.67 | 24-145            
  ...Onboarding.ts |    2.47 |      100 |       0 |    2.47 | 78-407            
  ...eMigration.ts |   11.86 |      100 |       0 |   11.86 | 15-73             
  vim.ts           |    83.6 |     79.5 |     100 |    83.6 | ...39,743-751,760 
 ...s/geminiStream |   76.67 |    75.65 |   90.62 |   76.67 |                   
  ...ersistence.ts |   98.26 |    95.23 |     100 |   98.26 | 157-159           
  index.ts         |     100 |      100 |     100 |     100 |                   
  streamUtils.ts   |   98.98 |    95.34 |     100 |   98.98 | 361-363           
  ...ionHandler.ts |   71.36 |    88.88 |     100 |   71.36 | ...91-298,332-338 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...miniStream.ts |   77.32 |    65.16 |      40 |   77.32 | ...75,582,619-621 
  ...ntHandlers.ts |   62.58 |    52.74 |     100 |   62.58 | ...23-824,827-831 
 src/ui/layouts    |   60.33 |    29.41 |   33.33 |   60.33 |                   
  ...AppLayout.tsx |   60.33 |    29.41 |   33.33 |   60.33 | ...95-689,693-718 
 ...noninteractive |      75 |      100 |    6.66 |      75 |                   
  ...eractiveUi.ts |      75 |      100 |    6.66 |      75 | 17-19,23-24,27-28 
 src/ui/privacy    |   21.98 |        0 |       0 |   21.98 |                   
  ...acyNotice.tsx |       0 |        0 |       0 |       0 | 1-123             
  ...acyNotice.tsx |       0 |        0 |       0 |       0 | 1-59              
  ...acyNotice.tsx |   12.19 |      100 |       0 |   12.19 | 16-62             
  ...acyNotice.tsx |   41.33 |      100 |       0 |   41.33 | 78-91,99-193      
  ...acyNotice.tsx |      25 |      100 |       0 |      25 | 21-43,46-48       
 src/ui/reducers   |   78.44 |     90.9 |      50 |   78.44 |                   
  appReducer.ts    |     100 |      100 |     100 |     100 |                   
  ...ionReducer.ts |       0 |        0 |       0 |       0 | 1-52              
 src/ui/state      |   54.34 |    30.76 |     100 |   54.34 |                   
  extensions.ts    |   54.34 |    30.76 |     100 |   54.34 | ...28,130-142,144 
 src/ui/themes     |   99.04 |    84.41 |   96.96 |   99.04 |                   
  ansi-light.ts    |     100 |      100 |     100 |     100 |                   
  ansi.ts          |     100 |      100 |     100 |     100 |                   
  atom-one-dark.ts |     100 |      100 |     100 |     100 |                   
  ayu-light.ts     |     100 |      100 |     100 |     100 |                   
  ayu.ts           |     100 |      100 |     100 |     100 |                   
  color-utils.ts   |     100 |      100 |     100 |     100 |                   
  default-light.ts |     100 |      100 |     100 |     100 |                   
  default.ts       |     100 |      100 |     100 |     100 |                   
  dracula.ts       |     100 |      100 |     100 |     100 |                   
  github-dark.ts   |     100 |      100 |     100 |     100 |                   
  github-light.ts  |     100 |      100 |     100 |     100 |                   
  googlecode.ts    |     100 |      100 |     100 |     100 |                   
  green-screen.ts  |     100 |      100 |     100 |     100 |                   
  no-color.ts      |     100 |      100 |     100 |     100 |                   
  ...c-resolver.ts |     100 |      100 |     100 |     100 |                   
  ...tic-tokens.ts |     100 |      100 |     100 |     100 |                   
  ...-of-purple.ts |     100 |      100 |     100 |     100 |                   
  theme-compat.ts  |     100 |       50 |     100 |     100 | 79                
  theme-manager.ts |   88.79 |    82.81 |     100 |   88.79 | ...08-317,322-323 
  theme.ts         |    99.1 |    79.13 |    87.5 |    99.1 | 282-283,699-700   
  xcode.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/types      |       0 |        0 |       0 |       0 |                   
  ...ngMetadata.ts |       0 |        0 |       0 |       0 |                   
 src/ui/utils      |   57.87 |    86.96 |   73.59 |   57.87 |                   
  ...Colorizer.tsx |    6.36 |      100 |       0 |    6.36 | ...17-129,141-233 
  ...olePatcher.ts |   72.09 |      100 |   83.33 |   72.09 | 51-62             
  ...nRenderer.tsx |   16.23 |      100 |      50 |   16.23 | 27-171            
  ...wnDisplay.tsx |    5.66 |      100 |       0 |    5.66 | ...98-423,434-438 
  ...eRenderer.tsx |   10.63 |      100 |       0 |   10.63 | ...32-247,260-395 
  ...tGenerator.ts |   72.72 |    61.53 |      60 |   72.72 | ...64,67-70,82-83 
  ...ketedPaste.ts |      60 |      100 |       0 |      60 | 13-14,17-18       
  clipboard.ts     |   97.29 |    84.61 |     100 |   97.29 | 40                
  ...boardUtils.ts |    64.7 |     77.5 |     100 |    64.7 | ...31-242,312-313 
  commandUtils.ts  |   92.75 |    95.23 |   95.45 |   92.75 | ...08-212,298-306 
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  displayUtils.ts  |     100 |      100 |     100 |     100 |                   
  formatters.ts    |   90.47 |    95.23 |     100 |   90.47 | 57-60             
  fuzzyFilter.ts   |     100 |    96.55 |     100 |     100 | 74                
  highlight.ts     |   73.22 |    94.44 |      50 |   73.22 | 133-165,169-174   
  ...xportUtils.ts |     100 |      100 |     100 |     100 |                   
  ...storyItems.ts |   98.95 |    94.11 |     100 |   98.95 | 88                
  input.ts         |   64.51 |    85.71 |   33.33 |   64.51 | 18-25,51-58       
  isNarrowWidth.ts |      50 |      100 |       0 |      50 | 13-14             
  ...nUtilities.ts |   69.84 |     87.5 |     100 |   69.84 | 75-91,100-101     
  mouse.ts         |   83.51 |    71.92 |     100 |   83.51 | ...01,208,221-222 
  ...mConstants.ts |     100 |      100 |     100 |     100 |                   
  ...opDetector.ts |       0 |        0 |       0 |       0 | 1-210             
  responsive.ts    |    69.9 |    73.33 |      80 |    69.9 | ...95-103,106-121 
  rewindFileOps.ts |   88.02 |     64.7 |     100 |   88.02 | ...40-244,246-251 
  ...putHandler.ts |   83.21 |    86.79 |     100 |   83.21 | ...24-133,225-226 
  ...ityManager.ts |   94.11 |     83.6 |   88.88 |   94.11 | ...96,320,348,359 
  ...alContract.ts |     100 |      100 |     100 |     100 |                   
  terminalLinks.ts |     100 |      100 |     100 |     100 |                   
  ...colCleanup.ts |     100 |      100 |     100 |     100 |                   
  ...lSequences.ts |     100 |      100 |     100 |     100 |                   
  terminalSetup.ts |     4.2 |      100 |       0 |     4.2 | 42-359            
  textUtils.ts     |   95.41 |    92.59 |   88.88 |   95.41 | 20-25             
  ...Formatters.ts |       0 |        0 |       0 |       0 | 1-50              
  ...icsTracker.ts |     100 |    94.44 |     100 |     100 | 38                
  ui-sizing.ts     |      16 |      100 |       0 |      16 | 11-23,26-36       
  updateCheck.ts   |     100 |    94.11 |     100 |     100 | 34,45             
 src/utils         |   62.65 |    87.67 |   84.48 |   62.65 |                   
  ...ionContext.ts |   76.92 |       75 |     100 |   76.92 | 38-41,63-66,81-84 
  bootstrap.ts     |    97.4 |    95.65 |     100 |    97.4 | 76-77             
  checks.ts        |   33.33 |      100 |       0 |   33.33 | 23-28             
  cleanup.ts       |   67.21 |       80 |      60 |   67.21 | ...69-71,74,88-97 
  commands.ts      |    50.9 |    63.63 |     100 |    50.9 | 25-26,45,57-84    
  commentJson.ts   |    92.3 |     92.5 |     100 |    92.3 | 94-102            
  ...ScopeUtils.ts |   27.58 |      100 |       0 |   27.58 | 24-41,58-86       
  ...icSettings.ts |   88.61 |    89.18 |     100 |   88.61 | ...41,44-47,65-68 
  ...arResolver.ts |   96.42 |       96 |     100 |   96.42 | 111-112           
  errors.ts        |   94.36 |       88 |     100 |   94.36 | 50-51,86-87       
  events.ts        |     100 |      100 |     100 |     100 |                   
  ...lativeTime.ts |     100 |      100 |     100 |     100 |                   
  gitUtils.ts      |   93.68 |    84.21 |     100 |   93.68 | 63-64,79-82       
  ...AutoUpdate.ts |   67.18 |    76.59 |   71.42 |   67.18 | ...14-215,262-327 
  ...lationInfo.ts |   99.38 |    97.87 |     100 |   99.38 | 98                
  math.ts          |   66.66 |      100 |       0 |   66.66 | 15                
  ...stentState.ts |   95.38 |       85 |     100 |   95.38 | 43,64-65          
  readStdin.ts     |   81.03 |    91.66 |   83.33 |   81.03 | 32-39,51-53       
  relaunch.ts      |     100 |      100 |     100 |     100 |                   
  resolvePath.ts   |   66.66 |       25 |     100 |   66.66 | 12-13,16,18-19    
  sandbox.ts       |   32.66 |    85.27 |   70.58 |   32.66 | ...1018,1035-2225 
  ...ionCleanup.ts |   85.82 |    83.56 |     100 |   85.82 | ...54-255,336-337 
  sessionUtils.ts  |    7.89 |      100 |       0 |    7.89 | 51-120,127-141    
  settingsUtils.ts |   84.14 |    90.52 |   93.33 |   84.14 | ...16-443,482-483 
  ...ttingSaver.ts |    1.92 |      100 |       0 |    1.92 | 11-32,40-85       
  skillSettings.ts |   86.13 |       88 |     100 |   86.13 | 99-107,134-138    
  skillUtils.ts    |   57.43 |    60.71 |      75 |   57.43 | ...84-185,192-213 
  spawnWrapper.ts  |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  stdinSafety.ts   |   91.39 |    86.48 |     100 |   91.39 | ...66-167,171,246 
  terminalTheme.ts |     100 |      100 |     100 |     100 |                   
  ...entEmitter.ts |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  version.ts       |     100 |      100 |     100 |     100 |                   
  windowTitle.ts   |     100 |      100 |     100 |     100 |                   
 src/utils/privacy |    46.3 |    68.57 |   52.63 |    46.3 |                   
  ...taRedactor.ts |   60.66 |    70.58 |   55.55 |   60.66 | ...81-483,489-510 
  ...acyManager.ts |       0 |        0 |       0 |       0 | 1-176             
 ...ed-integration |     8.3 |     92.3 |      20 |     8.3 |                   
  ...temService.ts |     100 |      100 |     100 |     100 |                   
  ...ntegration.ts |    6.29 |     87.5 |   11.11 |    6.29 | ...1540,1555-1625 
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   78.23 |    81.53 |   78.17 |   78.23 |                   
 src               |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/__mocks__/fs  |       0 |        0 |       0 |       0 |                   
  promises.ts      |       0 |        0 |       0 |       0 | 1-48              
 src/adapters      |     100 |      100 |     100 |     100 |                   
  ...eamAdapter.ts |     100 |      100 |     100 |     100 |                   
 src/agents        |   89.81 |    73.84 |     100 |   89.81 |                   
  executor.ts      |   89.11 |    72.89 |     100 |   89.11 | ...75-776,812-818 
  invocation.ts    |   96.55 |    76.47 |     100 |   96.55 | 61,65-66          
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |   78.94 |       80 |     100 |   78.94 | 32-35             
 src/auth          |   68.27 |    81.38 |   79.81 |   68.27 |                   
  ...evice-flow.ts |    7.21 |        0 |       0 |    7.21 | ...49-268,274-282 
  ...evice-flow.ts |   46.65 |    57.14 |   63.63 |   46.65 | ...96-485,495-581 
  ...oken-store.ts |   88.92 |       87 |     100 |   88.92 | ...84-387,408-414 
  oauth-errors.ts  |   94.15 |    83.33 |     100 |   94.15 | ...69,610,636-637 
  precedence.ts    |   78.02 |    80.15 |   94.73 |   78.02 | ...1075,1081-1084 
  ...evice-flow.ts |    8.33 |      100 |       0 |    8.33 | ...69-206,214-220 
  token-merge.ts   |     100 |      100 |     100 |     100 |                   
  ...nitization.ts |     100 |      100 |     100 |     100 |                   
  token-store.ts   |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/auth/proxy    |   90.37 |    84.95 |   86.27 |   90.37 |                   
  framing.ts       |    97.1 |    90.47 |     100 |    97.1 | 83-84             
  ...ey-storage.ts |   94.28 |       80 |     100 |   94.28 | 45-46             
  ...ket-client.ts |   86.51 |       88 |   78.26 |   86.51 | ...32-235,255-258 
  ...oken-store.ts |   93.02 |    77.77 |   84.61 |   93.02 | 104-108,112       
 src/code_assist   |   68.13 |    79.31 |   76.47 |   68.13 |                   
  codeAssist.ts    |   17.64 |       50 |   33.33 |   17.64 | 16-62,70-73,81-94 
  converter.ts     |   94.96 |    93.02 |     100 |   94.96 | ...90,204,221-222 
  ...al-storage.ts |   98.21 |       75 |     100 |   98.21 | 76,125            
  oauth2.ts        |   62.83 |    76.47 |   78.57 |   62.83 | ...07-708,713-714 
  server.ts        |   48.16 |    72.72 |      50 |   48.16 | ...10-251,254-257 
  setup.ts         |   82.92 |    73.91 |     100 |   82.92 | ...27-129,153-159 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/commands      |     100 |      100 |     100 |     100 |                   
  extensions.ts    |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/config        |   71.64 |    79.84 |   61.61 |   71.64 |                   
  config.ts        |   66.66 |       71 |    60.6 |   66.66 | ...68-777,804-808 
  configBase.ts    |    64.9 |    80.85 |   72.72 |    64.9 | ...18-231,244-265 
  ...igBaseCore.ts |   71.35 |    94.44 |   47.85 |   71.35 | ...81-682,684-685 
  ...onstructor.ts |   96.37 |    88.52 |     100 |   96.37 | ...08-409,412-413 
  configTypes.ts   |   60.37 |      100 |      50 |   60.37 | 188-228           
  constants.ts     |     100 |      100 |     100 |     100 |                   
  endpoints.ts     |     100 |      100 |     100 |     100 |                   
  ...ngsHelpers.ts |   67.56 |       50 |     100 |   67.56 | ...26,30-31,35-36 
  index.ts         |       0 |        0 |       0 |       0 | 1-38              
  ...ntegration.ts |   57.66 |    72.72 |   58.33 |   57.66 | ...32,349,358,367 
  models.ts        |     100 |      100 |     100 |     100 |                   
  ...ileManager.ts |    84.3 |    80.26 |     100 |    84.3 | ...06-410,412-416 
  ...rSingleton.ts |   75.43 |    80.95 |   41.66 |   75.43 | ...20,323-326,334 
  storage.ts       |   90.17 |    87.09 |    93.1 |   90.17 | ...3,75-76,99-100 
  ...entManager.ts |   52.46 |     67.5 |   68.18 |   52.46 | ...76-677,695-719 
  ...tryFactory.ts |   84.45 |    78.26 |      50 |   84.45 | ...21-235,244-253 
  types.ts         |       0 |        0 |       0 |       0 |                   
 ...nfirmation-bus |   71.42 |     86.2 |      75 |   71.42 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-2               
  message-bus.ts   |   70.23 |    88.88 |   81.81 |   70.23 | ...08-242,251-259 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/core          |   80.57 |    78.34 |   76.93 |   80.57 |                   
  ...ookManager.ts |     100 |      100 |     100 |     100 |                   
  ...ionFactory.ts |   94.55 |    89.74 |     100 |   94.55 | ...80-282,328-331 
  ...ionManager.ts |   66.18 |    62.22 |   56.25 |   66.18 | ...26-434,441-445 
  ...eProcessor.ts |   53.86 |     30.9 |   68.75 |   53.86 | ...89-542,557-568 
  ...extTracker.ts |   93.62 |    88.73 |     100 |   93.62 | ...74-177,217-221 
  ...eConverter.ts |   58.92 |    74.11 |   57.14 |   58.92 | ...75,538,549-560 
  ...chestrator.ts |   88.01 |       75 |      75 |   88.01 | ...77-882,922-928 
  ...mProcessor.ts |   74.57 |    76.29 |    62.5 |   74.57 | ...89,893,905-927 
  ...ionService.ts |   91.87 |    91.81 |     100 |   91.87 | ...99,359,384-406 
  TurnProcessor.ts |   77.01 |    64.04 |   70.37 |   77.01 | ...88-689,691-741 
  baseLlmClient.ts |   95.23 |    90.74 |     100 |   95.23 | ...85-286,367-368 
  ...ntegration.ts |   96.66 |    96.07 |     100 |   96.66 | ...37-138,218-219 
  client.ts        |   62.54 |    83.09 |      68 |   62.54 | ...41-659,711-727 
  clientHelpers.ts |   89.47 |     83.6 |     100 |   89.47 | ...,82-83,103-106 
  ...mUtilities.ts |   96.77 |    70.58 |     100 |   96.77 | ...15-116,172-173 
  ...Governance.ts |   98.01 |    97.14 |     100 |   98.01 | 101-102           
  ...ion-config.ts |     100 |      100 |     100 |     100 |                   
  ...tGenerator.ts |   97.22 |    90.47 |     100 |   97.22 | 102-103           
  ...okTriggers.ts |   77.19 |    65.85 |     100 |   77.19 | ...70-271,295-300 
  ...lScheduler.ts |   82.25 |       89 |   70.45 |   82.25 | ...14-718,732-733 
  geminiChat.ts    |   82.82 |    81.13 |   61.22 |   82.82 | ...62-463,494-495 
  ...iChatTypes.ts |   94.73 |      100 |      80 |   94.73 | 112-113           
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  ...nAIWrapper.ts |   88.88 |      100 |   83.33 |   88.88 | 58-61             
  ...okTriggers.ts |   96.21 |    89.13 |     100 |   96.21 | ...15,159,211,258 
  logger.ts        |   80.96 |    81.81 |     100 |   80.96 | ...65-379,426-440 
  ...olExecutor.ts |   59.79 |       60 |      50 |   59.79 | ...34-139,151-180 
  prompts.ts       |   85.26 |    60.29 |    90.9 |   85.26 | ...52-455,465,487 
  subagent.ts      |   76.67 |    64.22 |   95.83 |   76.67 | ...34-839,844-846 
  ...tExecution.ts |   59.67 |    83.05 |   73.33 |   59.67 | ...94,498,500-503 
  ...chestrator.ts |   90.38 |    76.59 |   95.83 |   90.38 | ...61,664-665,670 
  ...ntimeSetup.ts |   84.95 |    78.21 |   57.89 |   84.95 | ...80-584,619-627 
  ...tScheduler.ts |       0 |        0 |       0 |       0 | 1                 
  ...Processing.ts |      88 |    84.94 |     100 |      88 | ...75,479-507,514 
  subagentTypes.ts |     100 |      100 |     100 |     100 |                   
  tokenLimits.ts   |   88.15 |    70.37 |     100 |   88.15 | ...79,81,83,87,97 
  ...Governance.ts |    94.2 |     90.9 |     100 |    94.2 | 34-35,51-52       
  turn.ts          |    93.8 |    83.14 |   81.81 |    93.8 | ...22-623,653-654 
  turnLogging.ts   |   75.29 |    66.66 |      80 |   75.29 | 35-58             
 ...re/compression |   84.37 |    84.91 |   88.17 |   84.37 |                   
  ...ionHandler.ts |   86.94 |    83.17 |   74.19 |   86.94 | ...24-825,833-834 
  ...tyStrategy.ts |   92.32 |    88.88 |   93.75 |   92.32 | ...34,893-894,931 
  ...utStrategy.ts |   88.51 |    76.92 |     100 |   88.51 | ...35-446,449-458 
  ...otStrategy.ts |   82.08 |    75.67 |     100 |   82.08 | ...76-287,290-299 
  ...onStrategy.ts |     100 |      100 |     100 |     100 |                   
  ...nBudgeting.ts |   36.06 |       70 |     100 |   36.06 | ...06-107,112-164 
  ...egyFactory.ts |   90.62 |    88.88 |     100 |   90.62 | 52-54             
  index.ts         |       0 |        0 |       0 |       0 | 1-17              
  types.ts         |   99.03 |    91.42 |     100 |   99.03 | 239               
  utils.ts         |   71.94 |    87.91 |      90 |   71.94 | ...99-400,417-418 
 src/debug         |   78.31 |    88.53 |    87.3 |   78.31 |                   
  ...ionManager.ts |   77.66 |    78.04 |      85 |   77.66 | ...33-234,251-255 
  DebugLogger.ts   |   90.78 |    90.47 |   88.46 |   90.78 | ...77,221-225,268 
  FileOutput.ts    |   88.13 |    94.11 |   86.66 |   88.13 | ...32-136,162-163 
  ...ionManager.ts |       0 |      100 |     100 |       0 | 18-64             
  ...FileOutput.ts |       0 |      100 |     100 |       0 | 17-39             
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 |                   
 src/filters       |   99.19 |    98.79 |     100 |   99.19 |                   
  EmojiFilter.ts   |   99.19 |    98.79 |     100 |   99.19 | 208-209           
 src/hooks         |   84.99 |    84.74 |   83.68 |   84.99 |                   
  errors.ts        |     100 |      100 |     100 |     100 |                   
  ...Aggregator.ts |    92.7 |    89.23 |    87.5 |    92.7 | ...31,350,352,354 
  ...sContracts.ts |       0 |        0 |       0 |       0 | 1                 
  ...entHandler.ts |   91.59 |    85.82 |   93.33 |   91.59 | ...26,762-768,813 
  hookPlanner.ts   |   98.79 |    93.33 |     100 |   98.79 | 103               
  hookRegistry.ts  |   98.25 |    86.56 |     100 |   98.25 | 341,343,345,347   
  hookRunner.ts    |   84.54 |    81.48 |     100 |   84.54 | ...05-307,316-317 
  hookSystem.ts    |   71.02 |    89.47 |      70 |   71.02 | ...49-351,364-366 
  ...Translator.ts |   94.65 |     65.9 |     100 |   94.65 | ...88-289,300,349 
  ...Validators.ts |    92.3 |    88.52 |     100 |    92.3 | 57-59,78-80       
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...ssion-hook.ts |   88.88 |    33.33 |     100 |   88.88 | 24,30             
  trustedHooks.ts  |   20.77 |      100 |       0 |   20.77 | ...6,82-90,96-109 
  types.ts         |    65.6 |    86.95 |   70.83 |    65.6 | ...59-380,427-428 
 ...oks/test-utils |       0 |        0 |       0 |       0 |                   
  ...igWithHook.ts |       0 |        0 |       0 |       0 | 1-139             
 src/ide           |   73.67 |    86.24 |   73.07 |   73.67 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  detect-ide.ts    |     100 |      100 |     100 |     100 |                   
  ide-client.ts    |   56.37 |    79.66 |   54.83 |   56.37 | ...24-532,560-568 
  ide-installer.ts |   90.55 |    85.18 |     100 |   90.55 | ...35,142-146,159 
  ideContext.ts    |   84.82 |      100 |     100 |   84.82 | 89-105            
  process-utils.ts |    89.2 |    82.45 |     100 |    89.2 | ...70-171,212-213 
 src/interfaces    |       0 |        0 |       0 |       0 |                   
  index.ts         |       0 |        0 |       0 |       0 |                   
  ....interface.ts |       0 |        0 |       0 |       0 |                   
 src/lsp           |   71.03 |    73.91 |      90 |   71.03 |                   
  ...ice-client.ts |   71.03 |    73.62 |   89.47 |   71.03 | ...06,448-468,479 
  types.ts         |       0 |        0 |       0 |       0 |                   
 src/mcp           |   79.82 |    78.71 |   72.41 |   79.82 |                   
  auth-provider.ts |       0 |        0 |       0 |       0 | 1                 
  ...oken-store.ts |    86.4 |    90.47 |   81.25 |    86.4 | ...39-340,343-344 
  ...h-provider.ts |    90.1 |      100 |      40 |    90.1 | ...97,101,105-106 
  ...h-provider.ts |   76.26 |     57.4 |     100 |   76.26 | ...39,968,975-977 
  ...en-storage.ts |    81.5 |    88.88 |   68.18 |    81.5 | ...97-198,203-204 
  oauth-utils.ts   |   72.44 |    85.36 |    92.3 |   72.44 | ...09-313,339-374 
  ...n-provider.ts |      88 |    94.73 |   33.33 |      88 | ...37,141,145-146 
  token-store.ts   |     100 |      100 |     100 |     100 |                   
 .../token-storage |   88.17 |    87.94 |   93.02 |   88.17 |                   
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   86.61 |    87.09 |   92.85 |   86.61 | ...64-172,180-181 
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   83.76 |    83.11 |   84.61 |   83.76 | ...57,259,311-312 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/models        |   83.44 |    91.15 |    87.5 |   83.44 |                   
  hydration.ts     |    4.76 |      100 |       0 |    4.76 | 65-129,151-231    
  index.ts         |     100 |      100 |     100 |     100 |                   
  profiles.ts      |     100 |      100 |     100 |     100 |                   
  ...ntegration.ts |   95.31 |    85.36 |     100 |   95.31 | ...35-136,199-200 
  registry.ts      |   90.45 |    88.88 |      92 |   90.45 | ...69-270,389-402 
  schema.ts        |     100 |      100 |     100 |     100 |                   
  transformer.ts   |     100 |      100 |     100 |     100 |                   
 src/parsers       |    70.7 |       75 |    86.2 |    70.7 |                   
  ...CallParser.ts |    70.7 |       75 |    86.2 |    70.7 | ...1,983,989-1004 
 src/policy        |   83.84 |    80.54 |   91.42 |   83.84 |                   
  config.ts        |      70 |    74.64 |   85.71 |      70 | ...67,520,584-585 
  index.ts         |     100 |      100 |     100 |     100 |                   
  policy-engine.ts |   96.71 |    89.33 |     100 |   96.71 | 71-74,104         
  ...cy-helpers.ts |     100 |      100 |     100 |     100 |                   
  ...-stringify.ts |   80.23 |    60.52 |      50 |   80.23 | ...22-126,139-140 
  toml-loader.ts   |   89.88 |    83.52 |     100 |   89.88 | ...75,477,484,486 
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |   81.81 |    84.61 |     100 |   81.81 | 24-27,30-33       
 src/prompt-config |   75.67 |    84.64 |   85.55 |   75.67 |                   
  ...lateEngine.ts |   91.05 |    86.36 |     100 |   91.05 | ...18-321,332-335 
  index.ts         |       0 |      100 |     100 |       0 | 5-41              
  prompt-cache.ts  |   99.08 |    97.43 |     100 |   99.08 | 216-217           
  ...-installer.ts |   83.11 |     82.4 |     100 |   83.11 | ...1173,1253-1254 
  prompt-loader.ts |   88.02 |    91.57 |   76.92 |   88.02 | ...79-388,430-431 
  ...t-resolver.ts |   35.02 |    66.17 |   53.84 |   35.02 | ...21-772,775-803 
  ...pt-service.ts |   85.21 |     83.8 |      80 |   85.21 | ...30,547-554,585 
  ...delegation.ts |   93.54 |    91.66 |     100 |   93.54 | 33-34             
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...onfig/defaults |    50.4 |    43.53 |     100 |    50.4 |                   
  core-defaults.ts |   38.02 |    35.89 |     100 |   38.02 | ...73,284,290-298 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...est-loader.ts |   81.81 |    79.31 |     100 |   81.81 | ...02-108,116-120 
  ...t-warnings.ts |    92.3 |    33.33 |     100 |    92.3 | 18-19             
  ...r-defaults.ts |   42.61 |    31.57 |     100 |   42.61 | ...49,260,266-271 
  ...e-defaults.ts |     100 |      100 |     100 |     100 |                   
  tool-defaults.ts |   49.77 |    36.84 |     100 |   49.77 | ...14-220,233-238 
 src/prompts       |   27.77 |      100 |      25 |   27.77 |                   
  mcp-prompts.ts   |   18.18 |      100 |       0 |   18.18 | 11-19             
  ...t-registry.ts |   30.23 |      100 |   28.57 |   30.23 | ...43,49-56,69-74 
 src/providers     |   71.11 |    80.75 |   66.81 |   71.11 |                   
  BaseProvider.ts  |   80.05 |    78.57 |   78.84 |   80.05 | ...1191,1194-1195 
  ...eratorRole.ts |     100 |      100 |     100 |     100 |                   
  IModel.ts        |       0 |        0 |       0 |       0 |                   
  IProvider.ts     |       0 |        0 |       0 |       0 |                   
  ...derManager.ts |     100 |      100 |     100 |     100 |                   
  ITool.ts         |       0 |        0 |       0 |       0 |                   
  ...ngProvider.ts |   86.52 |    88.23 |   88.57 |   86.52 | ...1200,1236-1238 
  ...derWrapper.ts |    62.6 |    72.25 |    57.5 |    62.6 | ...1448,1467-1474 
  ...tGenerator.ts |    17.3 |      100 |       0 |    17.3 | ...61,64-81,84-87 
  ...derManager.ts |   57.93 |     75.1 |   60.46 |   57.93 | ...1564-1565,1568 
  ...chestrator.ts |   81.42 |    88.94 |   70.83 |   81.42 | ...78-682,684-691 
  ...taResolver.ts |   97.27 |    93.18 |     100 |   97.27 | 173-175           
  errors.ts        |   75.98 |    69.44 |   42.85 |   75.98 | ...82-283,292-293 
  ...ConfigKeys.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...ders/anthropic |    88.5 |    86.08 |   88.72 |    88.5 |                   
  ...iExecution.ts |     100 |     92.3 |     100 |     100 | 201,225           
  ...Normalizer.ts |   90.03 |    86.45 |     100 |   90.03 | ...87-691,696-701 
  ...eValidator.ts |   98.38 |    99.12 |     100 |   98.38 | ...99,413-414,449 
  ...cModelData.ts |   92.26 |       95 |      75 |   92.26 | 176-189,234-235   
  ...icProvider.ts |    78.6 |    77.77 |   73.17 |    78.6 | ...00-502,633-634 
  ...mitHandler.ts |   98.61 |     97.1 |     100 |   98.61 | 130,214-215       
  ...estBuilder.ts |    88.2 |       88 |     100 |    88.2 | ...97-198,211-212 
  ...reparation.ts |   95.92 |    83.13 |   93.33 |   95.92 | ...46,588,634,721 
  ...onseParser.ts |   75.89 |     61.9 |     100 |   75.89 | ...24-128,178-179 
  ...mProcessor.ts |   84.71 |    83.78 |     100 |   84.71 | ...20,379,468,490 
  ...aConverter.ts |   50.94 |    44.11 |   71.42 |   50.94 | ...60-264,279-287 
  usageInfo.ts     |   92.24 |    96.96 |     100 |   92.24 | ...02-107,117-119 
 ...pic/test-utils |       0 |        0 |       0 |       0 |                   
  ...cTestUtils.ts |       0 |        0 |       0 |       0 |                   
 ...oviders/chutes |   78.57 |       80 |     100 |   78.57 |                   
  usageInfo.ts     |   78.57 |       80 |     100 |   78.57 | ...68-170,185-199 
 ...providers/fake |   91.62 |    78.26 |     100 |   91.62 |                   
  FakeProvider.ts  |   91.62 |    78.26 |     100 |   91.62 | ...12-215,218-221 
 ...oviders/gemini |   53.86 |     70.4 |   45.23 |   53.86 |                   
  ...niProvider.ts |   51.99 |    60.96 |   44.73 |   51.99 | ...1878,1887-1888 
  ...Signatures.ts |     100 |    98.41 |     100 |     100 | 182               
  usageInfo.ts     |   16.66 |      100 |       0 |   16.66 | 41-149            
 ...providers/kimi |   86.29 |     84.9 |     100 |   86.29 |                   
  usageInfo.ts     |   86.29 |     84.9 |     100 |   86.29 | ...16-319,330-331 
 ...viders/logging |   42.94 |    85.71 |      75 |   42.94 |                   
  ...tExtractor.ts |       0 |        0 |       0 |       0 | 1-229             
  ...nceTracker.ts |   91.33 |       90 |   81.81 |   91.33 | ...73-175,193-194 
 ...oviders/openai |   73.51 |     78.9 |   63.31 |   73.51 |                   
  ...ationCache.ts |   65.57 |    83.33 |   82.35 |   65.57 | ...79-187,216-217 
  ...rateParams.ts |       0 |        0 |       0 |       0 |                   
  ...iExecution.ts |   23.36 |    41.66 |      25 |   23.36 | ...63-171,175-246 
  ...entFactory.ts |   87.87 |    97.91 |   71.42 |   87.87 | 76-81,85-94       
  ...eamHandler.ts |   56.71 |       28 |   33.33 |   56.71 | ...43-244,262-276 
  ...AIProvider.ts |   64.11 |    72.05 |   45.16 |   64.11 | ...07,734,742-751 
  ...estBuilder.ts |    87.8 |    92.24 |   91.66 |    87.8 | ...79-488,500-508 
  ...reparation.ts |   72.91 |    55.17 |      25 |   72.91 | ...83-186,190-191 
  ...onseParser.ts |    94.7 |    89.28 |   83.33 |    94.7 | ...82-186,254-255 
  ...mProcessor.ts |   57.71 |    59.37 |    9.52 |   57.71 | ...57,885,887-906 
  ...API_MODELS.ts |     100 |      100 |     100 |     100 |                   
  ...lCollector.ts |   93.33 |    89.28 |     100 |   93.33 | ...51-153,173-174 
  ...Normalizer.ts |   92.75 |    95.83 |     100 |   92.75 | 74-78             
  ...llPipeline.ts |   64.54 |    53.33 |      75 |   64.54 | ...34-143,174-184 
  ...eValidator.ts |   93.93 |    93.75 |     100 |   93.93 | 105-108           
  ...sesRequest.ts |   83.92 |    93.24 |     100 |   83.92 | ...59,293,298-303 
  ...xUsageInfo.ts |   91.57 |    90.24 |     100 |   91.57 | ...86,190,197-199 
  ...moteTokens.ts |   89.55 |     92.3 |     100 |   89.55 | 97-103            
  ...sonMapping.ts |   82.75 |    33.33 |   33.33 |   82.75 | 45-49             
  ...oviderInfo.ts |    86.2 |    73.52 |     100 |    86.2 | ...31-133,144-145 
  ...uestParams.ts |   87.27 |    57.69 |     100 |   87.27 | ...20-121,123-124 
  ...nsesStream.ts |   87.06 |    85.57 |     100 |   87.06 | ...65,524-531,555 
  ...aConverter.ts |    53.7 |    52.63 |   71.42 |    53.7 | ...59-260,283-291 
  ...lResponses.ts |   71.86 |    73.33 |      75 |   71.86 | ...96-300,320-334 
  test-types.ts    |       0 |        0 |       0 |       0 |                   
  toolNameUtils.ts |   96.79 |    95.34 |      50 |   96.79 | 102,127,239-241   
 ...enai-responses |   62.46 |    74.39 |   41.93 |   62.46 |                   
  CODEX_MODELS.ts  |     100 |      100 |     100 |     100 |                   
  ...esProvider.ts |   66.35 |    73.29 |      50 |   66.35 | ...1156,1177-1199 
  ...romContent.ts |      90 |     87.5 |     100 |      90 | 61-65,147,186-193 
  index.ts         |       0 |        0 |       0 |       0 | 1                 
  ...aConverter.ts |    7.97 |       20 |   14.28 |    7.97 | ...52-278,281-290 
 .../openai-vercel |   70.92 |     66.5 |   62.29 |   70.92 |                   
  ...elProvider.ts |   70.51 |     63.9 |   48.71 |   70.51 | ...1654,1664-1665 
  errors.ts        |   93.23 |    82.05 |     100 |   93.23 | ...50-151,165-169 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...Conversion.ts |   71.42 |    74.68 |      80 |   71.42 | ...06-510,528-536 
  ...aConverter.ts |    53.7 |       50 |   71.42 |    53.7 | ...58-259,282-290 
  toolIdUtils.ts   |     100 |      100 |     100 |     100 |                   
 ...ders/reasoning |   47.13 |    89.65 |    87.5 |   47.13 |                   
  ...oningUtils.ts |   47.13 |    89.65 |    87.5 |   47.13 | ...47-205,241-280 
 ...ders/synthetic |   93.65 |       92 |     100 |   93.65 |                   
  usageInfo.ts     |   93.65 |       92 |     100 |   93.65 | ...19-121,154-155 
 ...ers/test-utils |     100 |      100 |     100 |     100 |                   
  ...TestConfig.ts |     100 |      100 |     100 |     100 |                   
 ...ers/tokenizers |      70 |    77.77 |      75 |      70 |                   
  ...cTokenizer.ts |   68.42 |       75 |     100 |   68.42 | 34-39             
  ITokenizer.ts    |       0 |        0 |       0 |       0 |                   
  ...ITokenizer.ts |   70.73 |       80 |   66.66 |   70.73 | 53-56,63-72       
 ...roviders/types |       0 |        0 |       0 |       0 |                   
  ...iderConfig.ts |       0 |        0 |       0 |       0 |                   
  ...derRuntime.ts |       0 |        0 |       0 |       0 |                   
 ...roviders/utils |   91.91 |    90.75 |   90.24 |   91.91 |                   
  authToken.ts     |   33.33 |       50 |      50 |   33.33 | 14-22,30-35       
  ...sExtractor.ts |   95.45 |     91.3 |     100 |   95.45 | 15-16             
  ...nerSandbox.ts |     100 |      100 |     100 |     100 |                   
  ...entPreview.ts |   88.88 |    77.77 |     100 |   88.88 | 51-52,58-59,66    
  dumpContext.ts   |    96.1 |    95.65 |     100 |    96.1 | 110-112           
  ...SDKContext.ts |   94.59 |       75 |     100 |   94.59 | 27,49             
  localEndpoint.ts |   89.28 |    92.68 |     100 |   89.28 | ...18-119,138-139 
  mediaUtils.ts    |     100 |    93.33 |     100 |     100 | 22,34             
  qwenEndpoint.ts  |     100 |      100 |     100 |     100 |                   
  retryStrategy.ts |   96.29 |    90.47 |      50 |   96.29 | 73,84             
  textSanitizer.ts |     100 |    91.66 |      50 |     100 | 54                
  ...Extraction.ts |     100 |    94.44 |      50 |     100 | 78                
  ...tDetection.ts |    97.5 |    94.44 |     100 |    97.5 | 38                
  ...malization.ts |     100 |      100 |     100 |     100 |                   
  ...malization.ts |     100 |      100 |     100 |     100 |                   
  ...nsePayload.ts |   92.63 |    86.88 |     100 |   92.63 | ...42-147,200-204 
  userMemory.ts    |   51.51 |       60 |     100 |   51.51 | 16-18,31-43       
 src/providers/zai |   89.86 |    80.64 |     100 |   89.86 |                   
  usageInfo.ts     |   89.86 |    80.64 |     100 |   89.86 | ...58-160,171-172 
 src/recording     |   90.34 |    84.51 |   98.43 |   90.34 |                   
  ...ntegration.ts |    83.9 |    74.07 |     100 |    83.9 | ...31-132,143-144 
  ReplayEngine.ts  |   98.38 |    92.53 |     100 |   98.38 | 272-275           
  ...nDiscovery.ts |   91.98 |    84.37 |     100 |   91.98 | ...29,245-247,296 
  ...ockManager.ts |   89.94 |    82.69 |     100 |   89.94 | ...95,210,247-248 
  ...ingService.ts |   82.37 |       92 |   95.23 |   82.37 | ...40,373-374,378 
  index.ts         |     100 |      100 |     100 |     100 |                   
  resumeSession.ts |    91.8 |    86.95 |     100 |    91.8 | ...32-133,174-179 
  ...eanupUtils.ts |      90 |    69.23 |     100 |      90 | ...29-230,256,269 
  ...Management.ts |   88.23 |    85.71 |     100 |   88.23 | 94,108-112        
  types.ts         |       0 |        0 |       0 |       0 |                   
 src/resources     |   95.23 |     92.3 |     100 |   95.23 |                   
  ...e-registry.ts |   95.23 |     92.3 |     100 |   95.23 | 34-35             
 src/runtime       |   88.27 |    85.22 |    82.5 |   88.27 |                   
  ...imeContext.ts |     100 |      100 |     100 |     100 |                   
  ...timeLoader.ts |    84.9 |    69.38 |      80 |    84.9 | ...85-188,226-229 
  ...ntimeState.ts |   95.49 |    91.89 |     100 |   95.49 | ...83-484,525-526 
  ...ionContext.ts |   85.89 |    94.11 |   85.71 |   85.89 | 80-82,149-156     
  ...imeContext.ts |   91.66 |    94.02 |    87.5 |   91.66 | ...25-230,232-239 
  index.ts         |       0 |        0 |       0 |       0 | 1-15              
  ...imeContext.ts |     100 |      100 |     100 |     100 |                   
  ...meAdapters.ts |   64.81 |       65 |   56.25 |   64.81 | ...,47-50,123-149 
  ...ateFactory.ts |   96.05 |    81.48 |     100 |   96.05 | 72,87,107         
 src/safety        |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  pathValidator.ts |     100 |      100 |     100 |     100 |                   
 src/scheduler     |   90.06 |    81.99 |   96.72 |   90.06 |                   
  ...oordinator.ts |   85.92 |    78.26 |     100 |   85.92 | ...18,741-742,797 
  ...aggregator.ts |   89.72 |    86.79 |     100 |   89.72 | ...04,412,416-423 
  ...ransitions.ts |   96.58 |       75 |     100 |   96.58 | ...,74-75,273-275 
  ...dispatcher.ts |   98.21 |       96 |     100 |   98.21 | 147-148           
  tool-executor.ts |   89.56 |    82.35 |   66.66 |   89.56 | ...63-165,168-169 
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |     100 |      100 |     100 |     100 |                   
 src/services      |   84.27 |    85.61 |   85.63 |   84.27 |                   
  ...ardService.ts |   93.33 |    92.85 |     100 |   93.33 | 63,67-68          
  ...utoTrigger.ts |   97.14 |    95.83 |     100 |   97.14 | 119-120           
  ...askManager.ts |   95.81 |    93.93 |     100 |   95.81 | 151-157,365-366   
  ...derService.ts |   98.98 |    94.28 |     100 |   98.98 | 173               
  ...y-analyzer.ts |   76.32 |    81.17 |   77.77 |   76.32 | ...79-507,513-514 
  ...extManager.ts |     100 |      100 |     100 |     100 |                   
  ...nitization.ts |   98.62 |     90.9 |     100 |   98.62 | 172-173           
  ...eryService.ts |   98.54 |    95.45 |     100 |   98.54 | 132-133           
  ...temService.ts |     100 |      100 |     100 |     100 |                   
  ...ts-service.ts |      50 |      100 |       0 |      50 | 41-42,48-49       
  gitService.ts    |    86.6 |    86.95 |      80 |    86.6 | ...34-137,141-145 
  index.ts         |       0 |        0 |       0 |       0 | 1-23              
  ...ionService.ts |   94.87 |     91.3 |     100 |   94.87 | ...90-291,301-302 
  ...ionService.ts |   79.18 |     80.6 |   78.37 |   79.18 | ...1201,1210-1232 
  ...xt-tracker.ts |   94.87 |       90 |    87.5 |   94.87 | 54-55             
  ...er-service.ts |    60.6 |    82.35 |      50 |    60.6 | ...36-139,142-160 
  ...er-service.ts |   69.45 |    55.88 |      80 |   69.45 | ...85-289,311-314 
 ...rvices/history |   83.53 |    85.26 |   90.27 |   83.53 |                   
  ...Converters.ts |   87.39 |    82.35 |   85.71 |   87.39 | ...22-334,345-351 
  HistoryEvents.ts |       0 |        0 |       0 |       0 |                   
  ...oryService.ts |   81.26 |    85.99 |   89.47 |   81.26 | ...1552,1588-1589 
  IContent.ts      |   88.05 |    80.76 |     100 |   88.05 | ...39-240,257-260 
  ...calToolIds.ts |   96.82 |     93.1 |     100 |   96.82 | 36-37             
 src/settings      |   81.23 |       87 |   55.71 |   81.23 |                   
  ...ngsService.ts |   91.69 |    75.75 |   95.23 |   91.69 | ...58-359,389-393 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...gsRegistry.ts |   78.85 |    92.74 |   35.55 |   78.85 | ...1498,1501-1518 
  ...ceInstance.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/skills        |   74.87 |     85.1 |   73.07 |   74.87 |                   
  skillLoader.ts   |    56.7 |    83.33 |   71.42 |    56.7 | ...94-226,229-264 
  skillManager.ts  |    91.2 |     86.2 |   73.68 |    91.2 | ...52-353,359-360 
 src/storage       |    90.5 |    85.08 |   92.98 |    90.5 |                   
  ...FileWriter.ts |   83.75 |       80 |    87.5 |   83.75 | 41-42,72-82       
  ...nceService.ts |   98.67 |    96.96 |     100 |   98.67 | 293-294           
  ...ey-storage.ts |   92.64 |    90.47 |     100 |   92.64 | 35-37,83-84       
  secure-store.ts  |   89.09 |     82.6 |   89.28 |   89.09 | ...09-712,728-729 
  sessionTypes.ts  |     100 |      100 |     100 |     100 |                   
 src/telemetry     |   68.36 |    82.55 |    62.4 |   68.36 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...-exporters.ts |   28.08 |      100 |       0 |   28.08 | ...14-115,118-119 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-17              
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-132             
  loggers.ts       |   65.28 |    72.91 |   60.71 |   65.28 | ...94-607,615-631 
  metrics.ts       |   62.35 |    96.29 |   66.66 |   62.35 | ...41-163,166-189 
  sdk.ts           |   77.41 |    52.38 |     100 |   77.41 | ...62,166-167,169 
  ...l-decision.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |   76.42 |       86 |    66.1 |   76.42 | ...57-659,662-666 
  uiTelemetry.ts   |   95.45 |    96.15 |   91.66 |   95.45 | 162,201-207       
 src/test-utils    |    90.4 |    86.76 |      60 |    90.4 |                   
  config.ts        |   91.66 |    71.42 |     100 |   91.66 | 71-74             
  index.ts         |       0 |        0 |       0 |       0 | 1-9               
  mock-tool.ts     |   97.91 |      100 |   83.33 |   97.91 | 78-79             
  ...aceContext.ts |     100 |      100 |     100 |     100 |                   
  ...allOptions.ts |   93.92 |    91.66 |   63.63 |   93.92 | ...19,187,216-219 
  runtime.ts       |   89.44 |    84.84 |   42.55 |   89.44 | ...06-308,317-318 
  tools.ts         |   84.69 |    77.77 |      80 |   84.69 | ...58,180,184-185 
 src/todo          |   51.55 |    83.33 |      75 |   51.55 |                   
  todoFormatter.ts |   51.55 |    83.33 |      75 |   51.55 | ...56-160,198-199 
 src/tools         |   77.63 |    78.85 |   81.66 |   77.63 |                   
  ...lFormatter.ts |     100 |      100 |     100 |     100 |                   
  ToolFormatter.ts |   21.51 |    76.74 |   33.33 |   21.51 | ...21,528-626,641 
  ...IdStrategy.ts |   94.77 |       92 |     100 |   94.77 | ...30-231,267-270 
  ...vate-skill.ts |   92.51 |    72.22 |      90 |   92.51 | ...99,168-170,182 
  apply-patch.ts   |   52.54 |       50 |   53.84 |   52.54 | ...78-502,511-512 
  ast-edit.ts      |   95.28 |       96 |   92.85 |   95.28 | 158-166           
  ast-grep.ts      |   88.96 |    85.52 |   88.88 |   88.96 | ...57-259,280-281 
  ...sync-tasks.ts |   96.49 |    91.52 |    92.3 |   96.49 | 50-54,100,117,237 
  codesearch.ts    |   98.13 |    89.47 |    87.5 |   98.13 | 114-115,192       
  ...line_range.ts |   85.95 |    72.09 |      70 |   85.95 | ...10-311,319-320 
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  ...-web-fetch.ts |   94.39 |    79.48 |      80 |   94.39 | ...98,218,237-238 
  ...scapeUtils.ts |   61.65 |    72.97 |      50 |   61.65 | ...93,309,311-321 
  edit.ts          |   79.64 |    81.71 |   76.47 |   79.64 | ...0-921,958-1002 
  ensure-dirs.ts   |     100 |      100 |     100 |     100 |                   
  ...web-search.ts |   98.13 |    88.23 |   85.71 |   98.13 | 136-137,216       
  ...y-replacer.ts |   85.71 |    84.35 |     100 |   85.71 | ...47-448,493-494 
  glob.ts          |   90.96 |    81.96 |      90 |   90.96 | ...68-269,378-379 
  ...-web-fetch.ts |   94.11 |    87.73 |    92.3 |   94.11 | ...89-390,400-401 
  ...invocation.ts |   55.07 |    38.88 |      75 |   55.07 | ...30-134,166-211 
  ...web-search.ts |     100 |      100 |     100 |     100 |                   
  grep.ts          |   63.52 |       80 |   73.68 |   63.52 | ...98,916,927-934 
  ...rt_at_line.ts |   82.95 |    78.43 |      70 |   82.95 | ...35-336,344-345 
  ...-subagents.ts |    87.5 |    69.56 |   88.88 |    87.5 | ...,83-91,100,156 
  ls.ts            |   97.59 |    89.23 |     100 |   97.59 | 157-162           
  ...ics-helper.ts |     100 |    71.42 |     100 |     100 | 56,65,70,77,82    
  ...nt-manager.ts |   51.75 |    68.18 |   36.84 |   51.75 | ...73-396,399-400 
  mcp-client.ts    |   52.11 |    75.27 |   70.37 |   52.11 | ...1945,1949-1952 
  mcp-tool.ts      |   92.52 |     93.1 |   84.61 |   92.52 | ...75-285,349-350 
  memoryTool.ts    |   78.22 |    84.72 |   88.88 |   78.22 | ...93-394,447-500 
  ...iable-tool.ts |   92.15 |    74.07 |     100 |   92.15 | 73-78,202-207     
  read-file.ts     |   91.69 |    80.26 |    90.9 |   91.69 | ...34-235,403-404 
  ...many-files.ts |    73.1 |     78.2 |   88.88 |    73.1 | ...34-535,542-543 
  ...line_range.ts |   78.49 |       64 |      80 |   78.49 | ...54-355,359-360 
  ripGrep.ts       |   83.29 |    86.81 |   86.66 |   83.29 | ...16,419,447-472 
  shell.ts         |   84.89 |    79.08 |    90.9 |   84.89 | ...81-882,887-888 
  ...l-analysis.ts |   81.76 |    62.28 |      92 |   81.76 | ...1185,1238,1249 
  task.ts          |   83.46 |    74.11 |    92.1 |   83.46 | ...1246,1249-1258 
  todo-events.ts   |    62.5 |      100 |       0 |    62.5 | 23-24,27-28,31-32 
  todo-pause.ts    |   87.09 |       80 |     100 |   87.09 | 64-69,73-78,93-98 
  todo-read.ts     |   89.24 |    94.73 |     100 |   89.24 | 113-124           
  todo-schemas.ts  |     100 |      100 |     100 |     100 |                   
  todo-store.ts    |   76.92 |    82.35 |   77.77 |   76.92 | ...31-133,140-145 
  todo-write.ts    |   88.23 |    80.48 |   88.88 |   88.23 | ...75,210-212,290 
  ...tion-types.ts |     100 |      100 |     100 |     100 |                   
  tool-context.ts  |     100 |      100 |     100 |     100 |                   
  tool-error.ts    |   88.23 |      100 |       0 |   88.23 | 109-116           
  ...ey-storage.ts |   86.02 |    80.51 |     100 |   86.02 | ...50-355,364-369 
  tool-names.ts    |     100 |      100 |     100 |     100 |                   
  tool-registry.ts |    83.4 |       75 |   82.05 |    83.4 | ...94-702,710-711 
  toolNameUtils.ts |      80 |     92.1 |     100 |      80 | 59-60,64-65,69-82 
  tools.ts         |   80.72 |     82.5 |   74.35 |   80.72 | ...16-917,920-927 
  write-file.ts    |    80.1 |    71.09 |   73.33 |    80.1 | ...11-712,738-777 
 ...tools/ast-edit |   78.98 |    76.78 |   91.89 |   78.98 |                   
  ast-config.ts    |     100 |      100 |     100 |     100 |                   
  ...invocation.ts |   84.12 |    76.62 |     100 |   84.12 | ...19-328,425-426 
  ...-extractor.ts |   82.19 |    64.51 |   66.66 |   82.19 | ...18-220,224-229 
  ...invocation.ts |    81.5 |       76 |      80 |    81.5 | ...53,155-156,162 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...-collector.ts |    80.5 |       90 |     100 |    80.5 | 141-169           
  ...-optimizer.ts |   52.54 |       75 |      50 |   52.54 | ...0,77-78,95-100 
  ...e-analyzer.ts |   47.12 |    52.94 |     100 |   47.12 | ...19-320,328-329 
  ...calculator.ts |   91.39 |    91.07 |     100 |   91.39 | ...33-237,276-277 
  edit-helpers.ts  |   77.77 |    72.72 |     100 |   77.77 | 33-34,36-37       
  ...e-analysis.ts |   97.18 |       92 |     100 |   97.18 | 99-100            
  ...t-analyzer.ts |   84.95 |    83.01 |     100 |   84.95 | ...34-243,267-272 
  ...t-provider.ts |   91.15 |     64.7 |     100 |   91.15 | ...29-130,147-148 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
  ...t-provider.ts |   64.28 |       50 |     100 |   64.28 | 42-47,52-55       
 src/types         |     100 |      100 |     100 |     100 |                   
  modelParams.ts   |     100 |      100 |     100 |     100 |                   
 src/utils         |   83.25 |    86.54 |   82.94 |   83.25 |                   
  LruCache.ts      |    82.6 |      100 |   71.42 |    82.6 | 29-30,33-34       
  ...grep-utils.ts |      98 |     87.5 |     100 |      98 | 135-136           
  asyncIterator.ts |   73.07 |    86.66 |   66.66 |   73.07 | ...71,75-86,93-94 
  bfsFileSearch.ts |   89.88 |     90.9 |     100 |   89.88 | 88-96             
  browser.ts       |    8.69 |      100 |       0 |    8.69 | 17-53             
  channel.ts       |     100 |      100 |     100 |     100 |                   
  ...pointUtils.ts |   95.58 |    95.23 |     100 |   95.58 | 149-154           
  debugLogger.ts   |     100 |      100 |     100 |     100 |                   
  delay.ts         |     100 |      100 |     100 |     100 |                   
  editor.ts        |   96.44 |    90.19 |    90.9 |   96.44 | ...25-226,228-229 
  ...entContext.ts |     100 |      100 |     100 |     100 |                   
  errorParsing.ts  |   90.22 |    76.78 |     100 |   90.22 | ...13,161,204,207 
  ...rReporting.ts |   83.72 |    84.61 |     100 |   83.72 | 83-87,108-116     
  errors.ts        |   85.61 |    93.75 |   53.33 |   85.61 | ...18-119,182-183 
  events.ts        |   64.42 |      100 |      60 |   64.42 | ...66-271,277-280 
  exitCodes.ts     |     100 |      100 |     100 |     100 |                   
  ...sionLoader.ts |   81.25 |    62.85 |    92.3 |   81.25 | ...67-168,221-229 
  fetch.ts         |   31.08 |    66.66 |      25 |   31.08 | ...37,40-85,88-89 
  fileDiffUtils.ts |     100 |      100 |     100 |     100 |                   
  fileUtils.ts     |   95.49 |    90.57 |     100 |   95.49 | ...36-240,458-464 
  formatters.ts    |   54.54 |       50 |     100 |   54.54 | 12-16             
  ...eUtilities.ts |   94.83 |    93.91 |     100 |   94.83 | ...58-262,319-320 
  ...rStructure.ts |   94.82 |    94.93 |     100 |   94.82 | ...20-123,351-356 
  getPty.ts        |    12.5 |      100 |       0 |    12.5 | 21-34             
  ...noreParser.ts |   93.33 |    88.46 |     100 |   93.33 | ...52,221-222,233 
  ...ineChanges.ts |   58.56 |    79.41 |      80 |   58.56 | ...18-256,264-270 
  gitUtils.ts      |   90.24 |       90 |     100 |   90.24 | 40-41,71-72       
  googleErrors.ts  |   72.05 |    67.56 |     100 |   72.05 | ...59,300,307-308 
  ...uotaErrors.ts |   94.58 |    81.42 |     100 |   94.58 | ...61-264,267-268 
  ide-trust.ts     |      60 |      100 |       0 |      60 | 14-15             
  ...rePatterns.ts |     100 |    96.55 |     100 |     100 | 248               
  ...ionManager.ts |     100 |       90 |     100 |     100 | 24                
  ...edit-fixer.ts |       0 |        0 |       0 |       0 | 1-156             
  ...yDiscovery.ts |   82.96 |     77.2 |   85.71 |   82.96 | ...11-712,715-716 
  ...tProcessor.ts |   93.44 |    86.51 |    92.3 |   93.44 | ...89-390,399-400 
  ...Inspectors.ts |   61.53 |      100 |      50 |   61.53 | 18-23             
  output-format.ts |   36.36 |      100 |       0 |   36.36 | ...53-154,164-185 
  package.ts       |     100 |      100 |     100 |     100 |                   
  ...erCoercion.ts |   83.78 |    81.15 |     100 |   83.78 | ...79-180,242-243 
  partUtils.ts     |   96.49 |    97.05 |     100 |   96.49 | 93-94             
  pathReader.ts    |       0 |        0 |       0 |       0 | 1-60              
  paths.ts         |    87.5 |     87.5 |     100 |    87.5 | ...35-236,250-251 
  ...rDetection.ts |    64.4 |       75 |     100 |    64.4 | ...4,88-89,99-100 
  ...archTarget.ts |   89.58 |    73.33 |     100 |   89.58 | 45-47,65-66       
  retry.ts         |   76.19 |    88.65 |   84.61 |   76.19 | ...20-723,728-729 
  ...thResolver.ts |      85 |    83.87 |     100 |      85 | ...07,130,179-182 
  ...nStringify.ts |     100 |      100 |     100 |     100 |                   
  sanitization.ts  |     100 |      100 |     100 |     100 |                   
  ...aValidator.ts |   93.63 |    82.85 |     100 |   93.63 | 254-265,329-330   
  ...r-launcher.ts |   88.88 |    79.48 |     100 |   88.88 | ...79-184,189-190 
  session.ts       |     100 |      100 |     100 |     100 |                   
  shell-parser.ts  |   22.46 |       56 |   42.85 |   22.46 | ...78-392,413-457 
  shell-utils.ts   |   86.88 |    85.71 |     100 |   86.88 | ...12-514,517-522 
  ...Completion.ts |   94.16 |     92.3 |     100 |   94.16 | 68-74             
  stdio.ts         |   84.21 |    59.09 |     100 |   84.21 | ...21-125,134-138 
  ...dleTimeout.ts |   98.57 |    96.66 |     100 |   98.57 | 76                
  summarizer.ts    |     100 |    88.88 |     100 |     100 | 90                
  ...emEncoding.ts |   97.16 |    91.42 |     100 |   97.16 | 109-110,162       
  terminal.ts      |   34.09 |      100 |       0 |   34.09 | ...55,58-59,62-66 
  ...Serializer.ts |   98.16 |    92.18 |     100 |   98.16 | ...,98-99,151-153 
  testUtils.ts     |      50 |      100 |   33.33 |      50 | ...47,53-58,64-66 
  textUtils.ts     |    12.5 |      100 |       0 |    12.5 | 15-34             
  thoughtUtils.ts  |     100 |      100 |     100 |     100 |                   
  tool-utils.ts    |   67.76 |    78.04 |      75 |   67.76 | ...37-138,159-183 
  ...putLimiter.ts |   88.57 |    81.25 |     100 |   88.57 | ...19-224,268-273 
  unicodeUtils.ts  |     100 |      100 |     100 |     100 |                   
  ...untManager.ts |   89.65 |    88.23 |     100 |   89.65 | ...0,77-82,98-100 
  version.ts       |     100 |      100 |     100 |     100 |                   
  ...aceContext.ts |   96.85 |    95.34 |    92.3 |   96.85 | 95-96,110-111     
 ...ils/filesearch |   95.65 |    91.04 |     100 |   95.65 |                   
  crawlCache.ts    |     100 |      100 |     100 |     100 |                   
  crawler.ts       |   93.05 |       90 |     100 |   93.05 | 72-74,86-87       
  fileSearch.ts    |   93.25 |    86.95 |     100 |   93.25 | ...30-231,233-234 
  ignore.ts        |     100 |      100 |     100 |     100 |                   
  result-cache.ts  |     100 |    91.66 |     100 |     100 | 46                
-------------------|---------|----------|---------|---------|-------------------

For detailed HTML reports, please see the 'coverage-reports-24.x-ubuntu-latest' artifact from the main CI run.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/a2a-server/src/agent/task-support.ts`:
- Around line 693-716: The applyReplacement function should accept an optional
expectedReplacements: number = 1 and only perform a single replacement when
expectedReplacements === 1 (to match the behavior in
packages/core/src/tools/edit.ts); update the signature of
applyReplacement(currentContent, oldString, newString, isNewFile,
expectedReplacements = 1) and implement conditional logic: if isNewFile return
newString, if currentContent is null handle defensively as today, if oldString
is empty return currentContent, then if expectedReplacements === 1 call
currentContent.replace(oldString, newString), if expectedReplacements > 1
perform up-to-N replacements (e.g., loop using indexOf/substring to replace at
most expectedReplacements occurrences), and if you want full replace-all when
expectedReplacements is infinite or a sentinel use replaceAll; keep the unique
function name applyReplacement to locate the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 050000ed-e160-42bd-9ff3-b01f342acc1c

📥 Commits

Reviewing files that changed from the base of the PR and between 750133b and 002aee8.

📒 Files selected for processing (1)
  • packages/a2a-server/src/agent/task-support.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 270000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: E2E Test (macOS)
  • GitHub Check: E2E Test (Linux) - sandbox:docker
  • GitHub Check: E2E Test (Linux) - sandbox:none
  • GitHub Check: CodeQL
  • GitHub Check: Lint (Javascript)
  • GitHub Check: Run LLxprt review
🧰 Additional context used
🧠 Learnings (32)
📓 Common learnings
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1767
File: packages/cli/src/ui/components/shared/golden-snapshot.test.ts:64-65
Timestamp: 2026-03-24T21:07:40.805Z
Learning: In `packages/cli/src/ui/components/shared/golden-snapshot.test.ts` (vybestack/llxprt-code PR `#1767`), `parseAction` uses `actionStr.split(':')` to parse action corpus entries. The action corpus (`project-plans/issue1577/action-corpus.json`) has been confirmed to contain zero multi-colon action strings, so the current two-element destructuring is correct for all existing entries. Do not flag this as a truncation bug in future reviews — the corpus format is validated and the parsing matches it.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1870
File: packages/cli/src/config/postConfigRuntime.ts:248-252
Timestamp: 2026-04-02T11:09:58.796Z
Learning: In vybestack/llxprt-code, packages/cli/src/config/postConfigRuntime.ts reapplyCliOverrides() intentionally uses truthiness checks for bootstrapArgs.keyOverride/keyfileOverride/baseurlOverride to preserve pre-existing behavior; empty-string clears are not re-applied in this step. Do not flag this in lint-only/refactor PRs; propose a dedicated follow-up if behavior should change to presence-based checks.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1771
File: packages/core/src/core/AgentHookManager.ts:78-96
Timestamp: 2026-03-25T19:21:43.266Z
Learning: In `packages/core/src/core/AgentHookManager.ts` (vybestack/llxprt-code PR `#1771`), `cleanupOldHookState(newPromptId, oldPromptId)` is always called at the start of a new prompt turn (when `prompt_id` changes), after the previous prompt's stream has been fully consumed by `MessageStreamOrchestrator`. Because JS is single-threaded, there is no concurrent execution path where an in-flight `fireAfterAgentHookSafe` for the old `prompt_id` could race with the cleanup. Do not flag this pattern as a race condition in future reviews — the sequential flow guarantees: previous prompt finishes → new prompt starts → cleanup runs → fresh hook state created.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:198-208
Timestamp: 2026-03-26T03:04:09.288Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`), `applyToolWhitelistToEphemerals` treats an explicit empty `ephemerals['tools.allowed']` array as "no restriction" (falling back to `normalizedWhitelist`) because it checks `existingAllowed.length > 0` rather than `Array.isArray(ephemerals['tools.allowed'])`. This is pre-existing behavior faithfully preserved from the original `subagent.ts` (~line 370). Do not flag the empty-allowlist pass-through as a bug in decomposition or refactoring PRs — any fix to distinguish "absent" from "explicitly empty" would be a behavioral change requiring a dedicated follow-up PR.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1767
File: packages/cli/src/ui/components/shared/buffer-operations.ts:177-186
Timestamp: 2026-03-24T21:07:36.335Z
Learning: In `packages/cli/src/ui/components/shared/buffer-operations.ts` (vybestack/llxprt-code PR `#1767`), the missing blank line between `getLineRangeOffsets` and `pushUndo` is intentional pre-existing style moved verbatim from `text-buffer.ts`. Do not flag missing blank-line separators between function boundaries in this file during decomposition/refactoring PRs.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagent.ts:552-597
Timestamp: 2026-03-26T02:05:48.262Z
Learning: In `packages/core/src/core/subagent.ts` (vybestack/llxprt-code), `processNonInteractiveText` intentionally calls `this.ctx.onMessage(filtered.displayText)` with the raw `textResponse` *before* `parseTextToolCalls` strips tool-call syntax into `cleanedText`. This ordering is pre-existing behavior faithfully preserved from the original `runNonInteractive` implementation. Do not flag the early `onMessage` emission (before tool-call stripping) as a bug in decomposition or refactoring PRs — any change to emit only `cleanedText` would be a behavioral improvement, not a structural fix, and should be tracked as a dedicated follow-up issue.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1780
File: packages/cli/src/ui/hooks/geminiStream/streamUtils.ts:100-116
Timestamp: 2026-03-26T02:22:19.732Z
Learning: In `packages/cli/src/ui/hooks/geminiStream/streamUtils.ts` (vybestack/llxprt-code PR `#1780`), the `filteredPendingTools` predicate in `mergePendingToolGroupsForDisplay` only removes overlapping shell entries from the scheduler side, leaving overlapping non-shell tool callIds potentially duplicated. This is pre-existing behavior faithfully extracted verbatim from the original `useGeminiStream.ts` (lines 100-140). Do not flag this as a dedup bug in decomposition or refactoring PRs — any improvement to deduplicate non-shell overlapping callIds would be a separate enhancement, not a structural fix.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1768
File: packages/cli/src/ui/hooks/useCoreEventHandlers.ts:71-81
Timestamp: 2026-03-25T18:17:57.109Z
Learning: In `packages/cli/src/ui/hooks/useCoreEventHandlers.ts` (vybestack/llxprt-code PR `#1768`), the `useEffect` for `ConsolePatcher` intentionally registers cleanup via BOTH `registerCleanup(consolePatcher.cleanup)` (process-level teardown) AND `return () => consolePatcher.cleanup()` (React unmount lifecycle). This dual registration is deliberate: process-level cleanup persists beyond React unmount, and the React return handles component lifecycle. `consolePatcher.cleanup` is idempotent, so double execution is safe. Do not flag this as redundant double cleanup in future reviews.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:198-208
Timestamp: 2026-03-26T03:06:11.693Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`), `applyToolWhitelistToEphemerals` treats an explicit empty `ephemerals['tools.allowed']` array as "no restriction" (falling back to `normalizedWhitelist`) because it checks `existingAllowed.length > 0` rather than `Array.isArray(ephemerals['tools.allowed'])`. This is pre-existing behavior faithfully preserved from the original `subagent.ts` `createToolExecutionConfig` function (lines 322–331 on main, ~line 370 of the monolith). Do not flag the empty-allowlist pass-through as a bug in decomposition or refactoring PRs — any fix to distinguish "absent" from "explicitly empty" would be a behavioral change requiring a dedicated follow-up PR.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1785
File: packages/cli/src/config/__tests__/approvalModeParity.test.ts:351-393
Timestamp: 2026-03-27T01:00:29.058Z
Learning: In `packages/cli/src/config/__tests__/approvalModeParity.test.ts` (vybestack/llxprt-code PR `#1785`), the test suite is intentionally scoped to verifying that the extracted approval-mode resolution logic in `approvalModeResolver.ts` produces identical results to the original inline logic. Adding new combination scenarios (e.g., admin-disabled YOLO combined with an untrusted folder) is considered scope expansion beyond parity coverage. The ordering of admin checks before trust-fallback checks is preserved from the original code. Do not flag missing cross-branch combination tests in this file as a gap in refactoring PRs.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:168-172
Timestamp: 2026-03-26T03:04:10.186Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`, decomposed from `subagent.ts`), `createToolExecutionConfig` hardcodes `getExcludeTools: () => []`, and `createSchedulerConfig` preferentially delegates to that empty implementation over `foregroundConfig.getExcludeTools()`. This faithfully preserves the original `subagent.ts` behavior (line 344: `getExcludeTools: () => []`) and the `createSchedulerConfig()` fallback pattern (lines 1518–1521). Do not flag the empty `getExcludeTools` or the resulting masking of parent excluded tools as a regression introduced by decomposition PRs — any fix to forward `foregroundConfig.getExcludeTools()` or merge `snapshot.tools.disabled` into the returned list would be a behavioral change requiring a dedicated follow-up PR.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1785
File: packages/cli/src/config/__tests__/parseArgumentsParity.test.ts:7-16
Timestamp: 2026-03-27T00:46:42.630Z
Learning: In `packages/cli/src/config/__tests__/parseArgumentsParity.test.ts` (vybestack/llxprt-code PR `#1785`), the test suite is intentionally scoped to verifying that the extracted `parseArguments` function produces identical output to the original inline parsing. It deliberately does NOT cover subcommand exit behavior (mcp, hooks, extensions) via `handleSubcommandExit()` — that function is a direct mechanical extraction and adding integration tests for it would be new coverage beyond the refactoring scope. Do not flag the absence of subcommand-exit test cases as a gap in this file or in refactoring PRs that extract it.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1260
File: packages/core/src/tools/task.ts:645-894
Timestamp: 2026-02-11T15:12:48.092Z
Learning: In packages/core/src/tools/task.ts, async tasks intentionally pass `undefined` (not the foreground signal) to orchestrator.launch() so background tasks run independently of foreground agent lifecycle (Ctrl+C, turn completion). They use their own asyncAbortController for manual cancellation via /task end and setTimeout for timeout handling. This is documented at lines 748-754 and was fixed in commit c00f12740.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1785
File: packages/cli/src/config/__tests__/parseArgumentsParity.test.ts:7-16
Timestamp: 2026-03-27T00:46:42.685Z
Learning: In `packages/cli/src/config/__tests__/parseArgumentsParity.test.ts` (vybestack/llxprt-code PR `#1785`), the test suite intentionally does NOT cover subcommand exit behavior (`mcp`, `hooks`, `extensions` via `handleSubcommandExit()`). The suite's scope is limited to verifying that the extracted `parseArguments` function produces identical results to the original inline parsing. `handleSubcommandExit()` is a direct mechanical extraction and adding integration tests for it would be new coverage beyond the refactor's scope. Do not flag missing subcommand-exit test cases in this file as a gap in future reviews.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1775
File: packages/core/src/scheduler/tool-executor.ts:99-112
Timestamp: 2026-03-25T22:22:12.030Z
Learning: In `packages/core/src/scheduler/tool-executor.ts` (vybestack/llxprt-code), `applyAfterHookModifications` uses `const appendText = systemMessage || additionalContext || ''` — this is intentional pre-existing behavior from the original code on main. When both `systemMessage` and `getAdditionalContext()` are present, `systemMessage` wins via short-circuit OR and `additionalContext` is silently dropped. This is not a bug introduced by any extraction/decomposition PR; any fix would be a behavioral change requiring a dedicated PR. Do not flag this as a bug in decomposition reviews.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentToolExecution.ts:279-339
Timestamp: 2026-03-26T02:06:14.142Z
Learning: In `packages/core/src/core/subagentToolExecution.ts` (vybestack/llxprt-code PR `#1779`), `executeToolCalls` is exclusively for the non-interactive path and intentionally checks only `toolResponse.error` and `toolResponse.errorType` (via `isFatalToolError()`), never `CompletedToolCall.status`. This faithfully preserves the original `processFunctionCalls` method (pre-refactor subagent.ts ~line 1380). `CompletedToolCall.status` is only relevant in the interactive path, handled by `buildPartsFromCompletedCalls`. Do not flag the absence of `status` propagation in `executeToolCalls` as a regression — the two paths are intentionally separate.
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1741
File: packages/core/src/config/configBase.ts:217-230
Timestamp: 2026-03-24T23:37:09.309Z
Learning: In `packages/core/src/config/configBase.ts` (vybestack/llxprt-code PR `#1741`, decomposed from the original `config.ts`), the `setEphemeralSetting` hot-update path for the `'task-max-async'` key maps `undefined`, `null`, or unparseable string values to `0` (via `isNaN(parsed) ? 0 : parsed` and the `else { normalizedValue = 0 }` branch) before calling `asyncTaskManager.setMaxAsyncTasks(normalizedValue)`. This is pre-existing behavior faithfully moved verbatim from the original `packages/core/src/config/config.ts` on `main`. Do not flag the 0-fallback as a regression or decomposition bug in this or future PRs — any fix to restore the default of `5` instead of `0` would be a behavioral change and should be addressed in a dedicated issue/PR.
📚 Learning: 2026-03-26T02:05:51.733Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentChatSetup.ts:88-120
Timestamp: 2026-03-26T02:05:51.733Z
Learning: In `packages/core/src/core/subagentChatSetup.ts` (vybestack/llxprt-code PR `#1779`, decomposed from `subagent.ts`), the tool name normalization inconsistency between `validateToolsAgainstRuntime()` (which normalizes via `moduleNormalizeToolName` for the allowlist check but uses the raw name for `toolRegistry.getTool`) and `buildRuntimeFunctionDeclarations` (which calls `getToolMetadata(entry)` with the raw name) is pre-existing behavior faithfully moved from the original `subagent.ts`. Do not flag this inconsistency as a bug introduced by decomposition PRs — any fix to canonicalize tool names before both validation and declaration lookup should be addressed in a dedicated follow-up PR.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T02:06:14.142Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentToolExecution.ts:279-339
Timestamp: 2026-03-26T02:06:14.142Z
Learning: In `packages/core/src/core/subagentToolExecution.ts` (vybestack/llxprt-code PR `#1779`), `executeToolCalls` is exclusively for the non-interactive path and intentionally checks only `toolResponse.error` and `toolResponse.errorType` (via `isFatalToolError()`), never `CompletedToolCall.status`. This faithfully preserves the original `processFunctionCalls` method (pre-refactor subagent.ts ~line 1380). `CompletedToolCall.status` is only relevant in the interactive path, handled by `buildPartsFromCompletedCalls`. Do not flag the absence of `status` propagation in `executeToolCalls` as a regression — the two paths are intentionally separate.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-04-12T05:38:22.797Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1899
File: packages/core/src/core/subagent.test.ts:2923-2925
Timestamp: 2026-04-12T05:38:22.797Z
Learning: In `packages/core/src/core/subagent.test.ts` (vybestack/llxprt-code), `MessageBus` is used as a type annotation (e.g., `const mockMessageBus = {} as MessageBus`) without a direct import. This is valid because `ToolRegistry` (imported from `../tools/tool-registry.js`) transitively re-exports `MessageBus` types, so TypeScript resolves the name without an explicit import. `tsc --noEmit` passes clean. Do not flag the missing `MessageBus` import in this file as a compile error in future reviews.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T03:04:10.186Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:168-172
Timestamp: 2026-03-26T03:04:10.186Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`, decomposed from `subagent.ts`), `createToolExecutionConfig` hardcodes `getExcludeTools: () => []`, and `createSchedulerConfig` preferentially delegates to that empty implementation over `foregroundConfig.getExcludeTools()`. This faithfully preserves the original `subagent.ts` behavior (line 344: `getExcludeTools: () => []`) and the `createSchedulerConfig()` fallback pattern (lines 1518–1521). Do not flag the empty `getExcludeTools` or the resulting masking of parent excluded tools as a regression introduced by decomposition PRs — any fix to forward `foregroundConfig.getExcludeTools()` or merge `snapshot.tools.disabled` into the returned list would be a behavioral change requiring a dedicated follow-up PR.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T02:22:19.732Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1780
File: packages/cli/src/ui/hooks/geminiStream/streamUtils.ts:100-116
Timestamp: 2026-03-26T02:22:19.732Z
Learning: In `packages/cli/src/ui/hooks/geminiStream/streamUtils.ts` (vybestack/llxprt-code PR `#1780`), the `filteredPendingTools` predicate in `mergePendingToolGroupsForDisplay` only removes overlapping shell entries from the scheduler side, leaving overlapping non-shell tool callIds potentially duplicated. This is pre-existing behavior faithfully extracted verbatim from the original `useGeminiStream.ts` (lines 100-140). Do not flag this as a dedup bug in decomposition or refactoring PRs — any improvement to deduplicate non-shell overlapping callIds would be a separate enhancement, not a structural fix.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T23:28:47.345Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:172-175
Timestamp: 2026-03-26T23:28:47.345Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`, decomposed from `subagent.ts`), `createToolExecutionConfig` passes only `messageBus` (and not `toolRegistry`) into the dependency bag forwarded to `foregroundConfig.getOrCreateScheduler()`. This faithfully preserves the original `subagent.ts` behavior (lines 349–352 on main), where the scheduler creation similarly did not forward the runtime-scoped tool registry, allowing `Config.getOrCreateScheduler()` to fall back to `this.getToolRegistry()`. Do not flag the missing `toolRegistry` forwarding in `createToolExecutionConfig` as a regression introduced by decomposition PRs — any fix to inject the runtime-scoped registry would be a behavioral change requiring a dedicated follow-up PR with its own behavioral tests.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-02-11T15:12:48.092Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1260
File: packages/core/src/tools/task.ts:645-894
Timestamp: 2026-02-11T15:12:48.092Z
Learning: In packages/core/src/tools/task.ts, async tasks intentionally pass `undefined` (not the foreground signal) to orchestrator.launch() so background tasks run independently of foreground agent lifecycle (Ctrl+C, turn completion). They use their own asyncAbortController for manual cancellation via /task end and setTimeout for timeout handling. This is documented at lines 748-754 and was fixed in commit c00f12740.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T02:05:48.262Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagent.ts:552-597
Timestamp: 2026-03-26T02:05:48.262Z
Learning: In `packages/core/src/core/subagent.ts` (vybestack/llxprt-code), `processNonInteractiveText` intentionally calls `this.ctx.onMessage(filtered.displayText)` with the raw `textResponse` *before* `parseTextToolCalls` strips tool-call syntax into `cleanedText`. This ordering is pre-existing behavior faithfully preserved from the original `runNonInteractive` implementation. Do not flag the early `onMessage` emission (before tool-call stripping) as a bug in decomposition or refactoring PRs — any change to emit only `cleanedText` would be a behavioral improvement, not a structural fix, and should be tracked as a dedicated follow-up issue.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-25T22:22:12.030Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1775
File: packages/core/src/scheduler/tool-executor.ts:99-112
Timestamp: 2026-03-25T22:22:12.030Z
Learning: In `packages/core/src/scheduler/tool-executor.ts` (vybestack/llxprt-code), `applyAfterHookModifications` uses `const appendText = systemMessage || additionalContext || ''` — this is intentional pre-existing behavior from the original code on main. When both `systemMessage` and `getAdditionalContext()` are present, `systemMessage` wins via short-circuit OR and `additionalContext` is silently dropped. This is not a bug introduced by any extraction/decomposition PR; any fix would be a behavioral change requiring a dedicated PR. Do not flag this as a bug in decomposition reviews.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T02:06:03.086Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentChatSetup.ts:339-453
Timestamp: 2026-03-26T02:06:03.086Z
Learning: In `packages/core/src/core/subagentChatSetup.ts` (vybestack/llxprt-code PR `#1779`, decomposed from `subagent.ts`), the `assembleChatSession` function's `try/catch` block wraps only `new GeminiChat(...)` and not the preceding `await ctx.environmentContextLoader(...)` or `await getCoreSystemPromptAsync(...)` calls. This partial error boundary is pre-existing behavior faithfully preserved from the original `createChatObject` method in `subagent.ts`. Do not flag the missing async-await coverage as a decomposition regression in future reviews — it is an acknowledged pre-existing limitation, and any fix would be a behavioral change requiring a dedicated follow-up PR.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-25T23:07:18.966Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1775
File: packages/core/src/scheduler/confirmation-coordinator.test.ts:593-645
Timestamp: 2026-03-25T23:07:18.966Z
Learning: In `packages/core/src/scheduler/confirmation-coordinator.ts` (vybestack/llxprt-code), `_applyInlineModify` short-circuits early when `confirmationDetails.type !== 'edit'` (around line 677). `setArgs` is only called for edit-type tools that implement `isModifiableDeclarativeTool`. The test "inline modify with newContent payload → updates args, schedules" in `confirmation-coordinator.test.ts` intentionally uses an exec-type confirmation and does NOT assert `setArgs` — that would be wrong. The edit-type inline modify path (which does call `setArgs`) is covered by integration tests in `coreToolScheduler.interactiveMode.test.ts`. Do not flag the absence of a `setArgs` assertion in this test as a bug.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-27T01:00:28.649Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1785
File: packages/cli/src/config/__tests__/toolGovernanceParity.test.ts:458-472
Timestamp: 2026-03-27T01:00:28.649Z
Learning: In `packages/cli/src/config/__tests__/toolGovernanceParity.test.ts` (vybestack/llxprt-code PR `#1785`), the "non-interactive DEFAULT with explicit --allowed-tools" and corresponding YOLO test cases intentionally use `read_file` (a tool already in `READ_ONLY_TOOL_NAMES`) as the explicit `--allowed-tools` value. The tests are scoped to verifying that existing allowlist behavior is preserved through the refactor, not to proving union/exclusion semantics with non-read-only tools. Do not flag the choice of `read_file` as insufficient for proving merging behavior in parity or refactoring PRs — improving assertion specificity is new test design work beyond the refactoring scope.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-25T22:20:06.968Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1775
File: packages/core/src/scheduler/confirmation-coordinator.ts:574-592
Timestamp: 2026-03-25T22:20:06.968Z
Learning: In `packages/core/src/scheduler/confirmation-coordinator.ts` (vybestack/llxprt-code PR `#1775`), `handleModifyWithEditor` builds policy context via `getPolicyContextFromInvocation(waitingToolCall.invocation, waitingToolCall.request)` after `this.statusMutator.setArgs(callId, updatedParams)`, using the pre-mutation snapshot. This is intentional — it faithfully preserves the original `main` behavior (coreToolScheduler.ts ~line 1076-1078). Additionally, `getPolicyContextFromInvocation` uses `invocation.getPolicyContext()` for `BaseToolInvocation` instances (extracts `toolName`/`serverName`, not `args`), so the stale `request.args` only affects the fallback path. Do not flag this as a stale-snapshot bug in future reviews.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T03:06:11.693Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:198-208
Timestamp: 2026-03-26T03:06:11.693Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`), `applyToolWhitelistToEphemerals` treats an explicit empty `ephemerals['tools.allowed']` array as "no restriction" (falling back to `normalizedWhitelist`) because it checks `existingAllowed.length > 0` rather than `Array.isArray(ephemerals['tools.allowed'])`. This is pre-existing behavior faithfully preserved from the original `subagent.ts` `createToolExecutionConfig` function (lines 322–331 on main, ~line 370 of the monolith). Do not flag the empty-allowlist pass-through as a bug in decomposition or refactoring PRs — any fix to distinguish "absent" from "explicitly empty" would be a behavioral change requiring a dedicated follow-up PR.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T03:04:09.288Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:198-208
Timestamp: 2026-03-26T03:04:09.288Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`), `applyToolWhitelistToEphemerals` treats an explicit empty `ephemerals['tools.allowed']` array as "no restriction" (falling back to `normalizedWhitelist`) because it checks `existingAllowed.length > 0` rather than `Array.isArray(ephemerals['tools.allowed'])`. This is pre-existing behavior faithfully preserved from the original `subagent.ts` (~line 370). Do not flag the empty-allowlist pass-through as a bug in decomposition or refactoring PRs — any fix to distinguish "absent" from "explicitly empty" would be a behavioral change requiring a dedicated follow-up PR.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T20:52:08.720Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1780
File: packages/cli/src/ui/hooks/geminiStream/useStreamEventHandlers.ts:140-149
Timestamp: 2026-03-26T20:52:08.720Z
Learning: In `packages/cli/src/ui/hooks/geminiStream/useStreamEventHandlers.ts` (vybestack/llxprt-code PR `#1780`), the `applyThoughtToState` function's `setPendingHistoryItem` updater casts `item?.type as 'gemini' | 'gemini_content'` and uses `item?.text || ''` — this is intentional pre-existing behavior faithfully extracted verbatim from the original `useGeminiStream.ts` (lines 1110–1111 on main). The risk that a `tool_group` pending item type could be preserved is a known pre-existing pattern; fixing it requires careful testing of all thinking block rendering paths and is a behavioral change beyond decomposition scope. Do not flag this type cast as a bug in decomposition or refactoring PRs.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-25T22:20:10.399Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1775
File: packages/core/src/scheduler/confirmation-coordinator.ts:311-326
Timestamp: 2026-03-25T22:20:10.399Z
Learning: In `packages/core/src/scheduler/confirmation-coordinator.ts` (vybestack/llxprt-code PR `#1775`), the MessageBus response handler intentionally passes `waitingToolCall.confirmationDetails.onConfirm` (the already-wrapped callback) to `handleConfirmationResponse`. This is identical to the original `coreToolScheduler.ts` on main (line ~359-366). The `processedConfirmations` set prevents double-invocation as the deduplication guard. Do not flag this wrapping pattern as a bug — it is correct pre-existing behavior preserved by the decomposition.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T02:06:06.881Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentToolExecution.ts:145-209
Timestamp: 2026-03-26T02:06:06.881Z
Learning: In `packages/core/src/core/subagentToolExecution.ts` (vybestack/llxprt-code PR `#1779`), `handleEmitValueCall` uses a truthiness guard (`if (variableName && variableValue)`) to validate both `emit_variable_name` and `emit_variable_value` before accepting the call. This conflicts with the `getScopeLocalFuncDefs` schema, which declares `emit_variable_value` as a required `string` (allowing `""`), meaning an empty-string value is schema-valid but rejected at runtime. This inconsistency is pre-existing behavior faithfully preserved from the original `handleEmitValueCall` implementation in the monolithic `subagent.ts`. Do not flag this as a regression introduced by the decomposition PR — a dedicated follow-up issue should address it.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T23:28:48.119Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1779
File: packages/core/src/core/subagentRuntimeSetup.ts:310-337
Timestamp: 2026-03-26T23:28:48.119Z
Learning: In `packages/core/src/core/subagentRuntimeSetup.ts` (vybestack/llxprt-code PR `#1779`, decomposed from `subagent.ts`), `buildChatSystemPrompt` returns `''` early when `promptConfig.systemPrompt` is absent, silently dropping `outputConfig` (including `self_emitvalue` instructions and the terminal "stop calling tools" rule) on the `initialMessages` path. This is pre-existing behavior faithfully preserved from the original `subagent.ts` (L2090-2095 and L1866 on main). A comment in the original code notes: "createChatObject normally guards this path; this branch keeps the prompt builder defensive." Do not flag this early-return or the `initialMessages + outputConfig` silent-drop as a regression in decomposition or refactoring PRs — any fix would be a behavioral change requiring a dedicated follow-up PR with its own tests.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-02-16T16:11:14.944Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1434
File: packages/core/src/tools/delete_line_range.ts:204-254
Timestamp: 2026-02-16T16:11:14.944Z
Learning: In packages/core/src/tools (ast-edit.ts, delete_line_range.ts, insert_at_line.ts, edit.ts, write-file.ts, apply-patch.ts), the LSP diagnostics collection logic (~50 lines for checkFile, filter by includeSeverities, limit per maxDiagnosticsPerFile, format with <diagnostics> tags) is intentionally duplicated across six files. A follow-up issue has been suggested to extract this into a shared helper function (e.g., collectLspDiagnosticsBlock) that would add Promise.race timeout handling and fix the hardcoded "LSP errors" label to reflect actual severities.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-25T19:21:43.266Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1771
File: packages/core/src/core/AgentHookManager.ts:78-96
Timestamp: 2026-03-25T19:21:43.266Z
Learning: In `packages/core/src/core/AgentHookManager.ts` (vybestack/llxprt-code PR `#1771`), `cleanupOldHookState(newPromptId, oldPromptId)` is always called at the start of a new prompt turn (when `prompt_id` changes), after the previous prompt's stream has been fully consumed by `MessageStreamOrchestrator`. Because JS is single-threaded, there is no concurrent execution path where an in-flight `fireAfterAgentHookSafe` for the old `prompt_id` could race with the cleanup. Do not flag this pattern as a race condition in future reviews — the sequential flow guarantees: previous prompt finishes → new prompt starts → cleanup runs → fresh hook state created.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-24T21:07:36.335Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1767
File: packages/cli/src/ui/components/shared/buffer-operations.ts:177-186
Timestamp: 2026-03-24T21:07:36.335Z
Learning: In `packages/cli/src/ui/components/shared/buffer-operations.ts` (vybestack/llxprt-code PR `#1767`), the missing blank line between `getLineRangeOffsets` and `pushUndo` is intentional pre-existing style moved verbatim from `text-buffer.ts`. Do not flag missing blank-line separators between function boundaries in this file during decomposition/refactoring PRs.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-19T23:27:48.689Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1736
File: packages/core/src/providers/openai/OpenAIStreamProcessor.ts:110-123
Timestamp: 2026-03-19T23:27:48.689Z
Learning: In `packages/core/src/providers/openai/OpenAIStreamProcessor.ts` (extracted from the original `generatePipelineChatCompletionImpl` in `OpenAIProvider.ts`, lines 2050-2160), text-parsed tool calls from `extractKimiToolCallsFromText()` and `deps.textToolParser.parse()` (GemmaToolCallParser) are intentionally yielded directly as `ToolCallBlock[]` without being routed through `deps.toolCallPipeline.addFragment()`. The `toolCallPipeline` is exclusively used for delta-based streaming tool calls coming from the OpenAI API. This two-path design is deliberate — do not flag missing `addFragment()` calls for text-parsed tool calls as a bug.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-19T22:50:26.075Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1736
File: packages/core/src/providers/openai/OpenAIRequestBuilder.ts:194-205
Timestamp: 2026-03-19T22:50:26.075Z
Learning: In `packages/core/src/providers/openai/OpenAIRequestBuilder.ts` (extracted from the original `OpenAIProvider.ts` around line 1051-1067), when building assistant messages in `processAssistantMessage`, the `content` property is intentionally omitted entirely from `baseMessage` when `tool_calls` are present. This is CRITICAL for Mistral API compatibility (issue `#760`): Mistral's OpenAI-compatible API requires that no `content` property is included at all (not even `null`) when `tool_calls` exist on an assistant message. Do not flag this as a bug or suggest adding `content` alongside `tool_calls`.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-19T22:50:00.853Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1736
File: packages/core/src/providers/openai/OpenAIRequestBuilder.test.ts:316-395
Timestamp: 2026-03-19T22:50:00.853Z
Learning: In the llxprt-code codebase (`packages/core/src/providers/openai/OpenAIRequestBuilder.ts`, previously `OpenAIProvider.ts` around line 1250), `validateToolMessageSequence` intentionally does NOT deduplicate tool messages by `tool_call_id`. Contiguous tool messages sharing the same `tool_call_id` are legitimate in conversation history (e.g., replay artifacts or adapter-level splitting across message boundaries). The function only removes *orphaned* tool messages (those whose `tool_call_id` does not match any declared tool call in the preceding assistant message). Eager deduplication of same-id tool messages has historically caused strict-provider HTTP 400 errors and must not be introduced.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T20:01:50.052Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1780
File: packages/cli/src/ui/hooks/geminiStream/checkpointPersistence.ts:0-0
Timestamp: 2026-03-26T20:01:50.052Z
Learning: In `packages/cli/src/ui/hooks/geminiStream/checkpointPersistence.ts` (vybestack/llxprt-code PR `#1780`), `saveRestorableToolCalls` reserves the `callId` in `checkpointedCallIds` *before* calling `await createToolCheckpoint(...)` to prevent concurrent duplicate attempts. On failure (exception or false/no-write return), the `callId` is deleted from the set so the next effect run can retry. This reserve-before-await, delete-on-failure pattern was introduced in commit a41b97759.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-26T02:22:12.153Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1780
File: packages/cli/src/ui/hooks/geminiStream/checkpointPersistence.ts:145-153
Timestamp: 2026-03-26T02:22:12.153Z
Learning: In `packages/cli/src/ui/hooks/geminiStream/checkpointPersistence.ts` (vybestack/llxprt-code PR `#1780`), `saveRestorableToolCalls` intentionally does NOT deduplicate checkpoint writes by `callId`. Each effect re-run may re-checkpoint the same `awaiting_approval` tool call (producing multiple snapshot files/git snapshots). This is pre-existing behavior faithfully extracted verbatim from the original `useGeminiStream.ts`. Adding per-callId deduplication would be a new feature beyond the decomposition scope. Do not flag the absence of a checkpointed-callId Set as a bug in decomposition or refactoring PRs.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-27T01:40:09.382Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1790
File: packages/core/src/core/compression/MiddleOutStrategy.ts:307-325
Timestamp: 2026-03-27T01:40:09.382Z
Learning: In `packages/core/src/core/compression/MiddleOutStrategy.ts` (vybestack/llxprt-code), `IContent` messages with `speaker === 'human'` contain only `TextBlock` types by definition in the conversation model. Tool call and tool response blocks appear exclusively on `speaker === 'ai'` and `speaker === 'tool'` messages. Therefore, `extractTextFromMessage` (which filters for `TextBlock`) captures the full content of any human message, and calling `estimateTokens` on its output is a complete token estimate for human messages. Do not flag token estimation for human messages as incomplete due to missing non-text block handling.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-31T15:03:03.633Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 0
File: :0-0
Timestamp: 2026-03-31T15:03:03.633Z
Learning: In vybestack/llxprt-code, `buildContinuationMessages` in `packages/core/src/providers/openai/OpenAIRequestBuilder.ts` (line 524) always appends `{ role: 'assistant', tool_calls: toolCalls }` to the history. Passing an empty `[]` array produces an invalid assistant message with `tool_calls: []` that most OpenAI-compatible APIs reject with HTTP 400. Do NOT call `requestContinuationAfterToolCalls` with an empty tool calls array for thinking-only continuation — a separate `requestContinuationAfterThinking` method is needed.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-02-06T15:52:42.315Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1305
File: scripts/generate-keybindings-doc.ts:1-5
Timestamp: 2026-02-06T15:52:42.315Z
Learning: In reviews of vybestack/llxprt-code, do not suggest changing existing copyright headers from 'Google LLC' to 'Vybestack LLC' for files that originated from upstream. Preserve upstream copyrights in files that came from upstream, and only apply 'Vybestack LLC' copyright on newly created, original LLxprt files. If a file is clearly LLxprt-original, it may carry the Vybestack header; if it is upstream-originated, keep the original sponsor header.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
📚 Learning: 2026-03-31T02:12:43.093Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1854
File: packages/core/src/core/subagentRuntimeSetup.test.ts:77-84
Timestamp: 2026-03-31T02:12:43.093Z
Learning: In this codebase, tool declarations should follow the single required contract `parametersJsonSchema`; do not ask to preserve or reintroduce the legacy `parameters` fallback field. Reviewers should not flag assertions/checks for missing `parameters` or suggest backward-compatibility behavior for `parameters`. Schema converters/providers are expected to error if `parametersJsonSchema` is absent instead of falling back to `parameters`.

Applied to files:

  • packages/a2a-server/src/agent/task-support.ts
🔇 Additional comments (11)
packages/a2a-server/src/agent/task-support.ts (11)

12-42: LGTM!

Imports are well-organized with clear separation between external packages and internal modules. The AnsiOutput type is now properly imported at the top alongside other types from @vybestack/llxprt-code-core.


44-64: LGTM!

The UnionKeys type utility correctly distributes over union types to extract all possible keys. The pickFields function properly guards with field in from before assignment, making it safe for union types where not all keys exist on all variants.


66-115: LGTM!

Clean extraction of serializable ToolCall properties using pickFields, avoiding circular reference issues. The message structure properly conforms to the A2A SDK Message type.


117-233: LGTM!

Good use of ReadonlySet for immutable event type classification at module level. The type guard isInformationalAgentEvent correctly narrows the event type, and logInformationalEvent provides clean dispatch with appropriate log levels per event category.


235-291: LGTM!

Clean helper functions for confirmation handling. The type guard isInteractiveConfirmationDetails correctly uses the presence of onConfirm to discriminate between interactive and serializable confirmation details. The outcome string mapping covers all expected values with a safe undefined return for unknown outcomes.


293-361: LGTM!

The extracted interfaces clearly document the dependencies needed by each handler, avoiding tight coupling to the Task class. Error handling correctly extracts messages from Error instances and publishes appropriate status updates.


492-613: LGTM!

Stream event handlers follow a consistent pattern: log the event, cancel pending tools, and publish a state update. The distinction between handlers that transition to 'input-required' (timeout, user cancelled) vs. those that preserve current state (invalid stream, error) is appropriate for their semantics.


615-650: LGTM!

Clean normalization logic that provides DEFAULT_AGENT_ID fallback and computes newContent for 'replace' tool calls. The function correctly creates new objects rather than mutating the input.


652-691: LGTM!

Good use of atomic write pattern (temp file + rename) for crash safety. The graceful degradation on write failures—logging warnings rather than throwing—is appropriate since checkpoints are an optimization, not a requirement.


718-771: LGTM!

Clean utility functions for ANSI output conversion and message creation. The convertAnsiOutputToString correctly handles both string and structured AnsiOutput formats. Message factories properly construct A2A SDK-compliant Message objects with unique IDs.


423-467: No action needed—the GCP environment variable manipulation pattern (GOOGLE_CLOUD_PROJECT, GOOGLE_APPLICATION_CREDENTIALS save/delete/restore) is pre-existing behavior faithfully preserved from the original task.ts and is acceptable for this decomposition PR.

Comment on lines +693 to +716
/**
* Applies a string replacement to content.
* Pure helper function used by getProposedContent.
*/
export function applyReplacement(
currentContent: string | null,
oldString: string,
newString: string,
isNewFile: boolean,
): string {
if (isNewFile) {
return newString;
}
if (currentContent === null) {
// Should not happen if not a new file, but defensively return empty or newString if oldString is also empty
return oldString === '' ? newString : '';
}
// If oldString is empty, do not modify the content. At this point isNewFile is always false
// due to the early return, so no need to check it again.
if (oldString === '') {
return currentContent;
}
return currentContent.replaceAll(oldString, newString);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check how the 'replace' tool defines replacement semantics in core

ast-grep --pattern 'replaceAll($_, $_)'
rg -n "replaceAll|\.replace\(" packages/core/src/tools/replace

Repository: vybestack/llxprt-code

Length of output: 136


🏁 Script executed:

#!/bin/bash
# Find files related to the replace tool
fd -i "replace" packages/core --type f | head -20
ls -la packages/core/src/tools/ 2>/dev/null || echo "tools dir not found, checking alternatives"
find packages/core/src -name "*replace*" -type f

Repository: vybestack/llxprt-code

Length of output: 7875


🏁 Script executed:

#!/bin/bash
# Search for replace tool semantics
rg -n "replace.*tool" packages/core/src/tools/ -i | head -20

# Check fuzzy-replacer for clues about replace semantics
head -100 packages/core/src/tools/fuzzy-replacer.ts

# Search for where applyReplacement is called
rg -n "applyReplacement" packages/a2a-server/src/

# Look for replaceAll usage in the entire core tools
rg -n "replaceAll" packages/core/src/tools/

Repository: vybestack/llxprt-code

Length of output: 5517


🏁 Script executed:

#!/bin/bash
# Check how applyReplacement is called in task.ts
sed -n '500,530p' packages/a2a-server/src/agent/task.ts

# Check if expected_replacements is used anywhere
rg -n "expected_replacements" packages/a2a-server/src/

# Look at EditToolParams to understand the expected contract
sed -n '1,100p' packages/core/src/tools/edit.ts | grep -A 50 "interface.*Params\|type.*Params"

Repository: vybestack/llxprt-code

Length of output: 803


🏁 Script executed:

#!/bin/bash
# Search for expected_replacements handling in edit.ts
rg -n "expected_replacements" packages/core/src/tools/edit.ts -A 5 -B 5

# Check the EditToolParams interface
rg -n "interface EditToolParams|type EditToolParams" packages/core/src/tools/edit.ts -A 20

# Check how edit.ts handles single vs multiple replacements
sed -n '120,160p' packages/core/src/tools/edit.ts

Repository: vybestack/llxprt-code

Length of output: 7458


🏁 Script executed:

#!/bin/bash
# Find ALL applyReplacement function definitions
rg -n "export.*function applyReplacement|function applyReplacement" -A 5

# Check if edit.ts imports from a different location
head -50 packages/core/src/tools/edit.ts | grep -i "import.*applyReplacement\|from"

Repository: vybestack/llxprt-code

Length of output: 2900


applyReplacement always replaces all occurrences, not just the first one.

The function uses replaceAll() on line 715, which replaces all matching occurrences of oldString. This behavior differs from the 'replace' tool in packages/core/src/tools/edit.ts, which defaults to replacing only a single occurrence (see line 127: "For single replacement, use replace() instead of replaceAll()") and only replaces all when an expectedReplacements count is explicitly specified.

The task-support.ts implementation is missing the optional expectedReplacements parameter that the edit.ts version supports (see packages/core/src/tools/edit.ts line 75). Without this parameter, the function cannot distinguish between single and multiple replacements. Update the signature to include expectedReplacements: number = 1 and implement the conditional logic to use replace() for single replacements instead of always using replaceAll().

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/a2a-server/src/agent/task-support.ts` around lines 693 - 716, The
applyReplacement function should accept an optional expectedReplacements: number
= 1 and only perform a single replacement when expectedReplacements === 1 (to
match the behavior in packages/core/src/tools/edit.ts); update the signature of
applyReplacement(currentContent, oldString, newString, isNewFile,
expectedReplacements = 1) and implement conditional logic: if isNewFile return
newString, if currentContent is null handle defensively as today, if oldString
is empty return currentContent, then if expectedReplacements === 1 call
currentContent.replace(oldString, newString), if expectedReplacements > 1
perform up-to-N replacements (e.g., loop using indexOf/substring to replace at
most expectedReplacements occurrences), and if you want full replace-all when
expectedReplacements is infinite or a sentinel use replaceAll; keep the unique
function name applyReplacement to locate the change.

Rules disabled with rationale per Issue #1569c plan:
- arrow-function-convention: conflicts with Prettier parens handling
- no-duplicate-string: 3-occurrence threshold is pure noise
- shorthand-property-grouping: pure ordering preference, no correctness value
- elseif-without-else: pure style; conflicts with early-return pattern
- max-union-size: discriminated unions legitimately exceed arbitrary limit
- no-alphabetical-sort: heuristic is false-positive prone on typed arrays
- prefer-regexp-exec: String.match and RegExp.exec are both idiomatic
- function-name: conflicts with TS class/method naming conventions
- prefer-immediate-return: named intermediates improve readability/debuggability
- pseudo-random: CLI context uses Math.random for IDs/jitter, not crypto

Warning count: 30,504 -> 14,092 (-16,412 pure-noise warnings).

Refs #1569
…de (#1569)

Applied via per-package 'npx eslint --fix' with consistent-type-imports
disabled during autofix (type-imports will be handled in a later batch
with proper type-info).

Covers: prefer-optional-chain, prefer-nullish-coalescing, no-unnecessary-
condition, and other purely mechanical rewrites. No behavior changes.

Verified: typecheck clean, build clean.
Tests: all passing except one pre-existing flaky timeout
(subagentRuntimeSetup.test.ts beforeAll hook) that fails on main too.
Smoke: starts fine; API call blocked by env-level credit balance only.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/src/config/toolGovernance.ts`:
- Line 14: The import for GeminiCLIExtension is currently a runtime binding but
it is a type-only export; change the import to a type-only import (use import
type for GeminiCLIExtension) so the compiler/tree-shaker knows it’s not a
runtime value, and confirm the only usage (the type annotation at the location
where GeminiCLIExtension is referenced) remains a type position.

In `@packages/cli/src/ui/utils/MarkdownDisplay.tsx`:
- Around line 264-270: The condition at the else-if in MarkdownDisplay that
checks "line.trim().length === 0 && !inCodeBlock" is redundant because
inCodeBlock is already handled earlier (returns when true); update the else-if
to just check "line.trim().length === 0" so the spacer push logic
(contentBlocks.push(...), lastLineEmpty handling) executes correctly without the
needless inCodeBlock guard; locate this in the MarkdownDisplay component where
lastLineEmpty and contentBlocks are managed and remove the "&& !inCodeBlock"
part.

In `@packages/core/src/tools/__tests__/ast-edit-characterization.test.ts`:
- Line 615: The optional chaining refactor for the guard is correct—leave the
check as confirmationDetails?.onConfirm to preserve prior behavior; no
functional change required. Optionally (future PR) strengthen the test by adding
an explicit assertion that confirmationDetails is truthy and that
confirmationDetails.onConfirm is a function to make the contract explicit.

In `@packages/core/src/tools/grep.ts`:
- Line 172: The abort event listener registration in
signal.addEventListener('abort', onUserAbort) should include the { once: true }
option to match the pattern used elsewhere (e.g., shell.ts) so the listener
auto-removes after firing; update the call to pass the options object ({ once:
true }) when registering onUserAbort to ensure it cannot fire multiple times and
to improve robustness.

In `@packages/core/src/utils/toolOutputLimiter.ts`:
- Around line 257-280: Duplicate token-slicing/truncation logic is present in
two places (the `truncate` branch and the block using `getEncoder()`), so
extract that shared logic into a single helper (e.g., a function referenced by
both branches) that accepts the inputs used here — `encodedContent`, `encoder`
(from `getEncoder()`), `utf8Decoder`, `content`, `targetTokenCount`, and
`originalTokens` — and returns { truncatedContent, truncatedTokenCount } (or
similar). Replace the duplicated code in both the earlier `truncate` branch and
this block with calls to that helper, and keep the final return shape (adding
the truncation marker and `wasTruncated`/`originalTokens`/`message`) unchanged.
- Around line 240-254: The sampler currently pushes the next line into
sampledLines before checking token cost, which can return content that exceeds
effectiveLimit; update the loop in limitOutputTokens (the block using lines,
sampledLines, estimateTokens and effectiveLimit) so you compute the token cost
of sampledLines plus the candidate line first and only push the line if the
estimate remains <= effectiveLimit (otherwise break), ensuring content,
wasTruncated, originalTokens and message still reflect truncation and the
reported limits.maxTokens; also ensure you don't return an empty sampledLines
payload (handle the first-line-too-large case) and keep the final content
assembly logic unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8cab0022-eec9-4487-9d23-39aa3e67cad9

📥 Commits

Reviewing files that changed from the base of the PR and between 002aee8 and 74a8fd1.

📒 Files selected for processing (124)
  • eslint.config.js
  • packages/a2a-server/src/http/app.ts
  • packages/cli/src/auth/__tests__/auth-flow-orchestrator.spec.ts
  • packages/cli/src/auth/__tests__/oauthManager.proactive-renewal.test.ts
  • packages/cli/src/auth/__tests__/proactive-renewal-manager.spec.ts
  • packages/cli/src/auth/__tests__/token-access-coordinator.spec.ts
  • packages/cli/src/auth/oauth-manager.issue1468.spec.ts
  • packages/cli/src/auth/oauth-manager.refresh-race.spec.ts
  • packages/cli/src/auth/oauth-manager.runtime-messagebus.spec.ts
  • packages/cli/src/auth/proactive-renewal-manager.ts
  • packages/cli/src/auth/provider-usage-info.ts
  • packages/cli/src/auth/proxy/credential-store-factory.ts
  • packages/cli/src/auth/token-access-coordinator.ts
  • packages/cli/src/commands/extensions/settings.ts
  • packages/cli/src/config/extensions/github.ts
  • packages/cli/src/config/extensions/settingsIntegration.ts
  • packages/cli/src/config/extensions/settingsStorage.ts
  • packages/cli/src/config/interactiveContext.ts
  • packages/cli/src/config/mcpServerConfig.ts
  • packages/cli/src/config/postConfigRuntime.ts
  • packages/cli/src/config/settings-validation.ts
  • packages/cli/src/config/settings.ts
  • packages/cli/src/config/toolGovernance.ts
  • packages/cli/src/extensions/extensionAutoUpdater.ts
  • packages/cli/src/runtime/runtimeAccessors.ts
  • packages/cli/src/services/todo-continuation/todoContinuationService.ts
  • packages/cli/src/ui/commands/authCommand.ts
  • packages/cli/src/ui/commands/chatCommand.ts
  • packages/cli/src/ui/commands/compressCommand.ts
  • packages/cli/src/ui/commands/hooksCommand.ts
  • packages/cli/src/ui/commands/logoutCommand.ts
  • packages/cli/src/ui/commands/lspCommand.ts
  • packages/cli/src/ui/commands/mouseCommand.ts
  • packages/cli/src/ui/commands/policiesCommand.ts
  • packages/cli/src/ui/commands/subagentCommand.ts
  • packages/cli/src/ui/commands/toolkeyCommand.ts
  • packages/cli/src/ui/commands/toolkeyfileCommand.ts
  • packages/cli/src/ui/components/DebugProfiler.tsx
  • packages/cli/src/ui/components/Help.tsx
  • packages/cli/src/ui/components/InputPrompt.tsx
  • packages/cli/src/ui/components/LoggingDialog.tsx
  • packages/cli/src/ui/components/OAuthCodeDialog.tsx
  • packages/cli/src/ui/components/SettingsDialog.tsx
  • packages/cli/src/ui/components/SubagentManagement/ProfileAttachmentWizard.tsx
  • packages/cli/src/ui/components/ToolsDialog.tsx
  • packages/cli/src/ui/components/shared/MaxSizedBox.tsx
  • packages/cli/src/ui/components/shared/text-buffer.test.ts
  • packages/cli/src/ui/components/shared/word-navigation.ts
  • packages/cli/src/ui/containers/AppContainer/hooks/useAppBootstrap.ts
  • packages/cli/src/ui/containers/AppContainer/hooks/useAppDialogs.ts
  • packages/cli/src/ui/containers/AppContainer/hooks/useAppInput.ts
  • packages/cli/src/ui/containers/AppContainer/hooks/useRecordingInfrastructure.ts
  • packages/cli/src/ui/contexts/KeypressContext.test.tsx
  • packages/cli/src/ui/hooks/atCommandProcessor.ts
  • packages/cli/src/ui/hooks/geminiStream/toolCompletionHandler.ts
  • packages/cli/src/ui/hooks/useExtensionUpdates.ts
  • packages/cli/src/ui/hooks/useTimer.ts
  • packages/cli/src/ui/hooks/useTodoContinuation.ts
  • packages/cli/src/ui/themes/color-utils.ts
  • packages/cli/src/ui/utils/ConsolePatcher.ts
  • packages/cli/src/ui/utils/MarkdownDisplay.tsx
  • packages/cli/src/ui/utils/fuzzyFilter.ts
  • packages/cli/src/ui/utils/mouse.ts
  • packages/cli/src/ui/utils/secureInputHandler.ts
  • packages/cli/src/ui/utils/terminalSetup.ts
  • packages/cli/src/ui/utils/tokenFormatters.ts
  • packages/cli/src/utils/gitUtils.ts
  • packages/cli/src/utils/sandbox.ts
  • packages/cli/src/utils/skillUtils.ts
  • packages/cli/src/utils/stdinSafety.ts
  • packages/cli/src/zed-integration/zedIntegration.ts
  • packages/core/src/auth/precedence.ts
  • packages/core/src/auth/token-store.refresh-race.spec.ts
  • packages/core/src/config/endpoints.ts
  • packages/core/src/config/storage.ts
  • packages/core/src/core/DirectMessageProcessor.ts
  • packages/core/src/core/StreamProcessor.ts
  • packages/core/src/core/client.test.ts
  • packages/core/src/core/prompts.ts
  • packages/core/src/core/subagentRuntimeSetup.ts
  • packages/core/src/hooks/__tests__/hookSemantics.test.ts
  • packages/core/src/hooks/hookRunner.ts
  • packages/core/src/policy/config.ts
  • packages/core/src/prompt-config/prompt-installer.ts
  • packages/core/src/prompt-config/prompt-service.ts
  • packages/core/src/providers/BaseProvider.ts
  • packages/core/src/providers/LoggingProviderWrapper.ts
  • packages/core/src/providers/anthropic/AnthropicMessageNormalizer.ts
  • packages/core/src/providers/kimi/usageInfo.ts
  • packages/core/src/providers/openai/OpenAIProvider.emptyResponseRetry.test.ts
  • packages/core/src/providers/openai/OpenAIRequestBuilder.ts
  • packages/core/src/providers/openai/ToolCallCollector.ts
  • packages/core/src/providers/openai/ToolCallNormalizer.ts
  • packages/core/src/providers/openai/ToolNameValidator.ts
  • packages/core/src/providers/openai/syntheticToolResponses.ts
  • packages/core/src/providers/openai/toolNameUtils.ts
  • packages/core/src/providers/synthetic/usageInfo.ts
  • packages/core/src/providers/zai/usageInfo.ts
  • packages/core/src/services/history/HistoryService.ts
  • packages/core/src/skills/skillLoader.ts
  • packages/core/src/telemetry/uiTelemetry.test.ts
  • packages/core/src/test-utils/providerCallOptions.ts
  • packages/core/src/tools/ToolFormatter.ts
  • packages/core/src/tools/__tests__/ast-edit-characterization.test.ts
  • packages/core/src/tools/apply-patch.ts
  • packages/core/src/tools/edit.test.ts
  • packages/core/src/tools/edit.ts
  • packages/core/src/tools/glob.ts
  • packages/core/src/tools/google-web-search-invocation.ts
  • packages/core/src/tools/grep.ts
  • packages/core/src/tools/lsp-diagnostics-helper.ts
  • packages/core/src/tools/mcp-client.ts
  • packages/core/src/tools/memoryTool.ts
  • packages/core/src/tools/shell.ts
  • packages/core/src/tools/task.ts
  • packages/core/src/tools/write-file.ts
  • packages/core/src/utils/asyncIterator.test.ts
  • packages/core/src/utils/errors.ts
  • packages/core/src/utils/extensionLoader.ts
  • packages/core/src/utils/partUtils.ts
  • packages/core/src/utils/quotaErrorDetection.ts
  • packages/core/src/utils/retry.ts
  • packages/core/src/utils/toolOutputLimiter.ts
  • packages/vscode-ide-companion/src/open-files-manager.ts
💤 Files with no reviewable changes (2)
  • packages/cli/src/ui/components/shared/text-buffer.test.ts
  • packages/core/src/core/client.test.ts

Comment thread packages/cli/src/config/toolGovernance.ts Outdated
Comment on lines +264 to 270
} else if (line.trim().length === 0 && !inCodeBlock) {
if (!lastLineEmpty) {
contentBlocks.push(
<Box key={`spacer-${index}`} height={EMPTY_LINE_HEIGHT} />,
);
lastLineEmpty = true;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Redundant condition check.

The && !inCodeBlock check at line 264 is redundant. Lines 90-115 already handle the inCodeBlock case and return early at line 114, so inCodeBlock is guaranteed to be false by the time execution reaches line 264.

♻️ Simplify the condition
-    } else if (line.trim().length === 0 && !inCodeBlock) {
+    } else if (line.trim().length === 0) {
       if (!lastLineEmpty) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} else if (line.trim().length === 0 && !inCodeBlock) {
if (!lastLineEmpty) {
contentBlocks.push(
<Box key={`spacer-${index}`} height={EMPTY_LINE_HEIGHT} />,
);
lastLineEmpty = true;
}
} else if (line.trim().length === 0) {
if (!lastLineEmpty) {
contentBlocks.push(
<Box key={`spacer-${index}`} height={EMPTY_LINE_HEIGHT} />,
);
lastLineEmpty = true;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/ui/utils/MarkdownDisplay.tsx` around lines 264 - 270, The
condition at the else-if in MarkdownDisplay that checks "line.trim().length ===
0 && !inCodeBlock" is redundant because inCodeBlock is already handled earlier
(returns when true); update the else-if to just check "line.trim().length === 0"
so the spacer push logic (contentBlocks.push(...), lastLineEmpty handling)
executes correctly without the needless inCodeBlock guard; locate this in the
MarkdownDisplay component where lastLineEmpty and contentBlocks are managed and
remove the "&& !inCodeBlock" part.

);

if (confirmationDetails && confirmationDetails.onConfirm) {
if (confirmationDetails?.onConfirm) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

LGTM - Mechanical refactor to optional chaining is correct.

The updated guard confirmationDetails?.onConfirm is semantically identical to the previous confirmationDetails && confirmationDetails.onConfirm pattern and correctly preserves behavior.

💡 Optional test robustness improvement (out of scope for this PR)

The test currently passes silently if confirmationDetails is falsy or lacks onConfirm, without asserting their presence. Consider adding an explicit assertion in a future test improvement PR:

 const confirmationDetails = await invocation.shouldConfirmExecute(
   new AbortController().signal,
 );
 
+expect(confirmationDetails).toBeDefined();
+expect(confirmationDetails?.onConfirm).toBeDefined();
+
 if (confirmationDetails?.onConfirm) {
   await confirmationDetails.onConfirm(
     ToolConfirmationOutcome.ProceedAlways,
   );
   expect(setApprovalModeSpy).toHaveBeenCalledWith(ApprovalMode.AUTO_EDIT);
 }

This would make test failures more explicit if the API contract changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/tools/__tests__/ast-edit-characterization.test.ts` at line
615, The optional chaining refactor for the guard is correct—leave the check as
confirmationDetails?.onConfirm to preserve prior behavior; no functional change
required. Optionally (future PR) strengthen the test by adding an explicit
assertion that confirmationDetails is truthy and that
confirmationDetails.onConfirm is a function to make the contract explicit.

} else {
signal.addEventListener('abort', onUserAbort);
}
signal.addEventListener('abort', onUserAbort);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider adding { once: true } option for consistency and robustness.

The abort listener registration should include the { once: true } option to match the pattern used in shell.ts (line 301). This prevents the listener from firing multiple times if somehow registered more than once, and automatically removes itself after firing.

🔒 Proposed fix to add the `once` option
-    signal.addEventListener('abort', onUserAbort);
+    signal.addEventListener('abort', onUserAbort, { once: true });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
signal.addEventListener('abort', onUserAbort);
signal.addEventListener('abort', onUserAbort, { once: true });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/tools/grep.ts` at line 172, The abort event listener
registration in signal.addEventListener('abort', onUserAbort) should include the
{ once: true } option to match the pattern used elsewhere (e.g., shell.ts) so
the listener auto-removes after firing; update the call to pass the options
object ({ once: true }) when registering onUserAbort to ensure it cannot fire
multiple times and to improve robustness.

Comment on lines +240 to +254
for (let i = 0; i < lines.length; i += step) {
sampledLines.push(lines[i]);
if (estimateTokens(sampledLines.join('\n')) > effectiveLimit) {
break;
}
}

return {
content:
sampledLines.join('\n') +
`\n\n[Sampled ${sampledLines.length} of ${lines.length} lines due to token limit]`,
wasTruncated: true,
originalTokens,
message: `Output sampled to fit within ${limits.maxTokens} token limit`,
};
} else {
// Single line or non-line content, fall back to truncate with escape buffer
const encoder = getEncoder();
const targetTokenCount = Math.max(0, Math.min(effectiveLimit, tokens));

let truncatedContent = '';
let truncatedTokenCount = 0;

if (encodedContent && encoder) {
const truncatedTokens = encodedContent.subarray(0, targetTokenCount);
truncatedContent = utf8Decoder.decode(encoder.decode(truncatedTokens));
truncatedTokenCount = truncatedTokens.length;
} else {
const ratio =
originalTokens > 0
? Math.min(1, targetTokenCount / originalTokens)
: 0;
const approxChars = Math.floor(content.length * ratio);
truncatedContent = content.slice(0, approxChars);
truncatedTokenCount = Math.ceil(truncatedContent.length / 3);
}
return {
content:
sampledLines.join('\n') +
`\n\n[Sampled ${sampledLines.length} of ${lines.length} lines due to token limit]`,
wasTruncated: true,
originalTokens,
message: `Output sampled to fit within ${limits.maxTokens} token limit`,
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Prevent sample mode from returning over-limit content.

Lines 240-243 add the next line before checking effectiveLimit, so this branch can still return a content payload that exceeds the configured cap. That defeats the limiter in the exact case it is supposed to protect.

💡 Proposed fix
-    for (let i = 0; i < lines.length; i += step) {
-      sampledLines.push(lines[i]);
-      if (estimateTokens(sampledLines.join('\n')) > effectiveLimit) {
-        break;
-      }
-    }
-
-    return {
-      content:
-        sampledLines.join('\n') +
-        `\n\n[Sampled ${sampledLines.length} of ${lines.length} lines due to token limit]`,
-      wasTruncated: true,
-      originalTokens,
-      message: `Output sampled to fit within ${limits.maxTokens} token limit`,
-    };
+    for (let i = 0; i < lines.length; i += step) {
+      const candidateLines = [...sampledLines, lines[i]];
+      if (estimateTokens(candidateLines.join('\n')) > effectiveLimit) {
+        break;
+      }
+      sampledLines.push(lines[i]);
+    }
+
+    if (sampledLines.length > 0) {
+      return {
+        content:
+          sampledLines.join('\n') +
+          `\n\n[Sampled ${sampledLines.length} of ${lines.length} lines due to token limit]`,
+        wasTruncated: true,
+        originalTokens,
+        message: `Output sampled to fit within ${limits.maxTokens} token limit`,
+      };
+    }

Based on learnings: packages/core/src/tools/shell.ts applies limitOutputTokens directly to model-facing llmContent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/utils/toolOutputLimiter.ts` around lines 240 - 254, The
sampler currently pushes the next line into sampledLines before checking token
cost, which can return content that exceeds effectiveLimit; update the loop in
limitOutputTokens (the block using lines, sampledLines, estimateTokens and
effectiveLimit) so you compute the token cost of sampledLines plus the candidate
line first and only push the line if the estimate remains <= effectiveLimit
(otherwise break), ensuring content, wasTruncated, originalTokens and message
still reflect truncation and the reported limits.maxTokens; also ensure you
don't return an empty sampledLines payload (handle the first-line-too-large
case) and keep the final content assembly logic unchanged.

Comment on lines +257 to +280
const encoder = getEncoder();
const targetTokenCount = Math.max(0, Math.min(effectiveLimit, tokens));

return {
content: `${truncatedContent}\n\n[Output truncated due to token limit]`,
wasTruncated: true,
originalTokens,
message: `Output truncated from ${originalTokens} to ${truncatedTokenCount} tokens`,
};
}
let truncatedContent = '';
let truncatedTokenCount = 0;

if (encodedContent && encoder) {
const truncatedTokens = encodedContent.subarray(0, targetTokenCount);
truncatedContent = utf8Decoder.decode(encoder.decode(truncatedTokens));
truncatedTokenCount = truncatedTokens.length;
} else {
const ratio =
originalTokens > 0 ? Math.min(1, targetTokenCount / originalTokens) : 0;
const approxChars = Math.floor(content.length * ratio);
truncatedContent = content.slice(0, approxChars);
truncatedTokenCount = Math.ceil(truncatedContent.length / 3);
}

return {
content: `${truncatedContent}\n\n[Output truncated due to token limit]`,
wasTruncated: true,
originalTokens,
message: `Output truncated from ${originalTokens} to ${truncatedTokenCount} tokens`,
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Extract the shared truncation path into a helper.

Lines 257-280 now duplicate the same token-slicing logic already implemented in the truncate branch above. Keeping two copies makes future fixes to markers, decoding, or token accounting easy to miss in one path.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/utils/toolOutputLimiter.ts` around lines 257 - 280,
Duplicate token-slicing/truncation logic is present in two places (the
`truncate` branch and the block using `getEncoder()`), so extract that shared
logic into a single helper (e.g., a function referenced by both branches) that
accepts the inputs used here — `encodedContent`, `encoder` (from
`getEncoder()`), `utf8Decoder`, `content`, `targetTokenCount`, and
`originalTokens` — and returns { truncatedContent, truncatedTokenCount } (or
similar). Replace the duplicated code in both the earlier `truncate` branch and
this block with calls to that helper, and keep the final return shape (adding
the truncation marker and `wasTruncated`/`originalTokens`/`message`) unchanged.

Mechanical sed-driven rewrite: s/.toEqual(/.toStrictEqual(/g across all test
files flagged by vitest/prefer-strict-equal. Eight files were deliberately
skipped and reverted because their tests passed under the loose toEqual but
fail under toStrictEqual (actual value has explicit undefined properties from
spread; expected value omits them). Those files will be handled individually
in a later batch by updating each test expectation.

Warning count: 13,903 -> 11,572 (-2,331, one per rewrite site).
vitest/prefer-strict-equal: 2,468 -> 137 (the 8 reverted files remain).

Reverted (left at toEqual pending per-test fixup):
  packages/core/src/code_assist/converter.test.ts
  packages/core/src/core/turn.test.ts
  packages/core/src/mcp/oauth-utils.test.ts
  packages/core/src/services/environmentSanitization.test.ts
  packages/core/src/auth/proxy/__tests__/proxy-token-store.test.ts
  packages/cli/src/ui/commands/schema/argumentResolver.test.ts
  packages/cli/src/ui/components/messages/ToolResultDisplay.test.tsx
  packages/cli/src/ui/hooks/useSlashCompletion.test.ts

Verified: typecheck clean, lint clean (0 errors), format applied, per-package
test suites pass. The pre-existing flaky tests (subagentRuntimeSetup.test.ts
and settings-remediation.test.ts Performance Integration) are unchanged and
not caused by this commit.

Refs #1569
…s autofix (Fixes #1569)

Ran eslint --fix for @typescript-eslint/consistent-type-imports across
packages/core and packages/cli (in addition to the a2a-server and
vscode-ide-companion touches done earlier in the branch). The rule's
autofixer converts value imports of types into "import type", which is
mechanical and safe when applied per-file followed by a typecheck gate.

Verification path used:
1. Built lists of flagged files from /tmp/cti-cli.txt (435) and
   /tmp/cti-core.txt (262).
2. Ran autofix against both packages in parallel.
3. Ran npm run typecheck against the whole workspace. Core was clean.
   CLI produced 512 TS errors (476 TS1361 + 36 TS2206) in 36 files where
   the autofix-introduced "import type" collided with a value usage or a
   nested type modifier on an already type-only import.
4. Reverted those 36 files via git checkout --. Re-ran typecheck: 0
   errors.
5. Ran npm run format to reflow the affected files.

Lint warning delta:
  @typescript-eslint/consistent-type-imports: 1192 -> 384
  Total warnings:                            11572 -> 10764

Deferred (to be handled manually in a later batch): the 36 CLI files
listed in /tmp/cti-broken-abs.txt. Each needs either (a) split of the
import into a value-import + type-import pair, or (b) removal of the
type modifier where it conflicts with import type.

Tests: full npm run test run shows one pre-existing flake
(subagentRuntimeSetup) and one timeout in ToolResultDisplay that passes
on re-run in isolation (host was heavily loaded). No regressions
attributable to this change.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/a2a-server/src/agent/task.ts`:
- Around line 456-458: The conditional block checks if
(!this.skipFinalTrueAfterInlineEdit.value) then assigns
this.skipFinalTrueAfterInlineEdit.value = false, which is a redundant no-op;
remove the assignment inside the if so the code only relies on the condition,
i.e., delete the write to this.skipFinalTrueAfterInlineEdit.value while keeping
the surrounding logic intact (look for the conditional using
skipFinalTrueAfterInlineEdit.value in the task handling code).

In `@packages/cli/src/providers/provider-switching.integration.test.ts`:
- Around line 73-75: The assertion mixes toStrictEqual with
expect.arrayContaining which is contradictory; update the test "without
auto-registering gemini" to assert exact equality instead of a partial match:
replace
expect(providers).toStrictEqual(expect.arrayContaining(['provider1','provider2']))
with an exact-array assertion such as
expect(providers).toStrictEqual(['provider1', 'provider2']) (or use toEqual if
order is not guaranteed) so the variable providers is verified to contain
exactly those two entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d180c1da-2ab6-4b82-b498-e864ce04f9da

📥 Commits

Reviewing files that changed from the base of the PR and between 2ca1716 and 406de04.

📒 Files selected for processing (193)
  • packages/a2a-server/src/agent/task.ts
  • packages/cli/src/auth/__tests__/oauth-manager.issue913.spec.ts
  • packages/cli/src/auth/__tests__/oauth-manager.user-declined.spec.ts
  • packages/cli/src/auth/anthropic-oauth-provider.test.ts
  • packages/cli/src/auth/anthropic-oauth-provider.ts
  • packages/cli/src/auth/gemini-oauth-provider.ts
  • packages/cli/src/auth/migration.ts
  • packages/cli/src/auth/oauth-manager.issue1317.spec.ts
  • packages/cli/src/auth/oauth-manager.spec.ts
  • packages/cli/src/auth/oauth-manager.token-reuse.spec.ts
  • packages/cli/src/auth/provider-registry.ts
  • packages/cli/src/auth/proxy/__tests__/proxy-oauth-adapter.test.ts
  • packages/cli/src/auth/proxy/__tests__/refresh-flow.spec.ts
  • packages/cli/src/auth/qwen-oauth-provider.test.ts
  • packages/cli/src/auth/qwen-oauth-provider.ts
  • packages/cli/src/commands/extensions.tsx
  • packages/cli/src/commands/extensions/uninstall.ts
  • packages/cli/src/commands/mcp/add.ts
  • packages/cli/src/commands/mcp/list.test.ts
  • packages/cli/src/commands/mcp/list.ts
  • packages/cli/src/config/cliEphemeralSettings.test.ts
  • packages/cli/src/config/config.integration.test.ts
  • packages/cli/src/config/extensions/extensionSettings.test.ts
  • packages/cli/src/config/sandboxConfig.ts
  • packages/cli/src/config/settingsSchema.ts
  • packages/cli/src/coreToolToggle.test.ts
  • packages/cli/src/gemini.test.tsx
  • packages/cli/src/integration-tests/base-url-behavior.integration.test.ts
  • packages/cli/src/integration-tests/cli-args.integration.test.ts
  • packages/cli/src/integration-tests/compression-settings-apply.integration.test.ts
  • packages/cli/src/integration-tests/compression-todo.integration.test.ts
  • packages/cli/src/integration-tests/ephemeral-settings.integration.test.ts
  • packages/cli/src/integration-tests/profile-keyfile.integration.test.ts
  • packages/cli/src/integration-tests/profile-system.integration.test.ts
  • packages/cli/src/integration-tests/provider-switching.integration.test.ts
  • packages/cli/src/integration-tests/security.integration.test.ts
  • packages/cli/src/integration-tests/test-utils.test.ts
  • packages/cli/src/integration-tests/test-utils.ts
  • packages/cli/src/nonInteractiveCli.test.ts
  • packages/cli/src/providers/credentialPrecedence.test.ts
  • packages/cli/src/providers/logging/git-stats-service-impl.ts
  • packages/cli/src/providers/logging/git-stats.ts
  • packages/cli/src/providers/logging/multi-provider-logging.integration.test.ts
  • packages/cli/src/providers/oauth-provider-registration.ts
  • packages/cli/src/providers/provider-gemini-switching.test.ts
  • packages/cli/src/providers/provider-switching.integration.test.ts
  • packages/cli/src/runtime/providerMutations.ts
  • packages/cli/src/runtime/providerSwitch.ts
  • packages/cli/src/runtime/runtimeAccessors.spec.ts
  • packages/cli/src/runtime/runtimeLifecycle.spec.ts
  • packages/cli/src/runtime/settingsResolver.ts
  • packages/cli/src/services/CommandService.ts
  • packages/cli/src/services/FileCommandLoader.test.ts
  • packages/cli/src/services/FileCommandLoader.ts
  • packages/cli/src/services/McpPromptLoader.test.ts
  • packages/cli/src/services/McpPromptLoader.ts
  • packages/cli/src/services/prompt-processors/argumentProcessor.ts
  • packages/cli/src/services/prompt-processors/shellProcessor.test.ts
  • packages/cli/src/services/prompt-processors/shellProcessor.ts
  • packages/cli/src/services/prompt-processors/types.ts
  • packages/cli/src/services/todo-continuation/todoContinuationService.spec.ts
  • packages/cli/src/services/todo-continuation/todoContinuationService.ts
  • packages/cli/src/services/types.ts
  • packages/cli/src/storage/ConversationStorage.test.ts
  • packages/cli/src/test-utils/customMatchers.ts
  • packages/cli/src/test-utils/mockCommandContext.ts
  • packages/cli/src/test-utils/responsive-testing.test.tsx
  • packages/cli/src/test-utils/responsive-testing.tsx
  • packages/cli/src/ui/App.test.tsx
  • packages/cli/src/ui/AppContainer.tsx
  • packages/cli/src/ui/AppContainerRuntime.tsx
  • packages/cli/src/ui/IdeIntegrationNudge.tsx
  • packages/cli/src/ui/colors.ts
  • packages/cli/src/ui/commands/aboutCommand.test.ts
  • packages/cli/src/ui/commands/aboutCommand.ts
  • packages/cli/src/ui/commands/authCommand.codex.test.ts
  • packages/cli/src/ui/commands/authCommand.test.ts
  • packages/cli/src/ui/commands/authCommand.ts
  • packages/cli/src/ui/commands/baseurlCommand.ts
  • packages/cli/src/ui/commands/chatCommand.test.ts
  • packages/cli/src/ui/commands/chatCommand.ts
  • packages/cli/src/ui/commands/clearCommand.test.ts
  • packages/cli/src/ui/commands/compressCommand.test.ts
  • packages/cli/src/ui/commands/compressCommand.ts
  • packages/cli/src/ui/commands/copyCommand.test.ts
  • packages/cli/src/ui/commands/copyCommand.ts
  • packages/cli/src/ui/commands/debugCommands.ts
  • packages/cli/src/ui/commands/diagnosticsCommand.ts
  • packages/cli/src/ui/commands/directoryCommand.test.tsx
  • packages/cli/src/ui/commands/directoryCommand.tsx
  • packages/cli/src/ui/commands/dumpcontextCommand.ts
  • packages/cli/src/ui/commands/helpCommand.ts
  • packages/cli/src/ui/commands/ideCommand.test.ts
  • packages/cli/src/ui/commands/initCommand.ts
  • packages/cli/src/ui/commands/keyCommand.ts
  • packages/cli/src/ui/commands/keyfileCommand.ts
  • packages/cli/src/ui/commands/loggingCommand.ts
  • packages/cli/src/ui/commands/logoutCommand.ts
  • packages/cli/src/ui/commands/lspCommand.ts
  • packages/cli/src/ui/commands/mcpCommand.test.ts
  • packages/cli/src/ui/commands/mcpCommand.ts
  • packages/cli/src/ui/commands/memoryCommand.test.ts
  • packages/cli/src/ui/commands/modelCommand.ts
  • packages/cli/src/ui/commands/permissionsCommand.ts
  • packages/cli/src/ui/commands/privacyCommand.ts
  • packages/cli/src/ui/commands/profileCommand.ts
  • packages/cli/src/ui/commands/providerCommand.ts
  • packages/cli/src/ui/commands/restoreCommand.test.ts
  • packages/cli/src/ui/commands/restoreCommand.ts
  • packages/cli/src/ui/commands/schema/types.ts
  • packages/cli/src/ui/commands/setCommand.ts
  • packages/cli/src/ui/commands/settingsCommand.ts
  • packages/cli/src/ui/commands/setupCommand.ts
  • packages/cli/src/ui/commands/statsCommand.ts
  • packages/cli/src/ui/commands/subagentCommand.ts
  • packages/cli/src/ui/commands/terminalSetupCommand.test.ts
  • packages/cli/src/ui/commands/terminalSetupCommand.ts
  • packages/cli/src/ui/commands/test/subagentCommand.test.ts
  • packages/cli/src/ui/commands/test/useSlashCompletion.schema.test.ts
  • packages/cli/src/ui/commands/themeCommand.ts
  • packages/cli/src/ui/commands/toolkeyCommand.ts
  • packages/cli/src/ui/commands/toolkeyfileCommand.ts
  • packages/cli/src/ui/commands/vimCommand.ts
  • packages/cli/src/ui/components/AboutBox.tsx
  • packages/cli/src/ui/components/AnsiOutput.tsx
  • packages/cli/src/ui/components/AppHeader.tsx
  • packages/cli/src/ui/components/AuthDialog.tsx
  • packages/cli/src/ui/components/AuthInProgress.tsx
  • packages/cli/src/ui/components/AutoAcceptIndicator.tsx
  • packages/cli/src/ui/components/BucketAuthConfirmation.tsx
  • packages/cli/src/ui/components/CacheStatsDisplay.tsx
  • packages/cli/src/ui/components/Composer.tsx
  • packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx
  • packages/cli/src/ui/components/ContextIndicator.ui.test.tsx
  • packages/cli/src/ui/components/DebugProfiler.tsx
  • packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
  • packages/cli/src/ui/components/EditorSettingsDialog.tsx
  • packages/cli/src/ui/components/ErrorBoundary.tsx
  • packages/cli/src/ui/components/FolderTrustDialog.tsx
  • packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
  • packages/cli/src/ui/components/Header.tsx
  • packages/cli/src/ui/components/Help.tsx
  • packages/cli/src/ui/components/HistoryItemDisplay.tsx
  • packages/cli/src/ui/components/HookStatusDisplay.tsx
  • packages/cli/src/ui/components/InputPrompt.paste.spec.tsx
  • packages/cli/src/ui/components/InputPrompt.tsx
  • packages/cli/src/ui/components/LBStatsDisplay.tsx
  • packages/cli/src/ui/components/LayoutManager.tsx
  • packages/cli/src/ui/components/LoadProfileDialog.tsx
  • packages/cli/src/ui/components/LoadingIndicator.tsx
  • packages/cli/src/ui/components/LoggingDialog.tsx
  • packages/cli/src/ui/components/MemoryUsageDisplay.tsx
  • packages/cli/src/ui/components/ModelDialog.tsx
  • packages/cli/src/ui/components/OAuthCodeDialog.tsx
  • packages/cli/src/ui/components/PermissionsModifyTrustDialog.test.tsx
  • packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx
  • packages/cli/src/ui/components/PrepareLabel.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/AdvancedParamsStep.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/AuthenticationStep.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/BaseUrlConfigStep.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/ModelSelectStep.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/NavigationMenu.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/ProfileSaveStep.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/ProfileSuccessSummary.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/ProviderSelectStep.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/TextInput.tsx
  • packages/cli/src/ui/components/ProfileCreateWizard/index.tsx
  • packages/cli/src/ui/components/ProfileDetailDialog.tsx
  • packages/cli/src/ui/components/ProfileInlineEditor.tsx
  • packages/cli/src/ui/components/SecureKeyInput.tsx
  • packages/cli/src/ui/components/SessionBrowserDialog.tsx
  • packages/cli/src/ui/components/SessionSummaryDisplay.test.tsx
  • packages/cli/src/ui/components/SessionSummaryDisplay.tsx
  • packages/cli/src/ui/components/ShellModeIndicator.tsx
  • packages/cli/src/ui/components/StatsDisplay.test.tsx
  • packages/cli/src/ui/components/StatusDisplay.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentCreationWizard.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentDeleteDialog.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentEditForm.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentListMenu.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentMainMenu.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentManagerDialog.tsx
  • packages/cli/src/ui/components/SubagentManagement/SubagentShowView.tsx
  • packages/cli/src/ui/components/ThemeDialog.test.tsx
  • packages/cli/src/ui/components/ThemeDialog.tsx
  • packages/cli/src/ui/components/ThemedGradient.tsx
  • packages/cli/src/ui/components/Tips.tsx
  • packages/cli/src/ui/components/TodoPanel.responsive.test.tsx
  • packages/cli/src/ui/components/TodoPanel.semantic.test.tsx
  • packages/cli/src/ui/components/TodoPanel.tsx
  • packages/cli/src/ui/components/ToolStatsDisplay.test.tsx
  • packages/cli/src/ui/components/ToolStatsDisplay.tsx
  • packages/cli/src/ui/components/ToolsDialog.tsx

Comment on lines +456 to +458
!this.skipFinalTrueAfterInlineEdit.value
) {
this.skipFinalTrueAfterInlineEdit = false;
this.skipFinalTrueAfterInlineEdit.value = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Remove the redundant skip-flag write.

Inside if (!this.skipFinalTrueAfterInlineEdit.value), assigning this.skipFinalTrueAfterInlineEdit.value = false is a no-op and adds noise.

✂️ Proposed cleanup
     if (
       isAwaitingApproval &&
       allPendingAreStable &&
       !this.skipFinalTrueAfterInlineEdit.value
     ) {
-      this.skipFinalTrueAfterInlineEdit.value = false;
-
       // We don't need to send another message, just a final status update.
       this.setTaskStateAndPublishUpdate(
         'input-required',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/a2a-server/src/agent/task.ts` around lines 456 - 458, The
conditional block checks if (!this.skipFinalTrueAfterInlineEdit.value) then
assigns this.skipFinalTrueAfterInlineEdit.value = false, which is a redundant
no-op; remove the assignment inside the if so the code only relies on the
condition, i.e., delete the write to this.skipFinalTrueAfterInlineEdit.value
while keeping the surrounding logic intact (look for the conditional using
skipFinalTrueAfterInlineEdit.value in the task handling code).

Comment on lines +73 to 75
expect(providers).toStrictEqual(
expect.arrayContaining(['provider1', 'provider2']),
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify assertion intent: toStrictEqual with arrayContaining is semantically contradictory.

The combination of toStrictEqual (which implies exact matching) with expect.arrayContaining (which allows extra elements) creates semantic confusion. Based on the test name "without auto-registering gemini", the intent appears to be verifying the list contains exactly the two registered providers and nothing else.

🎯 Proposed fix for exact matching
-    expect(providers).toStrictEqual(
-      expect.arrayContaining(['provider1', 'provider2']),
-    );
+    expect(providers).toStrictEqual(['provider1', 'provider2']);

If the test should allow additional providers (contradicting the test name), revert to the original toEqual with arrayContaining:

-    expect(providers).toStrictEqual(
-      expect.arrayContaining(['provider1', 'provider2']),
-    );
+    expect(providers).toEqual(
+      expect.arrayContaining(['provider1', 'provider2']),
+    );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/providers/provider-switching.integration.test.ts` around
lines 73 - 75, The assertion mixes toStrictEqual with expect.arrayContaining
which is contradictory; update the test "without auto-registering gemini" to
assert exact equality instead of a partial match: replace
expect(providers).toStrictEqual(expect.arrayContaining(['provider1','provider2']))
with an exact-array assertion such as
expect(providers).toStrictEqual(['provider1', 'provider2']) (or use toEqual if
order is not guaranteed) so the variable providers is verified to contain
exactly those two entries.

…ports (Fixes #1569)

The initial Tier A.2 commit (406de04) deferred 36 CLI files where the
default autofix (fixStyle: separate-type-imports) converted runtime-used
enum imports to "import type", producing TS1361 errors.

Fix: apply the same rule with fixStyle: inline-type-imports. Each
specifier is prefixed with the type keyword while the import declaration
stays a value-import, so enums used as values continue to compile.

Applied via:
  npx eslint --fix --rule '{"@typescript-eslint/consistent-type-imports":
    ["error", {"prefer": "type-imports", "fixStyle": "inline-type-imports"}]}'

Verification:
- typecheck: 0 errors
- build: clean
- tests: 9378 passed / 1 pre-existing flake (subagentRuntimeSetup.test.ts,
  confirmed also failing on main)
- prettier: clean
- lint: 10764 -> 10696 total warnings (-68);
        consistent-type-imports 384 -> 316 warnings (-68)

The remaining 316 cti warnings are in other files and in a different
sub-case (import() type annotations), to be addressed in later tiers.
Three import-block conflicts resolved:

- packages/core/src/core/geminiChat.ts
  Kept HEAD's `import type { PerformCompressionResult }` and added
  main's `import type { Config }` (Config is type-only here).

- packages/core/src/core/subagent.ts
  Kept HEAD's `import type { Config }` (regression on main would have
  made it a value import). Dropped HEAD's TURN_STREAM_IDLE_TIMEOUT_MS
  import now that main replaced that usage with
  resolveStreamIdleTimeoutMs(this.config).

- packages/core/src/core/turn.test.ts
  Kept HEAD's `import type { GenerateContentResponse, Part, Content,
  FinishReason }` (all used as types) and added main's
  `import { DEFAULT_STREAM_IDLE_TIMEOUT_MS }`.

Verified: npm run build (clean), npm run typecheck (0 errors).
 #1569)

- Add ts-morph codemod (scripts/codemod-import-type-annotations.mjs) to
  rewrite import() type annotations and hoist type-only named imports to
  import type declarations.
- Disable consistent-type-imports in the vitest test-file block; this is
  the correct scope for the rule and removes ~263 noisy warnings from
  test files.
- Apply codemod across 22 source files in packages/core and packages/cli
  (auth, config, extensions, UI layouts/contexts, hooks, compression,
  subagent, ide-client, RetryOrchestrator, shellExecutionService,
  nonInteractiveToolExecutor, configTypes, GeminiProvider).
- Hand-fix codemod aftermath:
  - Circular self-aliases in lspIntegration.ts and token-access-coordinator.ts
  - Name collision in settingsIntegration.ts (ExtensionSetting ->
    ExtensionConfigSetting alias) plus Array<X> -> X[] rewrites
  - Global-name shadowing in ide-client.ts (undici RequestInit ->
    UndiciRequestInit alias)
  - Array<X> -> X[] in UIStateContext.tsx and cli/ui/types.ts
  - typeof import() pattern preserved in profile-utils.ts, GeminiProvider.ts,
    and wrapped with eslint-disable in test-utils/runtime.ts (vitest
    devDep must not be statically imported from src).
- Revert value import for ToolRegistry in subagent.test.ts that an earlier
  autofix wrongly converted to a type-only import; merge-from-main
  reintroduced 4 new ToolRegistry(...) call sites.
- Auto-format sweep brought in prettier-only changes to turn.test.ts,
  RetryOrchestrator.ts, and shellExecutionService.ts.

Result: lint reports 0 errors, 10435 warnings (from 10727 baseline).
Typecheck clean; build clean; full test suite passes except two
pre-existing failures unrelated to this change:
  - useSlashCompletion > git-aware filtering (reproducible on stashed
    clean branch)
  - ToolResultDisplay > truncates extremely long strings (passes in
    isolation; load-related flake)

Rule stays at warn for now; will be promoted to error once the remaining
~26 consistent-type-imports warnings are hand-patched in a follow-up.
- Widen vitest eslint block to cover *.spec.{ts,tsx} alongside *.test.{ts,tsx}
- Add targeted eslint-disable for two legitimate vitest patterns surfaced
  by the widened glob (pre-advance-timer expect capture + aliased it/it.skip)
- Promote @typescript-eslint/consistent-type-imports from warn to error now
  that the rule is clean repo-wide.
@acoliver acoliver changed the title Tighten core/cli lint cleanup in fixed batches (Fixes #1569) Enforce vitest strict equality in tests (Fixes #1569) Apr 18, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/cli/src/config/extensions/settingsIntegration.ts (1)

9-17: ⚠️ Potential issue | 🟡 Minor

Consolidate ExtensionSetting type imports to use a single source.

The file imports ExtensionSetting from two different modules with different definitions:

  • Line 11: from ./extensionSettings.js — derived from ExtensionSettingSchema (schema fields: name, description, envVar, sensitive)
  • Line 16: from ../extension.js (aliased as ExtensionConfigSetting) — interface with an additional required?: boolean field

In getMissingSettings(), items loaded as the first type are pushed into an array typed as the second type. While TypeScript accepts this due to structural typing, maintaining two type names for nearly-identical concepts creates confusion and maintenance risk. The required field in the interface type is unused in this file and semantically misaligned with the schema-derived type.

Consider using the schema-based ExtensionSetting type consistently throughout this file, or align both type definitions if the required field has intentional semantics elsewhere.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/config/extensions/settingsIntegration.ts` around lines 9 -
17, The file imports two different ExtensionSetting types causing confusion;
update getMissingSettings and any local type annotations to use the
schema-derived ExtensionSetting from ./extensionSettings.js (and remove the
aliased import ExtensionConfigSetting from ../extension.js), so the array typed
for missing settings and any pushes/reference use the single schema-based type
(also remove the now-unused import symbol EXTENSIONS_CONFIG_FILENAME_FALLBACK if
it was only pulled in alongside the aliased type). Ensure you update any type
annotations, function signatures, and variable declarations referencing
ExtensionConfigSetting to the schema ExtensionSetting and delete the duplicate
import.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/src/ui/commands/schema/argumentResolver.test.ts`:
- Around line 784-785: Replace the loose toMatchObject assertion with a strict
equality on normalized forms so extra fields are caught: normalize both schema
and originalSchema (e.g., by serializing/deserializing to drop undefineds) and
assert they are exactly equal using toStrictEqual; update the test that
currently uses expect(schema).toMatchObject(originalSchema) to compare
JSON-normalized schema and originalSchema (reference symbols: schema,
originalSchema, createCompletionHandler).

---

Outside diff comments:
In `@packages/cli/src/config/extensions/settingsIntegration.ts`:
- Around line 9-17: The file imports two different ExtensionSetting types
causing confusion; update getMissingSettings and any local type annotations to
use the schema-derived ExtensionSetting from ./extensionSettings.js (and remove
the aliased import ExtensionConfigSetting from ../extension.js), so the array
typed for missing settings and any pushes/reference use the single schema-based
type (also remove the now-unused import symbol
EXTENSIONS_CONFIG_FILENAME_FALLBACK if it was only pulled in alongside the
aliased type). Ensure you update any type annotations, function signatures, and
variable declarations referencing ExtensionConfigSetting to the schema
ExtensionSetting and delete the duplicate import.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a592287-638b-416f-9aa3-664270acdf84

📥 Commits

Reviewing files that changed from the base of the PR and between d8605b1 and 8bfe542.

📒 Files selected for processing (38)
  • eslint.config.js
  • packages/cli/src/__tests__/sessionBrowserE2E.spec.ts
  • packages/cli/src/auth/BucketFailoverHandlerImpl.spec.ts
  • packages/cli/src/auth/__tests__/OAuthBucketManager.spec.ts
  • packages/cli/src/auth/__tests__/anthropic-oauth-provider.fallback.spec.ts
  • packages/cli/src/auth/__tests__/auth-flow-orchestrator.spec.ts
  • packages/cli/src/auth/__tests__/auth-status-service.spec.ts
  • packages/cli/src/auth/__tests__/behavioral/bridge-ui.behavioral.spec.ts
  • packages/cli/src/auth/__tests__/behavioral/subagent-isolation.behavioral.spec.ts
  • packages/cli/src/auth/__tests__/multi-bucket-auth.spec.ts
  • packages/cli/src/auth/__tests__/provider-registry.spec.ts
  • packages/cli/src/auth/__tests__/provider-usage-info.spec.ts
  • packages/cli/src/auth/__tests__/token-access-coordinator.spec.ts
  • packages/cli/src/auth/anthropic-oauth-provider.local-flow.spec.ts
  • packages/cli/src/auth/anthropic-oauth-provider.no-refresh-on-gettoken.spec.ts
  • packages/cli/src/auth/auth-flow-orchestrator.ts
  • packages/cli/src/auth/codex-oauth-provider.spec.ts
  • packages/cli/src/auth/local-oauth-callback.spec.ts
  • packages/cli/src/auth/oauth-manager.auth-lock.spec.ts
  • packages/cli/src/auth/oauth-manager.failover-wiring.spec.ts
  • packages/cli/src/auth/oauth-manager.issue1468.spec.ts
  • packages/cli/src/auth/oauth-manager.runtime-messagebus.spec.ts
  • packages/cli/src/auth/oauth-manager.spec.ts
  • packages/cli/src/auth/oauth-manager.wiring.spec.ts
  • packages/cli/src/auth/profile-utils.ts
  • packages/cli/src/auth/token-access-coordinator.ts
  • packages/cli/src/auth/types.ts
  • packages/cli/src/config/extensions/settingsIntegration.ts
  • packages/cli/src/integration-tests/__tests__/oauth-buckets.integration.spec.ts
  • packages/cli/src/nonInteractiveCli.ts
  • packages/cli/src/runtime/__tests__/profileApplication.bucket-failover.spec.ts
  • packages/cli/src/runtime/providerMutations.spec.ts
  • packages/cli/src/runtime/providerSwitch.spec.ts
  • packages/cli/src/runtime/runtimeRegistry.spec.ts
  • packages/cli/src/runtime/runtimeSettings.proactive-wiring.lb.spec.ts
  • packages/cli/src/services/__tests__/performResume.spec.ts
  • packages/cli/src/services/todo-continuation/todoContinuationService.spec.ts
  • packages/cli/src/ui/commands/schema/argumentResolver.test.ts

Comment on lines +784 to +785
// Use toMatchObject since JSON.stringify drops undefined properties
expect(schema).toMatchObject(originalSchema);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🌐 Web query:

In Vitest 3.x, what are the behavioral differences between expect(a).toMatchObject(b) and expect(a).toStrictEqual(b), specifically regarding extra object properties and nested array/object equality?

💡 Result:

In Vitest 3.x, expect(a).toMatchObject(b) and expect(a).toStrictEqual(b) differ in handling extra object properties and nested equality as follows: Extra object properties: - toMatchObject(b): Passes if a contains all properties and values from b (recursively), ignoring extra properties in a. Designed for partial/subset matching. - toStrictEqual(b): Fails if a has any extra properties not in b. Requires exact match including no extras. Nested array/object equality: Both use deep recursive comparison similar to toEqual, but toStrictEqual adds strictness: - Checks for undefined keys: {a: undefined, b: 2} ≠ {b: 2}. - Array sparseness: [, 1] ≠ [undefined, 1]. - Object types/prototypes: Class instance ≠ plain object with same fields. toMatchObject applies subset logic recursively to nested objects/arrays in b, allowing extras in corresponding nested parts of a. No behavioral changes specific to these matchers in Vitest 3.x release notes; behaviors match Jest/Chai foundations with documented differences.

Citations:


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
wc -l argumentResolver.test.ts && \
sed -n '750,810p' argumentResolver.test.ts

Repository: vybestack/llxprt-code

Length of output: 2573


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '700,760p' argumentResolver.test.ts

Repository: vybestack/llxprt-code

Length of output: 2380


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '1,50p' argumentResolver.test.ts | head -40

Repository: vybestack/llxprt-code

Length of output: 1037


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '35,80p' argumentResolver.test.ts

Repository: vybestack/llxprt-code

Length of output: 1438


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
grep -n "createCompletionHandler" index.ts | head -20

Repository: vybestack/llxprt-code

Length of output: 141


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '534,620p' index.ts

Repository: vybestack/llxprt-code

Length of output: 1397


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '534,620p' index.ts && \
echo "---" && \
grep -n "suggestForValue\|computeHintForValue\|suggestForLiterals\|inferLiteralHint" index.ts | head -10

Repository: vybestack/llxprt-code

Length of output: 1797


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '430,520p' index.ts

Repository: vybestack/llxprt-code

Length of output: 2671


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
grep -n "function resolveActiveStep\|export.*resolveActiveStep" index.ts

Repository: vybestack/llxprt-code

Length of output: 96


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '179,250p' index.ts

Repository: vybestack/llxprt-code

Length of output: 1837


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
grep -n "function mergeSchemas\|function gatherLiteralGroup" index.ts

Repository: vybestack/llxprt-code

Length of output: 155


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '67,110p' index.ts

Repository: vybestack/llxprt-code

Length of output: 1340


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '250,330p' index.ts

Repository: vybestack/llxprt-code

Length of output: 2493


🏁 Script executed:

cd packages/cli/src/ui/commands/schema && \
sed -n '395,430p' index.ts

Repository: vybestack/llxprt-code

Length of output: 843


Consider a stricter assertion to catch potential field additions to the schema object.

The current toMatchObject comparison only verifies that schema contains all properties from originalSchema, allowing extra fields that might be introduced by future changes. While createCompletionHandler doesn't currently mutate the schema, using toStrictEqual on normalized forms would be more defensive:

Suggested fix
-            // Property 2: Schema should not be mutated
-            // Use toMatchObject since JSON.stringify drops undefined properties
-            expect(schema).toMatchObject(originalSchema);
+            // Property 2: Schema should not be mutated
+            // Compare normalized forms strictly to catch field additions
+            expect(JSON.parse(JSON.stringify(schema))).toStrictEqual(
+              originalSchema,
+            );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Use toMatchObject since JSON.stringify drops undefined properties
expect(schema).toMatchObject(originalSchema);
// Property 2: Schema should not be mutated
// Compare normalized forms strictly to catch field additions
expect(JSON.parse(JSON.stringify(schema))).toStrictEqual(
JSON.parse(JSON.stringify(originalSchema))
);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/ui/commands/schema/argumentResolver.test.ts` around lines
784 - 785, Replace the loose toMatchObject assertion with a strict equality on
normalized forms so extra fields are caught: normalize both schema and
originalSchema (e.g., by serializing/deserializing to drop undefineds) and
assert they are exactly equal using toStrictEqual; update the test that
currently uses expect(schema).toMatchObject(originalSchema) to compare
JSON-normalized schema and originalSchema (reference symbols: schema,
originalSchema, createCompletionHandler).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer:e2e:ok Trusted contributor; maintainer-approved E2E run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant