Open Fryingpannn opened 1 month ago
the inline chat is shown using QuickPick
provided by vscode, code
it does not have option to change location or position, it always shows up top. copilot and cursor might be using something custom to show inline prompts. https://github.com/microsoft/vscode/issues/17268
found this also - don't know if it's useful - https://stackoverflow.com/questions/77202394/what-vs-code-api-can-i-use-to-create-an-in-editor-chat-box-like-in-github-copilo chatparticipants api - https://github.com/microsoft/vscode/issues/199908
Conversation context from Discord:
Mex:
"I think I should mention my progress on the inline chat. So after a few hours of trial and error I really believe that is impossible to do it within the pearai-submodule (that's where every other command is), the reason being that vscode api doesn't offer support for inline stuff. I think this is actually the reason continue doesn't have this on vscode (because it's an extension and they can't edit the source code of core vsc) and maybe the reason cursor is closed sourced. I tried simulating the effect with the available tools (like webview api and decorators) but 0 success and it's buggy as hell. The only question is how does Github Copilot do it, because that is an extension. I think vscode offered some exclusive support to them since they're both microsoft or something, otherwise I can't explain. Imo the way to do it is to create some api support for inline chat in the vscode core app, and then in the submodule just work with it. This creates the most consistency with our code base for now. What do y'all think?"
Pan:
"Interesting thank you for the update! That makes sense, we would have to make changes within the actual pearai-app codebase, not just the submodule to make this work. We should try to do that Do you think you'd be able to explore it further by making changes within the entire repo? I think it may be similar idea to the chat panel. E.g. the chat panel is from the outer codebase, and extensions simply display their webviews within the existing chat panel May need something similar Some inline component from outer code, and from there make calls to the backend server"
In-line chat prompt should be right where the code is, instead of on top of editor.
Currently:
Should be: