diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index cef4b6f60..f2f1fb54f 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "1.1.28", + "version": "1.1.29", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 162cc0752..4350ff56d 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -139,9 +139,9 @@ export function Chat() { // Cmd + Backspace to delete current step const listener = (e: any) => { if ( - e.key === "Backspace" && jetbrains - ? e.altKey - : isMetaEquivalentKeyPressed(e) && !e.shiftKey + e.key === "Backspace" && + (jetbrains ? e.altKey : isMetaEquivalentKeyPressed(e)) && + !e.shiftKey ) { dispatch(cancelStream()); } diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 391eacab7..1105fc178 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.18", + "version": "1.0.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.18", + "version": "1.0.20", "license": "Apache-2.0", "dependencies": { "@azure/openai": "^1.0.0-beta.12", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 6c25bc2a7..b20aca1d0 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.19", + "version": "1.0.20", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/Anthropic.ts b/packages/openai-adapters/src/apis/Anthropic.ts index 04b0fbce9..871b35acc 100644 --- a/packages/openai-adapters/src/apis/Anthropic.ts +++ b/packages/openai-adapters/src/apis/Anthropic.ts @@ -37,11 +37,23 @@ export class AnthropicApi implements BaseLlmApi { stop = [oaiBody.stop]; } + const systemMessage = oaiBody.messages.find( + (msg) => msg.role === "system", + )?.content; + const anthropicBody = { messages: this._convertMessages( oaiBody.messages.filter((msg) => msg.role !== "system"), ), - system: oaiBody.messages.find((msg) => msg.role === "system")?.content, + system: systemMessage + ? [ + { + type: "text", + text: systemMessage, + cache_control: { type: "ephemeral" }, + }, + ] + : systemMessage, top_p: oaiBody.top_p, temperature: oaiBody.temperature, max_tokens: oaiBody.max_tokens ?? 4096, // max_tokens is required