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
3 changes: 1 addition & 2 deletions src/lib/actions/sandbox/connect-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ describe("connectSandbox flow", () => {
await expect(harness.connectSandbox("alpha")).rejects.toThrow("process.exit(0)");

const output = harness.logSpy.mock.calls.map((call) => String(call[0])).join("\n");
expect(output).toContain("Inside the sandbox, run the configured command to start chatting.");
expect(output).not.toContain("dcode");
expect(output).toContain("Inside the sandbox, run dcode to start chatting.");
expect(output).not.toContain("langchain-deepagents-code");
expect(exitSpy).toHaveBeenCalledWith(0);
});
Expand Down
9 changes: 7 additions & 2 deletions src/lib/actions/sandbox/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3246,9 +3246,14 @@ async function prepareConnectSandboxWithinLifecycleFence(
console.log("");
// Same resolver `launch` uses, so the hint cannot drift from the command
// that `nemoclaw launch <name>` actually runs (#6006).
void agentRuntime.getInteractiveAgentCommand(agent, sb?.agent);
let agentCommand = "openclaw tui";
try {
agentCommand = agentRuntime.getInteractiveAgentCommand(agent, sb?.agent) || "openclaw tui";
} catch {
agentCommand = "openclaw tui";
}
console.log(` ${G}✓${R} Connecting to sandbox '${sandboxName}'`);
console.log(` ${D}Inside the sandbox, run the configured command to start chatting.${R}`);
console.log(` ${D}Inside the sandbox, run ${agentCommand} to start chatting.${R}`);
console.log(
` ${D}Type \`/exit\` to leave the chat, then \`exit\` to return to the host shell.${R}`,
);
Expand Down
9 changes: 7 additions & 2 deletions src/lib/onboard/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,13 @@ export function createOnboardDashboardHelpers(deps: OnboardDashboardDeps): Onboa
console.log("");
console.log(`${indent} Or open a sandbox shell first:`);
console.log(`${indent} ${deps.cliName()} ${sandboxName} connect`);
void getInteractiveAgentCommand(agent, agent?.name);
console.log(`${indent} then run the configured interactive agent command`);
let agentCommand = "openclaw tui";
try {
agentCommand = getInteractiveAgentCommand(agent, agent?.name) || "openclaw tui";
} catch {
agentCommand = "openclaw tui";
}
console.log(`${indent} then run: ${agentCommand}`);
}

async function printDashboard(
Expand Down
8 changes: 4 additions & 4 deletions test/onboarding/onboard-dashboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ describe("onboard dashboard helpers", () => {
expect(output).toMatch(/Browser:\n\s+https?:\/\/\S+/);
expect(output).not.toContain("#token=");
expect(output).not.toContain("dashboard-url --quiet");
expect(output).toContain("then run the configured interactive agent command");
expect(output).toContain("then run: openclaw tui");
});

it("offers launch first and keeps connect in the OpenClaw ready summary (#6006)", async () => {
Expand All @@ -573,7 +573,7 @@ describe("onboard dashboard helpers", () => {
"",
" Or open a sandbox shell first:",
" nemoclaw my-gpt-claw connect",
" then run the configured interactive agent command",
" then run: openclaw tui",
].join("\n"),
);
expect(output.indexOf("nemoclaw launch my-gpt-claw")).toBeLessThan(
Expand All @@ -594,7 +594,7 @@ describe("onboard dashboard helpers", () => {
"",
" Or open a sandbox shell first:",
" nemohermes my-hermes connect",
" then run the configured interactive agent command",
" then run: hermes",
].join("\n"),
);
expect(output).not.toContain("openclaw tui");
Expand All @@ -613,7 +613,7 @@ describe("onboard dashboard helpers", () => {
"",
" Or open a sandbox shell first:",
" nemoclaw my-dcode connect",
" then run the configured interactive agent command",
" then run: dcode",
].join("\n"),
);
expect(output).not.toContain("openclaw tui");
Expand Down
Loading