Elffuss BraidHub

kikocis/continue public

Merge branch 'main' into cli-danger-command
Changeset8fc76b1055044240b936a08dd0f29880a91edd1ccac697e9e1854117e616e009
Authoruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-24 18:52 +05:30
Committeruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-24 18:52 +05:30
Parents480243bc3999, e31fcddb0dec

Browse the files at this changeset

28 files changed

added .continue/rules/mintlify-formatting.md +100 −0
@@ -0,0 +1,100 @@
1+# Mintlify Documentation Formatting Rules
2+
3+## Component Formatting
4+
5+When working with Mintlify documentation components (Card, Info, Tip, Note, Warning, etc.), follow these formatting guidelines:
6+
7+### Bullet Points and Lists
8+
9+1. **Always add a blank line** after the opening component tag and before the closing tag
10+2. **Indent content** by 2 spaces within components
11+3. **Use proper list formatting** with each item on its own line:
12+ - Start lists on a new line after introductory text
13+ - Use `-` for unordered lists
14+ - Maintain consistent indentation
15+
16+### Examples
17+
18+#### ✅ Correct Formatting:
19+
20+```mdx
21+<Card title="Example" icon="icon-name">
22+
23+ This is the content with proper formatting:
24+ - First bullet point
25+ - Second bullet point
26+ - Third bullet point
27+
28+</Card>
29+```
30+
31+```mdx
32+<Info>
33+
34+ Important information here:
35+ - Point one
36+ - Point two
37+ - Point three
38+
39+</Info>
40+```
41+
42+#### ❌ Incorrect Formatting:
43+
44+```mdx
45+<Card title="Example" icon="icon-name">
46+ This is wrong: - All bullets - On one line - Bad formatting
47+</Card>
48+```
49+
50+### Component-Specific Rules
51+
52+1. **Card Components**: Always include blank lines and proper indentation
53+2. **Info/Tip/Note/Warning**: Format lists as bullet points, not inline
54+3. **CardGroup**: Each Card within should follow the same formatting rules
55+4. **Code Blocks**: Within components, maintain proper indentation
56+
57+### Links in Lists
58+
59+When including links in bullet points:
60+```mdx
61+- [Link Text](url): Description of the link
62+```
63+
64+### Nested Components
65+
66+For nested components, maintain proper indentation levels:
67+```mdx
68+<CardGroup>
69+ <Card title="First Card">
70+
71+ Content here:
72+ - Bullet one
73+ - Bullet two
74+
75+ </Card>
76+
77+ <Card title="Second Card">
78+
79+ More content:
80+ - Another bullet
81+ - Final bullet
82+
83+ </Card>
84+</CardGroup>
85+```
86+
87+## Application
88+
89+These rules apply to all `.mdx` files in the `docs/` directory, particularly:
90+- Guide documents
91+- Cookbook documents
92+- Reference documentation
93+- Any Mintlify-powered documentation
94+
95+## Automation Note
96+
97+When using Continue or other AI assistants to generate or modify documentation:
98+- Always format Mintlify components according to these rules
99+- Review generated content for proper formatting
100+- Apply these rules consistently across all documentation
No newline at the end of the file
added .continue/rules/personality.md +6 −0
@@ -0,0 +1,6 @@
1+---
2+name: Personality Rules
3+description: Conversational and personality guidelines
4+---
5+
6+When the user challenges your output or asks a question, don't be overly-amiable (e.g. responding "You're right" all the time). Focus on correctness and be willing to tell the user they are wrong.
modified .github/workflows/continue-detailed-review.yaml +1 −1
@@ -18,7 +18,7 @@
1818 timeout-minutes: 10
1919 steps:
2020 - name: Run Detailed PR Review
21- uses: continuedev/continue/actions/detailed-review@12e933bf9d13736c5f47728c436445ef4127fd52
21+ uses: continuedev/continue/actions/detailed-review@main
2222 with:
2323 continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
2424 continue-org: continuedev
modified .github/workflows/continue-general-review.yaml +1 −1
@@ -18,7 +18,7 @@
1818 timeout-minutes: 10
1919 steps:
2020 - name: Run Continue PR Review Action
21- uses: continuedev/continue/actions/general-review@12e933bf9d13736c5f47728c436445ef4127fd52
21+ uses: continuedev/continue/actions/general-review@main
2222 with:
2323 continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
2424 continue-org: "continuedev"
modified .prettierignore +2 −0
@@ -4,6 +4,7 @@
44 binary/tmp
55 core/.continue-test
66 docs/.docusaurus
7+docs/**/*.mdx
78 extensions/.continue-debug
89 extensions/vscode/continue_rc_schema.json
910 extensions/vscode/.vscode-test
@@ -17,6 +18,7 @@
1718 extensions/intellij/src/main/resources
1819 gui/dist
1920 **/.continueignore
21+.continue/rules/mintlify-formatting.md
2022 CHANGELOG.md
2123 **/continue_tutorial.py
2224 **/node_modules
modified docs/customize/custom-providers.mdx +0 −183
@@ -19,116 +19,62 @@
1919
2020 Reference any file in your current workspace.
2121
22-- YAML
23-- JSON
24-
2522 config.yaml
2623
2724 ```
2825 context: - provider: file
2926 ```
3027
31-config.json
32-
33-```json
34-{ "contextProviders": [{ "name": "file" }] }
35-```
36-
3728 ### @Code Context Provider – Reference Functions and Classes
3829
3930 Reference specific functions or classes from throughout your project.
4031
41-- YAML
42-- JSON
43-
4432 config.yaml
4533
4634 ```
4735 context: - provider: code
4836 ```
4937
50-config.json
51-
52-```json
53-{ "contextProviders": [{ "name": "code" }] }
54-```
55-
5638 ### @Git Diff Context Provider – Reference Branch Changes
5739
5840 Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
5941
60-- YAML
61-- JSON
62-
6342 config.yaml
6443
6544 ```
6645 context: - provider: diff
6746 ```
6847
69-config.json
70-
71-```json
72-{ "contextProviders": [{ "name": "diff" }] }
73-```
74-
7548 ### @Current File Context Provider – Reference the Active File
7649
7750 Reference the currently open file.
7851
79-- YAML
80-- JSON
81-
8252 config.yaml
8353
8454 ```
8555 context: - provider: currentFile
8656 ```
8757
88-config.json
89-
90-```json
91-{ "contextProviders": [{ "name": "currentFile" }] }
92-```
93-
9458 ### @Terminal Context Provider – Reference Last Terminal Command and Output
9559
9660 Reference the last command you ran in your IDE's terminal and its output.
9761
98-- YAML
99-- JSON
100-
10162 config.yaml
10263
10364 ```
10465 context: - provider: terminal
10566 ```
10667
107-config.json
108-
109-```json
110-{ "contextProviders": [{ "name": "terminal" }] }
111-```
112-
11368 ### @Docs Context Provider – Reference Documentation Site Content
11469
11570 Reference the contents from any documentation site.
11671
117-- YAML
118-- JSON
119-
12072 config.yaml
12173
12274 ```
12375 context: - provider: docs
12476 ```
12577
126-config.json
127-
128-```json
129-{ "contextProviders": [{ "name": "docs" }] }
130-```
131-
13278 Note that this will only enable the `@Docs` context provider.
13379
13480 To use it, you need to add a documentation site to your config file. See the [docs](/customize/overview#documentation-context) page for more information.
@@ -137,9 +83,6 @@
13783
13884 Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
13985
140-- YAML
141-- JSON
142-
14386 config.yaml
14487
14588 ```
@@ -149,21 +92,12 @@
14992 onlyPinned: true
15093 ```
15194
152-config.json
153-
154-```json
155-{ "contextProviders": [{ "name": "open", "params": { "onlyPinned": true } }] }
156-```
157-
15895 ### @Web Context Provider – Reference Relevant Web Pages
15996
16097 Reference relevant pages from across the web, automatically determined from your input.
16198
16299 Optionally, set `n` to limit the number of results returned (default 6).
163100
164-- YAML
165-- JSON
166-
167101 config.yaml
168102
169103 ```
@@ -173,19 +107,10 @@
173107 n: 5
174108 ```
175109
176-config.json
177-
178-```json
179-{ "contextProviders": [{ "name": "web", "params": { "n": 5 } }] }
180-```
181-
182110 ### @Codebase Context Provider – Reference Relevant Codebase Snippets
183111
184112 Reference the most relevant snippets from your codebase.
185113
186-- YAML
187-- JSON
188-
189114 config.yaml
190115
191116 ```
@@ -193,40 +118,22 @@
193118 - provider: codebase
194119 ```
195120
196-config.json
197-
198-```json
199-{ "contextProviders": [{ "name": "codebase" }] }
200-```
201-
202121 Read more about indexing and retrieval [here](/customize/overview#codebase-context).
203122
204123 ### @Folder Context Provider – Reference Code from a Specific Folder
205124
206125 Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
207126
208-- YAML
209-- JSON
210-
211127 config.yaml
212128
213129 ```
214130 context: - provider: folder
215131 ```
216132
217-config.json
218-
219-```json
220-{ "contextProviders": [{ "name": "folder" }] }
221-```
222-
223133 ### @Search Context Provider – Reference Code Search Results
224134
225135 Reference the results of codebase search, just like the results you would get from VS Code search.
226136
227-- YAML
228-- JSON
229-
230137 config.yaml
231138
232139 ```
@@ -236,21 +143,12 @@
236143 maxResults: 100 # optional, defaults to 200
237144 ```
238145
239-config.json
240-
241-```json
242-{ "contextProviders": [ { "name": "search", "params": { "maxResults": 100 // optional, defaults to 200 } } ]}
243-```
244-
245146 This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
246147
247148 ### @Url Context Provider – Reference Content from a URL
248149
249150 Reference the markdown converted contents of a given URL.
250151
251-- YAML
252-- JSON
253-
254152 config.yaml
255153
256154 ```
@@ -258,19 +156,10 @@
258156 - provider: url
259157 ```
260158
261-config.json
262-
263-```json
264-{ "contextProviders": [{ "name": "url" }] }
265-```
266-
267159 ### @Clipboard Context Provider – Reference Clipboard Items
268160
269161 Reference recent clipboard items
270162
271-- YAML
272-- JSON
273-
274163 config.yaml
275164
276165 ```
@@ -278,19 +167,10 @@
278167 - provider: clipboard
279168 ```
280169
281-config.json
282-
283-```json
284-{ "contextProviders": [{ "name": "clipboard" }] }
285-```
286-
287170 ### @Tree Context Provider – Reference Workspace File Structure
288171
289172 Reference the structure of your current workspace.
290173
291-- YAML
292-- JSON
293-
294174 config.yaml
295175
296176 ```
@@ -298,19 +178,10 @@
298178 - provider: tree
299179 ```
300180
301-config.json
302-
303-```json
304-{ "contextProviders": [{ "name": "tree" }] }
305-```
306-
307181 ### @Problems Context Provider – Reference Problems in the Current File
308182
309183 Get Problems from the current file.
310184
311-- YAML
312-- JSON
313-
314185 config.yaml
315186
316187 ```
@@ -318,19 +189,10 @@
318189 - provider: problems
319190 ```
320191
321-config.json
322-
323-```json
324-{ "contextProviders": [{ "name": "problems" }] }
325-```
326-
327192 ### @Debugger Context Provider – Reference Debugger Local Variables
328193
329194 Reference the contents of the local variables in the debugger. Currently only available in VS Code.
330195
331-- YAML
332-- JSON
333-
334196 config.yaml
335197
336198 ```
@@ -340,12 +202,6 @@
340202 stackDepth: 3
341203 ```
342204
343-config.json
344-
345-```json
346-{ "contextProviders": [{ "name": "debugger", "params": { "stackDepth": 3 } }] }
347-```
348-
349205 Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
350206
351207 ### @Repository Map Context Provider – Reference Codebase Outline and Signatures
@@ -354,9 +210,6 @@
354210
355211 `includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
356212
357-- YAML
358-- JSON
359-
360213 config.yaml
361214
362215 ```
@@ -366,12 +219,6 @@
366219 includeSignatures: false # default true
367220 ```
368221
369-config.json
370-
371-```json
372-{ "contextProviders": [ { "name": "repo-map", "params": { "includeSignatures": false // default true } } ]}
373-```
374-
375222 Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
376223
377224 In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repository map from.
@@ -382,9 +229,6 @@
382229
383230 Reference the architecture and platform of your current operating system.
384231
385-- YAML
386-- JSON
387-
388232 config.yaml
389233
390234 ```
@@ -392,19 +236,10 @@
392236 - provider: os
393237 ```
394238
395-config.json
396-
397-```json
398-{ "contextProviders": [{ "name": "os" }] }
399-```
400-
401239 ### Using the Model Context Protocol (MCP) in Continue
402240
403241 The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
404242
405-- YAML
406-- JSON
407-
408243 config.yaml
409244
410245 ```
@@ -417,24 +252,6 @@
417252 - /Users/NAME/test.db
418253 ```
419254
420-config.json
421-
422-```json
423-{
424- "experimental": {
425- "modelContextProtocolServers": [
426- {
427- "transport": {
428- "type": "stdio",
429- "command": "uvx",
430- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
431- }
432- }
433- ]
434- }
435-}
436-```
437-
438255 You'll then be able to type "@" and see "MCP" in the context providers dropdown.
439256
440257 ### How to Request a New Context Provider in Continue
modified docs/customize/deep-dives/custom-providers.mdx +71 −299
@@ -15,251 +15,95 @@
1515
1616 Reference any file in your current workspace.
1717
18-<Tabs>
19- <Tab title="YAML">
20- ```yaml config.yaml
21- context:
22- - provider: file
23- ```
24- </Tab>
25- <Tab title="JSON (Deprecated)">
26- ```json config.json
27- {
28- "contextProviders": [
29- {
30- "name": "file"
31- }
32- ]
33- }
34- ```
35- </Tab>
36-</Tabs>
18+```yaml config.yaml
19+context:
20+ - provider: file
21+```
3722
3823 ### `@Code`
3924
4025 Reference specific functions or classes from throughout your project.
4126
42-<Tabs>
43- <Tab title="YAML">
44- ```yaml config.yaml
45- context:
46- - provider: code
47- ```
48- </Tab>
49- <Tab title="JSON (Deprecated)">
50- ```json config.json
51- {
52- "contextProviders": [
53- {
54- "name": "code"
55- }
56- ]
57- }
58- ```
59- </Tab>
60-</Tabs>
27+```yaml config.yaml
28+context:
29+ - provider: code
30+```
6131
6232 ### `@Git Diff`
6333
6434 Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
6535
66-<Tabs>
67- <Tab title="YAML">
68- ```yaml config.yaml
69- context:
70- - provider: diff
71- ```
72- </Tab>
73- <Tab title="JSON (Deprecated)">
74- ```json config.json
75- {
76- "contextProviders": [
77- {
78- "name": "diff"
79- }
80- ]
81- }
82- ```
83- </Tab>
84-</Tabs>
36+```yaml config.yaml
37+context:
38+ - provider: diff
39+```
8540
8641 ### `@Current File`
8742
8843 Reference the currently open file.
8944
90-<Tabs>
91- <Tab title="YAML">
92- ```yaml config.yaml
93- context:
94- - provider: currentFile
95- ```
96- </Tab>
97- <Tab title="JSON (Deprecated)">
98- ```json config.json
99- {
100- "contextProviders": [
101- {
102- "name": "currentFile"
103- }
104- ]
105- }
106- ```
107- </Tab>
108-</Tabs>
45+```yaml config.yaml
46+context:
47+ - provider: currentFile
48+```
10949
11050 ### `@Terminal`
11151
11252 Reference the last command you ran in your IDE's terminal and its output.
11353
114-<Tabs>
115- <Tab title="YAML">
116- ```yaml config.yaml
117- context:
118- - provider: terminal
119- ```
120- </Tab>
121- <Tab title="JSON (Deprecated)">
122- ```json config.json
123- {
124- "contextProviders": [
125- {
126- "name": "terminal"
127- }
128- ]
129- }
130- ```
131- </Tab>
132-</Tabs>
54+```yaml config.yaml
55+context:
56+ - provider: terminal
57+```
13358
13459 ### `@Open`
13560
13661 Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
13762
138-<Tabs>
139- <Tab title="YAML">
140- ```yaml config.yaml
141- context:
142- - provider: open
143- params:
144- onlyPinned: true
145- ```
146- </Tab>
147- <Tab title="JSON (Deprecated)">
148- ```json config.json
149- {
150- "contextProviders": [
151- {
152- "name": "open",
153- "params": {
154- "onlyPinned": true
155- }
156- }
157- ]
158- }
159- ```
160- </Tab>
161-</Tabs>
63+```yaml config.yaml
64+context:
65+ - provider: open
66+ params:
67+ onlyPinned: true
68+```
16269
16370 ### `@Clipboard`
16471
16572 Reference recent clipboard items
16673
167-<Tabs>
168- <Tab title="YAML">
169- ```yaml config.yaml
170- context:
171- - provider: clipboard
172- ```
173- </Tab>
174- <Tab title="JSON (Deprecated)">
175- ```json config.json
176- {
177- "contextProviders": [
178- {
179- "name": "clipboard"
180- }
181- ]
182- }
183- ```
184- </Tab>
185-</Tabs>
74+```yaml config.yaml
75+context:
76+ - provider: clipboard
77+```
18678
18779 ### `@Tree`
18880
18981 Reference the structure of your current workspace.
19082
191-<Tabs>
192- <Tab title="YAML">
193- ```yaml config.yaml
194- context:
195- - provider: tree
196- ```
197- </Tab>
198- <Tab title="JSON (Deprecated)">
199- ```json config.json
200- {
201- "contextProviders": [
202- {
203- "name": "tree"
204- }
205- ]
206- }
207- ```
208- </Tab>
209-</Tabs>
83+```yaml config.yaml
84+context:
85+ - provider: tree
86+```
21087
21188 ### `@Problems`
21289
21390 Get Problems from the current file.
21491
215-<Tabs>
216- <Tab title="YAML">
217- ```yaml config.yaml
218- context:
219- - provider: problems
220- ```
221- </Tab>
222- <Tab title="JSON (Deprecated)">
223- ```json config.json
224- {
225- "contextProviders": [
226- {
227- "name": "problems"
228- }
229- ]
230- }
231- ```
232- </Tab>
233-</Tabs>
92+```yaml config.yaml
93+context:
94+ - provider: problems
95+```
23496
23597 ### `@Debugger`
23698
23799 Reference the contents of the local variables in the debugger. Currently only available in VS Code.
238100
239-<Tabs>
240- <Tab title="YAML">
241- ```yaml config.yaml
242- context:
243- - provider: debugger
244- params:
245- stackDepth: 3
246- ```
247- </Tab>
248- <Tab title="JSON (Deprecated)">
249- ```json config.json
250- {
251- "contextProviders": [
252- {
253- "name": "debugger",
254- "params": {
255- "stackDepth": 3
256- }
257- }
258- ]
259- }
260- ```
261- </Tab>
262-</Tabs>
101+```yaml config.yaml
102+context:
103+ - provider: debugger
104+ params:
105+ stackDepth: 3
106+```
263107
264108 Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
265109
@@ -269,30 +113,12 @@
269113
270114 `includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
271115
272-<Tabs>
273- <Tab title="YAML">
274- ```yaml config.yaml
275- context:
276- - provider: repo-map
277- params:
278- includeSignatures: false # default true
279- ```
280- </Tab>
281- <Tab title="JSON (Deprecated)">
282- ```json config.json
283- {
284- "contextProviders": [
285- {
286- "name": "repo-map",
287- "params": {
288- "includeSignatures": false // default true
289- }
290- }
291- ]
292- }
293- ```
294- </Tab>
295-</Tabs>
116+```yaml config.yaml
117+context:
118+ - provider: repo-map
119+ params:
120+ includeSignatures: false # default true
121+```
296122
297123 Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
298124
@@ -304,56 +130,23 @@
304130
305131 Reference the architecture and platform of your current operating system.
306132
307-<Tabs>
308- <Tab title="YAML">
309- ```yaml config.yaml
310- context:
311- - provider: os
312- ```
313- </Tab>
314- <Tab title="JSON (Deprecated)">
315- ```json config.json
316- {
317- "contextProviders": [
318- {
319- "name": "os"
320- }
321- ]
322- }
323- ```
324- </Tab>
325-</Tabs>
133+```yaml config.yaml
134+context:
135+ - provider: os
136+```
326137
327138 ### `@HTTP`
328139
329140 The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
330141
331-<Tabs>
332- <Tab title="YAML">
333- ```yaml config.yaml
334- context:
335- - provider: http
336- params:
337- url: "https://api.example.com/v1/users"
338- headers:
339- - Authorization: "Bearer <token>"
340- ```
341- </Tab>
342- <Tab title="JSON (Deprecated)">
343- ```json config.json
344- {
345- "contextProviders": [
346- {
347- "name": "http",
348- "params": {
349- "url": "https://api.example.com/v1/users"
350- }
351- }
352- ]
353- }
354- ```
355- </Tab>
356-</Tabs>
142+```yaml config.yaml
143+context:
144+ - provider: http
145+ params:
146+ url: "https://api.example.com/v1/users"
147+ headers:
148+ - Authorization: "Bearer <token>"
149+```
357150
358151 The receiving URL should expect to receive the following parameters:
359152
@@ -375,36 +168,15 @@
375168
376169 The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
377170
378-<Tabs>
379- <Tab title="YAML">
380- ```yaml config.yaml
381- mcpServers:
382- - name: My MCP Server
383- command: uvx
384- args:
385- - mcp-server-sqlite
386- - --db-path
387- - /Users/NAME/test.db
388- ```
389- </Tab>
390- <Tab title="JSON (Deprecated)">
391- ```json config.json
392- {
393- "experimental": {
394- "modelContextProtocolServers": [
395- {
396- "transport": {
397- "type": "stdio",
398- "command": "uvx",
399- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
400- }
401- }
402- ]
403- }
404- }
405- ```
406- </Tab>
407-</Tabs>
171+```yaml config.yaml
172+mcpServers:
173+ - name: My MCP Server
174+ command: uvx
175+ args:
176+ - mcp-server-sqlite
177+ - --db-path
178+ - /Users/NAME/test.db
179+```
408180
409181 You'll then be able to type "@" and see "MCP" in the context providers dropdown.
410182
modified docs/customize/model-roles/chat.mdx +0 −174
@@ -36,20 +36,6 @@
3636 apiKey: <YOUR_ANTHROPIC_API_KEY>
3737 ```
3838 </Tab>
39- <Tab title="JSON">
40- ```json title="config.json"
41- {
42- "models": [
43- {
44- "title": "Claude Opus 4.1",
45- "provider": "anthropic",
46- "model": "claude-4-1-opus",
47- "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
48- }
49- ]
50- }
51- ```
52- </Tab>
5339 </Tabs>
5440
5541 ### Gemma from Google DeepMind
@@ -88,37 +74,6 @@
8874 </Tab>
8975 </Tabs>
9076 </Tab>
91- <Tab title="JSON">
92- <Tabs>
93- <Tab title="Ollama">
94- ```json title="config.json"
95- {
96- "models": [
97- {
98- "title": "Gemma 3 27B",
99- "provider": "ollama",
100- "model": "gemma3:27b"
101- }
102- ]
103- }
104- ```
105- </Tab>
106- <Tab title="Together">
107- ```json title="config.json"
108- {
109- "models": [
110- {
111- "title": "Gemma 3 27B",
112- "provider": "together",
113- "model": "google/gemma-2-27b-it",
114- "apiKey": "<YOUR_TOGETHER_API_KEY>"
115- }
116- ]
117- }
118- ```
119- </Tab>
120- </Tabs>
121- </Tab>
12277 </Tabs>
12378
12479 ### GPT-4o from OpenAI
@@ -138,20 +93,6 @@
13893 apiKey: <YOUR_OPENAI_API_KEY>
13994 ```
14095 </Tab>
141- <Tab title="JSON">
142- ```json title="config.json"
143- {
144- "models": [
145- {
146- "title": "GPT-4o",
147- "provider": "openai",
148- "model": "",
149- "apiKey": "<YOUR_OPENAI_API_KEY>"
150- }
151- ]
152- }
153- ```
154- </Tab>
15596 </Tabs>
15697
15798 ### Grok-2 from xAI
@@ -171,20 +112,6 @@
171112 apiKey: <YOUR_XAI_API_KEY>
172113 ```
173114 </Tab>
174- <Tab title="JSON">
175- ```json title="config.json"
176- {
177- "models": [
178- {
179- "title": "Grok-2",
180- "provider": "xAI",
181- "model": "grok-2-latest",
182- "apiKey": "<YOUR_XAI_API_KEY>"
183- }
184- ]
185- }
186- ```
187- </Tab>
188115 </Tabs>
189116
190117 ### Gemini 2.0 Flash from Google
@@ -204,20 +131,6 @@
204131 apiKey: <YOUR_GEMINI_API_KEY>
205132 ```
206133 </Tab>
207- <Tab title="JSON">
208- ```json title="config.json"
209- {
210- "models": [
211- {
212- "title": "Gemini 2.0 Flash",
213- "provider": "gemini",
214- "model": "gemini-2.0-flash",
215- "apiKey": "<YOUR_GEMINI_API_KEY>"
216- }
217- ]
218- }
219- ```
220- </Tab>
221134 </Tabs>
222135
223136 ## Local, offline experience
@@ -268,49 +181,6 @@
268181 </Tab>
269182 </Tabs>
270183 </Tab>
271- <Tab title="JSON">
272- <Tabs>
273- <Tab title="Ollama">
274- ```json title="config.json"
275- {
276- "models": [
277- {
278- "title": "Llama 3.1 8B",
279- "provider": "ollama",
280- "model": "llama3.1:8b"
281- }
282- ]
283- }
284- ```
285- </Tab>
286- <Tab title="LM Studio">
287- ```json title="config.json"
288- {
289- "models": [
290- {
291- "title": "Llama 3.1 8B",
292- "provider": "lmstudio",
293- "model": "llama3.1-8b"
294- }
295- ]
296- }
297- ```
298- </Tab>
299- <Tab title="Msty">
300- ```json title="config.json"
301- {
302- "models": [
303- {
304- "title": "Llama 3.1 8B",
305- "provider": "msty",
306- "model": "llama3.1-8b"
307- }
308- ]
309- }
310- ```
311- </Tab>
312- </Tabs>
313- </Tab>
314184 </Tabs>
315185
316186 ### DeepSeek Coder 2 16B
@@ -357,50 +227,6 @@
357227 </Tab>
358228 </Tabs>
359229 </Tab>
360- <Tab title="JSON">
361- <Tabs>
362- <Tab title="Ollama">
363- ```json title="config.json"
364- {
365- "models": [
366- {
367- "title": "DeepSeek Coder 2 16B",
368- "provider": "ollama",
369- "model": "deepseek-coder-v2:16b",
370- "apiBase": "http://localhost:11434"
371- }
372- ]
373- }
374- ```
375- </Tab>
376- <Tab title="LM Studio">
377- ```json title="config.json"
378- {
379- "models": [
380- {
381- "title": "DeepSeek Coder 2 16B",
382- "provider": "lmstudio",
383- "model": "deepseek-coder-v2:16b"
384- }
385- ]
386- }
387- ```
388- </Tab>
389- <Tab title="Msty">
390- ```json title="config.json"
391- {
392- "models": [
393- {
394- "title": "DeepSeek Coder 2 16B",
395- "provider": "msty",
396- "model": "deepseek-coder-v2:16b"
397- }
398- ]
399- }
400- ```
401- </Tab>
402- </Tabs>
403- </Tab>
404230 </Tabs>
405231
406232 ## Other experiences
modified docs/customize/model-roles/edit.mdx +9 −32
@@ -10,38 +10,15 @@
1010
1111 In Continue, you can add `edit` to a model's roles to specify that it can be used for Edit requests. If no edit models are specified, the selected `chat` model is used.
1212
13-<Tabs>
14- <Tab title="YAML">
15- Use model roles.
16- ```yaml title="config.yaml"
17- models:
18- - name: Claude 3.5 Sonnet
19- provider: anthropic
20- model: claude-3-5-sonnet-latest
21- apiKey: <YOUR_ANTHROPIC_API_KEY>
22- roles:
23- - edit
24- ```
25- </Tab>
26- <Tab title="JSON">
27- Set the `experimental.modelRoles.inlineEdit` property in `config.json`.
28- ```json title="config.json"
29- {
30- "models": {
31- "name": "Claude 3.5 Sonnet",
32- "provider": "anthropic",
33- "model": "claude-3-5-sonnet-latest",
34- "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
35- },
36- "experimental": {
37- "modelRoles": {
38- "inlineEdit": "Claude 3.5 Sonnet",
39- }
40- }
41- }
42- ```
43- </Tab>
44-</Tabs>
13+```yaml title="config.yaml"
14+models:
15+ - name: Claude 4 Sonnet
16+ provider: anthropic
17+ model: claude-3-5-sonnet-latest
18+ apiKey: <YOUR_ANTHROPIC_API_KEY>
19+ roles:
20+ - edit
21+```
4522
4623 Explore edit models in [the hub](https://hub.continue.dev/explore/models?roles=edit). Generally, our recommendations for Edit overlap with recommendations for Chat.
4724
modified docs/customize/model-roles/reranking.mdx +5 −53
@@ -23,7 +23,10 @@
2323
2424 <Tabs>
2525 <Tab title="Hub">
26- [Voyage Rerank 2 Block](https://hub.continue.dev/voyageai/rerank-2)
26+ ```yaml title="config.yaml"
27+ models:
28+ - uses: voyageai/rerank-2
29+ ```
2730 </Tab>
2831 <Tab title="YAML">
2932 ```yaml title="config.yaml"
@@ -36,19 +39,6 @@
3639 - rerank
3740 ```
3841 </Tab>
39- <Tab title="JSON">
40- ```json title="config.json"
41- {
42- "reranker": {
43- "name": "voyage",
44- "params": {
45- "model": "rerank-2",
46- "apiKey": "<YOUR_VOYAGE_API_KEY>"
47- }
48- }
49- }
50- ```
51- </Tab>
5242 </Tabs>
5343
5444 ### Cohere
@@ -71,19 +61,6 @@
7161 - rerank
7262 ```
7363 </Tab>
74- <Tab title="JSON">
75- ```json title="config.json"
76- {
77- "reranker": {
78- "name": "cohere",
79- "params": {
80- "model": "rerank-english-v3.0",
81- "apiKey": "<YOUR_COHERE_API_KEY>"
82- }
83- }
84- }
85- ```
86- </Tab>
8764 </Tabs>
8865
8966 ### LLM
@@ -105,21 +82,9 @@
10582 - rerank
10683 ```
10784 </Tab>
108- <Tab title="JSON">
109- ```json title="config.json"
110- {
111- "reranker": {
112- "name": "llm",
113- "params": {
114- "modelTitle": "My Model Title"
115- }
116- }
117- }
118- ```
119- </Tab>
12085 </Tabs>
12186
122-The `"modelTitle"` field must match one of the models in your "models" array in config.json.
87+
12388
12489 ### Text Embeddings Inference
12590
@@ -142,17 +107,4 @@
142107 - rerank
143108 ```
144109 </Tab>
145- <Tab title="JSON">
146- ```json title="config.json"
147- {
148- "reranker": {
149- "name": "huggingface-tei",
150- "params": {
151- "apiBase": "http://localhost:8080",
152- "apiKey": "<YOUR_TEI_API_KEY>"
153- }
154- }
155- }
156- ```
157- </Tab>
158110 </Tabs>
modified docs/docs.json +9 −1
@@ -233,7 +233,7 @@
233233 "guides/codebase-documentation-awareness",
234234 "guides/cli",
235235 "guides/continuous-ai",
236- "guides/posthog-github-continuous-ai",
236+ "guides/snyk-mcp-continue-cookbook",
237237 "guides/continuous-ai-readiness-assessment",
238238 "guides/plan-mode-guide",
239239 "guides/ollama-guide",
@@ -242,6 +242,14 @@
242242 "guides/custom-code-rag",
243243 "guides/how-to-self-host-a-model"
244244 ]
245+ },
246+ {
247+ "group": "Cookbooks",
248+ "icon": "book-open-cover",
249+ "pages": [
250+ "guides/posthog-github-continuous-ai",
251+ "guides/netlify-mcp-continuous-deployment"
252+ ]
245253 }
246254 ]
247255 },
modified docs/guides/instinct.mdx +2 −2
@@ -9,7 +9,7 @@
99 [HuggingFace model card](https://huggingface.co/continuedev/instinct).
1010 </Warning>
1111
12-We recently released Instinct, a state-of-the-art open Next Edit model. Robustly fine-tuned from Qwen2.5-Coder-7B, Instinct intelligently predicts your next move to keep you in flow. To learn more about the model, check out [our blog post](https://blog.continue.dev).
12+We recently released Instinct, a state-of-the-art open Next Edit model. Robustly fine-tuned from Qwen2.5-Coder-7B, Instinct intelligently predicts your next move to keep you in flow. To learn more about the model, check out [our blog post](https://blog.continue.dev/instinct/).
1313
1414 <Frame>
1515 <img src="/images/instinct.gif" />
@@ -17,7 +17,7 @@
1717
1818 ### 1. Install Ollama
1919
20-If you haven't already installed Ollama, see our guide [here](./ollama-guide.mdx).
20+If you haven't already installed Ollama, see our guide [here](./ollama-guide).
2121
2222 ### 2. Download Instinct
2323
added docs/guides/netlify-mcp-continuous-deployment.mdx +614 −0
@@ -0,0 +1,614 @@
1+---
2+title: "Netlify Performance Optimization Cookbook"
3+description: "Optimize web performance with A/B testing, automated monitoring, and data-driven improvements using Netlify MCP and Continue."
4+sidebarTitle: "Using Netlify MCP for Performance Optimization"
5+---
6+
7+<Card title="Ship Faster Code, Not Slower Sites" icon="gauge-high">
8+ Use AI to automatically monitor performance metrics, run A/B tests between
9+ branches, and get actionable optimization suggestions based on real user data
10+ from Netlify Analytics
11+</Card>
12+
13+<Info>
14+ **Did You Know?** Netlify is more than just static hosting! It offers:
15+ - [Split Testing](https://docs.netlify.com/site-deploys/split-testing/) for A/B testing branches
16+ - [Analytics](https://docs.netlify.com/analytics/get-started/) with Core Web Vitals tracking
17+ - [Edge Functions](https://docs.netlify.com/edge-functions/overview/) for personalization at the edge
18+ - [Build Plugins](https://docs.netlify.com/integrations/build-plugins/) ecosystem with 100+ integrations
19+ - [Forms](https://docs.netlify.com/forms/setup/) with built-in spam protection
20+ - [Identity](https://docs.netlify.com/visitor-access/identity/) for user authentication
21+ - [Large Media](https://docs.netlify.com/large-media/overview/) for Git LFS support
22+
23+This guide shows you how to leverage these features through natural language with Continue CLI!
24+
25+</Info>
26+
27+## What You'll Learn
28+
29+This cookbook teaches you to:
30+
31+- Run [A/B tests](https://docs.netlify.com/site-deploys/split-testing/) between branches to measure performance impact
32+- Monitor [Core Web Vitals](https://docs.netlify.com/analytics/get-started/#core-web-vitals) and build performance metrics
33+- Automatically block deploys that degrade performance using [Deploy Contexts](https://docs.netlify.com/site-deploys/overview/#deploy-contexts)
34+- Optimize build times with [Build Plugins](https://docs.netlify.com/integrations/build-plugins/) and bundle sizes with AI assistance
35+
36+## Prerequisites
37+
38+- GitHub repository with a web project
39+- [Netlify account](https://netlify.com) (free tier works)
40+- Node.js 22+ installed (required for Netlify)
41+- [Continue CLI](https://docs.continue.dev/guides/cli) (`npm i -g @continuedev/cli`)
42+- [Netlify MCP](https://hub.continue.dev/netlify/netlify-mcp) configured
43+- [Netlify Development Rules](https://hub.continue.dev/netlify/netlify-development) (recommended)
44+
45+## Quick Setup
46+
47+<Steps>
48+ <Step title="Install Continue CLI">
49+ ```bash
50+ npm i -g @continuedev/cli
51+ ```
52+ </Step>
53+
54+<Step title="Configure Netlify MCP">
55+ 1. Install Netlify CLI: `npm i -g netlify-cli` 2. Authenticate with Netlify:
56+ `netlify login` 3. Visit [Netlify MCP on Continue
57+ Hub](https://hub.continue.dev/netlify/netlify-mcp) 4. Follow the configuration
58+ instructions for your editor
59+</Step>
60+
61+ <Step title="Add Development Rules">
62+ Install the [Netlify Development Rules](https://hub.continue.dev/netlify/netlify-development) bundle for best practices:
63+
64+ 1. Visit the bundle page on Continue Hub
65+ 2. Click **"Install Rules"**
66+ 3. Rules automatically apply to your agent
67+
68+ </Step>
69+
70+ <Step title="Verify Setup">
71+ Test the connection with cn CLI:
72+
73+ ```bash
74+ cn
75+ # Then in TUI mode:
76+ "Check my Netlify auth and list sites"
77+ ```
78+
79+ </Step>
80+</Steps>
81+
82+<Info>
83+ The Netlify Development Rules bundle includes guardrails for: - Proper
84+ `.gitignore` configuration - Function structure and placement - Edge function
85+ constraints - Local development best practices
86+</Info>
87+
88+## Performance Optimization Steps
89+
90+### Step 1: Baseline Performance Metrics
91+
92+Establish your current performance baseline using cn CLI:
93+
94+```bash
95+# Start cn in TUI mode
96+cn
97+
98+# Then ask:
99+"Show my site's Core Web Vitals and build times"
100+```
101+
102+<Tip>
103+ **Test in Plan Mode First**: Before making performance optimizations that
104+ might affect your site, test your prompts in plan mode (see the [Plan Mode
105+ Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes). This
106+ shows you what the agent will do without executing it. For example: `"Set up
107+ A/B testing between main and feature branch with performance monitoring"`
108+</Tip>
109+
110+<Info>
111+
112+ Netlify automatically tracks:
113+ - **Build Performance**: Compile times, cache
114+ hits
115+ - **Runtime Performance**: Core Web Vitals, Time to Interactive
116+ - **Resource Usage**: Bandwidth, function execution times
117+
118+</Info>
119+
120+### Step 2: A/B Test Branch Performance
121+
122+Compare performance between branches:
123+
124+```bash
125+# In cn TUI mode:
126+"Set up A/B test between main and feature branch on Netlify:
127+- Split traffic 50/50 between branches
128+- Track Core Web Vitals for each variant
129+- Monitor conversion metrics and bounce rate
130+- Enable analytics to measure performance impact
131+- Configure cookie-based visitor persistence
132+- Set test duration for 1000 unique visitors
133+- Auto-conclude test when statistical significance reached
134+Report winner based on performance + conversion metrics"
135+```
136+
137+<Info>
138+ **Enhanced Analytics**: Combine Netlify's A/B testing with PostHog session
139+ recordings to understand not just which variant performs better, but why users
140+ behave differently. See our [PostHog session analysis
141+ guide](/guides/posthog-github-continuous-ai) to set up session tracking and
142+ create a complete continuous AI analytics workflow.
143+</Info>
144+
145+### Step 3: Advanced Build Optimization with Netlify
146+
147+Leverage Netlify's powerful build features to dramatically reduce build times:
148+
149+```bash
150+# In cn TUI mode:
151+"Optimize my Netlify build performance using these features:
152+
153+1. Enable Netlify Cache Plugin for dependency caching
154+ - Configure @netlify/plugin-cache for node_modules
155+ - Set up custom cache directories for .next/cache or .nuxt
156+ - Enable Gatsby's incremental builds if applicable
157+
158+2. Set up Build Plugins from Netlify's ecosystem:
159+ - Install @netlify/plugin-lighthouse for performance monitoring
160+ - Add netlify-plugin-checklinks to prevent broken links
161+ - Configure netlify-plugin-submit-sitemap for SEO
162+
163+3. Implement Conditional Builds:
164+ - Skip builds when only docs change (ignore: /docs/**)
165+ - Use build.ignore script for custom logic
166+ - Set up monorepo-specific build triggers
167+
168+4. Configure concurrent builds for monorepos
169+ - Set base directory per package
170+ - Use pnpm workspaces or yarn workspaces
171+
172+Show me the netlify.toml configuration and explain each optimization"
173+```
174+
175+<Info>
176+ **Netlify Build Features You're Getting**:
177+ - [Build Caching](https://docs.netlify.com/configure-builds/build-caching/) - Persist dependencies between builds
178+ - [Build Plugins](https://docs.netlify.com/integrations/build-plugins/) - Extend build process with 100+ plugins
179+ - [Conditional Builds](https://docs.netlify.com/configure-builds/ignore-builds/) - Skip unnecessary builds
180+ - [Monorepo Support](https://docs.netlify.com/configure-builds/monorepos/) - Optimize multi-package repos
181+
182+These features can reduce build times by 50-70% for most projects!
183+
184+</Info>
185+
186+<Tip>
187+ **Discover more optimization prompts!** The Netlify community has documented dozens of build optimization strategies in their [Support Guide: How can I optimize my Netlify build time](https://answers.netlify.com/t/support-guide-how-can-i-optimize-my-netlify-build-time/3907).
188+
189+ Use this guide as inspiration for cn CLI prompts not covered in this cookbook, such as:
190+ - `"Configure my builds to skip Dependabot PRs automatically"`
191+ - `"Set up custom ignore patterns for documentation-only changes"`
192+ - `"Optimize my Contentful webhooks to prevent duplicate builds"`
193+ - `"Show me how to use build hooks instead of automatic git triggers"`
194+ - `"Help me choose between Astro and Hugo based on build performance"`
195+
196+ The community guide contains real-world scenarios that you can turn into AI-assisted solutions - just describe what you want to achieve and let cn CLI handle the implementation!
197+</Tip>
198+
199+### Step 4: Bundle Analysis with Netlify's Built-in Tools
200+
201+Use Netlify's bundle analyzer and optimization features:
202+
203+```bash
204+# In cn TUI mode:
205+"Analyze and optimize my bundle using Netlify's tools:
206+
207+1. Enable Netlify Bundle Analyzer:
208+ - Add @netlify/plugin-bundle-analyzer to plugins
209+ - Configure size thresholds in netlify.toml
210+ - Generate visual bundle reports
211+
212+2. Set up Asset Optimization:
213+ - Enable automatic JS minification
214+ - Configure CSS optimization
215+ - Turn on HTML minification
216+ - Set up image processing pipeline
217+
218+3. Implement Smart Code Splitting:
219+ - Analyze current chunks with the bundle analyzer
220+ - Identify components over 50KB for splitting
221+ - Configure webpack/vite for optimal chunking
222+ - Set up route-based code splitting
223+
224+4. Configure Netlify's CDN for optimal delivery:
225+ - Set cache headers for static assets
226+ - Enable Brotli compression
227+ - Configure edge caching rules
228+
229+Generate a full report with before/after bundle sizes"
230+```
231+
232+<Card title="Netlify's Performance Arsenal" icon="rocket">
233+
234+ **Features Available Through Netlify MCP**:
235+ - [Bundle
236+ Analyzer](https://docs.netlify.com/configure-builds/build-plugins/bundle-analyzer/): Visualize your JavaScript bundles
237+ - [Asset
238+ Optimization](https://docs.netlify.com/configure-builds/post-processing/):
239+ Automatic minification and compression
240+ - [Edge
241+ Network](https://docs.netlify.com/platform/edge-network/): Global CDN with
242+ smart caching
243+ - [Deploy
244+ Previews](https://docs.netlify.com/site-deploys/deploy-previews/): Test
245+ optimizations before production
246+
247+</Card>
248+
249+### Step 5: Image Optimization
250+
251+Optimize images for better performance:
252+
253+```bash
254+# In cn TUI mode:
255+"Set up Cloudinary image optimization for my Netlify site:
256+- Install @cloudinary/netlify-plugin via MCP
257+- Auto-convert images to WebP with fallbacks
258+- Generate responsive sizes (320w, 640w, 1024w, 1920w)
259+- Add lazy loading for all images
260+- Configure blur-up placeholders
261+- Update netlify.toml with Cloudinary settings
262+Target: Reduce image payload by 60-80% and improve LCP"
263+```
264+
265+## Continuous Performance Monitoring
266+
267+### Step 6: Performance Budget Enforcement with Lighthouse CI
268+
269+Set and enforce performance budgets with automated testing:
270+
271+```bash
272+# In cn TUI mode:
273+"Set up Lighthouse CI with performance budgets for my Netlify site:
274+
275+Requirements:
276+- LCP must be < 2.5 seconds
277+- JavaScript bundle must be < 200KB
278+- Total size < 500KB
279+- Performance score >= 90
280+
281+Setup needed:
282+1. Install @lhci/cli and @netlify/plugin-lighthouse
283+2. Create lighthouserc.js with these budget assertions
284+3. Configure netlify.toml to run checks on all deploys
285+4. Add GitHub status checks to block PRs that exceed budgets
286+5. Create performance dashboard at /lighthouse-reports
287+
288+Please configure the complete Lighthouse CI setup with these budgets."
289+```
290+
291+<Tip>
292+ This comprehensive setup will automatically test every deploy preview and
293+ production deployment, blocking any changes that violate your performance
294+ budgets.
295+</Tip>
296+
297+### Step 7: Real User Monitoring with Netlify Analytics
298+
299+Leverage Netlify's built-in analytics and integrate advanced RUM solutions:
300+
301+```bash
302+# In cn TUI mode:
303+"Set up comprehensive Real User Monitoring for my Netlify site:
304+
305+1. Configure Netlify Analytics Pro (requires Pro account):
306+ - Set up server-side analytics (no JS required)
307+ - Track Core Web Vitals (LCP, FID, CLS, INP)
308+ - Monitor top pages by performance score
309+ - Create custom performance alerts
310+ - Configure weekly performance reports
311+
312+2. Integrate Web Vitals tracking:
313+ - Install web-vitals library for detailed metrics
314+ - Send metrics to Netlify Functions endpoint
315+ - Store performance data in Netlify Blobs
316+ - Create performance dashboard at /metrics
317+
318+3. Set up Performance Alerts:
319+ - Alert when P75 LCP > 3 seconds
320+ - Notify if CLS increases by 20%
321+ - Monitor JavaScript error rates
322+ - Track 404s and broken resources
323+ - Send alerts to Slack via Netlify Functions
324+
325+4. Configure Geographic Performance Monitoring:
326+ - Use Netlify Edge Functions to track region-specific metrics
327+ - Identify slow regions with Edge geo data
328+ - Compare performance across CDN nodes
329+ - Optimize edge caching for slow regions
330+
331+5. Create Custom Performance Dashboard:
332+ - Build dashboard page using Netlify Functions
333+ - Display real-time Core Web Vitals
334+ - Show performance trends over time
335+ - Include browser and device breakdowns
336+
337+Show me the complete implementation with all code and configurations"
338+```
339+
340+<Warning>
341+ **Note**: Netlify Analytics Pro requires a paid Netlify Pro account ($19/month
342+ per site). The prompt above assumes you have this plan. For free tier users,
343+ focus on steps 2-5 which use Netlify Functions and Edge Functions to build
344+ custom analytics.
345+</Warning>
346+
347+<Info>
348+ **Netlify Analytics Advantages**:
349+ - [Server-side Analytics](https://docs.netlify.com/analytics/get-started/) - No client-side JavaScript needed
350+ - [Core Web Vitals](https://docs.netlify.com/analytics/core-web-vitals/) - Automatic tracking of Google's metrics
351+ - [Custom Metrics](https://docs.netlify.com/functions/logs/) - Track any metric via Functions
352+ - [Edge Insights](https://docs.netlify.com/edge-functions/overview/#geolocation) - Geographic performance data
353+ - [No Cookie Banner Required](https://docs.netlify.com/analytics/get-started/#privacy) - GDPR compliant by default
354+
355+Unlike Google Analytics, Netlify Analytics:
356+
357+- Doesn't slow down your site (server-side)
358+- Captures 100% of traffic (no ad blockers)
359+- Respects user privacy (no cookies)
360+- Shows bot traffic separately
361+</Info>
362+
363+<Tip>
364+
365+ **Pro Tip**
366+ Combine Netlify Analytics with Edge Functions to create a
367+ powerful RUM solution that:
368+ - Tracks performance by user segment
369+ - A/B tests
370+ performance optimizations
371+ - Personalizes content based on connection speed
372+ - Automatically serves lighter assets to slow connections
373+
374+</Tip>
375+
376+## Automated Performance Checks
377+
378+### GitHub Actions Performance Guard
379+
380+Block PRs that degrade performance:
381+
382+```yaml
383+name: Performance Check
384+
385+on:
386+ pull_request:
387+
388+jobs:
389+ performance:
390+ runs-on: ubuntu-latest
391+ steps:
392+ - uses: actions/checkout@v4
393+ - uses: actions/setup-node@v4
394+ with:
395+ node-version: "22"
396+
397+ - name: Deploy and Test Performance
398+ id: perf
399+ env:
400+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
401+ NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
402+ run: |
403+ npx @continuedev/cli@latest << 'EOF'
404+ Deploy PR preview and run Lighthouse.
405+ Compare scores with main branch.
406+ Output JSON with score deltas.
407+ EOF > performance.json
408+
409+ - name: Comment Performance Results
410+ uses: actions/github-script@v7
411+ with:
412+ script: |
413+ const fs = require('fs');
414+ const perf = JSON.parse(fs.readFileSync('performance.json'));
415+
416+ const emoji = perf.score_delta < -10 ? '🔴' :
417+ perf.score_delta < 0 ? '🟡' : '🟢';
418+
419+ const comment = `## ${emoji} Performance Impact
420+
421+ | Metric | Main | PR | Delta |
422+ |--------|------|----|---------|
423+ | Performance Score | ${perf.main_score} | ${perf.pr_score} | ${perf.score_delta > 0 ? '+' : ''}${perf.score_delta} |
424+ | LCP | ${perf.main_lcp}s | ${perf.pr_lcp}s | ${perf.lcp_delta > 0 ? '+' : ''}${perf.lcp_delta}s |
425+ | Bundle Size | ${perf.main_bundle}KB | ${perf.pr_bundle}KB | ${perf.bundle_delta > 0 ? '+' : ''}${perf.bundle_delta}KB |
426+
427+ ${perf.score_delta < -10 ? '⚠️ **This PR significantly degrades performance. Please optimize before merging.**' : ''}
428+
429+ [View Full Report](${perf.report_url})`;
430+
431+ github.rest.issues.createComment({
432+ issue_number: context.issue.number,
433+ owner: context.repo.owner,
434+ repo: context.repo.repo,
435+ body: comment
436+ });
437+
438+ // Fail check if performance degrades significantly
439+ if (perf.score_delta < -10) {
440+ core.setFailed('Performance degraded by more than 10 points');
441+ }
442+```
443+
444+<Warning>
445+ This workflow will: - **Block merge** if performance score drops >10 points -
446+ **Warn** on any performance regression - **Celebrate** improvements with green
447+ indicators
448+</Warning>
449+
450+## Performance Testing Locally
451+
452+### Step 8: Local Performance Testing
453+
454+Test performance before deploying:
455+
456+```bash
457+# In cn TUI mode:
458+"Run production build and measure bundle sizes"
459+```
460+
461+### Step 9: Pre-commit Performance Checks
462+
463+Prevent performance regressions before they happen:
464+
465+```bash
466+# In cn TUI mode:
467+"Add pre-commit hooks for bundle size limits"
468+```
469+
470+## Performance Troubleshooting
471+
472+### Debug Performance Issues
473+
474+Identify and fix performance bottlenecks:
475+
476+```bash
477+# In cn TUI mode:
478+"Why did my performance score drop?"
479+```
480+
481+### Performance Issue Quick Fixes
482+
483+| Issue | Quick Fix Command (in cn TUI) |
484+| ------------- | --------------------------------- |
485+| Slow LCP | `"Preload critical resources"` |
486+| High CLS | `"Add size attributes to images"` |
487+| Large bundles | `"Implement code splitting"` |
488+| Slow builds | `"Enable build caching"` |
489+| Poor caching | `"Configure cache headers"` |
490+
491+## What You've Accomplished
492+
493+<Card title="Performance-First Development" icon="gauge-high">
494+
495+ You've built an AI-powered performance optimization system that:
496+ - Automatically monitors Core Web Vitals
497+ - Runs A/B tests between branches
498+ - Blocks deployments that degrade performance
499+ - Provides actionable optimization
500+ suggestions
501+
502+</Card>
503+
504+## Discover Netlify's Hidden Performance Gems
505+
506+Features many developers don't know Netlify offers:
507+
508+<CardGroup cols={2}>
509+ <Card title="Edge Functions" icon="bolt">
510+
511+ **[Netlify Edge Functions](https://docs.netlify.com/edge-functions/overview/)**
512+ - Run code at the edge, closer to users
513+ - Transform responses on-the-fly
514+ - A/B test at the edge level
515+ - Personalize content without client-side JS
516+
517+ </Card>
518+
519+<Card title="Netlify Graph" icon="diagram-project">
520+
521+ **[Netlify Graph](https://docs.netlify.com/graph/overview/)**
522+ - Unified GraphQL gateway for all your APIs
523+ - Automatic TypeScript generation
524+ - Built-in authentication handling
525+ - Zero client-side API keys needed
526+
527+</Card>
528+
529+<Card title="On-Demand Builders" icon="hammer">
530+ **[On-Demand
531+ Builders](https://docs.netlify.com/configure-builds/on-demand-builders/)** -
532+ Generate pages only when requested - Cache dynamically generated content -
533+ Perfect for large sites (10k+ pages) - Reduce build times dramatically
534+</Card>
535+
536+ <Card title="Netlify Functions" icon="function">
537+ **[Background Functions](https://docs.netlify.com/functions/background-functions/)**
538+ - Run tasks up to 15 minutes
539+ - Process webhooks asynchronously
540+ - Handle heavy computations
541+ - No timeout worries
542+ </Card>
543+</CardGroup>
544+
545+```bash
546+# Try these advanced features in cn TUI mode:
547+"Show me how to use Netlify Edge Functions for geo-based personalization"
548+"Set up On-Demand Builders for my blog with 5000 posts"
549+"Configure Background Functions for image processing"
550+```
551+
552+## Performance Best Practices
553+
554+The Netlify Performance Rules enforce:
555+
556+<CardGroup cols={3}>
557+ <Card title="Build Optimization" icon="hammer">
558+ - Dependency caching enabled
559+ - Parallel builds when possible
560+ - Incremental compilation
561+ - Smart cache invalidation
562+ </Card>
563+
564+ <Card title="Runtime Performance" icon="bolt">
565+ - Automatic image optimization
566+ - Efficient resource hints (preload, prefetch)
567+ - Optimal cache headers
568+ - CDN configuration
569+ </Card>
570+
571+ <Card title="Monitoring Standards" icon="chart-line">
572+ - Performance budgets enforced
573+ - Core Web Vitals tracking
574+ - Real user monitoring
575+ - Automated alerts
576+ </Card>
577+</CardGroup>
578+
579+## Advanced Performance Strategies
580+
581+### Progressive Enhancement
582+
583+```bash
584+# In cn TUI mode:
585+"Implement progressive enhancement with basic HTML first"
586+```
587+
588+### Multi-variant Testing
589+
590+```bash
591+# In cn TUI mode:
592+"Test 3 bundle strategies and auto-select winner"
593+```
594+
595+### Predictive Prefetching
596+
597+```bash
598+# In cn TUI mode:
599+"Analyze navigation patterns and prefetch next pages"
600+```
601+
602+## Next Steps
603+
604+- Install [Netlify MCP](https://hub.continue.dev/netlify/netlify-mcp) from Continue Hub
605+- Set up [Performance Monitoring](https://docs.netlify.com/analytics/get-started/)
606+- Configure [A/B Testing](https://docs.netlify.com/split-testing/overview/)
607+- Join the [Continue Discord](https://discord.gg/continue) for support
608+
609+## Resources
610+
611+- [Netlify MCP on Continue Hub](https://hub.continue.dev/netlify/netlify-mcp)
612+- [Core Web Vitals Guide](https://web.dev/vitals/)
613+- [Netlify Analytics Documentation](https://docs.netlify.com/analytics/)
614+- [Continue Performance Guides](https://docs.continue.dev/guides)
modified docs/guides/overview.mdx +8 −1
@@ -14,7 +14,14 @@
1414 - [Continuous AI: A Developer's Guide](/guides/continuous-ai) - Integrating AI into development workflows
1515 - [How to Use Continue CLI (cn)](/guides/cli) - Command-line interface for Continue
1616 - [Continuous AI Readiness Assessment](/guides/continuous-ai-readiness-assessment) - Evaluate team readiness for Continuous AI adoption
17-- [PostHog Session Analysis with Continue CLI](/guides/posthog-github-continuous-ai) - Analyze user behavior data to optimize your codebase with automatic issue creation
17+
18+## MCP Integration Cookbooks
19+
20+Step-by-step guides for integrating Model Context Protocol (MCP) servers with Continue:
21+
22+- [PostHog Session Analysis Cookbook](/guides/posthog-github-continuous-ai) - Analyze user behavior data to optimize your codebase with automatic issue creation
23+- [Netlify Performance Optimization Cookbook](/guides/netlify-mcp-continuous-deployment) - Optimize web performance with A/B testing and automated monitoring using Netlify MCP
24+- [Snyk + Continue Hub Agent Cookbook (MCP)](/guides/snyk-mcp-continue-cookbook) - Integrate Snyk MCP via Continue Hub to scan code, deps, IaC, and containers
1825
1926 ## What Advanced Tutorials Are Available
2027
modified docs/guides/posthog-github-continuous-ai.mdx +217 −196
@@ -41,77 +41,118 @@
4141 </Steps>
4242
4343 <Tip>
44- Continue CLI handles all the complex API interactions - you just need to
45- provide the right prompts!
44+ Continue CLI handles the complex API interactions - you just need to provide
45+ the right prompts!
4646 </Tip>
4747
4848 ## Step 1: Set Up Your Credentials
4949
50-First, you'll need to gather your API credentials and add them as secrets in Continue CLI.
50+First, you'll need to gather your PostHog and GitHub API credentials and add them as secrets in Continue CLI.
51+
52+<Tabs>
53+ <Tab title="PostHog API Credentials">
54+ You'll need a **Personal API Key** (not a Project API key) to access session recordings:
55+
56+ 1. Go to [Personal API Keys](https://app.posthog.com/settings/user-api-keys) in PostHog
57+ 2. Click **+ Create a personal API Key**
58+ 3. Name it "Continue CLI Session Analysis"
59+ 4. Select these scopes:
60+ - `session_recording:read` - **Required** for accessing session data
61+ - `insight:read`
62+ - `query:read`
63+ - `session_recording_playlist:read`
64+ 5. Copy the key immediately (you won't see it again!)
65+ 6. Note your **Project ID** from your PostHog project settings
66+ 7. Note your PostHog host URL (e.g., `https://us.posthog.com` or your custom domain)
67+ 8. You'll also need your POSTHOG_AUTH_HEADER value, which is simply `Bearer YOUR_API_KEY`
68+
69+ <Tip>
70+ **Find Your Project Details**: Your Project ID is in your PostHog URL:
71+ `https://app.posthog.com/project/YOUR_PROJECT_ID`
72+ </Tip>
73+
74+ </Tab>
75+ <Tab title="GitHub Personal Access Token">
76+ You'll need a **Personal Access Token** to create issues in your GitHub repository:
77+
78+ 1. Go to [GitHub Personal Access Tokens](https://github.com/settings/personal-access-tokens/new)
79+ 2. Click **"Generate new token (classic)"**
80+ 3. Name it "Continue CLI PostHog Analysis"
81+ 4. Select these scopes:
82+ - `repo` (or just `public_repo` if your repository is public)
83+ - `issues:write` - **Required** for creating issues
84+ 5. Copy the token immediately
85+
86+ </Tab>
87+</Tabs>
5188
52-### Get Your PostHog API Credentials
89+### Add Secrets to Continue CLI
5390
54-You need a **Personal API Key** (not a Project API key) to access session recordings:
91+To add environment variables to your Continue Hub account:
5592
56-1. Go to [Personal API Keys](https://app.posthog.com/settings/user-api-keys) in PostHog
57-2. Click **+ Create a personal API Key**
58-3. Name it "Continue CLI Session Analysis"
59-4. Select these scopes:
60- - `session_recording:read` - **Required** for accessing session data
61- - `insight:read` - Optional, for additional analytics
62-5. Copy the key immediately (you won't see it again!)
93+1. Go to the [Continue Hub](https://hub.continue.dev)
94+2. Sign in to your account
95+3. Navigate to your user settings
96+4. Look for the "Secrets" section
97+5. Add your variables there (like POSTHOG_API_KEY, POSTHOG_PROJECT_ID,
98+ POSTHOG_HOST,GITHUB_PAT, etc.)
6399
64-<Tip>
65- **Find Your Project Details**: Your Project ID is in your PostHog URL:
66- `https://app.posthog.com/project/YOUR_PROJECT_ID`
67-</Tip>
100+These environment variables will then be securely stored and available for use in
101+your Continue workflows.
68102
69-### Get Your GitHub Personal Access Token
103+## PostHog GitHub Continuous AI Workflow Options
70104
71-1. Go to [GitHub Personal Access Tokens](https://github.com/settings/personal-access-tokens/new)
72-2. Click **"Generate new token (classic)"**
73-3. Name it "Continue CLI PostHog Analysis"
74-4. Select these scopes:
75- - `repo` (or just `public_repo` if your repository is public)
76- - `issues:write` - **Required** for creating issues
77-5. Copy the token immediately
105+<Card title="🚀 Fastest Path to Success" icon="zap">
106+ Skip the manual setup and use our pre-built PostHog GitHub agent that includes
107+ optimized prompts, rules, and the PostHog MCP for more consistent results.
108+</Card>
78109
79-### Add Secrets to Continue CLI
110+After completing **Step 1** below, you have two paths to get started:
80111
81-Use Continue CLI's built-in environment setup helper:
112+<Tabs>
113+ <Tab title="⚡ Quick Start (Recommended)">
114+ **Perfect for:** Immediate results with optimized prompts and built-in debugging
82115
83-```bash
84-cn -p "Help me set up my environment for PostHog session analysis. Please:
85-1. Check if I have the required secrets configured in Continue CLI:
86- - POSTHOG_API_KEY
87- - POSTHOG_PROJECT_ID
88- - POSTHOG_HOST
89- - GITHUB_PAT
90-2. If any are missing, guide me through:
91- - How to get PostHog Personal API Key from PostHog settings
92- - How to find my PostHog Project ID from the URL
93- - How to create a GitHub Personal Access Token with issues:write permission
94- - How to add these as secrets in Continue CLI
95-3. Help me identify my GitHub repository owner and name by:
96- - Checking git remote origin URL
97- - Or asking me to provide them
98-4. Test the API connections by making a simple API call to both PostHog and GitHub to verify the credentials work.
99-Please walk me through this setup process step by step."
100-```
116+ <Steps>
117+ <Step title="Add the Pre-Built Agent">
118+ Visit the [PostHog GitHub Continuous AI Agent](https://hub.continue.dev/continuedev/awesome-models-posthog-gh) on Continue Hub and click **"Install Agent"**
101119
102-<Info>
103- Continue CLI will guide you through adding secrets and testing your API
104- connections. Follow the prompts to add: - `POSTHOG_API_KEY`: Your PostHog
105- Personal API Key - `POSTHOG_PROJECT_ID`: Your PostHog Project ID -
106- `POSTHOG_HOST`: `https://us.posthog.com` (or your custom PostHog host) -
107- `GITHUB_PAT`: Your GitHub Personal Access Token
108-</Info>
120+ This agent includes:
121+ - **Optimized prompts** for PostHog analysis and GitHub issue creation
122+ - **Built-in rules** for consistent formatting and error handling
123+ - **PostHog MCP** for more reliable API interactions
124+ </Step>
125+
126+ <Step title="Verify Your Secrets">
127+ The agent uses these Hub resources automatically:
128+ - **Environment Variables**: [bekahhw/env-vars](https://hub.continue.dev/bekahhw/env-vars)
129+ - **Analysis Rules**: [bekah-hawrot-weigel/posthog-github-continuous-ai-rules](https://hub.continue.dev/bekah-hawrot-weigel/posthog-github-continuous-ai-rules)
130+ - **Analysis Prompt**: [continuedev/posthog-analysis](https://hub.continue.dev/continuedev/posthog-analysis)
131+ - **Issue Creation Prompt**: [continuedev/github-issues](https://hub.continue.dev/continuedev/github-issues)
132+ </Step>
133+
134+ <Step title="Run the Analysis">
135+ Navigate to your project directory and run:
136+ ```bash
137+ cn "Give me my PostHog Session data and create GitHub issues based on the problems."
138+ ```
139+
140+ That's it! The agent handles everything automatically.
141+ </Step>
142+ </Steps>
143+
144+ <Info>
145+ **Why Use the Agent?** Results are more consistent and debugging is easier thanks to the PostHog MCP integration and pre-tested prompts.
146+ </Info>
147+
148+ </Tab>
109149
110-## Step 2: Analyze PostHog Sessions with Continue CLI
150+ <Tab title="🛠️ Manual Setup">
151+ **Perfect for:** Learning the process and customizing prompts.
111152
112-Now you'll use Continue CLI to fetch PostHog session data and analyze it for UX issues. Continue CLI handles all the API calls and analysis automatically.
153+ Now you'll use Continue CLI to fetch PostHog session data and analyze it for UX issues. Continue CLI handles all the API calls and analysis automatically.
113154
114-### Run the Analysis
155+### Run the PostHog Analysis
115156
116157 Use this prompt with Continue CLI to fetch and analyze your PostHog sessions:
117158
@@ -143,19 +184,7 @@
143184 Please make the API call, analyze the data, and provide the 3 formatted issues. Base all recommendations on actual patterns in the session data."
144185 ```
145186
146-<Info>
147- **What Continue CLI Does:** - Makes authenticated API calls to PostHog using
148- your stored secrets - Fetches and filters session recordings automatically -
149- Analyzes patterns in the data using AI - Generates structured issue
150- descriptions ready for GitHub
151-</Info>
152-
153-<Tip>
154- Save the analysis output to a file by adding `> analysis-results.txt` to the
155- command if you want to review it later.
156-</Tip>
157-
158-## Step 3: Create GitHub Issues Automatically
187+### Create GitHub Issues from PostHog Analysis
159188
160189 Now use Continue CLI to create GitHub issues from your analysis results:
161190
@@ -183,6 +212,21 @@
183212 "
184213 ```
185214
215+ </Tab>
216+</Tabs>
217+
218+<Accordion title="Agent Requirements">
219+ To use the pre-built agent, you need either:
220+ - **Continue CLI Pro Plan** with
221+ the models add-on, OR
222+ - **Your own API keys** added to Continue Hub secrets
223+ (same as Step 1 below) The agent will automatically detect and use your
224+ configuration.
225+
226+</Accordion>
227+
228+---
229+
186230 <Warning>
187231 **Repository Labels Required**: Make sure your GitHub repository has these labels:
188232 - `bug`, `enhancement`
@@ -200,7 +244,7 @@
200244 issues to avoid spam - Provides confirmation with issue URLs
201245 </Info>
202246
203-## Step 4: Set Up Automated GitHub Actions Workflow
247+## Setting Up Automated GitHub Actions Workflow
204248
205249 Create a GitHub Actions workflow that runs your Continue CLI analysis automatically on a schedule.
206250
@@ -211,26 +255,23 @@
211255 1. Go to **Repository Settings → Secrets and variables → Actions**
212256 2. Click **"New repository secret"** and add:
213257 - `CONTINUE_API_KEY`: Your Continue API key from hub.continue.dev
214- - `POSTHOG_API_KEY`: Your PostHog Personal API Key
215- - `POSTHOG_PROJECT_ID`: Your PostHog Project ID
216- - `POSTHOG_HOST`: `https://us.posthog.com` (or your custom PostHog host)
217- - `GITHUB_PAT`: Your GitHub Personal Access Token
218258
219259 ### Create GitHub Actions Workflow
220260
221261 Create `.github/workflows/posthog-analysis.yml` in your repository:
222262
263+<Tabs>
264+ <Tab title="⚡ Using Pre-Built Agent (Recommended)">
223265 ```yaml
224-name: PostHog Session Analysis with Continue CLI
266+name: PostHog Session Analysis with Continue CLI Agent
225267
226268 on:
227- schedule:
228- - cron: "0 6 * * *" # Run at 6 AM UTC daily
229- workflow_dispatch: # Allow manual triggering
269+schedule: - cron: "0 6 \* \* \*" # Run at 6 AM UTC daily
270+workflow_dispatch: # Allow manual triggering
230271
231272 jobs:
232- analyze:
233- runs-on: ubuntu-latest
273+analyze:
274+runs-on: ubuntu-latest
234275
235276 permissions:
236277 contents: read
@@ -250,14 +291,72 @@
250291 echo "✅ Continue CLI installed"
251292 cn --version
252293
253- - name: Set up environment variables
294+ - name: Authenticate with Continue CLI
295+ run: |
296+ # Set Continue API key
297+ export CONTINUE_API_KEY="${{ secrets.CONTINUE_API_KEY }}"
298+ # Login to Continue CLI
299+ if ! cn auth login --api-key "$CONTINUE_API_KEY"; then
300+ echo "❌ Failed to authenticate with Continue CLI"
301+ exit 1
302+ fi
303+ echo "✅ Continue CLI authenticated"
304+
305+ - name: Load PostHog GitHub Agent
306+ run: |
307+ echo "🤖 Loading PostHog GitHub Continuous AI Agent..."
308+ cn --config continuedev/awesome-models-posthog-gh
309+ echo "✅ Agent loaded successfully"
310+
311+ - name: Run PostHog Analysis and Create GitHub Issues
312+ run: |
313+ echo "🎬 Starting automated PostHog session analysis..."
314+
315+ # Run the agent with the simple prompt
316+ cn -p "Tell me about my PostHog session recordings and create GitHub issues based on the problems."
317+
318+ echo "✅ Analysis and issue creation completed"
319+
320+ - name: Summary
321+ run: |
322+ echo "✅ PostHog analysis workflow completed!"
323+ echo "📊 Check the artifacts for detailed analysis results"
324+ echo "🐛 Check your repository issues for newly created UX issues"
325+ echo "🤖 Agent automatically handled both analysis and issue creation"
326+ ```
327+
328+ </Tab>
329+
330+ <Tab title="🛠️ Manual Setup Version">
331+
332+```yaml
333+name: PostHog Session Analysis with Continue CLI Manual
334+
335+on:
336+schedule: - cron: "0 6 \* \* \*" # Run at 6 AM UTC daily
337+workflow_dispatch: # Allow manual triggering
338+
339+jobs:
340+analyze:
341+runs-on: ubuntu-latest
342+
343+ permissions:
344+ contents: read
345+ issues: write
346+
347+ steps:
348+ - uses: actions/checkout@v4
349+
350+ - name: Set up Node.js
351+ uses: actions/setup-node@v4
352+ with:
353+ node-version: "18"
354+
355+ - name: Install Continue CLI
254356 run: |
255- echo "POSTHOG_API_KEY=${{ secrets.POSTHOG_API_KEY }}" >> $GITHUB_ENV
256- echo "POSTHOG_PROJECT_ID=${{ secrets.POSTHOG_PROJECT_ID }}" >> $GITHUB_ENV
257- echo "POSTHOG_HOST=${{ secrets.POSTHOG_HOST || 'https://us.posthog.com' }}" >> $GITHUB_ENV
258- echo "GITHUB_PAT=${{ secrets.GITHUB_PAT }}" >> $GITHUB_ENV
259- echo "GITHUB_OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
260- echo "GITHUB_REPO=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
357+ npm install -g @continuedev/cli
358+ echo "✅ Continue CLI installed"
359+ cn --version
261360
262361 - name: Authenticate with Continue CLI
263362 run: |
@@ -274,13 +373,12 @@
274373 run: |
275374 echo "🎬 Starting PostHog session analysis..."
276375 # Create the analysis prompt
277- cat > analysis_prompt.txt << 'EOF'
278376 I need you to help me analyze PostHog session recordings to identify UX issues. Please:
279377
280378 1. First, fetch session recordings from PostHog using these details:
281- - Use the POSTHOG_API_KEY, POSTHOG_PROJECT_ID, and POSTHOG_HOST from environment variables
282- - API endpoint: $POSTHOG_HOST/api/projects/$POSTHOG_PROJECT_ID/session_recordings/?limit=20
283- - Include Authorization header: "Bearer $POSTHOG_API_KEY"
379+ - Use the POSTHOG_API_KEY, POSTHOG_PROJECT_ID, and POSTHOG_HOST from my secrets
380+ - API endpoint: {POSTHOG_HOST}/api/projects/{POSTHOG_PROJECT_ID}/session_recordings/?limit=20
381+ - Include Authorization header: 'Bearer {POSTHOG_API_KEY}'
284382
285383 2. Filter the sessions to find problematic ones with either:
286384 - console_error_count > 0 (JavaScript errors)
@@ -300,43 +398,22 @@
300398 **Impact**: Quantify the impact (e.g., 'Affects 80% of sessions')
301399
302400 Please make the API call, analyze the data, and provide the 3 formatted issues. Base all recommendations on actual patterns in the session data.
303-
304- Environment context:
305- - POSTHOG_API_KEY: $POSTHOG_API_KEY
306- - POSTHOG_PROJECT_ID: $POSTHOG_PROJECT_ID
307- - POSTHOG_HOST: $POSTHOG_HOST
308- - GitHub Repo: $GITHUB_OWNER/$GITHUB_REPO
309401 EOF
310402
311- # Run the analysis
312- cn < analysis_prompt.txt > analysis-results.txt 2>&1
313-
314- # Check if analysis completed
315- if [ ! -s analysis-results.txt ]; then
316- echo "❌ Analysis failed or produced no output"
317- exit 1
318- fi
319-
320403 echo "✅ Analysis completed"
321- echo "📄 Analysis results preview:"
322- head -20 analysis-results.txt
404+
323405
324406 - name: Create GitHub Issues from Analysis
325407 run: |
326408 echo "📝 Creating GitHub issues from analysis..."
327409 # Create the issue creation prompt
328- cat > issue_prompt.txt << 'EOF'
329410 I have analyzed PostHog session data and identified UX issues. Now I need you to create GitHub issues using the GitHub API.
330411
331- Use these details from environment variables:
332- - GITHUB_PAT: My GitHub Personal Access Token
333- - Repository: $GITHUB_OWNER/$GITHUB_REPO
334-
335412 For each issue in my analysis:
336413 1. Parse the issue title, body content, and priority level
337- 2. Create a GitHub issue via API POST to: https://api.github.com/repos/$GITHUB_OWNER/$GITHUB_REPO/issues
414+ 2. Create a GitHub issue via API POST to: https://api.github.com/repos/{owner}/{repo}/issues
338415 3. Use these headers:
339- - Authorization: token $GITHUB_PAT
416+ - Authorization: token {GITHUB_PAT}
340417 - Accept: application/vnd.github.v3+json
341418 - Content-Type: application/json
342419 4. Set labels based on priority:
@@ -347,57 +424,16 @@
347424
348425 Please create the GitHub issues and confirm they were successfully created with issue numbers and URLs.
349426
350- Here's my analysis to process:
351- EOF
352-
353- # Append the analysis results to the prompt
354- cat analysis-results.txt >> issue_prompt.txt
355-
356- # Run the issue creation
357- cn < issue_prompt.txt > issue-creation-results.txt 2>&1
358-
359427 echo "✅ Issue creation completed"
360- echo "📄 Issue creation results:"
361- cat issue-creation-results.txt
362-
363- - name: Upload Analysis Artifacts
364- uses: actions/upload-artifact@v4
365- if: always()
366- with:
367- name: analysis-results-${{ github.run_number }}
368- path: |
369- analysis-results.txt
370- issue-creation-results.txt
371- retention-days: 30
372428
373429 - name: Summary
374430 run: |
375431 echo "✅ PostHog analysis workflow completed!"
376- echo "📊 Check the artifacts for detailed analysis results"
377432 echo "🐛 Check your repository issues for newly created UX issues"
378-```
379-
380-## Step 5: Testing Your Workflow
381-
382-### Test Locally First
383-
384-Before setting up automation, test the workflow locally:
385-
386-**Test 1: Session Analysis**
387-
388-```bash
389-cn -p "[Paste the PostHog analysis prompt from Step 2]"
390-```
391-
392-Expected: Analysis output with 3 formatted GitHub issues
393-
394-**Test 2: Issue Creation**
395-
396-```bash
397-cn -p "[Paste the GitHub issue creation prompt from Step 3 with your analysis results]"
398-```
433+ ```
399434
400-Expected: Confirmation of GitHub issues created with URLs
435+ </Tab>
436+</Tabs>
401437
402438 ### Test the GitHub Actions Workflow
403439
@@ -406,48 +442,28 @@
406442 3. **Verify Issues**: Check that GitHub issues were created in your repository
407443
408444 <Check>
409- **Success Indicators:** - PostHog API returns session data (not empty) -
410- Continue CLI generates analysis with identified issues - GitHub issues are
411- created with proper labels and formatting - Workflow completes without errors
412-</Check>
413445
414-## Troubleshooting
446+ **Success Indicators:**
447+ - PostHog API returns session data (not empty)
448+ - Continue CLI generates analysis with identified issues
449+ - GitHub issues are created with proper labels and formatting
450+ - Workflow completes without errors
415451
416-If you encounter issues, use this helpful prompt to diagnose problems:
417-
418-```bash
419-cn -p "Help me set up my environment for PostHog session analysis. Please:
420-
421-1. Check if I have the required secrets configured in Continue CLI:
422- - POSTHOG_API_KEY
423- - POSTHOG_PROJECT_ID
424- - POSTHOG_HOST
425- - GITHUB_PAT
426-
427-2. If any are missing, guide me through:
428- - How to get PostHog Personal API Key from PostHog settings
429- - How to find my PostHog Project ID from the URL
430- - How to create a GitHub Personal Access Token with issues:write permission
431- - How to add these as secrets in Continue CLI
432-
433-3. Help me identify my GitHub repository owner and name by:
434- - Checking git remote origin URL
435- - Or asking me to provide them
436-
437-4. Test the API connections by making a simple API call to both PostHog and GitHub to verify the credentials work.
438-
439-Please walk me through this setup process step by step."
440-```
452+</Check>
441453
442454 ## What You've Built
443455
444456 After completing this guide, you have a complete **Continuous AI system** that:
445457
446-✅ **Monitors user experience** - Automatically fetches and analyzes PostHog session data
447-✅ **Identifies problems intelligently** - Uses AI to spot patterns and technical issues
448-✅ **Creates actionable tasks** - Generates GitHub issues with specific recommendations
449-✅ **Runs autonomously** - Operates daily without manual intervention using GitHub Actions
450-✅ **Scales with your team** - Handles growing amounts of session data automatically
458+- **Monitors user experience** - Automatically fetches and analyzes PostHog session data
459+
460+- **Identifies problems intelligently** - Uses AI to spot patterns and technical issues
461+
462+- **Creates actionable tasks** - Generates GitHub issues with specific recommendations
463+
464+- **Runs autonomously** - Operates daily without manual intervention using GitHub Actions
465+
466+- **Scales with your team** - Handles growing amounts of session data automatically
451467
452468 <Card title="Continuous AI" icon="rocket">
453469 Your system now operates at **[Level 2 Continuous
@@ -459,10 +475,15 @@
459475 ## Security Best Practices
460476
461477 <Warning>
462- **Protect Your API Keys:** - Store all credentials as GitHub Secrets, never in
463- code - Use Continue CLI's secure secret storage - Limit token scopes to
464- minimum required permissions - Rotate API keys regularly (every 90 days
465- recommended) - Monitor token usage for unusual activity
478+
479+ **Protect Your API Keys:**
480+ - Store all credentials as GitHub Secrets, never in
481+ code
482+ - Use Continue CLI's secure secret storage
483+ - Limit token scopes to minimum required permissions
484+ - Rotate API keys regularly (every 90 days recommended)
485+ - Monitor token usage for unusual activity
486+
466487 </Warning>
467488
468489 ## Advanced Prompts
added docs/guides/snyk-mcp-continue-cookbook.mdx +404 −0
@@ -0,0 +1,404 @@
1+---
2+title: "Automated Security Scanning with Snyk MCP and Continue"
3+description: "Set up an AI-powered security workflow that automatically scans your code, dependencies, infrastructure, and containers using natural language commands."
4+sidebarTitle: "Snyk Security Scanning with Continue"
5+---
6+
7+<Card title="What You'll Build" icon="shield-halved">
8+ An automated security scanning system that uses Continue's AI agent with Snyk
9+ MCP to identify vulnerabilities in code, dependencies, infrastructure, and
10+ containers - all through simple natural language prompts
11+</Card>
12+
13+## Prerequisites
14+
15+Before starting, ensure you have:
16+
17+- Continue account with **Hub access**
18+- Read: [Understanding Agents — How to get started with Hub agents](/guides/understanding-agents#how-to-get-started-with-hub-agents)
19+- Node.js 18+ installed locally
20+- [Snyk account](https://snyk.io/) (free tier works)
21+- A local project to scan for vulnerabilities
22+
23+<Steps>
24+ <Step title="Connect Snyk MCP via Continue Hub">
25+ Visit the [Snyk MCP on Continue Hub](https://hub.continue.dev/snyk/snyk-mcp) and click **Install** to add it to your Continue account.
26+
27+ This will add Snyk MCP to your agent's available tools. The Hub listing automatically configures the MCP command:
28+ ```bash
29+ npx -y snyk@latest mcp -t stdio
30+ ```
31+
32+ <Tip>
33+ **Alternative installation methods:**
34+ 1. **Quick CLI install**: `cn -p --mcp snyk/snyk-mcp`
35+ 2. **Manual configuration**: Add the MCP to your `~/.continue/config.json` under the `mcpServers` section
36+
37+ Once installed, Snyk MCP tools become available to your Continue agent for all prompts.
38+ </Tip>
39+
40+ <Info>
41+ The MCP will request authentication and folder trust permissions when first used.
42+ This is handled automatically by the Continue agent.
43+ </Info>
44+
45+ </Step>
46+
47+ <Step title="Add Secure-at-Inception Rules">
48+ Install the [Snyk Secure-at-Inception rules](https://hub.continue.dev/snyk/secure-at-inception) from the Hub to enable automatic security scanning.
49+
50+ **How to add rules to your agent:**
51+ 1. Visit the rules link above and click **Install**
52+ 2. The rules will be added to your agent configuration automatically
53+ 3. Rules apply globally to all your Continue sessions
54+
55+ These rules configure your agent to:
56+ - **Run [SAST](https://snyk.io/learn/application-security/sast/) scans** on newly generated or modified code
57+ - **Check dependencies** when adding or updating packages
58+ - **Auto-fix issues** using Snyk's recommendations, then rescan
59+
60+ </Step>
61+
62+ <Step title="Authenticate with Snyk">
63+ Use this prompt with your Continue agent to set up authentication:
64+
65+ ```
66+ Check Snyk auth status. If not authenticated, authenticate me and confirm my org context.
67+ ```
68+
69+ Or use the Continue CLI:
70+ ```bash
71+ cn -p "Check Snyk auth status. If not authenticated, authenticate me and confirm my org context."
72+ ```
73+
74+ <Tip>
75+ A browser window will open for Snyk login. After authenticating, approve
76+ the request to trust your project folder when prompted.
77+ </Tip>
78+
79+ </Step>
80+</Steps>
81+
82+## Security Scanning Recipes
83+
84+Now you can use natural language prompts to run comprehensive security scans. The Continue agent automatically calls the appropriate Snyk MCP tools.
85+
86+<Info>
87+ **Where to run these workflows:**
88+ - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
89+ - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
90+ - **CLI (headless mode)**: Use `cn -p "your prompt"` for one-off commands
91+
92+ **Test in Plan Mode First**: Before running security scans that might make
93+ changes, test your prompts in plan mode (see the [Plan Mode
94+ Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes in TUI/IDE). This
95+ shows you what the agent will do without executing it. For example: `"Run a
96+ Snyk Code scan and fix the top 3 issues"`
97+</Info>
98+
99+### Code Vulnerability Scanning ([SAST](https://snyk.io/learn/application-security/sast/))
100+
101+<Card title="Static Application Security Testing" icon="code">
102+ Scan your source code for security vulnerabilities and code quality issues.
103+
104+**Example prompt:**
105+```
106+Run a Snyk Code scan on this repo with severity threshold medium.
107+Summarize issues with file:line. Propose minimal diffs for the top 3
108+and rerun to verify.
109+```
110+
111+**Using Continue CLI:**
112+```bash
113+cn -p "Run a Snyk Code scan on this repo with severity threshold medium. Summarize issues with file:line. Propose minimal diffs for the top 3 and rerun to verify."
114+```
115+
116+</Card>
117+
118+### Dependency Scanning ([SCA](https://snyk.io/learn/software-composition-analysis-sca/))
119+
120+<Card title="Software Composition Analysis" icon="cube">
121+ Check open source dependencies for known vulnerabilities.
122+
123+**Example prompt:**
124+```
125+Run Snyk Open Source on this repo (include dev deps).
126+Summarize vulnerable paths and propose a minimal-risk upgrade plan.
127+Re-test after the plan (dry run).
128+```
129+
130+**Using Continue CLI:**
131+```bash
132+cn -p "Run Snyk Open Source on this repo (include dev deps). Summarize vulnerable paths and propose a minimal-risk upgrade plan. Re-test after the plan (dry run)."
133+```
134+
135+</Card>
136+
137+### Infrastructure as Code ([IaC](https://snyk.io/learn/infrastructure-as-code-iac/))
138+
139+<Card title="IaC Security" icon="cloud">
140+ Scan Terraform, CloudFormation, and Kubernetes configs for misconfigurations.
141+
142+**Example prompt:**
143+```
144+Scan ./infra with Snyk IaC. Report high/critical misconfigs
145+with exact files/lines. Provide code changes and re-scan to confirm.
146+```
147+
148+**Using Continue CLI:**
149+```bash
150+cn -p "Scan ./infra with Snyk IaC. Report high/critical misconfigs with exact files/lines. Provide code changes and re-scan to confirm."
151+```
152+
153+</Card>
154+
155+### Container Scanning
156+
157+<Card title="Container Security" icon="docker">
158+ Analyze Docker images for vulnerabilities in base images and packages.
159+
160+**Example prompt:**
161+```
162+Scan image my-api:latest. Exclude base image vulns.
163+Print dependency tree. Recommend a safer base image or upgrades.
164+Re-test after the change (dry run).
165+```
166+
167+**Using Continue CLI:**
168+```bash
169+cn -p "Scan image my-api:latest. Exclude base image vulns. Print dependency tree. Recommend a safer base image or upgrades. Re-test after the change (dry run)."
170+```
171+
172+</Card>
173+
174+### Pull Request Scanning
175+
176+<Card title="Changed Files Only" icon="code-branch">
177+ Focus scanning on modified files to catch issues before merging.
178+
179+**Example prompt:**
180+```
181+Scan only files changed since origin/main with Snyk Code.
182+Block if new high issues would be introduced. Show deltas.
183+```
184+
185+**Using Continue CLI:**
186+```bash
187+cn -p "Scan only files changed since origin/main with Snyk Code. Block if new high issues would be introduced. Show deltas."
188+```
189+
190+</Card>
191+
192+### Security Learning
193+
194+<Card title="Snyk Learn Integration" icon="graduation-cap">
195+ Access security education resources based on identified vulnerabilities ([CWE](https://cwe.mitre.org/)).
196+
197+**Example prompt:**
198+```
199+Open Snyk Learn lessons related to the top CWE(s) from this scan.
200+```
201+
202+**Using Continue CLI:**
203+```bash
204+cn -p "Open Snyk Learn lessons related to the top CWE(s) from this scan."
205+```
206+
207+</Card>
208+
209+## Continuous Security with GitHub Actions
210+
211+This example demonstrates a **Continuous AI workflow** where security scanning runs automatically in your CI/CD pipeline using Continue CLI in headless mode (`cn -p`) with Snyk MCP.
212+
213+### Add GitHub Secrets
214+
215+Navigate to **Repository Settings → Secrets and variables → Actions** and add:
216+
217+- `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
218+
219+### Create Workflow File
220+
221+Create `.github/workflows/snyk-security.yml` in your repository:
222+
223+```yaml
224+name: Security Scanning with Snyk MCP
225+
226+on:
227+ pull_request:
228+ branches: [main]
229+ push:
230+ branches: [main]
231+ schedule:
232+ - cron: "0 8 * * *" # Daily at 8 AM UTC
233+
234+jobs:
235+ security-scan:
236+ runs-on: ubuntu-latest
237+
238+ steps:
239+ - uses: actions/checkout@v4
240+
241+ - name: Set up Node.js
242+ uses: actions/setup-node@v4
243+ with:
244+ node-version: "18"
245+
246+ - name: Install Continue CLI
247+ run: |
248+ npm install -g @continuedev/cli
249+ echo "✅ Continue CLI installed"
250+
251+ - name: Authenticate Continue CLI
252+ run: |
253+ cn auth login --api-key "${{ secrets.CONTINUE_API_KEY }}"
254+ echo "✅ Continue CLI authenticated"
255+
256+ - name: Run Security Scans
257+ run: |
258+ echo "🔍 Running code vulnerability scan..."
259+ cn -p "Run Snyk Code scan with severity high on this repo.
260+ Fail if any high issues are present."
261+
262+ echo "📦 Checking dependencies..."
263+ cn -p "Run Snyk Open Source on this repo.
264+ Fail on fixable high issues."
265+
266+ - name: Generate Security Report
267+ if: always()
268+ run: |
269+ cn -p "Generate a markdown security report summarizing:
270+ - Total vulnerabilities by severity
271+ - Top 3 critical issues (if any)
272+ - Recommended next steps
273+ Save to security-report.md"
274+
275+ - name: Upload Security Report
276+ uses: actions/upload-artifact@v4
277+ if: always()
278+ with:
279+ name: security-report-${{ github.run_number }}
280+ path: security-report.md
281+ retention-days: 30
282+```
283+
284+<Info>
285+ The Snyk MCP authentication is handled through Continue Hub. No need to manage
286+ Snyk tokens directly in CI - the agent manages authentication.
287+</Info>
288+
289+## Security Guardrails
290+
291+Implement automated security policies using Continue's rule system. See the [Rules deep dive](/customize/deep-dives/rules) for authoring tips.
292+
293+<Note>
294+ **Coming Soon**: These security guardrail prompts will be available as pre-configured rules on the Continue Hub for easy installation.
295+</Note>
296+
297+<Card title="Pre-commit Scanning" icon="lock">
298+ ```bash
299+ "Always run Snyk Code before committing newly
300+ generated code; refuse to proceed if high
301+ issues remain."
302+ ```
303+</Card>
304+
305+<Card title="Dependency Safety" icon="shield-check">
306+ ```bash
307+ "When adding/updating a dependency, run Snyk Open Source, choose the
308+ lowest-risk upgrade, and re-test."
309+ ```
310+</Card>
311+
312+<Card title="Container Hardening" icon="box">
313+ ```bash
314+ "Before building containers, scan base images and recommend
315+ security-hardened alternatives."
316+ ```
317+</Card>
318+
319+<Card title="IaC Compliance" icon="clipboard-list">
320+ ```bash
321+ "Scan all Terraform changes for compliance
322+ violations before applying infrastructure."
323+ ```
324+</Card>
325+
326+<Tip>
327+ Enable the **Secure-at-Inception** rules from the Hub to automatically apply
328+ these guardrails to all code generation and modifications.
329+</Tip>
330+
331+## Troubleshooting
332+
333+### Authentication Issues
334+
335+```bash
336+"Check Snyk auth status and current org. If not authenticated,
337+help me authenticate. Then run a quick Code scan on ./
338+with severity medium and print one example issue."
339+```
340+
341+### Fix Validation
342+
343+```bash
344+"Propose minimal diffs only in affected files,
345+then rerun the same Snyk scan to confirm resolution."
346+```
347+
348+### Connection Problems
349+
350+<Check>
351+ **Verification Steps:** - Snyk MCP is installed via [Continue
352+ Hub](https://hub.continue.dev/snyk/snyk-mcp) - Secure-at-Inception rules are
353+ [enabled](https://hub.continue.dev/snyk/secure-at-inception) - Authentication
354+ completed successfully - Project folder has been trusted
355+</Check>
356+
357+## What You've Built
358+
359+After completing this guide, you have a complete **AI-powered security system** that:
360+
361+✅ Uses natural language — Simple prompts instead of complex CLI commands
362+✅ Fixes automatically — AI suggests and validates security fixes
363+✅ Runs continuously — Automated scanning in CI/CD pipelines
364+✅ Enforces guardrails — Security rules prevent vulnerable code from shipping
365+
366+<Card title="Continuous AI" icon="rocket">
367+ Your security workflow now operates at **[Level 2 Continuous
368+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
369+ AI handles routine security scanning and remediation with human oversight
370+ through review and approval of fixes.
371+</Card>
372+
373+## Next Steps
374+
375+1. **Run your first scan** - Try the [SAST](https://snyk.io/learn/application-security/sast/) prompt on your current project
376+2. **Review findings** - Analyze the security report and implement fixes
377+3. **Set up CI pipeline** - Add the GitHub Actions workflow to your repo
378+4. **Customize rules** - Add project-specific security policies
379+5. **Monitor trends** - Track [vulnerability](https://snyk.io/learn/security-vulnerability/) reduction over time
380+
381+## Additional Resources
382+
383+<CardGroup cols={2}>
384+ <Card title="Snyk Documentation" icon="book" href="https://docs.snyk.io">
385+ Complete Snyk platform documentation
386+ </Card>
387+ <Card title="Continue Hub" icon="plug" href="https://hub.continue.dev">
388+ Explore more MCP integrations and agents
389+ </Card>
390+ <Card
391+ title="Security Best Practices"
392+ icon="shield"
393+ href="https://snyk.io/learn"
394+ >
395+ Learn about secure coding practices
396+ </Card>
397+ <Card
398+ title="MCP Concepts"
399+ icon="puzzle-piece"
400+ href="https://docs.snyk.io/integrations/developer-guardrails-for-agentic-workflows"
401+ >
402+ Understanding MCP architecture
403+ </Card>
404+</CardGroup>
modified docs/reference/yaml-migration.mdx +42 −27
@@ -1,17 +1,16 @@
11 ---
22 title: "Migrating Config to YAML"
3-description: "Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from to ."
3+description: "Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from config.json to config.yaml."
44 ---
55
66 See also
77
88 - [Intro to YAML](https://yaml.org/)
9-- [JSON Continue Config Reference](/reference)
109 - [YAML Continue Config Reference](/reference)
1110
1211 ## Create YAML file
1312
14-Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current `config.json` file. If a `config.yaml` file is present, it will be loaded instead of `config.json`.
13+Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current config.json file. If a `config.yaml` file is present, it will be loaded instead of config.json.
1514
1615 Give your configuration a `name` and a `version`:
1716
@@ -87,12 +86,12 @@
8786
8887 config.yaml
8988
90-```
89+```yaml
9190 models:
9291 - name: GPT-4
9392 provider: openai
9493 model: gpt-4
95- apiKey: <YOUR_OPENAI_KEY>
94+ apiKey: <YOUR_OPENAI_API_KEY>
9695 defaultCompletionOptions:
9796 temperature: 0.5
9897 maxTokens: 2000
@@ -101,7 +100,8 @@
101100 - edit
102101 - name: My Voyage Reranker
103102 provider: voyage
104- apiKey: <YOUR_VOYAGE_KEY>
103+ model: rerank-2
104+ apiKey: <YOUR_VOYAGE_API_KEY>
105105 roles:
106106 - rerank
107107 - name: My Starcoder
@@ -111,22 +111,25 @@
111111 - autocomplete
112112 - name: My Ada Embedder
113113 provider: openai
114- apiKey: <YOUR_ADA_API_KEY>
114+ model: text-embedding-ada-002
115+ apiKey: <YOUR_OPENAI_API_KEY>
115116 roles:
116117 - embed
117118 embedOptions:
118- - maxChunkSize: 256
119- - maxBatchSize: 5
119+ maxChunkSize: 256
120+ maxBatchSize: 5
120121 - name: Ollama Autodetect
121122 provider: ollama
122123 model: AUTODETECT
123- - name: My Open AI Compatible Model - Apply
124+ roles:
125+ - chat
126+ - name: My Open AI Compatible Model
124127 provider: openai
125128 model: my-openai-compatible-model
126129 apiBase: http://3.3.3.3/v1
127130 requestOptions:
128131 headers:
129- X-Auth-Token: <MY_API_KEY>
132+ X-Auth-Token: <API_KEY>
130133 roles:
131134 - chat
132135 - apply
@@ -159,7 +162,7 @@
159162
160163 config.yaml
161164
162-```
165+```yaml
163166 context:
164167 - provider: docs
165168 - provider: codebase
@@ -178,14 +181,16 @@
178181 config.json
179182
180183 ```json
181-{ "systemMessage": "Always give concise responses" }
184+{
185+ "systemMessage": "Always give concise responses"
186+}
182187 ```
183188
184189 **After**
185190
186191 config.yaml
187192
188-```
193+```yaml
189194 rules:
190195 - Always give concise responses
191196 ```
@@ -214,7 +219,7 @@
214219
215220 config.yaml
216221
217-```
222+```yaml
218223 prompts:
219224 - name: check
220225 description: Check for mistakes in my code
@@ -239,8 +244,14 @@
239244 ```json
240245 {
241246 "docs": [
242- { "startUrl": "https://docs.nestjs.com/", "title": "nest.js" },
243- { "startUrl": "https://mysite.com/docs/", "title": "My site" }
247+ {
248+ "startUrl": "https://docs.nestjs.com/",
249+ "title": "nest.js"
250+ },
251+ {
252+ "startUrl": "https://mysite.com/docs/",
253+ "title": "My site"
254+ }
244255 ]
245256 }
246257 ```
@@ -249,7 +260,7 @@
249260
250261 config.yaml
251262
252-```
263+```yaml
253264 docs:
254265 - name: nest.js
255266 startUrl: https://docs.nestjs.com/
@@ -279,8 +290,14 @@
279290 "transport": {
280291 "type": "stdio",
281292 "command": "uvx",
282- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"],
283- "env": { "KEY": "<VALUE>" }
293+ "args": [
294+ "mcp-server-sqlite",
295+ "--db-path",
296+ "/Users/NAME/test.db"
297+ ],
298+ "env": {
299+ "KEY": "<VALUE>"
300+ }
284301 }
285302 }
286303 ]
@@ -292,7 +309,7 @@
292309
293310 config.yaml
294311
295-```
312+```yaml
296313 mcpServers:
297314 - name: My MCP Server
298315 command: uvx
@@ -308,13 +325,11 @@
308325
309326 ## Deprecated configuration options
310327
311-Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the user settings (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
312-
313-See the [JSON Config Reference](/reference) for more information on fully deprecated options.
328+Some deprecated config.json settings are no longer stored in config and have been moved to be editable through the user settings (Gear Icon). If found in config.json, they will be auto-migrated to User Settings and removed from config.json.
314329
315-The following top-level fields from `config.json` still work when using `config.json` but have been deprecated and don't have a YAML equivalent:
330+The following top-level fields from config.json have been deprecated and don't have a config.yaml equivalent:
316331
317-- Slash commands (JSON `slashCommands`)
332+- Slash commands (`slashCommands`)
318333
319334 - top-level `requestOptions`
320335
@@ -332,7 +347,7 @@
332347
333348 - `analytics`
334349
335-The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI
350+The following top-level fields from config.json have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI
336351
337352 - `customCommands`
338353 - `experimental`
modified extensions/cli/src/commands/serve.helpers.ts +0 −2
@@ -119,9 +119,7 @@
119119 model: any;
120120 isProcessing: boolean;
121121 lastActivity: number;
122- messageQueue: string[];
123122 currentAbortController: AbortController | null;
124- shouldInterrupt: boolean;
125123 serverRunning: boolean;
126124 pendingPermission: PendingPermission | null;
127125 systemMessage?: string;
modified extensions/cli/src/commands/serve.ts +29 −28
@@ -16,7 +16,8 @@
1616 ConfigServiceState,
1717 ModelServiceState,
1818 } from "../services/types.js";
19-import { createSession, getSessionPersistenceSnapshot } from "../session.js";
19+import { createSession, getCompleteStateSnapshot } from "../session.js";
20+import { messageQueue } from "../stream/messageQueue.js";
2021 import { constructSystemMessage } from "../systemMessage.js";
2122 import { telemetryService } from "../telemetry/telemetryService.js";
2223 import { gracefulExit } from "../util/exit.js";
@@ -138,9 +139,7 @@
138139 model,
139140 isProcessing: false,
140141 lastActivity: Date.now(),
141- messageQueue: [],
142142 currentAbortController: null,
143- shouldInterrupt: false,
144143 serverRunning: true,
145144 pendingPermission: null,
146145 };
@@ -160,7 +159,13 @@
160159 storageOption: options.id,
161160 accessToken,
162161 syncSessionHistory,
163- getSessionSnapshot: () => getSessionPersistenceSnapshot(state.session),
162+ getCompleteStateSnapshot: () =>
163+ getCompleteStateSnapshot(
164+ state.session,
165+ state.isProcessing,
166+ messageQueue.getQueueLength(),
167+ state.pendingPermission,
168+ ),
164169 isActive: () => state.serverRunning,
165170 });
166171
@@ -182,12 +187,13 @@
182187 app.get("/state", (_req: Request, res: Response) => {
183188 state.lastActivity = Date.now();
184189 syncSessionHistory();
185- res.json({
186- session: state.session, // Return session directly instead of converting
187- isProcessing: state.isProcessing,
188- messageQueueLength: state.messageQueue.length,
189- pendingPermission: state.pendingPermission,
190- });
190+ const stateSnapshot = getCompleteStateSnapshot(
191+ state.session,
192+ state.isProcessing,
193+ messageQueue.getQueueLength(),
194+ state.pendingPermission,
195+ );
196+ res.json(stateSnapshot);
191197 });
192198
193199 // POST /message - Queue a message and potentially interrupt
@@ -200,17 +206,11 @@
200206 }
201207
202208 // Queue the message
203- state.messageQueue.push(message);
204-
205- // If currently processing, set interrupt flag
206- if (state.isProcessing && state.currentAbortController) {
207- state.shouldInterrupt = true;
208- }
209+ await messageQueue.enqueueMessage(message);
209210
210211 res.json({
211212 queued: true,
212- position: state.messageQueue.length,
213- willInterrupt: state.shouldInterrupt,
213+ position: messageQueue.getQueueLength(),
214214 });
215215
216216 // Process messages if not already processing
@@ -303,9 +303,6 @@
303303 state.currentAbortController.abort();
304304 }
305305
306- // Clear the message queue
307- state.messageQueue = [];
308-
309306 // Clean up intervals
310307 if (inactivityChecker) {
311308 clearInterval(inactivityChecker);
@@ -325,7 +322,7 @@
325322 setTimeout(handleExitResponse, 100);
326323 });
327324
328- const server = app.listen(port, () => {
325+ const server = app.listen(port, async () => {
329326 console.log(chalk.green(`Server started on http://localhost:${port}`));
330327 console.log(chalk.dim("Endpoints:"));
331328 console.log(chalk.dim(" GET /state - Get current agent state"));
@@ -354,7 +351,7 @@
354351 // If initial prompt provided, queue it for processing
355352 if (actualPrompt) {
356353 console.log(chalk.dim("\nProcessing initial prompt..."));
357- state.messageQueue.push(actualPrompt);
354+ await messageQueue.enqueueMessage(actualPrompt);
358355 processMessages(state, llmApi);
359356 }
360357 });
@@ -383,10 +380,14 @@
383380
384381 async function processMessages(state: ServerState, llmApi: any) {
385382 let processedMessage = false;
386- while (state.messageQueue.length > 0 && state.serverRunning) {
387- const userMessage = state.messageQueue.shift()!;
383+ while (state.serverRunning) {
384+ const queuedMessage = messageQueue.getNextMessage();
385+ if (!queuedMessage) {
386+ break;
387+ }
388+
389+ const userMessage = queuedMessage.message;
388390 state.isProcessing = true;
389- state.shouldInterrupt = false;
390391 state.lastActivity = Date.now();
391392 processedMessage = true;
392393
@@ -410,7 +411,7 @@
410411 state,
411412 llmApi,
412413 state.currentAbortController,
413- () => state.shouldInterrupt,
414+ () => false,
414415 );
415416
416417 // No direct persistence here; ChatHistoryService handles persistence when appropriate
@@ -443,7 +444,7 @@
443444 if (
444445 processedMessage &&
445446 state.serverRunning &&
446- state.messageQueue.length === 0
447+ messageQueue.getQueueLength() === 0
447448 ) {
448449 await storageSyncService.markAgentStatusUnread();
449450 }
modified extensions/cli/src/hubLoader.test.ts +45 −2
@@ -1,12 +1,15 @@
11 import { beforeEach, describe, expect, it, vi } from "vitest";
22
3-import {
3+import * as hubLoader from "./hubLoader.js";
4+
5+const {
46 loadPackageFromHub,
57 mcpProcessor,
68 modelProcessor,
79 promptProcessor,
810 ruleProcessor,
9-} from "./hubLoader.js";
11+ processRule,
12+} = hubLoader;
1013
1114 // Store the original fetch before any mocking
1215 const originalFetch = global.fetch;
@@ -136,6 +139,46 @@
136139 });
137140 });
138141
142+ describe("processRule", () => {
143+ beforeEach(() => {
144+ // Ensure mocks are set up properly for processRule tests
145+ global.fetch = mockFetch;
146+ });
147+
148+ it("should treat multi-line strings as inline rules", async () => {
149+ const loadRuleSpy = vi
150+ .spyOn(hubLoader, "loadRuleFromHub")
151+ .mockResolvedValue("hub-content");
152+
153+ const multilineRule = "Line one\nEnsure /tmp is ignored\nFinal line";
154+ const result = await processRule(multilineRule);
155+
156+ expect(result).toBe(multilineRule);
157+ expect(loadRuleSpy).not.toHaveBeenCalled();
158+
159+ loadRuleSpy.mockRestore();
160+ });
161+
162+ it("should still treat owner/package strings as hub slugs", async () => {
163+ // Mock fetch to return a proper response for this test
164+ const JSZip = (await import("jszip")).default;
165+ const zip = new JSZip();
166+ zip.file("rule.md", "hub-content");
167+ const zipBuffer = await zip.generateAsync({ type: "arraybuffer" });
168+
169+ mockFetch.mockResolvedValueOnce({
170+ ok: true,
171+ arrayBuffer: () => Promise.resolve(zipBuffer),
172+ } as Response);
173+
174+ const slug = "owner/package";
175+ const result = await processRule(slug);
176+
177+ expect(result).toBe("hub-content");
178+ expect(mockFetch).toHaveBeenCalled();
179+ });
180+ });
181+
139182 describe("processors", () => {
140183 it("should define rule processor correctly", () => {
141184 expect(ruleProcessor.type).toBe("rule");
modified extensions/cli/src/hubLoader.ts +35 −18
@@ -3,6 +3,11 @@
33 import { env } from "./env.js";
44 import { logger } from "./util/logger.js";
55
6+/**
7+ * Pattern to match valid hub slugs (owner/package format)
8+ */
9+const HUB_SLUG_PATTERN = /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/;
10+
611 /**
712 * Hub package type definitions
813 */
@@ -220,28 +225,23 @@
220225 * Process a rule specification - supports file paths, hub slugs, or direct content
221226 */
222227 export async function processRule(ruleSpec: string): Promise<string> {
223- // If it looks like a hub slug (contains / but doesn't start with . or /)
224- if (
225- ruleSpec.includes("/") &&
226- !ruleSpec.startsWith(".") &&
227- !ruleSpec.startsWith("/")
228- ) {
229- return await loadRuleFromHub(ruleSpec);
230- }
231-
232- // If it looks like a file path
233- if (
234- ruleSpec.startsWith(".") ||
235- ruleSpec.startsWith("/") ||
236- ruleSpec.includes("/") ||
237- ruleSpec.includes("\\") ||
238- /\.[a-zA-Z]+$/.test(ruleSpec) // Has file extension at the end
239- ) {
228+ const trimmedRuleSpec = ruleSpec.trim();
229+ const hasNewline = /[\r\n]/.test(ruleSpec);
230+
231+ // If it looks like a file path (single line, typical path indicators)
232+ const looksLikePath =
233+ !hasNewline &&
234+ (trimmedRuleSpec.startsWith(".") ||
235+ trimmedRuleSpec.startsWith("/") ||
236+ trimmedRuleSpec.includes("\\") ||
237+ /\.[a-zA-Z]+$/.test(trimmedRuleSpec));
238+
239+ if (looksLikePath) {
240240 const fs = await import("fs");
241241 const path = await import("path");
242242
243243 try {
244- const absolutePath = path.resolve(ruleSpec);
244+ const absolutePath = path.resolve(trimmedRuleSpec);
245245 if (!fs.existsSync(absolutePath)) {
246246 throw new Error(`Rule file not found: ${ruleSpec}`);
247247 }
@@ -253,6 +253,23 @@
253253 }
254254 }
255255
256+ // Check if it might be a hub slug (contains "/" and is a single line)
257+ if (!hasNewline && trimmedRuleSpec.includes("/")) {
258+ const parts = trimmedRuleSpec.split("/");
259+
260+ // If it's exactly 2 parts and matches hub slug pattern, treat as hub slug
261+ if (parts.length === 2 && HUB_SLUG_PATTERN.test(trimmedRuleSpec)) {
262+ return await loadRuleFromHub(trimmedRuleSpec);
263+ }
264+
265+ // If it has more than 2 parts, it's an invalid hub slug
266+ if (parts.length > 2) {
267+ throw new Error(
268+ `Invalid hub slug format. Expected "owner/package", got: ${trimmedRuleSpec}`,
269+ );
270+ }
271+ }
272+
256273 // Otherwise, treat it as direct string content
257274 return ruleSpec;
258275 }
modified extensions/cli/src/services/StorageSyncService.test.ts +10 −10
@@ -55,7 +55,7 @@
5555 storageOption: undefined,
5656 accessToken: "token",
5757 syncSessionHistory: vi.fn(),
58- getSessionSnapshot: vi.fn(),
58+ getCompleteStateSnapshot: vi.fn(),
5959 });
6060
6161 expect(result).toBe(false);
@@ -69,7 +69,7 @@
6969 storageOption: " ",
7070 accessToken: "token",
7171 syncSessionHistory: vi.fn(),
72- getSessionSnapshot: vi.fn(),
72+ getCompleteStateSnapshot: vi.fn(),
7373 });
7474
7575 expect(result).toBe(false);
@@ -86,7 +86,7 @@
8686 storageOption: "session-123",
8787 accessToken: null,
8888 syncSessionHistory: vi.fn(),
89- getSessionSnapshot: vi.fn(),
89+ getCompleteStateSnapshot: vi.fn(),
9090 });
9191
9292 expect(result).toBe(false);
@@ -98,7 +98,7 @@
9898
9999 it("starts syncing when presign succeeds", async () => {
100100 const syncSessionHistory = vi.fn();
101- const getSessionSnapshot = vi.fn().mockReturnValue({ foo: "bar" });
101+ const getCompleteStateSnapshot = vi.fn().mockReturnValue({ foo: "bar" });
102102
103103 fetchMock.mockResolvedValueOnce({
104104 ok: true,
@@ -114,13 +114,13 @@
114114 storageOption: "session-123",
115115 accessToken: "token",
116116 syncSessionHistory,
117- getSessionSnapshot,
117+ getCompleteStateSnapshot,
118118 isActive: () => true,
119119 });
120120
121121 expect(result).toBe(true);
122122 expect(syncSessionHistory).toHaveBeenCalledTimes(1);
123- expect(getSessionSnapshot).toHaveBeenCalledTimes(1);
123+ expect(getCompleteStateSnapshot).toHaveBeenCalledTimes(1);
124124 expect(fetchMock).toHaveBeenCalledTimes(3);
125125 const [presignUrl, presignOptions] = fetchMock.mock.calls[0];
126126 expect(presignUrl).toBeInstanceOf(URL);
@@ -152,7 +152,7 @@
152152 storageOption: "session-123",
153153 accessToken: "token",
154154 syncSessionHistory: vi.fn(),
155- getSessionSnapshot: vi.fn(),
155+ getCompleteStateSnapshot: vi.fn(),
156156 });
157157
158158 expect(result).toBe(false);
@@ -187,7 +187,7 @@
187187 storageOption: "session-123",
188188 accessToken: "token",
189189 syncSessionHistory: vi.fn(),
190- getSessionSnapshot: vi.fn().mockReturnValue({}),
190+ getCompleteStateSnapshot: vi.fn().mockReturnValue({}),
191191 });
192192
193193 expect(result).toBe(true);
@@ -235,7 +235,7 @@
235235
236236 it("includes server-side encryption header when required by signed headers", async () => {
237237 const syncSessionHistory = vi.fn();
238- const getSessionSnapshot = vi.fn().mockReturnValue({ test: "data" });
238+ const getCompleteStateSnapshot = vi.fn().mockReturnValue({ test: "data" });
239239
240240 // Mock presign response with server-side encryption in signed headers
241241 const sessionUrlWithSSE =
@@ -256,7 +256,7 @@
256256 storageOption: "session-123",
257257 accessToken: "token",
258258 syncSessionHistory,
259- getSessionSnapshot,
259+ getCompleteStateSnapshot,
260260 isActive: () => true,
261261 });
262262
modified extensions/cli/src/services/StorageSyncService.ts +9 −5
@@ -29,7 +29,7 @@
2929 accessToken: string;
3030 intervalMs?: number;
3131 syncSessionHistory: () => void;
32- getSessionSnapshot: () => unknown;
32+ getCompleteStateSnapshot: () => unknown;
3333 isActive?: () => boolean;
3434 }
3535
@@ -284,14 +284,18 @@
284284 return;
285285 }
286286
287+ // Capture references to prevent race condition with stop()
288+ const targets = this.targets;
289+ const options = this.options;
290+
287291 this.uploadInFlight = true;
288292
289293 try {
290- this.options.syncSessionHistory();
291- const snapshot = this.options.getSessionSnapshot();
294+ options.syncSessionHistory();
295+ const snapshot = options.getCompleteStateSnapshot();
292296 const sessionPayload = JSON.stringify(snapshot, null, 2);
293297 await this.uploadToPresignedUrl(
294- this.targets.sessionUrl,
298+ targets.sessionUrl,
295299 sessionPayload,
296300 "application/json",
297301 );
@@ -304,7 +308,7 @@
304308 this.missingRepoLogged = true;
305309 }
306310 await this.uploadToPresignedUrl(
307- this.targets.diffUrl,
311+ targets.diffUrl,
308312 diffResult.diff,
309313 "text/plain",
310314 );
modified extensions/cli/src/session.ts +24 −0
@@ -161,6 +161,30 @@
161161 return modifySessionBeforeSave(session);
162162 }
163163
164+/**
165+ * Get the complete state snapshot that matches the /state endpoint format
166+ */
167+export interface StateSnapshot {
168+ session: Session;
169+ isProcessing: boolean;
170+ messageQueueLength: number;
171+ pendingPermission: any;
172+}
173+
174+export function getCompleteStateSnapshot(
175+ session: Session,
176+ isProcessing: boolean = false,
177+ messageQueueLength: number = 0,
178+ pendingPermission: any = null,
179+): StateSnapshot {
180+ return {
181+ session: getSessionPersistenceSnapshot(session),
182+ isProcessing,
183+ messageQueueLength,
184+ pendingPermission,
185+ };
186+}
187+
164188 /**
165189 * Save the current session to file
166190 */
modified extensions/cli/src/stream/messageQueue.test.ts +1 −32
@@ -1,4 +1,4 @@
1-import { beforeEach, describe, expect, it, vi } from "vitest";
1+import { describe, expect, it, vi } from "vitest";
22
33 vi.mock("../util/logger.js", () => ({
44 logger: {
@@ -16,11 +16,6 @@
1616 import { messageQueue } from "./messageQueue.js";
1717
1818 describe("messageQueue", () => {
19- beforeEach(() => {
20- // Drain any leftover items from previous tests
21- while (messageQueue.getAllQueuedMessages()) {}
22- });
23-
2419 it("enqueues and emits messageQueued", async () => {
2520 const event = new Promise<any>((resolve) =>
2621 messageQueue.once("messageQueued", resolve),
@@ -33,30 +28,4 @@
3328 const queued = await event;
3429 expect(queued.message).toBe("hello world");
3530 });
36-
37- it("combines messages, merges image maps, writes history, and clears queue", async () => {
38- const bufA = Buffer.from("A");
39- const bufB = Buffer.from("B");
40-
41- const img1 = new Map<string, Buffer>([["a", bufA]]);
42- const img2 = new Map<string, Buffer>([["b", bufB]]);
43-
44- const history = { addEntry: vi.fn() } as any;
45-
46- await messageQueue.enqueueMessage("one", img1);
47- await messageQueue.enqueueMessage("two", img2, history);
48-
49- const combined = messageQueue.getAllQueuedMessages();
50- expect(combined).toBeTruthy();
51- expect(combined!.message).toBe("one\ntwo");
52- expect(combined!.imageMap).toBeDefined();
53- expect(combined!.imageMap!.get("a")).toEqual(bufA);
54- expect(combined!.imageMap!.get("b")).toEqual(bufB);
55-
56- // queue should be cleared
57- expect(messageQueue.getQueueLength()).toBe(0);
58-
59- // input history should receive the combined message
60- expect(history.addEntry).toHaveBeenCalledWith("one\ntwo");
61- });
6231 });
modified extensions/cli/src/stream/messageQueue.ts +9 −41
@@ -1,12 +1,13 @@
11 import { EventEmitter } from "events";
22
3-import { InputHistory } from "../util/inputHistory.js";
3+import type { InputHistory } from "../util/inputHistory.js";
44 import { logger } from "../util/logger.js";
55
66 export interface QueuedMessage {
77 message: string;
88 imageMap?: Map<string, Buffer>;
99 timestamp: number;
10+ history?: InputHistory;
1011 }
1112
1213 export interface MessageProcessor {
@@ -18,7 +19,6 @@
1819 */
1920 class MessageQueue extends EventEmitter {
2021 private queue: QueuedMessage[] = [];
21- private inputHistory: InputHistory | undefined;
2222
2323 constructor() {
2424 super();
@@ -27,14 +27,13 @@
2727 async enqueueMessage(
2828 message: string,
2929 imageMap?: Map<string, Buffer>,
30- inputHistory?: InputHistory,
30+ history?: InputHistory,
3131 ): Promise<boolean> {
32- this.inputHistory = inputHistory;
33-
3432 const queuedMessage: QueuedMessage = {
3533 message,
3634 imageMap,
3735 timestamp: Date.now(),
36+ history,
3837 };
3938
4039 this.queue.push(queuedMessage);
@@ -48,42 +47,11 @@
4847 return true;
4948 }
5049
51- public getAllQueuedMessages() {
52- if (this.queue.length === 0) return undefined;
53-
54- // Combine all queued messages into one
55- const combinedMessage = this.queue.map((msg) => msg.message).join("\n");
56- const combinedImageMap = new Map<string, Buffer>();
57-
58- // Merge all image maps
59- for (const queuedMsg of this.queue) {
60- if (queuedMsg.imageMap) {
61- for (const [key, value] of queuedMsg.imageMap) {
62- combinedImageMap.set(key, value);
63- }
64- }
65- }
66-
67- const result = {
68- message: combinedMessage,
69- imageMap: combinedImageMap.size > 0 ? combinedImageMap : undefined,
70- timestamp: Date.now(),
71- };
72-
73- // Add to input history and clear the queue
74- this.inputHistory?.addEntry(combinedMessage);
75- this.queue = [];
76-
77- logger.debug("MessageQueue: All messages dequeued and combined", {
78- combinedLength: combinedMessage.length,
79- queueLength: this.queue.length,
80- });
81-
82- return result;
83- }
84-
85- public getLatestMessage() {
86- return this.getAllQueuedMessages();
50+ /**
51+ * Dequeues and returns the next message to be processed (FIFO - oldest first)
52+ */
53+ public getNextMessage(): QueuedMessage | undefined {
54+ return this.queue.shift();
8755 }
8856
8957 getQueueLength(): number {
modified extensions/cli/src/ui/UserInput.tsx +5 −7
@@ -548,16 +548,14 @@
548548 textBuffer.expandAllPasteBlocks();
549549 const submittedText = textBuffer.text.trim();
550550
551- if (isWaitingForResponse || isCompacting) {
551+ inputHistory.addEntry(submittedText);
552+
553+ // We don't queue, we just send in remote mode because the server handles queueing
554+ if (!isRemoteMode && (isWaitingForResponse || isCompacting)) {
552555 // Process message later when LLM has responded or compaction is complete
553- void messageQueue.enqueueMessage(
554- submittedText,
555- imageMap,
556- inputHistory,
557- );
556+ void messageQueue.enqueueMessage(submittedText, imageMap);
558557 } else {
559558 // Submit with images
560- inputHistory.addEntry(submittedText);
561559 onSubmit(submittedText, imageMap);
562560 }
563561
modified extensions/cli/src/ui/hooks/useChat.ts +2 −2
@@ -337,13 +337,13 @@
337337
338338 // Check if there are queued messages and process them after a microtask delay
339339 // This ensures the GUI state has been updated before processing the next message
340- const queuedMessageData = messageQueue.getLatestMessage();
340+ const queuedMessageData = messageQueue.getNextMessage();
341341 if (queuedMessageData) {
342342 const { message: latestQueuedMessage, imageMap } = queuedMessageData;
343343 logger.debug("processing queued message", { latestQueuedMessage });
344344
345345 // Clear queued messages from display since they're about to be processed
346- // Note: messageQueue.getLatestMessage() already cleared the actual queue
346+ // Note: messageQueue.getNextMessage() already cleared the actual queue
347347 setQueuedMessages([]);
348348
349349 await new Promise((resolve) => setTimeout(resolve, 100)); // add timeout for react to render the tui