Elffuss BraidHub

kikocis/continue public

Merge branch 'main' of https://github.com/continuedev/continue into dallin/llm-info-publish
Changeset3a1e5cc69df2ffcb3ec39cd987784a276f8a6326c5f37fc437216690be5ffe79
AuthorDallin Romney <dallinromney@gmail.com> · 2025-09-25 15:47 -07:00
CommitterDallin Romney <dallinromney@gmail.com> · 2025-09-25 15:47 -07:00
Parents0cbdfa622ced, f636b4841cdd

Browse the files at this changeset

29 files changed

deleted .github/workflows/respond-to-cubic.yaml +0 −302
@@ -1,302 +0,0 @@
1-name: Respond to @continuedev Comments
2-
3-on:
4- issue_comment:
5- types: [created]
6- pull_request_review_comment:
7- types: [created]
8-
9-permissions:
10- contents: write
11- pull-requests: write
12- issues: write
13-
14-jobs:
15- respond-to-comment:
16- # Only run on pull request comments
17- if: github.event_name == 'issue_comment' && github.event.issue.pull_request
18- runs-on: ubuntu-latest
19-
20- steps:
21- - name: Check if comment contains @continuedev
22- id: check-mention
23- run: |
24- # Create a temporary file to safely handle comment body with special characters
25- cat > /tmp/comment.txt << 'COMMENT_EOF'
26- ${{ github.event.comment.body }}
27- COMMENT_EOF
28-
29- if grep -q "@continuedev" /tmp/comment.txt; then
30- echo "contains_mention=true" >> $GITHUB_OUTPUT
31- else
32- echo "contains_mention=false" >> $GITHUB_OUTPUT
33- fi
34-
35- - name: Add eyes reaction to comment
36- if: steps.check-mention.outputs.contains_mention == 'true'
37- uses: actions/github-script@v8
38- with:
39- script: |
40- await github.rest.reactions.createForIssueComment({
41- owner: context.repo.owner,
42- repo: context.repo.repo,
43- comment_id: ${{ github.event.comment.id }},
44- content: 'eyes'
45- });
46-
47- - name: Checkout PR branch
48- if: steps.check-mention.outputs.contains_mention == 'true'
49- uses: actions/checkout@v5
50- with:
51- token: ${{ secrets.GITHUB_TOKEN }}
52- fetch-depth: 0
53-
54- - name: Get PR information
55- if: steps.check-mention.outputs.contains_mention == 'true'
56- id: pr-info
57- uses: actions/github-script@v8
58- with:
59- script: |
60- const { data: pr } = await github.rest.pulls.get({
61- owner: context.repo.owner,
62- repo: context.repo.repo,
63- pull_number: context.issue.number
64- });
65-
66- core.setOutput('head_ref', pr.head.ref);
67- core.setOutput('head_sha', pr.head.sha);
68- return pr;
69-
70- - name: Checkout PR branch
71- if: steps.check-mention.outputs.contains_mention == 'true'
72- run: |
73- git checkout ${{ steps.pr-info.outputs.head_ref }}
74-
75- - name: Setup Node.js
76- if: steps.check-mention.outputs.contains_mention == 'true'
77- uses: actions/setup-node@v5
78- with:
79- node-version: "20"
80-
81- - name: Install Continue CLI globally
82- if: steps.check-mention.outputs.contains_mention == 'true'
83- run: npm i -g @continuedev/cli
84-
85- - name: Start remote session
86- if: steps.check-mention.outputs.contains_mention == 'true'
87- id: remote-session
88- env:
89- CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
90- run: |
91- # Create a temporary file for the prompt to handle special characters and newlines properly
92- cat > /tmp/prompt.txt << 'PROMPT_EOF'
93- Please help with the following request from @${{ github.event.comment.user.login }} on PR #${{ github.event.issue.number }}:
94-
95- ${{ github.event.comment.body }}
96-
97- Please analyze the current PR, understand the request, implement the necessary changes, and commit them to this branch.
98- PROMPT_EOF
99-
100- # Debug output
101- echo "PROMPT content:"
102- cat /tmp/prompt.txt
103-
104- # Start remote session and capture JSON output
105- echo "Starting cn with prompt..."
106- SESSION_OUTPUT=$(cat /tmp/prompt.txt | cn remote -s --config continuedev/address-code-review --branch ${{ steps.pr-info.outputs.head_ref }})
107- echo "Raw session output: $SESSION_OUTPUT"
108-
109- # Extract URL from JSON output
110- SESSION_URL=$(echo "$SESSION_OUTPUT" | jq -r '.url // empty')
111-
112- if [ -z "$SESSION_URL" ] || [ "$SESSION_URL" = "null" ]; then
113- echo "Failed to extract session URL from output: $SESSION_OUTPUT"
114- exit 1
115- fi
116-
117- echo "session_url=$SESSION_URL" >> $GITHUB_OUTPUT
118- echo "✅ Started remote session: $SESSION_URL"
119-
120- - name: Comment with session URL
121- if: steps.check-mention.outputs.contains_mention == 'true' && steps.remote-session.outputs.session_url
122- uses: actions/github-script@v8
123- env:
124- ORIGINAL_COMMENT: ${{ github.event.comment.body }}
125- with:
126- script: |
127- const sessionUrl = '${{ steps.remote-session.outputs.session_url }}';
128- const originalComment = process.env.ORIGINAL_COMMENT;
129- const commentBody = "I've started [a remote session](" + sessionUrl + ") to help with your request:\n> " + originalComment;
130-
131- await github.rest.issues.createComment({
132- owner: context.repo.owner,
133- repo: context.repo.repo,
134- issue_number: context.issue.number,
135- body: commentBody
136- });
137-
138- - name: Log session details
139- if: steps.check-mention.outputs.contains_mention == 'true'
140- run: |
141- echo "✅ Successfully started remote session for comment from ${{ github.event.comment.user.login }} on PR #${{ github.event.issue.number }}"
142- echo "Session URL: ${{ steps.remote-session.outputs.session_url }}"
143- echo "Original comment:"
144- cat /tmp/comment.txt
145-
146- respond-to-review-comment:
147- # Only run on pull request review comments
148- if: github.event_name == 'pull_request_review_comment'
149- runs-on: ubuntu-latest
150-
151- steps:
152- - name: Check if comment contains @continuedev
153- id: check-mention
154- run: |
155- # Create a temporary file to safely handle comment body with special characters
156- cat > /tmp/review_comment.txt << 'COMMENT_EOF'
157- ${{ github.event.comment.body }}
158- COMMENT_EOF
159-
160- if grep -q "@continuedev" /tmp/review_comment.txt; then
161- echo "contains_mention=true" >> $GITHUB_OUTPUT
162- else
163- echo "contains_mention=false" >> $GITHUB_OUTPUT
164- fi
165-
166- - name: Add eyes reaction to comment
167- if: steps.check-mention.outputs.contains_mention == 'true'
168- uses: actions/github-script@v8
169- with:
170- script: |
171- await github.rest.reactions.createForPullRequestReviewComment({
172- owner: context.repo.owner,
173- repo: context.repo.repo,
174- comment_id: ${{ github.event.comment.id }},
175- content: 'eyes'
176- });
177-
178- - name: Checkout PR branch
179- if: steps.check-mention.outputs.contains_mention == 'true'
180- uses: actions/checkout@v5
181- with:
182- token: ${{ secrets.GITHUB_TOKEN }}
183- fetch-depth: 0
184- ref: ${{ github.event.pull_request.head.ref }}
185-
186- - name: Setup Node.js
187- if: steps.check-mention.outputs.contains_mention == 'true'
188- uses: actions/setup-node@v5
189- with:
190- node-version: "20"
191-
192- - name: Install Continue CLI globally
193- if: steps.check-mention.outputs.contains_mention == 'true'
194- run: npm i -g @continuedev/cli
195-
196- - name: Get review context
197- if: steps.check-mention.outputs.contains_mention == 'true'
198- id: review-context
199- uses: actions/github-script@v8
200- with:
201- script: |
202- let reviewContext = '';
203-
204- // Check if this comment is a reply to another review comment
205- if (context.payload.comment.in_reply_to_id) {
206- try {
207- const { data: originalComment } = await github.rest.pulls.getReviewComment({
208- owner: context.repo.owner,
209- repo: context.repo.repo,
210- comment_id: context.payload.comment.in_reply_to_id
211- });
212-
213- reviewContext = `**Original review comment by @${originalComment.user.login}:**
214- ${originalComment.body}
215-
216- **Reply by @${{ github.event.comment.user.login }}:**
217- ${{ github.event.comment.body }}`;
218- } catch (error) {
219- console.log('Could not fetch original comment, using current comment only');
220- reviewContext = `**Review comment by @${{ github.event.comment.user.login }}:**
221- ${{ github.event.comment.body }}`;
222- }
223- } else {
224- reviewContext = `**Review comment by @${{ github.event.comment.user.login }}:**
225- ${{ github.event.comment.body }}`;
226- }
227-
228- core.setOutput('context', reviewContext);
229-
230- - name: Start remote session
231- if: steps.check-mention.outputs.contains_mention == 'true'
232- id: remote-session
233- env:
234- CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
235- run: |
236- # Debug: Echo the branch we're starting the session on
237- echo "Starting remote session on branch: ${{ github.event.pull_request.head.ref }}"
238-
239- # Create a temporary file for the prompt to handle special characters and newlines properly
240- cat > /tmp/prompt.txt << 'PROMPT_EOF'
241- Please help with the following code review discussion from PR #${{ github.event.pull_request.number }}:
242-
243- **File:** ${{ github.event.comment.path }}
244- **Line:** ${{ github.event.comment.line || github.event.comment.original_line || 'N/A' }}
245-
246- ${{ steps.review-context.outputs.context }}
247-
248- Please analyze the specific file and line mentioned, understand the review feedback and any discussion context, implement the necessary changes, and commit them to this branch.
249- PROMPT_EOF
250-
251- # Debug output
252- echo "PROMPT content:"
253- cat /tmp/prompt.txt
254-
255- # Start remote session and capture JSON output
256- echo "Starting cn with prompt..."
257- SESSION_OUTPUT=$(cat /tmp/prompt.txt | cn remote -s --config continuedev/address-code-review --branch ${{ github.event.pull_request.head.ref }})
258- echo "Raw session output: $SESSION_OUTPUT"
259-
260- # Extract URL from JSON output
261- SESSION_URL=$(echo "$SESSION_OUTPUT" | jq -r '.url // empty')
262-
263- if [ -z "$SESSION_URL" ] || [ "$SESSION_URL" = "null" ]; then
264- echo "Failed to extract session URL from output: $SESSION_OUTPUT"
265- exit 1
266- fi
267-
268- echo "session_url=$SESSION_URL" >> $GITHUB_OUTPUT
269- echo "✅ Started remote session: $SESSION_URL"
270-
271- - name: Comment with session URL
272- if: steps.check-mention.outputs.contains_mention == 'true' && steps.remote-session.outputs.session_url
273- uses: actions/github-script@v8
274- env:
275- ORIGINAL_COMMENT: ${{ github.event.comment.body }}
276- with:
277- script: |
278- const sessionUrl = '${{ steps.remote-session.outputs.session_url }}';
279- const originalComment = process.env.ORIGINAL_COMMENT;
280- const commentBody = "I've started [a remote session](" + sessionUrl + ") to help with your request:\n> " + originalComment;
281-
282- const commentParams = {
283- owner: context.repo.owner,
284- repo: context.repo.repo,
285- pull_number: ${{ github.event.pull_request.number }},
286- body: commentBody,
287- commit_id: '${{ github.event.pull_request.head.sha }}',
288- path: '${{ github.event.comment.path }}',
289- in_reply_to: ${{ github.event.comment.id }}
290- };
291-
292- await github.rest.pulls.createReviewComment(commentParams);
293-
294- - name: Log session details
295- if: steps.check-mention.outputs.contains_mention == 'true'
296- run: |
297- echo "✅ Successfully started remote session for review comment from ${{ github.event.comment.user.login }} on PR #${{ github.event.pull_request.number }}"
298- echo "Session URL: ${{ steps.remote-session.outputs.session_url }}"
299- echo "File: ${{ github.event.comment.path }}"
300- echo "Line: ${{ github.event.comment.line }}"
301- echo "Original comment:"
302- cat /tmp/review_comment.txt
modified core/config/markdown/utils.ts +10 −4
@@ -4,6 +4,15 @@
44 } from "@continuedev/config-yaml";
55 import { joinPathsToUri } from "../../util/uri";
66
7+function createRelativeRuleFilePathParts(ruleName: string): string[] {
8+ const safeRuleName = sanitizeRuleName(ruleName);
9+ return [".continue", "rules", `${safeRuleName}.${RULE_FILE_EXTENSION}`];
10+}
11+
12+export function createRelativeRuleFilePath(ruleName: string): string {
13+ return createRelativeRuleFilePathParts(ruleName).join("/");
14+}
15+
716 /**
817 * Creates the file path for a rule in the workspace .continue/rules directory
918 */
@@ -11,11 +20,8 @@
1120 workspaceDir: string,
1221 ruleName: string,
1322 ): string {
14- const safeRuleName = sanitizeRuleName(ruleName);
1523 return joinPathsToUri(
1624 workspaceDir,
17- ".continue",
18- "rules",
19- `${safeRuleName}.${RULE_FILE_EXTENSION}`,
25+ ...createRelativeRuleFilePathParts(ruleName),
2026 );
2127 }
modified core/llm/index.ts +1 −1
@@ -213,7 +213,7 @@
213213 this.providerName === "continue-proxy"
214214 ? this.model?.split("/").pop() || this.model
215215 : this.model;
216- const llmInfo = findLlmInfo(modelSearchString);
216+ const llmInfo = findLlmInfo(modelSearchString, this.underlyingProviderName);
217217
218218 const templateType =
219219 options.template ?? autodetectTemplateType(options.model);
modified core/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

added docs/cli/install.mdx +134 −0
@@ -0,0 +1,134 @@
1+---
2+title: "Install Continue CLI"
3+description: "Get Continue CLI installed and configured for command-line AI coding assistance and automation"
4+sidebarTitle: "Install"
5+---
6+
7+<Info>
8+ Make sure you have [Node.js 18 or higher
9+ installed](https://nodejs.org/en/download/).
10+</Info>
11+
12+## Installation
13+
14+Install Continue CLI globally using npm:
15+
16+```bash
17+npm i -g @continuedev/cli
18+```
19+
20+## Two Ways to Use Continue CLI
21+
22+<Info>
23+ **Quick Overview**: Continue CLI works in two modes - TUI for interactive
24+ conversations or headless for automated commands.
25+</Info>
26+
27+<Tabs>
28+<Tab title="TUI Mode">
29+**Interactive development sessions**
30+
31+Start a conversation with AI in your terminal:
32+
33+```bash
34+cn
35+> @src/app.js Generate unit tests for this component
36+```
37+
38+Perfect for exploration, debugging, and iterative development.
39+
40+</Tab>
41+
42+<Tab title="Headless Mode">
43+**Automation and scripting**
44+
45+Single commands that return results:
46+
47+```bash
48+cn -p "Generate a commit message for current changes"
49+cn -p "Review the last 5 commits for issues"
50+```
51+
52+Perfect for CI/CD, git hooks, and automated workflows.
53+
54+</Tab>
55+</Tabs>
56+
57+## Setup
58+
59+<Tabs>
60+<Tab title="cn TUI Mode">
61+
62+For interactive development and exploration:
63+
64+<Steps>
65+<Step title="Login to Continue CLI">
66+```bash
67+cn login
68+```
69+This will open your browser to authenticate with Continue Hub.
70+</Step>
71+
72+<Step title="Test TUI Mode">
73+Start an interactive session:
74+```bash
75+cn
76+```
77+
78+Try asking a question:
79+
80+```
81+> Tell me about the CLI
82+```
83+
84+</Step>
85+</Steps>
86+</Tab>
87+<Tab title="cn Headless Mode">
88+
89+For automation workflows and scripting:
90+
91+<Steps>
92+<Step title="Get API Key for Automation">
93+For automation workflows, get an API key:
94+1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys)
95+2. Click **"+ New API Key"**
96+3. Copy the API key immediately (you won't see it again!)
97+4. Login using your Continue account
98+</Step>
99+
100+<Step title="Add Secrets for Workflows">
101+Store secure credentials for CLI workflows:
102+1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets)
103+2. Add your API keys and sensitive data
104+3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
105+</Step>
106+
107+<Step title="Test Headless Mode">
108+Try headless mode for automation:
109+```bash
110+cn -p "Generate a conventional commit message for the current git changes"
111+```
112+</Step>
113+</Steps>
114+</Tab>
115+</Tabs>
116+
117+## What's Next?
118+
119+<CardGroup cols={2}>
120+<Card title="Quick Start Guide" icon="rocket" href="/cli/quick-start">
121+ Learn basic usage with practical examples
122+</Card>
123+
124+<Card title="Create your first workflow" icon="gear" href="/guides/posthog-github-continuous-ai">
125+ Build automated workflows with Continue CLI
126+</Card>
127+</CardGroup>
128+
129+## Getting Help
130+
131+If you encounter issues:
132+
133+- Ask for help in [our discussions](https://github.com/continuedev/continue/discussions)
134+- Report bugs on [GitHub](https://github.com/continuedev/continue)
added docs/cli/overview.mdx +228 −0
@@ -0,0 +1,228 @@
1+---
2+title: "Continue CLI (cn) Overview"
3+description: "Command-line interface for automated coding tasks, scripting, and headless development workflows with Continue's AI coding capabilities"
4+sidebarTitle: "Overview"
5+---
6+
7+<Frame>
8+ <img src="/images/cn-demo.gif" />
9+</Frame>
10+
11+**Continue enables developers to ship faster with Continuous AI.**
12+
13+<Tip>
14+ Build features from descriptions. Debug and fix issues. Navigate any codebase.
15+ Automate tedious tasks.
16+</Tip>
17+
18+## Get started in 30 seconds
19+
20+Prerequisites:
21+
22+- [Node.js 18 or newer](https://nodejs.org/en/download/)
23+- A [Continue Hub](https://hub.continue.dev) account (recommended) or local configuration
24+
25+```bash npm
26+# Install Continue CLI
27+npm install -g @continuedev/cli
28+
29+# Navigate to your project
30+
31+cd your-awesome-project
32+
33+# Start coding with Continue
34+
35+cn
36+
37+# You'll be prompted to set up on first use
38+
39+```
40+
41+That's it! You're ready to start automating with Continue CLI.
42+
43+[Continue with CLI Quickstart →](/cli/quick-start)
44+
45+## Two Ways to Use Continue CLI
46+
47+Continue CLI offers two distinct modes designed for different workflows:
48+
49+### TUI Mode: Interactive Development
50+
51+**Perfect for exploration, debugging, and iterating on AI workflows**
52+
53+```bash
54+cn
55+> @src/components/UserProfile.js Review this component for security issues
56+> Generate comprehensive unit tests
57+> Suggest performance improvements
58+```
59+
60+- **Interactive conversations** with your codebase
61+- **Iterate and refine** prompts and approaches
62+- **Explore and understand** complex codebases
63+- **Perfect for experimentation** and learning
64+
65+### Headless Mode: Production Automation
66+
67+**Perfect for CI/CD, automation, and reliable workflows**
68+
69+```bash
70+cn -p "Generate a conventional commit message for staged changes"
71+cn -p "Review pull request changes for security vulnerabilities"
72+cn -p "Update documentation based on recent code changes"
73+```
74+
75+- **Single-command execution** for automation
76+- **Reliable, repeatable results** for production use
77+- **CI/CD and pipeline integration**
78+- **Git hooks and automated workflows**
79+
80+### Development Workflow: TUI → Headless
81+
82+<Tip>
83+ **Pro Tip**: Start in TUI mode to iterate on your AI agent and prompts. Once
84+ you have a workflow that works reliably, deploy it as a Continuous AI
85+ automation.
86+</Tip>
87+
88+1. **Experiment in TUI mode** to perfect your prompts and agent configuration
89+2. **Test different approaches** interactively until you get consistent results
90+3. **Convert successful workflows** to automated Continuous AI commands
91+4. **Deploy in production** with confidence in your proven approach
92+
93+## Why developers love Continue CLI
94+
95+- **Works in your terminal**: Not another chat window. Not another IDE. Continue CLI meets you where you already work, with the tools you already love.
96+- **Takes action**: Continue CLI can directly edit files, run commands, and create commits. Need more? Check out our [MCPs](/customize/deep-dives/mcp).
97+- **Automate tasks**: Create issues from PostHog data, automatically assign labels to issues, and more. Do all this in a single command from your developer machines, or automatically in CI.
98+- **Flexible development flow**: Start interactive, then automate proven workflows.
99+
100+## Key Capabilities
101+
102+### Context Engineering
103+
104+- Use `@` to reference files and provide context
105+- Use `/` to run slash commands for specific tasks
106+- Access the same context providers as IDE extensions
107+
108+### Tool Integration
109+
110+- File editing and creation
111+- Terminal command execution
112+- Codebase understanding and analysis
113+- Git integration
114+- Web search and documentation access
115+
116+### Model Flexibility
117+
118+- Switch between models with `/model` command
119+- Use any model configured in your `config.yaml`
120+- Access Continue Hub models and configurations
121+
122+## Continue Hub Integration
123+
124+Continue CLI integrates seamlessly with [Continue Hub](https://hub.continue.dev) for:
125+
126+### API Access
127+
128+Get an API key for automation workflows:
129+
130+1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys)
131+2. Create a new API key
132+3. Use with `cn login` or in your automation scripts
133+
134+### Secrets Management
135+
136+Store secure credentials for CLI workflows:
137+
138+1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets)
139+2. Add your API keys and sensitive data
140+3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
141+
142+### Configuration Sync
143+
144+- Cloud-managed configurations automatically sync
145+- Share configurations across team members
146+- Version control for your AI workflows
147+
148+## Common Use Cases
149+
150+### TUI Mode Examples
151+
152+**Interactive development and exploration:**
153+
154+<CodeGroup>
155+```bash Codebase Exploration
156+# Start interactive session
157+cn
158+> @src/components Find all unused React components
159+> /explain How does authentication work in this codebase?
160+> @auth/ What security patterns are used here?
161+```
162+
163+```bash Iterative Debugging
164+# Debug issues interactively
165+cn
166+> @tests/auth.test.js This test is failing, help me understand why
167+> @src/auth/middleware.js Let's examine this middleware
168+> /debug What could be causing the timeout error?
169+```
170+
171+```bash Workflow Development
172+# Develop and test automation workflows
173+cn
174+> @package.json @CHANGELOG.md Generate a release notes template
175+> # Test and refine the approach
176+> # Once working, convert to: cn -p "Generate release notes"
177+```
178+
179+</CodeGroup>
180+
181+### Headless Mode Examples
182+
183+**Production automation and scripting:**
184+
185+<CodeGroup>
186+```bash Git Automation
187+# Generate commit messages
188+cn -p "Generate a conventional commit message for the current changes"
189+
190+# Code review automation
191+
192+cn -p "Review the current git changes for bugs and suggest improvements"
193+
194+````
195+
196+```bash CI/CD Integration
197+# In your pipeline scripts
198+cn -p "Analyze test failures and suggest fixes"
199+
200+# Automated documentation updates
201+cn -p "@README.md Update this documentation based on recent changes"
202+````
203+
204+```bash Issue Management
205+# Create GitHub issues from PostHog data
206+cn -p "@posthog-data.json Create GitHub issues for UX problems found in this session data"
207+
208+# Automated security audits
209+cn -p "Scan the codebase for potential security vulnerabilities"
210+```
211+
212+</CodeGroup>
213+
214+## Next steps
215+
216+<CardGroup cols={3}>
217+ <Card title="CLI Quickstart" href="/cli/quick-start">
218+ Learn basic commands and common workflows
219+ </Card>
220+
221+<Card title="Installation Guide" href="/cli/install">
222+ Install Continue CLI and set up your environment
223+</Card>
224+
225+ <Card title="CLI Workflows" href="/guides/overview#continuous-ai">
226+ Task-specific tutorials and examples
227+ </Card>
228+</CardGroup>
added docs/cli/quick-start.mdx +176 −0
@@ -0,0 +1,176 @@
1+---
2+title: "Continue CLI Quick Start"
3+description: "Get hands-on experience with Continue CLI through practical examples and common use cases"
4+sidebarTitle: "Quick Start"
5+---
6+
7+Get hands-on experience with Continue CLI through practical development workflows.
8+
9+<Tabs>
10+ <Tab title="TUI Mode">
11+ TUI Mode (`cn` command) is for **large development tasks** that require
12+ agentic workflows with human oversight. Perfect for complex refactors,
13+ feature implementation, or one-off automation tasks that need monitoring and
14+ iteration.
15+ </Tab>
16+ <Tab title="Headless Mode">
17+ Headless Mode (`-p` flag) is for **reliable, repeatable tasks** that no
18+ longer need constant supervision. Perfect for CI/CD pipelines, git hooks,
19+ and automated workflows you've already tested and refined.
20+ </Tab>
21+</Tabs>
22+
23+## TUI Mode: Large Development Tasks
24+
25+Make sure you have [Continue CLI installed](/cli/install) and are in a project directory.
26+
27+### Example: Implementing a New Feature
28+
29+```bash
30+# Navigate to your project directory
31+cd your-awesome-project
32+
33+# Start TUI Mode for complex development work
34+cn
35+```
36+
37+**Example workflow for adding authentication:**
38+
39+```
40+> I need to add JWT authentication to this Express app. Let me start by showing you the current structure.
41+
42+> @src/app.js @package.json Here's my current setup. Can you implement JWT auth with middleware, login/register routes, and user model?
43+
44+> [Agent analyzes codebase and implements auth system]
45+> [You review changes, test, and provide feedback]
46+> [Agent iterates based on your input until the feature is complete]
47+```
48+
49+### Example: Complex Refactoring
50+
51+```bash
52+cn
53+```
54+
55+**Refactoring a monolithic component:**
56+
57+```
58+> @src/components/Dashboard.jsx This component is 800 lines and does too much. Help me break it into smaller, reusable components.
59+
60+> [Agent analyzes component structure]
61+> [Proposes component breakdown strategy]
62+> [You approve approach]
63+> [Agent implements the refactor with proper props and state management]
64+> [You test and request adjustments]
65+```
66+
67+### When to Use TUI Mode
68+
69+✅ **Large development tasks** that need oversight
70+✅ **Complex refactors** requiring multiple steps
71+✅ **New feature implementation** with unknowns
72+✅ **One-off automation tasks** you haven't done before
73+✅ **Debugging complex issues** that need exploration
74+
75+## Headless Mode: Automated Workflows
76+
77+Once you've refined a workflow in TUI Mode, convert it to Continuous AI for automation.
78+
79+### Example: From REPL → Continuous AI
80+
81+**Step 1: Develop in TUI Mode**
82+
83+```bash
84+cn
85+> @package.json @CHANGELOG.md Generate release notes for version 2.1.0
86+> [Test and refine the prompt until it works perfectly]
87+```
88+
89+**Step 2: Convert to Continuous AI**
90+
91+```bash
92+# Now use the refined workflow in automation
93+cn -p "Generate release notes for the current version based on package.json and recent commits"
94+```
95+
96+### Common Continuous AI Workflows
97+
98+```bash
99+# Git automation
100+cn -p "Generate a conventional commit message for staged changes"
101+cn -p "Review the last 3 commits for potential issues"
102+
103+# Code quality
104+cn -p "Fix all TypeScript errors in the src/ directory"
105+cn -p "Update outdated dependencies and fix breaking changes"
106+
107+# Documentation
108+cn -p "@README.md Update documentation based on recent changes"
109+cn -p "Generate API documentation from JSDoc comments"
110+
111+# CI/CD integration
112+cn -p "Analyze test failures and create GitHub issue with findings"
113+cn -p "Update version numbers and create release branch"
114+```
115+
116+### When to Use Headless Mode
117+
118+✅ **Proven workflows** you've tested in TUI Mode
119+✅ **Repetitive tasks** that no longer need oversight
120+✅ **CI/CD automation** in pipelines
121+✅ **Git hooks** for automated checks
122+✅ **Scheduled tasks** that run unattended
123+
124+### Available Slash Commands
125+
126+Common slash commands available in CLI:
127+
128+- `/clear` - Clear the chat history
129+- `/compact` - Summarize chat history into a compact form
130+- `/config` - Switch configuration or organization
131+- `/exit` - Exit the chat
132+- `/fork` - Start a forked chat session from the current history
133+- `/help` - Show help message
134+- `/info` - Show session information
135+- `/init` - Create an AGENTS.md file
136+- `/login` - Authenticate with your account
137+- `/logout` - Sign out of your current session
138+- `/mcp` - Manage MCP server connections
139+- `/model` - Switch between available chat models
140+- `/resume` - Resume a previous chat session
141+- `/whoami` - Check who you're currently logged in as
142+
143+<Info>Use `/help` to see all available commands.</Info>
144+
145+## The Development Workflow
146+
147+<Info>
148+ **Recommended Approach**: Start complex tasks in TUI Mode to iterate and
149+ refine your approach. Once you have a reliable workflow, convert it to
150+ Headless Mode for automation.
151+</Info>
152+
153+### Workflow Pattern
154+
155+1. **🔬 Experiment in TUI Mode**
156+
157+ - Try complex development tasks with human oversight
158+ - Iterate on prompts and approaches until they work reliably
159+ - Test edge cases and refine the agent's behavior
160+
161+2. **⚡ Automate with Continuous AI**
162+ - Convert proven REPL workflows to single commands
163+ - Deploy in CI/CD, git hooks, or scheduled tasks
164+ - Run with confidence knowing the approach is tested
165+
166+## Next Steps
167+
168+<CardGroup cols={2}>
169+ <Card title="Create Your First Workflow" href="/guides/posthog-github-continuous-ai">
170+ Build an automated PostHog to GitHub issues workflow
171+ </Card>
172+
173+ <Card title="Continuous AI Guide" href="/guides/continuous-ai">
174+ Learn to build and deploy AI-powered development workflows
175+ </Card>
176+</CardGroup>
modified docs/docs.json +6 −0
@@ -23,6 +23,11 @@
2323 "getting-started/quick-start"
2424 ]
2525 },
26+ {
27+ "group": "CLI",
28+ "icon": "terminal",
29+ "pages": ["cli/overview", "cli/install", "cli/quick-start"]
30+ },
2631 {
2732 "group": "Features",
2833 "icon": "star",
@@ -230,6 +235,7 @@
230235 "pages": [
231236 "guides/overview",
232237 "guides/understanding-agents",
238+ "guides/configuring-models-rules-tools",
233239 "guides/codebase-documentation-awareness",
234240 "guides/cli",
235241 "guides/continuous-ai",
added docs/guides/configuring-models-rules-tools.mdx +168 −0
@@ -0,0 +1,168 @@
1+---
2+title: "Configuring Models, Rules, and Tools"
3+description: "Learn how to work with Continue's configuration system. Understand how to use hub models, rules, and tools, create local configurations, and organize your setup for maximum reusability."
4+---
5+
6+## What Are Models, Rules, and Tools?
7+
8+Continue agents are built from three main types of configuration:
9+
10+<Columns cols={3}>
11+<Card title="Models" icon="cube">
12+Language models that power different capabilities like chat, autocomplete, and agent mode
13+</Card>
14+
15+<Card title="Rules" icon="pencil">
16+ Guidelines and instructions that shape how the AI behaves and responds
17+</Card>
18+
19+<Card title="Tools" icon="server">
20+MCP tools that provide additional capabilities like database access, web search, or custom functions
21+</Card>
22+</Columns>
23+
24+There are two places where you can define these configurations:
25+
26+<Columns cols={2}>
27+<Card title="Local" icon="computer">
28+Custom configurations you create and manage in your workspace or globally
29+</Card>
30+
31+<Card title="Hub" icon="cloud">
32+Pre-built models, rules, and tools from the Continue community that you can import and use immediately
33+</Card>
34+</Columns>
35+
36+## Local
37+
38+Local configurations let you create custom models, rules, and tools that automatically apply to multiple agents, reducing duplication and ensuring consistency across your setup.
39+
40+<Columns cols={2}>
41+<Card title="Global" icon="globe">
42+Applied to all agents across all workspaces. Ideal for personal preferences, universal coding standards, or tools you use everywhere.
43+</Card>
44+<Card title="Workspace" icon="folder-open">
45+Applied automatically to all agents when working in a specific project.
46+
47+Perfect for project-specific setups like TypeScript rules for web apps or the Playwright MCP tool.
48+
49+</Card>
50+
51+</Columns>
52+
53+## Hub
54+
55+Continue hub uses a slug in the format of `owner/item-name` to resolve blocks.
56+
57+For example, to use the [Claude 4 Sonnet model](https://hub.continue.dev/anthropic/claude-4-sonnet), you'd reference it as `anthropic/claude-4-sonnet`.
58+
59+Import from the hub using the `uses` syntax alongside your custom configurations:
60+
61+```yaml config.yaml highlight={6}
62+name: Team Agent
63+version: 1.0.0
64+schema: v1
65+
66+models:
67+ - uses: anthropic/claude-4-sonnet
68+ with:
69+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret
70+```
71+
72+### Organization
73+
74+Organize your local configurations using these directories:
75+
76+<Columns cols={3}>
77+<Card title="Models" icon="cube">
78+ `.continue/models`
79+</Card>
80+
81+<Card title="Rules" icon="pencil">
82+ `.continue/rules`
83+</Card>
84+
85+<Card title="Tools" icon="server">
86+ `.continue/mcpServers`
87+</Card>
88+</Columns>
89+
90+## Working with Secrets
91+
92+Models, and many MCP servers, require a secret for things like API keys.
93+
94+On the hub, you can configure secrets when adding a model or MCP server.
95+
96+This will use mustache notation to pass the secret, eg `${{ secrets.SECRET_NAME }}`
97+
98+When configuring a local model or MCP server, you can use the same mustache notation for secrets which read from:
99+
100+<Columns cols={2}>
101+<Card title="Global" icon="globe">
102+`.env` file in `~/.continue/.env`
103+</Card>
104+
105+<Card title="Workspace" icon="folder-open">
106+`.env` file at your project root
107+</Card>
108+</Columns>
109+
110+## Overriding Properties
111+
112+You can directly override properties using the `override` syntax:
113+
114+```yaml title="config.yaml" highlight={10-13}
115+name: myprofile/custom-agent
116+version: 1.0.0
117+schema: v1
118+
119+models:
120+ - uses: myprofile/custom-model
121+ with:
122+ ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }}
123+ TEMP: 0.9
124+ override:
125+ roles:
126+ - chat
127+```
128+
129+## Advanced
130+
131+### Inputs
132+
133+Models and MCP server authors can configure inputs that require the user to provide a secret value by defining a `${{ inputs.SECRET_NAME }}` value.
134+
135+For example, here is how you could require that the user provide a value for the `apiKey` property on a model:
136+
137+```yaml title="config.yaml" highlight={8}
138+name: myprofile/custom-model
139+version: 1.0.0
140+schema: v1
141+
142+models:
143+ - name: My Favorite Model
144+ # ... other model properties ...
145+ apiKey: ${{ inputs.SECRET_NAME }}
146+```
147+
148+Users then map their secret to this input using a `${{ secrets.SECRET_NAME }}` value that maps to a property name which matches the required input, e.g. `SECRET_NAME`.
149+
150+```yaml title="config.yaml" highlight={8}
151+name: myprofile/custom-agent
152+version: 1.0.0
153+schema: v1
154+
155+models:
156+ - uses: myprofile/custom-model
157+ with:
158+ SECRET_NAME: ${{ secrets.SECRET_NAME }}
159+```
160+
161+## Next Steps
162+
163+Now that you understand how models, rules, and tools work, explore:
164+
165+- **[Config Reference](/reference)**: Detailed documentation of all available properties
166+- **[Continue Hub](https://hub.continue.dev)**: Browse community models, rules, and tools
167+- **[Custom Context Providers](/customize/deep-dives/custom-providers)**: Create advanced context integrations
168+- **[Model Roles](/customize/model-roles/intro)**: Understanding how different models work together
modified docs/images/cn-demo.gif +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified docs/index.mdx +117 −24
@@ -1,55 +1,148 @@
11 ---
2-title: "Introduction"
2+title: "Welcome to Continue"
33 icon: book-open
4-description: "Continue is an open source platform for building AI-powered coding assistants with customizable components for chat, autocomplete, edit, and agent workflows in VS Code and JetBrains IDEs"
4+description: "Practice Continuous AI with an open-source CLI, open-source IDE extensions, and a Hub for custom AI coding agents"
55 ---
66
77 <Frame>
88 <img src="/images/intro-0c302b9c15b890c251b1ad04586c880f.png" />
99 </Frame>
1010
11-**Continue enables developers to ship faster with Continuous AI.**
11+<Note>
12+ **Build faster with AI across your IDE, terminal, and CI/CD pipelines with
13+ Continue.**
14+</Note>
1215
13-**You can use Continue to build and run custom agents across your IDE, terminal, and CI.**
16+## Continue CLI
1417
15-1. Get started with Continue in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions
18+<Info>Terminal-native AI coding assistance with TUI and headless modes.</Info>
1619
17-2. Try out [Continue CLI (cn)](https://docs.continue.dev/guides/cli) and give us feedback
20+<CodeGroup>
1821
19-3. Discover models, rules, and MCP tools on [Continue Hub](https://hub.continue.dev/)
22+ ```bash npm
23+ npm install -g @continuedev/cli
24+ ```
25+
26+ ```bash yarn
27+ yarn global add @continuedev/cli
28+ ```
29+
30+ ```bash pnpm
31+ pnpm add -g @continuedev/cli
32+ ```
33+
34+</CodeGroup>
2035
2136 <CardGroup cols={2}>
2237 <Card
23- title="Agent"
24- icon="robot"
25- href="/features/agent/quick-start"
26- horizontal
38+ title="TUI Mode"
39+ icon="terminal"
40+ href="/cli/overview#tui-mode%3A-interactive-development"
2741 >
28- to work on development tasks together with AI
42+ Interactive terminal interface for development workflows
43+ <br />
44+ <sub>• Automate builds & refactoring</sub>
45+ <br />
46+ <sub>• Pre-commit hooks & scripted fixes</sub>
47+ <br />
48+ <sub>• Terminal-first development</sub>
2949 </Card>
3050 <Card
31- title="Chat"
32- icon="messages"
33- href="/features/chat/quick-start"
34- horizontal
51+ title="Headless Mode"
52+ icon="server"
53+ href="/cli/overview#headless-mode%3A-production-automation"
54+ >
55+ Automated AI coding for CI/CD and server environments
56+ <br />
57+ <sub>• Run in CI/CD pipelines</sub>
58+ <br />
59+ <sub>• Batch processing & bulk operations</sub>
60+ <br />
61+ <sub>• Server & container deployments</sub>
62+ </Card>
63+</CardGroup>
64+
65+## IDE Extensions
66+
67+<Info>
68+ **Complement your CLI workflow** - Rich editor integrations for interactive
69+ development.
70+</Info>
71+
72+<CardGroup cols={2}>
73+ <Card
74+ title="VS Code"
75+ icon="code"
76+ href="https://marketplace.visualstudio.com/items?itemName=Continue.continue"
3577 >
36- to ask general questions and clarify code sections
78+ Install from VS Code Marketplace
79+ <br />
80+ <sub>Real-time coding assistance and refactoring</sub>
3781 </Card>
3882 <Card
39- title="Edit"
40- icon="pen-to-square"
41- href="/features/edit/quick-start"
42- horizontal
83+ title="JetBrains"
84+ icon="jet-fighter"
85+ href="https://plugins.jetbrains.com/plugin/22707-continue-extension"
4386 >
44- to modify a code section without leaving your current file
87+ Install from JetBrains Plugin Repository
88+ <br />
89+ <sub>Autocomplete and multi-file edits</sub>
90+ </Card>
91+</CardGroup>
92+
93+## Core Features
94+
95+<CardGroup cols={2}>
96+ <Card title="Agent" icon="robot" href="/features/agent/quick-start">
97+ Multi-step workflows and complex task automation
98+ </Card>
99+ <Card title="Chat" icon="messages" href="/features/chat/quick-start">
100+ Ask questions and explore your codebase
101+ </Card>
102+ <Card title="Edit" icon="pen-to-square" href="/features/edit/quick-start">
103+ In-place code editing without breaking flow
45104 </Card>
46105 <Card
47106 title="Autocomplete"
48107 icon="sparkles"
49108 href="/features/autocomplete/quick-start"
50- horizontal
51109 >
52- to receive inline code suggestions as you type
110+ Inline AI suggestions as you type
111+ </Card>
112+</CardGroup>
113+
114+## Configuration
115+
116+<CardGroup cols={3}>
117+ <Card title="Models" icon="brain" href="/customization/models">
118+ Connect your preferred AI models
119+ </Card>
120+ <Card title="Rules" icon="shield" href="/customization/rules">
121+ Configure AI behavior and constraints
122+ </Card>
123+ <Card title="MCPs" icon="wrench" href="/customization/mcp-tools">
124+ Extend functionality with MCP tools
53125 </Card>
126+</CardGroup>
54127
128+## Resources
129+
130+<CardGroup cols={3}>
131+ <Card title="Continue Hub" icon="globe" href="https://hub.continue.dev/">
132+ Community models, rules, and tools
133+ </Card>
134+ <Card
135+ title="GitHub Discussions"
136+ icon="comments"
137+ href="https://github.com/continuedev/continue/discussions"
138+ >
139+ Get help from the community
140+ </Card>
141+ <Card
142+ title="CLI Examples"
143+ icon="code-branch"
144+ href="/guides/overview#continuous-ai"
145+ >
146+ TUI and headless workflow examples
147+ </Card>
55148 </CardGroup>
modified docs/reference.mdx +17 −124
@@ -1,136 +1,23 @@
11 ---
22 title: "config.yaml Reference"
3-description: "Comprehensive guide to the config.yaml format used by Continue.dev for building custom coding agents. Learn how to define models, context providers, rules, prompts, and more using reusable blocks and YAML configuration."
3+description: "Comprehensive guide to the config.yaml format used by Continue.dev for building custom coding agents. Learn how to define models, context providers, rules, prompts, and more using YAML configuration."
44 ---
55
66 ## Introduction
77
8-Continue hub agents are defined using the `config.yaml` specification. Agents can be loaded from [the Hub](https://hub.continue.dev/explore/agents) or locally
8+Continue Agents are defined using the `config.yaml` specification.
99
10-- [Continue Hub](https://hub.continue.dev/explore/agents) - YAML is stored on the hub and automatically synced to the extension
10+**Agents** are composed of models, rules, and tools (MCP servers).
1111
12-- Locally
13- - in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) within `.continue/agents`. The name of the file will be used as the display name of the agent, e.g. `My Agent.yaml`
14- - in your workspace in a `/.continue/agents` folder, with the same naming convention
12+<Columns cols={2}>
13+<Card title="Configuring Models, Rules, and Tools" icon="cube" href="/guides/configuring-models-rules-tools">
14+Learn how to work with Continue's configuration system, including using hub models, rules, and tools, creating local configurations, and organizing your setup.
15+</Card>
1516
16-<Info>
17- Config YAML replaces `config.json`, which is deprecated. View the **[Migration
18- Guide](/reference/yaml-migration)**.
19-</Info>
20-
21-An agent is made up of:
22-
23-1. **Top level properties**, which specify the `name`, `version`, and `config.yaml` `schema` for the agent
24-2. **Block lists**, which are composable arrays of coding agent building blocks available to the agent, such as models, docs, and context providers.
25-
26-A block is a single standalone building block of a coding agents, e.g., one model or one documentation source. In `config.yaml` syntax, a block consists of the same top-level properties as agents (`name`, `version`, and `schema`), but only has **ONE** item under whichever block type it is.
27-
28-Examples of blocks and agents can be found on the [Continue Hub](https://hub.continue.dev).
29-
30-Agents can either explicitly define blocks - see [Properties](#properties) below - or import and configure existing hub blocks.
31-
32-### Using Blocks
33-
34-Hub blocks and agents are identified with a slug in the format `owner-slug/block-or-agent-slug`, where an owner can be a user or organization (For example, if you want to use the [OpenAI 4o Model block](https://hub.continue.dev/openai/gpt-4o), your slug would be `openai/gpt-4o`). These blocks are pulled from [https://hub.continue.dev](https://hub.continue.dev).
35-
36-Blocks can be imported into an agent by adding a `uses` clause under the block type. This can be alongside other `uses` clauses or explicit blocks of that type.
37-
38-For example, the following agent imports an Anthropic model and defines an Ollama DeepSeek one.
39-
40-Agent models section
41-
42-```yaml
43-name: Team Agent
44-version: 1.0.0
45-schema: v1
46-
47-models:
48- - uses: anthropic/claude-3.5-sonnet # an imported model block
49- - model: deepseek-reasoner # an explicit model block
50- provider: ollama
51-```
52-
53-### Local Blocks
54-
55-It is also possible to define blocks locally in a `.continue` folder. This folder can be located at either the root of your workspace (these will automatically be applied to all agents when you are in that workspace) or in your home directory at `~/.continue` (these will automatically be applied globally).
56-
57-Place your YAML files in the following folders:
58-
59-Agents:
60-
61-- `.continue/agents` - for agents
62-
63-Blocks:
64-
65-- `.continue/rules` - for rules
66-- `.continue/models` - for models
67-- `.continue/prompts` - for prompts
68-- `.continue/context` - for context providers
69-- `.continue/docs` - for docs
70-- `.continue/data` - for data
71-- `.continue/mcpServers` - for MCP Servers
72-
73-You can find many examples of each of these block types on the [Continue Explore Page](https://hub.continue.dev/explore/models)
74-
75-<Info>
76-Local blocks utilizing mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) can read secret values:
77-
78-- globally, from a `.env` located in the global `.continue` folder (`~/.continue/.env`)
79-- per-workspace, from a `.env` file located at the root of the current workspace.
80-
81-</Info>
82-
83-### Inputs
84-
85-Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows:
86-
87-```yaml title="config.yaml"
88-name: myprofile/custom-model
89-version: 1.0.0
90-schema: v1
91-
92-models:
93- - name: My Favorite Model
94- provider: anthropic
95- apiKey: ${{ inputs.ANTHROPIC_API_KEY }}
96- defaultCompletionOptions:
97- temperature: ${{ inputs.TEMP }}
98-```
99-
100-Which can then be imported like this:
101-
102-```yaml title="config.yaml"
103-name: myprofile/custom-agent
104-version: 1.0.0
105-schema: v1
106-
107-models:
108- - uses: myprofile/custom-model
109- with:
110- ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }}
111- TEMP: 0.9
112-```
113-
114-Note that hub secrets can be passed as inputs, using a similar mustache format: `secrets.SECRET_NAME`.
115-
116-### Overrides
117-
118-Block properties can be also be directly overriden using `override`. For example:
119-
120-```yaml title="config.yaml"
121-name: myprofile/custom-agent
122-version: 1.0.0
123-schema: v1
124-
125-models:
126- - uses: myprofile/custom-model
127- with:
128- ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }}
129- TEMP: 0.9
130- override:
131- roles:
132- - chat
133-```
17+<Card title="Understanding Agents" icon="robot" href="/guides/understanding-agents">
18+Learn how to build and configure agents, understand their capabilities, and customize them for your development workflow.
19+</Card>
20+</Columns>
13421
13522 ## Properties
13623
@@ -566,3 +453,9 @@
566453 maxPromptTokens: 1024
567454 onlyMyCode: true
568455 ```
456+
457+---
458+
459+## `config.json` Deprecation
460+
461+`config.yaml `replaces `config.json`, which is deprecated. View the **[Migration Guide](/reference/yaml-migration)** for help transitioning from the old format.
modified extensions/cli/src/commands/init.ts +20 −2
@@ -1,9 +1,11 @@
11 import { type AssistantConfig } from "@continuedev/sdk";
2+import { createRelativeRuleFilePath } from "core/config/markdown/utils.js";
23
34 import { SlashCommandResult } from "../ui/hooks/useChat.types.js";
45
56 function createInitPrompt(): string {
6- return `Please analyze this repository and create a comprehensive AGENTS.md file. Use your available tools to understand the project structure, read important files like README.md, package.json, requirements.txt, and other configuration files to understand the technology stack and setup.
7+ const relativeRuleFilepath = createRelativeRuleFilePath("review");
8+ return `Please analyze this repository and create a comprehensive AGENTS.md file, along with a custom slash command. Use your available tools to understand the project structure, read important files like README.md, package.json, requirements.txt, and other configuration files to understand the technology stack and setup.
79
810 Create an AGENTS.md file with the following structure:
911
@@ -30,7 +32,23 @@
3032 - Development environment setup
3133 - Lint and format commands
3234
33-Please create the AGENTS.md file using the Write tool after analyzing the repository. Focus on providing actionable information that would help both AI agents and human developers understand and work effectively with this codebase. Keep the file concise but informational.`;
35+Additionally, create a slash command file at ${relativeRuleFilepath} with the following structure:
36+
37+\`\`\`md
38+---
39+invokable: true
40+---
41+
42+Review this code for potential issues, including:
43+
44+<insert custom things to look for based on the repository details you find>
45+
46+Provide specific, actionable feedback for improvements.
47+\`\`\`
48+
49+This slash command will be invokable using /review and will provide instructions for code review tasks common to this repository.
50+
51+Please create both the AGENTS.md file and the .continue/rules/review.md file using the Write tool after analyzing the repository. Focus on providing actionable information that would help both AI agents and human developers understand and work effectively with this codebase. Keep the files concise but informational.`;
3452 }
3553
3654 export async function handleInit(
added extensions/cli/src/ui/components/ChecklistDisplay.test.tsx +63 −0
@@ -0,0 +1,63 @@
1+import { render } from "ink-testing-library";
2+import React from "react";
3+
4+import { ChecklistDisplay } from "./ChecklistDisplay.js";
5+
6+describe("ChecklistDisplay", () => {
7+ it("should highlight the first incomplete item", () => {
8+ const content = `Task list status:
9+- [x] Completed task
10+- [ ] First incomplete task
11+- [ ] Second incomplete task`;
12+
13+ const { lastFrame } = render(<ChecklistDisplay content={content} />);
14+ const output = lastFrame();
15+
16+ // The output should contain the checkbox symbols and text
17+ expect(output).toContain("✓");
18+ expect(output).toContain("○");
19+ expect(output).toContain("Completed task");
20+ expect(output).toContain("First incomplete task");
21+ expect(output).toContain("Second incomplete task");
22+ });
23+
24+ it("should handle empty checklist", () => {
25+ const content = "Task list status:";
26+
27+ const { lastFrame } = render(<ChecklistDisplay content={content} />);
28+ const output = lastFrame();
29+
30+ expect(output).toBeDefined();
31+ });
32+
33+ it("should handle all completed tasks", () => {
34+ const content = `Task list status:
35+- [x] Completed task 1
36+- [x] Completed task 2`;
37+
38+ const { lastFrame } = render(<ChecklistDisplay content={content} />);
39+ const output = lastFrame();
40+
41+ expect(output).toContain("✓");
42+ expect(output).toContain("Completed task 1");
43+ expect(output).toContain("Completed task 2");
44+ });
45+
46+ it("should handle mixed content with headers", () => {
47+ const content = `Task list status:
48+## Important Tasks
49+- [x] Done task
50+- [ ] Todo task
51+
52+## Other Tasks
53+- [ ] Another todo`;
54+
55+ const { lastFrame } = render(<ChecklistDisplay content={content} />);
56+ const output = lastFrame();
57+
58+ expect(output).toContain("Important Tasks");
59+ expect(output).toContain("Other Tasks");
60+ expect(output).toContain("✓");
61+ expect(output).toContain("○");
62+ });
63+});
modified extensions/cli/src/ui/components/ChecklistDisplay.tsx +16 −1
@@ -13,6 +13,17 @@
1313 }) => {
1414 const lines = content.split("\n");
1515
16+ // Find the index of the first incomplete checkbox item
17+ let firstIncompleteIndex = -1;
18+ for (let i = 0; i < lines.length; i++) {
19+ const line = lines[i];
20+ const checkboxMatch = line.match(/^(\s*)-\s*\[([ x])\]\s*(.*)$/);
21+ if (checkboxMatch && checkboxMatch[2] === " ") {
22+ firstIncompleteIndex = i;
23+ break;
24+ }
25+ }
26+
1627 return (
1728 <Box flexDirection="column" paddingLeft={2}>
1829 {lines.map((line, index) => {
@@ -25,6 +36,7 @@
2536 if (checkboxMatch) {
2637 const [, indent, status, taskText] = checkboxMatch;
2738 const isCompleted = status === "x";
39+ const isFirstIncomplete = index === firstIncompleteIndex;
2840
2941 return (
3042 <Box key={index}>
@@ -34,8 +46,11 @@
3446 </Text>
3547 <Text> </Text>
3648 <Text
37- color={isCompleted ? "gray" : "white"}
49+ color={
50+ isCompleted ? "gray" : isFirstIncomplete ? "cyan" : "white"
51+ }
3852 strikethrough={isCompleted}
53+ bold={isFirstIncomplete}
3954 >
4055 {taskText}
4156 </Text>
modified extensions/intellij/gradle.properties +1 −1
@@ -1,5 +1,5 @@
11 pluginGroup=com.github.continuedev.continueintellijextension
2-pluginVersion=1.0.45
2+pluginVersion=1.0.46
33 platformVersion=2024.1
44 kotlin.stdlib.default.dependency=false
55 org.gradle.configuration-cache=true
modified extensions/vscode/package.json +1 −1
@@ -2,7 +2,7 @@
22 "name": "continue",
33 "icon": "media/icon.png",
44 "author": "Continue Dev, Inc",
5- "version": "1.3.12",
5+ "version": "1.3.13",
66 "repository": {
77 "type": "git",
88 "url": "https://github.com/continuedev/continue"
modified gui/src/components/AssistantAndOrgListbox/SelectedAssistantButton.tsx +1 −3
@@ -48,9 +48,7 @@
4848 ) : (
4949 <>
5050 <AssistantIcon assistant={selectedProfile} size={iconSize} />
51- <span
52- className={`select-none truncate text-xs ${isSidebar && "hidden md:block"}`}
53- >
51+ <span className={`xs:line-clamp-1 hidden select-none text-xs`}>
5452 {selectedProfile.title}
5553 </span>
5654 </>
modified gui/src/components/AssistantAndOrgListbox/index.tsx +1 −1
@@ -150,7 +150,7 @@
150150 />
151151 <Transition>
152152 <ListboxOptions
153- className="max-h-32 -translate-x-1.5 overflow-y-auto pb-0"
153+ className="max-h-32 scale-x-[97%] overflow-y-auto pb-0"
154154 style={{ zIndex: 200 }}
155155 >
156156 <div className="flex items-center justify-between px-1.5 py-1">
modified gui/src/components/StyledMarkdownPreview/index.tsx +20 −0
@@ -84,6 +84,26 @@
8484 font-family: var(--vscode-editor-font-family);
8585 }
8686
87+ ul ul,
88+ ul ol,
89+ ol ul,
90+ ol ol {
91+ padding-left: 1.5em;
92+ margin-top: 1em;
93+ }
94+
95+ li {
96+ margin-bottom: 0.8em;
97+ }
98+ li:last-child {
99+ margin-bottom: 0;
100+ }
101+
102+ ul,
103+ ol {
104+ padding-left: 2em;
105+ }
106+
87107 code:not(pre > code) {
88108 font-family: var(--vscode-editor-font-family);
89109 }
modified gui/src/components/mainInput/InputToolbar.tsx +0 −1
@@ -56,7 +56,6 @@
5656 const hasReasoningEnabled = useAppSelector(
5757 (store) => store.session.hasReasoningEnabled,
5858 );
59-
6059 const isEnterDisabled =
6160 props.disabled || (isInEdit && codeToEdit.length === 0);
6261
modified gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx +1 −1
@@ -105,7 +105,7 @@
105105 };
106106
107107 return (
108- <div className="flex flex-1 items-center justify-between gap-1.5">
108+ <div className="flex flex-1 items-center justify-between gap-3">
109109 <div className="flex items-center gap-1">
110110 {shouldShowError && (
111111 <ToolTip delayShow={700} content="View configuration errors">
modified gui/src/components/ui/Button.tsx +1 −1
@@ -40,7 +40,7 @@
4040 className={cn(
4141 "cursor-pointer transition-all duration-200",
4242 "hover:enabled:cursor-pointer",
43- "disabled:text-description-muted disabled:pointer-events-none disabled:opacity-50",
43+ "disabled:cursor-not-allowed disabled:opacity-50",
4444 buttonVariants[variant],
4545 isIcon
4646 ? iconButtonSizes[size]
modified gui/src/pages/gui/StreamError.tsx +2 −8
@@ -290,10 +290,7 @@
290290 <GhostButton
291291 className="flex flex-row items-center gap-2 rounded px-3 py-1.5"
292292 onClick={() => {
293- ideMessenger.post("controlPlane/openUrl", {
294- path: GITHUB_LINK,
295- orgSlug: undefined,
296- });
293+ ideMessenger.post("openUrl", GITHUB_LINK);
297294 }}
298295 >
299296 <GithubIcon className="h-5 w-5" />
@@ -302,10 +299,7 @@
302299 <GhostButton
303300 className="flex flex-row items-center gap-2 rounded px-3 py-1.5"
304301 onClick={() => {
305- ideMessenger.post("controlPlane/openUrl", {
306- path: DISCORD_LINK,
307- orgSlug: undefined,
308- });
302+ ideMessenger.post("openUrl", DISCORD_LINK);
309303 }}
310304 >
311305 <DiscordIcon className="h-5 w-5" />
modified gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx +5 −0
@@ -7,6 +7,7 @@
77 import { IdeMessengerContext } from "../../../context/IdeMessenger";
88 import { ToggleWithIcon } from "./ToggleWithIcon";
99 import { ToolCallStatusMessage } from "./ToolCallStatusMessage";
10+import { ToolTruncateHistoryIcon } from "./ToolTruncateHistoryIcon";
1011 import { toolCallStateToContextItems } from "./utils";
1112
1213 interface SimpleToolCallUIProps {
@@ -61,6 +62,10 @@
6162 />
6263 <ToolCallStatusMessage tool={tool} toolCallState={toolCallState} />
6364 </div>
65+
66+ {!!toolCallState.output?.length && (
67+ <ToolTruncateHistoryIcon historyIndex={historyIndex} />
68+ )}
6469 </div>
6570
6671 {isToggleable && (
modified gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx +5 −1
@@ -1,5 +1,6 @@
11 import { Tool, ToolCallState } from "core";
22 import { ToolCallStatusMessage } from "./ToolCallStatusMessage";
3+import { ToolTruncateHistoryIcon } from "./ToolTruncateHistoryIcon";
34
45 interface ToolCallDisplayProps {
56 children: React.ReactNode;
@@ -19,7 +20,7 @@
1920 return (
2021 <div className="flex flex-col justify-center px-4">
2122 <div className="mb-2 flex flex-col">
22- <div className="flex flex-row items-center justify-between gap-1.5">
23+ <div className="flex flex-row items-start justify-between gap-1.5">
2324 <div className="flex min-w-0 flex-row items-center gap-2">
2425 <div className="mt-[1px] h-4 w-4 flex-shrink-0 font-semibold">
2526 {icon}
@@ -29,6 +30,9 @@
2930 )}
3031 <ToolCallStatusMessage tool={tool} toolCallState={toolCallState} />
3132 </div>
33+ {!!toolCallState.output?.length && (
34+ <ToolTruncateHistoryIcon historyIndex={historyIndex} />
35+ )}
3236 </div>
3337 </div>
3438 <div>{children}</div>
modified gui/src/pages/gui/ToolCallDiv/ToolCallStatusMessage.tsx +1 −1
@@ -53,7 +53,7 @@
5353
5454 return (
5555 <div
56- className="text-description line-clamp-4 min-w-0 break-all"
56+ className="text-description line-clamp-4 min-w-0 break-words"
5757 data-testid="tool-call-title"
5858 >
5959 {`Continue ${intro} ${message}`}
modified gui/src/pages/gui/ToolCallDiv/ToolTruncateHistoryIcon.tsx +2 −1
@@ -21,7 +21,8 @@
2121 const { mainEditor } = useMainEditor();
2222
2323 if (historyIndex === lastMessageIndex) {
24- return null;
24+ // filler so doesn't jump in
25+ return <div className="h-3 w-3" />;
2526 }
2627
2728 return (
modified packages/llm-info/src/index.ts +21 −5
@@ -10,7 +10,7 @@
1010 import { Vllm } from "./providers/vllm.js";
1111 import { Voyage } from "./providers/voyage.js";
1212 import { xAI } from "./providers/xAI.js";
13-import { LlmInfo, ModelProvider, UseCase } from "./types.js";
13+import { LlmInfoWithProvider, ModelProvider, UseCase } from "./types.js";
1414
1515 export const allModelProviders: ModelProvider[] = [
1616 OpenAi,
@@ -27,16 +27,32 @@
2727 xAI,
2828 ];
2929
30-export const allLlms: LlmInfo[] = allModelProviders.flatMap((provider) =>
31- provider.models.map((model) => ({ ...model, provider: provider.id })),
30+export const allLlms: LlmInfoWithProvider[] = allModelProviders.flatMap(
31+ (provider) =>
32+ provider.models.map((model) => ({ ...model, provider: provider.id })),
3233 );
3334
34-export function findLlmInfo(model: string): LlmInfo | undefined {
35+export function findLlmInfo(
36+ model: string,
37+ preferProviderId?: string,
38+): LlmInfoWithProvider | undefined {
39+ if (preferProviderId) {
40+ const provider = allModelProviders.find((p) => p.id === preferProviderId);
41+ const info = provider?.models.find((llm) =>
42+ llm.regex ? llm.regex.test(model) : llm.model === model,
43+ );
44+ if (info) {
45+ return {
46+ ...info,
47+ provider: preferProviderId,
48+ };
49+ }
50+ }
3551 return allLlms.find((llm) =>
3652 llm.regex ? llm.regex.test(model) : llm.model === model,
3753 );
3854 }
3955
40-export function getAllRecommendedFor(useCase: UseCase): LlmInfo[] {
56+export function getAllRecommendedFor(useCase: UseCase): LlmInfoWithProvider[] {
4157 return allLlms.filter((llm) => llm.recommendedFor?.includes(useCase));
4258 }