fix(vscode): refresh agent list after marketplace install/remove so new modes appear immediately

This commit is contained in:
Mark IJbema
2026-03-17 16:20:47 +01:00
parent 509c7d7fcc
commit 563e8d0020
+10 -2
View File
@@ -657,7 +657,11 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
const workspace = this.getProjectDirectory(this.currentSession?.id)
const scope = message.mpInstallOptions?.target ?? "project"
const result = await this.getMarketplace().install(message.mpItem, message.mpInstallOptions, workspace)
if (result.success) await this.disposeCliInstance(scope)
if (result.success) {
await this.disposeCliInstance(scope)
this.cachedAgentsMessage = null
await this.fetchAndSendAgents()
}
this.postMessage({
type: "marketplaceInstallResult",
success: result.success,
@@ -670,7 +674,11 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
const workspace = this.getProjectDirectory(this.currentSession?.id)
const scope = message.mpInstallOptions?.target ?? "project"
const result = await this.getMarketplace().remove(message.mpItem, scope, workspace)
if (result.success) await this.disposeCliInstance(scope)
if (result.success) {
await this.disposeCliInstance(scope)
this.cachedAgentsMessage = null
await this.fetchAndSendAgents()
}
this.postMessage({
type: "marketplaceRemoveResult",
success: result.success,