Changesets · Branches · Tags · Compare
| Changeset | dc42dd67a510f5dea69fc4a5ec61a1ce4f6e17a79a5666c520527d0c39a667a9 |
|---|---|
| Author | Nate <sestinj@gmail.com> · 2025-08-29 08:24 -07:00 |
| Committer | Nate <sestinj@gmail.com> · 2025-08-29 08:24 -07:00 |
| Parents | 66328f2e8dcf |
6 files changed
modified extensions/cli/AGENTS.md +5 −0
| @@ -18,25 +18,30 @@ | ||
| 18 | 18 | ### Core Components |
| 19 | 19 | |
| 20 | 20 | 1. **Entry Point** (`src/index.ts`): Main CLI logic with two modes: |
| 21 | + | |
| 21 | 22 | - **Headless mode**: Non-interactive mode for automation/CI |
| 22 | 23 | - **TUI mode**: Terminal User Interface using Ink/React |
| 23 | 24 | - **Standard mode**: Traditional readline-based chat interface |
| 24 | 25 | |
| 25 | 26 | 2. **Authentication** (`src/auth/`): WorkOS-based authentication system |
| 27 | + | |
| 26 | 28 | - `ensureAuth.ts`: Handles authentication flow |
| 27 | 29 | - `workos.ts`: WorkOS configuration and token management |
| 28 | 30 | |
| 29 | 31 | 3. **Continue SDK Integration** (`src/continueSDK.ts`): Initializes the Continue SDK client with: |
| 32 | + | |
| 30 | 33 | - API key authentication |
| 31 | 34 | - Assistant configuration (slug-based) |
| 32 | 35 | - Organization support |
| 33 | 36 | |
| 34 | 37 | 4. **Terminal UI** (`src/ui/`): React/Ink-based TUI components |
| 38 | + | |
| 35 | 39 | - `TUIChat.tsx`: Main chat interface component |
| 36 | 40 | - `UserInput.tsx`: Input handling with multi-line support |
| 37 | 41 | - `TextBuffer.ts`: Text display utilities |
| 38 | 42 | |
| 39 | 43 | 5. **Tools System** (`src/tools/`): Built-in development tools including: |
| 44 | + | |
| 40 | 45 | - File operations (read, write, list) |
| 41 | 46 | - Code search functionality |
| 42 | 47 | - Terminal command execution |
modified extensions/cli/spec/config-loading.md +2 −0
| @@ -23,11 +23,13 @@ | ||
| 23 | 23 | **When CLI is invoked, config source is determined in this order:** |
| 24 | 24 | |
| 25 | 25 | 1. **CLI `--config` Flag** (highest priority) |
| 26 | + | |
| 26 | 27 | - File path (starts with `.`, `/`, `~`): Loads local YAML file |
| 27 | 28 | - Assistant slug (`owner/package`): Fetches from Continue platform |
| 28 | 29 | - Overrides any saved preferences |
| 29 | 30 | |
| 30 | 31 | 2. **Saved Config URI** (if no `--config` flag) |
| 32 | + | |
| 31 | 33 | - Retrieved from authentication config |
| 32 | 34 | - Converts `file://` URIs back to file paths |
| 33 | 35 | - Converts `slug://` URIs back to assistant slugs |
modified extensions/cli/spec/onboarding.md +1 −0
| @@ -8,6 +8,7 @@ | ||
| 8 | 8 | |
| 9 | 9 | 1. If the --config flag is provided, load this config |
| 10 | 10 | 2. Otherwise, we will present the user with two options: |
| 11 | + | |
| 11 | 12 | - Log in with Continue: log them in, which will automatically create their assistant and then we can load the first assistant from the first org |
| 12 | 13 | - Enter your Anthropic API key: let them enter the key, and then either create a ~/.continue/config.yaml with the following contents OR update the existing config.yaml to add the model |
| 13 | 14 |
modified extensions/cli/src/slashCommands.ts +1 −4
| @@ -18,10 +18,7 @@ | ||
| 18 | 18 | assistant: AssistantConfig, |
| 19 | 19 | ) => Promise<SlashCommandResult> | SlashCommandResult; |
| 20 | 20 | |
| 21 | -async function handleHelp( | |
| 22 | - _args: string[], | |
| 23 | - _assistant: AssistantConfig, | |
| 24 | -) { | |
| 21 | +async function handleHelp(_args: string[], _assistant: AssistantConfig) { | |
| 25 | 22 | const helpMessage = [ |
| 26 | 23 | chalk.bold("Keyboard Shortcuts:"), |
| 27 | 24 | "", |
modified extensions/cli/src/ui/hooks/useChat.remote.helpers.ts +2 −2
| @@ -100,8 +100,8 @@ | ||
| 100 | 100 | // Update chat history from server - now using session.history directly |
| 101 | 101 | if (state.session && state.session.history) { |
| 102 | 102 | setChatHistory((prevHistory) => { |
| 103 | - // Use session history directly - no conversion needed | |
| 104 | - const newHistory = state.session.history as ChatHistoryItem[]; | |
| 103 | + // Use session history directly - it already has the correct type | |
| 104 | + const newHistory = state.session.history; | |
| 105 | 105 | |
| 106 | 106 | // Quick length check first |
| 107 | 107 | if (prevHistory.length !== newHistory.length) { |
modified extensions/cli/src/ui/hooks/useChat.types.ts +2 −13
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; |
| 2 | 2 | import { BaseLlmApi } from "@continuedev/openai-adapters"; |
| 3 | +import type { Session } from "core/index.js"; | |
| 3 | 4 | |
| 4 | 5 | import { ToolCallPreview } from "../../tools/types.js"; |
| 5 | 6 | |
| @@ -36,19 +37,7 @@ | ||
| 36 | 37 | } |
| 37 | 38 | |
| 38 | 39 | export interface RemoteServerState { |
| 39 | - session: { | |
| 40 | - history: Array<{ | |
| 41 | - message: { | |
| 42 | - role: string; | |
| 43 | - content?: string; | |
| 44 | - tool_calls?: any[]; | |
| 45 | - }; | |
| 46 | - contextItems: any[]; | |
| 47 | - toolCallStates?: any[]; | |
| 48 | - }>; | |
| 49 | - id: string; | |
| 50 | - workspaceDirectory: string; | |
| 51 | - }; | |
| 40 | + session: Session; | |
| 52 | 41 | isProcessing: boolean; |
| 53 | 42 | messageQueueLength: number; |
| 54 | 43 | pendingPermission?: { |