chore: format

This commit is contained in:
Nate 2025-08-29 08:24:55 -07:00
parent 9ed7001ae3
commit 4e1d2bdea3
6 changed files with 13 additions and 19 deletions

View file

@ -18,25 +18,30 @@ This is a CLI tool for Continue Dev that provides an interactive AI-assisted dev
### Core Components
1. **Entry Point** (`src/index.ts`): Main CLI logic with two modes:
- **Headless mode**: Non-interactive mode for automation/CI
- **TUI mode**: Terminal User Interface using Ink/React
- **Standard mode**: Traditional readline-based chat interface
2. **Authentication** (`src/auth/`): WorkOS-based authentication system
- `ensureAuth.ts`: Handles authentication flow
- `workos.ts`: WorkOS configuration and token management
3. **Continue SDK Integration** (`src/continueSDK.ts`): Initializes the Continue SDK client with:
- API key authentication
- Assistant configuration (slug-based)
- Organization support
4. **Terminal UI** (`src/ui/`): React/Ink-based TUI components
- `TUIChat.tsx`: Main chat interface component
- `UserInput.tsx`: Input handling with multi-line support
- `TextBuffer.ts`: Text display utilities
5. **Tools System** (`src/tools/`): Built-in development tools including:
- File operations (read, write, list)
- Code search functionality
- Terminal command execution

View file

@ -23,11 +23,13 @@ This document specifies the behavior of the CLI's configuration loading system,
**When CLI is invoked, config source is determined in this order:**
1. **CLI `--config` Flag** (highest priority)
- File path (starts with `.`, `/`, `~`): Loads local YAML file
- Assistant slug (`owner/package`): Fetches from Continue platform
- Overrides any saved preferences
2. **Saved Config URI** (if no `--config` flag)
- Retrieved from authentication config
- Converts `file://` URIs back to file paths
- Converts `slug://` URIs back to assistant slugs

View file

@ -8,6 +8,7 @@ When a user first runs `cn` in interactive mode, they will be taken through "onb
1. If the --config flag is provided, load this config
2. Otherwise, we will present the user with two options:
- 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
- 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

View file

@ -18,10 +18,7 @@ type CommandHandler = (
assistant: AssistantConfig,
) => Promise<SlashCommandResult> | SlashCommandResult;
async function handleHelp(
_args: string[],
_assistant: AssistantConfig,
) {
async function handleHelp(_args: string[], _assistant: AssistantConfig) {
const helpMessage = [
chalk.bold("Keyboard Shortcuts:"),
"",

View file

@ -100,8 +100,8 @@ function updateStateFromRemote({
// Update chat history from server - now using session.history directly
if (state.session && state.session.history) {
setChatHistory((prevHistory) => {
// Use session history directly - no conversion needed
const newHistory = state.session.history as ChatHistoryItem[];
// Use session history directly - it already has the correct type
const newHistory = state.session.history;
// Quick length check first
if (prevHistory.length !== newHistory.length) {

View file

@ -1,5 +1,6 @@
import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml";
import { BaseLlmApi } from "@continuedev/openai-adapters";
import type { Session } from "core/index.js";
import { ToolCallPreview } from "../../tools/types.js";
@ -36,19 +37,7 @@ export interface ActivePermissionRequest {
}
export interface RemoteServerState {
session: {
history: Array<{
message: {
role: string;
content?: string;
tool_calls?: any[];
};
contextItems: any[];
toolCallStates?: any[];
}>;
id: string;
workspaceDirectory: string;
};
session: Session;
isProcessing: boolean;
messageQueueLength: number;
pendingPermission?: {