mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 21:01:06 -05:00
Get rid of type change, improve detection of webview initialization
This commit is contained in:
@@ -132,6 +132,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
||||
private static activeInstances: Set<ClineProvider> = new Set()
|
||||
private disposables: vscode.Disposable[] = []
|
||||
private view?: vscode.WebviewView | vscode.WebviewPanel
|
||||
private isViewLaunched = false
|
||||
private cline?: Cline
|
||||
private workspaceTracker?: WorkspaceTracker
|
||||
mcpHub?: McpHub
|
||||
@@ -396,7 +397,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
||||
)
|
||||
}
|
||||
|
||||
public async postMessageToWebview(message: ExtensionMessage | WebviewMessage) {
|
||||
public async postMessageToWebview(message: ExtensionMessage) {
|
||||
await this.view?.webview.postMessage(message)
|
||||
}
|
||||
|
||||
@@ -644,6 +645,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
||||
),
|
||||
)
|
||||
|
||||
this.isViewLaunched = true
|
||||
break
|
||||
case "newTask":
|
||||
// Code that should run in response to the hello message command
|
||||
@@ -2471,6 +2473,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
||||
|
||||
// integration tests
|
||||
|
||||
get viewLaunched() {
|
||||
return this.isViewLaunched
|
||||
}
|
||||
|
||||
get messages() {
|
||||
return this.cline?.clineMessages || []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user