This commit is contained in:
kh.ai
2025-10-15 13:46:33 -07:00
parent f14b5adabf
commit a34f6c9f08
21 changed files with 857 additions and 9 deletions
+5
View File
@@ -61,6 +61,11 @@ describe("/clear command", () => {
active: true,
thinkingSeconds: 0,
items: existingItems,
config: {
model: "codex-mini-latest",
instructions: "",
provider: "openai",
},
};
const { stdin, flush, cleanup } = renderTui(
@@ -66,17 +66,27 @@ function stubProps(): any {
loading: false,
submitInput: vi.fn(),
confirmationPrompt: null,
explanation: undefined,
submitConfirmation: vi.fn(),
setLastResponseId: vi.fn(),
// Cast to any to satisfy the generic React.Dispatch signature without
// pulling the ResponseItem type into the test bundle.
setItems: (() => {}) as any,
setItems: vi.fn(),
contextLeftPercent: 100,
openOverlay: vi.fn(),
openModelOverlay: vi.fn(),
openHelpOverlay: vi.fn(),
openApprovalOverlay: vi.fn(),
openSessionsOverlay: vi.fn(),
openDiffOverlay: vi.fn(),
onCompact: vi.fn(),
interruptAgent: vi.fn(),
active: true,
thinkingSeconds: 0,
items: [],
config: {
model: "codex-mini-latest",
instructions: "",
provider: "openai",
},
};
}
+1
View File
@@ -10,6 +10,7 @@ test("SLASH_COMMANDS includes expected commands", () => {
expect(commands).toContain("/help");
expect(commands).toContain("/model");
expect(commands).toContain("/approval");
expect(commands).toContain("/secreview");
expect(commands).toContain("/clearhistory");
expect(commands).toContain("/diff");
});
@@ -26,6 +26,11 @@ describe("TerminalChatInput compact command", () => {
interruptAgent: () => {},
active: true,
thinkingSeconds: 0,
config: {
model: "codex-mini-latest",
instructions: "",
provider: "openai",
},
};
const { lastFrameStripped } = renderTui(<TerminalChatInput {...props} />);
const frame = lastFrameStripped();
@@ -81,6 +81,11 @@ describe("TerminalChatInput file tag suggestions", () => {
interruptAgent: vi.fn(),
active: true,
thinkingSeconds: 0,
config: {
model: "codex-mini-latest",
instructions: "",
provider: "openai",
},
};
beforeEach(() => {
@@ -47,6 +47,11 @@ describe("TerminalChatInput multiline functionality", () => {
interruptAgent: () => {},
active: true,
thinkingSeconds: 0,
config: {
model: "codex-mini-latest",
instructions: "",
provider: "openai",
},
};
const { stdin, lastFrameStripped, flush, cleanup } = renderTui(
@@ -99,6 +104,11 @@ describe("TerminalChatInput multiline functionality", () => {
interruptAgent: () => {},
active: true,
thinkingSeconds: 0,
config: {
model: "codex-mini-latest",
instructions: "",
provider: "openai",
},
};
const { stdin, lastFrameStripped, flush, cleanup } = renderTui(