Commit graph

727 commits

Author SHA1 Message Date
uinstinct
bcdf0120b1 Merge branch 'main' into sub-agents 2025-12-18 19:22:15 +05:30
Dallin Romney
e3a4f77e9f
Merge pull request #9083 from svarlamov/feat/cli-git-ai-integration
feat: Continue CLI Git AI integration for tracking AI-authored code
2025-12-15 19:55:48 -08:00
continue[bot]
2003128f08 fix: correct import order in ToolPermissionService
Move BUILT_IN_TOOL_NAMES import to proper position according to eslint
import/order rules.

Co-authored-by: nate <nate@continue.dev>
2025-12-15 04:20:14 +00:00
continue[bot]
26bef77a88 fix: correct built-in tool names list
Update BUILT_IN_TOOL_NAMES to match the actual tools in allBuiltIns.ts,
including UploadArtifact which was missing. Remove incorrect tool names
that don't exist.

Co-authored-by: nate <nate@continue.dev>
2025-12-15 04:16:11 +00:00
continue[bot]
6a5f80b0fc fix: break circular dependency by extracting tool names
Create builtInToolNames.ts with just the tool name constants to avoid
importing the actual tool implementations. This breaks the circular
dependency chain: ToolPermissionService -> allBuiltIns -> subagent ->
executor -> services -> ToolPermissionService.

Co-authored-by: nate <nate@continue.dev>
2025-12-15 04:08:38 +00:00
continue[bot]
87fd9b67df fix: resolve circular dependency in subagent executor
Move services import to lazy evaluation inside executeSubAgent function
to avoid circular dependency. Pass services as parameter to
buildAgentSystemMessage helper function.

Co-authored-by: nate <nate@continue.dev>
2025-12-15 04:01:04 +00:00
continue[bot]
1c448c479d fix: resolve circular dependency in subagent tool
Move services import to lazy evaluation inside the run function to avoid
circular dependency between ToolPermissionService -> allBuiltIns -> subagent -> services -> ToolPermissionService.

This fixes the 'ToolPermissionService is not a constructor' error in tests.

Co-authored-by: nate <nate@continue.dev>
2025-12-15 03:50:39 +00:00
uinstinct
c2af5a9f1f allow all tools inside subagents 2025-12-11 19:21:40 +05:30
uinstinct
1a06d69297 refactor subagent namings 2025-12-11 13:40:02 +05:30
uinstinct
675378f1a3 rename subagent_type to subagent_name 2025-12-11 13:31:19 +05:30
uinstinct
a78be7c411 support streaming into tool call output 2025-12-11 13:27:46 +05:30
uinstinct
32af25fc99 feat: subagents 2025-12-11 13:17:29 +05:30
continue[bot]
ba750e4f78 Fix flaky slash command test on Windows
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>
2025-12-10 23:20:29 +00:00
continue[bot]
2ae2f80af6 fix: refactor handleToolCalls to use options object to satisfy max-params lint rule
- 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>
2025-12-09 22:59:03 +00:00
Nate
7f9ef3694d feat: capture and attach usage metadata to assistant messages
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>
2025-12-09 14:36:24 -08:00
Sasha Varlamov
f3668adba9 fix formatting 2025-12-09 11:51:41 -05:00
Sasha Varlamov
8114909af4 add tests, fix lints 2025-12-09 11:47:23 -05:00
Sasha Varlamov
32d3368ea7 tidy git ai integration 2025-12-09 11:47:22 -05:00
Sasha Varlamov
d4fd449906 clean up imports in git ai integration service 2025-12-09 11:47:22 -05:00
Sasha Varlamov
b587fe7d13 fix lints 2025-12-09 11:47:22 -05:00
Sasha Varlamov
7b2beb5f04 initial git ai integration 2025-12-09 11:47:20 -05:00
Nate
cd538eb230 update tool description 2025-12-08 22:24:30 -08:00
Nate
b5da44ddd6 fix(cli): resolve circular dependency in uploadArtifact tool
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>
2025-12-08 20:32:14 -08:00
continue[bot]
3875a472fc Fix ToolPermissionService mock to avoid constructor error
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>
2025-12-09 00:51:45 +00:00
continue[bot]
f02a8bc8eb Move betaUploadArtifactTool to BaseCommandOptions
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>
2025-12-09 00:43:08 +00:00
continue[bot]
5920c66ea3 Add artifactUpload service to test mocks
- 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>
2025-12-09 00:33:38 +00:00
continue[bot]
7123eef807 Fix ArtifactUploadService to extend BaseService
- 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>
2025-12-09 00:21:34 +00:00
Nate
85a4a69ebe Add artifact upload feature to CLI for agent sessions 2025-12-08 16:01:13 -08:00
continue[bot]
00b665f089 fix(cli): use logger.info instead of console.log for consistency
Replace console.log with logger.info for initial prompt messages to
maintain consistency with codebase logging practices.

Co-authored-by: nate <nate@continue.dev>
2025-12-07 19:15:08 +00:00
Nate
2e2fc51082 feat(cli): prevent initial prompt replay on devbox resume 2025-12-07 11:10:53 -08:00
Nate
09deed45dd feat(cli): add session ID support for serve command to persist chat history 2025-12-07 10:10:53 -08:00
Nate Sesti
15651c93f8
Merge pull request #9034 from continuedev/nate/track-session-cost-and-usage
Add comprehensive cost tracking with OpenAI pricing and session usage display
2025-12-05 19:59:57 -08:00
Nate
1929275938 update tool prompt 2025-12-05 18:08:45 -08:00
Nate
2441b0fecc Add configurable timeout parameter to runTerminalCommand tool 2025-12-05 18:07:50 -08:00
continue[bot]
5c50e911d2 fix: Initialize usage field in createSession and startNewSession
Ensures all new sessions have the usage tracking structure initialized
to prevent undefined field errors.

Co-authored-by: nate <nate@continue.dev>
2025-12-06 01:52:23 +00:00
continue[bot]
dd053ba124 test: Update session tests to include usage field
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>
2025-12-06 01:05:27 +00:00
continue[bot]
499b672d7e fix: Use named import for find-up v8
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>
2025-12-06 00:51:29 +00:00
Nate
63ddba2cd2 ship it 2025-12-05 16:36:25 -08:00
Nate
79737daba8 fix failing checks 2025-12-05 15:52:22 -08:00
Nate
e34ace263e Merge branch 'nate/track-session-cost-and-usage' of https://github.com/continuedev/continue into nate/track-session-cost-and-usage 2025-12-05 15:39:48 -08:00
continue[bot]
2e9a0f0b91 fix: Remove invalid totalCost property and update test mocks
- 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>
2025-12-05 23:34:39 +00:00
Nate
92bfa6d277 Merge branch 'nate/track-session-cost-and-usage' of https://github.com/continuedev/continue into nate/track-session-cost-and-usage 2025-12-05 15:30:00 -08:00
Nate
7db744db5b send full usage to /metadata 2025-12-05 15:29:57 -08:00
continue[bot]
bfd2f016c0 fix: Replace console.log with logger.info in exit.ts
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>
2025-12-05 23:29:43 +00:00
Nate
da147f9d0a Add comprehensive cost tracking with OpenAI pricing and session usage display 2025-12-05 15:23:21 -08:00
Aaron Lippold
528a8abceb
fix(cli): expand model capability detection to include Llama, Nemotron, and Mistral (#8845)
* 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>
2025-12-05 12:14:00 -08:00
Dallin Romney
ad057ec20e
Merge pull request #8928 from uinstinct/cli-single-submit
feat: submit slash command in one enter
2025-12-05 09:51:37 -08:00
Dallin Romney
10b9513fe7
Merge pull request #9018 from uinstinct/cli-wait-for-tests
chore: update slashCommands tests with waitForCondition
2025-12-05 09:25:45 -08:00
uinstinct
bf2a8a4add chore: update slashCommands tests with waitForCondition 2025-12-05 13:48:49 +05:30
Dallin Romney
34fdeb8398
Merge pull request #8925 from uinstinct/renamed-envvars
fix: use more intuitive envvars to manage OTLP and PostHog telemetry settings
2025-12-04 19:46:52 -08:00