Add an activation command for other extensions (#2073)

Since VS Code provides no actionEvents that trigger when a specific
extension activates, extensions can't activate only once Roo is
activated and ready.

This commit introduces a new roo-cline.activationCompleted command
and fires it at the very end of extension activation. Other
extensions that use Roo's exported APIs can now activate when they
see this event.

Co-authored-by: Greg Taylor <gregtaylor@netflix.com>
This commit is contained in:
Greg Taylor 2025-03-28 20:48:03 -07:00 committed by GitHub
parent 105bc3c0d5
commit 5fbf563216
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -50,6 +50,7 @@ export const registerCommands = (options: RegisterCommandOptions) => {
const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOptions) => {
return {
"roo-cline.activationCompleted": () => {},
"roo-cline.plusButtonClicked": async () => {
await provider.removeClineFromStack()
await provider.postStateToWebview()

View file

@ -115,6 +115,9 @@ export async function activate(context: vscode.ExtensionContext) {
registerCodeActions(context)
registerTerminalActions(context)
// Allows other extensions to activate once Roo is ready.
vscode.commands.executeCommand('roo-cline.activationCompleted');
// Implements the `RooCodeAPI` interface.
return new API(outputChannel, provider)
}