Skip to content

Commit 5fbf563

Browse files
authored
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 <[email protected]>
1 parent 105bc3c commit 5fbf563

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/activate/registerCommands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const registerCommands = (options: RegisterCommandOptions) => {
5050

5151
const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOptions) => {
5252
return {
53+
"roo-cline.activationCompleted": () => {},
5354
"roo-cline.plusButtonClicked": async () => {
5455
await provider.removeClineFromStack()
5556
await provider.postStateToWebview()

src/extension.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ export async function activate(context: vscode.ExtensionContext) {
115115
registerCodeActions(context)
116116
registerTerminalActions(context)
117117

118+
// Allows other extensions to activate once Roo is ready.
119+
vscode.commands.executeCommand('roo-cline.activationCompleted');
120+
118121
// Implements the `RooCodeAPI` interface.
119122
return new API(outputChannel, provider)
120123
}

0 commit comments

Comments
 (0)