fix: use yolo when applying diff

This commit is contained in:
uinstinct 2025-10-29 10:20:33 +05:30
parent 656df8418c
commit d5a6697c97

View file

@ -44,13 +44,24 @@ export const handleApplyStateUpdate = createAsyncThunk<
// Handle apply status updates - use toolCallId from event payload
if (applyState.toolCallId) {
if (applyState.status === "closed") {
// Find the tool call to check if it was canceled
const toolCallState = findToolCallById(
getState().session.history,
applyState.toolCallId,
);
const toolCallState = findToolCallById(
getState().session.history,
applyState.toolCallId,
);
if (
applyState.status === "done" &&
toolCallState?.toolCall.function.name &&
getState().ui.toolSettings[toolCallState.toolCall.function.name] ===
"allowedWithoutPermission"
) {
extra.ideMessenger.post("acceptDiff", {
streamId: applyState.streamId,
filepath: applyState.filepath,
});
}
if (applyState.status === "closed") {
if (toolCallState) {
const accepted = toolCallState.status !== "canceled";