Skip to content

feat(vscode): add /export slash command to export session as JSON#8864

Open
lambertjosh wants to merge 3 commits intomainfrom
orderly-crow
Open

feat(vscode): add /export slash command to export session as JSON#8864
lambertjosh wants to merge 3 commits intomainfrom
orderly-crow

Conversation

@lambertjosh
Copy link
Copy Markdown
Contributor

Adds a /export slash command to the VS Code extension chat interface that exports the current session to a JSON file for debugging.

When triggered, it fetches the session info and messages via the SDK client, prompts the user with a VS Code save dialog, and writes the same { info, messages } JSON structure as kilo export <sessionID> produces.

return
}

const sessionID = currentSessionID()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: /export fails for imported cloud session previews

currentSessionID() can be the synthetic cloud:${cloudSessionId} value set in handleCloudSessionDataLoaded(). This branch forwards that ID straight to the extension, but handleExport() then calls client.session.get() / client.session.messages() against the local backend, so exporting a cloud preview always errors. Either disable /export while cloudPreviewId() is set or add the same import-aware handling that sendMessage() / sendCommand() already use.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 13, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-vscode/webview-ui/src/context/session.tsx

Reviewed by gpt-5.4-20260305 · 2,046,409 tokens

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