Skip to content

Commit ca8f09b

Browse files
sestinjspewRob LeidlePatrick-Erichseninimaz
authored
Dev (#1689)
* Fix an issue where CMD+K does not clear the terminal when the terminal has focus (#1671) On MacOS, ⌘+K is bound, by default, to Terminal:Clear. Without this change ⌘+K does not clear the terminal but instead iniates a chord sequence and waits for the next stroke of the chord. Co-authored-by: Rob Leidle <[email protected]> * Change treeSitter to cache the Language objects it loads from wasm (#1672) Without this change, for a repository with 600 typescript files, the indexer would fail to finish correctly and there would be many of the following errors in the webview console log: 'Unable to load language for file ${path} RuntimeError: table index is out of bounds' The following bash will create a repo that reproduces the problem: current_path="." for ((i=1; i<=20; i++)); do new_folder="folder-$i" mkdir -p "$current_path/$new_folder" current_path="$current_path/$new_folder" for ((a=1; a<=30; a++)); do head -c 10000 /dev/urandom | base64 > "$current_path/file-$a.ts" done done Co-authored-by: Rob Leidle <[email protected]> * acknowledge sourcemap flag in esbuild.js * don't run jetbrains-release.yaml on vscode releases * further testing for walkDir * chore: add telemetry to commands (#1673) * test: Add basic unit test to baseLLM (#1668) * update version * test: Add basic unit test to baseLLM --------- Co-authored-by: Nate Sesti <[email protected]> Co-authored-by: inimaz <[email protected]> * feat: add Quick Actions CodeLens feature (#1674) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: add quick actions * Update index.d.ts * quick actions mvp * update docs * subscribe to vscode change settings * Update commands.ts * cleanup * Update quick-actions.md * Update VerticalPerLineCodeLensProvider.ts * resolve feedback --------- Co-authored-by: Nate Sesti <[email protected]> Co-authored-by: Nate Sesti <[email protected]> Co-authored-by: Jonah Wagner <[email protected]> * chore: add `isCommandEvent` to command telemetry (#1675) * chore: add `isCommandEvent` to command telemetry * Update commands.ts * Nate/better retrieval (#1677) * deduplicatearray tests * break out separate retrieval pipelines * IConfigHandler * tests for codebase indexer * better .continueignore for continue * indexing fixes * ignore .gitignore and .continueignore when indexing * retrieval pipeline improvements * fix formatting err in out .continueignore * add necessary filter to lance_db_cache * update package.json version * skip unused tests * don't ignore .prompt files * update version * Update pull_request_template.md * don't use multi-media format when there are multiple text items * add free trial experience (#1685) * fix: add code range for quick actions/fixes (#1687) * fix: add code range for quick actions/fixes * Update test.js * add pathSep message type * docs improvements * jetbrains fix * update package.json version --------- Co-authored-by: Rob Leidle <[email protected]> Co-authored-by: Rob Leidle <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]> Co-authored-by: inimaz <[email protected]> Co-authored-by: inimaz <[email protected]> Co-authored-by: Jonah Wagner <[email protected]> Co-authored-by: Priyash <[email protected]>
1 parent e71ffb8 commit ca8f09b

File tree

16 files changed

+212
-186
lines changed

16 files changed

+212
-186
lines changed

.github/pull_request_template.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@
99

1010
## Screenshots
1111

12-
If your updates include visual changes, please share screenshots below.
12+
[ "For visual changes, include screenshots." ]
13+
14+
## Testing
15+
16+
[ For new or modified features, provide testing instructions. ]

binary/src/IpcMessenger.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ export class IpcMessenger<
170170
});
171171
}
172172
_sendMsg(msg: Message) {
173-
// console.log("[info] Sending message: ", msg);
174173
const d = JSON.stringify(msg);
174+
// console.log("[info] Sending message: ", d);
175175
process.stdout?.write(d + "\r\n");
176176
}
177177
}

core/llm/llms/OpenAI.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,13 @@ class OpenAI extends BaseLLM {
5757
protected _convertMessage(message: ChatMessage) {
5858
if (typeof message.content === "string") {
5959
return message;
60-
} else if (
60+
} else if (!message.content.some((item) => item.type !== "text")) {
6161
// If no multi-media is in the message, just send as text
6262
// for compatibility with OpenAI "compatible" servers
6363
// that don't support multi-media format
64-
message.content.length === 1 &&
65-
message.content[0].type === "text"
66-
) {
6764
return {
6865
...message,
69-
content: message.content[0].text,
66+
content: message.content.map((item) => item.text).join(""),
7067
};
7168
}
7269

core/protocol/ideWebview.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & {
4141
focusContinueInput: [undefined, void];
4242
focusContinueInputWithoutClear: [undefined, void];
4343
focusContinueInputWithNewSession: [undefined, void];
44-
highlightedCode: [{ rangeInFileWithContents: RangeInFileWithContents }, void];
44+
highlightedCode: [
45+
{
46+
rangeInFileWithContents: RangeInFileWithContents;
47+
prompt?: string;
48+
shouldRun?: boolean;
49+
},
50+
void,
51+
];
4552
addModel: [undefined, void];
4653
openSettings: [undefined, void];
4754
viewHistory: [undefined, void];

docs/docs/setup/configuration.md

+91-35
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,51 @@ keywords: [configure, llm, provider]
88

99
Want a quick and easy setup for Continue? We've got you covered with some sample `config.json` files for different scenarios. Just copy and paste them into your `config.json` by clicking the gear icon at the bottom right of the Continue sidebar.
1010

11-
## Best Overall Experience
11+
## Quick Setup Options
12+
13+
You can use Continue in different ways. Here are some quick setups for common uses:
14+
15+
- [Free Trial](#free-trial) - Try Continue without any additional setup.
16+
- [Best Overall Experience](#best-overall-experience) - Utilize the hand picked models for the best experience.
17+
- [Local and Offline](#local-and-offline-configuration) - Use local models for offline use with better privacy.
18+
19+
### Free Trial
20+
21+
The `free-trial` lets new users try out Continue with GPT-4o, Llama3, Claude 3.5, and other models using a ContinueDev proxy server that securely makes API calls to these services.
22+
23+
```json title="~/.continue/config.json"
24+
{
25+
"models": [
26+
{
27+
"title": "GPT-4o (trial)",
28+
"provider": "free-trial",
29+
"model": "gpt-4o"
30+
}
31+
],
32+
"tabAutocompleteModel": {
33+
"title": "Codestral (trial)",
34+
"provider": "free-trial",
35+
"model": "AUTODETECT"
36+
},
37+
"embeddingsProvider": {
38+
"provider": "free-trial"
39+
},
40+
"reranker": {
41+
"name": "free-trial"
42+
}
43+
}
44+
```
45+
46+
### Best Overall Experience
1247

1348
This setup uses Claude 3.5 Sonnet for chatting, Codestral for autocomplete, and Voyage AI for embeddings and reranking.
1449

1550
**What You Need:**
1651

17-
1. Get a Codestral API key from [Mistral AI's La Plateforme](https://console.mistral.ai/codestral)
18-
2. Get an Anthropic API key from [Anthropic Console](https://console.anthropic.com/account/keys)
19-
3. Replace `[CODESTRAL_API_KEY]` and `[ANTHROPIC_API_KEY]` with the keys you got from the above links.
20-
21-
:::note
22-
This example uses a free trial for embeddings and reranking, forwarding requests via ContinueDev proxy. For direct service, get a Voyage AI API key and update the `provider` and `apiKey` fields. See the [config reference for Voyage AI](../walkthroughs//codebase-embeddings.md#voyage-ai) for details on how to set this up.
23-
:::
52+
1. Get an Anthropic API key from [Anthropic Console](https://console.anthropic.com/account/keys)
53+
2. Get a Codestral API key from [Mistral AI's La Plateforme](https://console.mistral.ai/codestral)
54+
3. Get an Voyage AI API key from [Voyage AI Dashboard](https://dash.voyageai.com/)
55+
4. Replace `[CODESTRAL_API_KEY]`, `[ANTHROPIC_API_KEY]`, and `[VOYAGE_API_KEY]` with the keys you got from the above links.
2456

2557
```json title="~/.continue/config.json"
2658
{
@@ -39,15 +71,21 @@ This example uses a free trial for embeddings and reranking, forwarding requests
3971
"apiKey": "[CODESTRAL_API_KEY]"
4072
},
4173
"embeddingsProvider": {
42-
"provider": "free-trial"
74+
"provider": "openai",
75+
"model": "voyage-code-2",
76+
"apiBase": "https://api.voyageai.com/v1/",
77+
"apiKey": "[VOYAGE_AI_API_KEY]"
4378
},
4479
"reranker": {
45-
"name": "free-trial"
80+
"name": "voyage",
81+
"params": {
82+
"apiKey": "[VOYAGE_AI_API_KEY]"
83+
}
4684
}
4785
}
4886
```
4987

50-
## Local and Offline Configuration
88+
### Local and Offline Configuration
5189

5290
This configuration leverages Ollama for all functionalities - chat, autocomplete, and embeddings - ensuring that no code is transmitted outside your machine, allowing Continue to be run even on an air-gapped computer.
5391

@@ -135,39 +173,57 @@ If you need to send custom headers for authentication, you may use the `requestO
135173

136174
```json title="~/.continue/config.json"
137175
{
138-
"models": [
139-
{
140-
"title": "Ollama",
141-
"provider": "ollama",
142-
"model": "llama2-7b",
143-
"requestOptions": {
144-
"headers": {
145-
"X-Auth-Token": "xxx"
146-
}
147-
}
176+
"models": [
177+
{
178+
"title": "Ollama",
179+
"provider": "ollama",
180+
"model": "llama2-7b",
181+
"requestOptions": {
182+
"headers": {
183+
"X-Auth-Token": "xxx"
184+
}
148185
}
149-
]
186+
}
187+
]
150188
}
151189
```
152190

153191
Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below:
154192

155193
```json title="~/.continue/config.json"
156194
{
157-
"models": [
158-
{
159-
"title": "Ollama",
160-
"provider": "ollama",
161-
"model": "llama2-7b",
162-
"requestOptions": {
163-
"clientCertificate": {
164-
"cert": "C:\temp\ollama.pem",
165-
"key": "C:\temp\ollama.key",
166-
"passphrase": "c0nt!nu3"
167-
}
168-
}
195+
"models": [
196+
{
197+
"title": "Ollama",
198+
"provider": "ollama",
199+
"model": "llama2-7b",
200+
"requestOptions": {
201+
"clientCertificate": {
202+
"cert": "C:\tempollama.pem",
203+
"key": "C:\tempollama.key",
204+
"passphrase": "c0nt!nu3"
205+
}
169206
}
170-
]
207+
}
208+
]
209+
}
210+
```
211+
212+
## Context Length
213+
214+
Continue by default knows the context length for common models. For example, it will automatically assume 200k tokens for Claude 3. For Ollama, the context length is determined automatically by asking Ollama. If neither of these are sufficient, you can manually specify the context length by using hte `"contextLength"` property in your model in config.json.
215+
216+
```json title="~/.continue/config.json"
217+
{
218+
"models": [
219+
{
220+
"title": "My Custom Model",
221+
"provider": "openai",
222+
"model": "my-model",
223+
"contextLength": 8192,
224+
"apiBase": "http://localhost:8000/v1"
225+
}
226+
]
171227
}
172228
```
173229

docs/docs/walkthroughs/codebase-embeddings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Continue offers a free trial of Voyage AI's reranking model.
294294
}
295295
```
296296

297-
## Customizing which files are indexed
297+
## Ignore files during indexing
298298

299299
Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`.
300300

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt

+1-16
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,7 @@ class ViewLogsAction : AnAction() {
172172
}
173173
}
174174

175-
class ToggleAuxiliaryBarAction : AnAction() {
176-
override fun actionPerformed(e: AnActionEvent) {
177-
val project = e.project ?: return
178-
val toolWindowManager = ToolWindowManager.getInstance(project)
179-
val toolWindow = toolWindowManager.getToolWindow("Continue")
180-
181-
if (toolWindow != null) {
182-
if (toolWindow.isVisible) {
183-
toolWindow.component.transferFocus()
184-
toolWindow.hide(null)
185-
} else {
186-
toolWindow.activate(null)
187-
}
188-
}
189-
}
190-
}
175+
191176

192177
class FocusContinueInputWithoutClearAction : AnAction() {
193178
override fun actionPerformed(e: AnActionEvent) {

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt

+1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class CoreMessenger(private val project: Project, esbuildPath: String, continueC
147147
"applyToFile",
148148
"getGitHubAuthToken",
149149
"setGitHubAuthToken",
150+
"pathSep"
150151
)
151152

152153
private val PASS_THROUGH_TO_WEBVIEW = listOf<String>(

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt

+3
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,9 @@ class IdeProtocolClient (
628628
java.awt.Desktop.getDesktop().browse(java.net.URI(url))
629629
respond(null)
630630
}
631+
"pathSep" -> {
632+
respond(File.separator)
633+
}
631634
else -> {
632635
println("Unknown messageType: $messageType")
633636
}

extensions/intellij/src/main/resources/META-INF/plugin.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,7 @@
8989
description="View Continue Server Logs">
9090
<!-- No shortcut defined -->
9191
</action>
92-
<action id="continue.toggleAuxiliaryBar"
93-
class="com.github.continuedev.continueintellijextension.actions.ToggleAuxiliaryBarAction"
94-
text="Toggle Right Sidebar" description="Toggle Right Sidebar">
95-
<keyboard-shortcut keymap="$default" first-keystroke="alt ctrl J"/>
96-
<keyboard-shortcut keymap="Mac OS X" first-keystroke="alt meta J"/>
97-
</action>
92+
9893
<action id="continue.focusContinueInputWithoutClear"
9994
class="com.github.continuedev.continueintellijextension.actions.FocusContinueInputWithoutClearAction"
10095
text="Add selected code to context"

extensions/vscode/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/vscode/package.json

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "continue",
33
"icon": "media/icon.png",
4-
"version": "0.9.177",
4+
"version": "0.9.178",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/continuedev/continue"
@@ -143,12 +143,6 @@
143143
"title": "Generate Code",
144144
"group": "Continue"
145145
},
146-
{
147-
"command": "continue.toggleAuxiliaryBar",
148-
"category": "Continue",
149-
"title": "Toggle Right Sidebar",
150-
"group": "Continue"
151-
},
152146
{
153147
"command": "continue.focusContinueInput",
154148
"category": "Continue",
@@ -303,11 +297,6 @@
303297
"mac": "cmd+i",
304298
"key": "ctrl+i"
305299
},
306-
{
307-
"command": "continue.toggleAuxiliaryBar",
308-
"mac": "alt+cmd+l",
309-
"key": "alt+ctrl+l"
310-
},
311300
{
312301
"command": "continue.debugTerminal",
313302
"mac": "cmd+shift+r",
@@ -337,9 +326,6 @@
337326
{
338327
"command": "continue.quickEdit"
339328
},
340-
{
341-
"command": "continue.toggleAuxiliaryBar"
342-
},
343329
{
344330
"command": "continue.focusContinueInput"
345331
},

0 commit comments

Comments
 (0)