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.55k stars 265 forks source link

Smart Apply: Enable in other clients based on client capabilities #5208

Closed umpox closed 1 month ago

umpox commented 1 month ago

Description

The Smart Apply functionality should be OK to enable in other clients as:

  1. We have a generic UI that should work in any webview client. PR: https://github.com/sourcegraph/cody/pull/5188
  2. It proxies from chat to inline edit, so any client that has the edit capability should be able to use this

Test plan

Test in other clients that have the Edit capability

umpox commented 1 month ago

https://github.com/user-attachments/assets/20927704-b3d2-4b3a-931a-a09c38768af4

Seems to be working in JetBrains. (I see to have no styles though)

Tagging @sourcegraph/jetbrains-plugin for a review and help testing

umpox commented 1 month ago

@mkondratek Thanks for taking a look!

the action texts should not be visible

The UI changes are intentional here, we do actually want to make "Copy" and "Apply" more visible. These are likely to be more higher frequency actions that the other ones (Copy is used way more from looking at usage data, Apply is looking that way too)

I'll tag @danielmarquespt on this too for 👀 when he's back from PTO, the UI change is also behind a feature flag so I don't think we should block this though (we can quickly revert if necessary).

It does seem that we are missing some code block styles though, the action buttons look way different to VS Code:

image image

I wonder if we're missing some styles somewhere? 🤔