Add mockLoadPackageFromHub.mockRejectedValue() to test that verifies
file reading failure for markdown paths. Without this, the hub would
succeed and the file reading code wouldn't be exercised.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused variable 'e' in catch block
- Update tests to use .md extensions for file path loading tests
- Add test for non-markdown paths throwing errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test was timing out on Windows CI due to slower rendering.
Increased the timeout from 2000ms to 5000ms and interval from 50ms to 100ms
to give more time for the UI to render the /title command.
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
Co-authored-by: nate <nate@continue.dev>
This updates the lockfile to match the package.json change from mocha
11.7.1 to 11.7.5, fixing the CI build failure.
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
Co-authored-by: nate <nate@continue.dev>
Remove credentials.* and token.* patterns from IntelliJ security ignore
list to match the TypeScript core changes. This ensures consistent behavior
across both IDE extensions.
Co-authored-by: nate <nate@continue.dev>
- Grouped function parameters into HandleToolCallsOptions interface
- Reduced parameter count from 6 to 1 (options object)
- Updated call site in streamChatResponse.ts to use new signature
Co-authored-by: nate <nate@continue.dev>
Add per-message cost tracking by capturing usage data from LLM API
responses and attaching it to assistant messages when saved to session.
- Update addAssistantMessage to accept usage parameter
- Modify handleToolCalls to pass usage to message creation
- Enhance processStreamingResponse to return usage with model and cost
- Calculate cost in cents and include model name in usage metadata
This enables the control plane cost analysis page to display accurate
per-message costs without client-side token estimation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix import order in VsCodeIde.ts (util/util before util/vscode)
- Fix negated conditions to use early returns
- Add void operator to unhandled promise calls
- Improve code clarity by using positive conditionals
These lint issues were introduced in PR #9077 and are unrelated to the
@tiptap/extension-image upgrade in this PR.
Generated with [Continue](https://continue.dev)
Co-authored-by: nate <nate@continue.dev>
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>