diff --git a/ui/src/ui/chat/slash-command-executor.ts b/ui/src/ui/chat/slash-command-executor.ts index d595bbab8d8..e009890e7d9 100644 --- a/ui/src/ui/chat/slash-command-executor.ts +++ b/ui/src/ui/chat/slash-command-executor.ts @@ -10,7 +10,6 @@ import { normalizeVerboseLevel, resolveThinkingDefaultForModel, } from "../../../../src/auto-reply/thinking.js"; -import type { HealthSummary } from "../../../../src/commands/health.js"; import { DEFAULT_AGENT_ID, DEFAULT_MAIN_KEY, @@ -45,8 +44,6 @@ export async function executeSlashCommand( switch (commandName) { case "help": return executeHelp(); - case "status": - return await executeStatus(client); case "new": return { content: "Starting new session...", action: "new-session" }; case "reset": @@ -101,27 +98,6 @@ function executeHelp(): SlashCommandResult { return { content: lines.join("\n") }; } -async function executeStatus(client: GatewayBrowserClient): Promise { - try { - const health = await client.request("health", {}); - const status = health.ok ? "Healthy" : "Degraded"; - const agentCount = health.agents?.length ?? 0; - const sessionCount = health.sessions?.count ?? 0; - const lines = [ - `**System Status:** ${status}`, - `**Agents:** ${agentCount}`, - `**Sessions:** ${sessionCount}`, - `**Default Agent:** ${health.defaultAgentId || "none"}`, - ]; - if (health.durationMs) { - lines.push(`**Response:** ${health.durationMs}ms`); - } - return { content: lines.join("\n") }; - } catch (err) { - return { content: `Failed to fetch status: ${String(err)}` }; - } -} - async function executeCompact( client: GatewayBrowserClient, sessionKey: string, diff --git a/ui/src/ui/chat/slash-commands.node.test.ts b/ui/src/ui/chat/slash-commands.node.test.ts index eb5f62c62ee..5b8dc2a8683 100644 --- a/ui/src/ui/chat/slash-commands.node.test.ts +++ b/ui/src/ui/chat/slash-commands.node.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { parseSlashCommand } from "./slash-commands.ts"; +import { parseSlashCommand, SLASH_COMMANDS } from "./slash-commands.ts"; describe("parseSlashCommand", () => { it("parses commands with an optional colon separator", () => { @@ -30,4 +30,13 @@ describe("parseSlashCommand", () => { args: "on", }); }); + + it("keeps /status on the agent path", () => { + const status = SLASH_COMMANDS.find((entry) => entry.name === "status"); + expect(status?.executeLocal).not.toBe(true); + expect(parseSlashCommand("/status")).toMatchObject({ + command: { name: "status" }, + args: "", + }); + }); }); diff --git a/ui/src/ui/chat/slash-commands.ts b/ui/src/ui/chat/slash-commands.ts index e7b4cd98178..d6b5bc4c337 100644 --- a/ui/src/ui/chat/slash-commands.ts +++ b/ui/src/ui/chat/slash-commands.ts @@ -108,10 +108,9 @@ export const SLASH_COMMANDS: SlashCommandDef[] = [ }, { name: "status", - description: "Show system status", + description: "Show session status", icon: "barChart", category: "tools", - executeLocal: true, }, { name: "export",