fix(webui): keep stop immediate without command metadata
This commit is contained in:
1 parent
5cf629963d
commit
24a5c6dd56
3 files changed
+19
-1
No files matched your search
@@ -2929,6 +2929,19 @@ describe("ThreadComposer", () => {
|
||||
expect(onSend).toHaveBeenCalledWith("/status", undefined, undefined);
|
||||
});
|
||||
|
||||
it("sends a possible stop command without waiting when command metadata is unavailable", () => {
|
||||
const onSend = vi.fn();
|
||||
const onStop = vi.fn();
|
||||
render(<ThreadComposer onSend={onSend} onStop={onStop} isStreaming />);
|
||||
const input = screen.getByLabelText("Message input");
|
||||
fireEvent.change(input, { target: { value: "/stop" } });
|
||||
fireEvent.keyDown(input, { key: "Enter" });
|
||||
|
||||
expect(onSend).toHaveBeenCalledWith("/stop", undefined, { continueActiveTurn: true });
|
||||
expect(onStop).not.toHaveBeenCalled();
|
||||
expect(screen.queryByRole("group", { name: "Waiting to send" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("marks new chat commands as side-channel sends that finalize the active turn", () => {
|
||||
const onSend = vi.fn();
|
||||
render(
|
||||
|
||||
Reference in new issue
Block a user