|
1
|
import * as vscode from "vscode"; |
|
2
|
import { ChatViewProvider } from "./chatView"; |
|
3
|
|
|
4
|
export function activate(context: vscode.ExtensionContext): void { |
|
5
|
const provider = new ChatViewProvider(context); |
|
6
|
|
|
7
|
context.subscriptions.push( |
|
8
|
vscode.window.registerWebviewViewProvider(ChatViewProvider.viewType, provider, { |
|
9
|
webviewOptions: { retainContextWhenHidden: true } |
|
10
|
}) |
|
11
|
); |
|
12
|
|
|
13
|
context.subscriptions.push( |
|
14
|
vscode.commands.registerCommand("sigit.openChat", async () => { |
|
15
|
await vscode.commands.executeCommand("sigit.chat.focus"); |
|
16
|
provider.reveal(); |
|
17
|
}), |
|
18
|
vscode.commands.registerCommand("sigit.newSession", () => provider.newSession()), |
|
19
|
vscode.commands.registerCommand("sigit.selectAgent", () => provider.selectAgent()), |
|
20
|
vscode.commands.registerCommand("sigit.restartAgent", () => provider.restart()) |
|
21
|
); |
|
22
|
} |
|
23
|
|
|
24
|
export function deactivate(): void { |
|
25
|
// Resources are tied to context.subscriptions and disposed automatically. |
|
26
|
} |