diff --git a/gui/src/redux/thunks/callCurrentTool.ts b/gui/src/redux/thunks/callCurrentTool.ts index cedebe4f9..e91da13e7 100644 --- a/gui/src/redux/thunks/callCurrentTool.ts +++ b/gui/src/redux/thunks/callCurrentTool.ts @@ -8,6 +8,7 @@ import { selectSelectedChatModel } from "../slices/configSlice"; import { acceptToolCall, errorToolCall, + setInactive, setToolCallCalling, updateToolCallOutput, } from "../slices/sessionSlice"; @@ -145,6 +146,8 @@ export const callCurrentTool = createAsyncThunk( }), ); unwrapResult(wrapped); + } else { + dispatch(setInactive()); } }, ); diff --git a/gui/src/redux/thunks/streamNormalInput.ts b/gui/src/redux/thunks/streamNormalInput.ts index 211f211c8..e57d65df5 100644 --- a/gui/src/redux/thunks/streamNormalInput.ts +++ b/gui/src/redux/thunks/streamNormalInput.ts @@ -154,8 +154,6 @@ export const streamNormalInput = createAsyncThunk< next = await gen.next(); } - dispatch(setInactive()); - // Attach prompt log and end thinking for reasoning models if (next.done && next.value) { dispatch(addPromptCompletionPair([next.value])); @@ -212,6 +210,8 @@ export const streamNormalInput = createAsyncThunk< ) { const response = await dispatch(callCurrentTool()); unwrapResult(response); + } else { + dispatch(setInactive()); } } },