Merge pull request #5414 from continuedev/nate/a-fix

fix cmd stopping stream
This commit is contained in:
Nate Sesti 2025-04-28 21:16:17 -07:00 • committed by GitHub
commit 016755edfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 8 deletions

View file

@ -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"

View file

@ -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());
}

View file

@ -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",

View file

@ -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",

View file

@ -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