Skip to content

feat(tui): add /session-id and /session-info slash commands#33703

Closed
EZotoff wants to merge 1 commit into
anomalyco:devfrom
EZotoff:feat/session-id-session-info-commands
Closed

feat(tui): add /session-id and /session-info slash commands#33703
EZotoff wants to merge 1 commit into
anomalyco:devfrom
EZotoff:feat/session-id-session-info-commands

Conversation

@EZotoff

@EZotoff EZotoff commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Adds two native TUI slash commands that copy session information to the system clipboard with a toast confirmation — no LLM round-trip.

Command What it copies
/session-id The current session ID (e.g. ses_abc123)
/session-info Project <dir>; Session <title>; ID <session-id>

Both commands appear in the slash command palette under the Session category and are only enabled when a session is active (props.sessionID exists).

Supersedes #11938 (closed by automated PR cleanup after 1 month + <2 reactions — not a technical rejection). That PR covered only /session-id; this PR adds /session-info as a superset that also includes the project directory and session title.

Motivation

Session IDs are needed for handoff workflows, cross-session references, and manual session_read / session_search lookups. Currently there is no way to copy the session ID without mouse-selecting from the status bar or running session_list and scanning output.

/session-info is the broader version — copying project path + session title + ID in one operation is useful for pasting context into bug reports, PR descriptions, or team chat.

Implementation

  • Uses the existing useClipboard() context (clipboard.write()) — cross-platform, no xclip dependency
  • Uses the existing toast.show() for success feedback
  • Only 42 lines added — two command palette entries in packages/tui/src/component/prompt/index.tsx
  • Both commands are disabled (greyed out) when no session is active
  • No plugin, no command.execute.before hook, no throw-based abort — pure TUI command palette entries

Related

Testing

  • bunx tsc --noEmit passes (0 errors in modified file; pre-existing errors in dialog-move-session.tsx are unrelated)
  • Pre-push CI hook: 25/25 packages typecheck successfully

Manual testing:

  1. Open any session in TUI
  2. Type /session-id — session ID is copied to clipboard + toast confirms
  3. Type /session-info — project path, session title, and session ID are copied + toast confirms
  4. Both commands are greyed out when no session is active

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add two native TUI slash commands that copy session information to the
clipboard without an LLM round-trip:

/session-id   — copies the current session ID
/session-info — copies "Project <dir>; Session <title>; ID <session-id>"

Both commands appear in the slash command palette under the "Session"
category and are only enabled when a session is active. Uses the existing
Clipboard context and toast notification system.

Supersedes anomalyco#11938 (closed by automated PR cleanup, not technical rejection).
That PR covered only /session-id; this PR adds /session-info as well.

Related: anomalyco#18559 (adds output.cancelled for plugin-based cancellation),
anomalyco#15206 (CLI session info request), anomalyco#11937 (original feature request).
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 24, 2026
@github-actions github-actions Bot closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant