Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chat history download #2282

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

pkukielka
Copy link
Contributor

@pkukielka pkukielka commented Sep 12, 2024

Fixes #2274

Test plan

  1. Open Cody chat history
  2. Click "Export History"
  3. Select a file and path of your choice to save it
  4. Verify that file content contains proper json

Comment on lines +166 to +183
browser.jbCefClient.addDownloadHandler(
object : CefDownloadHandler {
override fun onBeforeDownload(
browser: CefBrowser?,
downloadItem: CefDownloadItem?,
suggestedName: String?,
callback: CefBeforeDownloadCallback?
) {
callback?.Continue(/* downloadPath = */ "", /* showDialog = */ true)
}

override fun onDownloadUpdated(
browser: CefBrowser?,
downloadItem: CefDownloadItem?,
callback: CefDownloadItemCallback?
) {}
},
browser.cefBrowser)
Copy link
Contributor

Choose a reason for hiding this comment

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

is that all? 😮

Copy link
Contributor Author

@pkukielka pkukielka Sep 12, 2024

Choose a reason for hiding this comment

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

Yep ^^ Also no Cody changes needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

You are a wizards 🧙!

@pkukielka pkukielka enabled auto-merge (squash) September 12, 2024 12:58
@pkukielka pkukielka merged commit 4b4f902 into main Sep 12, 2024
9 of 10 checks passed
@pkukielka pkukielka deleted the pkukielka/fix-download-chat-history branch September 12, 2024 12:59
mkondratek added a commit to sourcegraph/cody that referenced this pull request Sep 12, 2024
~Let's include the change from the release branch
(#5405

Fixed in JB: sourcegraph/jetbrains#2282

## Test plan
- chat export works

<!-- Required. See
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->

## Changelog

<!-- OPTIONAL; info at
https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c
-->
pkukielka added a commit that referenced this pull request Sep 19, 2024
Fixes #2274

## Test plan

1. Open Cody chat history
2. Click "Export History"
3. Select a file and path of your choice to save it
4. Verify that file content contains proper json
pkukielka added a commit that referenced this pull request Sep 19, 2024
Fixes #2274

## Test plan

1. Open Cody chat history
2. Click "Export History"
3. Select a file and path of your choice to save it
4. Verify that file content contains proper json
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.

JetBrains: "Export" button is non functional and user can't export chats.
3 participants