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

fix: edit output overridden
This commit is contained in:
Nate Sesti 2025-09-11 14:48:34 -07:00 • committed by GitHub
commit 5e0001cb49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,43 +83,44 @@ export const handleApplyStateUpdate = createAsyncThunk<
}
if (accepted) {
// Add autoformatting diff to tool output if present
if (applyState.autoFormattingDiff) {
dispatch(
updateToolCallOutput({
toolCallId: applyState.toolCallId,
contextItems: [
{
icon: "info",
name: "Auto-formatting Applied",
description: "Editor auto-formatting changes",
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.)`,
hidden: false,
},
],
}),
);
}
if (toolCallState.status !== "errored") {
dispatch(
acceptToolCall({
toolCallId: applyState.toolCallId,
}),
);
dispatch(
updateToolCallOutput({
toolCallId: applyState.toolCallId,
contextItems: [
{
name: "Edit Success",
content: `Successfully edited ${applyState.filepath}`,
description: "",
hidden: true,
},
],
}),
);
// Add autoformatting diff to tool output if present
if (applyState.autoFormattingDiff) {
dispatch(
updateToolCallOutput({
toolCallId: applyState.toolCallId,
contextItems: [
{
icon: "info",
name: "Auto-formatting Applied",
description: "Editor auto-formatting changes",
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.)`,
hidden: false,
},
],
}),
);
} else {
dispatch(
updateToolCallOutput({
toolCallId: applyState.toolCallId,
contextItems: [
{
name: "Edit Success",
content: `Successfully edited ${applyState.filepath}`,
description: "",
hidden: true,
},
],
}),
);
}
} else {
dispatch(
updateToolCallOutput({