From eb6d36ce821540d3699d34c8a0d1be8667680828 Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Tue, 17 Mar 2026 15:17:55 +0100 Subject: [PATCH] fix(vscode): add hasParameters and installationMethodName to install telemetry --- .../src/components/marketplace/InstallModal.tsx | 11 +++++++++-- .../src/components/marketplace/MarketplaceView.tsx | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/marketplace/InstallModal.tsx b/packages/kilo-vscode/webview-ui/src/components/marketplace/InstallModal.tsx index 8d2192d005b..15dfb87402c 100644 --- a/packages/kilo-vscode/webview-ui/src/components/marketplace/InstallModal.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/marketplace/InstallModal.tsx @@ -18,7 +18,11 @@ interface ScopeOption { interface Props { item: MarketplaceItem onClose: () => void - onInstallResult: (success: boolean, scope: "project" | "global") => void + onInstallResult: ( + success: boolean, + scope: "project" | "global", + extra?: { hasParameters?: boolean; installationMethodName?: string }, + ) => void } export const InstallModal = (props: Props) => { @@ -77,7 +81,10 @@ export const InstallModal = (props: Props) => { if (msg.type === "marketplaceInstallResult" && msg.slug === props.item.id) { setInstalling(false) setResult({ success: msg.success, error: msg.error }) - props.onInstallResult(msg.success, scope().value) + props.onInstallResult(msg.success, scope().value, { + hasParameters: Object.keys(params()).length > 0, + installationMethodName: method()?.name, + }) } }) onCleanup(unsub) diff --git a/packages/kilo-vscode/webview-ui/src/components/marketplace/MarketplaceView.tsx b/packages/kilo-vscode/webview-ui/src/components/marketplace/MarketplaceView.tsx index 01975d34839..7225f5ab506 100644 --- a/packages/kilo-vscode/webview-ui/src/components/marketplace/MarketplaceView.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/marketplace/MarketplaceView.tsx @@ -92,13 +92,15 @@ export const MarketplaceView = () => { dialog.close()} - onInstallResult={(success, scope) => { + onInstallResult={(success, scope, extra) => { if (success) { telemetry("Marketplace Item Installed", { itemId: item.id, itemType: item.type, itemName: item.name, target: scope, + ...(extra?.hasParameters && { hasParameters: true }), + ...(extra?.installationMethodName && { installationMethodName: extra.installationMethodName }), }) dialog.close() fetchData()