diff --git a/.github/workflows/run-continue-agent.yml b/.github/workflows/run-continue-agent.yml index c98cf963a..6194838fe 100644 --- a/.github/workflows/run-continue-agent.yml +++ b/.github/workflows/run-continue-agent.yml @@ -4,14 +4,15 @@ on: workflow_call: inputs: prompt: - description: "The prompt to send to the Continue agent" - required: true - type: string - config: - description: "The config to use (e.g., continuedev/default-background-agent)" + description: "Additional prompting to send to the Continue agent" required: false type: string - default: "continuedev/default-background-agent" + default: "" + agent: + description: "The agent to use (e.g., continuedev/github-pr-agent)" + required: true + type: string + default: "continuedev/github-pr-agent" branch_name: description: "The base branch name to work from" required: false @@ -33,7 +34,7 @@ jobs: -H "Authorization: Bearer ${{ secrets.CONTINUE_API_KEY }}" \ -d '{ "prompt": "${{ inputs.prompt }}", - "config": "${{ inputs.config }}", + "agent": "${{ inputs.agent }}", "branchName": "${{ inputs.branch_name }}", "repoUrl": "https://github.com/${{ github.repository }}" }') diff --git a/.github/workflows/tidy-up-codebase.yml b/.github/workflows/tidy-up-codebase.yml index 729998a28..dc70faaaa 100644 --- a/.github/workflows/tidy-up-codebase.yml +++ b/.github/workflows/tidy-up-codebase.yml @@ -10,8 +10,7 @@ jobs: run-cn-task: uses: ./.github/workflows/run-continue-agent.yml with: - prompt: "Review every Markdown documentation file and verify that descriptions, examples, or behavior outlines accurately reflect the current code. Only update documentation; do not modify code. Check the corresponding code to confirm behavior before making changes. Correct any inaccuracies or outdated information in descriptions, examples, or behavior outlines. Preserve existing Markdown formatting, style, and structure. Do not add new sections, speculative explanations, or details not present in the code. Only update statements that are clearly incorrect or misleading; do not rewrite text for style or preference. Keep edits minimal and focused, ensuring that the Markdown matches what the code actually does. If verification against the code is ambiguous, leave the documentation unchanged. Use branch name bot/cleanup--" - config: continuedev/default-background-agent + agent: continuedev/tidy-up-markdown-agent branch_name: main secrets: CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} diff --git a/docs/guides/cli.mdx b/docs/guides/cli.mdx index d3584f883..0f8694d98 100644 --- a/docs/guides/cli.mdx +++ b/docs/guides/cli.mdx @@ -54,7 +54,7 @@ echo "$(git diff) Generate a conventional commit name for the current git change `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`). +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-config` or `cn --config ~/.continue/config.yaml`). ### How to Add Custom Models diff --git a/extensions/cli/spec/config-loading.md b/extensions/cli/spec/config-loading.md index 0f474b5a7..9df4f57e8 100644 --- a/extensions/cli/spec/config-loading.md +++ b/extensions/cli/spec/config-loading.md @@ -37,7 +37,7 @@ This document specifies the behavior of the CLI's configuration loading system, 3. **Default Resolution** (if no flag and no saved URI) - **Authenticated**: First user assistant from `listAssistants()` - **config.yaml**: The saved config file at `~/.continue/config.yaml` - - **Unauthenticated**: Falls back to `continuedev/default-agent` + - **Unauthenticated**: Falls back to `continuedev/default-config` ## Authentication State Interactions @@ -61,7 +61,7 @@ This document specifies the behavior of the CLI's configuration loading system, **Available Options:** - Local YAML files only -- Default assistant (`continuedev/default-agent`) +- Default assistant (`continuedev/default-config`) **Behavior:** @@ -121,7 +121,7 @@ This document specifies the behavior of the CLI's configuration loading system, **No User Assistants:** - Authenticated user has no personal assistants -- **Result**: Falls back to `continuedev/default-agent` +- **Result**: Falls back to `continuedev/default-config` **Default Agent Unavailable:** diff --git a/extensions/cli/src/configLoader.ts b/extensions/cli/src/configLoader.ts index 34ab3e358..eef67ee13 100644 --- a/extensions/cli/src/configLoader.ts +++ b/extensions/cli/src/configLoader.ts @@ -36,8 +36,8 @@ export type ConfigSource = | { type: "cli-flag"; path: string } | { type: "saved-uri"; uri: string } | { type: "user-assistant"; slug: string } - | { type: "default-config-yaml" } - | { type: "default-agent" } + | { type: "local-config-yaml" } + | { type: "remote-default-config" } | { type: "no-config" }; /** @@ -124,16 +124,16 @@ function determineConfigSource( // Priority 3: Default resolution based on auth state if (authConfig === null) { - // Unauthenticated: check for default config.yaml, then fallback to default agent + // Unauthenticated: check for default config.yaml, then fallback to default config const defaultConfigPath = path.join(env.continueHome, "config.yaml"); if (fs.existsSync(defaultConfigPath)) { - return { type: "default-config-yaml" }; + return { type: "local-config-yaml" }; } - return { type: "default-agent" }; + return { type: "remote-default-config" }; } else { // In headless, user assistant fallback behavior isn't supported if (isHeadless) { - return { type: "default-agent" }; + return { type: "remote-default-config" }; } // Authenticated: try user assistants first return { type: "user-assistant", slug: "" }; // Empty slug means "first available" @@ -178,16 +178,16 @@ async function loadFromSource( injectBlocks, ); - case "default-config-yaml": - return await loadDefaultConfigYaml( + case "local-config-yaml": + return await loadLocalConfigYaml( accessToken, organizationId, apiClient, injectBlocks, ); - case "default-agent": - return await loadDefaultAgent( + case "remote-default-config": + return await loadDefaultConfig( organizationId, apiClient, accessToken, @@ -214,7 +214,7 @@ async function loadFromSource( "Failed to load user assistants, falling back to default agent", ), ); - return await loadDefaultAgent( + return await loadDefaultConfig( organizationId, apiClient, accessToken, @@ -334,7 +334,7 @@ async function loadUserAssistantWithFallback( } // No user assistants, fall back to default agent - return await loadDefaultAgent( + return await loadDefaultConfig( organizationId, apiClient, accessToken, @@ -345,7 +345,7 @@ async function loadUserAssistantWithFallback( /** * Loads default config.yaml from ~/.continue/config.yaml */ -async function loadDefaultConfigYaml( +async function loadLocalConfigYaml( accessToken: string | null, organizationId: string | null, apiClient: DefaultApiInterface, @@ -362,9 +362,9 @@ async function loadDefaultConfigYaml( } /** - * Loads the default continuedev/default-agent + * Loads the default continuedev/default-config */ -async function loadDefaultAgent( +async function loadDefaultConfig( organizationId: string | null, apiClient: DefaultApiInterface, accessToken: string | null, @@ -372,7 +372,7 @@ async function loadDefaultAgent( ): Promise { const resp = await apiClient.getAssistant({ ownerSlug: "continuedev", - packageSlug: "default-agent", + packageSlug: "default-config", organizationId: organizationId ?? undefined, }); @@ -582,7 +582,7 @@ function getUriFromSource(source: ConfigSource): string | null { : `slug://${source.path}`; case "saved-uri": return source.uri; - case "default-config-yaml": + case "local-config-yaml": return `file://${path.join(env.continueHome, "config.yaml")}`; default: return null; diff --git a/extensions/cli/src/e2e/local-config-switching.test.tsx b/extensions/cli/src/e2e/local-config-switching.test.tsx index b82ee3e88..a280cb129 100644 --- a/extensions/cli/src/e2e/local-config-switching.test.tsx +++ b/extensions/cli/src/e2e/local-config-switching.test.tsx @@ -11,7 +11,7 @@ describe("Local Config Switching Investigation", () => { "/absolute/path/to/config.yaml", ], remoteAssistantSlugs: [ - "continuedev/default-agent", + "continuedev/default-config", "myorg/custom-assistant", "user/my-assistant", ], @@ -43,14 +43,14 @@ describe("Local Config Switching Investigation", () => { const problemScenarios = [ { name: "Remote to Remote switching", - from: "continuedev/default-agent", + from: "continuedev/default-config", to: "myorg/custom-assistant", works: true, reason: "Both are assistant slugs, normal flow works", }, { name: "Remote to Local switching", - from: "continuedev/default-agent", + from: "continuedev/default-config", to: "~/.continue/config.yaml", works: false, // This is the reported issue reason: "UNKNOWN - this is what we need to debug", @@ -58,7 +58,7 @@ describe("Local Config Switching Investigation", () => { { name: "Local to Remote switching", from: "~/.continue/config.yaml", - to: "continuedev/default-agent", + to: "continuedev/default-config", works: false, // Likely also broken reason: "UNKNOWN - probably same root cause", }, diff --git a/extensions/cli/src/services/ConfigService.test.ts b/extensions/cli/src/services/ConfigService.test.ts index fb7b250d8..be1e03010 100644 --- a/extensions/cli/src/services/ConfigService.test.ts +++ b/extensions/cli/src/services/ConfigService.test.ts @@ -107,7 +107,7 @@ describe("ConfigService", () => { test("should initialize with undefined config path", async () => { vi.mocked(configLoader.loadConfiguration).mockResolvedValue({ config: mockConfig as any, - source: { type: "default-agent" } as any, + source: { type: "remote-default-config" } as any, }); const state = await service.doInitialize({ @@ -257,7 +257,7 @@ describe("ConfigService", () => { // Initialize without config path vi.mocked(configLoader.loadConfiguration).mockResolvedValue({ config: mockConfig as any, - source: { type: "default-agent" } as any, + source: { type: "remote-default-config" } as any, }); await service.doInitialize({ authConfig: { accessToken: "token" } as any, diff --git a/extensions/cli/src/services/MCPService.test.ts b/extensions/cli/src/services/MCPService.test.ts index f61be6946..3a9f19576 100644 --- a/extensions/cli/src/services/MCPService.test.ts +++ b/extensions/cli/src/services/MCPService.test.ts @@ -36,7 +36,7 @@ describe("MCPService", () => { beforeEach(() => { mcpService = new MCPService(); mockAssistant = { - name: "test-assistant", + name: "Test Config", version: "1.0.0", mcpServers: [ { @@ -196,7 +196,7 @@ describe("MCPService", () => { it("should default to stdio transport when type is not specified", async () => { const defaultAssistant: AssistantConfig = { - name: "default-assistant", + name: "Default Config", version: "1.0.0", mcpServers: [ { diff --git a/extensions/cli/vitest.setup.ts b/extensions/cli/vitest.setup.ts index 2dcf0f8d0..5b6c80007 100644 --- a/extensions/cli/vitest.setup.ts +++ b/extensions/cli/vitest.setup.ts @@ -13,15 +13,15 @@ global.fetch = vi .mockImplementation(async (url: string | URL, ...args) => { const urlString = url.toString(); - // Mock the default-agent API call - if (urlString.includes("get-assistant/continuedev/default-agent")) { + // Mock the default-config API call + if (urlString.includes("get-assistant/continuedev/default-config")) { return { ok: true, status: 200, json: async () => ({ configResult: { config: { - name: "Default Agent", + name: "Default Config", version: "0.0.1", schema: "v1", models: [