Merge pull request #8495 from uinstinct/apply-yolo

fix: use yolo when applying diff
This commit is contained in:
Ting-Wai 2025-10-29 17:11:06 -07:00 • committed by GitHub
commit 759e1ed821
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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";