Elffuss BraidHub

kikocis/continue public

Merge pull request #7712 from continuedev/dallin/edit-output-fix

fix: edit output overridden
Changesetb52e46b3a12e45f5843d1b27c680066848fca4c52821a5ce01db58c855604d3a
AuthorNate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-09-11 14:48 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-11 14:48 -07:00
Parentsad172f4402b8, bb443ecc07d6

Browse the files at this changeset

1 file changed

modified gui/src/redux/thunks/handleApplyStateUpdate.ts +32 −31
@@ -83,43 +83,44 @@
8383 }
8484
8585 if (accepted) {
86- // Add autoformatting diff to tool output if present
87- if (applyState.autoFormattingDiff) {
88- dispatch(
89- updateToolCallOutput({
90- toolCallId: applyState.toolCallId,
91- contextItems: [
92- {
93- icon: "info",
94- name: "Auto-formatting Applied",
95- description: "Editor auto-formatting changes",
96- content: `Along with your edits, the editor applied the following auto-formatting:\n\n${applyState.autoFormattingDiff}\n\n(Note: Pay close attention to changes such as single quotes being converted to double quotes, semicolons being removed or added, long lines being broken into multiple lines, adjusting indentation style, adding/removing trailing commas, etc. This will help you ensure future SEARCH/REPLACE operations to this file are accurate.)`,
97- hidden: false,
98- },
99- ],
100- }),
101- );
102- }
103-
10486 if (toolCallState.status !== "errored") {
10587 dispatch(
10688 acceptToolCall({
10789 toolCallId: applyState.toolCallId,
10890 }),
10991 );
110- dispatch(
111- updateToolCallOutput({
112- toolCallId: applyState.toolCallId,
113- contextItems: [
114- {
115- name: "Edit Success",
116- content: `Successfully edited ${applyState.filepath}`,
117- description: "",
118- hidden: true,
119- },
120- ],
121- }),
122- );
92+
93+ // Add autoformatting diff to tool output if present
94+ if (applyState.autoFormattingDiff) {
95+ dispatch(
96+ updateToolCallOutput({
97+ toolCallId: applyState.toolCallId,
98+ contextItems: [
99+ {
100+ icon: "info",
101+ name: "Auto-formatting Applied",
102+ description: "Editor auto-formatting changes",
103+ content: `Along with your edits, the editor applied the following auto-formatting:\n\n${applyState.autoFormattingDiff}\n\n(Note: Pay close attention to changes such as single quotes being converted to double quotes, semicolons being removed or added, long lines being broken into multiple lines, adjusting indentation style, adding/removing trailing commas, etc. This will help you ensure future SEARCH/REPLACE operations to this file are accurate.)`,
104+ hidden: false,
105+ },
106+ ],
107+ }),
108+ );
109+ } else {
110+ dispatch(
111+ updateToolCallOutput({
112+ toolCallId: applyState.toolCallId,
113+ contextItems: [
114+ {
115+ name: "Edit Success",
116+ content: `Successfully edited ${applyState.filepath}`,
117+ description: "",
118+ hidden: true,
119+ },
120+ ],
121+ }),
122+ );
123+ }
123124 } else {
124125 dispatch(
125126 updateToolCallOutput({