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

Agent: stop generating Kotlin bindings for the webview protocol #5088

Closed olafurpg closed 1 month ago

olafurpg commented 1 month ago

Previously, the Kotlin bindings generated classes for webview/postMessage, weview/receiveMessage and other webview-related JSON-RPC endpoints. Now that our IDE clients have moved to using webview-powered chat, there's no need to generate bindings for these classes because the IDE clients only need to proxy the raw JSON payloads instead of interaacting with the low-level WebView protocol.

Removing these types from the bindings means Cody developers no longer need to run pnpm generate-agent-kotlin-bindings when they update the webview protocol.

Test plan

Green CI.

Changelog

dominiccooney commented 1 month ago

Edit: I take it back, I see JetBrains IS using some generated stuff now.

olafurpg commented 1 month ago

@RXminuS when you extend CodyAgent{Client,Server} you can add new handlers with your own types (which can be old copies of the auto-generated classes). You just won't get auto-generated classes for new webview-protocol messages.

RXminuS commented 1 month ago

This is already done. We merge a subset of auto generated with legacy manual ones