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.53k stars 261 forks source link

use streaming RPC API exthost<->webview using AsyncGenerator #5083

Closed sqs closed 1 month ago

sqs commented 1 month ago

Now, the webview can call into API methods exposed by the ChatController (extension host), and those API methods can return a stream of values. This lets the webview "observe" things in the extension host.

Fixes several issues:

Test plan

CI. Also a lot of manual usage of @-mentions and the Prompts dropdown, since those are the parts that use this new API.

sqs commented 1 month ago

@dominiccooney Thanks, I just addressed your comments and re-pushed.

sqs commented 1 month ago

@dominiccooney OK to merge and do a post-merge review? This will fix the feature flag listener problem and unblock more testing of the prompt library prior to the release.

dominiccooney commented 1 month ago

@sqs review post merge sounds good to me. We should work out with search team who is on point for bigger changes like this so they can really own the result.

vovakulikov commented 1 month ago

Before merging this can someone check Cody web demo. I can check it later today myself but maybe it would be too late since this has been approved already

sqs commented 1 month ago

@vovakulikov I’ve checked it and it works