Elffuss BraidHub

kikocis/continue public

Merge pull request #6415 from continuedev/dallin/remove-only-one-insertion

Remove unused onlyOneInsertion param
Changesetd7d593f1d0c3058cbddb156b44d23bae784202829a47f0097ce5a700fbdf9944
AuthorDallin Romney <dallinromney@gmail.com> · 2025-07-02 16:34 -07:00
CommitterGitHub <noreply@github.com> · 2025-07-02 16:34 -07:00
Parentsbec49a0a060a, 00b26f16aa29

Browse the files at this changeset

4 files changed

modified core/core.ts +0 −1
@@ -558,7 +558,6 @@
558558 : undefined,
559559 input: data.input,
560560 language: data.language,
561- onlyOneInsertion: false,
562561 overridePrompt: undefined,
563562 abortController,
564563 });
modified core/edit/streamDiffLines.ts +0 −8
@@ -66,7 +66,6 @@
6666 abortController,
6767 input,
6868 language,
69- onlyOneInsertion,
7069 overridePrompt,
7170 rulesToInclude,
7271 }: {
@@ -77,7 +76,6 @@
7776 abortController: AbortController;
7877 input: string;
7978 language: string | undefined;
80- onlyOneInsertion: boolean;
8179 overridePrompt: ChatMessage[] | undefined;
8280 rulesToInclude: RuleWithSource[] | undefined;
8381 }): AsyncGenerator<DiffLine> {
@@ -182,13 +180,7 @@
182180 diffLines = addIndentation(diffLines, indentation);
183181 }
184182
185- let seenGreen = false;
186183 for await (const diffLine of diffLines) {
187184 yield diffLine;
188- if (diffLine.type === "new") {
189- seenGreen = true;
190- } else if (onlyOneInsertion && seenGreen && diffLine.type === "same") {
191- break;
192- }
193185 }
194186 }
modified extensions/vscode/src/commands.ts +1 −5
@@ -142,14 +142,12 @@
142142 *
143143 * @param promptName - The key for the prompt in the context menu configuration.
144144 * @param fallbackPrompt - The prompt to use if the configured prompt is not available.
145- * @param [onlyOneInsertion] - Optional. If true, only one insertion will be made.
146145 * @param [range] - Optional. The range to edit if provided.
147146 * @returns
148147 */
149148 async function streamInlineEdit(
150149 promptName: keyof ContextMenuConfig,
151150 fallbackPrompt: string,
152- onlyOneInsertion?: boolean,
153151 range?: vscode.Range,
154152 ) {
155153 const { config } = await configHandler.loadConfig();
@@ -170,7 +168,6 @@
170168 input:
171169 config.experimental?.contextMenuPrompts?.[promptName] ?? fallbackPrompt,
172170 llm,
173- onlyOneInsertion,
174171 range,
175172 rulesToInclude: config.rules,
176173 });
@@ -243,7 +240,7 @@
243240 ) => {
244241 captureCommandTelemetry("customQuickActionStreamInlineEdit");
245242
246- streamInlineEdit("docstring", prompt, false, range);
243+ streamInlineEdit("docstring", prompt, range);
247244 },
248245 "continue.codebaseForceReIndex": async () => {
249246 core.invoke("index/forceReIndex", undefined);
@@ -358,7 +355,6 @@
358355 void streamInlineEdit(
359356 "docstring",
360357 "Write a docstring for this code. Do not change anything about the code itself.",
361- false,
362358 );
363359 },
364360 "continue.fixCode": async () => {
modified extensions/vscode/src/diff/vertical/manager.ts +0 −3
@@ -287,7 +287,6 @@
287287 input,
288288 llm,
289289 streamId,
290- onlyOneInsertion,
291290 quickEdit,
292291 range,
293292 newCode,
@@ -297,7 +296,6 @@
297296 input: string;
298297 llm: ILLM;
299298 streamId?: string;
300- onlyOneInsertion?: boolean;
301299 quickEdit?: string;
302300 range?: vscode.Range;
303301 newCode?: string;
@@ -466,7 +464,6 @@
466464 rulesToInclude,
467465 input,
468466 language: getMarkdownLanguageTagForFile(fileUri),
469- onlyOneInsertion: !!onlyOneInsertion,
470467 overridePrompt,
471468 abortController,
472469 });