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:
Adding a new onDownloadChatClick prop to the TabsBar component that is responsible for generating and downloading the chat history JSON file.
Updating the HistoryTab component to include the new "Export History" button that calls the onDownloadChatClick callback.
Ensuring the "Export History" button only requires VSCode users to confirm deletion, as the VS Code API might not be available to all clients that are required for clearing the chat history.
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
It should open a save-dialog with cody-chat-history.json as the file name
Open the file to confirm the chat history was exported successfully.
In Visual Studio:
In Eclipse:
Changelog
Agent Webview: Makes the Export Chat button available to all clients.
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:
onDownloadChatClick
prop to theTabsBar
component that is responsible for generating and downloading the chat history JSON file.HistoryTab
component to include the new "Export History" button that calls theonDownloadChatClick
callback.Notes: The
TabsBar
component now requires theonDownloadChatClick
prop to be provided.Test plan
Go to your chat history tab and click on the
Export History
buttonIt should open a save-dialog with
cody-chat-history.json
as the file nameOpen the file to confirm the chat history was exported successfully.
In Visual Studio:
In Eclipse:
Changelog
Agent Webview: Makes the
Export Chat
button available to all clients.