npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

copilot-chat-management

v0.1.7

Published

Manage GitHub Copilot chat history (list, summarize, delete, show) with auto path detection and CLI/command palette integration. No manual path input required. Multi-language support (Chinese/English).

Readme

CopilotChatHistory

Manage GitHub Copilot chat history with automatic language support (Chinese/English) based on VS Code settings.

Features

  • List Copilot chat history files with metadata (title, message count, last activity)
  • Summarize chat content preview (first 3 Q&A pairs)
  • Delete chat history with interactive selection and confirmation
  • Show full conversation content with all Q&A pairs
  • Auto Language Detection: Automatically switches between Chinese and English based on VS Code's language settings (vscode.env.language) and system locale
  • CLI Support: Full-featured command-line tool with system language detection
  • Interactive CLI: User-friendly prompts for delete and show operations
  • No Manual Configuration: Works out of the box with automatic path detection for Windows, macOS, and Linux

Supported Languages

  • English (en): Default language
  • Chinese (zh-CN, zh-TW): Automatically activated when VS Code language starts with "zh"

Installation

As VS Code Extension

  1. Install from VS Code Extensions Marketplace
  2. Reload VS Code

As CLI Tool

Option 1: Global Installation (Recommended)

# Install globally from npm
npm install -g copilot-chat-management

# Now you can use 'chat' command anywhere
chat list
chat show
chat delete
chat summarize <index>

Option 2: Use npx (No Installation)

# Run directly with npx
npx copilot-chat-management list
npx copilot-chat-management show
npx copilot-chat-management delete

Option 3: PowerShell/Bash Alias (Project Directory)

# PowerShell: Add to $PROFILE
function chat { node "C:\Path\To\CopilotChatHistoryVSPlugin\bin\chat.js" $args }

# Bash: Add to ~/.bashrc or ~/.bash_profile
alias chat='node /path/to/CopilotChatHistoryVSPlugin/bin/chat.js'

Usage

VS Code Extension Commands

  1. Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Available commands:
    • Chat: List History - Display all chat sessions in a formatted table
    • Chat: Summarize - Show preview of selected chat (first 3 Q&A pairs)
    • Chat: Delete - Delete selected chat after confirmation

UI language automatically matches VS Code language settings.

CLI Tool

After global installation (npm install -g copilot-chat-management), you can use these commands in any terminal (PowerShell, Bash, CMD):

# List chat history in formatted table
chat list

# Summarize a specific chat by index
chat summarize <index>

# Interactive delete with selection support
chat delete
# Supports: single (1), multiple (1 2 5), ranges (5-8), or all (*)

# Show full conversation content with pagination
chat show
# Lists all chats, prompts for index, displays complete Q&A pairs (10 messages per page)

CLI Options:

  • --history-dir <path>: Specify custom history directory
  • --include-empty: Include empty chat files in listing

CLI language is automatically detected from system environment variables (LANG, LANGUAGE, LC_ALL).

Language Detection

  • VS Code Extension: Uses vscode.env.language
  • CLI Tool: Uses system environment variables (LANG, LANGUAGE, LC_ALL)
  • Language Switch: Automatic based on locale (zh* → Chinese, others → English)

Platform Support

Automatically detects chat history in default locations:

  • Windows: %APPDATA%\Code\User\globalStorage\github.copilot-chat\{history,sessions}
  • macOS: ~/Library/Application Support/Code/User/globalStorage/github.copilot-chat\{history,sessions}
  • Linux: ~/.config/Code/User/globalStorage/github.copilot-chat\{history,sessions}

Also supports VS Code Insiders and custom paths via --history-dir.

Examples

CLI Interactive Delete

$ npx chat delete

编号  主题                           消息数  最后交互时间
----  ----------------------------  ------  ----------------
[1]   Implement i18n support           12  2025-11-17 14:30
[2]   Fix path detection bug            8  2025-11-17 13:15
[3]   Add CLI commands                  6  2025-11-17 12:00

输入要删除的编号 (支持 1 2 5-8 或 * 全部,直接回车退出): 1 3
确认删除 2 个聊天记录? (y/N): y
已删除对话: Implement i18n support
已删除对话: Add CLI commands

删除完成,最新列表如下:
编号  主题                           消息数  最后交互时间
----  ----------------------------  ------  ----------------
[1]   Fix path detection bug            8  2025-11-17 13:15

CLI Show Conversation

$ npx chat show

编号  主题                           消息数  最后交互时间
----  ----------------------------  ------  ----------------
[1]   Implement i18n support           12  2025-11-17 14:30

输入要查看的对话编号 (直接回车退出): 1

============================================================
对话内容: Implement i18n support
============================================================

[问1] How do I add multi-language support to my VS Code extension?

[答1] To add multi-language support, you can create an i18n module...

[问2] How to detect the language automatically?

[答2] Use vscode.env.language to get the current locale...

============================================================

Release Notes

0.0.1

Initial release with comprehensive chat history management

Features:

  • Multi-language support (Chinese/English) with automatic detection
  • VS Code extension commands: list, summarize, delete
  • Full-featured CLI tool with interactive operations
  • New chat show command to display complete conversations
  • Interactive chat delete with flexible selection (ranges, multiple indices, all)
  • Automatic path detection for Windows, macOS, Linux
  • Smart terminal width adaptation for formatted output
  • Support for both regular VS Code and Insiders

Development

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch mode
npm run watch

# Package extension
vsce package

License

MIT