⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
I switched several from request to post just to be explicit that it won't await
I like this one, I think this should be the go to solution for anything that needs to be triggered by the GUI on startup:
"onLoad" -> Core sends updates to GUI
These ones are probably fine since GUI should be locked down and is explicitly a GUI to Core thing
history/load
history/delete
history/save
history/list
These ones should be removed or refactored to post and then listen for a post from the core rather than locking down the GUI and introducing state race conditions
config/getSerializedProfileInfo
llm/listModels
getGitHubAuthToken
update/modelChange
applyToFile
E.g. apply to file already reacts to apply state updates from core, why is it awaiting this message? onComplete should be triggered in a webview listener based on apply state updates
No equivalent of "invoke" or "post", so void request where relevant
Should add a "post" that doesn't allow awaiting
IDE to Core
Seems fine, only uses core.invoke which has no awaiting.
I think core.send should be renamed to core.respond since it's unclear that it's responding to a specific message with an id
We should get rid of ReverseMessageIde, it's only used for tests and is high maintenance
GUI to IDE/Core
I switched several from
request
topost
just to be explicit that it won't awaitI like this one, I think this should be the go to solution for anything that needs to be triggered by the GUI on startup: "onLoad" -> Core sends updates to GUI
These ones are probably fine since GUI should be locked down and is explicitly a GUI to Core thing
These ones should be removed or refactored to post and then listen for a post from the core rather than locking down the GUI and introducing state race conditions
E.g. apply to file already reacts to apply state updates from core, why is it awaiting this message? onComplete should be triggered in a webview listener based on apply state updates
https://github.com/continuedev/continue/blob/77d0387e4a8cbc59ef9960234fc3a238966cf5db/gui/src/components/markdown/utils/useApplyCodeBlock.ts#L34-L39
IDE to GUI
No equivalent of "invoke" or "post", so void
request
where relevantShould add a "post" that doesn't allow awaiting
IDE to Core
Seems fine, only uses
core.invoke
which has no awaiting. I think core.send should be renamed to core.respond since it's unclear that it's responding to a specific message with an id We should get rid ofReverseMessageIde
, it's only used for tests and is high maintenanceCore to IDE
Example here: send is not sending messageId so there's no point in using send, might as well just use request? https://github.com/continuedev/continue/blob/260c13bd66657b9a058a02de2fc0ed05eb085e16/core/indexing/docs/DocsService.ts
More generally we should make the messaging method naming consistent