Skip to content

Commit 842ca98

Browse files
committed
Merge branch 'main' into enter-key-input
2 parents 619a3f1 + 759e1ed commit 842ca98

File tree

116 files changed

+6491
-1461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+6491
-1461
lines changed

.github/workflows/jetbrains-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ jobs:
398398
399399
# Download the binary artifact
400400
- name: Download binary artifact
401-
uses: actions/download-artifact@v5
401+
uses: actions/download-artifact@v6
402402
with:
403403
name: continue-binary-${{ matrix.platform }}-${{ matrix.arch }}
404404
path: ./binary/bin/${{ matrix.platform }}-${{ matrix.arch }}/
@@ -563,7 +563,7 @@ jobs:
563563
# ./gradlew patchChangelog --release-note="$CHANGELOG"
564564

565565
- name: Download the plugin
566-
uses: actions/download-artifact@v5
566+
uses: actions/download-artifact@v6
567567
with:
568568
name: ${{ steps.artifact.outputs.filename }}
569569
path: ./build/distributions/

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
git config --local user.name "GitHub Action"
121121
122122
# Download the .vsix artifacts
123-
- uses: actions/download-artifact@v5
123+
- uses: actions/download-artifact@v6
124124
with:
125125
pattern: "*-vsix"
126126
path: vsix-artifacts
@@ -156,7 +156,7 @@ jobs:
156156
run: git fetch origin ${{ github.ref }} && git checkout ${{ github.ref }}
157157

158158
# 1. Download the artifacts
159-
- uses: actions/download-artifact@v5
159+
- uses: actions/download-artifact@v6
160160
with:
161161
pattern: "*-vsix"
162162
path: vsix-artifacts

.github/workflows/preview.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
git config --local user.name "GitHub Action"
105105
106106
# Download the .vsix artifacts
107-
- uses: actions/download-artifact@v5
107+
- uses: actions/download-artifact@v6
108108
with:
109109
pattern: "*-vsix"
110110
path: vsix-artifacts
@@ -142,7 +142,7 @@ jobs:
142142
run: git fetch origin ${{ github.ref }} && git checkout ${{ github.ref }}
143143

144144
# 1. Download the artifacts
145-
- uses: actions/download-artifact@v5
145+
- uses: actions/download-artifact@v6
146146
with:
147147
pattern: "*-vsix"
148148
path: vsix-artifacts

actions/general-review/action.yml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,45 @@ runs:
115115
shell: bash
116116
run: npm install -g @continuedev/cli@latest
117117

118+
- name: Setup Action Scripts
119+
if: env.SHOULD_RUN == 'true'
120+
shell: bash
121+
run: |
122+
# Create directory for scripts
123+
mkdir -p .continue-action-scripts
124+
125+
# Check if we're running in the Continue repo itself (scripts exist locally)
126+
if [ -f "actions/general-review/scripts/buildPrompt.js" ] && [ -f "actions/general-review/scripts/writeMarkdown.js" ]; then
127+
echo "Running in Continue repo - using local scripts from current checkout"
128+
cp actions/general-review/scripts/buildPrompt.js .continue-action-scripts/buildPrompt.js
129+
cp actions/general-review/scripts/writeMarkdown.js .continue-action-scripts/writeMarkdown.js
130+
else
131+
echo "Running in external repo - downloading scripts from Continue repo"
132+
133+
# Download scripts from Continue repo
134+
echo "Downloading buildPrompt.js..."
135+
curl -sSL https://raw.githubusercontent.com/continuedev/continue/main/actions/general-review/scripts/buildPrompt.js \
136+
-o .continue-action-scripts/buildPrompt.js
137+
138+
echo "Downloading writeMarkdown.js..."
139+
curl -sSL https://raw.githubusercontent.com/continuedev/continue/main/actions/general-review/scripts/writeMarkdown.js \
140+
-o .continue-action-scripts/writeMarkdown.js
141+
fi
142+
143+
# Verify scripts exist
144+
if [ ! -f .continue-action-scripts/buildPrompt.js ]; then
145+
echo "Error: buildPrompt.js not found"
146+
exit 1
147+
fi
148+
149+
if [ ! -f .continue-action-scripts/writeMarkdown.js ]; then
150+
echo "Error: writeMarkdown.js not found"
151+
exit 1
152+
fi
153+
154+
echo "Scripts ready:"
155+
ls -lh .continue-action-scripts/
156+
118157
- name: Post Initial Comment
119158
if: env.SHOULD_RUN == 'true'
120159
id: initial-comment
@@ -218,7 +257,7 @@ runs:
218257
# Gather PR context and build prompt without heredocs
219258
gh pr diff "$PR_NUMBER" > pr_diff.txt
220259
gh pr view "$PR_NUMBER" --json title,author,body,files > pr_data.json
221-
node actions/general-review/scripts/buildPrompt.js "$PR_NUMBER"
260+
node .continue-action-scripts/buildPrompt.js "$PR_NUMBER"
222261
rm -f pr_data.json
223262
224263
- name: Run Continue CLI Review
@@ -241,7 +280,7 @@ runs:
241280
if [ -z "$CONTINUE_API_KEY" ]; then
242281
echo "Warning: CONTINUE_API_KEY environment variable is not set"
243282
# Create fallback review and continue
244-
node actions/general-review/scripts/writeMarkdown.js code_review.md missing_api_key
283+
node .continue-action-scripts/writeMarkdown.js code_review.md missing_api_key
245284
echo "SKIP_CLI=true" >> $GITHUB_ENV
246285
else
247286
echo "SKIP_CLI=false" >> $GITHUB_ENV
@@ -263,7 +302,7 @@ runs:
263302
echo "Testing Continue CLI..."
264303
if ! which cn > /dev/null 2>&1; then
265304
echo "Warning: Continue CLI not found or not working"
266-
node actions/general-review/scripts/writeMarkdown.js code_review.md cli_install_failed
305+
node .continue-action-scripts/writeMarkdown.js code_review.md cli_install_failed
267306
echo "SKIP_CLI=true" >> $GITHUB_ENV
268307
else
269308
echo "Continue CLI found at: $(which cn)"
@@ -299,7 +338,7 @@ runs:
299338
# Check if output is empty
300339
if [ ! -s code_review.md ]; then
301340
echo "Warning: Continue CLI returned empty output"
302-
node actions/general-review/scripts/writeMarkdown.js code_review.md empty_output
341+
node .continue-action-scripts/writeMarkdown.js code_review.md empty_output
303342
fi
304343
else
305344
echo "Error: Continue CLI command failed with exit code $?"
@@ -308,13 +347,13 @@ runs:
308347
309348
# Check for specific error patterns
310349
if grep -q "not found\|ENOENT" cli_error.log 2>/dev/null; then
311-
node actions/general-review/scripts/writeMarkdown.js code_review.md cli_not_found
350+
node .continue-action-scripts/writeMarkdown.js code_review.md cli_not_found
312351
elif grep -q "config\|assistant" cli_error.log 2>/dev/null; then
313-
node actions/general-review/scripts/writeMarkdown.js code_review.md config_error
352+
node .continue-action-scripts/writeMarkdown.js code_review.md config_error
314353
elif grep -q "api\|auth" cli_error.log 2>/dev/null; then
315-
node actions/general-review/scripts/writeMarkdown.js code_review.md auth_error
354+
node .continue-action-scripts/writeMarkdown.js code_review.md auth_error
316355
else
317-
node actions/general-review/scripts/writeMarkdown.js code_review.md generic_failure
356+
node .continue-action-scripts/writeMarkdown.js code_review.md generic_failure
318357
fi
319358
fi
320359

core/config/markdown/loadMarkdownRules.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ export async function loadMarkdownRules(ide: IDE): Promise<{
7979
uriType: "file",
8080
fileUri: file.path,
8181
});
82-
rules.push({ ...rule, source: "rules-block", sourceFile: file.path });
82+
if (!rule.invokable) {
83+
rules.push({
84+
...rule,
85+
source: "rules-block",
86+
sourceFile: file.path,
87+
});
88+
}
8389
} catch (e) {
8490
errors.push({
8591
fatal: false,

core/config/migrateSharedConfig.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ export function migrateJsonSharedConfig(filepath: string, ide: IDE): void {
173173
effected = true;
174174
}
175175

176-
const { autoAcceptEditToolDiffs, ...withoutAutoApply } = migratedUI;
177-
if (autoAcceptEditToolDiffs !== undefined) {
178-
shareConfigUpdates.autoAcceptEditToolDiffs = autoAcceptEditToolDiffs;
179-
migratedUI = withoutAutoApply;
180-
effected = true;
181-
}
182-
183176
const { showChatScrollbar, ...withoutShowChatScrollbar } = migratedUI;
184177
if (showChatScrollbar !== undefined) {
185178
shareConfigUpdates.showChatScrollbar = showChatScrollbar;

core/config/sharedConfig.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export const sharedConfigSchema = z
3131
codeWrap: z.boolean(),
3232
displayRawMarkdown: z.boolean(),
3333
showChatScrollbar: z.boolean(),
34-
autoAcceptEditToolDiffs: z.boolean(),
3534
continueAfterToolRejection: z.boolean(),
3635

3736
// `tabAutocompleteOptions` in `ContinueConfig`
@@ -140,10 +139,6 @@ export function modifyAnyConfigWithSharedConfig<
140139
if (sharedConfig.showChatScrollbar !== undefined) {
141140
configCopy.ui.showChatScrollbar = sharedConfig.showChatScrollbar;
142141
}
143-
if (sharedConfig.autoAcceptEditToolDiffs !== undefined) {
144-
configCopy.ui.autoAcceptEditToolDiffs =
145-
sharedConfig.autoAcceptEditToolDiffs;
146-
}
147142

148143
if (sharedConfig.allowAnonymousTelemetry !== undefined) {
149144
configCopy.allowAnonymousTelemetry = sharedConfig.allowAnonymousTelemetry;

core/core.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import {
7070
import { MCPManagerSingleton } from "./context/mcp/MCPManagerSingleton";
7171
import { performAuth, removeMCPAuth } from "./context/mcp/MCPOauth";
7272
import { setMdmLicenseKey } from "./control-plane/mdm/mdm";
73+
import { myersDiff } from "./diff/myers";
7374
import { ApplyAbortManager } from "./edit/applyAbortManager";
7475
import { streamDiffLines } from "./edit/streamDiffLines";
7576
import { shouldIgnore } from "./indexing/shouldIgnore";
@@ -796,6 +797,10 @@ export class Core {
796797
);
797798
});
798799

800+
on("getDiffLines", (msg) => {
801+
return myersDiff(msg.data.oldContent, msg.data.newContent);
802+
});
803+
799804
on("cancelApply", async (msg) => {
800805
const abortManager = ApplyAbortManager.getInstance();
801806
abortManager.clear(); // for now abort all streams

core/index.d.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,15 @@ export interface ToolResultChatMessage {
359359
role: "tool";
360360
content: string;
361361
toolCallId: string;
362+
/** Arbitrary per-message metadata (IDs, provider-specific info, etc.) */
363+
metadata?: Record<string, unknown>;
362364
}
363365

364366
export interface UserChatMessage {
365367
role: "user";
366368
content: MessageContent;
369+
/** Arbitrary per-message metadata (IDs, provider-specific info, etc.) */
370+
metadata?: Record<string, unknown>;
367371
}
368372

369373
export interface ThinkingChatMessage {
@@ -372,6 +376,12 @@ export interface ThinkingChatMessage {
372376
signature?: string;
373377
redactedThinking?: string;
374378
toolCalls?: ToolCallDelta[];
379+
reasoning_details?: {
380+
signature?: string;
381+
[key: string]: any;
382+
}[];
383+
/** Arbitrary per-message metadata (IDs, provider-specific info, etc.) */
384+
metadata?: Record<string, unknown>;
375385
}
376386

377387
/**
@@ -400,11 +410,15 @@ export interface AssistantChatMessage {
400410
content: MessageContent;
401411
toolCalls?: ToolCallDelta[];
402412
usage?: Usage;
413+
/** Arbitrary per-message metadata (IDs, provider-specific info, etc.) */
414+
metadata?: Record<string, unknown>;
403415
}
404416

405417
export interface SystemChatMessage {
406418
role: "system";
407419
content: string;
420+
/** Arbitrary per-message metadata (IDs, provider-specific info, etc.) */
421+
metadata?: Record<string, unknown>;
408422
}
409423

410424
export type ChatMessage =
@@ -1390,7 +1404,6 @@ export interface ContinueUIConfig {
13901404
showChatScrollbar?: boolean;
13911405
codeWrap?: boolean;
13921406
showSessionTabs?: boolean;
1393-
autoAcceptEditToolDiffs?: boolean;
13941407
continueAfterToolRejection?: boolean;
13951408
}
13961409

core/llm/autodetect.ts

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,47 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [
6363
"watsonx",
6464
"nebius",
6565
"relace",
66+
"openrouter",
67+
"deepseek",
68+
"xAI",
69+
"groq",
70+
"gemini",
71+
"docker",
72+
// TODO add these, change to inverted logic so only the ones that need templating are hardcoded
73+
// Asksage.ts
74+
// Azure.ts
75+
// BedrockImport.ts
76+
// Cerebras.ts
77+
// Cloudflare.ts
78+
// CometAPI.ts
79+
// CustomLLM.ts
80+
// DeepInfra.ts
81+
// Fireworks.ts
82+
// Flowise.ts
83+
// FunctionNetwork.ts
84+
// HuggingFaceInferenceAPI.ts
85+
// HuggingFaceTEI.ts
86+
// HuggingFaceTGI.ts
87+
// Inception.ts
88+
// Kindo.ts
89+
// LlamaCpp.ts
90+
// LlamaStack.ts
91+
// Llamafile.ts
92+
// Mock.ts
93+
// Moonshot.ts
94+
// NCompass.ts
95+
// OVHcloud.ts
96+
// Replicate.ts
97+
// Scaleway.ts
98+
// SiliconFlow.ts
99+
// TARS.ts
100+
// Test.ts
101+
// TextGenWebUI.ts
102+
// TransformersJsEmbeddingsProvider.ts
103+
// Venice.ts
104+
// Vllm.ts
105+
// Voyage.ts
106+
// etc
66107
];
67108

68109
const PROVIDER_SUPPORTS_IMAGES: string[] = [
@@ -105,6 +146,8 @@ const MODEL_SUPPORTS_IMAGES: RegExp[] = [
105146
/\bgemma-?3(?!n)/, // gemma3 supports vision, but gemma3n doesn't!
106147
/\b(pali|med)gemma/,
107148
/qwen(.*)vl/,
149+
/mistral-small/,
150+
/mistral-medium/,
108151
];
109152

110153
function modelSupportsImages(
@@ -142,7 +185,12 @@ function modelSupportsReasoning(
142185
if (!model) {
143186
return false;
144187
}
145-
if ("anthropic" === model.underlyingProviderName) {
188+
// do not turn reasoning on by default for claude 3 models
189+
if (
190+
model.model.includes("claude") &&
191+
!model.model.includes("-3-") &&
192+
!model.model.includes("-3.5-")
193+
) {
146194
return true;
147195
}
148196
if (model.model.includes("deepseek-r")) {

0 commit comments

Comments
 (0)