From 5fbf56321624dbe5613707fdd63cbfaeea882489 Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Fri, 28 Mar 2025 20:48:03 -0700 Subject: [PATCH] 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 --- src/activate/registerCommands.ts | 1 + src/extension.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/activate/registerCommands.ts b/src/activate/registerCommands.ts index e9491f9371..827c3cd455 100644 --- a/src/activate/registerCommands.ts +++ b/src/activate/registerCommands.ts @@ -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() diff --git a/src/extension.ts b/src/extension.ts index a232cb51d0..1ce5c5a6b4 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -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) }