-
Notifications
You must be signed in to change notification settings - Fork 73
feat(chat-client): implement export conversation flow #944
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
Conversation
8755d18
to
65ecee5
Compare
65ecee5
to
1cb809d
Compare
e2dc015
to
33e9e3a
Compare
// @ts-ignore | ||
assert.called(TabFactory.prototype.enableHistory) | ||
// @ts-ignore | ||
assert.called(TabFactory.prototype.enableExport) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for completeness, we should also be checking for not called if not set
const defaultTabConfig: Partial<MynahUIDataModel> = { | ||
quickActionCommands: tabFactory.getDefaultTabData().quickActionCommands, | ||
quickActionCommands: defaultTabBarData.quickActionCommands, | ||
tabBarButtons: defaultTabBarData.tabBarButtons, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch!
|
||
if (this.export) { | ||
tabBarButtons.push({ | ||
id: 'export', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: introducing constants for this critical ids (as above) makes it a bit easier to track the logic across files
Problem
We need to:
history
option set in Q Language Server at initialization to toggle View History functionality in Chat ClientSolution
Integration of Chat History and Export features with Extension
To fully intergate export feature with IDE, Extension must add support for next features:
1. Implement support for
showSaveFileDialog
Export feature is conditionally enabled by Q Chat server if client signals support for
initializationOptions?.aws?.awsClientCapabilities?.window?.showSaveFileDialog
feature.Extension must implement aws/showSaveFileDialog protocol and set awsClientCapabilities?.window?.showSaveFileDialog flag to true.
2. Implement support of response routing for
openTab
andgetSerializedChat
requestsNew
getSerializedChat
request in Chat Client requires Extension to support routing of responses between inbound and outbound messages from Chat Client to Language Server. This is archived byrequestId
argument in inboundgetSerializedChat
Chat Client message.getSerializedChat
andopenTab
requests are sent from Language Server, and server expects response with result coming from the Chat Client.Extension must attach and track
requestId
field forgetSerializedChat
andopenTab
requests, and route responses from Chat Client to corresponding incoming request from LSP Server.Reference implementation of message routing can be found in Sample VSCode extension
language-servers/client/vscode/src/chatActivation.ts
Lines 192 to 243 in 2ac19b7
TODO
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.