fix: only set inactive when conversation isn't continuing

This commit is contained in:
Dallin Romney 2025-07-10 11:30:45 -07:00
parent 37a4492969
commit 2b845d07c4
2 changed files with 5 additions and 2 deletions

View file

@ -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<void, undefined, ThunkApiType>(
}),
);
unwrapResult(wrapped);
} else {
dispatch(setInactive());
}
},
);

View file

@ -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());
}
}
},