Skip to content

Commit 2f1ea32

Browse files
bdjbenBenjamin Badejo
andauthored
fix(tui): show agent-scoped session example (#130519)
Co-authored-by: Benjamin Badejo <[email protected]>
1 parent b8d2ac7 commit 2f1ea32

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎src/tui/tui.test.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { EventEmitter } from "node:events";
33
import path from "node:path";
44
import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion";
55
import { afterEach, describe, expect, it, vi } from "vitest";
6-
import { AgentSelectionRequiredError } from "../agents/agent-scope-config.js";
76
import type { OpenClawConfig } from "../config/config.js";
87
import { retainLegacyDefaultAgentId } from "../config/legacy.default-agent-owner.js";
98
import { MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE } from "../shared/assistant-error-format.js";
@@ -380,7 +379,7 @@ describe("resolveInitialTuiAgentId", () => {
380379

381380
it("keeps an ownerless explicit fleet selection-required", () => {
382381
expect(() => resolveInitialTuiAgentId({ cfg, cwd: "/var/tmp/unrelated" })).toThrow(
383-
AgentSelectionRequiredError,
382+
"Multiple agents are configured, but TUI startup has no explicit owner. Pass an agent-scoped --session key (e.g., 'openclaw tui --session agent:agentname:main').",
384383
);
385384
});
386385

‎src/tui/tui.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export function resolveInitialTuiAgentId(params: {
293293
tryResolveLegacyCompatibilityAgentId(params.cfg) ??
294294
resolveDefaultAgentId(params.cfg, {
295295
surface: "TUI startup",
296-
hint: "Pass an agent-scoped --session key.",
296+
hint: `Pass an agent-scoped --session key (e.g., '${formatCliCommand("openclaw tui --session agent:agentname:main")}').`,
297297
}),
298298
);
299299
}

0 commit comments

Comments
 (0)