merge-main

This commit is contained in:
Dallin Romney 2025-06-26 13:53:20 -07:00
commit 896678ee52
16 changed files with 189 additions and 14 deletions

View file

@ -0,0 +1,35 @@
---
name: New protocol message
description: Create a new protocol message from core/gui/ide to core/gui/ide
---
Create a new protocol message by taking the following steps:
## 1. Define the message type
Add your new message type definition to the appropriate file in the `protocol/` directory with correct TypeScript typing.
## 2. Check for duplicates
Verify that no existing message type already provides the same functionality.
## 3. Add to passThrough (if webview ↔ core)
If your message is between webview and core, add it to `core/protocol/passThrough.ts`.
## 4. Add to IntelliJ constants (if webview ↔ core)
If your message is between webview and core, add it to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt`.
## 5. Implement the message handler
Implement the message in the appropriate location:
- **Messages to core**: `core/core.ts`
- **Messages to GUI**: `useWebviewListener` hook
- **Messages to VS Code IDE**: `VsCodeMessenger.ts`
- **Messages to JetBrains IDE**: `IdeProtocolClient.kt`
## 6. Test the implementation
Verify that your message works correctly in both VS Code and JetBrains IDEs if applicable.

View file

@ -0,0 +1,5 @@
---
name: Don't be overeager
---
Avoid over-eagerly adding new features. You should solve the problem at hand and then can propose further work.

View file

@ -104,6 +104,14 @@ jobs:
path: gui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
- name: Build packages (Windows)
run: ./scripts/build-packages.ps1
if: matrix.os == 'windows-latest'
- name: Build packages (Unix)
run: ./scripts/build-packages.sh
if: matrix.os != 'windows-latest'
- name: Install extension Dependencies
run: |
cd extensions/vscode

View file

@ -99,6 +99,14 @@ jobs:
path: gui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
- name: Build packages (Windows)
run: ./scripts/build-packages.ps1
if: matrix.os == 'windows-latest'
- name: Build packages (Unix)
run: ./scripts/build-packages.sh
if: matrix.os != 'windows-latest'
- name: Install extension Dependencies
run: |
cd extensions/vscode

View file

@ -53,9 +53,9 @@
"@aws-sdk/credential-providers": "^3.778.0",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "file:../packages/config-yaml",
"@continuedev/fetch": "^1.0.13",
"@continuedev/fetch": "^1.0.14",
"@continuedev/llm-info": "^1.0.8",
"@continuedev/openai-adapters": "^1.0.32",
"@continuedev/openai-adapters": "file:../packages/openai-adapters",
"@modelcontextprotocol/sdk": "^1.12.0",
"@mozilla/readability": "^0.5.0",
"@octokit/rest": "^20.1.1",
@ -106,7 +106,6 @@
"sqlite3": "^5.1.7",
"system-ca": "^1.0.3",
"tar": "^7.4.3",
"tree-sitter-structured-text": "^0.0.1",
"tree-sitter-wasms": "^0.1.11",
"uuid": "^9.0.1",
"vectordb": "^0.4.20",
@ -145,7 +144,6 @@
"myers-diff": "^2.1.0",
"onnxruntime-common": "1.14.0",
"onnxruntime-web": "1.14.0",
"tree-sitter-cli": "^0.22.5",
"ts-jest": "^29.1.1",
"typescript": "^5.6.3",
"vitest": "^3.1.4"

View file

@ -139,7 +139,7 @@
},
"../packages/config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.94",
"version": "1.0.95",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
@ -150,10 +150,15 @@
"config-yaml": "dist/cli.js"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^10.0.6",
"@types/jest": "^29.5.14",
"@types/node": "^20.0.0",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"semantic-release": "^21.1.2",
"ts-jest": "^29.2.3",
"ts-node": "^10.9.2",
"zod-to-json-schema": "^3.24.5"
@ -161,7 +166,7 @@
},
"../packages/openai-adapters": {
"name": "@continuedev/openai-adapters",
"version": "1.0.40",
"version": "1.0.42",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.5",

10
core/rules.md Normal file
View file

@ -0,0 +1,10 @@
# `core` rules
Whenever a new protocol message is added to the `protocol/` directory, check the following:
- It's type is defined correctly
- If it is a message from webview to core or vice versa:
- It has been added to `core/protocol/passThrough.ts`
- It has been added to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt`
- 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).
- It does not duplicate functionality from another message type that already exists.

View file

@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension
pluginName=continue-intellij-extension
pluginRepositoryUrl=https://github.com/continuedev/continue
# SemVer format -> https://semver.org
pluginVersion=1.0.25
pluginVersion=1.0.26
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=223
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension

View file

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "1.1.51",
"version": "1.1.52",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "1.1.51",
"version": "1.1.52",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

View file

@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
"version": "1.1.51",
"version": "1.1.52",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"

View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/openai-adapters",
"version": "1.0.40",
"version": "1.0.42",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/openai-adapters",
"version": "1.0.40",
"version": "1.0.42",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.5",

View file

@ -1,6 +1,6 @@
{
"name": "@continuedev/openai-adapters",
"version": "1.0.40",
"version": "1.0.42",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View file

@ -63,7 +63,11 @@ export class AzureApi extends OpenAIApi {
"`env.apiVersion` is a required configuration property for Azure OpenAI",
);
}
url.pathname = `${url.pathname}/openai/deployments/${config.env.deployment}`;
const basePathname = `openai/deployments/${config.env.deployment}`;
url.pathname =
url.pathname === "/" ? basePathname : `${url.pathname}/${basePathname}`;
queryParams["api-version"] = config.env.apiVersion;
}

View file

@ -173,4 +173,80 @@ describe("Configuration", () => {
"https://api.example.com",
);
});
it("should configure Azure OpenAI client with root URL and trailing slash", () => {
const azure = constructLlmApi({
provider: "azure",
apiKey: "sk-xxx",
apiBase: "https://test-azure-openai.azure.com/",
env: {
deployment: "gpt-4.1",
apiType: "azure-openai",
apiVersion: "2023-05-15",
},
});
// The Azure client modifies the baseURL to include the deployment
expect((azure as OpenAIApi).openai.baseURL).toBe(
"https://test-azure-openai.azure.com/openai/deployments/gpt-4.1",
);
expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
});
it("should configure Azure OpenAI client with path and trailing slash", () => {
const azure = constructLlmApi({
provider: "azure",
apiKey: "sk-xxx",
apiBase: "https://test-azure-openai.azure.com/v1/",
env: {
deployment: "gpt-4.1",
apiType: "azure-openai",
apiVersion: "2023-05-15",
},
});
// The Azure client modifies the baseURL to include the deployment
expect((azure as OpenAIApi).openai.baseURL).toBe(
"https://test-azure-openai.azure.com/v1/openai/deployments/gpt-4.1",
);
expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
});
it("should configure Azure OpenAI client with root URL and no trailing slash", () => {
const azure = constructLlmApi({
provider: "azure",
apiKey: "sk-xxx",
apiBase: "https://test-azure-openai.azure.com",
env: {
deployment: "gpt-4.1",
apiType: "azure-openai",
apiVersion: "2023-05-15",
},
});
// The Azure client modifies the baseURL to include the deployment
expect((azure as OpenAIApi).openai.baseURL).toBe(
"https://test-azure-openai.azure.com/openai/deployments/gpt-4.1",
);
expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
});
it("should configure Azure OpenAI client with path and no trailing slash", () => {
const azure = constructLlmApi({
provider: "azure",
apiKey: "sk-xxx",
apiBase: "https://test-azure-openai.azure.com/v1",
env: {
deployment: "gpt-4.1",
apiType: "azure-openai",
apiVersion: "2023-05-15",
},
});
// The Azure client modifies the baseURL to include the deployment
expect((azure as OpenAIApi).openai.baseURL).toBe(
"https://test-azure-openai.azure.com/v1/openai/deployments/gpt-4.1",
);
expect((azure as OpenAIApi).openai.apiKey).toBe("sk-xxx");
});
});

13
scripts/build-packages.ps1 Executable file
View file

@ -0,0 +1,13 @@
Push-Location packages
Push-Location "openai-adapters"
npm ci
npm run build
Pop-Location
Push-Location "config-yaml"
npm ci
npm run build
Pop-Location
Pop-Location

13
scripts/build-packages.sh Executable file
View file

@ -0,0 +1,13 @@
# Build @continuedev packages for monorepo style linking
cd packages
cd openai-adapters
npm ci
npm run build
cd ..
cd config-yaml
npm ci
npm run build