The uploadArtifact tool was importing services at the module level,
creating a circular dependency:
services/index.ts -> ToolPermissionService -> allBuiltIns -> uploadArtifact -> services/index.ts
This caused ToolPermissionService to be undefined when instantiated,
resulting in "ToolPermissionService is not a constructor" errors
in all ToolPermissionService tests.
The fix moves the services import inside the run() function where
it's actually used, breaking the circular dependency while
maintaining the same functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replaces 'vi.mocked(new ToolPermissionService())' with a plain mock object
containing the necessary methods. This fixes the 'ToolPermissionService is
not a constructor' error that was causing all tests to fail.
Also adds getState method to artifactUpload mock for completeness.
Co-authored-by: nate <nate@continue.dev>
Fixes TypeScript error: 'Property betaUploadArtifactTool does not exist on type BaseCommandOptions'
ServiceInitOptions.options is typed as BaseCommandOptions, so betaUploadArtifactTool
needs to be in BaseCommandOptions rather than ExtendedCommandOptions.
Co-authored-by: nate <nate@continue.dev>
- Adds artifactUpload mock to services object with uploadArtifact and uploadArtifacts methods
- Adds ARTIFACT_UPLOAD to SERVICE_NAMES mock
This ensures tests that import services or SERVICE_NAMES don't fail due to missing mock definitions.
Co-authored-by: nate <nate@continue.dev>
- Makes ArtifactUploadService extend BaseService<ArtifactUploadServiceState>
- Implements doInitialize() instead of initialize()
- Uses currentState instead of private state field
- Removes custom setState method in favor of BaseService's setState
This aligns the service with the architecture pattern used by other services
in the CLI (UpdateService, ConfigService, etc.)
Co-authored-by: nate <nate@continue.dev>
Replace console.log with logger.info for initial prompt messages to
maintain consistency with codebase logging practices.
Co-authored-by: nate <nate@continue.dev>
Added usage field expectations to session creation tests to match
the new session structure that includes cost tracking.
Co-authored-by: nate <nate@continue.dev>
Updated extensions/cli/package-lock.json to sync with package.json changes
for react and testing-library dependencies.
Co-authored-by: nate <nate@continue.dev>
The find-up@8 package uses named exports, not default export.
Fixed the import statement to use the correct named import syntax.
Co-authored-by: nate <nate@continue.dev>
- Move sentry import before session import in exit.ts
- Move session import before posthogService import in helpers
- Move services/types import before session import in TUIChat
Co-authored-by: nate <nate@continue.dev>
- Remove totalCost property from Session objects (should be in usage object)
- Add trackSessionUsage to test mocks for streamChatResponse tests
- Fixes TypeScript compilation errors and test failures
Co-authored-by: nate <nate@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
Replace console.log calls with logger.info in displaySessionUsage function
for consistency with codebase logging patterns.
Co-authored-by: nate <nate@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
* fix(cli): expand model capability detection to include Llama, Nemotron, and Mistral models
The isModelCapable function was showing false warnings for Llama, Nemotron,
and Mistral models, claiming they had "limited reasoning and tool calling
capabilities" when they actually have excellent capabilities.
**Changes:**
- Added /llama/, /nemotron/, /mistral/ patterns to capability detection regex
- Updated tests to reflect that these model families ARE capable
- All tests passing (26/26)
**Research validation:**
- Llama 3.3/Nemotron: #1 on alignment benchmarks, Arena Hard 85.0
- Mistral: 81.2% MMLU, supports function calling and JSON mode
- Both families widely used for agent workflows with proven tool calling
**Impact:**
- Removes false warnings for users of these popular model families
- Enables proper multiEdit tool usage for capable models
- Aligns detection with real-world model capabilities
Tested with nvidia/Llama-3_3-Nemotron-Super-49B-v1 on MITRE AIP endpoints.
Authored by: Aaron Lippold <lippold@gmail.com>
* fix: missing comma after grok
---------
Co-authored-by: Dallin Romney <dallinromney@gmail.com>