fix: only allow going up in history when not already in history if input is empty (#654)
\+ cleanup below input help to be "ctrl+c to exit | "/" to see commands | enter to send" now that we have command autocompletion \+ minor other drive-by code cleanups --------- Signed-off-by: Thibault Sottiaux <tibo@openai.com>
This commit is contained in:
committed by
GitHub
parent
2759ff39da
commit
866626347b
@@ -24,35 +24,6 @@ vi.mock("../src/utils/input-utils.js", () => ({
|
||||
}));
|
||||
|
||||
describe("TerminalChatInput multiline functionality", () => {
|
||||
it("renders the multiline editor component", async () => {
|
||||
const props: ComponentProps<typeof TerminalChatInput> = {
|
||||
isNew: false,
|
||||
loading: false,
|
||||
submitInput: () => {},
|
||||
confirmationPrompt: null,
|
||||
explanation: undefined,
|
||||
submitConfirmation: () => {},
|
||||
setLastResponseId: () => {},
|
||||
setItems: () => {},
|
||||
contextLeftPercent: 50,
|
||||
openOverlay: () => {},
|
||||
openDiffOverlay: () => {},
|
||||
openModelOverlay: () => {},
|
||||
openApprovalOverlay: () => {},
|
||||
openHelpOverlay: () => {},
|
||||
onCompact: () => {},
|
||||
interruptAgent: () => {},
|
||||
active: true,
|
||||
thinkingSeconds: 0,
|
||||
};
|
||||
|
||||
const { lastFrameStripped } = renderTui(<TerminalChatInput {...props} />);
|
||||
const frame = lastFrameStripped();
|
||||
|
||||
// Check that the help text mentions shift+enter for new line
|
||||
expect(frame).toContain("shift+enter for new line");
|
||||
});
|
||||
|
||||
it("allows multiline input with shift+enter", async () => {
|
||||
const submitInput = vi.fn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user