VS Code Extensions
Recent Copilot Chat ID

Recent Copilot Chat ID

by yamapan

Browses recently saved local Copilot Chat sessions and optionally analyzes backend-reported AI Credits on demand.

Downloads

2

Rating

— (0)

Version

0.2.2

Last updated

Aug 09, 2026

Browse recently saved Copilot Chat sessions, copy their IDs, and optionally analyze backend-reported AI Credits on demand.

Status: Preview VS Marketplace version VS Marketplace installs VS Code 1.125 or newer Privacy: Local Only Languages: English and Japanese License: CC BY-NC-SA 4.0 GitHub source GitHub stars

Install from Marketplace • Features • Commands • Privacy • 日本語


Important limitation

This extension shows a recently saved session ID. It does not claim to identify the current or active chat session. VS Code does not expose that identity through the stable Extension API.

Features

  • Dedicated Recent Chat Sessions Activity Bar view
  • Session rows show a local title or VS Code title, short ID, and relative save time
  • Expand a row to inspect the full ID, saved time, and title source
  • Inline and right-click actions to copy the title and ID together, inspect metadata, or set/clear a local title
  • Copy a session row as two lines: its display title, then Session ID: <UUID>
  • Open a script-free Session Inspector for bounded timing, response-state, and changed-line metadata when VS Code provides it
  • Explicitly analyze backend-reported AI Credits, request count, and input/output token usage for one selected session, with per-model totals when available
  • Copy the UUID alone from the expanded Session ID detail row or the global Copy Recent ID command
  • Status bar: Recent: <title or short UUID>; selecting it reveals the session in the browser
  • Tooltip shows how many session IDs are saved in the window
  • Copy the full recent UUID
  • Search saved sessions by title, full/short ID, or saved time
  • Manually refresh the filename scan
  • Refresh automatically when session files change
  • Log diagnostics to the Recent Copilot Chat ID Output Channel
  • Japanese UI when VS Code display language is ja

Installation

Install from the VS Code Marketplace, or run:

ext install yamapan.ag-show-session-id

For a local build:

  1. Run npm install in this repository.
  2. Run npm test to verify the extension locally.
  3. Run npm run package to create the VSIX.
  4. In VS Code, run Extensions: Install from VSIX... from the Command Palette.
  5. Select the generated artifacts/vsix/ag-show-session-id-<version>.vsix and reload VS Code when prompted.

[!NOTE] Local development builds and the Marketplace release use the same extension ID. Installing a local 0.2.2 VSIX in your normal profile replaces the installed 0.2.1 release. Use npm run verify:install for isolated verification, or reinstall the Marketplace version after manual testing.

Enable

Filename scanning is disabled by default. The extension offers to turn it on once per profile on first activation. You can also run any command and choose Enable in the prompt, or set agShowSessionId.enabled in User Settings.

The extension then reads only .json and .jsonl filenames from the current window's local chatSessions storage directory. It reads file modification times for ordering. The opt-in setting is machine-scoped and is not synchronized to other devices.

Session titles are a separate opt-in. Enable agShowSessionId.readTitles from the view toolbar or Settings to read only the chat.ChatSessionStore.index entry from VS Code's local read-only state database. Titles can be derived from chat content, remain in memory only, and are never written to logs. Chat messages and JSONL contents are not read by this setting.

AI Credits analysis is another machine-local opt-in. The Inspector shows Not analyzed until you run Analyze AI Credits on a session row. The command reads only that selected session's .jsonl or legacy .json file. Session files contain chat content; the extension reconstructs request/session credits and input/output token fields, including per-model totals when the backend provides them. It retains only the bounded usage summary in memory and does not display, log, persist, cache, or send prompts and responses. Reopening the same saved version of an analyzed session reuses the in-memory result. Disabling agShowSessionId.readUsage clears the cache and immediately closes the open Session Inspector.

The bounded session data is parsed in a local worker thread. Cancelling analysis or disabling usage reading terminates active parsing before it can update the cache or Inspector.

If analysis fails, the Inspector identifies common causes such as a missing, changed, unsupported, or oversized session file. The warning action can open the diagnostic Output Channel for the detailed error code.

Display title precedence is: local title > VS Code metadata title > Session <short ID>. Local titles persist by session ID in the local VS Code profile, follow the session between empty and workspace windows, are not synchronized, and never modify Copilot Chat storage. Early 0.1 development aliases are migrated automatically.

Commands

Command Purpose
Recent Copilot Chat ID: Refresh Scan saved session filenames again
Recent Copilot Chat ID: Copy Recent ID Copy the most recently saved UUID
Recent Copilot Chat ID: Show Saved IDs List saved UUIDs and copy the selected one
Recent Copilot Chat ID: Show Output Open the diagnostic Output Channel
Recent Copilot Chat ID: Open Session Browser Reveal the recent session in the Activity Bar
Recent Copilot Chat ID: Open Session Inspector Inspect bounded metadata for a selected session
Recent Copilot Chat ID: Analyze AI Credits Analyze usage for one selected session
Recent Copilot Chat ID: Show Details Reveal and expand the selected session
Recent Copilot Chat ID: Set Local Title Add or rename a local-only session title

Global commands appear in the Command Palette under the Recent Copilot Chat ID category. Session-specific copy, Inspector, AI Credits analysis, details, and local-title actions appear on session rows in the Activity Bar. The expanded Session ID detail has a separate UUID-only copy action.

Status bar states

State Meaning Select to
<title> One session was saved most recently Reveal it in the session browser
ambiguous Several sessions share the latest save time Open the session browser
none No saved session filenames were found Open the session browser
unavailable Local session storage cannot be read in this window Open the log

Privacy

  • No telemetry or network access
  • No chat JSON/JSONL content reads by default; optional AI Credits analysis reads only the explicitly selected session file
  • No debug log reads
  • No session file writes
  • Prompts, responses, references, paths, and tool payloads are never displayed, logged, persisted, cached, or sent by usage analysis
  • Diagnostic logs include only shortened ID prefixes, never full session IDs
  • Optional metadata reads one bounded index entry and retains only approved session ID, title, timing, response-state, and changed-line summary fields in memory
  • Optional usage analysis retains only a bounded usage summary in memory; disabling it clears the summary and closes the Inspector
  • The Session Inspector remains script-free and renders escaped text only

Compatibility

  • Minimum declared VS Code version: 1.125.0
  • Verified development environment: VS Code 1.131.0 on Windows 11
  • Desktop local windows only
  • Empty windows (no folder open) read the separate global chat session storage
  • Virtual workspaces, VS Code for the Web, and some Remote/WSL layouts can report unavailable
  • This extension depends on an undocumented internal storage location and degrades without modifying data when that layout is unavailable
  • VS Code does not expose a stable API to add actions to built-in Copilot Chat session rows, so this extension uses its own Activity Bar view

The source workspace includes the API and storage analysis at research/20260805-copilot-chat-session-id-extension.md.

Development

npm install
npm test
npm run package
npm run verify:install
npm run verify:release

The VSIX is written to artifacts/vsix/. verify:install installs that VSIX into an isolated .vscode-test profile and confirms the packaged extension ID and version without changing your normal VS Code installation. verify:release runs the complete local gate: dependency audit, unit and Extension Host tests, package verification, and isolated installation.

Related extensions