sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.55k stars 265 forks source link

Chat: make export chat history available to all clients #5219

Closed abeatrix closed 4 weeks ago

abeatrix commented 1 month ago

Update the export chat history button to allow users to export their chat history as a JSON file on click using the native browser dialog. The functionality is still the same, but this change makes the feature available to all Cody clients by removing the use of VS Code API for the saving dialogue.

The implementation involves:

Notes: The TabsBar component now requires the onDownloadChatClick prop to be provided.

Test plan

Go to your chat history tab and click on the Export History button

image

It should open a save-dialog with cody-chat-history.json as the file name

image

Open the file to confirm the chat history was exported successfully.

In Visual Studio:

image

In Eclipse:

image

Changelog

Agent Webview: Makes the Export Chat button available to all clients.