Merge branch 'main' of https://github.com/continuedev/continue into fix/terminal-security-newline-bypass
This commit is contained in:
commit
28cdb4e586
228 changed files with 68039 additions and 5449 deletions
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -13,7 +13,7 @@ body:
|
|||
options:
|
||||
- label: I've tried using the "Ask AI" feature on the [Continue docs site](https://docs.continue.dev/) to see if the docs have an answer
|
||||
required: false
|
||||
- label: I believe this is a bug. I'll try to join the [Continue Discord](https://discord.gg/NWtdYexhMs) for questions
|
||||
- label: I'm not able to find a related conversation on [GitHub discussions](https://github.com/continuedev/continue/discussions) that reports the same bug
|
||||
required: false
|
||||
- label: I'm not able to find an [open issue](https://github.com/continuedev/continue/issues?q=is%3Aopen+is%3Aissue) that reports the same bug
|
||||
required: false
|
||||
|
|
|
|||
2
.github/workflows/cla.yaml
vendored
2
.github/workflows/cla.yaml
vendored
|
|
@ -27,5 +27,5 @@ jobs:
|
|||
path-to-document: "https://github.com/continuedev/continue/blob/main/CLA.md"
|
||||
branch: cla-signatures
|
||||
# Bots and CLAs signed outside of GitHub
|
||||
allowlist: dependabot[bot],fbricon,panyamkeerthana,Jazzcort,owtaylor,halfline,agent@continue.dev,action@github.com
|
||||
allowlist: dependabot[bot],fbricon,panyamkeerthana,Jazzcort,owtaylor,halfline,agent@continue.dev,action@github.com,snyk-bot
|
||||
signed-commit-message: "CLA signed in $pullRequestNo"
|
||||
|
|
|
|||
2
.github/workflows/cli-pr-checks.yml
vendored
2
.github/workflows/cli-pr-checks.yml
vendored
|
|
@ -3,6 +3,8 @@ name: CLI PR Checks
|
|||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
|
|||
24
.github/workflows/jetbrains-release.yaml
vendored
24
.github/workflows/jetbrains-release.yaml
vendored
|
|
@ -95,7 +95,7 @@ jobs:
|
|||
needs: check_release_name
|
||||
if: needs.check_release_name.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch'
|
||||
name: Build Plugin
|
||||
runs-on: macos-13
|
||||
runs-on: macos-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
|
@ -294,44 +294,44 @@ jobs:
|
|||
|
||||
# Store already-built plugin as an artifact for downloading
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: ${{ steps.artifact.outputs.filename }}
|
||||
path: ./extensions/intellij/build/distributions/content/*/*
|
||||
|
||||
# Upload binaries as artifacts
|
||||
- name: Upload artifact (darwin-arm64)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: continue-binary-darwin-arm64
|
||||
path: ./binary/bin/darwin-arm64/
|
||||
|
||||
- name: Upload artifact (darwin-x64)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: continue-binary-darwin-x64
|
||||
path: ./binary/bin/darwin-x64/
|
||||
|
||||
- name: Upload artifact (win32-x64)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: continue-binary-win32-x64
|
||||
path: ./binary/bin/win32-x64/
|
||||
|
||||
- name: Upload artifact (win32-arm64)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: continue-binary-win32-arm64
|
||||
path: ./binary/bin/win32-arm64/
|
||||
|
||||
- name: Upload artifact (linux-arm64)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: continue-binary-linux-arm64
|
||||
path: ./binary/bin/linux-arm64/
|
||||
|
||||
- name: Upload artifact (linux-x64)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: continue-binary-linux-x64
|
||||
path: ./binary/bin/linux-x64/
|
||||
|
|
@ -358,7 +358,7 @@ jobs:
|
|||
platform: darwin
|
||||
arch: x64
|
||||
npm_config_arch: x64
|
||||
- os: macos-13
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
arch: arm64
|
||||
npm_config_arch: arm64
|
||||
|
|
@ -420,7 +420,7 @@ jobs:
|
|||
|
||||
- name: Upload logs
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: core-logs-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
path: ~/.continue/logs/core.log
|
||||
|
|
@ -455,7 +455,7 @@ jobs:
|
|||
# Collect Tests Result of failed tests
|
||||
- name: Collect Tests Result
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: tests-result
|
||||
path: ${{ github.workspace }}/extensions/intellij/build/reports/tests
|
||||
|
|
@ -540,7 +540,7 @@ jobs:
|
|||
# Collect Plugin Verifier Result
|
||||
- name: Collect Plugin Verifier Result
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: pluginVerifier-result
|
||||
path: ${{ github.workspace }}/build/reports/pluginVerifier
|
||||
|
|
|
|||
2
.github/workflows/main-build.yaml
vendored
2
.github/workflows/main-build.yaml
vendored
|
|
@ -101,7 +101,7 @@ jobs:
|
|||
echo "✅ Successfully downloaded artifact"
|
||||
|
||||
- name: Republish as main branch artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: vscode-extension-build-${{ matrix.platform }}
|
||||
path: ./temp-download/*
|
||||
|
|
|
|||
6
.github/workflows/main.yaml
vendored
6
.github/workflows/main.yaml
vendored
|
|
@ -73,11 +73,11 @@ jobs:
|
|||
platform: alpine
|
||||
arch: x64
|
||||
npm_config_arch: x64
|
||||
- os: macos-13
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
arch: x64
|
||||
npm_config_arch: x64
|
||||
- os: macos-13
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
arch: arm64
|
||||
npm_config_arch: arm64
|
||||
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload .vsix artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: ${{ matrix.platform }}-${{ matrix.arch }}-vsix
|
||||
path: "extensions/vscode/*.vsix"
|
||||
|
|
|
|||
2
.github/workflows/metrics.yaml
vendored
2
.github/workflows/metrics.yaml
vendored
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
${{ steps.read-metrics.outputs.metrics_content }}
|
||||
|
||||
- name: Upload metrics report as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: issue-metrics-report
|
||||
path: ./issue_metrics.md
|
||||
|
|
|
|||
4
.github/workflows/pr-build-upload-vsix.yaml
vendored
4
.github/workflows/pr-build-upload-vsix.yaml
vendored
|
|
@ -39,13 +39,13 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: vscode-extension-build-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
path: extensions/vscode/build
|
||||
|
||||
- name: Upload .vsix artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: ${{ matrix.platform }}-${{ matrix.arch }}-vsix
|
||||
path: "extensions/vscode/*.vsix"
|
||||
|
|
|
|||
17
.github/workflows/pr-checks.yaml
vendored
17
.github/workflows/pr-checks.yaml
vendored
|
|
@ -5,10 +5,14 @@ on:
|
|||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
|
||||
jobs:
|
||||
track-rerun:
|
||||
|
|
@ -303,7 +307,7 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: vscode-extension-build-Linux
|
||||
path: extensions/vscode/build
|
||||
|
|
@ -334,6 +338,17 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Free disk space
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: false
|
||||
docker-images: true
|
||||
swap-storage: true
|
||||
|
||||
- uses: actions/checkout@v5
|
||||
- name: Run JetBrains tests
|
||||
uses: ./.github/actions/run-jetbrains-tests
|
||||
|
|
|
|||
6
.github/workflows/preview.yaml
vendored
6
.github/workflows/preview.yaml
vendored
|
|
@ -57,11 +57,11 @@ jobs:
|
|||
platform: alpine
|
||||
arch: x64
|
||||
npm_config_arch: x64
|
||||
- os: macos-13
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
arch: x64
|
||||
npm_config_arch: x64
|
||||
- os: macos-13
|
||||
- os: macos-latest
|
||||
platform: darwin
|
||||
arch: arm64
|
||||
npm_config_arch: arm64
|
||||
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload .vsix artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: ${{ matrix.platform }}-${{ matrix.arch }}-vsix
|
||||
path: "extensions/vscode/*.vsix"
|
||||
|
|
|
|||
28
README.md
28
README.md
|
|
@ -27,35 +27,29 @@
|
|||
|
||||
**Ship faster with Continuous AI**
|
||||
|
||||
**Build and run custom agents across your IDE, terminal, and CI**
|
||||
**The future of coding isn't writing more code. It's delegating the boring parts, so you can build the interesting stuff**
|
||||
|
||||
</div>
|
||||
|
||||
Get started in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue), [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension), or [CLI](https://docs.continue.dev/guides/cli)
|
||||
Get started in [Mission Control](https://hub.continue.dev/agents), [CLI (Headless Mode)](https://docs.continue.dev/cli/quick-start#headless-mode), or [CLI (TUI mode)](https://docs.continue.dev/cli/quick-start#tui-mode)
|
||||
|
||||
## Agent
|
||||
## Cloud Agents
|
||||
|
||||
[Agent](https://docs.continue.dev/ide-extensions/agent/quick-start) to work on development tasks together with AI
|
||||
Set workflows to run automatically on [PR opens](https://docs.continue.dev/guides/continuous-ai#pattern-2-the-pr-review-agent), [schedules](https://docs.continue.dev/guides/continuous-ai#pattern-1-the-async-triage-bot), or [any event trigger](https://docs.continue.dev/cli/quick-start#headless-mode)
|
||||
|
||||

|
||||

|
||||
|
||||
## Chat
|
||||
## CLI Agents
|
||||
|
||||
[Chat](https://docs.continue.dev/ide-extensions/chat/quick-start) to ask general questions and clarify code sections
|
||||
Watch workflows execute in real-time and approve decisions step-by-step from your [terminal](https://docs.continue.dev/cli/quick-start#tui-mode)
|
||||
|
||||

|
||||

|
||||
|
||||
## Edit
|
||||
## IDE Agents
|
||||
|
||||
[Edit](https://docs.continue.dev/ide-extensions/edit/quick-start) to modify a code section without leaving your current file
|
||||
Trigger workflows from [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)—let agents handle the refactoring while you keep coding
|
||||
|
||||

|
||||
|
||||
## Autocomplete
|
||||
|
||||
[Autocomplete](https://docs.continue.dev/ide-extensions/autocomplete/quick-start) to receive inline code suggestions as you type
|
||||
|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
59025
binary/package-lock.json
generated
59025
binary/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -52,7 +52,7 @@
|
|||
"node-fetch": "^3.3.2",
|
||||
"posthog-node": "^3.6.3",
|
||||
"system-ca": "^1.0.2",
|
||||
"tar": "^7.4.3",
|
||||
"tar": "^7.5.1",
|
||||
"undici": "^7.10.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import AutocompleteLruCache from "./util/AutocompleteLruCache.js";
|
|||
import { HelperVars } from "./util/HelperVars.js";
|
||||
import { AutocompleteInput, AutocompleteOutcome } from "./util/types.js";
|
||||
|
||||
const autocompleteCache = AutocompleteLruCache.get();
|
||||
const autocompleteCachePromise = AutocompleteLruCache.get();
|
||||
|
||||
// Errors that can be expected on occasion even during normal functioning should not be shown.
|
||||
// Not worth disrupting the user to tell them that a single autocomplete request didn't go through
|
||||
|
|
@ -31,7 +31,7 @@ const ERRORS_TO_IGNORE = [
|
|||
];
|
||||
|
||||
export class CompletionProvider {
|
||||
private autocompleteCache = AutocompleteLruCache.get();
|
||||
private autocompleteCache?: AutocompleteLruCache;
|
||||
public errorsShown: Set<string> = new Set();
|
||||
private bracketMatchingService = new BracketMatchingService();
|
||||
private debouncer = new AutocompleteDebouncer();
|
||||
|
|
@ -48,6 +48,22 @@ export class CompletionProvider {
|
|||
) {
|
||||
this.completionStreamer = new CompletionStreamer(this.onError.bind(this));
|
||||
this.contextRetrievalService = new ContextRetrievalService(this.ide);
|
||||
void this.initCache();
|
||||
}
|
||||
|
||||
private async initCache() {
|
||||
try {
|
||||
this.autocompleteCache = await autocompleteCachePromise;
|
||||
} catch (e) {
|
||||
console.error("Failed to initialize autocomplete cache:", e);
|
||||
}
|
||||
}
|
||||
|
||||
private async getCache(): Promise<AutocompleteLruCache> {
|
||||
if (!this.autocompleteCache) {
|
||||
this.autocompleteCache = await autocompleteCachePromise;
|
||||
}
|
||||
return this.autocompleteCache;
|
||||
}
|
||||
|
||||
private async _prepareLlm(): Promise<ILLM | undefined> {
|
||||
|
|
@ -201,14 +217,12 @@ export class CompletionProvider {
|
|||
|
||||
// Completion
|
||||
let completion: string | undefined = "";
|
||||
|
||||
const cache = await autocompleteCache;
|
||||
const cache = await this.getCache();
|
||||
const cachedCompletion = helper.options.useCache
|
||||
? await cache.get(helper.prunedPrefix)
|
||||
: undefined;
|
||||
let cacheHit = false;
|
||||
if (cachedCompletion) {
|
||||
// Cache
|
||||
cacheHit = true;
|
||||
completion = cachedCompletion;
|
||||
} else {
|
||||
|
|
@ -277,16 +291,12 @@ export class CompletionProvider {
|
|||
outcome.enabledStaticContextualization = true;
|
||||
}
|
||||
|
||||
//////////
|
||||
|
||||
// Save to cache
|
||||
if (!outcome.cacheHit && helper.options.useCache) {
|
||||
(await this.autocompleteCache)
|
||||
void cache
|
||||
.put(outcome.prefix, outcome.completion)
|
||||
.catch((e) => console.warn(`Failed to save to cache: ${e.message}`));
|
||||
}
|
||||
|
||||
// When using the JetBrains extension, Mark as displayed
|
||||
const ideType = (await this.ide.getIdeInfo()).ideType;
|
||||
if (ideType === "jetbrains") {
|
||||
this.markDisplayed(input.completionId, outcome);
|
||||
|
|
@ -299,4 +309,10 @@ export class CompletionProvider {
|
|||
this.loggingService.deleteAbortController(input.completionId);
|
||||
}
|
||||
}
|
||||
|
||||
public async dispose() {
|
||||
if (this.autocompleteCache) {
|
||||
await this.autocompleteCache.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import * as fs from "fs/promises";
|
||||
import path from "path";
|
||||
import { pathToFileURL } from "url";
|
||||
import Parser from "web-tree-sitter";
|
||||
import { IDE, Position } from "../../..";
|
||||
import { FileType, IDE, Position } from "../../../";
|
||||
import { localPathOrUriToPath } from "../../../util/pathToUri";
|
||||
import { getFullLanguageName, getQueryForFile } from "../../../util/treeSitter";
|
||||
import {
|
||||
|
|
@ -353,10 +352,7 @@ export class StaticContextService {
|
|||
if (foundContents.has(tdLocation.filepath)) {
|
||||
content = foundContents.get(tdLocation.filepath)!;
|
||||
} else {
|
||||
content = await fs.readFile(
|
||||
localPathOrUriToPath(tdLocation.filepath),
|
||||
"utf8",
|
||||
);
|
||||
content = await this.ide.readFile(tdLocation.filepath);
|
||||
foundContents.set(tdLocation.filepath, content);
|
||||
}
|
||||
|
||||
|
|
@ -854,24 +850,19 @@ export class StaticContextService {
|
|||
return skipDirs.includes(dirName) || dirName.startsWith(".");
|
||||
};
|
||||
|
||||
async function scanRecursively(currentPath: string): Promise<void> {
|
||||
const scanRecursively = async (currentPath: string): Promise<void> => {
|
||||
try {
|
||||
const entries = await fs.readdir(currentPath, {
|
||||
withFileTypes: true,
|
||||
});
|
||||
const currentUri = pathToFileURL(currentPath).toString();
|
||||
const entries = await this.ide.listDir(currentUri);
|
||||
for (const [name, fileType] of entries) {
|
||||
const fullPath = localPathOrUriToPath(path.join(currentPath, name));
|
||||
|
||||
for (const entry of entries) {
|
||||
const fullPath = localPathOrUriToPath(
|
||||
path.join(currentPath, entry.name),
|
||||
);
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
// Skip common directories that typically don't contain source files
|
||||
if (!shouldSkipDirectory(entry.name)) {
|
||||
if (fileType === (2 as FileType.Directory)) {
|
||||
if (!shouldSkipDirectory(name)) {
|
||||
await scanRecursively(fullPath);
|
||||
}
|
||||
} else if (entry.isFile()) {
|
||||
const extension = path.extname(entry.name).toLowerCase();
|
||||
} else if (fileType === (1 as FileType.File)) {
|
||||
const extension = path.extname(name).toLowerCase();
|
||||
if (tsExtensions.includes(extension)) {
|
||||
tsFiles.push(fullPath);
|
||||
}
|
||||
|
|
@ -880,7 +871,7 @@ export class StaticContextService {
|
|||
} catch (error) {
|
||||
console.error(`Error reading directory ${currentPath}:`, error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
await scanRecursively(dirPath);
|
||||
return tsFiles;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,21 @@ const qwenCoderFimTemplate: AutocompleteTemplate = {
|
|||
},
|
||||
};
|
||||
|
||||
// https://www.ibm.com/granite/docs/models/granite#fim
|
||||
const granite4FimTemplate: AutocompleteTemplate = {
|
||||
template:
|
||||
"<|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>",
|
||||
completionOptions: {
|
||||
stop: [
|
||||
"<|end_of_text|>",
|
||||
"<|fim_prefix|>",
|
||||
"<|fim_middle|>",
|
||||
"<|fim_suffix|>",
|
||||
"<|fim_pad|>",
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
const seedCoderFimTemplate: AutocompleteTemplate = {
|
||||
template:
|
||||
"<[fim-prefix]>{{{prefix}}}<[fim-suffix]>{{{suffix}}}<[fim-middle]>",
|
||||
|
|
@ -177,7 +192,7 @@ const mercuryMultifileFimTemplate: AutocompleteTemplate = {
|
|||
suffix,
|
||||
];
|
||||
}
|
||||
return [`<|fim_prefix|>${prefix}`, suffix];
|
||||
return [`${prefix}`, suffix];
|
||||
}
|
||||
|
||||
const relativePaths = getShortestUniqueRelativeUriPaths(
|
||||
|
|
@ -442,6 +457,10 @@ export function getTemplateForModel(model: string): AutocompleteTemplate {
|
|||
return qwenCoderFimTemplate;
|
||||
}
|
||||
|
||||
if (lowerCaseModel.includes("granite") && lowerCaseModel.includes("4")) {
|
||||
return granite4FimTemplate;
|
||||
}
|
||||
|
||||
if (lowerCaseModel.includes("seed") && lowerCaseModel.includes("coder")) {
|
||||
return seedCoderFimTemplate;
|
||||
}
|
||||
|
|
|
|||
650
core/autocomplete/util/AutocompleteLruCache.test.ts
Normal file
650
core/autocomplete/util/AutocompleteLruCache.test.ts
Normal file
|
|
@ -0,0 +1,650 @@
|
|||
import AutocompleteLruCache from "./AutocompleteLruCache";
|
||||
|
||||
jest.mock("async-mutex", () => {
|
||||
const acquire = jest.fn().mockResolvedValue(jest.fn());
|
||||
return {
|
||||
Mutex: jest.fn().mockImplementation(() => ({ acquire })),
|
||||
};
|
||||
});
|
||||
jest.mock("sqlite");
|
||||
jest.mock("sqlite3");
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
describe("AutocompleteLruCache", () => {
|
||||
let mockDb: any;
|
||||
let cache: AutocompleteLruCache;
|
||||
let currentTime: number;
|
||||
|
||||
const createMockDb = () => ({
|
||||
run: jest.fn().mockResolvedValue(undefined),
|
||||
all: jest.fn().mockResolvedValue([]),
|
||||
exec: jest.fn().mockResolvedValue(undefined),
|
||||
close: jest.fn().mockResolvedValue(undefined),
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllTimers();
|
||||
jest.clearAllMocks();
|
||||
currentTime = 1000000;
|
||||
jest.spyOn(Date, "now").mockImplementation(() => currentTime);
|
||||
|
||||
mockDb = createMockDb();
|
||||
cache = new (AutocompleteLruCache as any)(mockDb);
|
||||
|
||||
// Reset static properties
|
||||
(AutocompleteLruCache as any).capacity = 1000;
|
||||
(AutocompleteLruCache as any).flushInterval = 30000;
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Clean up any running timers
|
||||
if ((cache as any).flushTimer) {
|
||||
clearInterval((cache as any).flushTimer);
|
||||
}
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// BASIC CACHE OPERATIONS
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("Basic Cache Operations", () => {
|
||||
describe("put() method", () => {
|
||||
it("should store a new entry in the cache", async () => {
|
||||
await cache.put("hello", "world");
|
||||
|
||||
const internalCache = (cache as any).cache;
|
||||
expect(internalCache.has("hello")).toBe(true);
|
||||
expect(internalCache.get("hello")).toEqual({
|
||||
value: "world",
|
||||
timestamp: currentTime,
|
||||
});
|
||||
});
|
||||
|
||||
it("should mark entry as dirty after put", async () => {
|
||||
await cache.put("key", "value");
|
||||
|
||||
const dirtySet = (cache as any).dirty;
|
||||
expect(dirtySet.has("key")).toBe(true);
|
||||
});
|
||||
|
||||
it("should update existing entry with new value and timestamp", async () => {
|
||||
await cache.put("key", "old");
|
||||
currentTime += 5000;
|
||||
await cache.put("key", "new");
|
||||
|
||||
const entry = (cache as any).cache.get("key");
|
||||
expect(entry.value).toBe("new");
|
||||
expect(entry.timestamp).toBe(currentTime);
|
||||
});
|
||||
|
||||
it("should handle prefix storage correctly", async () => {
|
||||
await cache.put("original_prefix", "completion");
|
||||
const internalCache = (cache as any).cache;
|
||||
expect(internalCache.size).toBe(1);
|
||||
});
|
||||
|
||||
it("should acquire mutex lock during put operation", async () => {
|
||||
const releaseSpy = jest.fn();
|
||||
const mutex = (cache as any).mutex;
|
||||
const acquireSpy = jest
|
||||
.spyOn(mutex, "acquire")
|
||||
.mockResolvedValue(releaseSpy);
|
||||
|
||||
await cache.put("test", "value");
|
||||
|
||||
expect(acquireSpy).toHaveBeenCalled();
|
||||
expect(releaseSpy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe("get() method", () => {
|
||||
it("should retrieve exact match from cache", async () => {
|
||||
await cache.put("prefix", "completion");
|
||||
|
||||
const result = await cache.get("prefix");
|
||||
expect(result).toBe("completion");
|
||||
});
|
||||
|
||||
it("should return undefined when no match exists", async () => {
|
||||
const result = await cache.get("nonexistent");
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should update timestamp when entry is accessed", async () => {
|
||||
await cache.put("key", "value");
|
||||
const originalTimestamp = (cache as any).cache.get("key").timestamp;
|
||||
|
||||
currentTime += 10000;
|
||||
await cache.get("key");
|
||||
|
||||
const updatedTimestamp = (cache as any).cache.get("key").timestamp;
|
||||
expect(updatedTimestamp).toBe(currentTime);
|
||||
expect(updatedTimestamp).toBeGreaterThan(originalTimestamp);
|
||||
});
|
||||
|
||||
it("should mark entry as dirty after updating timestamp", async () => {
|
||||
await cache.put("key", "value");
|
||||
(cache as any).dirty.clear();
|
||||
|
||||
await cache.get("key");
|
||||
|
||||
expect((cache as any).dirty.has("key")).toBe(true);
|
||||
});
|
||||
|
||||
it("should find longest matching prefix", async () => {
|
||||
await cache.put("hel", "lo_world");
|
||||
await cache.put("hello", "_user_suffix");
|
||||
const result = await cache.get("hello_user");
|
||||
expect(result).toBe("_suffix");
|
||||
});
|
||||
|
||||
it("should return completion with correct prefix stripped", async () => {
|
||||
await cache.put("pre", "fix_completion");
|
||||
|
||||
const result = await cache.get("prefix");
|
||||
expect(result).toBe("_completion");
|
||||
});
|
||||
|
||||
it("should validate that completion starts with remaining prefix", async () => {
|
||||
await cache.put("abc", "xyz");
|
||||
|
||||
// "abcdef" starts with "abc", remaining is "def"
|
||||
// But cached value "xyz" doesn't start with "def"
|
||||
const result = await cache.get("abcdef");
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should handle prefix matching logic", async () => {
|
||||
await cache.put("pre", "fix_completion");
|
||||
|
||||
const result = await cache.get("prefix");
|
||||
// Result depends on truncateSqliteLikePattern behavior
|
||||
expect(
|
||||
result === "fix_completion" ||
|
||||
result === "_completion" ||
|
||||
result === undefined,
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// LRU EVICTION MECHANISM
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("LRU Eviction", () => {
|
||||
beforeEach(() => {
|
||||
(AutocompleteLruCache as any).capacity = 3;
|
||||
});
|
||||
|
||||
it("should respect capacity limit", async () => {
|
||||
await cache.put("a", "1");
|
||||
await cache.put("b", "2");
|
||||
await cache.put("c", "3");
|
||||
|
||||
expect((cache as any).cache.size).toBe(3);
|
||||
|
||||
await cache.put("d", "4");
|
||||
|
||||
expect((cache as any).cache.size).toBe(3);
|
||||
});
|
||||
|
||||
it("should evict oldest entry when capacity exceeded", async () => {
|
||||
await cache.put("a", "1");
|
||||
currentTime += 1000;
|
||||
await cache.put("b", "2");
|
||||
currentTime += 1000;
|
||||
await cache.put("c", "3");
|
||||
currentTime += 1000;
|
||||
await cache.put("d", "4"); // Should evict "a"
|
||||
|
||||
expect(await cache.get("a")).toBeUndefined();
|
||||
expect(await cache.get("b")).toBe("2");
|
||||
expect(await cache.get("c")).toBe("3");
|
||||
expect(await cache.get("d")).toBe("4");
|
||||
});
|
||||
|
||||
it("should keep recently accessed entries during eviction", async () => {
|
||||
await cache.put("a", "1");
|
||||
currentTime += 1000;
|
||||
await cache.put("b", "2");
|
||||
currentTime += 1000;
|
||||
await cache.put("c", "3");
|
||||
currentTime += 1000;
|
||||
|
||||
// Access "a" to make it recent
|
||||
await cache.get("a");
|
||||
currentTime += 1000;
|
||||
|
||||
await cache.put("d", "4"); // Should evict "b" (oldest)
|
||||
|
||||
expect(await cache.get("a")).toBe("1");
|
||||
expect(await cache.get("b")).toBeUndefined();
|
||||
expect(await cache.get("c")).toBe("3");
|
||||
expect(await cache.get("d")).toBe("4");
|
||||
});
|
||||
|
||||
it("should mark evicted entry as dirty for database deletion", async () => {
|
||||
await cache.put("a", "1");
|
||||
await cache.put("b", "2");
|
||||
await cache.put("c", "3");
|
||||
|
||||
(cache as any).dirty.clear();
|
||||
|
||||
await cache.put("d", "4");
|
||||
|
||||
const dirtySet = (cache as any).dirty;
|
||||
expect(dirtySet.size).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it("should handle capacity of 1", async () => {
|
||||
(AutocompleteLruCache as any).capacity = 1;
|
||||
|
||||
await cache.put("a", "1");
|
||||
await cache.put("b", "2");
|
||||
|
||||
expect((cache as any).cache.size).toBe(1);
|
||||
expect(await cache.get("a")).toBeUndefined();
|
||||
expect(await cache.get("b")).toBe("2");
|
||||
});
|
||||
|
||||
it("should find oldest entry among multiple old entries", async () => {
|
||||
await cache.put("a", "1");
|
||||
currentTime += 100;
|
||||
await cache.put("b", "2");
|
||||
currentTime += 100;
|
||||
await cache.put("c", "3");
|
||||
|
||||
// Make "b" oldest by accessing "a" and "c"
|
||||
currentTime += 100;
|
||||
await cache.get("c");
|
||||
currentTime += 100;
|
||||
await cache.get("a");
|
||||
currentTime += 100;
|
||||
|
||||
await cache.put("d", "4"); // Should evict "b"
|
||||
|
||||
expect(await cache.get("b")).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// DATABASE PERSISTENCE & FLUSH
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("Database Persistence", () => {
|
||||
describe("flush() method", () => {
|
||||
it("should do nothing when dirty set is empty", async () => {
|
||||
await cache.flush();
|
||||
|
||||
expect(mockDb.run).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should wrap operations in transaction", async () => {
|
||||
await cache.put("key", "value");
|
||||
await cache.flush();
|
||||
|
||||
const calls = mockDb.run.mock.calls;
|
||||
expect(calls[0][0]).toBe("BEGIN TRANSACTION");
|
||||
expect(calls[calls.length - 1][0]).toBe("COMMIT");
|
||||
});
|
||||
|
||||
it("should perform upsert for existing cache entries", async () => {
|
||||
await cache.put("foo", "bar");
|
||||
await cache.flush();
|
||||
|
||||
expect(mockDb.run).toHaveBeenCalledWith(
|
||||
expect.stringContaining("INSERT INTO cache"),
|
||||
"foo",
|
||||
"bar",
|
||||
currentTime,
|
||||
"bar",
|
||||
currentTime,
|
||||
);
|
||||
});
|
||||
|
||||
it("should delete entries removed from cache", async () => {
|
||||
await cache.put("temp", "value");
|
||||
(cache as any).cache.delete("temp");
|
||||
(cache as any).dirty.add("temp");
|
||||
|
||||
await cache.flush();
|
||||
|
||||
expect(mockDb.run).toHaveBeenCalledWith(
|
||||
"DELETE FROM cache WHERE key = ?",
|
||||
"temp",
|
||||
);
|
||||
});
|
||||
|
||||
it("should clear dirty set after successful flush", async () => {
|
||||
await cache.put("key1", "val1");
|
||||
await cache.put("key2", "val2");
|
||||
|
||||
expect((cache as any).dirty.size).toBe(2);
|
||||
|
||||
await cache.flush();
|
||||
|
||||
expect((cache as any).dirty.size).toBe(0);
|
||||
});
|
||||
|
||||
it("should rollback transaction on error", async () => {
|
||||
await cache.put("key", "value");
|
||||
mockDb.run.mockImplementation((sql: string) => {
|
||||
if (sql.includes("INSERT")) {
|
||||
return Promise.reject(new Error("DB Error"));
|
||||
}
|
||||
return Promise.resolve();
|
||||
});
|
||||
|
||||
await cache.flush();
|
||||
|
||||
expect(mockDb.run).toHaveBeenCalledWith("ROLLBACK");
|
||||
});
|
||||
|
||||
it("should log error when flush fails", async () => {
|
||||
const consoleError = jest.spyOn(console, "error").mockImplementation();
|
||||
await cache.put("key", "value");
|
||||
const dbError = new Error("Database failure");
|
||||
mockDb.run.mockRejectedValueOnce(dbError);
|
||||
|
||||
await cache.flush();
|
||||
|
||||
expect(consoleError).toHaveBeenCalledWith(
|
||||
"Error flushing cache:",
|
||||
dbError,
|
||||
);
|
||||
|
||||
consoleError.mockRestore();
|
||||
});
|
||||
|
||||
it("should acquire mutex during flush", async () => {
|
||||
const releaseSpy = jest.fn();
|
||||
const mutex = (cache as any).mutex;
|
||||
const acquireSpy = jest
|
||||
.spyOn(mutex, "acquire")
|
||||
.mockResolvedValue(releaseSpy);
|
||||
|
||||
await cache.put("key", "value");
|
||||
await cache.flush();
|
||||
|
||||
expect(acquireSpy).toHaveBeenCalled();
|
||||
expect(releaseSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should release mutex even if error occurs", async () => {
|
||||
const consoleError = jest.spyOn(console, "error").mockImplementation();
|
||||
const releaseSpy = jest.fn();
|
||||
jest
|
||||
.spyOn((cache as any).mutex, "acquire")
|
||||
.mockResolvedValue(releaseSpy);
|
||||
|
||||
await cache.put("key", "value");
|
||||
|
||||
const originalRun = mockDb.run;
|
||||
mockDb.run = jest.fn().mockImplementation((sql: string) => {
|
||||
if (sql === "BEGIN TRANSACTION" || sql === "ROLLBACK") {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject(new Error("DB Error"));
|
||||
});
|
||||
|
||||
await cache.flush();
|
||||
|
||||
expect(releaseSpy).toHaveBeenCalled();
|
||||
expect(mockDb.run).toHaveBeenCalledWith("ROLLBACK");
|
||||
|
||||
// Restore
|
||||
mockDb.run = originalRun;
|
||||
consoleError.mockRestore();
|
||||
});
|
||||
|
||||
it("should handle multiple dirty entries in one flush", async () => {
|
||||
await cache.put("key1", "val1");
|
||||
await cache.put("key2", "val2");
|
||||
await cache.put("key3", "val3");
|
||||
|
||||
await cache.flush();
|
||||
|
||||
const insertCalls = mockDb.run.mock.calls.filter((call: any) =>
|
||||
call[0].includes("INSERT INTO cache"),
|
||||
);
|
||||
expect(insertCalls.length).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
describe("loadFromDb() method", () => {
|
||||
it("should load all entries from database", async () => {
|
||||
mockDb.all.mockResolvedValue([
|
||||
{ key: "a", value: "alpha", timestamp: 1000 },
|
||||
{ key: "b", value: "beta", timestamp: 2000 },
|
||||
]);
|
||||
|
||||
await (cache as any).loadFromDb();
|
||||
|
||||
const internalCache = (cache as any).cache;
|
||||
expect(internalCache.size).toBe(2);
|
||||
expect(internalCache.get("a")).toEqual({
|
||||
value: "alpha",
|
||||
timestamp: 1000,
|
||||
});
|
||||
expect(internalCache.get("b")).toEqual({
|
||||
value: "beta",
|
||||
timestamp: 2000,
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle empty database", async () => {
|
||||
mockDb.all.mockResolvedValue([]);
|
||||
|
||||
await (cache as any).loadFromDb();
|
||||
|
||||
expect((cache as any).cache.size).toBe(0);
|
||||
});
|
||||
|
||||
it("should query with correct SQL", async () => {
|
||||
await (cache as any).loadFromDb();
|
||||
|
||||
expect(mockDb.all).toHaveBeenCalledWith(
|
||||
"SELECT key, value, timestamp FROM cache",
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// AUTOMATIC FLUSH TIMER
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("Automatic Flush Timer", () => {
|
||||
it("should start timer on startFlushTimer()", () => {
|
||||
(cache as any).startFlushTimer();
|
||||
|
||||
expect((cache as any).flushTimer).toBeDefined();
|
||||
});
|
||||
|
||||
it("should call flush at configured intervals", async () => {
|
||||
(AutocompleteLruCache as any).flushInterval = 1000;
|
||||
const flushSpy = jest.spyOn(cache, "flush").mockResolvedValue();
|
||||
|
||||
(cache as any).startFlushTimer();
|
||||
|
||||
jest.advanceTimersByTime(1000);
|
||||
expect(flushSpy).toHaveBeenCalledTimes(1);
|
||||
|
||||
jest.advanceTimersByTime(1000);
|
||||
expect(flushSpy).toHaveBeenCalledTimes(2);
|
||||
|
||||
jest.advanceTimersByTime(1000);
|
||||
expect(flushSpy).toHaveBeenCalledTimes(3);
|
||||
|
||||
flushSpy.mockRestore();
|
||||
});
|
||||
|
||||
it("should handle flush errors gracefully", async () => {
|
||||
const consoleError = jest.spyOn(console, "error").mockImplementation();
|
||||
const flushError = new Error("Flush failed");
|
||||
jest.spyOn(cache, "flush").mockRejectedValue(flushError);
|
||||
|
||||
(AutocompleteLruCache as any).flushInterval = 1000;
|
||||
(cache as any).startFlushTimer();
|
||||
|
||||
jest.advanceTimersByTime(1000);
|
||||
await Promise.resolve(); // Let error handler run
|
||||
|
||||
expect(consoleError).toHaveBeenCalledWith(
|
||||
"Error flushing cache:",
|
||||
flushError,
|
||||
);
|
||||
|
||||
consoleError.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// RESOURCE CLEANUP
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("Resource Cleanup", () => {
|
||||
it("should clear timer on close()", async () => {
|
||||
(cache as any).startFlushTimer();
|
||||
const timerId = (cache as any).flushTimer;
|
||||
const clearSpy = jest.spyOn(global, "clearInterval");
|
||||
|
||||
await cache.close();
|
||||
|
||||
expect(clearSpy).toHaveBeenCalledWith(timerId);
|
||||
});
|
||||
|
||||
it("should flush pending changes on close()", async () => {
|
||||
await cache.put("key", "value");
|
||||
|
||||
await cache.close();
|
||||
|
||||
expect(mockDb.run).toHaveBeenCalledWith(
|
||||
expect.stringContaining("INSERT INTO cache"),
|
||||
"key",
|
||||
"value",
|
||||
currentTime,
|
||||
"value",
|
||||
currentTime,
|
||||
);
|
||||
});
|
||||
|
||||
it("should close database connection", async () => {
|
||||
await cache.close();
|
||||
|
||||
expect(mockDb.close).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should execute cleanup in correct order", async () => {
|
||||
(cache as any).startFlushTimer();
|
||||
await cache.put("key", "value");
|
||||
|
||||
const operations: string[] = [];
|
||||
|
||||
const originalClearInterval = clearInterval;
|
||||
const clearIntervalSpy = jest
|
||||
.spyOn(global, "clearInterval")
|
||||
.mockImplementation((id) => {
|
||||
operations.push("clearTimer");
|
||||
return originalClearInterval(id);
|
||||
});
|
||||
|
||||
const flushSpy = jest
|
||||
.spyOn(cache, "flush")
|
||||
.mockImplementation(async () => {
|
||||
operations.push("flush");
|
||||
});
|
||||
|
||||
const closeDbSpy = mockDb.close.mockImplementation(() => {
|
||||
operations.push("dbClose");
|
||||
return Promise.resolve();
|
||||
});
|
||||
|
||||
await cache.close();
|
||||
|
||||
expect(operations).toEqual(["clearTimer", "flush", "dbClose"]);
|
||||
|
||||
clearIntervalSpy.mockRestore();
|
||||
flushSpy.mockRestore();
|
||||
});
|
||||
|
||||
it("should handle close() when timer not started", async () => {
|
||||
// Don't start timer
|
||||
await expect(cache.close()).resolves.not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// EDGE CASES & SPECIAL SCENARIOS
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("Edge Cases", () => {
|
||||
it("should handle empty string as prefix", async () => {
|
||||
await cache.put("", "empty");
|
||||
const result = await cache.get("");
|
||||
|
||||
expect(result).toBe("empty");
|
||||
});
|
||||
|
||||
it("should handle very long prefixes", async () => {
|
||||
const longPrefix = "a".repeat(1000);
|
||||
await cache.put(longPrefix, "completion");
|
||||
|
||||
const result = await cache.get(longPrefix);
|
||||
expect(result).toBe("completion");
|
||||
});
|
||||
|
||||
it("should handle special characters in prefix", async () => {
|
||||
const specialPrefix = "test%_\\[";
|
||||
await cache.put(specialPrefix, "special");
|
||||
|
||||
const result = await cache.get(specialPrefix);
|
||||
expect(result).toBe("special");
|
||||
});
|
||||
|
||||
it("should handle Unicode characters", async () => {
|
||||
await cache.put("🚀", "rocket");
|
||||
const result = await cache.get("🚀");
|
||||
|
||||
expect(result).toBe("rocket");
|
||||
});
|
||||
|
||||
it("should handle multiple puts of same key", async () => {
|
||||
await cache.put("key", "first");
|
||||
await cache.put("key", "second");
|
||||
await cache.put("key", "third");
|
||||
|
||||
expect(await cache.get("key")).toBe("third");
|
||||
expect((cache as any).cache.size).toBe(1);
|
||||
});
|
||||
|
||||
it("should handle concurrent get operations", async () => {
|
||||
await cache.put("shared", "value");
|
||||
|
||||
const results = await Promise.all([
|
||||
cache.get("shared"),
|
||||
cache.get("shared"),
|
||||
cache.get("shared"),
|
||||
]);
|
||||
|
||||
expect(results).toEqual(["value", "value", "value"]);
|
||||
});
|
||||
});
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
// SINGLETON PATTERN (Static get() method)
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
describe("Singleton Pattern", () => {
|
||||
beforeEach(() => {
|
||||
// Reset singleton
|
||||
(AutocompleteLruCache as any).instancePromise = undefined;
|
||||
});
|
||||
|
||||
it("should return same instance on multiple calls", async () => {
|
||||
const mockOpen = jest.fn().mockResolvedValue(mockDb);
|
||||
jest.doMock("sqlite", () => ({ open: mockOpen }));
|
||||
|
||||
const instance1 = await AutocompleteLruCache.get();
|
||||
const instance2 = await AutocompleteLruCache.get();
|
||||
|
||||
expect(instance1).toBe(instance2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,121 +1,227 @@
|
|||
import { Mutex } from "async-mutex";
|
||||
import { open } from "sqlite";
|
||||
import sqlite3 from "sqlite3";
|
||||
|
||||
import {
|
||||
DatabaseConnection,
|
||||
truncateSqliteLikePattern,
|
||||
} from "../../indexing/refreshIndex.js";
|
||||
import { getTabAutocompleteCacheSqlitePath } from "../../util/paths.js";
|
||||
|
||||
interface CacheEntry {
|
||||
value: string;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* LRU cache for autocomplete results with SQLite persistence.
|
||||
*
|
||||
* Implements a least-recently-used cache that:
|
||||
* - Stores prefix-to-completion mappings in memory
|
||||
* - Periodically flushes changes to SQLite for persistence
|
||||
* - Evicts oldest entries when capacity is exceeded
|
||||
* - Supports prefix matching for flexible autocomplete retrieval
|
||||
*/
|
||||
export class AutocompleteLruCache {
|
||||
private static capacity = 1000;
|
||||
private static flushInterval = 30000;
|
||||
private static instancePromise?: Promise<AutocompleteLruCache>;
|
||||
private mutex = new Mutex();
|
||||
private cache: Map<string, CacheEntry> = new Map();
|
||||
private dirty: Set<string> = new Set();
|
||||
private flushTimer?: NodeJS.Timeout;
|
||||
|
||||
constructor(private db: DatabaseConnection) {}
|
||||
|
||||
/**
|
||||
* Singleton accessor that initializes the cache with SQLite persistence.
|
||||
* Creates the database table if it doesn't exist and loads existing entries.
|
||||
*/
|
||||
static async get(): Promise<AutocompleteLruCache> {
|
||||
const db = await open({
|
||||
filename: getTabAutocompleteCacheSqlitePath(),
|
||||
driver: sqlite3.Database,
|
||||
});
|
||||
if (!AutocompleteLruCache.instancePromise) {
|
||||
AutocompleteLruCache.instancePromise = (async () => {
|
||||
const db = await open({
|
||||
filename: getTabAutocompleteCacheSqlitePath(),
|
||||
driver: sqlite3.Database,
|
||||
});
|
||||
await db.exec("PRAGMA busy_timeout = 3000;");
|
||||
await db.run(`
|
||||
CREATE TABLE IF NOT EXISTS cache (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
timestamp INTEGER NOT NULL
|
||||
)
|
||||
`);
|
||||
|
||||
await db.exec("PRAGMA busy_timeout = 3000;");
|
||||
|
||||
await db.run(`
|
||||
CREATE TABLE IF NOT EXISTS cache (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
timestamp INTEGER NOT NULL
|
||||
)
|
||||
`);
|
||||
|
||||
return new AutocompleteLruCache(db);
|
||||
const instance = new AutocompleteLruCache(db);
|
||||
await instance.loadFromDb();
|
||||
instance.startFlushTimer();
|
||||
return instance;
|
||||
})();
|
||||
}
|
||||
return AutocompleteLruCache.instancePromise;
|
||||
}
|
||||
|
||||
async get(prefix: string): Promise<string | undefined> {
|
||||
// NOTE: Right now prompts with different suffixes will be considered the same
|
||||
/** Loads all cached entries from SQLite into memory on initialization. */
|
||||
private async loadFromDb() {
|
||||
const rows = await this.db.all("SELECT key, value, timestamp FROM cache");
|
||||
for (const row of rows) {
|
||||
this.cache.set(row.key, {
|
||||
value: row.value,
|
||||
timestamp: row.timestamp,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// If the query is "co" and we have "c" -> "ontinue" in the cache,
|
||||
// we should return "ntinue" as the completion.
|
||||
// Have to make sure we take the key with shortest length
|
||||
/** Starts periodic flush timer to persist dirty entries to database. */
|
||||
private startFlushTimer() {
|
||||
this.flushTimer = setInterval(() => {
|
||||
this.flush().catch((e) => console.error("Error flushing cache:", e));
|
||||
}, AutocompleteLruCache.flushInterval);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves cached completion for a prefix using longest-match strategy.
|
||||
*
|
||||
* Algorithm:
|
||||
* 1. Finds the longest cached prefix that the query starts with
|
||||
* 2. Validates that cached completion starts with the remaining query text
|
||||
* 3. Returns the completion with the matched portion stripped
|
||||
* 4. Updates the entry's timestamp (LRU tracking)
|
||||
*
|
||||
* @param prefix - The prefix to search for
|
||||
* @returns The completion string with prefix removed, or undefined if no match
|
||||
*/
|
||||
async get(prefix: string): Promise<string | undefined> {
|
||||
const truncatedPrefix = truncateSqliteLikePattern(prefix);
|
||||
try {
|
||||
const result = await this.db.get(
|
||||
"SELECT key, value FROM cache WHERE ? LIKE key || '%' ORDER BY LENGTH(key) DESC LIMIT 1",
|
||||
truncatedPrefix,
|
||||
);
|
||||
// Validate that the cached completion is a valid completion for the prefix
|
||||
if (
|
||||
result &&
|
||||
result.value.startsWith(truncatedPrefix.slice(result.key.length))
|
||||
) {
|
||||
await this.db.run(
|
||||
"UPDATE cache SET timestamp = ? WHERE key = ?",
|
||||
Date.now(),
|
||||
truncatedPrefix,
|
||||
);
|
||||
// And then truncate so we aren't writing something that's already there
|
||||
return result.value.slice(truncatedPrefix.length - result.key.length);
|
||||
let bestMatch: { key: string; entry: CacheEntry } | null = null;
|
||||
|
||||
for (const [key, entry] of this.cache.entries()) {
|
||||
if (truncatedPrefix.startsWith(key)) {
|
||||
if (!bestMatch || key.length > bestMatch.key.length) {
|
||||
bestMatch = { key, entry };
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// catches e.g. old SQLITE LIKE OR GLOB PATTERN TOO COMPLEX
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
if (
|
||||
bestMatch &&
|
||||
bestMatch.entry.value.startsWith(
|
||||
truncatedPrefix.slice(bestMatch.key.length),
|
||||
)
|
||||
) {
|
||||
bestMatch.entry.timestamp = Date.now();
|
||||
this.dirty.add(bestMatch.key);
|
||||
|
||||
return bestMatch.entry.value.slice(
|
||||
truncatedPrefix.length - bestMatch.key.length,
|
||||
);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a prefix-to-completion mapping in the cache.
|
||||
*
|
||||
* Thread-safe operation that:
|
||||
* - Truncates the prefix for SQLite pattern safety
|
||||
* - Updates or inserts the entry with current timestamp
|
||||
* - Evicts oldest entry if capacity exceeded
|
||||
* - Marks entry as dirty for next flush
|
||||
*
|
||||
* @param prefix - The prefix key
|
||||
* @param completion - The completion value to cache
|
||||
*/
|
||||
async put(prefix: string, completion: string) {
|
||||
const release = await this.mutex.acquire();
|
||||
|
||||
const truncatedPrefix = truncateSqliteLikePattern(prefix);
|
||||
|
||||
try {
|
||||
await this.db.run("BEGIN TRANSACTION");
|
||||
const now = Date.now();
|
||||
|
||||
try {
|
||||
const result = await this.db.get(
|
||||
"SELECT key FROM cache WHERE key = ?",
|
||||
truncatedPrefix,
|
||||
);
|
||||
this.cache.set(truncatedPrefix, {
|
||||
value: completion,
|
||||
timestamp: now,
|
||||
});
|
||||
this.dirty.add(truncatedPrefix);
|
||||
|
||||
if (result) {
|
||||
await this.db.run(
|
||||
"UPDATE cache SET value = ?, timestamp = ? WHERE key = ?",
|
||||
completion,
|
||||
Date.now(),
|
||||
truncatedPrefix,
|
||||
);
|
||||
} else {
|
||||
const count = await this.db.get(
|
||||
"SELECT COUNT(*) as count FROM cache",
|
||||
);
|
||||
if (this.cache.size > AutocompleteLruCache.capacity) {
|
||||
let oldestKey: string | null = null;
|
||||
let oldestTime = Infinity;
|
||||
|
||||
if (count.count >= AutocompleteLruCache.capacity) {
|
||||
await this.db.run(
|
||||
"DELETE FROM cache WHERE key = (SELECT key FROM cache ORDER BY timestamp ASC LIMIT 1)",
|
||||
);
|
||||
for (const [key, entry] of this.cache.entries()) {
|
||||
if (entry.timestamp < oldestTime) {
|
||||
oldestTime = entry.timestamp;
|
||||
oldestKey = key;
|
||||
}
|
||||
|
||||
await this.db.run(
|
||||
"INSERT INTO cache (key, value, timestamp) VALUES (?, ?, ?)",
|
||||
truncatedPrefix,
|
||||
completion,
|
||||
Date.now(),
|
||||
);
|
||||
}
|
||||
|
||||
await this.db.run("COMMIT");
|
||||
} catch (error) {
|
||||
await this.db.run("ROLLBACK");
|
||||
throw error;
|
||||
if (oldestKey) {
|
||||
this.cache.delete(oldestKey);
|
||||
this.dirty.add(oldestKey);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error creating transaction: ", e);
|
||||
} finally {
|
||||
release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Persists all dirty entries to SQLite in a single transaction.
|
||||
*
|
||||
* Performs upserts for existing cache entries and deletes for evicted entries.
|
||||
* Skips if no changes pending. Rolls back transaction on error.
|
||||
*/
|
||||
async flush() {
|
||||
if (this.dirty.size === 0) return;
|
||||
|
||||
const release = await this.mutex.acquire();
|
||||
const dirtyKeys = Array.from(this.dirty);
|
||||
this.dirty.clear();
|
||||
|
||||
try {
|
||||
await this.db.run("BEGIN TRANSACTION");
|
||||
|
||||
for (const key of dirtyKeys) {
|
||||
const entry = this.cache.get(key);
|
||||
|
||||
if (entry) {
|
||||
// Upsert
|
||||
await this.db.run(
|
||||
`INSERT INTO cache (key, value, timestamp) VALUES (?, ?, ?)
|
||||
ON CONFLICT(key) DO UPDATE SET value = ?, timestamp = ?`,
|
||||
key,
|
||||
entry.value,
|
||||
entry.timestamp,
|
||||
entry.value,
|
||||
entry.timestamp,
|
||||
);
|
||||
} else {
|
||||
// Delete
|
||||
await this.db.run("DELETE FROM cache WHERE key = ?", key);
|
||||
}
|
||||
}
|
||||
|
||||
await this.db.run("COMMIT");
|
||||
} catch (error) {
|
||||
await this.db.run("ROLLBACK");
|
||||
console.error("Error flushing cache:", error);
|
||||
} finally {
|
||||
release();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gracefully shuts down the cache.
|
||||
* Stops the flush timer, persists pending changes, and closes database connection.
|
||||
*/
|
||||
async close() {
|
||||
if (this.flushTimer) {
|
||||
clearInterval(this.flushTimer);
|
||||
}
|
||||
await this.flush();
|
||||
await this.db.close();
|
||||
AutocompleteLruCache.instancePromise = undefined;
|
||||
}
|
||||
}
|
||||
export default AutocompleteLruCache;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import {
|
||||
BlockType,
|
||||
ConfigYaml,
|
||||
createRuleMarkdown,
|
||||
createPromptMarkdown,
|
||||
RULE_FILE_EXTENSION,
|
||||
createRuleMarkdown,
|
||||
} from "@continuedev/config-yaml";
|
||||
import * as YAML from "yaml";
|
||||
import { IDE } from "../..";
|
||||
import { getContinueGlobalPath } from "../../util/paths";
|
||||
import { localPathToUri } from "../../util/pathToUri";
|
||||
import { joinPathsToUri } from "../../util/uri";
|
||||
|
||||
const BLOCK_TYPE_CONFIG: Record<
|
||||
|
|
@ -165,7 +165,7 @@ export async function createNewWorkspaceBlockFile(
|
|||
|
||||
export async function createNewGlobalRuleFile(ide: IDE): Promise<void> {
|
||||
try {
|
||||
const globalDir = getContinueGlobalPath();
|
||||
const globalDir = localPathToUri(getContinueGlobalPath());
|
||||
|
||||
// Create the rules subdirectory within the global directory
|
||||
const rulesDir = joinPathsToUri(globalDir, "rules");
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ describe("llmsFromModelConfig requestOptions merging", () => {
|
|||
requestOptions: {
|
||||
timeout: 30000,
|
||||
headers: {
|
||||
"User-Agent": "Continue/1.0.0",
|
||||
"user-agent": "Continue/1.0.0",
|
||||
},
|
||||
proxy: "global-proxy",
|
||||
},
|
||||
|
|
@ -112,7 +112,7 @@ describe("llmsFromModelConfig requestOptions merging", () => {
|
|||
expect(llm.requestOptions).toEqual({
|
||||
timeout: 60000, // model-specific takes precedence
|
||||
headers: {
|
||||
"User-Agent": "Continue/1.0.0", // from global request options
|
||||
"user-agent": "Continue/1.0.0", // from global request options
|
||||
Authorization: "Bearer token123", // from model
|
||||
},
|
||||
proxy: "model-proxy", // model-specific takes precedence
|
||||
|
|
@ -236,7 +236,7 @@ describe("llmsFromModelConfig requestOptions merging", () => {
|
|||
expect(llm.requestOptions).toEqual({
|
||||
timeout: 120000, // model-specific takes precedence
|
||||
headers: {
|
||||
"User-Agent": "Continue/1.0.0", // from global request options
|
||||
"user-agent": "Continue/1.0.0", // from global request options
|
||||
"X-Custom": "autodetect", // from model
|
||||
},
|
||||
proxy: "global-proxy", // from global request options
|
||||
|
|
@ -302,7 +302,7 @@ describe("llmsFromModelConfig requestOptions merging", () => {
|
|||
expect(llm.requestOptions).toEqual({
|
||||
timeout: 90000,
|
||||
headers: {
|
||||
"User-Agent": "Continue/1.0.0",
|
||||
"user-agent": "Continue/1.0.0",
|
||||
},
|
||||
proxy: "global-proxy",
|
||||
});
|
||||
|
|
@ -345,7 +345,7 @@ describe("llmsFromModelConfig requestOptions merging", () => {
|
|||
const llm = result[0];
|
||||
|
||||
expect(llm.requestOptions?.headers).toEqual({
|
||||
"User-Agent": "Continue/1.0.0", // from global request options
|
||||
"user-agent": "Continue/1.0.0", // from global request options
|
||||
"Cache-Control": "no-cache", // from global request options
|
||||
Authorization: "Bearer model-token", // from model
|
||||
Accept: "application/json", // from model (overrides config)
|
||||
|
|
|
|||
|
|
@ -352,7 +352,6 @@ export class ControlPlaneClient {
|
|||
|
||||
/**
|
||||
* Check if remote sessions should be enabled based on feature flags
|
||||
* Requires: PostHog feature flag AND @continue.dev email
|
||||
*/
|
||||
public async shouldEnableRemoteSessions(): Promise<boolean> {
|
||||
// Check if user is signed in
|
||||
|
|
@ -360,17 +359,13 @@ export class ControlPlaneClient {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check if user has @continue.dev email
|
||||
try {
|
||||
const sessionInfo = await this.sessionInfoPromise;
|
||||
if (isOnPremSession(sessionInfo) || !sessionInfo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const hubSession = sessionInfo as HubSessionInfo;
|
||||
const email = hubSession.account?.id;
|
||||
|
||||
return email ? email.includes("@continue.dev") : false;
|
||||
return true;
|
||||
} catch (e) {
|
||||
Logger.error(e, {
|
||||
context: "control_plane_check_remote_sessions_enabled",
|
||||
|
|
@ -388,7 +383,6 @@ export class ControlPlaneClient {
|
|||
|
||||
/**
|
||||
* Fetch remote agents/sessions from the control plane
|
||||
* Currently restricted to @continue.dev emails for internal use
|
||||
*/
|
||||
public async listRemoteSessions(): Promise<RemoteSessionMetadata[]> {
|
||||
if (!(await this.isSignedIn())) {
|
||||
|
|
@ -396,8 +390,6 @@ export class ControlPlaneClient {
|
|||
}
|
||||
|
||||
try {
|
||||
// Note: This endpoint is currently restricted to internal @continue.dev users
|
||||
// In the future, this may be expanded to support broader remote session access
|
||||
const resp = await this.requestAndHandleError("agents/devboxes", {
|
||||
method: "GET",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const RULES = [
|
|||
`Whenever any part of the code is the same as before, you may simply indicate this with a comment that says "${UNCHANGED_CODE}" instead of rewriting.`,
|
||||
"You must keep at least one line above and below from the original code, so that we can identify what the previous code was.",
|
||||
`Do not place miscellaneous "${UNCHANGED_CODE}" comments at the top or bottom of the file when there is nothing to replace them.`,
|
||||
"Leave existing comments in place unless changes require modifying them.",
|
||||
// `You should write "${UNCHANGED_CODE}" at least for each function that is unchanged, rather than grouping them into a single comment.`,
|
||||
// `You should lean toward using a smaller number of these comments rather than rewriting it for every function if all of them are unchanged.`,
|
||||
// `You may do this for imports as well if needed.`,
|
||||
|
|
@ -21,7 +22,7 @@ const RULES = [
|
|||
"The code should always be syntactically valid, even with the comments.",
|
||||
];
|
||||
|
||||
function claude35SonnetLazyApplyPrompt(
|
||||
function claudeSonnetLazyApplyPrompt(
|
||||
...args: Parameters<LazyApplyPrompt>
|
||||
): ReturnType<LazyApplyPrompt> {
|
||||
const userContent = dedent`
|
||||
|
|
@ -55,7 +56,7 @@ export function lazyApplyPromptForModel(
|
|||
provider: string,
|
||||
): LazyApplyPrompt | undefined {
|
||||
if (model.includes("sonnet")) {
|
||||
return claude35SonnetLazyApplyPrompt;
|
||||
return claudeSonnetLazyApplyPrompt;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
|
|
|||
13
core/index.d.ts
vendored
13
core/index.d.ts
vendored
|
|
@ -272,6 +272,10 @@ export interface Session {
|
|||
title: string;
|
||||
workspaceDirectory: string;
|
||||
history: ChatHistoryItem[];
|
||||
/** Optional: per-session UI mode (chat/agent/plan/background) */
|
||||
mode?: MessageModes;
|
||||
/** Optional: title of the selected chat model for this session */
|
||||
chatModelTitle?: string | null;
|
||||
}
|
||||
|
||||
export interface BaseSessionMetadata {
|
||||
|
|
@ -513,7 +517,7 @@ export interface ChatHistoryItem {
|
|||
toolCallStates?: ToolCallState[];
|
||||
isGatheringContext?: boolean;
|
||||
reasoning?: Reasoning;
|
||||
appliedRules?: RuleWithSource[];
|
||||
appliedRules?: RuleMetadata[];
|
||||
conversationSummary?: string;
|
||||
}
|
||||
|
||||
|
|
@ -1868,18 +1872,21 @@ export type RuleSource =
|
|||
| ".continuerules"
|
||||
| "agentFile";
|
||||
|
||||
export interface RuleWithSource {
|
||||
export interface RuleMetadata {
|
||||
name?: string;
|
||||
slug?: string;
|
||||
source: RuleSource;
|
||||
globs?: string | string[];
|
||||
regex?: string | string[];
|
||||
rule: string;
|
||||
description?: string;
|
||||
sourceFile?: string;
|
||||
alwaysApply?: boolean;
|
||||
invokable?: boolean;
|
||||
}
|
||||
export interface RuleWithSource extends RuleMetadata {
|
||||
rule: string;
|
||||
}
|
||||
|
||||
export interface CompleteOnboardingPayload {
|
||||
mode: OnboardingModes;
|
||||
provider?: string;
|
||||
|
|
|
|||
|
|
@ -185,6 +185,14 @@ function modelSupportsReasoning(
|
|||
if (!model) {
|
||||
return false;
|
||||
}
|
||||
if (model.completionOptions?.reasoning !== undefined) {
|
||||
// Reasoning support is forced at the config level. Model might not necessarily support it though!
|
||||
return model.completionOptions.reasoning;
|
||||
}
|
||||
// Seems our current way of disabling reasoning is not working for grok code so results in useless lightbulb
|
||||
// if (model.model.includes("grok-code")) {
|
||||
// return true;
|
||||
// }
|
||||
// do not turn reasoning on by default for claude 3 models
|
||||
if (
|
||||
model.model.includes("claude") &&
|
||||
|
|
@ -193,13 +201,13 @@ function modelSupportsReasoning(
|
|||
) {
|
||||
return true;
|
||||
}
|
||||
if (model.model.includes("command-a-reasoning")) {
|
||||
return true;
|
||||
}
|
||||
if (model.model.includes("deepseek-r")) {
|
||||
return true;
|
||||
}
|
||||
if (model.completionOptions?.reasoning) {
|
||||
// Reasoning support is forced at the config level. Model might not necessarily support it though!
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export const DEFAULT_AGENT_SYSTEM_MESSAGE = `\
|
|||
<important_rules>
|
||||
You are in agent mode.
|
||||
|
||||
If you need to use multiple tools, you can call multiple read only tools simultaneously.
|
||||
If you need to use multiple tools, you can call multiple read-only tools simultaneously.
|
||||
|
||||
${CODEBLOCK_FORMATTING_INSTRUCTIONS}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import {
|
|||
Chunk,
|
||||
CompletionOptions,
|
||||
LLMOptions,
|
||||
MessageContent,
|
||||
} from "../../index.js";
|
||||
import { renderChatMessage, stripImages } from "../../util/messageContent.js";
|
||||
import { BaseLLM } from "../index.js";
|
||||
import { DEFAULT_REASONING_TOKENS } from "../constants.js";
|
||||
|
||||
class Cohere extends BaseLLM {
|
||||
static providerName = "cohere";
|
||||
|
|
@ -19,7 +19,6 @@ class Cohere extends BaseLLM {
|
|||
|
||||
private _convertMessages(msgs: ChatMessage[]): any[] {
|
||||
const messages = [];
|
||||
let lastToolPlan: MessageContent | undefined;
|
||||
for (const m of msgs) {
|
||||
if (!m.content) {
|
||||
continue;
|
||||
|
|
@ -48,36 +47,48 @@ class Cohere extends BaseLLM {
|
|||
});
|
||||
break;
|
||||
case "thinking":
|
||||
lastToolPlan = m.content;
|
||||
messages.push({
|
||||
role: "assistant",
|
||||
content: [
|
||||
{
|
||||
type: "thinking",
|
||||
thinking: m.content,
|
||||
},
|
||||
],
|
||||
});
|
||||
break;
|
||||
case "assistant":
|
||||
if (m.toolCalls) {
|
||||
if (!lastToolPlan) {
|
||||
throw new Error("No tool plan found");
|
||||
}
|
||||
messages.push({
|
||||
let msg: any;
|
||||
if (messages.at(-1)?.content[0]?.thinking) {
|
||||
msg = messages.pop();
|
||||
} else {
|
||||
msg = {
|
||||
role: m.role,
|
||||
tool_calls: m.toolCalls.map((toolCall) => ({
|
||||
id: toolCall.id,
|
||||
type: "function",
|
||||
function: {
|
||||
name: toolCall.function?.name,
|
||||
arguments: toolCall.function?.arguments,
|
||||
},
|
||||
})),
|
||||
// Ideally the tool plan would be in this message, but it is
|
||||
// split in another, usually the previous, this one's content is
|
||||
// a space.
|
||||
// tool_plan: m.content,
|
||||
tool_plan: lastToolPlan,
|
||||
});
|
||||
lastToolPlan = undefined;
|
||||
break;
|
||||
content: [],
|
||||
};
|
||||
}
|
||||
messages.push({
|
||||
role: m.role,
|
||||
content: m.content,
|
||||
});
|
||||
|
||||
if (m.toolCalls) {
|
||||
msg.tool_calls = m.toolCalls.map((toolCall) => ({
|
||||
id: toolCall.id,
|
||||
type: "function",
|
||||
function: {
|
||||
name: toolCall.function?.name,
|
||||
arguments: toolCall.function?.arguments,
|
||||
},
|
||||
}));
|
||||
} else {
|
||||
if (typeof m.content === "string") {
|
||||
msg.content.push({
|
||||
type: "text",
|
||||
text: m.content,
|
||||
});
|
||||
} else {
|
||||
msg.content.push(...m.content);
|
||||
}
|
||||
}
|
||||
|
||||
messages.push(msg);
|
||||
break;
|
||||
case "system":
|
||||
messages.push({
|
||||
|
|
@ -110,6 +121,15 @@ class Cohere extends BaseLLM {
|
|||
stop_sequences: options.stop?.slice(0, Cohere.maxStopSequences),
|
||||
frequency_penalty: options.frequencyPenalty,
|
||||
presence_penalty: options.presencePenalty,
|
||||
thinking: options.reasoning
|
||||
? {
|
||||
type: "enabled" as const,
|
||||
token_budget:
|
||||
options.reasoningBudgetTokens ?? DEFAULT_REASONING_TOKENS,
|
||||
}
|
||||
: // Reasoning is enabled by default for models that support it.
|
||||
// https://docs.cohere.com/reference/chat-stream#request.body.thinking
|
||||
{ type: "disabled" as const },
|
||||
tools: options.tools?.map((tool) => ({
|
||||
type: "function",
|
||||
function: {
|
||||
|
|
@ -159,14 +179,17 @@ class Cohere extends BaseLLM {
|
|||
|
||||
if (options.stream === false) {
|
||||
const data = await resp.json();
|
||||
for (const content of data.message.content) {
|
||||
if (content.thinking) {
|
||||
yield { role: "thinking", content: content.thinking };
|
||||
continue;
|
||||
}
|
||||
yield { role: "assistant", content: content.text };
|
||||
}
|
||||
if (data.message.tool_calls) {
|
||||
yield {
|
||||
// Use the "thinking" role for `tool_plan`, since there is no such
|
||||
// role in the Cohere API at the moment and it is a "a
|
||||
// chain-of-thought style reflection".
|
||||
role: "thinking",
|
||||
content: data.message.tool_plan,
|
||||
};
|
||||
if (data.message.tool_plan) {
|
||||
yield { role: "thinking", content: data.message.tool_plan };
|
||||
}
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: "",
|
||||
|
|
@ -181,7 +204,6 @@ class Cohere extends BaseLLM {
|
|||
};
|
||||
return;
|
||||
}
|
||||
yield { role: "assistant", content: data.message.content[0].text };
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -192,6 +214,13 @@ class Cohere extends BaseLLM {
|
|||
switch (value.type) {
|
||||
// https://docs.cohere.com/v2/docs/streaming#content-delta
|
||||
case "content-delta":
|
||||
if (value.delta.message.content.thinking) {
|
||||
yield {
|
||||
role: "thinking",
|
||||
content: value.delta.message.content.thinking,
|
||||
};
|
||||
break;
|
||||
}
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: value.delta.message.content.text,
|
||||
|
|
@ -199,9 +228,6 @@ class Cohere extends BaseLLM {
|
|||
break;
|
||||
// https://docs.cohere.com/reference/chat-stream#request.body.messages.assistant.tool_plan
|
||||
case "tool-plan-delta":
|
||||
// Use the "thinking" role for `tool_plan`, since there is no such
|
||||
// role in the Cohere API at the moment and it is a "a
|
||||
// chain-of-thought style reflection".
|
||||
yield {
|
||||
role: "thinking",
|
||||
content: value.delta.message.tool_plan,
|
||||
|
|
|
|||
845
core/llm/llms/Cohere.vitest.ts
Normal file
845
core/llm/llms/Cohere.vitest.ts
Normal file
|
|
@ -0,0 +1,845 @@
|
|||
import { afterEach, describe, expect, test, vi } from "vitest";
|
||||
import { ILLM } from "../../index.js";
|
||||
import Cohere from "./Cohere.js";
|
||||
|
||||
interface LlmTestCase {
|
||||
llm: ILLM;
|
||||
methodToTest: keyof ILLM;
|
||||
params: any[];
|
||||
expectedRequest: {
|
||||
url: string;
|
||||
method: string;
|
||||
headers?: Record<string, string>;
|
||||
body?: Record<string, any>;
|
||||
};
|
||||
mockResponse?: any;
|
||||
mockStream?: any[];
|
||||
}
|
||||
|
||||
function createMockStream(mockStream: any[]) {
|
||||
const encoder = new TextEncoder();
|
||||
return new ReadableStream({
|
||||
start(controller) {
|
||||
for (const chunk of mockStream) {
|
||||
controller.enqueue(
|
||||
encoder.encode(
|
||||
`data: ${
|
||||
typeof chunk === "string" ? chunk : JSON.stringify(chunk)
|
||||
}\n\n`,
|
||||
),
|
||||
);
|
||||
}
|
||||
controller.close();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function setupMockFetch(mockResponse?: any, mockStream?: any[]) {
|
||||
const mockFetch = vi.fn();
|
||||
|
||||
if (mockStream) {
|
||||
const stream = createMockStream(mockStream);
|
||||
mockFetch.mockResolvedValue(
|
||||
new Response(stream, {
|
||||
headers: {
|
||||
"Content-Type": "text/event-stream",
|
||||
},
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
mockFetch.mockResolvedValue(
|
||||
new Response(JSON.stringify(mockResponse), {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return mockFetch;
|
||||
}
|
||||
|
||||
function setupReadableStreamPolyfill() {
|
||||
// This can be removed if https://github.com/nodejs/undici/issues/2888 is resolved
|
||||
// @ts-ignore
|
||||
const originalFrom = ReadableStream.from;
|
||||
// @ts-ignore
|
||||
ReadableStream.from = (body) => {
|
||||
if (body?.source) {
|
||||
return body;
|
||||
}
|
||||
return originalFrom(body);
|
||||
};
|
||||
}
|
||||
|
||||
async function executeLlmMethod(
|
||||
llm: ILLM,
|
||||
methodToTest: keyof ILLM,
|
||||
params: any[],
|
||||
) {
|
||||
if (typeof (llm as any)[methodToTest] !== "function") {
|
||||
throw new Error(
|
||||
`Method ${String(methodToTest)} does not exist on the LLM instance.`,
|
||||
);
|
||||
}
|
||||
|
||||
const result = await (llm as any)[methodToTest](...params);
|
||||
if (result?.next) {
|
||||
for await (const _ of result) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function assertFetchCall(mockFetch: any, expectedRequest: any) {
|
||||
expect(mockFetch).toHaveBeenCalledTimes(1);
|
||||
const [url, options] = mockFetch.mock.calls[0];
|
||||
|
||||
expect(url.toString()).toBe(expectedRequest.url);
|
||||
expect(options.method).toBe(expectedRequest.method);
|
||||
|
||||
if (expectedRequest.headers) {
|
||||
expect(options.headers).toEqual(
|
||||
expect.objectContaining(expectedRequest.headers),
|
||||
);
|
||||
}
|
||||
|
||||
if (expectedRequest.body) {
|
||||
const actualBody = JSON.parse(options.body as string);
|
||||
expect(actualBody).toEqual(expectedRequest.body);
|
||||
}
|
||||
}
|
||||
|
||||
async function runLlmTest(testCase: LlmTestCase) {
|
||||
const {
|
||||
llm,
|
||||
methodToTest,
|
||||
params,
|
||||
expectedRequest,
|
||||
mockResponse,
|
||||
mockStream,
|
||||
} = testCase;
|
||||
|
||||
const mockFetch = setupMockFetch(mockResponse, mockStream);
|
||||
setupReadableStreamPolyfill();
|
||||
|
||||
(llm as any).fetch = mockFetch;
|
||||
|
||||
await executeLlmMethod(llm, methodToTest, params);
|
||||
assertFetchCall(mockFetch, expectedRequest);
|
||||
}
|
||||
|
||||
describe("Cohere", () => {
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
test("streamChat should send a valid request", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[{ role: "user", content: "hello" }],
|
||||
new AbortController().signal,
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"Hello!"}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" How can I help you today?"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":1,"output_tokens":9},"tokens":{"input_tokens":496,"output_tokens":11},"cached_tokens":448}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("streamChat should send a valid request with tool calls messages", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[
|
||||
{ role: "user", content: "What's the weather in New York?" },
|
||||
{
|
||||
role: "thinking",
|
||||
content: "I will look up the weather in New York",
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: " ",
|
||||
toolCalls: [
|
||||
{
|
||||
id: "get_weather_qm3vz6v54dmw",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
arguments: '{"location": "New York"}',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "tool",
|
||||
content: "Sunny",
|
||||
toolCallId: "get_weather_qm3vz6v54dmw",
|
||||
},
|
||||
],
|
||||
new AbortController().signal,
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [
|
||||
{ role: "user", content: "What's the weather in New York?" },
|
||||
{
|
||||
role: "assistant",
|
||||
content: [
|
||||
{
|
||||
type: "thinking",
|
||||
thinking: "I will look up the weather in New York",
|
||||
},
|
||||
],
|
||||
tool_calls: [
|
||||
{
|
||||
id: "get_weather_qm3vz6v54dmw",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
arguments: '{"location": "New York"}',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "tool",
|
||||
content: "Sunny",
|
||||
tool_call_id: "get_weather_qm3vz6v54dmw",
|
||||
},
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"It\'s sunny"}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" in New York."}}}}',
|
||||
'{"type":"content-end","index":1}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":11,"output_tokens":7},"tokens":{"input_tokens":600,"output_tokens":9},"cached_tokens":448}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("streamChat should send a valid request with images", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-vision-07-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: "hello",
|
||||
},
|
||||
{
|
||||
type: "imageUrl",
|
||||
imageUrl: {
|
||||
url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mMsKL5ZDwAFVAI9A6eNqwAAAABJRU5ErkJggg==",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
new AbortController().signal,
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-vision-07-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: "hello",
|
||||
},
|
||||
{
|
||||
type: "image_url",
|
||||
image_url: {
|
||||
url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mMsKL5ZDwAFVAI9A6eNqwAAAABJRU5ErkJggg==",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"Hello!"}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" How can I assist you today?"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":260,"output_tokens":10},"tokens":{"input_tokens":497,"output_tokens":10,"image_tokens":259},"cached_tokens":480}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("streamChat should send a valid request with thinking messages", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-reasoning-08-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
completionOptions: {
|
||||
model: "command-a-reasoning-08-2025",
|
||||
reasoning: true,
|
||||
},
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[
|
||||
{ role: "user", content: "hello" },
|
||||
{
|
||||
role: "thinking",
|
||||
content:
|
||||
'Okay, the user just said "hello". Let me figure out how to respond. Since they\'re greeting me, I should greet them back.',
|
||||
},
|
||||
{ role: "assistant", content: "Hello! How can I assist you today?" },
|
||||
{ role: "user", content: "hello again" },
|
||||
],
|
||||
new AbortController().signal,
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-reasoning-08-2025",
|
||||
max_tokens: 32768,
|
||||
messages: [
|
||||
{ role: "user", content: "hello" },
|
||||
{
|
||||
role: "assistant",
|
||||
content: [
|
||||
{
|
||||
type: "thinking",
|
||||
thinking:
|
||||
'Okay, the user just said "hello". Let me figure out how to respond. Since they\'re greeting me, I should greet them back.',
|
||||
},
|
||||
{ type: "text", text: "Hello! How can I assist you today?" },
|
||||
],
|
||||
},
|
||||
{ role: "user", content: "hello again" },
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "enabled", token_budget: 2048 },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"thinking","thinking":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"thinking":"Alright, the user said \"hello again\". Let me check the chat history."}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"thinking":" The user first said \"hello\", and I\'ll keep it friendly and open-ended."}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"content-start","index":1,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":1,"delta":{"message":{"content":{"text":"Hello again!"}}}}',
|
||||
'{"type":"content-delta","index":1,"delta":{"message":{"content":{"text":" It\'s nice to see you back. Is there something specific you need help with, or would you just like to chat?"}}}}',
|
||||
'{"type":"content-end","index":1}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":12,"output_tokens":138},"tokens":{"input_tokens":1437,"output_tokens":142},"cached_tokens":1344}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("chat should send a valid request", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "chat",
|
||||
params: [
|
||||
[{ role: "user", content: "hello" }],
|
||||
new AbortController().signal,
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"Hello!"}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" How can I help you today?"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":1,"output_tokens":9},"tokens":{"input_tokens":496,"output_tokens":11},"cached_tokens":448}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("streamComplete should send a valid request", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamComplete",
|
||||
params: ["Complete this: Hello", new AbortController().signal],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [{ role: "user", content: "Complete this: Hello" }],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" world!"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":4,"output_tokens":3},"tokens":{"input_tokens":499,"output_tokens":5},"cached_tokens":448}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("complete should send a valid request", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "complete",
|
||||
params: ["Complete this: Hello", new AbortController().signal],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [{ role: "user", content: "Complete this: Hello" }],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" world!"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":4,"output_tokens":3},"tokens":{"input_tokens":499,"output_tokens":5},"cached_tokens":448}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
describe("Different configurations", () => {
|
||||
test("should handle system message", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[
|
||||
{ role: "system", content: "You are a helpful assistant." },
|
||||
{ role: "user", content: "Hello!" },
|
||||
],
|
||||
new AbortController().signal,
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [
|
||||
{ role: "system", content: "You are a helpful assistant." },
|
||||
{ role: "user", content: "Hello!" },
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"Hello!"}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":" How can I assist you today?"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":10,"output_tokens":9},"tokens":{"input_tokens":539,"output_tokens":11},"cached_tokens":496}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should handle tool calls with tool plan (legacy)", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
const tools = [
|
||||
{
|
||||
type: "function" as const,
|
||||
function: {
|
||||
name: "get_weather",
|
||||
description: "Get the current weather",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
location: { type: "string" },
|
||||
},
|
||||
required: ["location"],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[{ role: "user", content: "What's the weather in New York?" }],
|
||||
new AbortController().signal,
|
||||
{ tools },
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 8192,
|
||||
messages: [
|
||||
{ role: "user", content: "What's the weather in New York?" },
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
tools: [
|
||||
{
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
description: "Get the current weather",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
location: { type: "string" },
|
||||
},
|
||||
required: ["location"],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"tool-plan-delta","delta":{"message":{"tool_plan":"I will look up the weather"}}}',
|
||||
'{"type":"tool-plan-delta","delta":{"message":{"tool_plan":" in New York"}}}',
|
||||
'{"type":"tool-call-start","index":0,"delta":{"message":{"tool_calls":{"id":"get_weather_qm3vz6v54dmw","type":"function","function":{"name":"get_weather","arguments":""}}}}}',
|
||||
'{"type":"tool-call-delta","index":0,"delta":{"message":{"tool_calls":{"function":{"arguments":"{\\"location\\": \\""}}}}',
|
||||
'{"type":"tool-call-delta","index":0,"delta":{"message":{"tool_calls":{"function":{"arguments":"\\"New York\\"}"}}}}',
|
||||
'{"type":"tool-call-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"TOOL_CALL","usage":{"billed_units":{"input_tokens":17,"output_tokens":19},"tokens":{"input_tokens":1434,"output_tokens":48},"cached_tokens":992}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should handle tool calls with thinking disabled", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-reasoning-08-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
const tools = [
|
||||
{
|
||||
type: "function" as const,
|
||||
function: {
|
||||
name: "get_weather",
|
||||
description: "Get the current weather",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
location: { type: "string" },
|
||||
},
|
||||
required: ["location"],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[{ role: "user", content: "What's the weather in New York?" }],
|
||||
new AbortController().signal,
|
||||
{ tools },
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-reasoning-08-2025",
|
||||
max_tokens: 32768,
|
||||
messages: [
|
||||
{ role: "user", content: "What's the weather in New York?" },
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
tools: [
|
||||
{
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
description: "Get the current weather",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
location: { type: "string" },
|
||||
},
|
||||
required: ["location"],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"tool-call-start","index":0,"delta":{"message":{"tool_calls":{"id":"get_weather_qm3vz6v54dmw","type":"function","function":{"name":"get_weather","arguments":""}}}}}',
|
||||
'{"type":"tool-call-delta","index":0,"delta":{"message":{"tool_calls":{"function":{"arguments":"{\\"location\\": \\""}}}}',
|
||||
'{"type":"tool-call-delta","index":0,"delta":{"message":{"tool_calls":{"function":{"arguments":"\\"New York\\"}"}}}}',
|
||||
'{"type":"tool-call-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"TOOL_CALL","usage":{"billed_units":{"input_tokens":17,"output_tokens":9},"tokens":{"input_tokens":1174,"output_tokens":36},"cached_tokens":0}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should handle tool calls with thinking enabled", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-reasoning-08-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
completionOptions: {
|
||||
model: "command-a-reasoning-08-2025",
|
||||
reasoning: true,
|
||||
},
|
||||
});
|
||||
|
||||
const tools = [
|
||||
{
|
||||
type: "function" as const,
|
||||
function: {
|
||||
name: "get_weather",
|
||||
description: "Get the current weather",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
location: { type: "string" },
|
||||
},
|
||||
required: ["location"],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[{ role: "user", content: "What's the weather in New York?" }],
|
||||
new AbortController().signal,
|
||||
{ tools },
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-reasoning-08-2025",
|
||||
max_tokens: 32768,
|
||||
messages: [
|
||||
{ role: "user", content: "What's the weather in New York?" },
|
||||
],
|
||||
stream: true,
|
||||
thinking: { type: "enabled", token_budget: 2048 },
|
||||
tools: [
|
||||
{
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
description: "Get the current weather",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
location: { type: "string" },
|
||||
},
|
||||
required: ["location"],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"thinking","thinking":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"thinking":"Okay, the user is asking for the weather in New York. Let me check the available tools. There\'s a tool called get_weather that requires a location parameter. Since the user mentioned New York, I can use that as the location."}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"thinking":" I need to call the get_weather tool with location set to \"New York\" to retrieve the current weather data. No other tools are available, so this should be the only step needed. Once I get the weather data, I can present it to the user."}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"tool-call-start","index":0,"delta":{"message":{"tool_calls":{"id":"get_weather_qm3vz6v54dmw","type":"function","function":{"name":"get_weather","arguments":""}}}}}',
|
||||
'{"type":"tool-call-delta","index":0,"delta":{"message":{"tool_calls":{"function":{"arguments":"{\\"location\\": \\""}}}}',
|
||||
'{"type":"tool-call-delta","index":0,"delta":{"message":{"tool_calls":{"function":{"arguments":"\\"New York\\"}"}}}}',
|
||||
'{"type":"tool-call-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"TOOL_CALL","usage":{"billed_units":{"input_tokens":17,"output_tokens":9},"tokens":{"input_tokens":1174,"output_tokens":36},"cached_tokens":0}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should handle custom max tokens", async () => {
|
||||
const cohere = new Cohere({
|
||||
apiKey: "test-api-key",
|
||||
model: "command-a-03-2025",
|
||||
apiBase: "https://api.cohere.com/v2/",
|
||||
});
|
||||
|
||||
await runLlmTest({
|
||||
llm: cohere,
|
||||
methodToTest: "streamChat",
|
||||
params: [
|
||||
[{ role: "user", content: "hello" }],
|
||||
new AbortController().signal,
|
||||
{ maxTokens: 1000 },
|
||||
],
|
||||
expectedRequest: {
|
||||
url: "https://api.cohere.com/v2/chat",
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: "Bearer test-api-key",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: {
|
||||
model: "command-a-03-2025",
|
||||
max_tokens: 1000,
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
stream: true,
|
||||
thinking: { type: "disabled" },
|
||||
},
|
||||
},
|
||||
mockStream: [
|
||||
'{"id":"94e3907b-d214-475e-a53f-ae81c76b6e43","type":"message-start","delta":{"message":{"role":"assistant","content":[],"tool_plan":"","tool_calls":[],"citations":[]}}}',
|
||||
'{"type":"content-start","index":0,"delta":{"message":{"content":{"type":"text","text":""}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"Hello! "}}}}',
|
||||
'{"type":"content-delta","index":0,"delta":{"message":{"content":{"text":"How can I help you today?"}}}}',
|
||||
'{"type":"content-end","index":0}',
|
||||
'{"type":"message-end","delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":1,"output_tokens":9},"tokens":{"input_tokens":496,"output_tokens":11},"cached_tokens":448}}}',
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import ReplicateClient from "replicate";
|
||||
|
||||
import { CompletionOptions, LLMOptions } from "../../index.js";
|
||||
import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js";
|
||||
import { renderChatMessage } from "../../util/messageContent.js";
|
||||
import { BaseLLM } from "../index.js";
|
||||
|
||||
class Replicate extends BaseLLM {
|
||||
|
|
@ -33,6 +34,7 @@ class Replicate extends BaseLLM {
|
|||
"tomasmcm/neural-chat-7b-v3-1:acb450496b49e19a1e410b50c574a34acacd54820bc36c19cbfe05148de2ba57",
|
||||
"deepseek-7b": "kcaverly/deepseek-coder-33b-instruct-gguf" as any,
|
||||
"phind-codellama-34b": "kcaverly/phind-codellama-34b-v2-gguf" as any,
|
||||
"claude-4-sonnet-latest": "anthropic/claude-4-sonnet" as any,
|
||||
};
|
||||
|
||||
static providerName = "replicate";
|
||||
|
|
@ -42,12 +44,55 @@ class Replicate extends BaseLLM {
|
|||
options: CompletionOptions,
|
||||
prompt: string,
|
||||
signal: AbortSignal,
|
||||
): [`${string}/${string}:${string}`, { input: any; signal: AbortSignal }] {
|
||||
): [`${string}/${string}:${string}`, { input: any }] {
|
||||
return [
|
||||
Replicate.MODEL_IDS[options.model] || (options.model as any),
|
||||
{
|
||||
input: { prompt, message: prompt },
|
||||
signal,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
private _convertChatArgs(
|
||||
options: CompletionOptions,
|
||||
messages: ChatMessage[],
|
||||
signal: AbortSignal,
|
||||
): [`${string}/${string}:${string}`, { input: any }] {
|
||||
let prompt = "";
|
||||
let system_prompt = "";
|
||||
|
||||
for (const message of messages) {
|
||||
const content =
|
||||
typeof message.content === "string"
|
||||
? message.content
|
||||
: renderChatMessage(message);
|
||||
|
||||
if (message.role === "system") {
|
||||
system_prompt += `System: ${content}\n\n`;
|
||||
} else if (message.role === "user") {
|
||||
prompt += `Human: ${content}\n\n`;
|
||||
} else if (message.role === "assistant") {
|
||||
prompt += `Assistant: ${content}\n\n`;
|
||||
}
|
||||
}
|
||||
|
||||
if (!prompt.endsWith("Assistant: ")) {
|
||||
prompt += "Assistant: ";
|
||||
}
|
||||
|
||||
// Construct the input
|
||||
const input: any = {
|
||||
prompt: prompt,
|
||||
system_prompt: system_prompt,
|
||||
max_tokens: options.maxTokens || 2048,
|
||||
extended_thinking: options.reasoning,
|
||||
thinking_budget_tokens: options.reasoningBudgetTokens || 1024,
|
||||
};
|
||||
|
||||
return [
|
||||
Replicate.MODEL_IDS[options.model] || (options.model as any),
|
||||
{
|
||||
input,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
@ -80,6 +125,43 @@ class Replicate extends BaseLLM {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async *_streamChat(
|
||||
messages: ChatMessage[],
|
||||
signal: AbortSignal,
|
||||
options: CompletionOptions,
|
||||
): AsyncGenerator<ChatMessage> {
|
||||
if (!this.apiKey || this.apiKey === "") {
|
||||
throw new Error("You need to use an API key");
|
||||
}
|
||||
|
||||
const [model, args] = this._convertChatArgs(options, messages, signal);
|
||||
|
||||
try {
|
||||
for await (const event of this._replicate.stream(model, args)) {
|
||||
if (event.event === "output") {
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: event.data,
|
||||
};
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
if (error.message.includes("authentication")) {
|
||||
throw new Error(
|
||||
"Replicate API authentication failed. Please check your API key",
|
||||
);
|
||||
}
|
||||
if (error.message.includes("model not found")) {
|
||||
throw new Error(
|
||||
`Model "${options.model}" not found on Replicate. Please check the model name or use another model.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Replicate;
|
||||
|
|
|
|||
|
|
@ -101,9 +101,18 @@ class ContinueProxy extends OpenAI {
|
|||
protected _getHeaders() {
|
||||
const headers: any = super._getHeaders();
|
||||
headers["x-continue-unique-id"] = Telemetry.uniqueId;
|
||||
headers["user-agent"] = this._getUserAgent();
|
||||
return headers;
|
||||
}
|
||||
|
||||
private _getUserAgent(): string {
|
||||
const ideInfo = Telemetry.ideInfo;
|
||||
const extensionVersion = ideInfo?.extensionVersion ?? "unknown";
|
||||
const ideName = ideInfo?.name ?? "unknown";
|
||||
const ideType = ideInfo?.ideType ?? "unknown";
|
||||
return `Continue/${extensionVersion} (${ideName}; ${ideType})`;
|
||||
}
|
||||
|
||||
supportsCompletions(): boolean {
|
||||
// This was a hotfix and contains duplicate logic from class-specific completion support methods
|
||||
if (this.underlyingProviderName === "vllm") {
|
||||
|
|
@ -129,6 +138,7 @@ class ContinueProxy extends OpenAI {
|
|||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${this.apiKey}`,
|
||||
"user-agent": this._getUserAgent(),
|
||||
},
|
||||
body: JSON.stringify({
|
||||
query,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { minimatch } from "minimatch";
|
||||
import {
|
||||
ContextItemWithId,
|
||||
RuleMetadata,
|
||||
RuleWithSource,
|
||||
ToolResultChatMessage,
|
||||
UserChatMessage,
|
||||
|
|
@ -324,7 +325,7 @@ export const getApplicableRules = (
|
|||
return applicableRules;
|
||||
};
|
||||
|
||||
export function getRuleId(rule: RuleWithSource): string {
|
||||
export function getRuleId(rule: RuleMetadata): string {
|
||||
return rule.slug ?? rule.sourceFile ?? rule.name ?? rule.source;
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +343,7 @@ export const getSystemMessageWithRules = ({
|
|||
rulePolicies?: RulePolicies;
|
||||
}): {
|
||||
systemMessage: string;
|
||||
appliedRules: RuleWithSource[];
|
||||
appliedRules: RuleMetadata[];
|
||||
} => {
|
||||
const appliedRules = getApplicableRules(
|
||||
userMessage,
|
||||
|
|
@ -359,8 +360,10 @@ export const getSystemMessageWithRules = ({
|
|||
systemMessage += rule.rule;
|
||||
}
|
||||
|
||||
const ruleMetadata = appliedRules.map(({ rule, ...rest }) => rest);
|
||||
|
||||
return {
|
||||
systemMessage,
|
||||
appliedRules,
|
||||
appliedRules: ruleMetadata,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { RuleWithSource } from "../..";
|
||||
import { RuleMetadata } from "../..";
|
||||
import { getLastNPathParts } from "../../util/uri";
|
||||
|
||||
export function getRuleDisplayName(rule: RuleWithSource): string {
|
||||
export function getRuleDisplayName(rule: RuleMetadata): string {
|
||||
if (rule.name) {
|
||||
return rule.name;
|
||||
}
|
||||
return getRuleSourceDisplayName(rule);
|
||||
}
|
||||
|
||||
export function getRuleSourceDisplayName(rule: RuleWithSource): string {
|
||||
export function getRuleSourceDisplayName(rule: RuleMetadata): string {
|
||||
switch (rule.source) {
|
||||
case ".continuerules":
|
||||
return "Project rules";
|
||||
|
|
|
|||
|
|
@ -60,13 +60,6 @@ export async function* llmStreamChat(
|
|||
if (!slashCommand) {
|
||||
throw new Error(`Unknown slash command ${command.name}`);
|
||||
}
|
||||
void Telemetry.capture(
|
||||
"useSlashCommand",
|
||||
{
|
||||
name: command.name,
|
||||
},
|
||||
true,
|
||||
);
|
||||
if (!slashCommand.run) {
|
||||
console.error(
|
||||
`Slash command ${command.name} (${command.source}) has no run function`,
|
||||
|
|
|
|||
|
|
@ -7,19 +7,7 @@ const simplifiedEditPrompt = `Consider the following code:
|
|||
\`\`\`
|
||||
Edit the code to perfectly satisfy the following user request:
|
||||
{{{userInput}}}
|
||||
Output nothing except for the code. No code block, no English explanation, no start/end tags.`;
|
||||
|
||||
const simplestEditPrompt = `Here is the code before editing:
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
\`\`\`
|
||||
|
||||
Here is the edit requested:
|
||||
"{{{userInput}}}"
|
||||
|
||||
Here is the code after editing:`;
|
||||
|
||||
const codellamaInfillEditPrompt = "{{filePrefix}}<FILL>{{fileSuffix}}";
|
||||
Output nothing except for the code. No code block, no English explanation, no start/end tags. Leave existing comments in place unless changes require modifying them.`;
|
||||
|
||||
const START_TAG = "<START EDITING HERE>";
|
||||
const osModelsEditPrompt: PromptTemplate = (history, otherData) => {
|
||||
|
|
@ -55,7 +43,7 @@ ${otherData.codeToEdit}
|
|||
${suffixTag}
|
||||
\`\`\`
|
||||
|
||||
Please rewrite the entire code block above in order to satisfy the following request: "${otherData.userInput}". You should rewrite the entire code block without leaving placeholders, even if the code is the same as before.${suffixExplanation}`,
|
||||
Please rewrite the entire code block above in order to satisfy the following request: "${otherData.userInput}". You should rewrite the entire code block without leaving placeholders, even if the code is the same as before. Leave existing comments in place unless changes require modifying them.${suffixExplanation}`,
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
|
|
@ -75,7 +63,7 @@ ${otherData.codeToEdit}
|
|||
${suffixTag}
|
||||
\`\`\`
|
||||
|
||||
Please rewrite the entire code block above, editing the portion below "${START_TAG}" in order to satisfy the following request: "${otherData.userInput}". You should rewrite the entire code block without leaving placeholders, even if the code is the same as before.${suffixExplanation}
|
||||
Please rewrite the entire code block above, editing the portion below "${START_TAG}" in order to satisfy the following request: "${otherData.userInput}". You should rewrite the entire code block without leaving placeholders, even if the code is the same as before. Leave existing comments in place unless changes require modifying them.${suffixExplanation}
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
@ -93,12 +81,12 @@ const mistralEditPrompt = `[INST] You are a helpful code assistant. Your task is
|
|||
{{{codeToEdit}}}
|
||||
\`\`\`
|
||||
|
||||
Just rewrite the code without explanations: [/INST]
|
||||
Leave existing comments in place unless changes require modifying them. Just rewrite the code without explanations: [/INST]
|
||||
\`\`\`{{{language}}}`;
|
||||
|
||||
const alpacaEditPrompt = `Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
||||
|
||||
### Instruction: Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
### Instruction: Leave existing comments in place unless changes require modifying them. Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
|
||||
### Input:
|
||||
|
||||
|
|
@ -116,7 +104,7 @@ const phindEditPrompt = `### System Prompt
|
|||
You are an expert programmer and write code on the first attempt without any errors or fillers.
|
||||
|
||||
### User Message:
|
||||
Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
Leave existing comments in place unless changes require modifying them. Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
|
|
@ -131,7 +119,7 @@ Sure! Here's the code you requested:
|
|||
const deepseekEditPrompt = `### System Prompt
|
||||
You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and your role is to assist with questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will not answer.
|
||||
### Instruction:
|
||||
Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
Leave existing comments in place unless changes require modifying them. Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
|
|
@ -145,7 +133,7 @@ Sure! Here's the code you requested:
|
|||
const zephyrEditPrompt = `<|system|>
|
||||
You are an expert programmer and write code on the first attempt without any errors or fillers.</s>
|
||||
<|user|>
|
||||
Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
Leave existing comments in place unless changes require modifying them. Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
|
|
@ -160,12 +148,12 @@ const openchatEditPrompt = `GPT4 Correct User: You are an expert programmer and
|
|||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
\`\`\`
|
||||
Please only respond with code and put it inside of a markdown code block. Do not give any explanation, but your code should perfectly satisfy the user request.<|end_of_turn|>GPT4 Correct Assistant: Sure thing! Here is the rewritten code that you requested:
|
||||
Please only respond with code and put it inside of a markdown code block. Do not give any explanation, but your code should perfectly satisfy the user request. Leave existing comments in place unless changes require modifying them.<|end_of_turn|>GPT4 Correct Assistant: Sure thing! Here is the rewritten code that you requested:
|
||||
\`\`\`{{{language}}}
|
||||
`;
|
||||
|
||||
const xWinCoderEditPrompt = `<system>: You are an AI coding agent that helps people with programming. Write a response that appropriately completes the user's request.
|
||||
<user>: Please rewrite the following code with these instructions: "{{{userInput}}}"
|
||||
<user>: Please rewrite the following code (without changing existing code comments) with these instructions: "{{{userInput}}}"
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
\`\`\`
|
||||
|
|
@ -177,7 +165,7 @@ Just rewrite the code without explanations:
|
|||
const neuralChatEditPrompt = `### System:
|
||||
You are an expert programmer and write code on the first attempt without any errors or fillers.
|
||||
### User:
|
||||
Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
Rewrite the code (without changing existing code comments) to satisfy this request: "{{{userInput}}}"
|
||||
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
|
|
@ -188,7 +176,7 @@ Sure! Here's the code you requested:
|
|||
\`\`\`{{{language}}}
|
||||
`;
|
||||
|
||||
const codeLlama70bEditPrompt = `<s>Source: system\n\n You are an expert programmer and write code on the first attempt without any errors or fillers. <step> Source: user\n\n Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
const codeLlama70bEditPrompt = `<s>Source: system\n\n You are an expert programmer and write code on the first attempt without any errors or fillers. <step> Source: user\n\n Rewrite the code (without changing existing code comments) to satisfy this request: "{{{userInput}}}"
|
||||
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
|
|
@ -209,7 +197,7 @@ You are an expert programmer. You will rewrite the above code to do the followin
|
|||
|
||||
${otherData.userInput}
|
||||
|
||||
Output only a code block with the rewritten code:
|
||||
Leave existing comments in place unless changes require modifying them. Output only a code block with the rewritten code:
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
@ -224,12 +212,12 @@ const llama3EditPrompt: PromptTemplate = `<|begin_of_text|><|start_header_id|>us
|
|||
{{{codeToEdit}}}
|
||||
\`\`\`
|
||||
|
||||
Rewrite the above code to satisfy this request: "{{{userInput}}}"<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
||||
Rewrite the above code to satisfy this request (without changing existing code comments): "{{{userInput}}}"<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
||||
Sure! Here's the code you requested:
|
||||
\`\`\`{{{language}}}`;
|
||||
|
||||
const gemmaEditPrompt = `<start_of_turn>user
|
||||
You are an expert programmer and write code on the first attempt without any errors or fillers. Rewrite the code to satisfy this request: "{{{userInput}}}"
|
||||
You are an expert programmer and write code on the first attempt without any errors or fillers. Rewrite the code to satisfy this request (without changing existing code comments): "{{{userInput}}}"
|
||||
|
||||
\`\`\`{{{language}}}
|
||||
{{{codeToEdit}}}
|
||||
|
|
@ -244,7 +232,6 @@ export {
|
|||
alpacaEditPrompt,
|
||||
claudeEditPrompt,
|
||||
codeLlama70bEditPrompt,
|
||||
codellamaInfillEditPrompt,
|
||||
deepseekEditPrompt,
|
||||
gemmaEditPrompt,
|
||||
gptEditPrompt,
|
||||
|
|
@ -254,7 +241,6 @@ export {
|
|||
openchatEditPrompt,
|
||||
osModelsEditPrompt,
|
||||
phindEditPrompt,
|
||||
simplestEditPrompt,
|
||||
simplifiedEditPrompt,
|
||||
xWinCoderEditPrompt,
|
||||
zephyrEditPrompt,
|
||||
|
|
|
|||
|
|
@ -76,5 +76,5 @@ export const defaultApplyPrompt: PromptTemplateFunction = (
|
|||
history,
|
||||
otherData,
|
||||
) => {
|
||||
return `${otherData.original_code}\n\nThe following code was suggested as an edit:\n\`\`\`\n${otherData.new_code}\n\`\`\`\nPlease apply it to the previous code.`;
|
||||
return `${otherData.original_code}\n\nThe following code was suggested as an edit:\n\`\`\`\n${otherData.new_code}\n\`\`\`\nPlease apply it to the previous code. Leave existing comments in place unless changes require modifying them.`;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -124,6 +124,10 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
|
|||
describe("cohere", () => {
|
||||
const supportsFn = PROVIDER_TOOL_SUPPORT["cohere"];
|
||||
|
||||
it("should return false for Command A Vision models", () => {
|
||||
expect(supportsFn("command-a-vision")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true for Command models", () => {
|
||||
expect(supportsFn("command-r")).toBe(true);
|
||||
expect(supportsFn("command-a")).toBe(true);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
|
|||
].some((part) => model.toLowerCase().startsWith(part));
|
||||
},
|
||||
anthropic: (model) => {
|
||||
const lower = model.toLowerCase();
|
||||
if (
|
||||
[
|
||||
"claude-3-5",
|
||||
|
|
@ -38,10 +39,13 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
|
|||
"claude-sonnet-4",
|
||||
"claude-4-sonnet",
|
||||
"claude-opus-4",
|
||||
].some((part) => model.toLowerCase().startsWith(part))
|
||||
].some((part) => lower.startsWith(part))
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
if (lower.includes("claude") && lower.includes("4-5")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
|
@ -96,7 +100,11 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
|
|||
return false;
|
||||
},
|
||||
cohere: (model) => {
|
||||
return model.toLowerCase().startsWith("command");
|
||||
const lower = model.toLowerCase();
|
||||
if (lower.startsWith("command-a-vision")) {
|
||||
return false;
|
||||
}
|
||||
return lower.startsWith("command");
|
||||
},
|
||||
gemini: (model) => {
|
||||
// All gemini models support function calling
|
||||
|
|
@ -112,7 +120,9 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
|
|||
},
|
||||
xAI: (model) => {
|
||||
const lowerCaseModel = model.toLowerCase();
|
||||
return ["grok-3", "grok-4"].some((val) => lowerCaseModel.includes(val));
|
||||
return ["grok-3", "grok-4", "grok-code"].some((val) =>
|
||||
lowerCaseModel.includes(val),
|
||||
);
|
||||
},
|
||||
bedrock: (model) => {
|
||||
if (
|
||||
|
|
@ -189,6 +199,8 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
|
|||
"llama3-groq",
|
||||
"granite3",
|
||||
"granite-3",
|
||||
"granite4",
|
||||
"granite-4",
|
||||
"aya-expanse",
|
||||
"firefunction-v2",
|
||||
"mistral",
|
||||
|
|
@ -383,6 +395,8 @@ export function isRecommendedAgentModel(modelName: string): boolean {
|
|||
[/gpt-5/],
|
||||
[/claude/, /sonnet/, /3\.7|3-7|-4/],
|
||||
[/claude/, /opus/, /-4/],
|
||||
[/grok-code/],
|
||||
[/claude/, /4-5/],
|
||||
];
|
||||
for (const combo of recs) {
|
||||
if (combo.every((regex) => modelName.toLowerCase().match(regex))) {
|
||||
|
|
|
|||
|
|
@ -461,9 +461,13 @@ export class NextEditProvider {
|
|||
// prompts[1] extracts the user prompt from the system-user prompt pair.
|
||||
// NOTE: Stream is currently set to false, but this should ideally be a per-model flag.
|
||||
// Mercury Coder currently does not support streaming.
|
||||
const msg: ChatMessage = await llm.chat([prompts[1]], token, {
|
||||
stream: false,
|
||||
});
|
||||
const msg: ChatMessage = await llm.chat(
|
||||
this.endpointType === "fineTuned" ? [prompts[1]] : prompts,
|
||||
token,
|
||||
{
|
||||
stream: false,
|
||||
},
|
||||
);
|
||||
|
||||
if (typeof msg.content !== "string") {
|
||||
return undefined;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { IDE, Position } from "../..";
|
||||
import { GetLspDefinitionsFunction } from "../../autocomplete/types";
|
||||
import { ConfigHandler } from "../../config/ConfigHandler";
|
||||
import { isSecurityConcern } from "../../indexing/ignore.js";
|
||||
import { NextEditProvider } from "../NextEditProvider";
|
||||
import { EditAggregator } from "./aggregateEdits";
|
||||
import { BeforeAfterDiff, createDiff, DiffFormatType } from "./diffFormatting";
|
||||
|
|
@ -23,16 +24,18 @@ export const processSmallEdit = async (
|
|||
recentlyVisitedRanges: [],
|
||||
};
|
||||
|
||||
NextEditProvider.getInstance().addDiffToContext(
|
||||
createDiff({
|
||||
beforeContent: beforeAfterdiff.beforeContent,
|
||||
afterContent: beforeAfterdiff.afterContent,
|
||||
filePath: beforeAfterdiff.filePath,
|
||||
diffType: DiffFormatType.Unified,
|
||||
contextLines: 3, // NOTE: This can change depending on experiments!
|
||||
workspaceDir: currentData.workspaceDir,
|
||||
}),
|
||||
);
|
||||
if (!isSecurityConcern(beforeAfterdiff.filePath)) {
|
||||
NextEditProvider.getInstance().addDiffToContext(
|
||||
createDiff({
|
||||
beforeContent: beforeAfterdiff.beforeContent,
|
||||
afterContent: beforeAfterdiff.afterContent,
|
||||
filePath: beforeAfterdiff.filePath,
|
||||
diffType: DiffFormatType.Unified,
|
||||
contextLines: 3, // NOTE: This can change depending on experiments!
|
||||
workspaceDir: currentData.workspaceDir,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
void processNextEditData({
|
||||
filePath: beforeAfterdiff.filePath,
|
||||
|
|
|
|||
269
core/package-lock.json
generated
269
core/package-lock.json
generated
|
|
@ -40,7 +40,7 @@
|
|||
"fastest-levenshtein": "^1.0.16",
|
||||
"filtrex": "^3.1.0",
|
||||
"follow-redirects": "^1.15.5",
|
||||
"google-auth-library": "^9.14.2",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"handlebars": "^4.7.8",
|
||||
"http-proxy-agent": "^7.0.1",
|
||||
"https-proxy-agent": "^7.0.3",
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
"pg": "^8.11.3",
|
||||
"plist": "^3.1.0",
|
||||
"posthog-node": "^3.6.3",
|
||||
"puppeteer": "^22.4.0",
|
||||
"puppeteer": "^24.15.0",
|
||||
"puppeteer-chromium-resolver": "^23.0.0",
|
||||
"quick-lru": "^7.0.0",
|
||||
"replicate": "^0.26.0",
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
"winston": "^3.17.0",
|
||||
"workerpool": "^9.1.3",
|
||||
"yaml": "^2.4.2",
|
||||
"zod": "^3.24.2"
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.24.7",
|
||||
|
|
@ -158,8 +158,8 @@
|
|||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.2"
|
||||
"yaml": "^2.8.1",
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"bin": {
|
||||
"config-yaml": "dist/cli.js"
|
||||
|
|
@ -220,19 +220,19 @@
|
|||
"version": "1.15.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.62.0",
|
||||
"@anthropic-ai/sdk": "^0.67.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
|
||||
"@aws-sdk/credential-providers": "^3.840.0",
|
||||
"@aws-sdk/credential-providers": "^3.913.0",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"@continuedev/config-yaml": "^1.14.0",
|
||||
"@continuedev/config-yaml": "^1.29.0",
|
||||
"@continuedev/fetch": "^1.5.0",
|
||||
"dotenv": "^16.5.0",
|
||||
"google-auth-library": "^10.1.0",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"json-schema": "^0.4.0",
|
||||
"node-fetch": "^3.3.2",
|
||||
"openai": "^5.13.1",
|
||||
"openai": "^5.23.2",
|
||||
"uuid": "^11.1.0",
|
||||
"zod": "^3.24.2"
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
|
|
@ -5143,17 +5143,17 @@
|
|||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
||||
},
|
||||
"node_modules/@puppeteer/browsers": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.0.tgz",
|
||||
"integrity": "sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA==",
|
||||
"version": "2.10.13",
|
||||
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.13.tgz",
|
||||
"integrity": "sha512-a9Ruw3j3qlnB5a/zHRTkruppynxqaeE4H9WNj5eYGRWqw0ZauZ23f4W2ARf3hghF5doozyD+CRtt7XSYuYRI/Q==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.5",
|
||||
"debug": "^4.4.3",
|
||||
"extract-zip": "^2.0.1",
|
||||
"progress": "^2.0.3",
|
||||
"proxy-agent": "^6.4.0",
|
||||
"semver": "^7.6.3",
|
||||
"tar-fs": "^3.0.6",
|
||||
"unbzip2-stream": "^1.4.3",
|
||||
"proxy-agent": "^6.5.0",
|
||||
"semver": "^7.7.3",
|
||||
"tar-fs": "^3.1.1",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -5164,9 +5164,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@puppeteer/browsers/node_modules/semver": {
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"version": "7.7.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
||||
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
|
|
@ -8207,9 +8208,10 @@
|
|||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
||||
},
|
||||
"node_modules/bignumber.js": {
|
||||
"version": "9.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz",
|
||||
"integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==",
|
||||
"version": "9.3.1",
|
||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
|
||||
"integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
|
|
@ -8768,26 +8770,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/chromium-bidi": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.3.tgz",
|
||||
"integrity": "sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A==",
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-11.0.0.tgz",
|
||||
"integrity": "sha512-cM3DI+OOb89T3wO8cpPSro80Q9eKYJ7hGVXoGS3GkDPxnYSqiv+6xwpIf6XERyJ9Tdsl09hmNmY94BkgZdVekw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"mitt": "3.0.1",
|
||||
"urlpattern-polyfill": "10.0.0",
|
||||
"zod": "3.23.8"
|
||||
"mitt": "^3.0.1",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"devtools-protocol": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/chromium-bidi/node_modules/zod": {
|
||||
"version": "3.23.8",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
|
||||
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
},
|
||||
"node_modules/ci-info": {
|
||||
"version": "3.9.0",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
|
||||
|
|
@ -9314,9 +9308,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
|
|
@ -9524,9 +9519,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/devtools-protocol": {
|
||||
"version": "0.0.1312386",
|
||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz",
|
||||
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA=="
|
||||
"version": "0.0.1521046",
|
||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1521046.tgz",
|
||||
"integrity": "sha512-vhE6eymDQSKWUXwwA37NtTTVEzjtGVfDr3pRbsWEQ5onH/Snp2c+2xZHWJJawG/0hCCJLRGt4xVtEVUVILol4w==",
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "7.0.0",
|
||||
|
|
@ -11508,68 +11504,76 @@
|
|||
}
|
||||
},
|
||||
"node_modules/gaxios": {
|
||||
"version": "6.7.1",
|
||||
"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz",
|
||||
"integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz",
|
||||
"integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"extend": "^3.0.2",
|
||||
"https-proxy-agent": "^7.0.1",
|
||||
"is-stream": "^2.0.0",
|
||||
"node-fetch": "^2.6.9",
|
||||
"uuid": "^9.0.1"
|
||||
"node-fetch": "^3.3.2",
|
||||
"rimraf": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/gaxios/node_modules/node-fetch": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"node_modules/gaxios/node_modules/glob": {
|
||||
"version": "10.5.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
|
||||
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
"foreground-child": "^3.1.0",
|
||||
"jackspeak": "^3.1.2",
|
||||
"minimatch": "^9.0.4",
|
||||
"minipass": "^7.1.2",
|
||||
"package-json-from-dist": "^1.0.0",
|
||||
"path-scurry": "^1.11.1"
|
||||
},
|
||||
"bin": {
|
||||
"glob": "dist/esm/bin.mjs"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/gaxios/node_modules/minipass": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
||||
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/gaxios/node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/gaxios/node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"node_modules/gaxios/node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"node_modules/gaxios/node_modules/rimraf": {
|
||||
"version": "5.0.10",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz",
|
||||
"integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
"glob": "^10.3.7"
|
||||
},
|
||||
"bin": {
|
||||
"rimraf": "dist/esm/bin.mjs"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/gcp-metadata": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz",
|
||||
"integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==",
|
||||
"version": "8.1.2",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz",
|
||||
"integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"gaxios": "^6.0.0",
|
||||
"gaxios": "^7.0.0",
|
||||
"google-logging-utils": "^1.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/generate-function": {
|
||||
|
|
@ -11780,17 +11784,28 @@
|
|||
}
|
||||
},
|
||||
"node_modules/google-auth-library": {
|
||||
"version": "9.15.0",
|
||||
"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.0.tgz",
|
||||
"integrity": "sha512-7ccSEJFDFO7exFbO6NRyC+xH8/mZ1GZGG2xxx9iHxZWcjUjJpjWxIMw3cofAKcueZ6DATiukmmprD7yavQHOyQ==",
|
||||
"version": "10.5.0",
|
||||
"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz",
|
||||
"integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.0",
|
||||
"ecdsa-sig-formatter": "^1.0.11",
|
||||
"gaxios": "^6.1.1",
|
||||
"gcp-metadata": "^6.1.0",
|
||||
"gtoken": "^7.0.0",
|
||||
"gaxios": "^7.0.0",
|
||||
"gcp-metadata": "^8.0.0",
|
||||
"google-logging-utils": "^1.0.0",
|
||||
"gtoken": "^8.0.0",
|
||||
"jws": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/google-logging-utils": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz",
|
||||
"integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
|
@ -11883,15 +11898,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/gtoken": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz",
|
||||
"integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==",
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz",
|
||||
"integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"gaxios": "^6.0.0",
|
||||
"gaxios": "^7.0.0",
|
||||
"jws": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/guid-typescript": {
|
||||
|
|
@ -13955,6 +13971,7 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
|
||||
"integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bignumber.js": "^9.0.0"
|
||||
}
|
||||
|
|
@ -16586,18 +16603,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/puppeteer": {
|
||||
"version": "22.15.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.15.0.tgz",
|
||||
"integrity": "sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q==",
|
||||
"version": "24.30.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.30.0.tgz",
|
||||
"integrity": "sha512-A5OtCi9WpiXBQgJ2vQiZHSyrAzQmO/WDsvghqlN4kgw21PhxA5knHUaUQq/N3EMt8CcvSS0RM+kmYLJmedR3TQ==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@puppeteer/browsers": "2.3.0",
|
||||
"@puppeteer/browsers": "2.10.13",
|
||||
"chromium-bidi": "11.0.0",
|
||||
"cosmiconfig": "^9.0.0",
|
||||
"devtools-protocol": "0.0.1312386",
|
||||
"puppeteer-core": "22.15.0"
|
||||
"devtools-protocol": "0.0.1521046",
|
||||
"puppeteer-core": "24.30.0",
|
||||
"typed-query-selector": "^2.12.0"
|
||||
},
|
||||
"bin": {
|
||||
"puppeteer": "lib/esm/puppeteer/node/cli.js"
|
||||
"puppeteer": "lib/cjs/puppeteer/node/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
|
@ -16690,15 +16710,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/puppeteer-core": {
|
||||
"version": "22.15.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.15.0.tgz",
|
||||
"integrity": "sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==",
|
||||
"version": "24.30.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.30.0.tgz",
|
||||
"integrity": "sha512-2S3Smy0t0W4wJnNvDe7W0bE7wDmZjfZ3ljfMgJd6hn2Hq/f0jgN+x9PULZo2U3fu5UUIJ+JP8cNUGllu8P91Pg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@puppeteer/browsers": "2.3.0",
|
||||
"chromium-bidi": "0.6.3",
|
||||
"debug": "^4.3.6",
|
||||
"devtools-protocol": "0.0.1312386",
|
||||
"ws": "^8.18.0"
|
||||
"@puppeteer/browsers": "2.10.13",
|
||||
"chromium-bidi": "11.0.0",
|
||||
"debug": "^4.4.3",
|
||||
"devtools-protocol": "0.0.1521046",
|
||||
"typed-query-selector": "^2.12.0",
|
||||
"webdriver-bidi-protocol": "0.3.8",
|
||||
"ws": "^8.18.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
|
@ -19674,6 +19697,12 @@
|
|||
"resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.21.0.tgz",
|
||||
"integrity": "sha512-iJ+QJ6ikN9D9cG7Kh6q3KtAstYFUQbYZ8OjuPEJYWfj2kLrmp5I3C2n6WjE1Y3jvj7nJbkcrJytJGWUEhCxn+g=="
|
||||
},
|
||||
"node_modules/webdriver-bidi-protocol": {
|
||||
"version": "0.3.8",
|
||||
"resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.3.8.tgz",
|
||||
"integrity": "sha512-21Yi2GhGntMc671vNBCjiAeEVknXjVRoyu+k+9xOMShu+ZQfpGQwnBqbNz/Sv4GXZ6JmutlPAi2nIJcrymAWuQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
|
||||
|
|
@ -20080,9 +20109,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
|
||||
"version": "8.18.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
||||
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
|
@ -20206,9 +20236,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.24.2",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz",
|
||||
"integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
|
||||
"version": "3.25.76",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
"fastest-levenshtein": "^1.0.16",
|
||||
"filtrex": "^3.1.0",
|
||||
"follow-redirects": "^1.15.5",
|
||||
"google-auth-library": "^9.14.2",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"handlebars": "^4.7.8",
|
||||
"http-proxy-agent": "^7.0.1",
|
||||
"https-proxy-agent": "^7.0.3",
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
"pg": "^8.11.3",
|
||||
"plist": "^3.1.0",
|
||||
"posthog-node": "^3.6.3",
|
||||
"puppeteer": "^22.4.0",
|
||||
"puppeteer": "^24.15.0",
|
||||
"puppeteer-chromium-resolver": "^23.0.0",
|
||||
"quick-lru": "^7.0.0",
|
||||
"replicate": "^0.26.0",
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
"winston": "^3.17.0",
|
||||
"workerpool": "^9.1.3",
|
||||
"yaml": "^2.4.2",
|
||||
"zod": "^3.24.2"
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"engine-strict": true,
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const RUN_COMMAND_NOTES = `The shell is not stateful and will not remember any p
|
|||
When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.\
|
||||
When suggesting subsequent shell commands ALWAYS format them in shell command blocks.\
|
||||
Do NOT perform actions requiring special/admin privileges.\
|
||||
IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc).\
|
||||
${PLATFORM_INFO}`;
|
||||
|
||||
export const runTerminalCommandTool: Tool = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as fs from "fs";
|
||||
|
||||
import { Session, BaseSessionMetadata } from "../index.js";
|
||||
import { BaseSessionMetadata, Session } from "../index.js";
|
||||
import { ListHistoryOptions } from "../protocol/core.js";
|
||||
|
||||
import { NEW_SESSION_TITLE } from "./constants.js";
|
||||
|
|
@ -108,6 +108,13 @@ export class HistoryManager {
|
|||
workspaceDirectory: session.workspaceDirectory,
|
||||
history: session.history,
|
||||
};
|
||||
if (session.mode) {
|
||||
orderedSession.mode = session.mode;
|
||||
}
|
||||
if (session.chatModelTitle !== undefined) {
|
||||
orderedSession.chatModelTitle = session.chatModelTitle;
|
||||
}
|
||||
|
||||
fs.writeFileSync(
|
||||
getSessionFilePath(session.sessionId),
|
||||
JSON.stringify(orderedSession, undefined, 2),
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ We strongly encourage using Continue's AI assistance to maintain consistency and
|
|||
The easiest way to get started is using our pre-configured documentation agent:
|
||||
|
||||
<Steps>
|
||||
<Step title="Install the agent from Continue Hub">
|
||||
Visit [the Docs Assistant - Mintlify in the Hub](https://hub.continue.dev/continuedev/docs-mintlify) and click "Install" to add it to your Continue setup. This agent comes pre-configured with all our documentation standards.
|
||||
<Step title="Install the agent from Continue Mission Control">
|
||||
Visit [the Docs Assistant - Mintlify in Mission Control](https://hub.continue.dev/continuedev/docs-mintlify) and click "Install" to add it to your Continue setup. This agent comes pre-configured with all our documentation standards.
|
||||
|
||||
<Info>
|
||||
Learn more about Continue Configs in our [config documentation](/guides/understanding-configs).
|
||||
|
|
@ -139,13 +139,13 @@ If you want more control or customization, you can create your own documentation
|
|||
</Step>
|
||||
|
||||
<Step title="Add the Continue Docs MCP">
|
||||
Install from Continue Hub: https://hub.continue.dev/continuedev/continue-docs-mcp
|
||||
Install from Continue Mission Control: https://hub.continue.dev/continuedev/continue-docs-mcp
|
||||
|
||||
This MCP provides context about Continue's documentation structure and standards.
|
||||
</Step>
|
||||
|
||||
<Step title="Add Mintlify formatting rules">
|
||||
Install from Continue Hub: https://hub.continue.dev/mintlify/technical-writing-rule
|
||||
Install from Continue Mission Control: https://hub.continue.dev/mintlify/technical-writing-rule
|
||||
|
||||
This rule ensures proper Mintlify component formatting.
|
||||
</Step>
|
||||
|
|
@ -339,7 +339,7 @@ Learn more about linking PRs to issues in the [GitHub documentation](https://doc
|
|||
## 🆘 Getting Help
|
||||
|
||||
- **Start a Discussion**: Use [GitHub Discussions](https://github.com/continuedev/continue/discussions) for documentation issues, suggestions, or questions
|
||||
- **Continue agent questions**: Check the [Continue Hub page](https://hub.continue.dev/continuedev/docs-mintlify)
|
||||
- **Continue agent questions**: Check the [Continue Mission Control page](https://hub.continue.dev/continuedev/docs-mintlify)
|
||||
- **Discord community**: Join our Discord for real-time help
|
||||
- **Existing docs**: Review similar pages for formatting examples
|
||||
---
|
||||
|
|
|
|||
261
docs/agents/create-and-edit.mdx
Normal file
261
docs/agents/create-and-edit.mdx
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
---
|
||||
title: "Create and Edit Agents"
|
||||
description: "Build custom AI workflows with prompts, rules, and tools through the Continue Mission Control interface"
|
||||
sidebarTitle: "Create & Edit"
|
||||
---
|
||||
|
||||
<Card title="Creating Custom Agents" icon="wrench">
|
||||
You can only create and edit Agents through Mission Control in the Continue Mission Control web interface.
|
||||
This ensures proper validation, versioning, and team collaboration features.
|
||||
</Card>
|
||||
|
||||
## Try an Agent First: Your 60-Second Challenge
|
||||
|
||||
Before creating your own agent, let's see one in action! The fastest way to experience the power of Continue agents is with our demo repository.
|
||||
|
||||

|
||||
|
||||
### See an Agent Create a Pull Request in Under 60 Seconds
|
||||
|
||||
<Steps>
|
||||
<Step title="🍴 Fork Our Demo Repository">
|
||||
Get a safe sandbox to experiment with:
|
||||
|
||||
**Option 1: GitHub Web Interface**
|
||||
Visit [github.com/continuedev/demo-project](https://github.com/continuedev/demo-project) and click **Fork**
|
||||
|
||||
**Option 2: GitHub CLI**
|
||||
```bash
|
||||
gh repo fork continuedev/demo-project
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="🎯 Access Mission Control">
|
||||
Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) and:
|
||||
- **Connect GitHub** and authorize Continue when prompted
|
||||
- This gives agents access to create PRs in your repositories
|
||||
</Step>
|
||||
|
||||
<Step title="🚀 Run Your First Agent">
|
||||
**Target your forked demo repo** and try one of these commands:
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Add New Feature">
|
||||
```
|
||||
Create a new function that calculates fibonacci numbers.
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab title="Fix Existing Bug">
|
||||
```
|
||||
Fix the TypeError in api/users.ts
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab title="Add Documentation">
|
||||
```
|
||||
Add comprehensive README documentation with setup instructions.
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
</Step>
|
||||
|
||||
<Step title="✨ Watch the Magic">
|
||||
**Result:** A fully-formed Pull Request opens in your demo repo with:
|
||||
- Complete implementation or fix
|
||||
- Proper commit messages
|
||||
- Detailed PR description
|
||||
- Ready for review and merge
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
<Info>
|
||||
**Why Use the Demo Repo?**
|
||||
- **Safe testing environment** - No risk to your production code
|
||||
- **Pre-configured issues** - Common bugs and features to practice with
|
||||
- **Immediate results** - See agents in action without setup complexity
|
||||
- **Learn by example** - Study the generated code and PR descriptions
|
||||
</Info>
|
||||
|
||||
<Tip>
|
||||
Once you see how agents work with the demo repo, you'll understand exactly how to create and customize your own for real projects!
|
||||
</Tip>
|
||||
|
||||
---
|
||||
|
||||
## Creating an Agent
|
||||
|
||||

|
||||
|
||||
|
||||
<Steps>
|
||||
<Step title="🧭 Navigate to Create Agent">
|
||||
From the Continue Mission Control top navigation bar, select **"+"** → **"New Agent"**.
|
||||
|
||||
This opens the **Create an Agent (beta)** form with all required fields.
|
||||
|
||||
</Step>
|
||||
|
||||
<Step title="🧩 Fill Out the Agent Form">
|
||||
Configure your agent with the following fields:
|
||||
|
||||
| Field | What to Enter | Example |
|
||||
|-------|---------------|---------|
|
||||
| **Name** | Display name shown in Mission Control | `GitHub PR Agent` |
|
||||
| **Prompt** | First instruction the agent receives | `Open a GitHub PR to fix the specified issue.` |
|
||||
| **Description** | What the agent does | `Creates a pull request and includes AI-generated summaries.` |
|
||||
| **Tools (MCPs)** | Select built-in or custom MCPs | `GitHub, PostHog, Supabase` |
|
||||
| **Rules** | Add any organizational rules | `continuedev/gh-pr-commit-workflow, continuedev/summarization` |
|
||||
| **Model** | Choose a default LLM | `Claude Sonnet 4.5` |
|
||||
| **Owner + Slug** | Determines namespace | `my-org/github-pr-agent` |
|
||||
| **Visibility** | Access level | `Public, Organization, or Private` |
|
||||
|
||||
<Info>
|
||||
**Tip**: Start with a simple prompt and add complexity through rules and tools. The prompt should be a clear, single instruction that defines the agent's primary goal.
|
||||
</Info>
|
||||
</Step>
|
||||
|
||||
<Step title="💡 Preview the Configuration">
|
||||
As you fill in the fields, the right-hand panel shows a live preview of your agent's YAML configuration:
|
||||
|
||||
```yaml
|
||||
name: Open PR with Fix
|
||||
description: Open a GitHub PR to fix the specified issue
|
||||
tools: built_in, anthropic/github-mcp
|
||||
rules:
|
||||
- continuedev/gh-pr-commit-workflow
|
||||
- continuedev/summarization
|
||||
model: Claude Sonnet 4.5
|
||||
visibility: public
|
||||
```
|
||||
|
||||
This preview helps you verify the configuration before creating the agent.
|
||||
</Step>
|
||||
|
||||
<Step title="✅ Create and Test">
|
||||
Click **"Create Agent"** to save and publish it.
|
||||
|
||||
Your agent is immediately available to run in:
|
||||
- Mission Control web interface
|
||||
- TUI mode: `cn --agent your-org/your-agent-name`
|
||||
- Headless mode: `cn --agent -p your-org/your-agent-name "prompt" --auto`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Editing an Agent
|
||||
|
||||
You can edit any agent you own or that belongs to your organization.
|
||||
|
||||
<Steps>
|
||||
<Step title="🧭 Access the Agent">
|
||||
From the **Agents** page or Mission Control view, click your agent's name, then select **"Edit Agent"**.
|
||||
</Step>
|
||||
|
||||
<Step title="🔧 Update Configuration">
|
||||
You can modify any of these components:
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Prompt">
|
||||
**Refine task behavior**
|
||||
|
||||
```
|
||||
# Before
|
||||
Fix the bug in the authentication system
|
||||
|
||||
# After
|
||||
Fix the authentication bug by:
|
||||
1. Identifying the root cause
|
||||
2. Implementing a secure solution
|
||||
3. Adding appropriate tests
|
||||
4. Opening a PR with detailed explanation
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab title="Rules">
|
||||
**Enforce team standards**
|
||||
|
||||
Add or remove organizational rules:
|
||||
- `continuedev/security-first` - Always scan for vulnerabilities
|
||||
- `continuedev/test-coverage` - Require tests for new code
|
||||
- `my-org/style-guide` - Follow company coding standards
|
||||
</Tab>
|
||||
|
||||
<Tab title="Tools (MCPs)">
|
||||
**Connect additional systems**
|
||||
|
||||
- Add GitHub MCP for repository operations
|
||||
- Include Sentry MCP for error monitoring
|
||||
- Connect Supabase MCP for database operations
|
||||
- Use custom MCPs for internal tools
|
||||
</Tab>
|
||||
|
||||
<Tab title="Model & Visibility">
|
||||
**Adjust behavior and access**
|
||||
|
||||
- **Model**: Switch between Claude, GPT-4, or other supported LLMs
|
||||
- **Visibility**: Control who can see and use the agent
|
||||
- Public: Anyone can discover and use
|
||||
- Organization: Only your team members
|
||||
- Private: Only you can access
|
||||
</Tab>
|
||||
</Tabs>
|
||||
</Step>
|
||||
|
||||
<Step title="💾 Save Changes">
|
||||
Click **"Update Agent"** when finished.
|
||||
|
||||
The updated version is instantly available to your team with automatic versioning for change tracking.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
<Warning>
|
||||
Test your agent thoroughly to ensure they interact as expected.
|
||||
</Warning>
|
||||
|
||||
## Example Agent Configurations
|
||||
|
||||
Here are proven agent configurations you can create or use as inspiration:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Security Scanner Agent" icon="shield" href="https://hub.continue.dev/continuedev/snyk-continuous-ai-agent">
|
||||
**Snyk Continuous AI Agent** - Comprehensive security scanning with Snyk MCP integration.
|
||||
|
||||
Automates dependency analysis, vulnerability scanning, and creates remediation PRs with AI-powered fix suggestions.
|
||||
</Card>
|
||||
|
||||
<Card title="Performance Monitor" icon="gauge" href="https://hub.continue.dev/continuedev/netlify-continuous-ai-agent">
|
||||
**Netlify Continuous AI Agent** - Performance optimization with A/B testing and monitoring.
|
||||
|
||||
Tracks Core Web Vitals, identifies regressions, and provides optimization recommendations.
|
||||
</Card>
|
||||
|
||||
<Card title="Error Monitoring Agent" icon="bug" href="https://hub.continue.dev/continuedev/sentry-continuous-ai-agent">
|
||||
**Sentry Continuous AI Agent** - Automated error analysis and issue creation.
|
||||
|
||||
Monitors production errors, provides root cause analysis, and creates actionable GitHub issues.
|
||||
</Card>
|
||||
|
||||
<Card title="GitHub Management" icon="github" href="https://hub.continue.dev/continuedev/github-manager-ai-agent">
|
||||
**GitHub Manager AI Agent** - Comprehensive GitHub workflow automation.
|
||||
|
||||
Handles issue triage, PR reviews, and release note generation with natural language prompts.
|
||||
</Card>
|
||||
|
||||
<Card title="Database Management" icon="database" href=" https://hub.continue.dev/continuedev/supabase-agent">
|
||||
**Supabase Continuous AI Agent** - Database security and management workflows.
|
||||
|
||||
Audits Row Level Security, identifies vulnerabilities, and generates fixes automatically.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Common issues and solutions:
|
||||
|
||||
| Problem | Solution |
|
||||
|---------|----------|
|
||||
| **Agent doesn't complete tasks** | Simplify the prompt, add more specific instructions, verify tool permissions |
|
||||
| **Tools aren't working** | Check MCP configuration, verify API keys and permissions in Hub settings |
|
||||
| **Inconsistent behavior** | Add rules to enforce consistent patterns, test with various input scenarios |
|
||||
| **Performance issues** | Consider model choice, simplify complex multi-step workflows, optimize tool usage |
|
||||
190
docs/agents/intro.mdx
Normal file
190
docs/agents/intro.mdx
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
---
|
||||
title: "Getting Started with Agents"
|
||||
description: "Quick start guide for running AI workflows in Mission Control"
|
||||
sidebarTitle: "Getting Started"
|
||||
---
|
||||
|
||||
<Card title="🚀 Quick Start with Mission Control" icon="rocket">
|
||||
Mission Control is your web interface for running and managing AI agents. Get started in minutes with pre-built workflows for security scanning, GitHub management, analytics insights, and more.
|
||||
</Card>
|
||||
|
||||
<Info>
|
||||
Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051).
|
||||
</Info>
|
||||
|
||||
Use Mission Control to kick off agents for:
|
||||
- **Bug fixes & code quality** - Address nitpicks and technical debt
|
||||
- **Feature development** - Build boilerplate-heavy features
|
||||
- **Security & compliance** - [Automated vulnerability scanning](../guides/snyk-mcp-continue-cookbook)
|
||||
- **Investigation & analysis** - Research issues to kickstart your work
|
||||
- **Custom workflows** - Run repeatable tasks with your own rules and prompts
|
||||
|
||||
## Quick Start
|
||||
|
||||
<Steps>
|
||||
<Step title="Access Mission Control">
|
||||
Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) and connect with your GitHub account.
|
||||
|
||||

|
||||
</Step>
|
||||
|
||||
<Step title="Choose an Agent">
|
||||
Select from pre-configured agents or create your own:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Security Scanner" icon="shield-check">
|
||||
`continuedev/snyk-continuous-ai-agent`
|
||||
Finds vulnerabilities and creates fix PRs
|
||||
</Card>
|
||||
|
||||
<Card title="GitHub Manager" icon="github">
|
||||
`continuedev/github-project-manager-agent`
|
||||
Triages issues and manages workflows
|
||||
</Card>
|
||||
</CardGroup>
|
||||
</Step>
|
||||
|
||||
<Step title="Run Your First Agent">
|
||||
Enter a prompt and watch your agent work:
|
||||
|
||||
```
|
||||
"Fix the TypeError in api/users.ts and open a PR with tests"
|
||||
```
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
<Info>
|
||||
**New to agents?** Check out our [pre-configured agents](/hub/agents/overview#pre-configured-agents) to test out a workflow immediately.
|
||||
</Info>
|
||||
|
||||
## Example Workflow Tasks
|
||||
|
||||
Here are some example tasks you can try with your agents:
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="Bug Fixes & Code Quality">
|
||||
|
||||
- "Fix the TypeError in api/users.ts where the user object might be undefined"
|
||||
- "Add null checks to all database query results in the services/ directory"
|
||||
- "Fix all ESLint warnings in the components folder and open a PR"
|
||||
- "Update deprecated React lifecycle methods to hooks in legacy components"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Feature Development">
|
||||
|
||||
- "Create a new REST endpoint for user profile updates with validation and error handling"
|
||||
- "Add pagination to the products list page with previous/next buttons"
|
||||
- "Implement dark mode toggle using Tailwind CSS classes across all pages"
|
||||
- "Add unit tests for the authentication service using Jest"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Security & Compliance">
|
||||
|
||||
- "Run a complete security scan and create GitHub issues for critical vulnerabilities"
|
||||
- "Scan the codebase for hardcoded API keys and move them to environment variables"
|
||||
- "Add input sanitization to all user-facing form fields"
|
||||
- "Update npm packages with security vulnerabilities and test compatibility"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Documentation & Boilerplate">
|
||||
|
||||
- "Add JSDoc comments to all exported functions in the utils/ directory"
|
||||
- "Create a README.md for the new payment-processing module with setup instructions"
|
||||
- "Generate TypeScript interfaces for all API response schemas"
|
||||
- "Add error handling boilerplate to all async functions missing try-catch blocks"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Investigation & Analysis">
|
||||
|
||||
- "Investigate why the login API is returning 500 errors intermittently and suggest fixes"
|
||||
- "Analyze the performance bottleneck in the data processing pipeline"
|
||||
- "Review the database schema for the orders table and suggest optimizations"
|
||||
- "Find all TODO comments related to authentication and create a summary"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Refactoring">
|
||||
|
||||
- "Extract the repeated validation logic in controllers into a shared utility function"
|
||||
- "Convert all class components in src/legacy to functional components with hooks"
|
||||
- "Rename all instances of 'userId' to 'accountId' across the codebase"
|
||||
- "Split the 500-line UserService.ts into smaller, single-responsibility services"
|
||||
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
## Ways to Run Agents
|
||||
|
||||
Choose the method that fits your workflow:
|
||||
|
||||
<Tabs>
|
||||
<Tab title="🌐 Mission Control">
|
||||
**Web interface for interactive use**
|
||||
|
||||
Perfect for:
|
||||
- Exploring agent capabilities
|
||||
- Reviewing outputs before action
|
||||
- Team collaboration
|
||||
- One-time tasks
|
||||
|
||||
Access at [hub.continue.dev/agents](https://hub.continue.dev/agents)
|
||||
</Tab>
|
||||
|
||||
<Tab title="💻 CLI (TUI Mode)">
|
||||
**Terminal interface for development**
|
||||
|
||||
```bash
|
||||
cn --agent continuedev/github-project-manager-agent
|
||||
```
|
||||
|
||||
Perfect for:
|
||||
- Local development workflows
|
||||
- Testing agent behavior
|
||||
- Interactive debugging
|
||||
- Quick iterations
|
||||
</Tab>
|
||||
|
||||
<Tab title="🤖 Headless Mode">
|
||||
**Automated execution for CI/CD**
|
||||
|
||||
```bash
|
||||
cn --agent continuedev/snyk-continuous-ai-agent -p "Run security scan" --auto
|
||||
```
|
||||
|
||||
Perfect for:
|
||||
- Scheduled workflows
|
||||
- CI/CD integration
|
||||
- Webhook triggers
|
||||
- Background processing
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Best Practices for Success
|
||||
|
||||
The practice of using agents (Continuous AI) requires thoughtful setup of guardrails and habits:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Start Small" icon="seedling">
|
||||
Begin with tasks you're confident Continue can handle, like fixing known bugs with simple solutions.
|
||||
</Card>
|
||||
|
||||
<Card title="Practice Locally" icon="terminal">
|
||||
Test with [Continue CLI](../guides/cli) in TUI mode before deploying automation.
|
||||
</Card>
|
||||
|
||||
<Card title="Be Thorough" icon="clipboard-list">
|
||||
Agents can run for extended periods - invest time in detailed prompts with all important context.
|
||||
</Card>
|
||||
|
||||
<Card title="Team Alignment" icon="users">
|
||||
Discuss agent usage and adjust code review habits for higher PR volumes.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
<Info>
|
||||
**Learn More**: Explore advanced patterns and case studies on the [Continuous AI Blog](https://blog.continue.dev).
|
||||
</Info>
|
||||
228
docs/agents/overview.mdx
Normal file
228
docs/agents/overview.mdx
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
---
|
||||
title: "Agents Overview"
|
||||
description: "Standardized AI workflows that combine prompts, rules, and tools to complete specific, repeatable tasks"
|
||||
sidebarTitle: "Overview"
|
||||
---
|
||||
|
||||
<Card title="Agents in Continue" icon="robot">
|
||||
Agents are custom AI workflows that combine a prompt, rules, and tools (MCPs and more) to complete specific, repeatable tasks.
|
||||
They live in the Continue Mission Control and can be executed from Mission Control (web interface), TUI mode, or headless automation.
|
||||
</Card>
|
||||
|
||||
## What Are Agents?
|
||||
|
||||
Agents let your team standardize common workflows like opening GitHub PRs, summarizing analytics, or auditing security. Each agent includes:
|
||||
|
||||
### Agent Components
|
||||
|
||||
| **Component** | **Description** | **Example** |
|
||||
|----------------|-----------------|--------------|
|
||||
| **Prompt** | The agent’s main instruction that defines what it does and how it should behave. Additional user input is appended when invoked. | Example prompt: “Summarize ongoing work with status, blockers, and next steps. Use markdown formatting and a concise, professional tone.” |
|
||||
| **Rules** | Define consistent standards or behaviors that guide how the agent responds. Rules help ensure reliability across team usage. | “Always include related issue or PR links when summarizing work.” |
|
||||
| **Tools / MCPs** | External systems or integrations the agent can call to complete tasks. MCPs (Model Context Protocols) extend functionality through APIs. | GitHub, PostHog, Supabase |
|
||||
| **Model** | The large language model that powers the agent’s reasoning and output generation. | Claude Sonnet 4.5 |
|
||||
| **Visibility** | Determines who can view or use the agent. Controls access at creation time. | Public, Organization, or Private |
|
||||
|
||||
<Info>
|
||||
Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051).
|
||||
</Info>
|
||||
|
||||
## Ways to Run Agents
|
||||
|
||||
You can run Agents in three main ways:
|
||||
|
||||
<Tabs>
|
||||
<Tab title="🌐 Mission Control">
|
||||
**Interactive web interface**
|
||||
|
||||
Trigger from the Continue Mission Control and review results in real-time.
|
||||
|
||||
```bash
|
||||
# Navigate to hub.continue.dev/agents
|
||||
# Click "Run Agent" on any agent
|
||||
# Monitor progress and review outputs
|
||||
```
|
||||
|
||||
Perfect for: Interactive debugging, reviewing agent outputs, team collaboration
|
||||
</Tab>
|
||||
|
||||
<Tab title="💻 TUI Mode">
|
||||
**Interactive terminal mode**
|
||||
|
||||
Launch from terminal for live interaction and testing.
|
||||
|
||||
```bash
|
||||
cn --agent my-org/github-pr-agent
|
||||
# Interactive chat interface opens
|
||||
# Type your specific request
|
||||
# Review and approve actions
|
||||
```
|
||||
|
||||
Perfect for: Local development, testing prompts, quick one-off tasks
|
||||
</Tab>
|
||||
|
||||
<Tab title="🤖 Headless Mode">
|
||||
**Automated execution**
|
||||
|
||||
Run one-off or scheduled tasks automatically without interaction.
|
||||
|
||||
```bash
|
||||
cn -p --agent my-org/snyk-agent "Run weekly security scan" --auto
|
||||
```
|
||||
|
||||
Perfect for: CI/CD pipelines, scheduled tasks, webhook integrations
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Pre-configured Agents
|
||||
|
||||
Skip the setup and use battle-tested agents from our cookbook collection:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="🔒 Security Scanning" icon="shield-check" href="/guides/snyk-mcp-continue-cookbook">
|
||||
`continuedev/snyk-continuous-ai-agent`
|
||||
Finds vulnerabilities and opens PRs with fixes
|
||||
</Card>
|
||||
|
||||
<Card title="🐛 GitHub Management" icon="github" href="/guides/github-mcp-continue-cookbook">
|
||||
`continuedev/github-project-manager-agent`
|
||||
Triages issues and manages project workflows
|
||||
</Card>
|
||||
|
||||
<Card title="📊 Analytics Insights" icon="chart-bar" href="/guides/posthog-github-continuous-ai">
|
||||
`continuedev/posthog-continuous-ai-agent`
|
||||
Analyzes user data and creates actionable tasks
|
||||
</Card>
|
||||
|
||||
<Card title="⚡ Performance Optimization" icon="gauge-high" href="/guides/netlify-mcp-continuous-deployment">
|
||||
`continuedev/netlify-continuous-ai-agent`
|
||||
Monitors Core Web Vitals and optimizes deployments
|
||||
</Card>
|
||||
|
||||
<Card title="🗄️ Database Auditing" icon="database" href="/guides/supabase-mcp-database-workflow">
|
||||
`continuedev/supabase-agent`
|
||||
Audits RLS security and generates migrations
|
||||
</Card>
|
||||
|
||||
<Card title="🔄 Data Pipelines" icon="arrows-rotate" href="/guides/dlt-mcp-continue-cookbook">
|
||||
`continuedev/dlt-agent`
|
||||
Inspects pipelines and debugs load errors
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
<Info>
|
||||
**Explore More Agents**: Browse the complete collection of pre-configured agents and MCP integration cookbooks in our [Guides Overview](/guides/overview#mcp-integration-cookbooks).
|
||||
</Info>
|
||||
|
||||
{/* ## Webhook Integrations
|
||||
|
||||
Trigger Agents automatically through secure webhooks for CI/CD integration:
|
||||
|
||||
```bash
|
||||
POST /webhooks/ingest/:webhookId
|
||||
{
|
||||
"payload": { "trigger": "nightly-security-scan" }
|
||||
}
|
||||
```
|
||||
|
||||
Perfect for connecting with:
|
||||
- GitHub Actions workflows
|
||||
- Monitoring alerts (Sentry, DataDog)
|
||||
- Deployment pipelines
|
||||
- Scheduled maintenance tasks */}
|
||||
|
||||
## Collaboration
|
||||
|
||||
Agents are organizational assets — once created, everyone in your org can use them:
|
||||
|
||||
| Role | Permissions |
|
||||
|------|-------------|
|
||||
| **Public** | Use, create, remix, and delete Agents |
|
||||
| **Organization** | Share agents with your team |
|
||||
| **Private** | Create, edit, and delete Agents for your personal use |
|
||||
|
||||
## Getting Started
|
||||
|
||||
<Steps>
|
||||
<Step title="Try a Pre-configured Agent">
|
||||
Start with a cookbook agent like `continuedev/github-project-manager-agent`:
|
||||
|
||||
```bash
|
||||
cn --agent continuedev/github-project-manager-agent "List open issues labeled bug"
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Practice with TUI Mode">
|
||||
Test agents locally before automation:
|
||||
|
||||
```bash
|
||||
cn --agent continuedev/snyk-continuous-ai-agent
|
||||
# Interactive mode - perfect for learning how to use the agent for your use case
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Create Your First Agent">
|
||||
Ready to build custom workflows? Learn how in our [Create and Edit guide](/hub/agents/create-and-edit).
|
||||
</Step>
|
||||
|
||||
<Step title="Set Up Automation">
|
||||
Integrate with CI/CD using headless mode and webhooks for continuous workflows.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Monitoring
|
||||
|
||||
You can monitor all activity for your Agents directly in **Mission Control**.
|
||||
|
||||
<AccordionGroup>
|
||||
|
||||
<Accordion title="Inbox Overview">
|
||||
The **Inbox** shows every Task or Workflow run, and you can filter by Agent.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Detailed Session View">
|
||||
Click any session in the Inbox to open the Detail page.
|
||||
|
||||
Each session includes:
|
||||
- **Summary** — what the agent did and why
|
||||
- **Diff** — generated code changes
|
||||
- **Logs** — full execution trace, tool calls, and reasoning
|
||||
|
||||
This is the best way to review output, debug issues, or confirm correctness.
|
||||
</Accordion>
|
||||
|
||||
</AccordionGroup>
|
||||
|
||||
<Info>
|
||||
All monitoring is scoped to your current workspace.
|
||||
</Info>
|
||||
|
||||
## Best Practices
|
||||
|
||||
The practice of using cloud agents, which we call Continuous AI, requires forethought to set up the right guardrails:
|
||||
|
||||
- **Start Small**: Begin with tasks you're confident Continue can accomplish
|
||||
- **Use Thorough Prompts**: Agents can run for extended periods, so invest in detailed instructions
|
||||
- **Test Locally First**: Practice with TUI mode before deploying to production
|
||||
- **Team Alignment**: Discuss agent usage and adjust code review habits for higher PR volume
|
||||
- **Iterate and Improve**: Be willing to refine prompts based on results
|
||||
|
||||
## Next Steps
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Create an Agent" icon="plus" href="/hub/agents/create-and-edit">
|
||||
Build your first custom agent with prompts, rules, and tools
|
||||
</Card>
|
||||
|
||||
<Card title="Explore Cookbooks" icon="book-open" href="/guides/overview#mcp-integration-cookbooks">
|
||||
Browse pre-built agents for security, analytics, and more
|
||||
</Card>
|
||||
|
||||
<Card title="CLI Guide" icon="terminal" href="/cli/overview">
|
||||
Learn to run agents from the command line
|
||||
</Card>
|
||||
|
||||
<Card title="Mission Control" icon="desktop" href="https://hub.continue.dev/agents">
|
||||
Access the web interface to manage agents
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
@ -76,7 +76,7 @@ For interactive development and exploration:
|
|||
```bash
|
||||
cn login
|
||||
```
|
||||
This will open your browser to authenticate with Continue Hub.
|
||||
This will open your browser to authenticate with Continue Mission Control.
|
||||
</Step>
|
||||
|
||||
<Step title="Test TUI Mode">
|
||||
|
|
@ -101,7 +101,7 @@ For automation workflows and scripting:
|
|||
<Steps>
|
||||
<Step title="Get API Key for Automation">
|
||||
For automation workflows, get an API key:
|
||||
1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys)
|
||||
1. Visit [Continue Mission Control API Keys](https://hub.continue.dev/settings/api-keys)
|
||||
2. Click **"+ New API Key"**
|
||||
3. Copy the API key immediately (you won't see it again!)
|
||||
4. Login using your Continue account
|
||||
|
|
@ -109,7 +109,7 @@ For automation workflows, get an API key:
|
|||
|
||||
<Step title="Add Secrets for Workflows">
|
||||
Store secure credentials for CLI workflows:
|
||||
1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets)
|
||||
1. Visit [Continue Mission Control Secrets](https://hub.continue.dev/settings/secrets)
|
||||
2. Add your API keys and sensitive data
|
||||
3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
|
||||
</Step>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ sidebarTitle: "Overview"
|
|||
Prerequisites:
|
||||
|
||||
- [Node.js 18 or newer](https://nodejs.org/en/download/)
|
||||
- A [Continue Hub](https://hub.continue.dev) account (recommended) or local configuration
|
||||
- A [Continue Mission Control](https://hub.continue.dev) account (recommended) or local configuration
|
||||
|
||||
```bash npm
|
||||
# Install Continue CLI
|
||||
|
|
@ -132,17 +132,17 @@ cn -p "Update documentation based on recent code changes"
|
|||
|
||||
- Switch between models with `/model` command
|
||||
- Use any model configured in your `config.yaml`
|
||||
- Access Continue Hub models and configurations
|
||||
- Access Continue Mission Control models and configurations
|
||||
|
||||
## Continue Hub Integration
|
||||
## Continue Mission Control Integration
|
||||
|
||||
Continue CLI integrates seamlessly with [Continue Hub](https://hub.continue.dev) for:
|
||||
Continue CLI integrates seamlessly with [Continue Mission Control](https://hub.continue.dev) for:
|
||||
|
||||
### API Access
|
||||
|
||||
Get an API key for automation workflows:
|
||||
|
||||
1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys)
|
||||
1. Visit [Continue Mission Control API Keys](https://hub.continue.dev/settings/api-keys)
|
||||
2. Create a new API key
|
||||
3. Use with `cn login` or in your automation scripts
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ Get an API key for automation workflows:
|
|||
|
||||
Store secure credentials for CLI workflows:
|
||||
|
||||
1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets)
|
||||
1. Visit [Continue Mission Control Secrets](https://hub.continue.dev/settings/secrets)
|
||||
2. Add your API keys and sensitive data
|
||||
3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
|
||||
|
||||
|
|
|
|||
|
|
@ -33,97 +33,101 @@ Read more about [model roles](/customize/model-roles), [model capabilities](/cus
|
|||
[Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) from Anthropic
|
||||
|
||||
1. Get your API key from [Anthropic](https://console.anthropic.com/)
|
||||
2. Add [Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) to a config on Continue Hub
|
||||
3. Add `ANTHROPIC_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) to a config on Continue Mission Control
|
||||
3. Add `ANTHROPIC_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) from Qwen
|
||||
|
||||
1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
|
||||
2. Add [Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) a config on Continue Hub
|
||||
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) a config on Continue Mission Control
|
||||
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[GPT-5](https://hub.continue.dev/openai/gpt-5) from OpenAI
|
||||
|
||||
1. Get your API key from [OpenAI](https://platform.openai.com)
|
||||
2. Add [GPT-5](https://hub.continue.dev/openai/gpt-5) a config on Continue Hub
|
||||
3. Add `OPENAI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [GPT-5](https://hub.continue.dev/openai/gpt-5) a config on Continue Mission Control
|
||||
3. Add `OPENAI_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) from Moonshot AI
|
||||
|
||||
1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
|
||||
2. Add [Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) a config on Continue Hub
|
||||
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) a config on Continue Mission Control
|
||||
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) from Google
|
||||
|
||||
1. Get your API key from [Google AI Studio](https://aistudio.google.com)
|
||||
2. Add [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) a config on Continue Hub
|
||||
3. Add `GEMINI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) a config on Continue Mission Control
|
||||
3. Add `GEMINI_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) from xAI
|
||||
|
||||
1. Get your API key from [xAI](https://console.x.ai/)
|
||||
2. Add [Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) a config on Continue Hub
|
||||
3. Add `XAI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) a config on Continue Mission Control
|
||||
3. Add `XAI_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Devstral Medium](https://hub.continue.dev/mistral/devstral-medium) from Mistral AI
|
||||
|
||||
1. Get your API key from [Mistral AI](https://console.mistral.ai/)
|
||||
2. Add [Devstral Medium](https://hub.continue.dev/mistral/devstral-medium) a config on Continue Hub
|
||||
3. Add `MISTRAL_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [Devstral Medium](https://hub.continue.dev/mistral/devstral-medium) a config on Continue Mission Control
|
||||
3. Add `MISTRAL_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[gpt-oss-120b](https://hub.continue.dev/openrouter/gpt-oss-120b) from OpenAI
|
||||
|
||||
1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
|
||||
2. Add [gpt-oss-120b](https://hub.continue.dev/openrouter/gpt-oss-120b) a config on Continue Hub
|
||||
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
|
||||
2. Add [gpt-oss-120b](https://hub.continue.dev/openrouter/gpt-oss-120b) a config on Continue Mission Control
|
||||
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/mission-control/secrets/secret-types#user-secrets) on Continue Mission Control [here](https://hub.continue.dev/settings/secrets)
|
||||
4. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
### Local Models
|
||||
|
||||
<Info>
|
||||
Need a quick setup walkthrough? Check out [Using Ollama with Continue: A Developer's Guide](https://docs.continue.dev/guides/ollama-guide).
|
||||
</Info>
|
||||
|
||||
These models can be run on your computer if you have enough VRAM.
|
||||
|
||||
Their limited tool calling and reasoning capabilities will make it challenging to use agent mode.
|
||||
|
||||
[Qwen3 Coder 30B](https://hub.continue.dev/ollama/qwen3-coder-30b)
|
||||
|
||||
1. Add [Qwen3 Coder 30B](https://hub.continue.dev/ollama/qwen3-coder-30b) a config on Continue Hub
|
||||
1. Add [Qwen3 Coder 30B](https://hub.continue.dev/ollama/qwen3-coder-30b) a config on Continue Mission Control
|
||||
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
|
||||
3. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[gpt-oss-20b](https://hub.continue.dev/ollama/gpt-oss-20b)
|
||||
|
||||
1. Add [gpt-oss-20b](ttps://hub.continue.dev/ollama/gpt-oss-20b) a config on Continue Hub
|
||||
1. Add [gpt-oss-20b](https://hub.continue.dev/ollama/gpt-oss-20b) a config on Continue Mission Control
|
||||
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
|
||||
3. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Devstral Small 27B](https://hub.continue.dev/ollama/devstral)
|
||||
|
||||
1. Add [Devstral Small](https://hub.continue.dev/ollama/devstral) a config on Continue Hub
|
||||
1. Add [Devstral Small](https://hub.continue.dev/ollama/devstral) a config on Continue Mission Control
|
||||
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
|
||||
3. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Qwen2.5-Coder 7B](https://hub.continue.dev/ollama/qwen2.5-coder-7b) from Qwen
|
||||
|
||||
1. Add [Qwen2.5-Coder 7B](https://hub.continue.dev/ollama/qwen2.5-coder-7b) a config on Continue Hub
|
||||
1. Add [Qwen2.5-Coder 7B](https://hub.continue.dev/ollama/qwen2.5-coder-7b) a config on Continue Mission Control
|
||||
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
|
||||
3. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Gemma 3 4B](https://hub.continue.dev/ollama/gemma3-4b) from Google
|
||||
|
||||
1. Add [Gemma 3 4B](https://hub.continue.dev/ollama/gemma3-4b) a config on Continue Hub
|
||||
1. Add [Gemma 3 4B](https://hub.continue.dev/ollama/gemma3-4b) a config on Continue Mission Control
|
||||
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
|
||||
3. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
||||
[Qwen2.5-Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) from Qwen
|
||||
|
||||
1. Add [Qwen2.5-Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) a config on Continue Hub
|
||||
1. Add [Qwen2.5-Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) a config on Continue Mission Control
|
||||
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
|
||||
3. Click `Reload config` in the config selector in the Continue IDE extension
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ description: "These are the specialized instructions that shape how models respo
|
|||
|
||||
## Learn More
|
||||
|
||||
- [Explore prompts](https://hub.continue.dev/?type=prompts) on the Hub
|
||||
- [Explore prompts](https://hub.continue.dev/explore?type=prompts) on the Hub
|
||||
- Learn more in the [prompts deep dive](/customize/deep-dives/prompts)
|
||||
- View [`prompts`](/reference#prompts) in the YAML Reference for more details
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Your agent detects rules and applies the specified rules while in [Agent](/ide-e
|
|||
</Card>
|
||||
|
||||
<Card title="Hub Rules" icon="cloud">
|
||||
- Manage on [Continue Hub](https://hub.continue.dev)
|
||||
- Manage on [Continue Mission Control](https://hub.continue.dev)
|
||||
- Reference in config.yaml with `uses:`
|
||||
- Share with team and community
|
||||
- Easy to include in multiple agents
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ Then, in the continue panel, select this model as the default model for autocomp
|
|||
|
||||
## Autocomplete Configuration Options in Continue
|
||||
|
||||
### Autocomplete Models Available on the Continue Hub
|
||||
### Autocomplete Models Available on the Continue Mission Control
|
||||
|
||||
Explore autocomplete model configurations on [the hub](https://hub.continue.dev/explore/models?roles=autocomplete)
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ For detailed information about transport mechanisms and their use cases, refer t
|
|||
### How to Work with Secrets in MCP Servers
|
||||
|
||||
With some MCP servers you will need to use API keys or other secrets. You can leverage locally stored environments secrets
|
||||
as well as access hosted secrets in the Continue Hub. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`.
|
||||
as well as access hosted secrets in the Continue Mission Control. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`.
|
||||
|
||||
```yaml
|
||||
# ...
|
||||
|
|
|
|||
|
|
@ -186,6 +186,15 @@ This matrix shows which models support tool use and image input capabilities. Co
|
|||
| Claude 3.5 Sonnet | Yes | Yes | 200k |
|
||||
| Claude 3.5 Haiku | Yes | Yes | 200k |
|
||||
|
||||
### Cohere
|
||||
|
||||
| Model | Tool Use | Image Input | Context Window |
|
||||
| :------------------ | -------- | ----------- | -------------- |
|
||||
| Command A | Yes | No | 256k |
|
||||
| Command A Reasoning | Yes | No | 256k |
|
||||
| Command A Translate | Yes | No | 8k |
|
||||
| Command A Vision | No | Yes | 128k |
|
||||
|
||||
### Google
|
||||
|
||||
| Model | Tool Use | Image Input | Context Window |
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ prompts:
|
|||
...
|
||||
```
|
||||
|
||||
If you are using Continue Hub, you can add it to your config by selecting "Use Rule" [here](https://hub.continue.dev/supabase/create-functions)
|
||||
If you are using Continue Mission Control, you can add it to your config by selecting "Use Rule" [here](https://hub.continue.dev/supabase/create-functions)
|
||||
|
||||
To use this prompt, you can open Chat / Agent / Edit, type <kbd>/</kbd>, select the prompt, and type out any additional instructions you'd like to add.
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Continue supports two types of rules with different behaviors:
|
|||
</Card>
|
||||
|
||||
<Card title="Hub Rules" icon="cloud">
|
||||
- **Location**: Stored on Continue Hub, referenced in config.yaml
|
||||
- **Location**: Stored on Continue Mission Control, referenced in config.yaml
|
||||
- **Visibility**: Only appear when referenced in assistant configuration
|
||||
- **Creation**: Created directly on Hub or copied from local rules
|
||||
- **File Management**: No local files created, managed through Hub interface
|
||||
|
|
@ -92,9 +92,9 @@ For example, you can say "Create a rule for this", and a rule will be created fo
|
|||
|
||||
### Creating Hub Rules
|
||||
|
||||
Rules can also be created and managed on the Continue Hub:
|
||||
Rules can also be created and managed on the Continue Mission Control:
|
||||
|
||||
1. **Browse existing rules**: [Explore available rules](https://hub.continue.dev)
|
||||
1. **Browse existing rules**: [Explore available rules](https://hub.continue.dev/explore?type=rules)
|
||||
2. **Create new rules**: [Create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub
|
||||
3. **Copy from local rules**: Copy/paste content from your `.continue/rules` files to create Hub rules
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ globs: ["**/*.ts", "**/*.tsx"]
|
|||
|
||||
**Workaround**:
|
||||
1. **For local rules**: Navigate directly to `.continue/rules/` folder and edit the `.md` file
|
||||
2. **For Hub rules**: Go directly to your assistant page on [Continue Hub](https://hub.continue.dev) and edit from there
|
||||
2. **For Hub rules**: Go directly to your assistant page on [Continue Mission Control](https://hub.continue.dev) and edit from there
|
||||
3. Keep track of which rules are local vs Hub-based to avoid confusion
|
||||
|
||||
<Info>
|
||||
|
|
@ -262,4 +262,4 @@ Continue includes a simple default system message for [Agent mode](../../ide-ext
|
|||
|
||||
This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4).
|
||||
|
||||
Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](/reference#models).
|
||||
Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](/reference#models).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ slug: ../asksage
|
|||
---
|
||||
|
||||
<Tip>
|
||||
**Discover Ask Sage models [here](https://hub.continue.dev/?q=Ask%20Sage)**
|
||||
**Discover Ask Sage models [here](https://hub.continue.dev/explore?q=Ask%20Sage)**
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
|
|
@ -120,4 +120,3 @@ Supported features:
|
|||
- Email the Ask Sage support team for assistance at support@asksage.ai.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ slug: ../deepseek
|
|||
---
|
||||
|
||||
<Tip>
|
||||
**Discover DeepSeek models [here](https://hub.continue.dev/?q=DeepSeek)**
|
||||
**Discover DeepSeek models [here](https://hub.continue.dev/explore?q=DeepSeek)**
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
|
|
@ -37,4 +37,4 @@ slug: ../deepseek
|
|||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
</Tabs>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ sidebarTitle: "Gemini"
|
|||
---
|
||||
|
||||
<Tip>
|
||||
**Discover Google models [here](https://hub.continue.dev/?q=Gemini)**
|
||||
**Discover Google models [here](https://hub.continue.dev/explore?q=Gemini)**
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
|
|
@ -42,4 +42,4 @@ sidebarTitle: "Gemini"
|
|||
|
||||
<Info>
|
||||
**Check out a more advanced configuration [here](https://hub.continue.dev/google/gemini-2.5-pro?view=config)**
|
||||
</Info>
|
||||
</Info>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The **Tetrate Agent Router Service** provides a unified Gateway for accessing va
|
|||
This gateway acts as an intelligent router that can distribute requests across multiple model providers, offering enterprise-grade reliability and performance optimization.
|
||||
|
||||
<Tip>
|
||||
Want to get started quickly? Sign up for the [Tetrate Agent Router Service](https://router.tetrate.ai/) to get an API key, then use [Tetrate on Continue Hub](https://hub.continue.dev/tetrate) to get started fast.
|
||||
Want to get started quickly? Sign up for the [Tetrate Agent Router Service](https://router.tetrate.ai/) to get an API key, then use [Tetrate on Continue Mission Control](https://hub.continue.dev/tetrate) to get started fast.
|
||||
</Tip>
|
||||
|
||||
## Setup
|
||||
|
|
@ -32,13 +32,13 @@ Go to the [API keys page](https://router.tetrate.ai/api-keys) to get your key
|
|||
</Steps>
|
||||
|
||||
|
||||
### Quickstart with Continue Hub
|
||||
### Quickstart with Continue Mission Control
|
||||
|
||||
Fastest way: use preconfigured models from Tetrate on Continue Hub
|
||||
Fastest way: use preconfigured models from Tetrate on Continue Mission Control
|
||||
|
||||
<Steps>
|
||||
<Step title="Browse models">
|
||||
Open [Tetrate on Continue Hub](https://hub.continue.dev/tetrate) and pick a model (e.g., [Claude Sonnet 4](https://hub.continue.dev/tetrate/claude-sonnet-4))
|
||||
Open [Tetrate on Continue Mission Control](https://hub.continue.dev/tetrate) and pick a model (e.g., [Claude Sonnet 4](https://hub.continue.dev/tetrate/claude-sonnet-4))
|
||||
</Step>
|
||||
|
||||
<Step title="Use or remix">
|
||||
|
|
@ -46,14 +46,14 @@ Click "Use Model", or "Remix" to change the model ID if needed
|
|||
</Step>
|
||||
|
||||
<Step title="Add your API key">
|
||||
Add your API key to Continue. See [adding secrets in Continue Hub](/hub/secrets/secret-types) and [managing local secrets in the FAQ](/faqs#managing-local-secrets-and-environment-variables)
|
||||
Add your API key to Continue. See [adding secrets in Continue Mission Control](/hub/secrets/secret-types) and [managing local secrets in the FAQ](/faqs#managing-local-secrets-and-environment-variables)
|
||||
<Tip>
|
||||
Add it as a Continue Hub secret named `TETRATE_API_KEY` to reuse across projects.
|
||||
Add it as a Continue Mission Control secret named `TETRATE_API_KEY` to reuse across projects.
|
||||
</Tip>
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||

|
||||

|
||||
|
||||
<Info>
|
||||
If a model is missing, remix a similar one and set the `model` field to the target ID.
|
||||
|
|
@ -65,7 +65,7 @@ If a model is missing, remix a similar one and set the `model` field to the targ
|
|||
<Card title="In Local Agent Configuration" icon="folder" vertical>
|
||||
Use a Tetrate model block from the Hub or define it directly in your local agent configuration.
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="cloud" vertical>
|
||||
<Card title="Continue Mission Control" icon="cloud" vertical>
|
||||
Use a Tetrate model block from the Hub or define your own on the Hub.
|
||||
</Card>
|
||||
<Card title="Using Local Model Blocks" icon="file-lines" vertical>
|
||||
|
|
@ -130,7 +130,7 @@ context:
|
|||
- provider: codebase
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Continue Hub">
|
||||
<Tab title="Continue Mission Control">
|
||||
**When to use**: Share configurations across teams or contribute to the community.
|
||||
|
||||
**The Model Block:**
|
||||
|
|
@ -151,7 +151,7 @@ models:
|
|||
capabilities:
|
||||
- tool_use
|
||||
```
|
||||
View the model block `tetrate/claude-sonnet-4` on the [Continue Hub](https://hub.continue.dev/tetrate/claude-sonnet-4).
|
||||
View the model block `tetrate/claude-sonnet-4` on the [Continue Mission Control](https://hub.continue.dev/tetrate/claude-sonnet-4).
|
||||
|
||||
**Reference it in your Agent configuration:**
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ context:
|
|||
</Tab>
|
||||
|
||||
<Tab title="Using Local Model Blocks">
|
||||
**When to use**: Reuse configurations across agents and keep them local or in GitHub (not on Continue Hub).
|
||||
**When to use**: Reuse configurations across agents and keep them local or in GitHub (not on Continue Mission Control).
|
||||
|
||||
**The Local Model Block:**
|
||||
<Info>
|
||||
|
|
|
|||
196
docs/docs.json
196
docs/docs.json
|
|
@ -3,7 +3,7 @@
|
|||
"theme": "mint",
|
||||
"name": "Continue",
|
||||
"banner": {
|
||||
"content": "Continue CLI v1.5.1 is live 🚀 Learn how you can leverage the CLI with our [MCP Cookbooks](https://docs.continue.dev/guides/overview#mcp-integration-cookbooks)",
|
||||
"content": "Check out our new look in Mission Control. It's now easier than ever to create [Workflows](https://hub.continue.dev/workflows), [Integrate with the tools you use](https://hub.continue.dev/integrations), and to create a one-off Task.",
|
||||
"dismissable": true
|
||||
},
|
||||
"colors": {
|
||||
|
|
@ -23,44 +23,62 @@
|
|||
"pages": ["index"]
|
||||
},
|
||||
{
|
||||
"group": "Hub",
|
||||
"group": "Mission Control",
|
||||
"icon": "globe",
|
||||
"pages": [
|
||||
"hub/introduction",
|
||||
{
|
||||
"group": "Configs",
|
||||
"icon": "robot",
|
||||
"pages": [
|
||||
"hub/configs/intro",
|
||||
"hub/configs/use-a-config",
|
||||
"hub/configs/create-a-config",
|
||||
"hub/configs/edit-a-config"
|
||||
]
|
||||
},
|
||||
"mission-control",
|
||||
"mission-control/tasks",
|
||||
"mission-control/workflows",
|
||||
"mission-control/metrics",
|
||||
"mission-control/sharing",
|
||||
{
|
||||
"group": "Governance",
|
||||
"icon": "building",
|
||||
"pages": [
|
||||
"hub/governance/creating-an-org",
|
||||
"hub/governance/org-permissions",
|
||||
"hub/governance/pricing"
|
||||
"mission-control/governance/creating-an-org",
|
||||
"mission-control/governance/org-permissions",
|
||||
"mission-control/governance/pricing"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"group": "Integrations",
|
||||
"icon": "plug",
|
||||
"pages": [
|
||||
"mission-control/integrations",
|
||||
"mission-control/integrations/github",
|
||||
"mission-control/integrations/sentry",
|
||||
"mission-control/integrations/snyk",
|
||||
"mission-control/integrations/slack-agent"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Secrets",
|
||||
"icon": "key",
|
||||
"pages": [
|
||||
"hub/secrets/secret-types",
|
||||
"hub/secrets/secret-resolution"
|
||||
"mission-control/secrets/secret-types",
|
||||
"mission-control/secrets/secret-resolution"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Agents",
|
||||
"icon": "cloud",
|
||||
"pages": ["hub/agents/intro"]
|
||||
},
|
||||
"hub/sharing",
|
||||
"hub/source-control"
|
||||
"group": "Configs",
|
||||
"icon": "book",
|
||||
"pages": [
|
||||
"mission-control/configs/intro",
|
||||
"mission-control/configs/use-a-config",
|
||||
"mission-control/configs/create-a-config",
|
||||
"mission-control/configs/edit-a-config"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Agents",
|
||||
"icon": "robot",
|
||||
"pages": [
|
||||
"agents/intro",
|
||||
"agents/overview",
|
||||
"agents/create-and-edit"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -82,6 +100,7 @@
|
|||
"ide-extensions/quick-start",
|
||||
{
|
||||
"group": "Agent",
|
||||
"expanded": false,
|
||||
"icon": "robot",
|
||||
"pages": [
|
||||
"ide-extensions/agent/quick-start",
|
||||
|
|
@ -94,6 +113,7 @@
|
|||
},
|
||||
{
|
||||
"group": "Chat",
|
||||
"expanded": false,
|
||||
"icon": "messages",
|
||||
"pages": [
|
||||
"ide-extensions/chat/quick-start",
|
||||
|
|
@ -105,6 +125,8 @@
|
|||
},
|
||||
{
|
||||
"group": "Autocomplete",
|
||||
"expanded": false,
|
||||
|
||||
"icon": "sparkles",
|
||||
"pages": [
|
||||
"ide-extensions/autocomplete/quick-start",
|
||||
|
|
@ -117,6 +139,8 @@
|
|||
},
|
||||
{
|
||||
"group": "Edit",
|
||||
"expanded": false,
|
||||
|
||||
"icon": "pen-to-square",
|
||||
"pages": [
|
||||
"ide-extensions/edit/quick-start",
|
||||
|
|
@ -214,7 +238,6 @@
|
|||
"icon": "microscope",
|
||||
"pages": [
|
||||
"customize/deep-dives/configuration",
|
||||
"customize/deep-dives/slash-commands",
|
||||
"customize/deep-dives/rules",
|
||||
"customize/deep-dives/prompts",
|
||||
"customize/deep-dives/autocomplete",
|
||||
|
|
@ -343,7 +366,8 @@
|
|||
"x": "https://twitter.com/continuedev",
|
||||
"github": "https://github.com/continuedev/continue",
|
||||
"linkedin": "https://linkedin.com/company/continuedev",
|
||||
"discord": "https://discord.gg/vapESyrFmJ"
|
||||
"discord": "https://discord.gg/vapESyrFmJ",
|
||||
"youtube": "https://www.youtube.com/@continuedev"
|
||||
}
|
||||
},
|
||||
"contextual": {
|
||||
|
|
@ -363,44 +387,97 @@
|
|||
}
|
||||
},
|
||||
"custom": {
|
||||
"css": ["custom.css"]
|
||||
"css": ["custom.css"],
|
||||
"js": ["reo-tracking.js"]
|
||||
},
|
||||
"redirects": [
|
||||
{
|
||||
"source": "/hub",
|
||||
"destination": "/hub/introduction"
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/introduction",
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/configs/intro",
|
||||
"destination": "/mission-control/configs/intro"
|
||||
},
|
||||
{
|
||||
"source": "/hub/configs/use-a-config",
|
||||
"destination": "/mission-control/configs/use-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/configs/create-a-config",
|
||||
"destination": "/mission-control/configs/create-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/configs/edit-a-config",
|
||||
"destination": "/mission-control/configs/edit-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/governance",
|
||||
"destination": "/hub/governance/org-permissions"
|
||||
"destination": "/mission-control/governance/org-permissions"
|
||||
},
|
||||
{
|
||||
"source": "/hub/governance/creating-an-org",
|
||||
"destination": "/mission-control/governance/creating-an-org"
|
||||
},
|
||||
{
|
||||
"source": "/hub/governance/org-permissions",
|
||||
"destination": "/mission-control/governance/org-permissions"
|
||||
},
|
||||
{
|
||||
"source": "/hub/governance/pricing",
|
||||
"destination": "/mission-control/governance/pricing"
|
||||
},
|
||||
{
|
||||
"source": "/hub/secrets",
|
||||
"destination": "/hub/secrets/secret-types"
|
||||
"destination": "/mission-control/secrets/secret-types"
|
||||
},
|
||||
{
|
||||
"source": "/hub/secrets/secret-types",
|
||||
"destination": "/mission-control/secrets/secret-types"
|
||||
},
|
||||
{
|
||||
"source": "/hub/secrets/secret-resolution",
|
||||
"destination": "/mission-control/secrets/secret-resolution"
|
||||
},
|
||||
{
|
||||
"source": "/hub/sharing",
|
||||
"destination": "/mission-control/sharing"
|
||||
},
|
||||
{
|
||||
"source": "/hub/source-control",
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks",
|
||||
"destination": "/hub/introduction"
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks/intro",
|
||||
"destination": "/hub/introduction"
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks/use-a-block",
|
||||
"destination": "/hub/introduction"
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks/block-types",
|
||||
"destination": "/hub/introduction"
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/workflows/intro",
|
||||
"destination": "/hub/agents/intro"
|
||||
"destination": "/agents/intro"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks/create-a-block",
|
||||
"destination": "/hub/introduction"
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks/bundles",
|
||||
"destination": "/mission-control"
|
||||
},
|
||||
{
|
||||
"source": "/customize",
|
||||
|
|
@ -1070,10 +1147,7 @@
|
|||
"source": "/guides/build-your-own-context-provider",
|
||||
"destination": "/customize/deep-dives/custom-providers"
|
||||
},
|
||||
{
|
||||
"source": "/hub/blocks/bundles",
|
||||
"destination": "/hub/introduction"
|
||||
},
|
||||
|
||||
{
|
||||
"source": "/customize/settings",
|
||||
"destination": "/customize/overview"
|
||||
|
|
@ -1228,31 +1302,31 @@
|
|||
},
|
||||
{
|
||||
"source": "/hub/assistants/intro",
|
||||
"destination": "/hub/configs/intro"
|
||||
"destination": "/mission-control/configs/intro"
|
||||
},
|
||||
{
|
||||
"source": "/hub/assistants/use-an-assistant",
|
||||
"destination": "/hub/configs/use-a-config"
|
||||
"destination": "/mission-control/configs/use-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/assistants/create-an-assistant",
|
||||
"destination": "/hub/configs/create-a-config"
|
||||
"destination": "/mission-control/configs/create-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/assistants/edit-an-assistant",
|
||||
"destination": "/hub/configs/edit-a-config"
|
||||
"destination": "/mission-control/configs/edit-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/use-an-agent",
|
||||
"destination": "/hub/configs/use-a-config"
|
||||
"destination": "/mission-control/configs/use-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/create-an-agent",
|
||||
"destination": "/hub/configs/create-a-config"
|
||||
"destination": "/mission-control/configs/create-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/edit-an-agent",
|
||||
"destination": "/hub/configs/edit-a-config"
|
||||
"destination": "/mission-control/configs/edit-a-config"
|
||||
},
|
||||
{
|
||||
"source": "/guides/understanding-assistants",
|
||||
|
|
@ -1357,6 +1431,34 @@
|
|||
{
|
||||
"source": "/getting-started/quick-start",
|
||||
"destination": "/ide-extensions/quick-start"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/intro",
|
||||
"destination": "/agents/intro"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/overview",
|
||||
"destination": "/agents/overview"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/create-and-edit",
|
||||
"destination": "/agents/create-and-edit"
|
||||
},
|
||||
{
|
||||
"source": "/hub/agents/slack-agent",
|
||||
"destination": "/mission-control/integrations/slack-agent"
|
||||
},
|
||||
{
|
||||
"source": "/hub/integrations/slack-agent",
|
||||
"destination": "/mission-control/integrations/slack-agent"
|
||||
},
|
||||
{
|
||||
"source": "/hub/integrations/github",
|
||||
"destination": "/mission-control/integrations/github"
|
||||
},
|
||||
{
|
||||
"source": "/hub/integrations/sentry",
|
||||
"destination": "/mission-control/integrations/sentry"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ models:
|
|||
apiKey: ${{ secrets.OPENAI_API_KEY }}
|
||||
```
|
||||
|
||||
#### Hub-managed secrets
|
||||
#### Mission Control-managed secrets
|
||||
|
||||
For centralized team secret management, use `${{ inputs.SECRET_NAME }}` syntax in your config.yaml and manage them at [https://hub.continue.dev/settings/secrets](https://hub.continue.dev/settings/secrets):
|
||||
```yaml
|
||||
|
|
@ -318,12 +318,12 @@ If your API keys aren't being recognized:
|
|||
|
||||
### Using Model Addons Locally
|
||||
|
||||
You can leverage model addons from the Continue Hub in your local configurations using the `uses:` syntax. This allows you to reference pre-configured model blocks without duplicating configuration.
|
||||
You can leverage model addons from the Continue Mission Control in your local configurations using the `uses:` syntax. This allows you to reference pre-configured model blocks without duplicating configuration.
|
||||
|
||||
#### Requirements
|
||||
|
||||
- You must be logged in to Continue
|
||||
- Internet connection is required (model addons are fetched from the hub)
|
||||
- Internet connection is required (model addons are fetched from Mission Control)
|
||||
|
||||
#### Usage
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ For all options, first:
|
|||
<Tab title="📋 Jira Agent (Recommended for Issue Management)">
|
||||
<Steps>
|
||||
<Step title="Use the Jira Agent">
|
||||
Visit the [Atlassian Continuous AI - Jira Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-jira-agent) on Continue Hub. This agent is optimized for:
|
||||
Visit the [Atlassian Continuous AI - Jira Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-jira-agent) on Continue Mission Control. This agent is optimized for:
|
||||
- Searching and filtering Jira issues
|
||||
- Creating and updating issues
|
||||
- Sprint planning and workload analysis
|
||||
|
|
@ -100,7 +100,7 @@ For all options, first:
|
|||
<Tab title="📄 Confluence Agent (Recommended for Documentation)">
|
||||
<Steps>
|
||||
<Step title="Use the Confluence Agent">
|
||||
Visit the [Atlassian Continuous AI - Confluence Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-confluence-agent) on Continue Hub. This agent is optimized for:
|
||||
Visit the [Atlassian Continuous AI - Confluence Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-confluence-agent) on Continue Mission Control. This agent is optimized for:
|
||||
- Searching and summarizing documentation
|
||||
- Creating and updating Confluence pages
|
||||
- Managing spaces and content
|
||||
|
|
@ -133,8 +133,8 @@ For all options, first:
|
|||
|
||||
<Tab title="🛠️ Manual Setup">
|
||||
<Steps>
|
||||
<Step title="Create a New Agent on Continue Hub">
|
||||
Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
<Step title="Create a New Agent on Continue Mission Control">
|
||||
Go to the [Continue Mission Control](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
</Step>
|
||||
|
||||
<Step title="Add Atlassian MCP">
|
||||
|
|
@ -168,7 +168,7 @@ For all options, first:
|
|||
<Accordion title="Agent Requirements">
|
||||
To use Atlassian MCP with Continue CLI, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
|
||||
The agent will automatically detect and use your configuration along with the Atlassian MCP for Jira, Confluence, and Compass operations.
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ After completing this guide, you have a complete **AI-powered Atlassian workflow
|
|||
<Card title="MCP in Continue" icon="book" href="/customize/deep-dives/mcp">
|
||||
How MCP works with Continue agents
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="globe" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="globe" href="https://hub.continue.dev">
|
||||
Create and manage your agents
|
||||
</Card>
|
||||
<Card title="Atlassian Community" icon="users" href="https://community.atlassian.com/">
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ After completing **Quick Setup** above, you have two paths to get started:
|
|||
|
||||
<Steps>
|
||||
<Step title="Add the Pre-Built Agent">
|
||||
Visit the [Chrome DevTools Continuous Agent](https://hub.continue.dev/continuedev/chrome-dev-continuous) on Continue Hub and click **"Install Agent"** or run:
|
||||
Visit the [Chrome Dev Tools Agent](https://hub.continue.dev/continuedev/chrome-dev-tools-agent) on Continue Mission Control and click **"Install Agent"** or run:
|
||||
|
||||
```bash
|
||||
cn --config continuedev/chrome-dev-continuous
|
||||
cn --agent continuedev/chrome-dev-tools-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
|
|
@ -96,7 +96,7 @@ After completing **Quick Setup** above, you have two paths to get started:
|
|||
<Tab title="🛠️ Manual Setup">
|
||||
<Steps>
|
||||
<Step title="Add Chrome DevTools MCP to Your Assistant">
|
||||
Visit the [Chrome DevTools MCP](https://hub.continue.dev/google/chrome-devtools-mcp) on Continue Hub and add it to your assistant, or add this to your configuration:
|
||||
Visit the [Chrome DevTools MCP](https://hub.continue.dev/google/chrome-devtools-mcp) on Continue Mission Control and add it to your assistant, or add this to your configuration:
|
||||
|
||||
```yaml
|
||||
name: Chrome DevTools MCP
|
||||
|
|
@ -140,7 +140,7 @@ After completing **Quick Setup** above, you have two paths to get started:
|
|||
<Accordion title="Agent Requirements">
|
||||
To use the pre-built agent, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
- **Chrome browser** installed on your system
|
||||
- **Node.js 20+** to run the MCP via npx
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ jobs:
|
|||
env:
|
||||
CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
|
||||
run: |
|
||||
cn --config continuedev/chrome-dev-continuous \
|
||||
cn --agent continuedev/chrome-dev-tools-agent \
|
||||
-p "Navigate to http://localhost:3000 and:
|
||||
1. Record performance trace with reload
|
||||
2. Extract LCP, FID, CLS values
|
||||
|
|
@ -786,7 +786,7 @@ Set up automated regression detection:
|
|||
<Card title="Chrome DevTools MCP" icon="plug" href="https://github.com/ChromeDevTools/chrome-devtools-mcp">
|
||||
Official Chrome DevTools MCP repository
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="circle-nodes" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="circle-nodes" href="https://hub.continue.dev">
|
||||
Explore more MCP integrations
|
||||
</Card>
|
||||
<Card title="DevTools Documentation" icon="book" href="https://developer.chrome.com/docs/devtools">
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ sidebarTitle: "Continue CLI (cn)"
|
|||
description: "Learn how to use Continue's command-line interface for context engineering, automated coding tasks, and headless development workflows with customizable models, rules, and tools"
|
||||
---
|
||||
|
||||
<Warning>Continue CLI (cn) is currently in Beta</Warning>
|
||||
|
||||
`cn` is an open-source, modular coding agent for the command line.
|
||||
|
||||
It provides a battle-tested agent loop so you can simply plug in your model, rules, and tools.
|
||||
|
|
@ -54,7 +52,7 @@ echo "$(git diff) Generate a conventional commit name for the current git change
|
|||
|
||||
## How to Configure Continue CLI
|
||||
|
||||
`cn` uses [`config.yaml`](/reference), the exact same configuration file as Continue. This means that you can log in to [Continue Hub](/hub/introduction) or use your existing local configuration.
|
||||
`cn` uses [`config.yaml`](/reference), the exact same configuration file as Continue. This means that you can log in to [Continue Mission Control](/hub/introduction) or use your existing local configuration.
|
||||
|
||||
To switch between configurations, you can use the `/config` slash command in `cn`, or you can start it with the `--config` flag (e.g. `cn --config continuedev/default-agent` or `cn --config ~/.continue/config.yaml`).
|
||||
|
||||
|
|
@ -64,7 +62,7 @@ Learn how to add custom models [here](/customize/overview). Then, you can use th
|
|||
|
||||
### How to Configure Rules
|
||||
|
||||
`cn` supports [rules](/customize/deep-dives/rules) in the same way as the Continue IDE extensions. You can also use the `--rule` flag to manually include a rule from the hub. For example, `cn --rule nate/spanish` will tell `cn` to use [this rule](https://hub.continue.dev/nate/spanish) to always speak in Spanish.
|
||||
`cn` supports [rules](/customize/deep-dives/rules) in the same way as the Continue IDE extensions. You can also use the `--rule` flag to manually include a rule from Mission Control. For example, `cn --rule nate/spanish` will tell `cn` to use [this rule](https://hub.continue.dev/nate/spanish) to always speak in Spanish.
|
||||
|
||||
### How to Configure Tools
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,6 @@ models:
|
|||
Now that you understand how models, rules, and tools work, explore:
|
||||
|
||||
- **[Config Reference](/reference)**: Detailed documentation of all available properties
|
||||
- **[Continue Hub](https://hub.continue.dev)**: Browse community models, rules, and tools
|
||||
- **[Continue Mission Control](https://hub.continue.dev)**: Browse community models, rules, and tools
|
||||
- **[Custom Context Providers](/customize/deep-dives/custom-providers)**: Create advanced context integrations
|
||||
- **[Model Roles](/customize/model-roles/intro)**: Understanding how different models work together
|
||||
|
|
|
|||
|
|
@ -478,8 +478,8 @@ Want to create documentation MCPs for your own projects? Mintlify makes it easy:
|
|||
[Learn more about Mintlify MCP generation →](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs)
|
||||
</Step>
|
||||
|
||||
<Step title="Publish to Continue Hub">
|
||||
Share your docs MCP on [Continue Hub](https://hub.continue.dev/new?type=mcp) so others can use it with Continue agents.
|
||||
<Step title="Publish to Continue Mission Control">
|
||||
Share your docs MCP on [Continue Mission Control](https://hub.continue.dev/new?type=mcp) so others can use it with Continue agents.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ For all options, first:
|
|||
## dlt MCP Workflow Options
|
||||
|
||||
<Card title="🚀 Fastest Path to Success" icon="zap">
|
||||
Skip the manual setup and use our pre-built [dlt Assistant agent](https://hub.continue.dev/dlthub/dlt-assistant) that includes
|
||||
Skip the manual setup and use our pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent) that includes
|
||||
the dlt MCP and optimized data pipeline workflows for more consistent results. You can [remix this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to customize it for your specific needs.
|
||||
</Card>
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Step title="Load the Pre-Built Agent">
|
||||
Navigate to your pipeline project directory and run:
|
||||
```bash
|
||||
cn --config dlthub/dlt-assistant
|
||||
cn --agent continuedev/dlt-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
|
|
@ -73,21 +73,21 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
</Steps>
|
||||
|
||||
<Info>
|
||||
**Why Use the Agent?** The pre-built [dlt Assistant agent](https://hub.continue.dev/dlthub/dlt-assistant) provides consistent pipeline development workflows and handles MCP configuration automatically, making it easier to get started with AI-powered data engineering. You can [remix and customize this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) later to fit your team's specific workflow.
|
||||
**Why Use the Agent?** The pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent) provides consistent pipeline development workflows and handles MCP configuration automatically, making it easier to get started with AI-powered data engineering. You can [remix and customize this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) later to fit your team's specific workflow.
|
||||
</Info>
|
||||
|
||||
</Tab>
|
||||
|
||||
<Tab title="🛠️ Manual Setup">
|
||||
<Steps>
|
||||
<Step title="Create a New Agent via the Continue Hub">
|
||||
Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
<Step title="Create a New Agent via the Continue Mission Control">
|
||||
Go to the [Continue Mission Control](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
</Step>
|
||||
|
||||
<Step title="Connect dlt MCP via Continue Hub">
|
||||
Visit the [dlt MCP on Continue Hub](https://hub.continue.dev/dlthub/dlt-mcp) and click **Install** to add it to the agent you created in the step above.
|
||||
<Step title="Connect dlt MCP via Continue Mission Control">
|
||||
Visit the [dlt MCP on Continue Mission Control](https://hub.continue.dev/dlthub/dlt-mcp) and click **Install** to add it to the agent you created in the step above.
|
||||
|
||||
This will add dlt MCP to your agent's available tools. The Hub listing automatically configures the MCP command.
|
||||
This will add dlt MCP to your agent's available tools. The Mission Control listing automatically configures the MCP command.
|
||||
|
||||
<Tip>
|
||||
**Alternative installation methods:**
|
||||
|
|
@ -117,9 +117,9 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
</Tabs>
|
||||
|
||||
<Accordion title="Agent Requirements">
|
||||
To use the pre-built [dlt Assistant agent](https://hub.continue.dev/dlthub/dlt-assistant), you need either:
|
||||
To use the pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent), you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets (same as manual setup)
|
||||
- **Your own API keys** added to Continue Mission Control secrets (same as manual setup)
|
||||
|
||||
The agent will automatically detect and use your configuration along with the pre-configured dlt MCP for pipeline operations.
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
Now you can use natural language prompts to develop and debug your dlt pipelines. The Continue agent automatically calls the appropriate dlt MCP tools.
|
||||
|
||||
<Info>
|
||||
You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Hub](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
|
||||
You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Mission Control](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
|
||||
</Info>
|
||||
|
||||
<Info>
|
||||
|
|
@ -165,6 +165,8 @@ You can add prompts to your agent's configuration for easy access in future sess
|
|||
changes, test your prompts in plan mode (see the [Plan Mode
|
||||
Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes in TUI/IDE). This
|
||||
shows you what the agent will do without executing it.
|
||||
|
||||
To run any of the example prompts below in headless mode, use `cn -p "prompt"`
|
||||
</Info>
|
||||
|
||||
<Info>
|
||||
|
|
@ -178,17 +180,12 @@ You can add prompts to your agent's configuration for easy access in future sess
|
|||
<Card title="Inspect Pipeline Execution" icon="magnifying-glass">
|
||||
Review pipeline execution details including load timing and file sizes.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Inspect my dlt pipeline execution and provide a summary of the load info.
|
||||
Show me the timing breakdown and file sizes for each table.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Inspect my dlt pipeline execution and provide a summary of the load info. Show me the timing breakdown and file sizes for each table." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Schema Management
|
||||
|
|
@ -196,17 +193,12 @@ cn -p "Inspect my dlt pipeline execution and provide a summary of the load info.
|
|||
<Card title="Retrieve Schema Metadata" icon="diagram-project">
|
||||
Get detailed schema information for your pipeline's tables.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Show me the schema for my users table including all columns,
|
||||
data types, and any constraints.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Show me the schema for my users table including all columns, data types, and any constraints." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Data Exploration
|
||||
|
|
@ -214,17 +206,12 @@ cn -p "Show me the schema for my users table including all columns, data types,
|
|||
<Card title="Query Dataset Records" icon="table">
|
||||
Retrieve and analyze records from your destination database.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Get the last 10 records from my orders table and show me
|
||||
the distribution of order statuses.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Get the last 10 records from my orders table and show me the distribution of order statuses." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Error Debugging
|
||||
|
|
@ -232,17 +219,12 @@ cn -p "Get the last 10 records from my orders table and show me the distribution
|
|||
<Card title="Analyze Load Errors" icon="triangle-exclamation">
|
||||
Investigate and understand pipeline load errors.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Check for any load errors in my last pipeline run. If there are errors,
|
||||
explain what went wrong and suggest fixes.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Check for any load errors in my last pipeline run. If there are errors, explain what went wrong and suggest fixes." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Pipeline Creation
|
||||
|
|
@ -250,17 +232,12 @@ cn -p "Check for any load errors in my last pipeline run. If there are errors, e
|
|||
<Card title="Build New Pipeline" icon="plus">
|
||||
Create a new dlt pipeline from an API or data source.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Help me create a new dlt pipeline that loads data from the
|
||||
JSONPlaceholder API users endpoint into DuckDB.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Help me create a new dlt pipeline that loads data from the JSONPlaceholder API users endpoint into DuckDB." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Schema Evolution
|
||||
|
|
@ -268,17 +245,12 @@ cn -p "Help me create a new dlt pipeline that loads data from the JSONPlaceholde
|
|||
<Card title="Handle Schema Changes" icon="code-branch">
|
||||
Review and manage schema evolution in your pipelines.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Check if my pipeline schema has evolved since the last run.
|
||||
Show me what columns were added or modified.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Check if my pipeline schema has evolved since the last run. Show me what columns were added or modified." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
## Continuous Data Pipelines with GitHub Actions
|
||||
|
|
@ -293,7 +265,7 @@ Navigate to **Repository Settings → Secrets and variables → Actions** and ad
|
|||
- Any required database credentials for your destination
|
||||
|
||||
<Info>
|
||||
The workflow uses the pre-built [dlt Assistant agent](https://hub.continue.dev/dlthub/dlt-assistant) with `--agent dlthub/dlt-assistant`. This agent comes pre-configured with the dlt MCP and optimized rules for pipeline operations. You can [remix this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to customize the validation rules and prompts for your specific pipeline requirements.
|
||||
The workflow uses the pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent) with `--agent continuedev/dlt-agent`. This agent comes pre-configured with the dlt MCP and optimized rules for pipeline operations. You can [remix this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to customize the validation rules and prompts for your specific pipeline requirements.
|
||||
</Info>
|
||||
|
||||
### Create Workflow File
|
||||
|
|
@ -342,7 +314,7 @@ jobs:
|
|||
- name: Validate Pipeline Schema
|
||||
run: |
|
||||
echo "🔍 Validating pipeline schema..."
|
||||
cn --config dlthub/dlt-assistant \
|
||||
cn --agent continuedev/dlt-agent \
|
||||
-p "Inspect the pipeline schema and verify all required tables
|
||||
and columns are present. Flag any missing or unexpected changes." \
|
||||
--auto
|
||||
|
|
@ -350,7 +322,7 @@ jobs:
|
|||
- name: Check Pipeline Health
|
||||
run: |
|
||||
echo "📊 Checking pipeline health..."
|
||||
cn --config dlthub/dlt-assistant \
|
||||
cn --agent continuedev/dlt-agent \
|
||||
-p "Analyze the last pipeline run for errors or warnings.
|
||||
Report any issues that need attention." \
|
||||
--auto
|
||||
|
|
@ -360,7 +332,7 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
REPORT=$(cn --config dlthub/dlt-assistant \
|
||||
REPORT=$(cn --agent continuedev/dlt-agent \
|
||||
-p "Generate a concise summary (200 words or less) of:
|
||||
- Pipeline schemas and row counts
|
||||
- Any load errors or warnings
|
||||
|
|
@ -428,7 +400,7 @@ Test the connection and report any issues."
|
|||
|
||||
<Check>
|
||||
**Verification Steps:**
|
||||
- dlt MCP is installed via [Continue Hub](https://hub.continue.dev/dlthub/dlt-mcp)
|
||||
- dlt MCP is installed via [Continue Mission Control](https://hub.continue.dev/dlthub/dlt-mcp)
|
||||
- Pipeline directory is accessible
|
||||
- Destination database credentials are configured
|
||||
- Pipeline has been run at least once
|
||||
|
|
@ -464,7 +436,7 @@ After completing this guide, you have a complete **AI-powered data pipeline deve
|
|||
<Card title="dlt Documentation" icon="book" href="https://dlthub.com/docs">
|
||||
Complete dlt platform documentation
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="plug" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="plug" href="https://hub.continue.dev">
|
||||
Explore more MCP integrations and agents
|
||||
</Card>
|
||||
<Card
|
||||
|
|
|
|||
|
|
@ -3,7 +3,18 @@ title: "Automating Documentation Updates with Continue CLI"
|
|||
sidebarTitle: "Automating Documentation Updates with Continue CLI"
|
||||
description: "Learn how to create automated documentation generation workflows using Continue CLI. Set up AI agents to analyze code changes and generate or update documentation automatically in GitHub workflows or local development."
|
||||
---
|
||||
# Automating Documentation Updates with Continue CLI
|
||||
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube.com/embed/rJ2taa8OLvY"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
|
||||
# Getting Started
|
||||
|
||||
This guide demonstrates how to create automated documentation generation based on code updates in a git branch using the Continue CLI, either as part of your local workflow or as part of a GitHub workflow.
|
||||
|
||||
|
|
@ -40,7 +51,7 @@ This process utilizes the **Continue CLI** (`cn`) in **headless mode** to analyz
|
|||
</Card>
|
||||
|
||||
<Card title="Continue API Key" icon="key">
|
||||
Get your API key from [Continue Hub](https://hub.continue.dev/settings/api-keys) and set:
|
||||
Get your API key from [Continue Mission Control](https://hub.continue.dev/settings/api-keys) and set:
|
||||
```bash
|
||||
export CONTINUE_API_KEY=your_key_here
|
||||
```
|
||||
|
|
@ -344,7 +355,7 @@ Ready to implement automated documentation with Continue CLI? Here are some help
|
|||
Checkout this video from Tetrate about using Continue Agents to help with writing your docs.
|
||||
</Card>
|
||||
|
||||
<Card title="Continue Hub" icon="users" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="users" href="https://hub.continue.dev">
|
||||
Browse pre-built agents and configurations from the Continue community.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ For all options, first:
|
|||
</Step>
|
||||
|
||||
<Step title="Configure GitHub Token">
|
||||
Add your `GITHUB_TOKEN` to your [Continue Hub agent's environment variables](https://hub.continue.dev/settings).
|
||||
Add your `GITHUB_TOKEN` to your [Continue Mission Control agent's environment variables](https://hub.continue.dev/settings).
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ For all options, first:
|
|||
## GitHub MCP Workflow Options
|
||||
|
||||
<Card title="🚀 Fastest Path to Success" icon="rocket">
|
||||
Use the GitHub MCP from Continue Hub for one-click setup, or add it via CLI.
|
||||
Use the GitHub MCP from Continue Mission Control for one-click setup, or add it via CLI.
|
||||
</Card>
|
||||
|
||||
After ensuring you meet the **Prerequisites** above, you have two paths to get started:
|
||||
|
|
@ -53,8 +53,8 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Tabs>
|
||||
<Tab title="⚡ Quick Start (Recommended)">
|
||||
<Steps>
|
||||
<Step title="Install GitHub MCP via Continue Hub">
|
||||
Visit the [Anthropic GitHub MCP](https://hub.continue.dev/anthropic/github-mcp) on Continue Hub and click **Install** to add it to your agent.
|
||||
<Step title="Install GitHub MCP via Continue Mission Control">
|
||||
Visit the [GitHub Project Manager Agent](https://hub.continue.dev/continuedev/github-project-manager-agent) on Continue Mission Control and click **Install** to add it to your agent.
|
||||
|
||||
The listing provides a pre-configured MCP block; add your `GITHUB_TOKEN` in Hub.
|
||||
</Step>
|
||||
|
|
@ -62,7 +62,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Step title="Launch the Agent">
|
||||
From your repo root:
|
||||
```bash
|
||||
cn --config continuedev/github-manager-ai
|
||||
cn --agent continuedev/github-project-manager-agent
|
||||
```
|
||||
Now try: "List my open issues labeled bug and summarize priorities."
|
||||
</Step>
|
||||
|
|
@ -75,8 +75,8 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
|
||||
<Tab title="🛠️ Manual Setup">
|
||||
<Steps>
|
||||
<Step title="Create a New Agent on Continue Hub">
|
||||
Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
<Step title="Create a New Agent on Continue Mission Control">
|
||||
Go to the [Continue Mission Control](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
</Step>
|
||||
|
||||
<Step title="Add GitHub MCP">
|
||||
|
|
@ -112,7 +112,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Accordion title="Agent Requirements">
|
||||
To use GitHub MCP with Continue CLI, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
|
||||
The agent will automatically detect and use your configuration along with the GitHub MCP for issue and PR operations.
|
||||
|
||||
|
|
@ -129,6 +129,8 @@ Use natural language to explore, triage, and act on open issues. The agent calls
|
|||
- **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
|
||||
- **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
|
||||
- **CLI (headless mode)**: Use `cn -p "your prompt" --auto` for automation
|
||||
|
||||
To run any of the example prompts below in headless mode, use `cn -p "prompt"`
|
||||
</Info>
|
||||
|
||||
### Triage and Summaries
|
||||
|
|
@ -136,31 +138,21 @@ Use natural language to explore, triage, and act on open issues. The agent calls
|
|||
<Card title="Summarize Open Issues" icon="clipboard-list">
|
||||
Get a prioritized overview of current open issues.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
List the 20 most recently updated open issues in this repo.
|
||||
Cluster by label and severity. Summarize top priorities.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "List the 20 most recently updated open issues in this repo. Cluster by label and severity. Summarize top priorities." --auto
|
||||
```
|
||||
</Card>
|
||||
|
||||
<Card title="Owner/Label Filters" icon="filter">
|
||||
Narrow by label or assignee.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Show open issues labeled bug or security, assigned to @me.
|
||||
Summarize blockers and suggest next steps.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Show open issues labeled bug or security, assigned to @me. Summarize blockers and suggest next steps." --auto
|
||||
```
|
||||
</Card>
|
||||
|
||||
### Taking Action
|
||||
|
|
@ -168,7 +160,7 @@ cn -p "Show open issues labeled bug or security, assigned to @me. Summarize bloc
|
|||
<Card title="Comment on an Issue" icon="comment">
|
||||
Post an AI-generated status update or checklist.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Find the issue with the most engagement (comments, reactions) in the last 30 days.
|
||||
Come up with a triage plan and draft a comment with:
|
||||
|
|
@ -178,11 +170,6 @@ Come up with a triage plan and draft a comment with:
|
|||
Then post the comment.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Find the issue with the most engagement in the last 30 days. Come up with a triage plan and draft a comment (hypothesis, next 2 steps, owner, ETA) and post it." --auto
|
||||
```
|
||||
|
||||
<Note>
|
||||
Requires a token with permission to comment (`public_repo` or `repo`). The agent will confirm before posting unless `--auto` is used.
|
||||
</Note>
|
||||
|
|
@ -191,16 +178,11 @@ cn -p "Find the issue with the most engagement in the last 30 days. Come up with
|
|||
<Card title="Find Stale Issues" icon="clock">
|
||||
Identify issues that need attention.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Find open issues with no activity in the last 30 days.
|
||||
Suggest action (close, needs-repro, or prioritize) and draft comments.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Find open issues with no activity in the last 30 days. Suggest action and draft comments for each." --auto
|
||||
```
|
||||
</Card>
|
||||
|
||||
---
|
||||
|
|
@ -214,16 +196,11 @@ Analyze recently merged PRs for change awareness, release notes, and quality sig
|
|||
<Card title="Merged PR Digest" icon="code-merge">
|
||||
Summarize merged PRs over a time window.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
List PRs merged in the last 7 days.
|
||||
Group by area (label or path). Summarize impact and notable changes.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "List PRs merged in the last 7 days. Group by area (label or path). Summarize impact and notable changes." --auto
|
||||
```
|
||||
</Card>
|
||||
|
||||
### Release Notes
|
||||
|
|
@ -231,16 +208,11 @@ cn -p "List PRs merged in the last 7 days. Group by area (label or path). Summar
|
|||
<Card title="Generate Release Notes" icon="file-lines">
|
||||
Turn merged PRs into crisp release notes.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Generate release notes for PRs merged since tag v1.2.0.
|
||||
Use keep-a-changelog sections and include PR numbers/authors.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Generate release notes for PRs merged since tag v1.2.0. Use keep-a-changelog sections and include PR numbers/authors." --auto
|
||||
```
|
||||
</Card>
|
||||
|
||||
### Deep Dives
|
||||
|
|
@ -248,17 +220,12 @@ cn -p "Generate release notes for PRs merged since tag v1.2.0. Use keep-a-change
|
|||
<Card title="Summarize a PR" icon="magnifying-glass">
|
||||
Get a human-readable summary of a recently merged PR with active discussion.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Find the last merged PR with a significant amount of comments.
|
||||
Summarize the conversation, including goal, key changes,
|
||||
risk areas, and any follow-ups.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Find the last merged PR with a significant amount of comments. Summarize the conversation including goal, key changes, risk areas, and follow-ups." --auto
|
||||
```
|
||||
</Card>
|
||||
|
||||
---
|
||||
|
|
@ -305,7 +272,7 @@ jobs:
|
|||
- name: Weekly Issue Triage Summary
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
run: |
|
||||
cn --config continuedev/github-manager-ai \
|
||||
cn --agent continuedev/github-project-manager-agent \
|
||||
-p "List open issues updated in the last 14 days. Group by label and priority. Propose top 5 actions and include issue links." \
|
||||
--auto > issue_summary.txt
|
||||
|
||||
|
|
@ -314,14 +281,14 @@ jobs:
|
|||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
REPORT=$(cn --config continuedev/github-manager-ai \
|
||||
REPORT=$( cn --agent continuedev/github-project-manager-agent \
|
||||
-p "Summarize the context for PR #${PR_NUMBER}: related open issues, risk areas, and test suggestions. Keep under 200 words." \
|
||||
--auto)
|
||||
gh pr comment ${PR_NUMBER} --body "$REPORT"
|
||||
```
|
||||
|
||||
<Info>
|
||||
Use `continuedev/github-manager-ai` consistently throughout your automation as the recommended agent configuration.
|
||||
Use `continuedev/github-project-manager-agent` consistently throughout your automation as the recommended agent configuration.
|
||||
</Info>
|
||||
|
||||
---
|
||||
|
|
@ -331,7 +298,7 @@ jobs:
|
|||
- **Missing or invalid token:** Ensure `GITHUB_TOKEN` is set and has the required scopes. Try a minimal test: “List 3 open issues in this repo”.
|
||||
- **Permissions errors on comment:** Your token must include `public_repo` (public) or `repo` (private) to write comments.
|
||||
- **Rate limiting:** Reduce frequency or filter queries; consider using a PAT distinct from the default Actions token when running in CI.
|
||||
- **MCP connection timeout:** If using custom YAML, increase `connectionTimeout` or verify the `command`/`args` from the Hub listing.
|
||||
- **MCP connection timeout:** If using custom YAML, increase `connectionTimeout` or verify the `command`/`args` from Mission Control listing.
|
||||
|
||||
## What You've Built
|
||||
|
||||
|
|
@ -361,13 +328,13 @@ After completing this guide, you have a complete **AI-powered GitHub workflow sy
|
|||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="GitHub MCP (Anthropic)" icon="link" href="https://hub.continue.dev/anthropic/github-mcp">
|
||||
Anthropic GitHub MCP on Continue Hub
|
||||
Anthropic GitHub MCP on Continue Mission Control
|
||||
</Card>
|
||||
<Card title="MCP in Continue" icon="book" href="/customize/deep-dives/mcp">
|
||||
How MCP works with Continue agents
|
||||
</Card>
|
||||
<Card title="GitHub Manager AI Agent" icon="robot" href="https://hub.continue.dev/continuedev/github-manager-ai">
|
||||
Pre-configured agent on Continue Hub
|
||||
<Card title="GitHub Project Manager Agent" icon="robot" href="https://hub.continue.dev/continuedev/github-project-manager-agent">
|
||||
Pre-configured agent on Continue Mission Control
|
||||
</Card>
|
||||
<Card title="GitHub MCP Server" icon="link" href="https://github.com/github/github-mcp-server/blob/main/README.md">
|
||||
Official GitHub MCP server README
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ After completing this setup, you have an **AI-powered code review system** that:
|
|||
<Card title="Continue CLI Guide" icon="terminal" href="/guides/cli">
|
||||
Learn more about Continue CLI capabilities
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="globe" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="globe" href="https://hub.continue.dev">
|
||||
Browse shared configs and create your own
|
||||
</Card>
|
||||
<Card title="Rules Documentation" icon="book" href="/customize/deep-dives/rules">
|
||||
|
|
|
|||
|
|
@ -82,10 +82,13 @@ After completing **Quick Setup** above, you have two paths to get started:
|
|||
|
||||
<Steps>
|
||||
<Step title="Add the Pre-Built Agent">
|
||||
Visit the [Netlify Continuous AI Agent](https://hub.continue.dev/continuedev/netlify-continuous-ai) on Continue Hub and click **"Install Agent"**
|
||||
Visit the [Netlify Continuous AI Agent](https://hub.continue.dev/continuedev/netlify-continuous-ai-agent) on Continue Mission Control and click **"Install Agent"** or run:
|
||||
|
||||
```bash
|
||||
cn --agent continuedev/netlify-continuous-ai-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
- **Optimized prompts** for Netlify deployment and performance analysis
|
||||
- **Built-in rules** for consistent formatting and error handling
|
||||
- **Netlify MCP** for more reliable API interactions
|
||||
</Step>
|
||||
|
|
@ -125,7 +128,7 @@ After completing **Quick Setup** above, you have two paths to get started:
|
|||
<Step title="Add Development Rules">
|
||||
Install the [Netlify Development Rules](https://hub.continue.dev/netlify/netlify-development) bundle for best practices:
|
||||
|
||||
1. Visit the bundle page on Continue Hub
|
||||
1. Visit the bundle page on Continue Mission Control
|
||||
2. Click **"Install Rules"**
|
||||
3. Rules automatically apply to your agent
|
||||
|
||||
|
|
@ -154,7 +157,7 @@ After completing **Quick Setup** above, you have two paths to get started:
|
|||
To use the pre-built agent, you need either:
|
||||
- **Continue CLI Pro Plan** with
|
||||
the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
The agent will automatically detect and use your
|
||||
configuration along with the Netlify MCP for deployment operations.
|
||||
|
||||
|
|
@ -702,14 +705,14 @@ The Netlify Performance Rules enforce:
|
|||
|
||||
## Next Steps
|
||||
|
||||
- Install [Netlify MCP](https://hub.continue.dev/netlify/netlify-mcp) from Continue Hub
|
||||
- Install [Netlify MCP](https://hub.continue.dev/netlify/netlify-mcp) from Continue Mission Control
|
||||
- Set up [Performance Monitoring](https://docs.netlify.com/analytics/get-started/)
|
||||
- Configure [A/B Testing](https://docs.netlify.com/split-testing/overview/)
|
||||
- Join the [Continue Discord](https://discord.gg/continue) for support
|
||||
|
||||
## Resources
|
||||
|
||||
- [Netlify MCP on Continue Hub](https://hub.continue.dev/netlify/netlify-mcp)
|
||||
- [Netlify MCP on Continue Mission Control](https://hub.continue.dev/netlify/netlify-mcp)
|
||||
- [Core Web Vitals Guide](https://web.dev/vitals/)
|
||||
- [Netlify Analytics Documentation](https://docs.netlify.com/analytics/)
|
||||
- [Continue Performance Guides](https://docs.continue.dev/guides)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ There are multiple ways to configure Ollama models in Continue:
|
|||
|
||||
### Method 1: Using Hub Model Blocks in Local config.yaml
|
||||
|
||||
The easiest way is to use [pre-configured model blocks](/reference#local-blocks) from the Continue Hub in your local configuration:
|
||||
The easiest way is to use [pre-configured model blocks](/reference#local-blocks) from the Continue Mission Control in your local configuration:
|
||||
|
||||
```yaml title="~/.continue/configs/config.yaml"
|
||||
name: My Local Config
|
||||
|
|
@ -97,11 +97,11 @@ models:
|
|||
```
|
||||
|
||||
<Warning>
|
||||
**Important**: Hub blocks only provide configuration - you still need to pull
|
||||
the model locally. The hub block `ollama/deepseek-r1-32b` configures Continue
|
||||
**Important**: Blocks only provide configuration - you still need to pull
|
||||
the model locally. The block `ollama/deepseek-r1-32b` configures Continue
|
||||
to use `model: deepseek-r1:32b`, but the actual model must be installed:
|
||||
```bash
|
||||
# Check what the hub block expects (view on hub.continue.dev)
|
||||
# Check what the block expects (view on hub.continue.dev)
|
||||
# Then pull that exact model tag locally
|
||||
ollama pull deepseek-r1:32b # Required for ollama/deepseek-r1-32b hub block
|
||||
```
|
||||
|
|
@ -146,7 +146,7 @@ You can update `apiBase` with the IP address of a remote machine serving Ollama.
|
|||
|
||||
### Method 3: Manual Configuration
|
||||
|
||||
For custom configurations or models not on the hub:
|
||||
For custom configurations or models not in Mission Control:
|
||||
|
||||
```yaml
|
||||
models:
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ Step-by-step guides for integrating Model Context Protocol (MCP) servers with Co
|
|||
Automated error analysis with Sentry MCP to identify patterns and create actionable GitHub issues
|
||||
</Card>
|
||||
|
||||
<Card title="Snyk + Continue Hub Agent Cookbook (MCP)" icon="shield" href="/guides/snyk-mcp-continue-cookbook">
|
||||
Integrate Snyk MCP via Continue Hub to scan code, deps, IaC, and containers
|
||||
<Card title="Snyk + Continue Mission Control Agent Cookbook (MCP)" icon="shield" href="/guides/snyk-mcp-continue-cookbook">
|
||||
Integrate Snyk MCP via Continue Mission Control to scan code, deps, IaC, and containers
|
||||
</Card>
|
||||
|
||||
<Card title="Supabase Database Workflow Cookbook" icon="database" href="/guides/supabase-mcp-database-workflow">
|
||||
|
|
|
|||
|
|
@ -98,9 +98,9 @@ First, you'll need to gather your PostHog and GitHub API credentials and add the
|
|||
See https://docs.continue.dev/hub/secrets/secret-types#secret-types for adding secrets
|
||||
</Tip>
|
||||
|
||||
You only need to configure the PostHog MCP credential - it automatically handles project selection. To add environment variables to your Continue Hub account:
|
||||
You only need to configure the PostHog MCP credential - it automatically handles project selection. To add environment variables to your Continue Mission Control account:
|
||||
|
||||
1. Go to the [Continue Hub](https://hub.continue.dev)
|
||||
1. Go to the [Continue Mission Control](https://hub.continue.dev)
|
||||
2. Sign in to your account
|
||||
3. Navigate to your user settings
|
||||
4. Look for the "Secrets" section
|
||||
|
|
@ -134,16 +134,16 @@ You only need to configure the PostHog MCP credential - it automatically handles
|
|||
|
||||
<Steps>
|
||||
<Step title="Add the Pre-Built Agent">
|
||||
Visit the [PostHog GitHub Continuous AI Agent](https://hub.continue.dev/continuedev/awesome-models-posthog-gh) on Continue Hub and click **"Install Agent"** or run:
|
||||
Visit the [PostHog Continuous AI Agent](https://hub.continue.dev/continuedev/posthog-continuous-ai-agent) on Continue Mission Control and click **"Install Agent"** or run:
|
||||
|
||||
```bash
|
||||
cn --config continuedev/awesome-models-posthog-gh
|
||||
cn --agent continuedev/posthog-continuous-ai-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
- **Optimized prompts** for [PostHog analysis](https://hub.continue.dev/continuedev/posthog-analysis) and [GitHub issue creation](https://hub.continue.dev/continuedev/posthog-github-issues)
|
||||
- **[Built-in rules](https://hub.continue.dev/bekah-hawrot-weigel/posthog-github-continuous-ai-rules)** for consistent formatting and error handling
|
||||
- **[PostHog MCP](https://hub.continue.dev/posthog/posthog-mcp)** for more reliable API interactions
|
||||
- **Optimized prompts** for PostHog analysis and GitHub issue creation
|
||||
- **Built-in rules** for consistent formatting and error handling
|
||||
- **PostHog MCP** for more reliable API interactions
|
||||
</Step>
|
||||
|
||||
<Step title="Run the Analysis">
|
||||
|
|
@ -171,7 +171,7 @@ You only need to configure the PostHog MCP credential - it automatically handles
|
|||
```
|
||||
</Step>
|
||||
<Step title="Add PostHog + GitHub Analysis Rules">
|
||||
In the Continue Hub, add the [PostHog GitHub Continuous AI Rules](https://hub.continue.dev/bekah-hawrot-weigel/posthog-github-continuous-ai-rules) to your account for better formatting and error handling.
|
||||
In the Continue Mission Control, add the [PostHog GitHub Continuous AI Rules](https://hub.continue.dev/bekah-hawrot-weigel/posthog-github-continuous-ai-rules) to your account for better formatting and error handling.
|
||||
</Step>
|
||||
<Step title="Create Your Custom Prompts">
|
||||
Use this prompt with Continue CLI to analyze PostHog data and create GitHub issues:
|
||||
|
|
@ -203,8 +203,8 @@ You only need to configure the PostHog MCP credential - it automatically handles
|
|||
To use the pre-built agent, you need either:
|
||||
- **Continue CLI Pro Plan** with
|
||||
the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
(same as Step 1 below) The agent will automatically detect and use your
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
The agent will automatically detect and use your
|
||||
configuration.
|
||||
|
||||
</Accordion>
|
||||
|
|
@ -355,6 +355,6 @@ Consider enhancing your workflow with these advanced Continue CLI prompts:
|
|||
- [PostHog Feature Flags](https://posthog.com/docs/feature-flags)
|
||||
- [PostHog Error Tracking](https://posthog.com/docs/error-tracking)
|
||||
- [GitHub CLI Documentation](https://cli.github.com/)
|
||||
- [GitHub MCP on Continue Hub](https://hub.continue.dev/github/github-mcp) (alternative option)
|
||||
- [GitHub MCP on Continue Mission Control](https://hub.continue.dev/github/github-mcp) (alternative option)
|
||||
- [Continue CLI Guide](https://docs.continue.dev/guides/cli)
|
||||
- [Continuous AI Best Practices](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Tab title="⚡ Quick Start (Recommended)">
|
||||
<Steps>
|
||||
<Step title="Load the Pre-Built Agent">
|
||||
Visit the [Sanity Agent Config](https://hub.continue.dev/continuedev/sanity-agent-config) on Continue Hub and click **"Install Config"** or run:
|
||||
Visit the [Sanity Assistant Agent](https://hub.continue.dev/continuedev/sanity-assistant-agent) on Continue Mission Control and click **"Install Config"** or run:
|
||||
|
||||
```bash
|
||||
cn --config continuedev/sanity-agent-config
|
||||
cn --agent continuedev/sanity-assistant-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
|
|
@ -110,14 +110,14 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
|
||||
<Tab title="🛠️ Manual Setup">
|
||||
<Steps>
|
||||
<Step title="Create a New Agent via the Continue Hub">
|
||||
Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
<Step title="Create a New Agent via the Continue Mission Control">
|
||||
Go to the [Continue Mission Control](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
</Step>
|
||||
|
||||
<Step title="Connect Sanity MCP via Continue Hub">
|
||||
Visit the [Sanity MCP on Continue Hub](https://hub.continue.dev/sanity/sanity-mcp) and click **"Install"** to add it to the agent you created in the step above.
|
||||
<Step title="Connect Sanity MCP via Continue Mission Control">
|
||||
Visit the [Sanity MCP on Continue Mission Control](https://hub.continue.dev/sanity/sanity-mcp) and click **"Install"** to add it to the agent you created in the step above.
|
||||
|
||||
This will add Sanity MCP to your agent's available tools. The Hub listing automatically configures the MCP connection.
|
||||
This will add Sanity MCP to your agent's available tools. The Mission Control listing automatically configures the MCP connection.
|
||||
|
||||
<Tip>
|
||||
**Alternative installation methods:**
|
||||
|
|
@ -158,7 +158,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Accordion title="Agent Requirements">
|
||||
To use the pre-built Sanity Assistant agent, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
|
||||
The agent will automatically detect and use your configuration along with the pre-configured Sanity MCP for content operations. Note that OAuth authentication will be required on first use.
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ With everything set up, you're ready for your first AI-powered content conversat
|
|||
Now you can use natural language prompts to manage your Sanity content and schemas. The Continue agent automatically calls the appropriate Sanity MCP tools.
|
||||
|
||||
<Info>
|
||||
You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Hub](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
|
||||
You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Mission Control](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
|
||||
</Info>
|
||||
|
||||
<Info>
|
||||
|
|
@ -232,6 +232,8 @@ You can add prompts to your agent's configuration for easy access in future sess
|
|||
changes, test your prompts in plan mode (see the [Plan Mode
|
||||
Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes in TUI/IDE). This
|
||||
shows you what the agent will do without executing it.
|
||||
|
||||
To run any of the example prompts below in headless mode, use `cn -p "prompt"`
|
||||
</Info>
|
||||
|
||||
<Info>
|
||||
|
|
@ -245,17 +247,12 @@ You can add prompts to your agent's configuration for easy access in future sess
|
|||
<Card title="Explore Document Types" icon="diagram-project">
|
||||
Review and understand your content schema structure.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Show me all document types in my Sanity schema with their fields,
|
||||
validation rules, and relationships to other types.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Show me all document types in my Sanity schema with their fields, validation rules, and relationships to other types." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### GROQ Queries
|
||||
|
|
@ -263,17 +260,12 @@ cn -p "Show me all document types in my Sanity schema with their fields, validat
|
|||
<Card title="Execute GROQ Queries" icon="magnifying-glass">
|
||||
Run GROQ queries to fetch and analyze content.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Run a GROQ query to fetch all articles published in the last 30 days,
|
||||
including their titles, authors, categories, and view counts.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Run a GROQ query to fetch all articles published in the last 30 days, including their titles, authors, categories, and view counts." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Content Operations
|
||||
|
|
@ -281,17 +273,12 @@ cn -p "Run a GROQ query to fetch all articles published in the last 30 days, inc
|
|||
<Card title="Bulk Content Updates" icon="arrows-rotate">
|
||||
Perform bulk operations on your content.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Find all blog posts with the category "News" and update their
|
||||
status to "archived" if they are older than 6 months.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Find all blog posts with the category 'News' and update their status to 'archived' if they are older than 6 months." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Localization
|
||||
|
|
@ -299,17 +286,12 @@ cn -p "Find all blog posts with the category 'News' and update their status to '
|
|||
<Card title="Add Localization Support" icon="language">
|
||||
Set up and manage content translations.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Add localization support to my article document type for
|
||||
Spanish and French languages with appropriate field configurations.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Add localization support to my article document type for Spanish and French languages with appropriate field configurations." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Content Migration
|
||||
|
|
@ -317,17 +299,12 @@ cn -p "Add localization support to my article document type for Spanish and Fren
|
|||
<Card title="Migrate Content Structure" icon="right-left">
|
||||
Migrate content between different schemas or environments.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Help me migrate my blog posts from the old schema structure
|
||||
to the new one, mapping the deprecated fields to the new format.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Help me migrate my blog posts from the old schema structure to the new one, mapping the deprecated fields to the new format." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Documentation Generation
|
||||
|
|
@ -335,17 +312,12 @@ cn -p "Help me migrate my blog posts from the old schema structure to the new on
|
|||
<Card title="Generate Schema Documentation" icon="book">
|
||||
Automatically generate documentation for your content model.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Generate comprehensive documentation for my Sanity schema including
|
||||
all document types, their purposes, field descriptions, and usage examples.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Generate comprehensive documentation for my Sanity schema including all document types, their purposes, field descriptions, and usage examples." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Content Releases
|
||||
|
|
@ -353,17 +325,12 @@ cn -p "Generate comprehensive documentation for my Sanity schema including all d
|
|||
<Card title="Manage Content Releases" icon="rocket">
|
||||
Work with Sanity's content release feature.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
List all active releases in my dataset and show me the content
|
||||
changes scheduled for each release.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "List all active releases in my dataset and show me the content changes scheduled for each release." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
### Performance Analysis
|
||||
|
|
@ -371,17 +338,12 @@ cn -p "List all active releases in my dataset and show me the content changes sc
|
|||
<Card title="Analyze Query Performance" icon="gauge-high">
|
||||
Optimize GROQ queries for better performance.
|
||||
|
||||
**TUI Mode Prompt:**
|
||||
**Prompt:**
|
||||
```
|
||||
Analyze the performance of my most frequent GROQ queries and
|
||||
suggest optimizations to improve response times.
|
||||
```
|
||||
|
||||
**Headless Mode Prompt:**
|
||||
```bash
|
||||
cn -p "Analyze the performance of my most frequent GROQ queries and suggest optimizations to improve response times." --auto
|
||||
```
|
||||
|
||||
</Card>
|
||||
|
||||
## Continuous Content Management with GitHub Actions
|
||||
|
|
@ -399,7 +361,7 @@ Navigate to **Repository Settings → Secrets and variables → Actions** and ad
|
|||
- `MCP_USER_ROLE`: Your MCP user role (typically "admin" or "editor")
|
||||
|
||||
<Info>
|
||||
The workflow uses the [Sanity Agent Config](https://hub.continue.dev/continuedev/sanity-agent-config) with environment variable authentication via [Sanity MCP Config](https://hub.continue.dev/sanity/sanity-mcp-config). This enables headless mode operation without OAuth browser authentication.
|
||||
The workflow uses the [Sanity Assistant Agent](https://hub.continue.dev/continuedev/sanity-assistant-agent) with environment variable authentication via [Sanity MCP Config](https://hub.continue.dev/sanity/sanity-mcp-config). This enables headless mode operation without OAuth browser authentication.
|
||||
</Info>
|
||||
|
||||
### Create Workflow File
|
||||
|
|
@ -447,7 +409,7 @@ jobs:
|
|||
- name: Validate Schema Structure
|
||||
run: |
|
||||
echo "🔍 Validating schema structure..."
|
||||
cn --config continuedev/sanity-agent-config \
|
||||
cn --agent continuedev/sanity-assistant-agent \
|
||||
-p "Analyze the Sanity schema for any structural issues,
|
||||
missing required fields, or broken references between document types." \
|
||||
--auto
|
||||
|
|
@ -455,7 +417,7 @@ jobs:
|
|||
- name: Check Content Integrity
|
||||
run: |
|
||||
echo "📊 Checking content integrity..."
|
||||
cn --config continuedev/sanity-agent-config \
|
||||
cn --agent continuedev/sanity-assistant-agent \
|
||||
-p "Run GROQ queries to identify any orphaned documents,
|
||||
broken references, or missing required fields in the content." \
|
||||
--auto
|
||||
|
|
@ -463,7 +425,7 @@ jobs:
|
|||
- name: Generate Schema Documentation
|
||||
run: |
|
||||
echo "📝 Generating schema documentation..."
|
||||
cn --config continuedev/sanity-agent-config \
|
||||
cn --agent continuedev/sanity-assistant-agent \
|
||||
-p "Generate a markdown summary of all schema changes
|
||||
in this PR and their potential impact on existing content." \
|
||||
--auto > schema-changes.md
|
||||
|
|
@ -473,7 +435,7 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
REPORT=$(cn --config continuedev/sanity-agent-config \
|
||||
REPORT=$( cn --agent continuedev/sanity-assistant-agent \
|
||||
-p "Generate a concise summary (200 words or less) of:
|
||||
- Schema validation results
|
||||
- Content integrity checks
|
||||
|
|
@ -547,7 +509,7 @@ then provide a corrected version that achieves the intended result."
|
|||
|
||||
<Check>
|
||||
**Verification Steps:**
|
||||
- Sanity MCP is installed via [Continue Hub](https://hub.continue.dev/sanity/sanity-mcp)
|
||||
- Sanity MCP is installed via [Continue Mission Control](https://hub.continue.dev/sanity/sanity-mcp)
|
||||
- Project is authenticated with Sanity
|
||||
- Schema files are present and valid
|
||||
- Dataset permissions are correctly configured
|
||||
|
|
@ -583,7 +545,7 @@ After completing this guide, you have a complete **AI-powered content management
|
|||
<Card title="Sanity Documentation" icon="book" href="https://www.sanity.io/docs">
|
||||
Complete Sanity platform documentation
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="plug" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="plug" href="https://hub.continue.dev">
|
||||
Explore more MCP integrations and agents
|
||||
</Card>
|
||||
<Card
|
||||
|
|
|
|||
|
|
@ -4,6 +4,24 @@ description: "Build an AI-powered error monitoring workflow that analyzes Sentry
|
|||
sidebarTitle: "Sentry Automated Error Analysis with MCP"
|
||||
---
|
||||
|
||||
<Note>
|
||||
|
||||
**🚀 New: Sentry Mission Control Integration with Continuous AI**
|
||||
|
||||
The new [Sentry Mission Control Integration](/mission-control/integrations/sentry) enables **[Continuous AI](/guides/continuous-ai)** for error monitoring - where AI agents autonomously detect, analyze, and fix production errors. When Sentry detects an issue, your agent automatically analyzes it, generates a fix, creates a PR, and validates the solution without manual intervention.
|
||||
|
||||
**Mission Control Benefits:**
|
||||
- **Webhook-based triggers** - Automatically respond when new errors occur in production
|
||||
- **Centralized error workflows** - Manage all error monitoring Tasks from one dashboard
|
||||
- **Dedicated inbox view** - Monitor all Sentry-related agent activity at [hub.continue.dev/inbox?view=sentry](https://hub.continue.dev/inbox?view=sentry)
|
||||
- **Metrics & intervention rates** - Track how often agents successfully fix errors without human help
|
||||
|
||||
This represents **[Level 2 Continuous AI](/guides/continuous-ai#the-continuous-ai-maturity-model)**: AI handles routine error analysis and fixes autonomously while developers focus on complex problems. As outlined in our [Continuous AI guide](/guides/continuous-ai#best-practices-for-sustainable-continuous-ai), this reduces mean time to resolution (MTTR) and improves application reliability.
|
||||
|
||||
**Get Started:** Use this cookbook to understand error monitoring fundamentals, then [enable Mission Control](/mission-control/integrations/sentry) to deploy autonomous error-fixing agents across your organization.
|
||||
|
||||
</Note>
|
||||
|
||||
<Card title="What You'll Build" icon="bug">
|
||||
An automated error monitoring system that uses Continue CLI with Sentry MCP to analyze production errors, identify root causes with AI, and create detailed GitHub issues with suggested fixes.
|
||||
</Card>
|
||||
|
|
@ -138,10 +156,10 @@ First, you'll need to gather your Sentry and GitHub API credentials.
|
|||
|
||||
<Steps>
|
||||
<Step title="Add the Pre-Built Agent">
|
||||
Visit the [Sentry Continuous AI Agent](https://hub.continue.dev/continuedev/sentry-continuous-ai) on Continue Hub and click **"Install Agent"** or run:
|
||||
Visit the [Sentry Continuous AI Agent](https://hub.continue.dev/continuedev/sentry-continuous-ai-agent) on Continue Mission Control and click **"Install Agent"** or run:
|
||||
|
||||
```bash
|
||||
cn --config continuedev/sentry-continuous-ai
|
||||
cn --agent continuedev/sentry-continuous-ai-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
|
|
@ -219,7 +237,7 @@ First, you'll need to gather your Sentry and GitHub API credentials.
|
|||
<Accordion title="Agent Requirements">
|
||||
To use the pre-built agent, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets (same as Step 1)
|
||||
- **Your own API keys** added to Continue Mission Control secrets (same as Step 1)
|
||||
|
||||
The agent will automatically detect and use your configuration. For Sentry MCP:
|
||||
- **Sentry account** with at least one project
|
||||
|
|
@ -242,6 +260,10 @@ First, you'll need to gather your Sentry and GitHub API credentials.
|
|||
|
||||
Use Continue CLI to perform intelligent error analysis. Enter these prompts in the Continue CLI TUI:
|
||||
|
||||
<Info>
|
||||
To run any of the example prompts below in headless mode, use `cn -p "prompt"`
|
||||
</Info>
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Recent Errors Analysis">
|
||||
**Prompt:**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,24 @@ description: "Set up an AI-powered security workflow that automatically scans yo
|
|||
sidebarTitle: "Snyk Security Scanning with Continue"
|
||||
---
|
||||
|
||||
<Note>
|
||||
|
||||
**🚀 New: Snyk Mission Control Integration with Continuous AI**
|
||||
|
||||
The new [Snyk Mission Control Integration](/mission-control/integrations/snyk) enables **[Continuous AI](/guides/continuous-ai)** - where AI agents autonomously detect, analyze, and fix vulnerabilities. When Snyk detects an issue, your agent automatically generates a fix, creates a PR, and validates the solution without manual intervention.
|
||||
|
||||
**Mission Control Benefits:**
|
||||
- **One-click OAuth** - No tokens, no configuration files, just connect and go
|
||||
- **Centralized workflows** - Manage all security Tasks and automations from one dashboard
|
||||
- **Webhook triggers** - Automatically respond to new vulnerabilities as they're discovered
|
||||
- **Metrics & intervention rates** - Track how often agents successfully fix issues without human help
|
||||
|
||||
This represents **[Level 2 Continuous AI](/guides/continuous-ai#the-continuous-ai-maturity-model)**: AI handles routine security work autonomously while developers focus on complex problems. As outlined in our [Continuous AI guide](/guides/continuous-ai#best-practices-for-sustainable-continuous-ai), this reduces intervention rates and accelerates secure development.
|
||||
|
||||
**Get Started:** Use this cookbook to understand the fundamentals, then [enable Mission Control](/mission-control/integrations/snyk) to deploy autonomous security agents across your organization.
|
||||
|
||||
</Note>
|
||||
|
||||
<Card title="What You'll Build" icon="shield-halved">
|
||||
An automated security scanning system that uses Continue's AI agent with Snyk
|
||||
MCP to identify vulnerabilities in code, dependencies, infrastructure, and
|
||||
|
|
@ -77,7 +95,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Step title="Load the Pre-Built Agent">
|
||||
Navigate to your project directory and run:
|
||||
```bash
|
||||
cn --config continuedev/snyk-continuous-ai
|
||||
cn --agent continuedev/snyk-continuous-ai-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
|
|
@ -104,14 +122,14 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
|
||||
<Tab title="🛠️ Manual Setup">
|
||||
<Steps>
|
||||
<Step title="Create a New Agent via the Continue Hub">
|
||||
Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
<Step title="Create a New Agent via the Continue Mission Control">
|
||||
Go to the [Continue Mission Control](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
|
||||
</Step>
|
||||
|
||||
<Step title="Connect Snyk MCP via Continue Hub">
|
||||
Visit the [Snyk MCP on Continue Hub](https://hub.continue.dev/snyk/snyk-mcp) and click **Install** to add it to the agent you created in the step above.
|
||||
<Step title="Connect Snyk MCP via Continue Mission Control">
|
||||
Visit the [Snyk Continuous AI Agent](https://hub.continue.dev/continuedev/snyk-continuous-ai-agent) and click **Install** to add it to the agent you created in the step above.
|
||||
|
||||
This will add Snyk MCP to your agent's available tools. The Hub listing automatically configures the MCP command:
|
||||
This will add Snyk MCP to your agent's available tools. The Mission Control listing automatically configures the MCP command:
|
||||
```bash
|
||||
npx -y snyk@latest mcp -t stdio
|
||||
```
|
||||
|
|
@ -132,7 +150,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
</Step>
|
||||
|
||||
<Step title="Add Secure-at-Inception Rules">
|
||||
Install the [Snyk Secure-at-Inception rules](https://hub.continue.dev/snyk/secure-at-inception) from the Hub to enable automatic security scanning.
|
||||
Install the [Snyk Secure-at-Inception rules](https://hub.continue.dev/snyk/secure-at-inception) from Mission Control to enable automatic security scanning.
|
||||
|
||||
**How to add rules to your agent:**
|
||||
1. Visit the rules link above and click **Install**
|
||||
|
|
@ -161,7 +179,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
<Accordion title="Agent Requirements">
|
||||
To use the pre-built agent, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets (same as manual setup)
|
||||
- **Your own API keys** added to Continue Mission Control secrets (same as manual setup)
|
||||
|
||||
The agent will automatically detect and use your configuration along with the pre-configured Snyk MCP for security scanning operations.
|
||||
|
||||
|
|
@ -174,7 +192,7 @@ After ensuring you meet the **Prerequisites** above, you have two paths to get s
|
|||
Now you can use natural language prompts to run comprehensive security scans. The Continue agent automatically calls the appropriate Snyk MCP tools.
|
||||
|
||||
<Info>
|
||||
You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Hub](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
|
||||
You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Mission Control](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
|
||||
</Info>
|
||||
|
||||
<Info>
|
||||
|
|
@ -454,7 +472,7 @@ jobs:
|
|||
# Use Continue CLI to generate mitigation suggestions
|
||||
PROMPT="Analyze these Snyk security findings and provide specific, actionable mitigation steps for each issue. Focus on: 1) Root cause, 2) Immediate fix, 3) Long-term prevention. Findings: $FINDINGS_SUMMARY. Provide clear, prioritized recommendations."
|
||||
|
||||
cn --config continuedev/snyk-continuous-ai -p "$PROMPT" --auto > mitigation-suggestions.md || {
|
||||
cn --agent continuedev/snyk-continuous-ai-agent -p "$PROMPT" --auto > mitigation-suggestions.md || {
|
||||
echo "⚠️ Warning: Could not generate AI suggestions"
|
||||
exit 0
|
||||
}
|
||||
|
|
@ -594,7 +612,7 @@ jobs:
|
|||
Implement automated security policies using Continue's rule system. See the [Rules deep dive](/customize/deep-dives/rules) for authoring tips.
|
||||
|
||||
<Note>
|
||||
**Coming Soon**: These security guardrail prompts will be available as pre-configured rules on the Continue Hub for easy installation.
|
||||
**Coming Soon**: These security guardrail prompts will be available as pre-configured rules on the Continue Mission Control for easy installation.
|
||||
</Note>
|
||||
|
||||
<Card title="Pre-commit Scanning" icon="lock">
|
||||
|
|
@ -627,7 +645,7 @@ Implement automated security policies using Continue's rule system. See the [Rul
|
|||
</Card>
|
||||
|
||||
<Tip>
|
||||
Enable the **Secure-at-Inception** rules from the Hub to automatically apply
|
||||
Enable the **Secure-at-Inception** rules from Mission Control to automatically apply
|
||||
these guardrails to all code generation and modifications.
|
||||
</Tip>
|
||||
|
||||
|
|
@ -687,7 +705,7 @@ After completing this guide, you have a complete **AI-powered security system**
|
|||
<Card title="Snyk Documentation" icon="book" href="https://docs.snyk.io">
|
||||
Complete Snyk platform documentation
|
||||
</Card>
|
||||
<Card title="Continue Hub" icon="plug" href="https://hub.continue.dev">
|
||||
<Card title="Continue Mission Control" icon="plug" href="https://hub.continue.dev">
|
||||
Explore more MCP integrations and agents
|
||||
</Card>
|
||||
<Card
|
||||
|
|
|
|||
|
|
@ -140,10 +140,10 @@ First, you'll need to set up access to your Supabase project.
|
|||
|
||||
<Steps>
|
||||
<Step title="Add the Pre-Built Agent">
|
||||
Visit the [Supabase Continuous AI Agent](https://hub.continue.dev/continuedev/supabase-continuous-ai) on Continue Hub and click **"Install Agent"** or run:
|
||||
Visit the [Supabase Agent](https://hub.continue.dev/continuedev/supabase-agent) on Continue Mission Control and click **"Install Agent"** or run:
|
||||
|
||||
```bash
|
||||
cn --config continuedev/supabase-continuous-ai
|
||||
cn --agent continuedev/supabase-agent
|
||||
```
|
||||
|
||||
This agent includes:
|
||||
|
|
@ -208,7 +208,7 @@ First, you'll need to set up access to your Supabase project.
|
|||
<Accordion title="Agent Requirements">
|
||||
To use the pre-built agent, you need either:
|
||||
- **Continue CLI Pro Plan** with the models add-on, OR
|
||||
- **Your own API keys** added to Continue Hub secrets
|
||||
- **Your own API keys** added to Continue Mission Control secrets
|
||||
|
||||
The agent will automatically detect and use your configuration. For Supabase MCP:
|
||||
- **Supabase account** with at least one project
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@ title: "How to Understand Hub vs Local Configuration"
|
|||
description: "Learn how to choose between cloud-managed Hub and local configuration for AI development assistance in Continue, including setup, management, and best practices for each approach"
|
||||
---
|
||||
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube.com/embed/ljym650IW3Y"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
|
||||
Every developer has unique needs when it comes to AI assistance. Some prefer the convenience of cloud-managed configurations, while others need the control and privacy of local setups. Continue offers both paths, and this guide will help you choose the right one for your workflow.
|
||||
|
||||
## What Are the Two Paths to AI Assistance?
|
||||
|
|
@ -25,7 +35,7 @@ Before we dive into the specifics, let's understand how to access your configura
|
|||
|
||||
## What Are Hub Configurations: The Managed Experience
|
||||
|
||||
Hub Configurations represent the "it just works" philosophy. When you [sign in to Continue Hub](https://auth.continue.dev/), you gain access to a curated ecosystem of established configurations that sync seamlessly across all your development environments.
|
||||
Hub Configurations represent the "it just works" philosophy. When you [sign in to Continue Mission Control](https://auth.continue.dev/), you gain access to a curated ecosystem of established configurations that sync seamlessly across all your development environments.
|
||||
|
||||
### Why Should You Choose Hub Configs?
|
||||
|
||||
|
|
@ -33,7 +43,7 @@ Hub Configurations represent the "it just works" philosophy. When you [sign in t
|
|||
|
||||
- **Instant Setup**: Browse the [configuration marketplace](https://hub.continue.dev) and add any config to your account with a single click
|
||||
- **Web-Based Management**: Configure models, add secrets, and customize settings through an intuitive web interface—no JSON editing required
|
||||
- **Automatic Synchronization**: Make a change on the hub, and it reflects immediately across all your IDE instances
|
||||
- **Automatic Synchronization**: Make a change on Mission Control, and it reflects immediately across all your IDE instances
|
||||
- **Team Collaboration**: Share custom configurations with your team, ensuring everyone uses the same optimized configurations
|
||||
|
||||

|
||||
|
|
@ -44,14 +54,14 @@ The journey from zero to AI-powered coding takes just four steps:
|
|||
|
||||
1. **Select Your Config**: Click the config selector in your IDE's Continue panel
|
||||
2. **Explore or Create**: Browse community configurations or craft your own specialized setup
|
||||
3. **Secure Your Keys**: Add API keys as [User Secrets](https://hub.continue.dev/settings/secrets) in the hub—they're encrypted and never exposed
|
||||
3. **Secure Your Keys**: Add API keys as [User Secrets](https://hub.continue.dev/settings/secrets) in Mission Control—they're encrypted and never exposed
|
||||
4. **Sync and Code**: Click "Reload config" to pull your latest settings
|
||||
|
||||
Pro tip: Hub configurations are perfect for teams. Create a custom config with your team's coding standards, preferred models, and context sources, then share it with a simple link.
|
||||
|
||||
### How to Manage Hub Configs
|
||||
|
||||
All Hub config management happens through [the Hub](https://hub.continue.dev). For detailed customization, see our guide on [Editing a Config](/hub/configs/edit-a-config).
|
||||
All Hub config management happens through [Mission Control](https://hub.continue.dev). For detailed customization, see our guide on [Editing a Config](/hub/configs/edit-a-config).
|
||||
|
||||
## What Are Local Configs: The Power User's Choice
|
||||
|
||||
|
|
@ -173,7 +183,7 @@ You can switch between them seamlessly using the configs selector in your IDE.
|
|||
|
||||
**Config Not Available?**
|
||||
|
||||
- Verify it's added to your account on the hub
|
||||
- Verify it's added to your account on Mission Control
|
||||
- Check if it requires specific API keys
|
||||
|
||||
### Local Config Issues
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ description: "Learn how Continue enables developers to embrace continuous AI, en
|
|||
|
||||
2. Try out [Continue CLI (cn)](https://docs.continue.dev/guides/cli) and give us feedback
|
||||
|
||||
3. Discover the models, prompts, rules, MCP tools, and agents you need to automate your workflows with AI on [Continue Hub](https://hub.continue.dev/)
|
||||
3. Discover the models, prompts, rules, MCP tools, and agents you need to automate your workflows with AI on [Continue Mission Control](https://hub.continue.dev/)
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
---
|
||||
title: "Agents Introduction"
|
||||
description: "Run and manage background agents in Mission Control"
|
||||
sidebarTitle: "Agents"
|
||||
---
|
||||
|
||||
<Info>
|
||||
Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051).
|
||||
</Info>
|
||||
|
||||
Mission Control is a way to run and manage background agents in Continue. You can use it to kick off:
|
||||
- Addressing small nitpicks and bugs
|
||||
- Building boilerplate-heavy features
|
||||
- Investigating an issue to kickstart your work
|
||||
- [Automated security scanning](../../guides/snyk-mcp-continue-cookbook)
|
||||
- Running repeatable tasks with your own rules, prompts, and MCP servers
|
||||
- Much more!
|
||||
|
||||
## Quickstart
|
||||
|
||||
To kick off your first agent
|
||||
|
||||
1. Go to [hub.continue.dev/agents](https://hub.continue.dev/agents)
|
||||
|
||||

|
||||
|
||||
2. Connect with your GitHub account
|
||||
3. Enter the prompt for your agent
|
||||
|
||||
## Example Workflow Tasks
|
||||
|
||||
Here are some example tasks you can try with your agents:
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="Bug Fixes & Code Quality">
|
||||
|
||||
- "Fix the TypeError in api/users.ts where the user object might be undefined"
|
||||
- "Add null checks to all database query results in the services/ directory"
|
||||
- "Fix all ESLint warnings in the components folder"
|
||||
- "Update deprecated React lifecycle methods to hooks in legacy components"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Feature Development">
|
||||
|
||||
- "Create a new REST endpoint for user profile updates with validation and error handling"
|
||||
- "Add pagination to the products list page with previous/next buttons"
|
||||
- "Implement dark mode toggle using Tailwind CSS classes across all pages"
|
||||
- "Add unit tests for the authentication service using Jest"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Security & Compliance">
|
||||
|
||||
- "Scan the codebase for hardcoded API keys and move them to environment variables"
|
||||
- "Add input sanitization to all user-facing form fields"
|
||||
- "Update all npm packages with known security vulnerabilities"
|
||||
- "Implement rate limiting on the /api/login endpoint"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Documentation & Boilerplate">
|
||||
|
||||
- "Add JSDoc comments to all exported functions in the utils/ directory"
|
||||
- "Create a README.md for the new payment-processing module with setup instructions"
|
||||
- "Generate TypeScript interfaces for all API response schemas"
|
||||
- "Add error handling boilerplate to all async functions missing try-catch blocks"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Investigation & Analysis">
|
||||
|
||||
- "Investigate why the login API is returning 500 errors intermittently and suggest fixes"
|
||||
- "Analyze the performance bottleneck in the data processing pipeline"
|
||||
- "Review the database schema for the orders table and suggest optimizations"
|
||||
- "Find all TODO comments related to authentication and create a summary"
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Refactoring">
|
||||
|
||||
- "Extract the repeated validation logic in controllers into a shared utility function"
|
||||
- "Convert all class components in src/legacy to functional components with hooks"
|
||||
- "Rename all instances of 'userId' to 'accountId' across the codebase"
|
||||
- "Split the 500-line UserService.ts into smaller, single-responsibility services"
|
||||
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
## How to use background agents
|
||||
|
||||
The practice of using background agents, which we call Continuous AI, requires practice and forethought to set up the right guiderails and habits to fit your development workflow, much like learning to work with a larger engineering team. We are constantly sharing our learnings on the [Continuous AI Blog](https://blog.continue.dev), but these few high-level tips are a great way to quickly become successful with agents:
|
||||
|
||||
- Practice first with the [Continue CLI](../../guides/cli) in "TUI mode". The Continue CLI is used to run agents, so you can easily test your prompts locally.
|
||||
- Identify and begin with tasks that you are confident can be accomplished by Continue. For example, ask Continue to fix a small bug where you already know the solution is simple.
|
||||
- Once you have merged a PR created by Continue, be increasingly ambitious with your tasks. By being willing to start tasks that might not succeed on the first try, you will learn about prompting best practices and limitations of current language models.
|
||||
- Use thorough prompts. Workflows can run for a long time to complete their task, so it is worthwhile to invest in sharing all of the important details.
|
||||
- Discuss the use of agents with your team. Truly embracing Continuous AI likely means acknowledging that a higher volume of PRs will be created and adjusting your code review habits.
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
---
|
||||
title: "Continue Hub"
|
||||
description: "Central platform for discovering, creating, and sharing AI coding configurations, agents, and components with organization-level governance"
|
||||
---
|
||||
|
||||
[Continue Hub](https://hub.continue.dev) is your central platform for AI-powered development. Discover pre-built configurations, create custom agents, and manage components that power your coding workflow.
|
||||
|
||||
## What You Can Do on the Hub
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
||||
<Card title="Create and Use Configs" icon="folder-gear" href="/hub/configs/intro">
|
||||
|
||||
Use a combinations of models, tools, and rules for different coding contexts. [Learn more →](/hub/configs/intro)
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="Create and Run Agents" icon="robot" href="/hub/agents/intro">
|
||||
|
||||
Run background agents that complete tasks automatically in your repositories. [Learn more →](/hub/workflows/intro)
|
||||
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
|
||||
## Hub Components
|
||||
|
||||
Both configs and agents are built from reusable components that you can create, share, and customize:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
||||
<Card title="Models" icon="cube">
|
||||
|
||||
Large Language Models from various providers (OpenAI, Anthropic, etc.) configured for specific roles like chat, autocomplete, or editing
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="MCPs" icon="wrench">
|
||||
|
||||
Model Context Protocol servers that provide tools and capabilities like database access, web search, or custom functions
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="Rules" icon="shield">
|
||||
|
||||
Guidelines that shape AI behavior - coding standards, constraints, or specific instructions for your domain
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="Prompts" icon="message-square">
|
||||
|
||||
Reusable instructions for common tasks, optimized for specific workflows or coding patterns
|
||||
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
|
||||
## Creating Components
|
||||
|
||||
<Tip>
|
||||
|
||||
Components are the building blocks used in both configs and agents. When you create a component on the hub, it becomes available for use in any config or agent.
|
||||
|
||||
</Tip>
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
||||
<Card title="Create New" icon="plus">
|
||||
|
||||
Start with a blank template:
|
||||
|
||||
- Select New Rules, Prompts, Configs, or Agents from the Hub navigation
|
||||
- Click 'New' to start with a blank template
|
||||
- Configure by filling in the inputs to create your markdown configuration
|
||||

|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="Remix Existing" icon="copy">
|
||||
|
||||
Customize an existing component:
|
||||
|
||||
- Browse the [Hub](https://hub.continue.dev/) for what you need
|
||||
- Click 'Remix' to create a copy that you can customize
|
||||
- Modify the configuration for your specific needs
|
||||
- Save your customized version
|
||||

|
||||
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
|
||||
|
||||
### Component Permissions
|
||||
|
||||
Set visibility for your components:
|
||||
|
||||
- **Personal**: Only you can see and use
|
||||
- **Public**: Anyone can discover and use
|
||||
- **Organization**: Team members can access
|
||||
|
||||
### Component Inputs
|
||||
|
||||
Some components can receive values, including secrets, as inputs through templating. For values that the user needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their agent or config.
|
||||
|
||||
<Info>
|
||||
**Choosing between `secrets.` and `inputs.`**
|
||||
|
||||
When creating blocks for the hub:
|
||||
- Use `${{ inputs.INPUT_NAME }}` in your block definition when you want users to be able to customize which secret is used
|
||||
- Users will then map their own secrets using `${{ secrets.SECRET_NAME }}` in the `with` clause
|
||||
|
||||
For personal or single-use configurations, you can skip the inputs layer and reference `${{ secrets.SECRET_NAME }}` directly in your block.
|
||||
</Info>
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
title: "Sharing"
|
||||
description: "Connect with the Continue community to discover, share, and collaborate on AI development tools."
|
||||
---
|
||||
|
||||
## Community
|
||||
|
||||
Join thousands of developers using Continue. Share experiences, get help, and contribute to the ecosystem.
|
||||
|
||||
[Join our Discord Community →](https://discord.gg/vapESyrFmJ)
|
||||
|
||||
## Publishing
|
||||
|
||||
Share your custom assistants, blocks, and configurations with the Continue community.
|
||||
|
||||
[Visit the Hub →](https://hub.continue.dev)
|
||||
|
||||
## Browse Configurations
|
||||
|
||||
Explore assistants created by the community for specific use cases and workflows.
|
||||
|
||||
[Browse Configurations →](https://hub.continue.dev)
|
||||
|
||||
## Using Configurations
|
||||
|
||||
Learn how to discover, install, and use community-created assistants in your projects.
|
||||
|
||||
[Learn About Configurations →](/hub/configs/intro)
|
||||
|
||||
---
|
||||
|
||||
The Continue Hub makes it easy to leverage community knowledge and share your innovations with fellow developers.
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
---
|
||||
title: "Source Control"
|
||||
description: "When managing your custom configurations within an organization, you might want to take advantage of your usual source control workflows. Continue makes this easy with a GitHub Action that automatically syncs your YAML files with hub.continue.dev. We are also planning on adding automations for GitLab, BitBucket, Gitee, and others. If you are interested, please reach out to us on ."
|
||||
---
|
||||
|
||||
## Quickstart
|
||||
|
||||
This quickstart uses a template repository, but you can also follow these steps 2-4 from an existing repository.
|
||||
|
||||
### 1. Create a new repository from the template
|
||||
|
||||
As shown in the image below, start by creating a new repository from [the template](https://github.com/continuedev/continue-hub-template). Click "Use Template" and then "Create a new repository".
|
||||
|
||||

|
||||
|
||||
### 2. Obtain a deploy key
|
||||
|
||||
Deploy keys allow the GitHub Action to authenticate with hub.continue.dev. [Obtain your deploy key here](https://hub.continue.dev/settings/api-keys) and then [create a secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) named `CONTINUE_API_KEY` in your GitHub repository.
|
||||
|
||||
### 3. Configure the GitHub Action
|
||||
|
||||
<Check>
|
||||
This step assumes you have already created an organization on
|
||||
hub.continue.dev. If not, learn more [here](/hub/governance/creating-an-org).
|
||||
</Check>
|
||||
|
||||
In the repository you created, navigate to `.github/workflows/main.yaml` and update the lines below to match your organization:
|
||||
|
||||
```
|
||||
env: OWNER_SLUG: my-org-slug # <-- TODO
|
||||
```
|
||||
|
||||
This is the only configuration necessary, but you can view the full list of options [here](https://github.com/continuedev/continue-publish-action/blob/main/README.md).
|
||||
|
||||
### 4. Commit and push
|
||||
|
||||
Add the [YAML for your configurations](/reference) to the appropriate directories. The name of the file will be the slug of the configuration options.
|
||||
|
||||
- `assistants/public` for public configurations
|
||||
- `assistants/private` for private (visible only within your organization) configurations
|
||||
- `blocks/public` for public configuration options
|
||||
- `blocks/private` for private configuration options
|
||||
|
||||
Then, commit and push your changes. Once the GitHub Action has completed running, you should be able to view the configurations within your organization on hub.continue.dev. For subsequent changes, make sure to increment the `version` property of your updated YAML file(s).
|
||||
|
|
@ -6,7 +6,7 @@ sidebarTitle: "Customize Agent Mode"
|
|||
|
||||
## How to Add Rules Blocks
|
||||
|
||||
Adding Rules can be done in your configuration locally or in the Hub. You can explore Rules on the Continue Hub and refer to the [Rules deep dive](/customize/deep-dives/rules) for more details.
|
||||
Adding Rules can be done in your configuration locally or in Mission Control. You can explore Rules on the Continue Mission Control and refer to the [Rules deep dive](/customize/deep-dives/rules) for more details.
|
||||
|
||||
## How to Customize System Messages
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ models:
|
|||
|
||||
## How to Add MCP Tools
|
||||
|
||||
You can add MCP servers to your configuration to give Agent mode access to more tools. Explore [MCP Servers on the Hub](https://hub.continue.dev) and consult the [MCP guide](/customize/deep-dives/mcp) for more details.
|
||||
You can add MCP servers to your configuration to give Agent mode access to more tools. Explore [MCP Servers on Mission Control](https://hub.continue.dev/explore?type=mcpServers) and consult the [MCP guide](/customize/deep-dives/mcp) for more details.
|
||||
|
||||
## How to Configure Tool Policies
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ The Continue logo will appear on the left sidebar. For a better experience, move
|
|||
</Step>
|
||||
|
||||
<Step title="Sign In">
|
||||
[Sign in to the hub](https://auth.continue.dev/) to get started
|
||||
[Sign in to Mission Control](https://auth.continue.dev/) to get started
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ Click `Install`, which will cause the Continue logo to show up on the right tool
|
|||
</Step>
|
||||
|
||||
<Step title="Sign In">
|
||||
[Sign in to the hub](https://auth.continue.dev/) to get started
|
||||
[Sign in to Mission Control](https://auth.continue.dev/) to get started
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
|
|
@ -78,6 +78,6 @@ Click `Install`, which will cause the Continue logo to show up on the right tool
|
|||
|
||||
## Signing in
|
||||
|
||||
Click "Get started" to sign in to the hub and get started.
|
||||
Click "Get started" to sign in to Mission Control and get started.
|
||||
|
||||

|
||||
|
|
|
|||
BIN
docs/images/background-agent.gif
Normal file
BIN
docs/images/background-agent.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 665 KiB |
BIN
docs/images/cli-agent.gif
Normal file
BIN
docs/images/cli-agent.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
BIN
docs/images/hub/assets/images/agent-mission-control.gif
Normal file
BIN
docs/images/hub/assets/images/agent-mission-control.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 MiB |
BIN
docs/images/hub/create-an-agent.gif
Normal file
BIN
docs/images/hub/create-an-agent.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 MiB |
107
docs/index.mdx
107
docs/index.mdx
|
|
@ -1,21 +1,57 @@
|
|||
---
|
||||
title: "Welcome to Continue"
|
||||
icon: book-open
|
||||
description: "Practice Continuous AI with an open-source CLI, open-source IDE extensions, and a Hub for custom agents"
|
||||
description: "Create, run, and automate AI agents across Mission Control, terminal, and CI/CD"
|
||||
---
|
||||
|
||||
<Frame>
|
||||
<img src="/images/intro-0c302b9c15b890c251b1ad04586c880f.png" />
|
||||
</Frame>
|
||||
|
||||
## Mission Control
|
||||
<Note>
|
||||
**Build faster with AI across your IDE, terminal, and CI/CD pipelines with
|
||||
Continue.**
|
||||
Central dashboard for managing Agents, Tasks, Workflows, and Integrations.
|
||||
</Note>
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Create a Task" icon="plus" href="/mission-control/tasks">
|
||||
Trigger your Agent with a prompt, tools, and rules to complete a specific job.
|
||||
|
||||
<sub>• Run manually or from your Inbox</sub><br />
|
||||
<sub>• Reuse and share with teammates</sub>
|
||||
</Card>
|
||||
<Card title="Set up a Workflow" icon="clock" href="/mission-control/workflows">
|
||||
Schedule recurring Tasks or connect webhooks to trigger Agents automatically.
|
||||
|
||||
<sub>• Cron or webhook-based triggers</sub><br />
|
||||
<sub>• Ideal for daily audits or status checks</sub>
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Integrations
|
||||
<Note>
|
||||
Connect Continue to your existing developer tools to power Tasks and Workflows.
|
||||
</Note>
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="GitHub" icon="github" href="/mission-control/integrations/github">
|
||||
Enable repository access for Agents to read and create PRs.
|
||||
</Card>
|
||||
<Card title="Slack" icon="slack" href="/mission-control/integrations/slack-agent">
|
||||
Mention <code>@Continue</code> in Slack to trigger Agents and receive updates.
|
||||
</Card>
|
||||
<Card title="Sentry" icon="alert-triangle" href="/mission-control/integrations/sentry">
|
||||
Automatically generate PRs to fix new issues from Sentry alerts.
|
||||
</Card>
|
||||
<Card title="Snyk" icon="shield-check" href="/mission-control/integrations/snyk">
|
||||
Detect and fix security vulnerabilities automatically.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
|
||||
## Continue CLI
|
||||
|
||||
<Info>Terminal-native AI coding assistance with TUI and headless modes.</Info>
|
||||
<Note>Terminal-native AI coding assistance with TUI and headless modes.</Note>
|
||||
|
||||
<CodeGroup>
|
||||
|
||||
|
|
@ -40,7 +76,7 @@ description: "Practice Continuous AI with an open-source CLI, open-source IDE ex
|
|||
href="/cli/overview#tui-mode%3A-interactive-development"
|
||||
>
|
||||
Interactive terminal interface for development workflows
|
||||
<br />
|
||||
|
||||
<sub>• Automate builds & refactoring</sub>
|
||||
<br />
|
||||
<sub>• Pre-commit hooks & scripted fixes</sub>
|
||||
|
|
@ -53,7 +89,7 @@ description: "Practice Continuous AI with an open-source CLI, open-source IDE ex
|
|||
href="/cli/overview#headless-mode%3A-production-automation"
|
||||
>
|
||||
Automated AI coding for CI/CD and server environments
|
||||
<br />
|
||||
|
||||
<sub>• Run in CI/CD pipelines</sub>
|
||||
<br />
|
||||
<sub>• Batch processing & bulk operations</sub>
|
||||
|
|
@ -64,10 +100,10 @@ description: "Practice Continuous AI with an open-source CLI, open-source IDE ex
|
|||
|
||||
## IDE Extensions
|
||||
|
||||
<Info>
|
||||
**Complement your CLI workflow** - Rich editor integrations for interactive
|
||||
development.
|
||||
</Info>
|
||||
<Note>
|
||||
Optional IDE extensions for real-time code editing and assistance.
|
||||
</Note>
|
||||
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card
|
||||
|
|
@ -76,7 +112,6 @@ description: "Practice Continuous AI with an open-source CLI, open-source IDE ex
|
|||
href="https://marketplace.visualstudio.com/items?itemName=Continue.continue"
|
||||
>
|
||||
Install from VS Code Marketplace
|
||||
<br />
|
||||
<sub>Real-time coding assistance and refactoring</sub>
|
||||
</Card>
|
||||
<Card
|
||||
|
|
@ -85,51 +120,15 @@ description: "Practice Continuous AI with an open-source CLI, open-source IDE ex
|
|||
href="https://plugins.jetbrains.com/plugin/22707-continue-extension"
|
||||
>
|
||||
Install from JetBrains Plugin Repository
|
||||
<br />
|
||||
<sub>Autocomplete and multi-file edits</sub>
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Core Features
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Agent" icon="robot" href="/ide-extensions/agent/quick-start">
|
||||
Multi-step workflows and complex task automation
|
||||
</Card>
|
||||
<Card title="Chat" icon="messages" href="/ide-extensions/chat/quick-start">
|
||||
Ask questions and explore your codebase
|
||||
</Card>
|
||||
<Card title="Edit" icon="pen-to-square" href="/ide-extensions/edit/quick-start">
|
||||
In-place code editing without breaking flow
|
||||
</Card>
|
||||
<Card
|
||||
title="Autocomplete"
|
||||
icon="sparkles"
|
||||
href="/ide-extensions/autocomplete/quick-start"
|
||||
>
|
||||
Inline AI suggestions as you type
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Configuration
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Models" icon="brain" href="/customization/models">
|
||||
Connect your preferred AI models
|
||||
</Card>
|
||||
<Card title="Rules" icon="shield" href="/customization/rules">
|
||||
Configure AI behavior and constraints
|
||||
</Card>
|
||||
<Card title="MCPs" icon="wrench" href="/customization/mcp-tools">
|
||||
Extend functionality with MCP tools
|
||||
<sub>Community supported for autocomplete and multi-file edits</sub>
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Resources
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Continue Hub" icon="globe" href="https://hub.continue.dev/">
|
||||
Community models, rules, and tools
|
||||
<Card title="Continue Mission Control" icon="globe" href="https://hub.continue.dev/">
|
||||
Create your agents, run tasks, add workflows and integrations
|
||||
</Card>
|
||||
<Card
|
||||
title="GitHub Discussions"
|
||||
|
|
@ -139,10 +138,10 @@ description: "Practice Continuous AI with an open-source CLI, open-source IDE ex
|
|||
Get help from the community
|
||||
</Card>
|
||||
<Card
|
||||
title="CLI Examples"
|
||||
icon="code-branch"
|
||||
href="/guides/overview#continuous-ai"
|
||||
title="Integrations"
|
||||
icon="plug"
|
||||
href="/mission-control/integrations"
|
||||
>
|
||||
TUI and headless workflow examples
|
||||
Connect GitHub, Slack, Sentry, and Snyk to power your automations.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "How to Create a Config"
|
||||
description: "Learn how to create custom AI coding configs in Continue Hub by remixing existing configs or building new ones from scratch with reusable blocks and YAML configuration."
|
||||
description: "Learn how to create custom AI coding configs in Continue Mission Control by remixing existing configs or building new ones from scratch with reusable blocks and YAML configuration."
|
||||
sidebarTitle: "Create a Config"
|
||||
---
|
||||
|
||||
|
|
@ -3,9 +3,9 @@ title: "How to Edit a Config"
|
|||
description: "New versions of a config can be created and published using the sidebar."
|
||||
---
|
||||
|
||||
First, select a config either from the Hub search or one that you've installed.
|
||||
First, select a config either from Mission Control search or one that you've installed.
|
||||
|
||||
While editing a config, you can explore the hub and click "+" to add it to your config.
|
||||
While editing a config, you can explore Mission Control and click "+" to add it to your config.
|
||||
|
||||
For tools or models that require secret values like API keys, you will see a small notification on its tile that will indicate if action is needed.
|
||||
|
||||
|
|
@ -4,6 +4,10 @@ description: "Custom configuration options include Models, MCP Servers, Rules, P
|
|||
sidebarTitle: "Configs"
|
||||
---
|
||||
|
||||
<Info>
|
||||
**New UI Update: The Hub is now Mission Control.**
|
||||
If you're returning after the redesign, you can now find and manage configs in your [Mission Control Settings](https://hub.continue.dev/settings/configs).
|
||||
</Info>
|
||||
|
||||
## What Are Configs?
|
||||
|
||||
|
|
@ -70,7 +74,7 @@ You can interact with configs in three main ways:
|
|||
|
||||
<Step title="Explore existing configs">
|
||||
|
||||
Browse the [Continue Hub](https://hub.continue.dev/?type=assistants) to see what configs others have built
|
||||
Browse the [Continue Mission Control](https://hub.continue.dev/explore?type=assistants) to see what configs others have built
|
||||
|
||||
</Step>
|
||||
|
||||
|
|
@ -96,6 +100,5 @@ You can interact with configs in three main ways:
|
|||
|
||||
## Config Format
|
||||
|
||||
All configs follow the [`config.yaml`](/reference) format, whether you're using the hub interface or editing files locally. This ensures consistency between hub-managed and local configurations.
|
||||
|
||||
All configs follow the [`config.yaml`](/reference) format, whether you're using Mission Control interface or editing files locally. This ensures consistency between Mission Control-managed and local configurations.
|
||||
|
||||
|
|
@ -5,7 +5,7 @@ description: "Learn how to add and use a custom configuration in Continue, inclu
|
|||
|
||||
## Steps to use a custom configuration in Continue
|
||||
|
||||
Once you've found the configuration you want to use on Continue Hub:
|
||||
Once you've found the configuration you want to use on Continue Mission Control:
|
||||
|
||||
1. Click “Add Config” on its page
|
||||
2. Add any required inputs (e.g. secrets like API keys)
|
||||
|
|
@ -5,7 +5,7 @@ description: "To Create an Organization, click the organization selector in the
|
|||
|
||||

|
||||
|
||||
1. Choose a name, which will be used as the display name for your organization throughout the hub
|
||||
1. Choose a name, which will be used as the display name for your organization throughout Mission Control
|
||||
2. Add a slug, which will be used for your org URL and as the prefix to all organization configuration slugs
|
||||
3. Select an icon for your organization using the image uploader
|
||||
4. Finally, add a Biography, which will be displayed on your org Home Page
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Pricing"
|
||||
description: "Continue Hub pricing plans for individuals, teams, and enterprises, including the Models Add-On that provides access to frontier AI models for a flat monthly fee"
|
||||
description: "Continue Mission Control pricing plans for individuals, teams, and enterprises, including the Models Add-On that provides access to frontier AI models for a flat monthly fee"
|
||||
---
|
||||
|
||||
## Solo
|
||||
125
docs/mission-control/index.mdx
Normal file
125
docs/mission-control/index.mdx
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
---
|
||||
title: "Continue Mission Control"
|
||||
description: "Your command center for Continue. Create Tasks, set up Workflows, manage Agents, connect Integrations, and share with your team—all in one place."
|
||||
sidebarTitle: "Overview"
|
||||
---
|
||||
|
||||
## What You Can Do in Mission Control
|
||||
|
||||
Mission Control is where developers and teams use Continue to power everyday coding workflows. From quick one-off Tasks to fully automated pipelines, everything starts here.
|
||||
|
||||
<CardGroup cols={4}>
|
||||
<Card title="Create & Run Tasks" icon="list" href="/mission-control/tasks">
|
||||
Trigger your AI Agents and review or approve the results.
|
||||
</Card>
|
||||
<Card title="Manage Your Agents" icon="robot" href="/agents/intro">
|
||||
Create, configure, and monitor your custom Agents across repositories.
|
||||
</Card>
|
||||
<Card title="Set Up Workflows" icon="clock" href="/mission-control/workflows">
|
||||
Schedule recurring Tasks, connect webhooks to trigger Agents automatically, or add
|
||||
</Card>
|
||||
<Card title="Connect Integrations" icon="plug" href="/mission-control/integrations">
|
||||
Link GitHub, Slack, and Sentry to power your Tasks and Workflows.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Monitoring & Insights
|
||||
|
||||
<Info>
|
||||
Track performance, share configurations across your organization, and monitor agent activity in real time.
|
||||
</Info>
|
||||
|
||||
<CardGroup cols={3}>
|
||||
|
||||
<Card title="Metrics" icon="chart-column" href="/mission-control/metrics">
|
||||
Measure success rates, PR activity, and intervention trends across Agents.
|
||||
</Card>
|
||||
|
||||
<Card title="Organization Sharing" icon="users" href="/mission-control/governance/org-permissions">
|
||||
Share Agents and Workflows with teammates using built-in access controls.
|
||||
</Card>
|
||||
|
||||
<Card title="Agent Monitoring" icon="radar" href="/agents/overview#monitoring">
|
||||
View active runs, logs, and outcomes for every Agent session.
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
---
|
||||
|
||||
|
||||
## Components Behind Mission Control
|
||||
|
||||
Mission Control uses your configured components to power Agents, Tasks, and Workflows:
|
||||
Agents are built from reusable components that you can create, share, and customize:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
||||
<Card title="Models" icon="cube">
|
||||
|
||||
Large Language Models from various providers (OpenAI, Anthropic, etc.) configured for specific roles like chat, autocomplete, or editing
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="MCPs" icon="wrench">
|
||||
|
||||
Model Context Protocol servers that provide tools and capabilities like database access, web search, or custom functions
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="Rules" icon="shield">
|
||||
|
||||
Guidelines that shape AI behavior - coding standards, constraints, or specific instructions for your domain
|
||||
|
||||
</Card>
|
||||
|
||||
<Card title="Prompts" icon="message-square">
|
||||
|
||||
Reusable instructions for common tasks, optimized for specific workflows or coding patterns
|
||||
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
|
||||
<Tip>
|
||||
|
||||
Components are the building blocks for agents that you can create new or remix from an existing component. When you create a component in mission control, it becomes available according to the permissions you set: Personal, Public, or Organization.
|
||||
|
||||
</Tip>
|
||||
|
||||
|
||||
<Accordion title="Component Inputs">
|
||||
|
||||
Some components can receive values, including secrets, as inputs through templating. For values that the user needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their agent or config.
|
||||
|
||||
<Info>
|
||||
**Choosing between `secrets.` and `inputs.`**
|
||||
|
||||
When creating components for your Agent:
|
||||
- Use `${{ inputs.INPUT_NAME }}` in your definition when you want users to be able to customize which secret is used
|
||||
- Users will then map their own secrets using `${{ secrets.SECRET_NAME }}` in the `with` clause
|
||||
|
||||
For personal or single-use configurations, you can skip the inputs layer and reference `${{ secrets.SECRET_NAME }}` directly.
|
||||
</Info>
|
||||
</Accordion>
|
||||
|
||||
---
|
||||
## Get Started
|
||||
<Frame>
|
||||
|
||||
|
||||
<CardGroup cols={3}>
|
||||
|
||||
<Card title="Create a Task" icon="plus" href="https://hub.continue.dev">
|
||||
Start with a prompt and run an Agent on demand.
|
||||
</Card>
|
||||
|
||||
<Card title="Build a Workflow" icon="clock" href="https://hub.continue.dev/workflows">
|
||||
Automate your Tasks using cron schedules or webhooks.
|
||||
</Card>
|
||||
|
||||
<Card title="Add Integrations" icon="workflow" href="https://hub.continue.dev/integrations">
|
||||
Connect GitHub, Slack, and Sentry to extend your Agents.
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
</Frame>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue