fix: only set inactive when conversation isn't continuing
This commit is contained in:
parent
37a4492969
commit
2b845d07c4
2 changed files with 5 additions and 2 deletions
|
|
@ -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());
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue