diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index a9e658f7046..8f472c98624 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -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,