Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Continue is quickly adding features, and we'd love to hear which are the most im
an enhancement are:

- Create an issue

- First, check whether a similar proposal has already been made
- If not, [create an issue](https://github.com/continuedev/continue/issues)
- Please describe the enhancement in as much detail as you can, and why it would be useful
Expand Down Expand Up @@ -91,7 +90,7 @@ You can run the documentation server locally using either of the following metho
3. Run the following command to start the documentation server:

```bash
npm run start
npm run dev
```

#### Method 2: VS Code Task
Expand Down Expand Up @@ -146,7 +145,6 @@ npm i -g vite
`install-all-dependencies`

2. Start debugging:

1. Switch to Run and Debug view
2. Select `Launch extension` from drop down
3. Hit play button
Expand Down
21 changes: 10 additions & 11 deletions binary/src/IpcMessenger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { v4 as uuidv4 } from "uuid";
class IPCMessengerBase<
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
> implements IMessenger<ToProtocol, FromProtocol>
{
> implements IMessenger<ToProtocol, FromProtocol> {
_sendMsg(message: Message) {
throw new Error("Not implemented");
}
Expand Down Expand Up @@ -178,9 +177,9 @@ class IPCMessengerBase<
}

export class IpcMessenger<
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
>
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
>
extends IPCMessengerBase<ToProtocol, FromProtocol>
implements IMessenger<ToProtocol, FromProtocol>
{
Expand Down Expand Up @@ -211,9 +210,9 @@ export class IpcMessenger<
}

export class CoreBinaryMessenger<
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
>
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
>
extends IPCMessengerBase<ToProtocol, FromProtocol>
implements IMessenger<ToProtocol, FromProtocol>
{
Expand Down Expand Up @@ -246,9 +245,9 @@ export class CoreBinaryMessenger<
}

export class CoreBinaryTcpMessenger<
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
>
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
>
extends IPCMessengerBase<ToProtocol, FromProtocol>
implements IMessenger<ToProtocol, FromProtocol>
{
Expand Down
3 changes: 1 addition & 2 deletions binary/src/TcpMessenger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { v4 as uuidv4 } from "uuid";
export class TcpMessenger<
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
> implements IMessenger<ToProtocol, FromProtocol>
{
> implements IMessenger<ToProtocol, FromProtocol> {
private port: number = 3000;
private host: string = "127.0.0.1";
private socket: net.Socket | null = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import {
IAnalyticsProvider,
} from "./IAnalyticsProvider.js";

export default class ContinueProxyAnalyticsProvider
implements IAnalyticsProvider
{
export default class ContinueProxyAnalyticsProvider implements IAnalyticsProvider {
uniqueId?: string;
controlPlaneProxyInfo?: ControlPlaneProxyInfo;

Expand Down
3 changes: 2 additions & 1 deletion core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ type RequiredLLMOptions =
| "completionOptions";

export interface ILLM
extends Omit<LLMOptions, RequiredLLMOptions>,
extends
Omit<LLMOptions, RequiredLLMOptions>,
Required<Pick<LLMOptions, RequiredLLMOptions>> {
get providerName(): string;
get underlyingProviderName(): string;
Expand Down
3 changes: 1 addition & 2 deletions core/protocol/messenger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export interface IMessenger<
export class InProcessMessenger<
ToProtocol extends IProtocol,
FromProtocol extends IProtocol,
> implements IMessenger<ToProtocol, FromProtocol>
{
> implements IMessenger<ToProtocol, FromProtocol> {
// Listeners for the entity that owns this messenger (right now, always Core)
protected myTypeListeners = new Map<
keyof ToProtocol,
Expand Down
4 changes: 1 addition & 3 deletions core/tools/systemMessageTools/toolCodeblocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { Tool, ToolCallState } from "../../..";
import { SystemMessageToolsFramework } from "../types";
import { handleToolCallBuffer } from "./parseSystemToolCall";

export class SystemMessageToolCodeblocksFramework
implements SystemMessageToolsFramework
{
export class SystemMessageToolCodeblocksFramework implements SystemMessageToolsFramework {
// Poor models are really bad at following instructions, alternate starts allowed:
acceptedToolCallStarts: [string, string][] = [
["```tool\n", "```tool\n"],
Expand Down
5 changes: 0 additions & 5 deletions extensions/cli/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,25 @@ 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
Expand Down
6 changes: 3 additions & 3 deletions extensions/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions extensions/cli/spec/config-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ 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
Expand Down
1 change: 0 additions & 1 deletion extensions/cli/spec/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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. If the CONTINUE_USE_BEDROCK environment variable is set to "1", automatically use AWS Bedrock configuration and skip interactive prompts
3. Present the user with available 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

Expand Down
10 changes: 4 additions & 6 deletions extensions/cli/src/commands/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ async function handleAutoCompaction(
isHeadless: boolean,
format?: "json",
): Promise<number | null> {
const { handleAutoCompaction: coreAutoCompaction } = await import(
"../stream/streamChatResponse.autoCompaction.js"
);
const { handleAutoCompaction: coreAutoCompaction } =
await import("../stream/streamChatResponse.autoCompaction.js");

// Custom callbacks for headless mode console output
const callbacks = {
Expand Down Expand Up @@ -483,9 +482,8 @@ async function runHeadlessMode(
}

// Handle additional prompts from --prompt flags
const { processAndCombinePrompts } = await import(
"../util/promptProcessor.js"
);
const { processAndCombinePrompts } =
await import("../util/promptProcessor.js");
const agentFileState = await serviceContainer.get<AgentFileServiceState>(
SERVICE_NAMES.AGENT_FILE,
);
Expand Down
15 changes: 6 additions & 9 deletions extensions/cli/src/compaction.infiniteLoop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ describe("compaction infinite loop prevention", () => {
const mockLlmApi = {} as BaseLlmApi;

it("should not loop infinitely when pruning doesn't reduce history size", async () => {
const { countChatHistoryTokens, getModelContextLimit } = await import(
"./util/tokenizer.js"
);
const { countChatHistoryTokens, getModelContextLimit } =
await import("./util/tokenizer.js");
const mockStreamResponse = vi.mocked(streamChatResponse);
const mockCountTokens = vi.mocked(countChatHistoryTokens);
const mockGetContextLimit = vi.mocked(getModelContextLimit);
Expand Down Expand Up @@ -62,9 +61,8 @@ describe("compaction infinite loop prevention", () => {
});

it("should not loop infinitely with history ending in assistant message", async () => {
const { countChatHistoryTokens, getModelContextLimit } = await import(
"./util/tokenizer.js"
);
const { countChatHistoryTokens, getModelContextLimit } =
await import("./util/tokenizer.js");
const mockStreamResponse = vi.mocked(streamChatResponse);
const mockCountTokens = vi.mocked(countChatHistoryTokens);
const mockGetContextLimit = vi.mocked(getModelContextLimit);
Expand Down Expand Up @@ -94,9 +92,8 @@ describe("compaction infinite loop prevention", () => {
});

it("should successfully prune when pruning actually reduces size", async () => {
const { countChatHistoryTokens, getModelContextLimit } = await import(
"./util/tokenizer.js"
);
const { countChatHistoryTokens, getModelContextLimit } =
await import("./util/tokenizer.js");
const mockStreamResponse = vi.mocked(streamChatResponse);
const mockCountTokens = vi.mocked(countChatHistoryTokens);
const mockGetContextLimit = vi.mocked(getModelContextLimit);
Expand Down
5 changes: 2 additions & 3 deletions extensions/cli/src/e2e/config-switching.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ describe("Config Switching Implementation Test", () => {
});

test("ServiceContainer has required reactive methods", async () => {
const { serviceContainer } = await import(
"../services/ServiceContainer.js"
);
const { serviceContainer } =
await import("../services/ServiceContainer.js");

// Verify service container has all methods needed for reactive updates
expect(typeof serviceContainer.set).toBe("function");
Expand Down
5 changes: 2 additions & 3 deletions extensions/cli/src/e2e/git-branch-display.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@ models:
execSync("git checkout -b test-branch", { stdio: "ignore" });

// Test the formatting function
const { getResponsiveRepoText } = await import(
"../ui/hooks/useTUIChatHooks.js"
);
const { getResponsiveRepoText } =
await import("../ui/hooks/useTUIChatHooks.js");
const repoText = getResponsiveRepoText();

// Should include both repo and branch
Expand Down
5 changes: 2 additions & 3 deletions extensions/cli/src/e2e/local-config-switching.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ describe("Local Config Switching Investigation", () => {
// When switching to a local config, we call updateAssistantSlug(null)
// When switching to a remote config, we call updateAssistantSlug(configPath)

const { updateAssistantSlug, getAssistantSlug } = await import(
"../auth/workos.js"
);
const { updateAssistantSlug, getAssistantSlug } =
await import("../auth/workos.js");

expect(typeof updateAssistantSlug).toBe("function");
expect(typeof getAssistantSlug).toBe("function");
Expand Down
5 changes: 2 additions & 3 deletions extensions/cli/src/services/agent-file-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,8 @@ describe("Agent file Integration Tests", () => {
});

// mergeUnrolledAssistants would combine this with base config prompts
const { mergeUnrolledAssistants } = await import(
"@continuedev/config-yaml"
);
const { mergeUnrolledAssistants } =
await import("@continuedev/config-yaml");
const baseConfig = {
name: "original",
version: "1.0.0",
Expand Down
5 changes: 2 additions & 3 deletions extensions/cli/src/slashCommands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,8 @@ describe("slashCommands", () => {
it("should use test session directory when in test mode", async () => {
const { isAuthenticated } = await import("./auth/workos.js");
const { services } = await import("./services/index.js");
const { getSessionFilePath, getCurrentSession } = await import(
"./session.js"
);
const { getSessionFilePath, getCurrentSession } =
await import("./session.js");

// Mock the session functions for this specific test
(getSessionFilePath as any).mockReturnValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ describe("handleAutoCompaction", () => {
});

it("should perform auto-compaction when context limit is approaching", async () => {
const { shouldAutoCompact, getAutoCompactMessage } = await import(
"../util/tokenizer.js"
);
const { shouldAutoCompact, getAutoCompactMessage } =
await import("../util/tokenizer.js");
const { compactChatHistory } = await import("../compaction.js");
const { updateSessionHistory } = await import("../session.js");

Expand Down Expand Up @@ -184,9 +183,8 @@ describe("handleAutoCompaction", () => {
});

it("should handle compaction errors gracefully", async () => {
const { shouldAutoCompact, getAutoCompactMessage } = await import(
"../util/tokenizer.js"
);
const { shouldAutoCompact, getAutoCompactMessage } =
await import("../util/tokenizer.js");
const { compactChatHistory } = await import("../compaction.js");
const { logger } = await import("../util/logger.js");

Expand Down Expand Up @@ -227,9 +225,8 @@ describe("handleAutoCompaction", () => {
});

it("should not call system message callback in headless mode", async () => {
const { shouldAutoCompact, getAutoCompactMessage } = await import(
"../util/tokenizer.js"
);
const { shouldAutoCompact, getAutoCompactMessage } =
await import("../util/tokenizer.js");
const { compactChatHistory } = await import("../compaction.js");

vi.mocked(shouldAutoCompact).mockReturnValue(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ describe("streamChatResponse - auto-continuation after compaction", () => {

it("should automatically continue after compaction when no tool calls remain", async () => {
const { services } = await import("../services/index.js");
const { handleNormalAutoCompaction } = await import(
"./streamChatResponse.compactionHelpers.js"
);
const { handleNormalAutoCompaction } =
await import("./streamChatResponse.compactionHelpers.js");
const { logger } = await import("../util/logger.js");

// Track history modifications
Expand Down Expand Up @@ -205,9 +204,8 @@ describe("streamChatResponse - auto-continuation after compaction", () => {

it("should not auto-continue if compaction occurs with tool calls pending", async () => {
const { services } = await import("../services/index.js");
const { handleNormalAutoCompaction } = await import(
"./streamChatResponse.compactionHelpers.js"
);
const { handleNormalAutoCompaction } =
await import("./streamChatResponse.compactionHelpers.js");
const { handleToolCalls } = await import("./handleToolCalls.js");

const historyUpdates: string[] = [];
Expand Down Expand Up @@ -273,9 +271,8 @@ describe("streamChatResponse - auto-continuation after compaction", () => {

it("should not create infinite loops - flag is reset after continuation", async () => {
const { services } = await import("../services/index.js");
const { handleNormalAutoCompaction } = await import(
"./streamChatResponse.compactionHelpers.js"
);
const { handleNormalAutoCompaction } =
await import("./streamChatResponse.compactionHelpers.js");

const historyUpdates: string[] = [];
vi.mocked(services.chatHistory.addUserMessage).mockImplementation((msg) => {
Expand Down
Loading
Loading