Changesets · Branches · Tags · Compare
| Changeset | 9bd927d445bd5b04c463797bbd6e8b106b808bd38bda5b2ad24f2790dad800b4 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-06-26 13:53 -07:00 |
| Committer | Dallin Romney <dallinromney@gmail.com> · 2025-06-26 13:53 -07:00 |
| Parents | bbd32f956d52, 04e94bf72239 |
16 files changed
added .continue/rules/new-protocol-message.md +35 −0
| @@ -0,0 +1,35 @@ | ||
| 1 | +--- | |
| 2 | +name: New protocol message | |
| 3 | +description: Create a new protocol message from core/gui/ide to core/gui/ide | |
| 4 | +--- | |
| 5 | + | |
| 6 | +Create a new protocol message by taking the following steps: | |
| 7 | + | |
| 8 | +## 1. Define the message type | |
| 9 | + | |
| 10 | +Add your new message type definition to the appropriate file in the `protocol/` directory with correct TypeScript typing. | |
| 11 | + | |
| 12 | +## 2. Check for duplicates | |
| 13 | + | |
| 14 | +Verify that no existing message type already provides the same functionality. | |
| 15 | + | |
| 16 | +## 3. Add to passThrough (if webview ↔ core) | |
| 17 | + | |
| 18 | +If your message is between webview and core, add it to `core/protocol/passThrough.ts`. | |
| 19 | + | |
| 20 | +## 4. Add to IntelliJ constants (if webview ↔ core) | |
| 21 | + | |
| 22 | +If your message is between webview and core, add it to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt`. | |
| 23 | + | |
| 24 | +## 5. Implement the message handler | |
| 25 | + | |
| 26 | +Implement the message in the appropriate location: | |
| 27 | + | |
| 28 | +- **Messages to core**: `core/core.ts` | |
| 29 | +- **Messages to GUI**: `useWebviewListener` hook | |
| 30 | +- **Messages to VS Code IDE**: `VsCodeMessenger.ts` | |
| 31 | +- **Messages to JetBrains IDE**: `IdeProtocolClient.kt` | |
| 32 | + | |
| 33 | +## 6. Test the implementation | |
| 34 | + | |
| 35 | +Verify that your message works correctly in both VS Code and JetBrains IDEs if applicable. |
added .continue/rules/overeager.md +5 −0
| @@ -0,0 +1,5 @@ | ||
| 1 | +--- | |
| 2 | +name: Don't be overeager | |
| 3 | +--- | |
| 4 | + | |
| 5 | +Avoid over-eagerly adding new features. You should solve the problem at hand and then can propose further work. |
modified .github/workflows/main.yaml +8 −0
| @@ -104,6 +104,14 @@ | ||
| 104 | 104 | path: gui/node_modules |
| 105 | 105 | key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} |
| 106 | 106 | |
| 107 | + - name: Build packages (Windows) | |
| 108 | + run: ./scripts/build-packages.ps1 | |
| 109 | + if: matrix.os == 'windows-latest' | |
| 110 | + | |
| 111 | + - name: Build packages (Unix) | |
| 112 | + run: ./scripts/build-packages.sh | |
| 113 | + if: matrix.os != 'windows-latest' | |
| 114 | + | |
| 107 | 115 | - name: Install extension Dependencies |
| 108 | 116 | run: | |
| 109 | 117 | cd extensions/vscode |
modified .github/workflows/preview.yaml +8 −0
| @@ -99,6 +99,14 @@ | ||
| 99 | 99 | path: gui/node_modules |
| 100 | 100 | key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} |
| 101 | 101 | |
| 102 | + - name: Build packages (Windows) | |
| 103 | + run: ./scripts/build-packages.ps1 | |
| 104 | + if: matrix.os == 'windows-latest' | |
| 105 | + | |
| 106 | + - name: Build packages (Unix) | |
| 107 | + run: ./scripts/build-packages.sh | |
| 108 | + if: matrix.os != 'windows-latest' | |
| 109 | + | |
| 102 | 110 | - name: Install extension Dependencies |
| 103 | 111 | run: | |
| 104 | 112 | cd extensions/vscode |
modified binary/package-lock.json +2 −4
| @@ -53,9 +53,9 @@ | ||
| 53 | 53 | "@aws-sdk/credential-providers": "^3.778.0", |
| 54 | 54 | "@continuedev/config-types": "^1.0.13", |
| 55 | 55 | "@continuedev/config-yaml": "file:../packages/config-yaml", |
| 56 | - "@continuedev/fetch": "^1.0.13", | |
| 56 | + "@continuedev/fetch": "^1.0.14", | |
| 57 | 57 | "@continuedev/llm-info": "^1.0.8", |
| 58 | - "@continuedev/openai-adapters": "^1.0.32", | |
| 58 | + "@continuedev/openai-adapters": "file:../packages/openai-adapters", | |
| 59 | 59 | "@modelcontextprotocol/sdk": "^1.12.0", |
| 60 | 60 | "@mozilla/readability": "^0.5.0", |
| 61 | 61 | "@octokit/rest": "^20.1.1", |
| @@ -106,7 +106,6 @@ | ||
| 106 | 106 | "sqlite3": "^5.1.7", |
| 107 | 107 | "system-ca": "^1.0.3", |
| 108 | 108 | "tar": "^7.4.3", |
| 109 | - "tree-sitter-structured-text": "^0.0.1", | |
| 110 | 109 | "tree-sitter-wasms": "^0.1.11", |
| 111 | 110 | "uuid": "^9.0.1", |
| 112 | 111 | "vectordb": "^0.4.20", |
| @@ -145,7 +144,6 @@ | ||
| 145 | 144 | "myers-diff": "^2.1.0", |
| 146 | 145 | "onnxruntime-common": "1.14.0", |
| 147 | 146 | "onnxruntime-web": "1.14.0", |
| 148 | - "tree-sitter-cli": "^0.22.5", | |
| 149 | 147 | "ts-jest": "^29.1.1", |
| 150 | 148 | "typescript": "^5.6.3", |
| 151 | 149 | "vitest": "^3.1.4" |
modified core/package-lock.json +0 −0
Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.
added core/rules.md +10 −0
| @@ -0,0 +1,10 @@ | ||
| 1 | +# `core` rules | |
| 2 | + | |
| 3 | +Whenever a new protocol message is added to the `protocol/` directory, check the following: | |
| 4 | + | |
| 5 | +- It's type is defined correctly | |
| 6 | +- If it is a message from webview to core or vice versa: | |
| 7 | + - It has been added to `core/protocol/passThrough.ts` | |
| 8 | + - It has been added to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt` | |
| 9 | +- It is implemented in either `core/core.ts` (for messages to the core), in a `useWebviewListener` (for messages to the gui), or in `VsCodeMessenger.ts` for VS Code or `IdeProtocolClient.kt` for JetBriains (for messages to the IDE). | |
| 10 | +- It does not duplicate functionality from another message type that already exists. |
modified extensions/intellij/gradle.properties +1 −1
| @@ -3,7 +3,7 @@ | ||
| 3 | 3 | pluginName=continue-intellij-extension |
| 4 | 4 | pluginRepositoryUrl=https://github.com/continuedev/continue |
| 5 | 5 | # SemVer format -> https://semver.org |
| 6 | -pluginVersion=1.0.25 | |
| 6 | +pluginVersion=1.0.26 | |
| 7 | 7 | # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html |
| 8 | 8 | pluginSinceBuild=223 |
| 9 | 9 | # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension |
modified extensions/vscode/package-lock.json +0 −0
Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.
modified extensions/vscode/package.json +1 −1
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | "name": "continue", |
| 3 | 3 | "icon": "media/icon.png", |
| 4 | 4 | "author": "Continue Dev, Inc", |
| 5 | - "version": "1.1.51", | |
| 5 | + "version": "1.1.52", | |
| 6 | 6 | "repository": { |
| 7 | 7 | "type": "git", |
| 8 | 8 | "url": "https://github.com/continuedev/continue" |
modified packages/openai-adapters/package-lock.json +2 −2
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "name": "@continuedev/openai-adapters", |
| 3 | - "version": "1.0.40", | |
| 3 | + "version": "1.0.42", | |
| 4 | 4 | "lockfileVersion": 3, |
| 5 | 5 | "requires": true, |
| 6 | 6 | "packages": { |
| 7 | 7 | "": { |
| 8 | 8 | "name": "@continuedev/openai-adapters", |
| 9 | - "version": "1.0.40", | |
| 9 | + "version": "1.0.42", | |
| 10 | 10 | "license": "Apache-2.0", |
| 11 | 11 | "dependencies": { |
| 12 | 12 | "@continuedev/config-types": "^1.0.5", |
modified packages/openai-adapters/package.json +1 −1
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "name": "@continuedev/openai-adapters", |
| 3 | - "version": "1.0.40", | |
| 3 | + "version": "1.0.42", | |
| 4 | 4 | "description": "", |
| 5 | 5 | "main": "dist/index.js", |
| 6 | 6 | "types": "dist/index.d.ts", |
modified packages/openai-adapters/src/apis/Azure.ts +5 −1
| @@ -63,7 +63,11 @@ | ||
| 63 | 63 | "`env.apiVersion` is a required configuration property for Azure OpenAI", |
| 64 | 64 | ); |
| 65 | 65 | } |
| 66 | - url.pathname = `${url.pathname}/openai/deployments/${config.env.deployment}`; | |
| 66 | + | |
| 67 | + const basePathname = `openai/deployments/${config.env.deployment}`; | |
| 68 | + | |
| 69 | + url.pathname = | |
| 70 | + url.pathname === "/" ? basePathname : `${url.pathname}/${basePathname}`; | |
| 67 | 71 | |
| 68 | 72 | queryParams["api-version"] = config.env.apiVersion; |
| 69 | 73 | } |
modified packages/openai-adapters/src/test/main.test.ts +76 −0
| @@ -173,4 +173,80 @@ | ||
| 173 | 173 | "https://api.example.com", |
| 174 | 174 | ); |
| 175 | 175 | }); |
| 176 | + | |
| 177 | + it("should configure Azure OpenAI client with root URL and trailing slash", () => { | |
| 178 | + const azure = constructLlmApi({ | |
| 179 | + provider: "azure", | |
| 180 | + apiKey: "sk-xxx", | |
| 181 | + apiBase: "https://test-azure-openai.azure.com/", | |
| 182 | + env: { | |
| 183 | + deployment: "gpt-4.1", | |
| 184 | + apiType: "azure-openai", | |
| 185 | + apiVersion: "2023-05-15", | |
| 186 | + }, | |
| 187 | + }); | |
| 188 | + | |
| 189 | + // The Azure client modifies the baseURL to include the deployment | |
| 190 | + expect((azure as OpenAIApi).openai.baseURL).toBe( | |
| 191 | + "https://test-azure-openai.azure.com/openai/deployments/gpt-4.1", | |
| 192 | + ); | |
| 193 | + expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx"); | |
| 194 | + }); | |
| 195 | + | |
| 196 | + it("should configure Azure OpenAI client with path and trailing slash", () => { | |
| 197 | + const azure = constructLlmApi({ | |
| 198 | + provider: "azure", | |
| 199 | + apiKey: "sk-xxx", | |
| 200 | + apiBase: "https://test-azure-openai.azure.com/v1/", | |
| 201 | + env: { | |
| 202 | + deployment: "gpt-4.1", | |
| 203 | + apiType: "azure-openai", | |
| 204 | + apiVersion: "2023-05-15", | |
| 205 | + }, | |
| 206 | + }); | |
| 207 | + | |
| 208 | + // The Azure client modifies the baseURL to include the deployment | |
| 209 | + expect((azure as OpenAIApi).openai.baseURL).toBe( | |
| 210 | + "https://test-azure-openai.azure.com/v1/openai/deployments/gpt-4.1", | |
| 211 | + ); | |
| 212 | + expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx"); | |
| 213 | + }); | |
| 214 | + | |
| 215 | + it("should configure Azure OpenAI client with root URL and no trailing slash", () => { | |
| 216 | + const azure = constructLlmApi({ | |
| 217 | + provider: "azure", | |
| 218 | + apiKey: "sk-xxx", | |
| 219 | + apiBase: "https://test-azure-openai.azure.com", | |
| 220 | + env: { | |
| 221 | + deployment: "gpt-4.1", | |
| 222 | + apiType: "azure-openai", | |
| 223 | + apiVersion: "2023-05-15", | |
| 224 | + }, | |
| 225 | + }); | |
| 226 | + | |
| 227 | + // The Azure client modifies the baseURL to include the deployment | |
| 228 | + expect((azure as OpenAIApi).openai.baseURL).toBe( | |
| 229 | + "https://test-azure-openai.azure.com/openai/deployments/gpt-4.1", | |
| 230 | + ); | |
| 231 | + expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx"); | |
| 232 | + }); | |
| 233 | + | |
| 234 | + it("should configure Azure OpenAI client with path and no trailing slash", () => { | |
| 235 | + const azure = constructLlmApi({ | |
| 236 | + provider: "azure", | |
| 237 | + apiKey: "sk-xxx", | |
| 238 | + apiBase: "https://test-azure-openai.azure.com/v1", | |
| 239 | + env: { | |
| 240 | + deployment: "gpt-4.1", | |
| 241 | + apiType: "azure-openai", | |
| 242 | + apiVersion: "2023-05-15", | |
| 243 | + }, | |
| 244 | + }); | |
| 245 | + | |
| 246 | + // The Azure client modifies the baseURL to include the deployment | |
| 247 | + expect((azure as OpenAIApi).openai.baseURL).toBe( | |
| 248 | + "https://test-azure-openai.azure.com/v1/openai/deployments/gpt-4.1", | |
| 249 | + ); | |
| 250 | + expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx"); | |
| 251 | + }); | |
| 176 | 252 | }); |
added scripts/build-packages.ps1 +13 −0
| @@ -0,0 +1,13 @@ | ||
| 1 | +Push-Location packages | |
| 2 | + | |
| 3 | +Push-Location "openai-adapters" | |
| 4 | +npm ci | |
| 5 | +npm run build | |
| 6 | +Pop-Location | |
| 7 | + | |
| 8 | +Push-Location "config-yaml" | |
| 9 | +npm ci | |
| 10 | +npm run build | |
| 11 | +Pop-Location | |
| 12 | + | |
| 13 | +Pop-Location | |
| No newline at the end of the file |
added scripts/build-packages.sh +13 −0
| @@ -0,0 +1,13 @@ | ||
| 1 | +# Build @continuedev packages for monorepo style linking | |
| 2 | + | |
| 3 | +cd packages | |
| 4 | +cd openai-adapters | |
| 5 | + | |
| 6 | +npm ci | |
| 7 | +npm run build | |
| 8 | + | |
| 9 | +cd .. | |
| 10 | +cd config-yaml | |
| 11 | + | |
| 12 | +npm ci | |
| 13 | +npm run build |