From 141b3e91934dcdb20ae402bfaa2fcd1bed863977 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 31 Aug 2025 13:14:28 -0700 Subject: [PATCH] feat: show session title in /info output --- extensions/cli/src/slashCommands.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/extensions/cli/src/slashCommands.ts b/extensions/cli/src/slashCommands.ts index adcc15267..a739cc450 100644 --- a/extensions/cli/src/slashCommands.ts +++ b/extensions/cli/src/slashCommands.ts @@ -8,7 +8,7 @@ import { } from "./auth/workos.js"; import { getAllSlashCommands } from "./commands/commands.js"; import { reloadService, SERVICE_NAMES, services } from "./services/index.js"; -import { getSessionFilePath } from "./session.js"; +import { getCurrentSession, getSessionFilePath } from "./session.js"; import { posthogService } from "./telemetry/posthogService.js"; import { SlashCommandResult } from "./ui/hooks/useChat.types.js"; import { getVersion } from "./version.js"; @@ -179,12 +179,19 @@ async function handleInfo() { infoLines.push(` ${chalk.red("Configuration service not available")}`); } - // Session history path + // Session info infoLines.push(""); - infoLines.push(chalk.white("Session History:")); - const sessionFilePath = getSessionFilePath(); - - infoLines.push(` File: ${chalk.blue(sessionFilePath)}`); + infoLines.push(chalk.white("Session:")); + try { + const currentSession = getCurrentSession(); + infoLines.push(` Title: ${chalk.green(currentSession.title)}`); + infoLines.push(` ID: ${chalk.gray(currentSession.sessionId)}`); + + const sessionFilePath = getSessionFilePath(); + infoLines.push(` File: ${chalk.blue(sessionFilePath)}`); + } catch { + infoLines.push(` ${chalk.red("Session not available")}`); + } return { exit: false,