Copilot Prompt Logger
A VS Code extension that provides a @logger chat participant for logging GitHub Copilot conversations. Capture and review your AI interactions with timestamps, model info, and user details in persistent JSON files.
🚀 Features
Chat Participant (@logger)
- Custom chat participant that integrates directly with GitHub Copilot Chat
- Persistent logging - all logs are saved to file and survive VS Code restarts
- Append-only storage - never overwrites previous logs
- Chat history capture - retroactively log previous conversations
- Circular buffer - configurable memory buffer for recent entries
- JSON export - structured data for analysis and backup
Commands Available
/view
- Display recent log entries
/export
- Export logs as formatted JSON
/clear
- Clear all logs (memory and file)
/history
- Log previous chat conversations from current session
/help
- Show all available commands
Manual Logging
- Command palette integration for manual prompt logging
- Configurable log file name and buffer size
- Workspace-specific storage in
.vscode
folder
📖 How to Use
Using @logger in Copilot Chat
Basic Logging: Mention @logger
with any message to log it
@logger How do I create a React component?
View Recent Logs:
@logger /view
Export Logs as JSON:
@logger /export
Log Previous Conversation History:
@logger /history
This captures all previous messages from your current chat session.
Clear All Logs:
@logger /clear
Get Help:
@logger /help
Manual Logging via Command Palette
- Open Command Palette (
Ctrl+Shift+P
/ Cmd+Shift+P
)
- Type
Capture Prompt Log
and press Enter
- Enter your prompt and model name when prompted
- Use
Show Prompt Log
to view entries
📁 Log File Location
Logs are stored in your workspace's .vscode
folder as prompt-log.jsonl
by default.
Example log file content:
{"prompt":"How do I create a React component?","model":"user-request","timestamp":"2025-09-07T12:34:56.789Z","user":"john"}
{"prompt":"To create a React component, you can use...","model":"copilot-response","timestamp":"2025-09-07T12:35:02.123Z","user":"john"}
{"prompt":"Can you show me hooks?","model":"user-request","timestamp":"2025-09-07T12:36:15.456Z","user":"john"}
⚙️ Configuration
Customize the extension via VS Code settings:
{
"copilotPromptLogger.logFileName": "my-prompt-log.jsonl",
"copilotPromptLogger.maxLogEntries": 2000
}
Available Settings:
- Log File Name: Change the name of the log file (default:
prompt-log.jsonl
)
- Max Log Entries: Set circular buffer size for memory (default: 1000)
🔧 Technical Details
What Gets Logged:
- User prompts sent to GitHub Copilot
- Copilot responses (markdown, file trees, anchors, commands)
- Timestamp (ISO 8601 format)
- Model information (when available)
- User details (system username)
Storage:
- Persistent file storage in workspace
.vscode
folder
- Circular buffer in memory for performance
- Append-only logging - never loses data
- JSONL format - one JSON object per line for easy parsing
Limitations:
- Cannot passively monitor native Copilot conversations
- Requires explicit @logger mention to capture chat
- Only logs when users interact with @logger participant
- Workspace-specific logging (not global)
🚦 Getting Started
- Install the extension from VS Code Marketplace
- Open a workspace in VS Code
- Start Copilot Chat and type
@logger /help
to see commands
- Begin logging by mentioning
@logger
with your prompts
💡 Example Workflow
# Start a conversation with Copilot
You: How do I handle errors in React?
Copilot: You can handle errors in React using...
# Later, log the conversation
You: @logger /history
Extension: Previous chat history logged successfully.
# View what was logged
You: @logger /view
Extension: [Shows formatted log entries]
# Export for external analysis
You: @logger /export
Extension: [Shows JSON formatted logs]
🔒 Privacy & Security
- Local storage only - logs stay in your workspace
- No external transmission - data never leaves your machine
- User-controlled - you decide what to log and when
- Transparent - all logged data is viewable and exportable
🛠️ Development
Built with:
- TypeScript for type safety
- VS Code Extension API for integration
- Circular buffer for efficient memory usage
- File system APIs for persistent storage
Enjoy logging your AI conversations! 🎉t Logger
Easily capture and review prompts, model names, timestamps, and user info directly in Visual Studio Code.
Features
- Log prompts, model, timestamp, and user with a simple command
- Circular log file (oldest entries are removed automatically)
- View the last 10 log entries at any time
How to Use
- Open the Command Palette (
Ctrl+Shift+P
or Cmd+Shift+P
)
- Type and select
Capture Prompt Log
to add a new entry
- Enter your prompt and model name when prompted
- To review logs, run
Show Prompt Log
from the Command Palette
- The log file (
prompt-log.jsonl
by default) is saved in your workspace’s .vscode
folder
Each log entry is a single line in JSON format, for example:
{"prompt":"example prompt","model":"gpt-4","timestamp":"2025-09-06T12:34:56.789Z","user":"yourname"}
Configuration
You can change the log file name and the maximum number of log entries in your VS Code settings:
Copilot Prompt Logger: Log File Name
(default: prompt-log.jsonl
)
Copilot Prompt Logger: Max Log Entries
(default: 1000)
Requirements
No special requirements. Just install and use!
Support
If you have questions or feedback, please use the Q&A or Issues section in the Marketplace.
Thank you for using Copilot Prompt Logger!