feat(vscode-companion): support /export session command#2592
feat(vscode-companion): support /export session command#2592yiliang114 wants to merge 4 commits intomainfrom
Conversation
📋 Review SummaryThis PR adds native 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
# Conflicts: # packages/vscode-ide-companion/src/webview/handlers/SessionMessageHandler.test.ts
TLDR
Add native
/exportsupport to the VSCode Companion so users can export the current session directly from the IDE with CLI-parity formats and IDE-native save/open UX.Screenshots / Video Demo
N/A — this change is a VSCode webview/extension behavior update prepared from a CLI workflow. Reviewers can validate it with the steps below.
Dive Deeper
This PR adds a dedicated VSCode-side export flow instead of sending
/exportthrough the normal chat prompt path.Main changes:
/exportin the VSCode companion before it is sent to the agent./exportto HTML so slash-command selection works immediately in the current companion UX./export md,/export json, and/export jsonlthrough the same native flow.sessionExportServicethat loads the real recorded session, reuses the existing export formatters, opens a native Save As dialog, and writes the chosen file.Open Fileaction after export completes./exportslash-command description so the completion menu documents the supported non-default formats.Touched areas:
packages/vscode-ide-companion/src/services/sessionExportService.tspackages/vscode-ide-companion/src/webview/handlers/SessionMessageHandler.tspackages/cli/src/ui/commands/exportCommand.tsReviewer Test Plan
npm exec --workspace=packages/vscode-ide-companion vitest -- --run src/services/sessionExportService.test.ts src/webview/handlers/SessionMessageHandler.test.tsnpm exec --workspace=packages/cli vitest -- --run src/ui/commands/exportCommand.test.tsnpm run build --workspace=packages/vscode-ide-companion/export/export md/export json/export jsonl/exportdefaults to HTMLOpen Fileaction/exportarguments show an error instead of sending a chat promptTesting Matrix
Linked issues / bugs
Resolves #1991