mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:51:25 +00:00
tui: keep trimming for normal submits; only raw ! triggers bash
This commit is contained in:
committed by
Peter Steinberger
parent
5fd699d0bf
commit
110b5dafee
@@ -50,7 +50,7 @@ describe("createEditorSubmitHandler", () => {
|
||||
expect(sendMessage).toHaveBeenCalledWith("!");
|
||||
});
|
||||
|
||||
it("does not trim input", () => {
|
||||
it("trims normal messages before sending and adding to history", () => {
|
||||
const editor = {
|
||||
setText: vi.fn(),
|
||||
addToHistory: vi.fn(),
|
||||
@@ -68,7 +68,7 @@ describe("createEditorSubmitHandler", () => {
|
||||
|
||||
onSubmit(" hello ");
|
||||
|
||||
expect(sendMessage).toHaveBeenCalledWith(" hello ");
|
||||
expect(editor.addToHistory).toHaveBeenCalledWith(" hello ");
|
||||
expect(sendMessage).toHaveBeenCalledWith("hello");
|
||||
expect(editor.addToHistory).toHaveBeenCalledWith("hello");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user