Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions src/components/CliOnlyScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,31 @@ describe("menus list command-line-only subcommands below a divider", () => {
r.unmount();
});

test("the divider is omitted when nothing is command line only", async () => {
test("the harness menu", async () => {
const r = renderScreen("/agentcore/harness");

await waitForText(r.lastFrame, "manage AgentCore harnesses");
await waitForText(r.lastFrame, "command line only");
expect(menuEntries(r.lastFrame()!)).toEqual({
screens: [
"create",
"get",
"list",
"update",
"delete",
"invoke",
"exec",
"endpoint",
"version",
],
cliOnly: ["logs", "traces"],
});
r.unmount();
});

test("the divider is omitted when nothing is command line only", async () => {
const r = renderScreen("/agentcore/harness/endpoint");

await waitForText(r.lastFrame, "manage harness endpoints");
expect(r.lastFrame()).not.toContain("command line only");
r.unmount();
});
Expand Down
11 changes: 11 additions & 0 deletions src/handlers/harness/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ export function createHarnessHandler(core: Core, io: AppIO): Router {
harness.use(withTuiOnEmptyFlagsAndArgs(core, io));
// Open the TUI at this root, i.e., `agentcore harness`
harness.default(renderTui(core, io));
harness.supportedTuiCommands(
"create",
"get",
"list",
"update",
"delete",
"invoke",
"exec",
"endpoint",
"version",
);

// Register handlers
harness.handler(createCreateHarnessHandler(core));
Expand Down
Loading