@posthog/wizard 2.85.0 → 2.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PickerMenu-BtheKi1o.js → PickerMenu-DB8MO29j.js} +14 -5
- package/dist/PickerMenu-DB8MO29j.js.map +1 -0
- package/dist/{agent-interface-C2yoWWW_.js → agent-interface-DuRXDmuv.js} +10 -10
- package/dist/{agent-interface-C2yoWWW_.js.map → agent-interface-DuRXDmuv.js.map} +1 -1
- package/dist/{agent-prompt-loader-B6ZyyoSH.js → agent-prompt-loader-DibvEzkO.js} +6 -6
- package/dist/{agent-prompt-loader-B6ZyyoSH.js.map → agent-prompt-loader-DibvEzkO.js.map} +1 -1
- package/dist/{analytics-J1cjIekQ.js → analytics-CZNcNpiq.js} +2 -2
- package/dist/{analytics-J1cjIekQ.js.map → analytics-CZNcNpiq.js.map} +1 -1
- package/dist/analytics-jaYrwNS5.js +2 -0
- package/dist/{api-DoMocc6P.js → api-C3wnIy9r.js} +2 -2
- package/dist/{api-DoMocc6P.js.map → api-C3wnIy9r.js.map} +1 -1
- package/dist/api-Cjhon9jT.js +2 -0
- package/dist/{api-key-login-CjXOunDa.js → api-key-login-BEoyy3Pq.js} +5 -5
- package/dist/{api-key-login-CjXOunDa.js.map → api-key-login-BEoyy3Pq.js.map} +1 -1
- package/dist/api-key-login-zfRkp4JK.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/{bounded-fs-Dr1DVwWs.js → bounded-fs-CQGn0HxE.js} +3 -3
- package/dist/{bounded-fs-Dr1DVwWs.js.map → bounded-fs-CQGn0HxE.js.map} +1 -1
- package/dist/{ci-install-ByYDF-nS.js → ci-install-BG77SHEw.js} +4 -4
- package/dist/{ci-install-ByYDF-nS.js.map → ci-install-BG77SHEw.js.map} +1 -1
- package/dist/{debug-BWrfAT_d.js → debug-Bw13gmS3.js} +3 -3
- package/dist/debug-Bw13gmS3.js.map +1 -0
- package/dist/{defaults-BWLIffh5.js → defaults-CLRka8GN.js} +4 -5
- package/dist/{defaults-BWLIffh5.js.map → defaults-CLRka8GN.js.map} +1 -1
- package/dist/{family-picker-CAW_VtYf.js → family-picker-CntEtZJE.js} +2 -2
- package/dist/{family-picker-CAW_VtYf.js.map → family-picker-CntEtZJE.js.map} +1 -1
- package/dist/{gateway-DrKvPnHW.js → gateway-Cl7h4Eot.js} +5 -5
- package/dist/{gateway-DrKvPnHW.js.map → gateway-Cl7h4Eot.js.map} +1 -1
- package/dist/{headless-B3NomAmg.js → headless-DRA4mv9n.js} +2 -2
- package/dist/{headless-B3NomAmg.js.map → headless-DRA4mv9n.js.map} +1 -1
- package/dist/{headless-D2lM4BeY.js → headless-DZAVKFMW.js} +1 -1
- package/dist/{host-resolution-BAnXpvmo.js → host-resolution-B0cQUK2A.js} +4 -4
- package/dist/{host-resolution-BAnXpvmo.js.map → host-resolution-B0cQUK2A.js.map} +1 -1
- package/dist/{install-BaZS9PMi.js → install-C0CKn7AV.js} +1 -1
- package/dist/{install-x8br-QvS.js → install-IvnTzMlR.js} +137 -39
- package/dist/install-IvnTzMlR.js.map +1 -0
- package/dist/{interactive-D0X4iQOs.js → interactive-wm9OcauB.js} +3 -3
- package/dist/{interactive-D0X4iQOs.js.map → interactive-wm9OcauB.js.map} +1 -1
- package/dist/{links-DCUnJ0Fl.js → links-Cj6OQ9Kv.js} +3 -3
- package/dist/{links-DCUnJ0Fl.js.map → links-Cj6OQ9Kv.js.map} +1 -1
- package/dist/{main-CCIvlpq6.js → main-SU6W6oek.js} +20 -20
- package/dist/{main-CCIvlpq6.js.map → main-SU6W6oek.js.map} +1 -1
- package/dist/{mcp-D1rpXjM2.js → mcp-m46rxecB.js} +3 -3
- package/dist/{mcp-D1rpXjM2.js.map → mcp-m46rxecB.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-GXBA581m.js → mcp-prompt-streaming-DuDUi7nq.js} +5 -5
- package/dist/{mcp-prompt-streaming-GXBA581m.js.map → mcp-prompt-streaming-DuDUi7nq.js.map} +1 -1
- package/dist/{models-HNKiMsME.js → models-D6XiGoty.js} +2 -2
- package/dist/{models-HNKiMsME.js.map → models-D6XiGoty.js.map} +1 -1
- package/dist/{oauth-session-DTydKnfV.js → oauth-session-DvAgen9l.js} +2 -2
- package/dist/{oauth-session-DTydKnfV.js.map → oauth-session-DvAgen9l.js.map} +1 -1
- package/dist/{orchestrator-tools-a3uMYekz.js → orchestrator-tools-DSKw-1S6.js} +3 -3
- package/dist/{orchestrator-tools-a3uMYekz.js.map → orchestrator-tools-DSKw-1S6.js.map} +1 -1
- package/dist/{package-manager-D_APgur1.js → package-manager-CPzIaeu0.js} +4 -4
- package/dist/{package-manager-D_APgur1.js.map → package-manager-CPzIaeu0.js.map} +1 -1
- package/dist/{pi-BXwrltc4.js → pi-T8emzbHL.js} +12 -12
- package/dist/{pi-BXwrltc4.js.map → pi-T8emzbHL.js.map} +1 -1
- package/dist/{playground-ZiIX53Cx.js → playground-DE_9g_nd.js} +4 -4
- package/dist/{playground-ZiIX53Cx.js.map → playground-DE_9g_nd.js.map} +1 -1
- package/dist/{posthog-integration-yK9EktZn.js → posthog-integration-CuEK-hPp.js} +21 -21
- package/dist/{posthog-integration-yK9EktZn.js.map → posthog-integration-CuEK-hPp.js.map} +1 -1
- package/dist/programs-CWXzMPOe.js +3 -0
- package/dist/{programs-AZStBYjR.js → programs-T4EhU20m.js} +15 -15
- package/dist/{programs-AZStBYjR.js.map → programs-T4EhU20m.js.map} +1 -1
- package/dist/{provisioning-BpP-DrUL.js → provisioning-9_MWLl8u.js} +4 -4
- package/dist/{provisioning-BpP-DrUL.js.map → provisioning-9_MWLl8u.js.map} +1 -1
- package/dist/provisioning-BXahZmpw.js +2 -0
- package/dist/{queue-tools-BS8nXJ6S.js → queue-tools-jFZ5kLU1.js} +4 -4
- package/dist/{queue-tools-BS8nXJ6S.js.map → queue-tools-jFZ5kLU1.js.map} +1 -1
- package/dist/{results-BE1ctlKP.js → results-CXTeEIUi.js} +2 -2
- package/dist/{results-BE1ctlKP.js.map → results-CXTeEIUi.js.map} +1 -1
- package/dist/{run-Cmn1xaWK.js → run-Bnu1vqZG.js} +10 -10
- package/dist/{run-Cmn1xaWK.js.map → run-Bnu1vqZG.js.map} +1 -1
- package/dist/run-tool-B0kgP7oA.js +2 -0
- package/dist/{run-tool-DAt35gkq.js → run-tool-DOZz2dEJ.js} +37 -30
- package/dist/{run-tool-DAt35gkq.js.map → run-tool-DOZz2dEJ.js.map} +1 -1
- package/dist/{run-D0AZVe7z.js → run-yiqaCX7y.js} +7 -7
- package/dist/{run-D0AZVe7z.js.map → run-yiqaCX7y.js.map} +1 -1
- package/dist/{runners-BsTLloGF.js → runners-CVFLsNvO.js} +8 -8
- package/dist/{runners-BsTLloGF.js.map → runners-CVFLsNvO.js.map} +1 -1
- package/dist/{security-CQZUg-Oz.js → security-Bk0aumrm.js} +5 -5
- package/dist/{security-CQZUg-Oz.js.map → security-Bk0aumrm.js.map} +1 -1
- package/dist/{setup-utils-CqITBPrn.js → setup-utils-D5SquGvT.js} +3 -3
- package/dist/{setup-utils-CqITBPrn.js.map → setup-utils-D5SquGvT.js.map} +1 -1
- package/dist/{start-playground-CUhA5g6G.js → start-playground-C__Gy1yk.js} +29 -14
- package/dist/start-playground-C__Gy1yk.js.map +1 -0
- package/dist/{subagent-BPynEn_q.js → subagent-DaSkUEg7.js} +3 -3
- package/dist/{subagent-BPynEn_q.js.map → subagent-DaSkUEg7.js.map} +1 -1
- package/dist/{task-Cuwyq3HT.js → task-Bv_o-lNo.js} +14 -14
- package/dist/{task-Cuwyq3HT.js.map → task-Bv_o-lNo.js.map} +1 -1
- package/dist/{telemetry-BoTjlaAw.js → telemetry-d_03gIpQ.js} +2 -2
- package/dist/{telemetry-BoTjlaAw.js.map → telemetry-d_03gIpQ.js.map} +1 -1
- package/dist/{terminal-CmCNn0IG.js → terminal-BLGYQpSO.js} +583 -341
- package/dist/terminal-BLGYQpSO.js.map +1 -0
- package/dist/{tools-DvefdnQx.js → tools-BE4Et6sl.js} +8 -8
- package/dist/{tools-DvefdnQx.js.map → tools-BE4Et6sl.js.map} +1 -1
- package/dist/{tools-Blf-Yjru.js → tools-C8-l1rBv.js} +14 -14
- package/dist/{tools-Blf-Yjru.js.map → tools-C8-l1rBv.js.map} +1 -1
- package/dist/{tui-CKbAdFxQ.js → tui-DivYObcb.js} +5 -5
- package/dist/{tui-CKbAdFxQ.js.map → tui-DivYObcb.js.map} +1 -1
- package/dist/{tui-B_nBr0aF.js → tui-Zdby16pT.js} +1 -1
- package/dist/{upload-step-Dqb7Dzfn.js → upload-step-BfAUAEYC.js} +3 -3
- package/dist/{upload-step-Dqb7Dzfn.js.map → upload-step-BfAUAEYC.js.map} +1 -1
- package/dist/{urls-DWZ9EKLI.js → urls-CvKF1P3f.js} +2 -2
- package/dist/{urls-DWZ9EKLI.js.map → urls-CvKF1P3f.js.map} +1 -1
- package/dist/{wizard-abort-g6PYcdlP.js → wizard-abort-DTn9HFAi.js} +4 -4
- package/dist/{wizard-abort-g6PYcdlP.js.map → wizard-abort-DTn9HFAi.js.map} +1 -1
- package/dist/{yara-hooks-ssWAT78l.js → yara-hooks-CA_ZEpAV.js} +4 -4
- package/dist/{yara-hooks-ssWAT78l.js.map → yara-hooks-CA_ZEpAV.js.map} +1 -1
- package/dist/{yara-hooks-BsOgyb6-.js → yara-hooks-DXIqi0Km.js} +1 -1
- package/package.json +1 -1
- package/dist/PickerMenu-BtheKi1o.js.map +0 -1
- package/dist/analytics-DM5Fx9JF.js +0 -2
- package/dist/api-bUx3g0Jj.js +0 -2
- package/dist/api-key-login-D4Esj8TZ.js +0 -2
- package/dist/debug-BWrfAT_d.js.map +0 -1
- package/dist/install-x8br-QvS.js.map +0 -1
- package/dist/programs-DrvCAQHg.js +0 -3
- package/dist/provisioning-D8ZhYNCc.js +0 -2
- package/dist/run-tool-IHvPCuQT.js +0 -2
- package/dist/start-playground-CUhA5g6G.js.map +0 -1
- package/dist/terminal-CmCNn0IG.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { n as ErrorCodes } from "./emit-BqLCdV8Y.js";
|
|
2
|
-
import { d as relativeToInstallDir, i as getLogFilePath, o as logToFile } from "./debug-
|
|
3
|
-
import { A as OAUTH_PORTS, B as POSTHOG_TERMS_URL, H as REPLAY_VISION_SUPPORTED, I as POSTHOG_ORG_AI_SETTINGS_URL, L as POSTHOG_PRIVACY_URL, M as POSTHOG_APP_URL, O as ISSUES_URL, P as POSTHOG_DOCS_URL, U as SETUP_REPORT_FILE, X as WIZARD_OAUTH_SCOPES, at as getSkillsBaseUrl, et as WIZARD_PROVISIONING_SCOPES, h as DUMMY_PROJECT_API_KEY, i as sessionProperties, it as WIZARD_USER_AGENT, j as OAUTH_TIMEOUT_MS, k as Integration, n as analytics } from "./analytics-
|
|
4
|
-
import { $ as SELF_DRIVING_INTEGRATE_PATH_KEY, A as getProgramConfig, C as oauthErrorFromTokenBody, D as findProgramConfig, E as Program, F as FEATURE_FLAGS_UNSUPPORTED, H as DISPLAY_NAME, J as PRICING_SHORT, K as NO_DEFAULT_LIMIT, M as getSubcommandPrograms, O as getCommandPath, P as FEATURE_FLAGS_STEP_SKILL_ID, Q as POSTHOG_PRESENT_KEY, R as ERROR_TRACKING_PROJECT_PATH_KEY, S as oauthErrorFromCallbackParams, U as MANUAL_SDK_VARIANTS, V as detectSourceMapsProjects, W as SOURCE_MAPS_CONTEXT_KEYS, X as GITHUB_REQUIRED_BODY, Y as detectSelfDrivingIntegrationProjects, Z as GITHUB_REQUIRED_MESSAGE, _ as missingOAuthScopes, at as withScopeAdditions, b as buildCallbackErrorHtml, c as buildSession, ct as SIGNUP_WIZARD_READINESS_CONFIG, d as SessionStore, f as applyAgentProgress, g as getOAuthClientId, h as OAuthTokenResponseSchema, it as CONNECT_SLACK_SCOPE_ADDITIONS, j as getProvisioningScopesForProgram, k as getOAuthScopesForProgram, lt as evaluateWizardReadiness, ot as getAuditChecks, q as PRICING_LONG, st as SERVICE_LABELS, ut as getBlockingServiceKeys, v as parseOAuthScopes, w as reportCodebaseScan, x as buildOAuthFailureMessage, y as OAuthError, z as detectErrorTrackingProjects } from "./programs-
|
|
2
|
+
import { d as relativeToInstallDir, i as getLogFilePath, o as logToFile } from "./debug-Bw13gmS3.js";
|
|
3
|
+
import { A as OAUTH_PORTS, B as POSTHOG_TERMS_URL, H as REPLAY_VISION_SUPPORTED, I as POSTHOG_ORG_AI_SETTINGS_URL, L as POSTHOG_PRIVACY_URL, M as POSTHOG_APP_URL, O as ISSUES_URL, P as POSTHOG_DOCS_URL, U as SETUP_REPORT_FILE, X as WIZARD_OAUTH_SCOPES, at as getSkillsBaseUrl, et as WIZARD_PROVISIONING_SCOPES, h as DUMMY_PROJECT_API_KEY, i as sessionProperties, it as WIZARD_USER_AGENT, j as OAUTH_TIMEOUT_MS, k as Integration, n as analytics } from "./analytics-CZNcNpiq.js";
|
|
4
|
+
import { $ as SELF_DRIVING_INTEGRATE_PATH_KEY, A as getProgramConfig, C as oauthErrorFromTokenBody, D as findProgramConfig, E as Program, F as FEATURE_FLAGS_UNSUPPORTED, H as DISPLAY_NAME, J as PRICING_SHORT, K as NO_DEFAULT_LIMIT, M as getSubcommandPrograms, O as getCommandPath, P as FEATURE_FLAGS_STEP_SKILL_ID, Q as POSTHOG_PRESENT_KEY, R as ERROR_TRACKING_PROJECT_PATH_KEY, S as oauthErrorFromCallbackParams, U as MANUAL_SDK_VARIANTS, V as detectSourceMapsProjects, W as SOURCE_MAPS_CONTEXT_KEYS, X as GITHUB_REQUIRED_BODY, Y as detectSelfDrivingIntegrationProjects, Z as GITHUB_REQUIRED_MESSAGE, _ as missingOAuthScopes, at as withScopeAdditions, b as buildCallbackErrorHtml, c as buildSession, ct as SIGNUP_WIZARD_READINESS_CONFIG, d as SessionStore, f as applyAgentProgress, g as getOAuthClientId, h as OAuthTokenResponseSchema, it as CONNECT_SLACK_SCOPE_ADDITIONS, j as getProvisioningScopesForProgram, k as getOAuthScopesForProgram, lt as evaluateWizardReadiness, ot as getAuditChecks, q as PRICING_LONG, st as SERVICE_LABELS, ut as getBlockingServiceKeys, v as parseOAuthScopes, w as reportCodebaseScan, x as buildOAuthFailureMessage, y as OAuthError, z as detectErrorTrackingProjects } from "./programs-T4EhU20m.js";
|
|
5
5
|
import "./errors-BXlWujEw.js";
|
|
6
|
-
import { r as withUtm, t as openTrackedLink } from "./links-
|
|
7
|
-
import { t as withProgress } from "./telemetry-
|
|
8
|
-
import { t as detectOrgAndProject } from "./setup-utils-
|
|
9
|
-
import { r as currentCredentials, s as rotateAfterUnauthorized } from "./oauth-session-
|
|
10
|
-
import { a as getOAuthUrl, i as getIntegrationAuthorizeUrl, s as resolveBaseUrl } from "./urls-
|
|
11
|
-
import { t as HostResolution } from "./host-resolution-
|
|
12
|
-
import { A as streamMcpPrompt, D as FRAMEWORK_REGISTRY, F as formatTokenCount, N as computeTokenCostUsd, P as formatCostUsd, c as STRIPE_SDKS, d as scanCodebaseFor, m as getDetectedWarehouseSources, s as POSTHOG_SDKS } from "./posthog-integration-
|
|
13
|
-
import { b as fetchSkillMenu } from "./yara-hooks-
|
|
14
|
-
import { c as fetchProjectData, l as fetchSlackConnected, n as ApiError, o as fetchGithubConnected, u as fetchUserData } from "./api-
|
|
15
|
-
import { n as namesWithStatus, o as summarizeFailure, t as isOk } from "./results-
|
|
16
|
-
import { f as getKindMeta, l as MCP_TUTORIAL_SCOPE_ADDITIONS, n as getTool, p as fetchHealthIssues } from "./tools-
|
|
17
|
-
import {
|
|
18
|
-
import { n as provisionNewAccount, r as requestDeepLink, t as ProvisionedAccountUnreadableError } from "./provisioning-
|
|
19
|
-
import { r as wizardAbort } from "./wizard-abort-
|
|
20
|
-
import { a as useStdoutDimensions, c as wrapAndTruncate, d as isObjectBlock, f as ConfirmButton, h as Icons, i as useKeyboardHintsContext, l as isClearBlock, m as Colors, n as useKeyBindings, o as computeVisibleRange, p as PromptLabel, r as KeyboardHintsProvider, s as wordWrap, t as PickerMenu, u as isLinesBlock } from "./PickerMenu-
|
|
6
|
+
import { r as withUtm, t as openTrackedLink } from "./links-Cj6OQ9Kv.js";
|
|
7
|
+
import { t as withProgress } from "./telemetry-d_03gIpQ.js";
|
|
8
|
+
import { t as detectOrgAndProject } from "./setup-utils-D5SquGvT.js";
|
|
9
|
+
import { r as currentCredentials, s as rotateAfterUnauthorized } from "./oauth-session-DvAgen9l.js";
|
|
10
|
+
import { a as getOAuthUrl, i as getIntegrationAuthorizeUrl, s as resolveBaseUrl } from "./urls-CvKF1P3f.js";
|
|
11
|
+
import { t as HostResolution } from "./host-resolution-B0cQUK2A.js";
|
|
12
|
+
import { A as streamMcpPrompt, D as FRAMEWORK_REGISTRY, F as formatTokenCount, N as computeTokenCostUsd, P as formatCostUsd, c as STRIPE_SDKS, d as scanCodebaseFor, m as getDetectedWarehouseSources, s as POSTHOG_SDKS } from "./posthog-integration-CuEK-hPp.js";
|
|
13
|
+
import { b as fetchSkillMenu } from "./yara-hooks-CA_ZEpAV.js";
|
|
14
|
+
import { c as fetchProjectData, l as fetchSlackConnected, n as ApiError, o as fetchGithubConnected, u as fetchUserData } from "./api-C3wnIy9r.js";
|
|
15
|
+
import { n as namesWithStatus, o as summarizeFailure, t as isOk } from "./results-CXTeEIUi.js";
|
|
16
|
+
import { f as getKindMeta, l as MCP_TUTORIAL_SCOPE_ADDITIONS, n as getTool, p as fetchHealthIssues } from "./tools-C8-l1rBv.js";
|
|
17
|
+
import { a as isAllFeaturesSelected, t as ALL_FEATURE_VALUES } from "./defaults-CLRka8GN.js";
|
|
18
|
+
import { n as provisionNewAccount, r as requestDeepLink, t as ProvisionedAccountUnreadableError } from "./provisioning-9_MWLl8u.js";
|
|
19
|
+
import { r as wizardAbort } from "./wizard-abort-DTn9HFAi.js";
|
|
20
|
+
import { a as useStdoutDimensions, c as wrapAndTruncate, d as isObjectBlock, f as ConfirmButton, h as Icons, i as useKeyboardHintsContext, l as isClearBlock, m as Colors, n as useKeyBindings, o as computeVisibleRange, p as PromptLabel, r as KeyboardHintsProvider, s as wordWrap, t as PickerMenu, u as isLinesBlock } from "./PickerMenu-DB8MO29j.js";
|
|
21
21
|
import * as fs$1 from "fs";
|
|
22
22
|
import path from "path";
|
|
23
23
|
import { join as join$1 } from "node:path";
|
|
@@ -6030,18 +6030,10 @@ const PRODUCT_SUITE_BLOCK = {
|
|
|
6030
6030
|
}),
|
|
6031
6031
|
"Endpoints"
|
|
6032
6032
|
] }),
|
|
6033
|
-
/* @__PURE__ */ jsxs(Text, { children: [
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
}),
|
|
6038
|
-
"Customer Analytics ",
|
|
6039
|
-
/* @__PURE__ */ jsx(Text, {
|
|
6040
|
-
color: "cyan",
|
|
6041
|
-
children: "◆ "
|
|
6042
|
-
}),
|
|
6043
|
-
"PostHog Desktop"
|
|
6044
|
-
] })
|
|
6033
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
6034
|
+
color: "cyan",
|
|
6035
|
+
children: " ◆ "
|
|
6036
|
+
}), "Customer Analytics"] })
|
|
6045
6037
|
]
|
|
6046
6038
|
};
|
|
6047
6039
|
//#endregion
|
|
@@ -7230,41 +7222,49 @@ const getContentBlocks$1 = (store) => [
|
|
|
7230
7222
|
color: "cyan",
|
|
7231
7223
|
children: " ◆ "
|
|
7232
7224
|
}),
|
|
7233
|
-
"
|
|
7225
|
+
"MCP ",
|
|
7234
7226
|
/* @__PURE__ */ jsx(Text, {
|
|
7235
7227
|
color: "cyan",
|
|
7236
7228
|
children: "◆ "
|
|
7237
7229
|
}),
|
|
7238
|
-
"
|
|
7230
|
+
"Product Analytics"
|
|
7239
7231
|
] }),
|
|
7240
7232
|
/* @__PURE__ */ jsxs(Text, { children: [
|
|
7241
7233
|
/* @__PURE__ */ jsx(Text, {
|
|
7242
7234
|
color: "cyan",
|
|
7243
7235
|
children: " ◆ "
|
|
7244
7236
|
}),
|
|
7245
|
-
"
|
|
7237
|
+
"Web Analytics ",
|
|
7246
7238
|
/* @__PURE__ */ jsx(Text, {
|
|
7247
7239
|
color: "cyan",
|
|
7248
7240
|
children: "◆ "
|
|
7249
7241
|
}),
|
|
7250
|
-
"
|
|
7242
|
+
"Error Tracking"
|
|
7251
7243
|
] }),
|
|
7252
7244
|
/* @__PURE__ */ jsxs(Text, { children: [
|
|
7253
7245
|
/* @__PURE__ */ jsx(Text, {
|
|
7254
7246
|
color: "cyan",
|
|
7255
7247
|
children: " ◆ "
|
|
7256
7248
|
}),
|
|
7257
|
-
"
|
|
7249
|
+
"Session Replay ",
|
|
7258
7250
|
/* @__PURE__ */ jsx(Text, {
|
|
7259
7251
|
color: "cyan",
|
|
7260
7252
|
children: "◆ "
|
|
7261
7253
|
}),
|
|
7262
|
-
"
|
|
7254
|
+
"AI Observability"
|
|
7263
7255
|
] }),
|
|
7264
|
-
/* @__PURE__ */ jsxs(Text, { children: [
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7256
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
7257
|
+
/* @__PURE__ */ jsx(Text, {
|
|
7258
|
+
color: "cyan",
|
|
7259
|
+
children: " ◆ "
|
|
7260
|
+
}),
|
|
7261
|
+
"Logs ",
|
|
7262
|
+
/* @__PURE__ */ jsx(Text, {
|
|
7263
|
+
color: "cyan",
|
|
7264
|
+
children: "◆ "
|
|
7265
|
+
}),
|
|
7266
|
+
"Data Pipelines Sources"
|
|
7267
|
+
] })
|
|
7268
7268
|
]
|
|
7269
7269
|
}
|
|
7270
7270
|
];
|
|
@@ -7430,7 +7430,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
7430
7430
|
})),
|
|
7431
7431
|
onSelect: (value) => {
|
|
7432
7432
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
7433
|
-
import("./programs-
|
|
7433
|
+
import("./programs-CWXzMPOe.js").then(({ FRAMEWORK_REGISTRY }) => {
|
|
7434
7434
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
7435
7435
|
store.setFrameworkConfig(integration, config);
|
|
7436
7436
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -10061,24 +10061,29 @@ const TUI_TOOLS$3 = { "posthog-doctor": {
|
|
|
10061
10061
|
* importing business logic directly. Testable, no dynamic imports.
|
|
10062
10062
|
*
|
|
10063
10063
|
* Supports two modes via the `mode` prop:
|
|
10064
|
-
* - 'install': detect clients →
|
|
10065
|
-
*
|
|
10064
|
+
* - 'install': detect clients → install in every local client → results
|
|
10065
|
+
* → open the connector page of each account client the user picks
|
|
10066
|
+
* - 'remove': detect installed local clients → pick which (esc cancels) → remove
|
|
10066
10067
|
*
|
|
10067
|
-
* A successful install ends on one screen:
|
|
10068
|
-
* prompts and the tutorial command. When done, calls
|
|
10068
|
+
* A successful install ends on one screen: a row per client, any login
|
|
10069
|
+
* commands, sample prompts and the tutorial command. When done, calls
|
|
10070
|
+
* store.setMcpComplete().
|
|
10069
10071
|
*/
|
|
10072
|
+
/** The results menu's leave option; never a client name. */
|
|
10073
|
+
const CONTINUE = "\0continue";
|
|
10070
10074
|
const markDone = (store, outcome, clients = [], featuresSelected, loginCommands = []) => {
|
|
10071
10075
|
store.setMcpComplete(outcome, clients, featuresSelected, loginCommands);
|
|
10072
10076
|
};
|
|
10073
10077
|
/** Report the outcome as the results show, and complete the step on Enter. */
|
|
10074
|
-
const doneOnEnter = (store, outcome, clients = [], featuresSelected, loginCommands = []) => {
|
|
10075
|
-
store.reportMcpOutcome(outcome, clients, featuresSelected);
|
|
10078
|
+
const doneOnEnter = (store, outcome, clients = [], featuresSelected, loginCommands = [], breakdown) => {
|
|
10079
|
+
store.reportMcpOutcome(outcome, clients, featuresSelected, breakdown);
|
|
10076
10080
|
return () => markDone(store, outcome, clients, featuresSelected, loginCommands);
|
|
10077
10081
|
};
|
|
10078
10082
|
/**
|
|
10079
|
-
* The editor-owned login commands
|
|
10080
|
-
*
|
|
10081
|
-
*
|
|
10083
|
+
* The editor-owned login commands to run after this install: config entries
|
|
10084
|
+
* use the client's own server name, plugin-provided servers their `plugin:`
|
|
10085
|
+
* name. One entry per client. An entry that was already there still gets its
|
|
10086
|
+
* command, as a plugin does: nothing here knows whether the user signed in.
|
|
10082
10087
|
*/
|
|
10083
10088
|
const pendingLoginCommands = (clients, mcpResult, pluginResult) => {
|
|
10084
10089
|
const commands = /* @__PURE__ */ new Map();
|
|
@@ -10088,12 +10093,33 @@ const pendingLoginCommands = (clients, mcpResult, pluginResult) => {
|
|
|
10088
10093
|
}
|
|
10089
10094
|
for (const r of mcpResult) {
|
|
10090
10095
|
const command = clients.find((c) => c.name === r.name)?.loginCommand;
|
|
10091
|
-
if (r
|
|
10096
|
+
if (!isOk(r) || !command) continue;
|
|
10097
|
+
if (r.status === "changed" || !commands.has(r.name)) commands.set(r.name, command);
|
|
10092
10098
|
}
|
|
10093
10099
|
return [...commands.values()];
|
|
10094
10100
|
};
|
|
10101
|
+
/**
|
|
10102
|
+
* Sort each client by its MCP and plugin results: new when anything changed,
|
|
10103
|
+
* already installed when everything was in place, failed when nothing worked.
|
|
10104
|
+
*/
|
|
10105
|
+
const installBreakdown = (local, results) => {
|
|
10106
|
+
const breakdown = {
|
|
10107
|
+
newlyInstalled: [],
|
|
10108
|
+
alreadyInstalled: [],
|
|
10109
|
+
failed: []
|
|
10110
|
+
};
|
|
10111
|
+
for (const c of local) {
|
|
10112
|
+
const mine = results.filter((r) => r.name === c.name);
|
|
10113
|
+
if (mine.length === 0) continue;
|
|
10114
|
+
if (!mine.some(isOk)) breakdown.failed.push(c.name);
|
|
10115
|
+
else if (mine.some((r) => r.status === "changed")) breakdown.newlyInstalled.push(c.name);
|
|
10116
|
+
else breakdown.alreadyInstalled.push(c.name);
|
|
10117
|
+
}
|
|
10118
|
+
return breakdown;
|
|
10119
|
+
};
|
|
10095
10120
|
const reportFeatures = (features) => isAllFeaturesSelected(features) ? "all" : features;
|
|
10096
10121
|
const errorText = (err) => summarizeFailure(err instanceof Error ? err.message : String(err)) ?? "unknown error";
|
|
10122
|
+
const plural = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
10097
10123
|
/**
|
|
10098
10124
|
* One "✔ <title>" / "✖ <title>" block with a bullet per client, plus an optional
|
|
10099
10125
|
* dim explanation underneath. Rendered only when it has something to say.
|
|
@@ -10126,17 +10152,74 @@ const ResultGroup = ({ title, items, color, icon, note }) => {
|
|
|
10126
10152
|
]
|
|
10127
10153
|
});
|
|
10128
10154
|
};
|
|
10129
|
-
/**
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
color: Colors.
|
|
10139
|
-
|
|
10155
|
+
/** How one client row reads: its icon, status label and color. */
|
|
10156
|
+
const rowDisplay = (state, results) => {
|
|
10157
|
+
if (state === "waiting") return {
|
|
10158
|
+
icon: "·",
|
|
10159
|
+
label: "Waiting"
|
|
10160
|
+
};
|
|
10161
|
+
if (state === "installing") return {
|
|
10162
|
+
icon: "›",
|
|
10163
|
+
label: "Installing…",
|
|
10164
|
+
color: Colors.accent
|
|
10165
|
+
};
|
|
10166
|
+
const failed = results.filter((r) => r.status === "failed");
|
|
10167
|
+
if (results.length === 0 || failed.length === results.length) return {
|
|
10168
|
+
icon: "✖",
|
|
10169
|
+
label: "Couldn't install",
|
|
10170
|
+
color: "red",
|
|
10171
|
+
detail: failed[0]?.detail
|
|
10172
|
+
};
|
|
10173
|
+
if (failed.length > 0) return {
|
|
10174
|
+
icon: "✖",
|
|
10175
|
+
label: "Partly installed",
|
|
10176
|
+
color: "red",
|
|
10177
|
+
detail: failed[0]?.detail
|
|
10178
|
+
};
|
|
10179
|
+
return {
|
|
10180
|
+
icon: "✔",
|
|
10181
|
+
label: results.some((r) => r.status === "changed") ? "Installed" : "Already installed",
|
|
10182
|
+
color: "green"
|
|
10183
|
+
};
|
|
10184
|
+
};
|
|
10185
|
+
/** One row per client: name, what it gets, and how its install went. */
|
|
10186
|
+
const ClientRows = ({ clients, rows, results, pluginNames }) => {
|
|
10187
|
+
const nameWidth = Math.max(...clients.map((c) => c.name.length)) + 3;
|
|
10188
|
+
const viaWidth = 16;
|
|
10189
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
10190
|
+
flexDirection: "column",
|
|
10191
|
+
children: clients.map((c) => {
|
|
10192
|
+
const state = rows[c.name] ?? "waiting";
|
|
10193
|
+
const row = rowDisplay(state, results.filter((r) => r.name === c.name));
|
|
10194
|
+
const via = pluginNames.includes(c.name) ? "plugin + MCP" : "MCP";
|
|
10195
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
10196
|
+
flexDirection: "column",
|
|
10197
|
+
children: [/* @__PURE__ */ jsxs(Box, { children: [
|
|
10198
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
10199
|
+
state === "installing" ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsx(Text, {
|
|
10200
|
+
color: row.color,
|
|
10201
|
+
dimColor: !row.color,
|
|
10202
|
+
children: row.icon
|
|
10203
|
+
}),
|
|
10204
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
10205
|
+
" ",
|
|
10206
|
+
c.name.padEnd(nameWidth),
|
|
10207
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10208
|
+
dimColor: true,
|
|
10209
|
+
children: via.padEnd(viaWidth)
|
|
10210
|
+
}),
|
|
10211
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10212
|
+
color: row.color,
|
|
10213
|
+
dimColor: !row.color,
|
|
10214
|
+
children: row.label
|
|
10215
|
+
})
|
|
10216
|
+
] })
|
|
10217
|
+
] }), row.detail && /* @__PURE__ */ jsxs(Text, {
|
|
10218
|
+
dimColor: true,
|
|
10219
|
+
children: [" ".repeat(4 + nameWidth + viaWidth), row.detail]
|
|
10220
|
+
})]
|
|
10221
|
+
}, c.name);
|
|
10222
|
+
})
|
|
10140
10223
|
});
|
|
10141
10224
|
};
|
|
10142
10225
|
/**
|
|
@@ -10145,7 +10228,7 @@ const ConnectorContinue = ({ onContinue }) => {
|
|
|
10145
10228
|
* whipped past too fast to read on a normal install, especially when several
|
|
10146
10229
|
* result groups were stacked.
|
|
10147
10230
|
*/
|
|
10148
|
-
const DoneContinue = ({ onContinue }) => {
|
|
10231
|
+
const DoneContinue = ({ onContinue, label = "Continue" }) => {
|
|
10149
10232
|
useInput((_input, key) => {
|
|
10150
10233
|
if (key.return) onContinue();
|
|
10151
10234
|
});
|
|
@@ -10153,33 +10236,52 @@ const DoneContinue = ({ onContinue }) => {
|
|
|
10153
10236
|
marginTop: 1,
|
|
10154
10237
|
children: /* @__PURE__ */ jsxs(Text, {
|
|
10155
10238
|
color: Colors.primary,
|
|
10156
|
-
children: [
|
|
10239
|
+
children: [
|
|
10240
|
+
"Press enter to ",
|
|
10241
|
+
label.toLowerCase(),
|
|
10242
|
+
" ",
|
|
10243
|
+
Icons.triangleRight
|
|
10244
|
+
]
|
|
10157
10245
|
})
|
|
10158
10246
|
});
|
|
10159
10247
|
};
|
|
10160
|
-
const McpScreen = ({ store, installer, mode = "install", samplePrompts = [] }) => {
|
|
10248
|
+
const McpScreen = ({ store, installer, mode = "install", samplePrompts = [], exitLabel = "Continue" }) => {
|
|
10161
10249
|
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
10162
10250
|
useInput(() => void 0);
|
|
10163
10251
|
const isRemove = mode === "remove";
|
|
10164
10252
|
const [phase, setPhase] = useState("detecting");
|
|
10165
10253
|
const [clients, setClients] = useState([]);
|
|
10166
|
-
const [
|
|
10254
|
+
const [rows, setRows] = useState({});
|
|
10167
10255
|
const [mcpResults, setMcpResults] = useState([]);
|
|
10168
10256
|
const [pluginResults, setPluginResults] = useState([]);
|
|
10169
10257
|
const [detectError, setDetectError] = useState(null);
|
|
10170
10258
|
const [flowError, setFlowError] = useState(null);
|
|
10171
10259
|
const [loginCommands, setLoginCommands] = useState([]);
|
|
10172
10260
|
const finishFlow = useRef(null);
|
|
10261
|
+
const stepOne = useRef(null);
|
|
10262
|
+
const [opened, setOpened] = useState([]);
|
|
10263
|
+
const oauthFlow = !store.session.apiKey;
|
|
10264
|
+
const localClients = clients.filter((c) => c.kind === "local");
|
|
10265
|
+
const accountClients = clients.filter((c) => c.kind === "account");
|
|
10266
|
+
const twoSteps = localClients.length > 0 && accountClients.length > 0;
|
|
10267
|
+
const pluginNames = oauthFlow ? localClients.filter((c) => c.supportsPlugin).map((c) => c.name) : [];
|
|
10173
10268
|
useEffect(() => {
|
|
10174
10269
|
(async () => {
|
|
10175
10270
|
try {
|
|
10176
|
-
const detected = await installer.detectClients();
|
|
10271
|
+
const detected = isRemove ? await installer.detectInstalled(store.session.localMcp) : await installer.detectClients();
|
|
10272
|
+
const local = detected.filter((c) => c.kind === "local");
|
|
10177
10273
|
if (detected.length === 0) {
|
|
10178
10274
|
setPhase("none");
|
|
10179
10275
|
setTimeout(() => markDone(store, "no_clients"), 1500);
|
|
10276
|
+
} else if (isRemove) {
|
|
10277
|
+
setClients(detected);
|
|
10278
|
+
setPhase("ask");
|
|
10279
|
+
} else if (local.length === 0) {
|
|
10280
|
+
setClients(detected);
|
|
10281
|
+
setPhase("assistants");
|
|
10180
10282
|
} else {
|
|
10181
10283
|
setClients(detected);
|
|
10182
|
-
|
|
10284
|
+
installAll(local);
|
|
10183
10285
|
}
|
|
10184
10286
|
} catch (err) {
|
|
10185
10287
|
setDetectError(errorText(err));
|
|
@@ -10188,65 +10290,140 @@ const McpScreen = ({ store, installer, mode = "install", samplePrompts = [] }) =
|
|
|
10188
10290
|
}
|
|
10189
10291
|
})();
|
|
10190
10292
|
}, [installer]);
|
|
10191
|
-
const
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10293
|
+
const setRow = (name, state) => setRows((prev) => ({
|
|
10294
|
+
...prev,
|
|
10295
|
+
[name]: state
|
|
10296
|
+
}));
|
|
10297
|
+
const installDirect = async (name, features) => {
|
|
10298
|
+
try {
|
|
10299
|
+
return await installer.install([name], features, store.session.apiKey);
|
|
10300
|
+
} catch (err) {
|
|
10301
|
+
return [{
|
|
10302
|
+
name,
|
|
10303
|
+
status: "failed",
|
|
10304
|
+
detail: errorText(err)
|
|
10305
|
+
}];
|
|
10201
10306
|
}
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10307
|
+
};
|
|
10308
|
+
const installPluginsFor = async (names) => {
|
|
10309
|
+
try {
|
|
10310
|
+
return await installer.installPlugins(names);
|
|
10311
|
+
} catch (err) {
|
|
10312
|
+
return names.map((name) => ({
|
|
10313
|
+
name,
|
|
10314
|
+
status: "failed",
|
|
10315
|
+
detail: errorText(err)
|
|
10316
|
+
}));
|
|
10205
10317
|
}
|
|
10206
|
-
setPhase("feature-select");
|
|
10207
10318
|
};
|
|
10208
|
-
const
|
|
10209
|
-
|
|
10319
|
+
const needsDirect = (client) => !oauthFlow || !client.pluginBundlesMcp;
|
|
10320
|
+
/** Show the results and arm Enter with what ended up installed. */
|
|
10321
|
+
const settle = (local, mcpResult, pluginResult, features) => {
|
|
10322
|
+
const ready = [...new Set([...mcpResult, ...pluginResult].filter(isOk).map((r) => r.name))];
|
|
10323
|
+
const outcome = ready.length > 0 ? "installed" : "failed";
|
|
10324
|
+
const logins = oauthFlow ? pendingLoginCommands(local, mcpResult, pluginResult) : [];
|
|
10325
|
+
setLoginCommands(logins);
|
|
10326
|
+
stepOne.current = {
|
|
10327
|
+
outcome,
|
|
10328
|
+
ready,
|
|
10329
|
+
features: reportFeatures(features),
|
|
10330
|
+
logins
|
|
10331
|
+
};
|
|
10332
|
+
finishFlow.current = doneOnEnter(store, outcome, ready, reportFeatures(features), logins, installBreakdown(local, [...mcpResult, ...pluginResult]));
|
|
10333
|
+
setPhase("done");
|
|
10210
10334
|
};
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
label: "esc",
|
|
10214
|
-
action: "cancel",
|
|
10215
|
-
handler: handleSkip
|
|
10216
|
-
}] : []);
|
|
10217
|
-
const doInstall = async (names, features) => {
|
|
10335
|
+
const installAll = async (local) => {
|
|
10336
|
+
setRows(Object.fromEntries(local.map((c) => [c.name, "waiting"])));
|
|
10218
10337
|
setPhase("working");
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
const
|
|
10222
|
-
const
|
|
10223
|
-
const
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
mcpResult
|
|
10227
|
-
|
|
10228
|
-
|
|
10338
|
+
const features = store.mcpFeatures ?? [...ALL_FEATURE_VALUES];
|
|
10339
|
+
const plugins = oauthFlow ? local.filter((c) => c.supportsPlugin).map((c) => c.name) : [];
|
|
10340
|
+
const mcpResult = [];
|
|
10341
|
+
const pluginResult = [];
|
|
10342
|
+
for (const client of local) {
|
|
10343
|
+
if (!needsDirect(client)) continue;
|
|
10344
|
+
setRow(client.name, "installing");
|
|
10345
|
+
mcpResult.push(...await installDirect(client.name, features));
|
|
10346
|
+
setMcpResults([...mcpResult]);
|
|
10347
|
+
setRow(client.name, plugins.includes(client.name) ? "waiting" : "done");
|
|
10229
10348
|
}
|
|
10230
|
-
if (
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10349
|
+
if (plugins.length > 0) {
|
|
10350
|
+
plugins.forEach((name) => setRow(name, "installing"));
|
|
10351
|
+
pluginResult.push(...await installPluginsFor(plugins));
|
|
10352
|
+
setPluginResults([...pluginResult]);
|
|
10234
10353
|
}
|
|
10354
|
+
setRows(Object.fromEntries(local.map((c) => [c.name, "done"])));
|
|
10355
|
+
settle(local, mcpResult, pluginResult, features);
|
|
10356
|
+
};
|
|
10357
|
+
const retry = async (name) => {
|
|
10358
|
+
const client = localClients.find((c) => c.name === name);
|
|
10359
|
+
if (!client) return;
|
|
10360
|
+
const features = store.mcpFeatures ?? [...ALL_FEATURE_VALUES];
|
|
10361
|
+
const others = (results) => results.filter((r) => r.name !== name);
|
|
10362
|
+
setRow(name, "installing");
|
|
10363
|
+
const mcpResult = needsDirect(client) ? [...others(mcpResults), ...await installDirect(name, features)] : mcpResults;
|
|
10364
|
+
const pluginResult = pluginNames.includes(name) ? [...others(pluginResults), ...await installPluginsFor([name])] : pluginResults;
|
|
10235
10365
|
setMcpResults(mcpResult);
|
|
10236
10366
|
setPluginResults(pluginResult);
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10367
|
+
setRow(name, "done");
|
|
10368
|
+
analytics.wizardCapture("mcp install retried", {
|
|
10369
|
+
client: name,
|
|
10370
|
+
success: [...mcpResult, ...pluginResult].some((r) => r.name === name && isOk(r))
|
|
10371
|
+
});
|
|
10372
|
+
settle(localClients, mcpResult, pluginResult, features);
|
|
10373
|
+
};
|
|
10374
|
+
/** Leave Step 1: on to the AI assistants, or out when there are none. */
|
|
10375
|
+
const leaveStepOne = () => {
|
|
10376
|
+
if (accountClients.length > 0) setPhase("assistants");
|
|
10377
|
+
else finishFlow.current?.();
|
|
10378
|
+
};
|
|
10379
|
+
const openedNames = useRef(/* @__PURE__ */ new Set());
|
|
10380
|
+
const openAssistant = async (name) => {
|
|
10381
|
+
if (openedNames.current.has(name)) return;
|
|
10382
|
+
openedNames.current.add(name);
|
|
10383
|
+
let result;
|
|
10384
|
+
try {
|
|
10385
|
+
result = await installer.install([name]);
|
|
10386
|
+
} catch (err) {
|
|
10387
|
+
result = [{
|
|
10388
|
+
name,
|
|
10389
|
+
status: "failed",
|
|
10390
|
+
detail: errorText(err)
|
|
10391
|
+
}];
|
|
10392
|
+
}
|
|
10393
|
+
analytics.wizardCapture("mcp assistant opened", {
|
|
10394
|
+
client: name,
|
|
10395
|
+
opened: result.some(isOk)
|
|
10396
|
+
});
|
|
10397
|
+
setOpened((prev) => [...prev, ...result]);
|
|
10398
|
+
};
|
|
10399
|
+
/** Complete the step with Step 1's installs plus the assistants opened. */
|
|
10400
|
+
const leaveAssistants = () => {
|
|
10401
|
+
const openedNames = opened.filter(isOk).map((r) => r.name);
|
|
10402
|
+
const one = stepOne.current;
|
|
10403
|
+
if (one) {
|
|
10404
|
+
markDone(store, one.outcome === "installed" || openedNames.length === 0 ? one.outcome : "installed", [...one.ready, ...openedNames], one.features, one.logins);
|
|
10405
|
+
return;
|
|
10406
|
+
}
|
|
10407
|
+
store.reportMcpOutcome("no_clients", []);
|
|
10408
|
+
markDone(store, openedNames.length > 0 ? "installed" : "skipped", openedNames);
|
|
10244
10409
|
};
|
|
10245
|
-
|
|
10410
|
+
useKeyBindings("mcp-assistants-skip", phase === "assistants" ? [{
|
|
10411
|
+
match: "escape",
|
|
10412
|
+
label: "esc",
|
|
10413
|
+
action: "skip",
|
|
10414
|
+
handler: leaveAssistants
|
|
10415
|
+
}] : []);
|
|
10416
|
+
useKeyBindings("mcp-remove-cancel", phase === "ask" ? [{
|
|
10417
|
+
match: "escape",
|
|
10418
|
+
label: "esc",
|
|
10419
|
+
action: "cancel",
|
|
10420
|
+
handler: () => markDone(store, "skipped")
|
|
10421
|
+
}] : []);
|
|
10422
|
+
const doRemove = async (names) => {
|
|
10246
10423
|
setPhase("working");
|
|
10247
10424
|
let result = [];
|
|
10248
10425
|
try {
|
|
10249
|
-
result = await installer.remove(store.session.localMcp);
|
|
10426
|
+
result = await installer.remove(names, store.session.localMcp);
|
|
10250
10427
|
} catch (err) {
|
|
10251
10428
|
setFlowError(errorText(err));
|
|
10252
10429
|
}
|
|
@@ -10255,218 +10432,144 @@ const McpScreen = ({ store, installer, mode = "install", samplePrompts = [] }) =
|
|
|
10255
10432
|
finishFlow.current = doneOnEnter(store, removed.length > 0 ? "installed" : "failed", removed.map((r) => r.name));
|
|
10256
10433
|
setPhase("done");
|
|
10257
10434
|
};
|
|
10258
|
-
const
|
|
10259
|
-
const
|
|
10260
|
-
const
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
const
|
|
10266
|
-
const
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10435
|
+
const allResults = [...mcpResults, ...pluginResults];
|
|
10436
|
+
const readyCount = localClients.filter((c) => allResults.some((r) => r.name === c.name && isOk(r))).length;
|
|
10437
|
+
const installSucceeded = !isRemove && readyCount > 0;
|
|
10438
|
+
const failedNames = localClients.filter((c) => rows[c.name] === "done" && allResults.some((r) => r.name === c.name && r.status === "failed")).map((c) => c.name);
|
|
10439
|
+
const retrying = Object.values(rows).includes("installing");
|
|
10440
|
+
const heading = isRemove ? "Remove the PostHog MCP" : phase === "assistants" ? "Connect PostHog to your AI assistants" : phase !== "done" ? "Adding the PostHog MCP to your coding agents" : readyCount === 0 ? "Couldn't add the PostHog MCP to your coding agents" : readyCount === localClients.length ? `The PostHog MCP is ready in ${plural(readyCount, "coding agent")}` : `The PostHog MCP is ready in ${readyCount} of ${plural(localClients.length, "coding agent")}`;
|
|
10441
|
+
const stepLabel = isRemove ? null : phase === "assistants" ? twoSteps ? "Step 2 of 2 · AI assistants" : "AI assistants" : twoSteps ? "Step 1 of 2 · Coding agents" : null;
|
|
10442
|
+
const stepOneExit = accountClients.length > 0 ? "Continue" : exitLabel;
|
|
10443
|
+
const assistantOptions = [...accountClients.filter((c) => !opened.some((r) => r.name === c.name)).map((c) => ({
|
|
10444
|
+
label: c.name,
|
|
10445
|
+
value: c.name,
|
|
10446
|
+
hint: "opens in your browser",
|
|
10447
|
+
prominent: true
|
|
10448
|
+
})), {
|
|
10449
|
+
label: exitLabel,
|
|
10450
|
+
value: CONTINUE,
|
|
10451
|
+
spaced: true
|
|
10452
|
+
}];
|
|
10453
|
+
const removedNow = namesWithStatus(mcpResults, "changed");
|
|
10454
|
+
const alreadyRemoved = namesWithStatus(mcpResults, "unchanged");
|
|
10455
|
+
const removeFailures = mcpResults.filter((r) => r.status === "failed").map((r) => r.detail ? `${r.name} — ${r.detail}` : r.name);
|
|
10273
10456
|
return /* @__PURE__ */ jsxs(Box, {
|
|
10274
10457
|
flexDirection: "column",
|
|
10275
10458
|
flexGrow: 1,
|
|
10276
|
-
children: [
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
/* @__PURE__ */ jsxs(Text, {
|
|
10292
|
-
color: "red",
|
|
10293
|
-
bold: true,
|
|
10294
|
-
children: ["✖", " Couldn't check which editors are installed"]
|
|
10295
|
-
}),
|
|
10296
|
-
/* @__PURE__ */ jsxs(Text, {
|
|
10297
|
-
dimColor: true,
|
|
10298
|
-
children: [" ", detectError]
|
|
10299
|
-
}),
|
|
10300
|
-
/* @__PURE__ */ jsxs(Text, {
|
|
10301
|
-
dimColor: true,
|
|
10302
|
-
children: [" ", "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."]
|
|
10303
|
-
}),
|
|
10304
|
-
/* @__PURE__ */ jsx(DoneContinue, { onContinue: () => finishFlow.current?.() })
|
|
10305
|
-
]
|
|
10306
|
-
}) : /* @__PURE__ */ jsxs(Text, {
|
|
10307
|
-
dimColor: true,
|
|
10308
|
-
children: [
|
|
10309
|
-
"No ",
|
|
10310
|
-
isRemove ? "installed" : "supported",
|
|
10311
|
-
" MCP clients detected. Skipping..."
|
|
10312
|
-
]
|
|
10313
|
-
})),
|
|
10314
|
-
phase === "ask" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Text, {
|
|
10315
|
-
dimColor: true,
|
|
10316
|
-
children: ["Detected: ", clients.map((c) => c.name).join(", ")]
|
|
10317
|
-
}), /* @__PURE__ */ jsx(Box, {
|
|
10318
|
-
marginTop: 1,
|
|
10319
|
-
children: /* @__PURE__ */ jsx(ConfirmationInput, {
|
|
10320
|
-
message: `Remove the PostHog MCP server${clients.some((c) => c.supportsPlugin) ? " and plugin" : ""}?`,
|
|
10321
|
-
confirmLabel: "Remove",
|
|
10322
|
-
cancelLabel: "No thanks",
|
|
10323
|
-
onConfirm: () => void doRemove(),
|
|
10324
|
-
onCancel: handleSkip
|
|
10325
|
-
})
|
|
10326
|
-
})] }),
|
|
10327
|
-
phase === "pick" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Box, {
|
|
10328
|
-
flexDirection: "column",
|
|
10329
|
-
marginBottom: 1,
|
|
10330
|
-
children: installValueLines.map((line) => /* @__PURE__ */ jsx(Text, {
|
|
10459
|
+
children: [
|
|
10460
|
+
stepLabel && /* @__PURE__ */ jsx(Text, {
|
|
10461
|
+
dimColor: true,
|
|
10462
|
+
children: stepLabel
|
|
10463
|
+
}),
|
|
10464
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10465
|
+
bold: true,
|
|
10466
|
+
color: Colors.accent,
|
|
10467
|
+
children: heading
|
|
10468
|
+
}),
|
|
10469
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
10470
|
+
marginTop: 1,
|
|
10471
|
+
flexDirection: "column",
|
|
10472
|
+
children: [
|
|
10473
|
+
phase === "detecting" && /* @__PURE__ */ jsx(Text, {
|
|
10331
10474
|
dimColor: true,
|
|
10332
|
-
children:
|
|
10333
|
-
},
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10475
|
+
children: isRemove ? "Looking for coding agents with the PostHog MCP..." : "Looking for coding agents..."
|
|
10476
|
+
}),
|
|
10477
|
+
phase === "none" && (detectError ? /* @__PURE__ */ jsxs(Box, {
|
|
10478
|
+
flexDirection: "column",
|
|
10479
|
+
children: [
|
|
10480
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
10481
|
+
color: "red",
|
|
10482
|
+
bold: true,
|
|
10483
|
+
children: ["✖", " Couldn't check which editors are installed"]
|
|
10484
|
+
}),
|
|
10485
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
10486
|
+
dimColor: true,
|
|
10487
|
+
children: [" ", detectError]
|
|
10488
|
+
}),
|
|
10489
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
10490
|
+
dimColor: true,
|
|
10491
|
+
children: [" ", "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."]
|
|
10492
|
+
}),
|
|
10493
|
+
/* @__PURE__ */ jsx(DoneContinue, { onContinue: () => finishFlow.current?.() })
|
|
10494
|
+
]
|
|
10495
|
+
}) : /* @__PURE__ */ jsx(Text, {
|
|
10496
|
+
dimColor: true,
|
|
10497
|
+
children: isRemove ? "No coding agent has the PostHog MCP installed. Skipping..." : "No supported coding agents detected. Skipping..."
|
|
10341
10498
|
})),
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10499
|
+
phase === "ask" && /* @__PURE__ */ jsx(PickerMenu, {
|
|
10500
|
+
message: "Select the coding agents to remove the PostHog MCP from",
|
|
10501
|
+
mode: "multi",
|
|
10502
|
+
options: clients.map((c) => ({
|
|
10503
|
+
label: c.name,
|
|
10504
|
+
value: c.name,
|
|
10505
|
+
hint: c.supportsPlugin ? "plugin + MCP" : "MCP"
|
|
10506
|
+
})),
|
|
10507
|
+
onSelect: (selected) => {
|
|
10508
|
+
const names = Array.isArray(selected) ? selected : [selected];
|
|
10509
|
+
if (names.length === 0) markDone(store, "skipped");
|
|
10510
|
+
else doRemove(names);
|
|
10348
10511
|
}
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
groups: AVAILABLE_FEATURES,
|
|
10355
|
-
initialSelected: [],
|
|
10356
|
-
onSelect: (features) => {
|
|
10357
|
-
doInstall(selectedClientNames, features);
|
|
10358
|
-
}
|
|
10359
|
-
}),
|
|
10360
|
-
phase === "connector" && /* @__PURE__ */ jsxs(Box, {
|
|
10361
|
-
flexDirection: "column",
|
|
10362
|
-
children: [/* @__PURE__ */ jsx(Box, {
|
|
10363
|
-
marginBottom: 1,
|
|
10364
|
-
children: /* @__PURE__ */ jsx(Text, {
|
|
10512
|
+
}),
|
|
10513
|
+
phase === "working" && isRemove && /* @__PURE__ */ jsxs(Box, {
|
|
10514
|
+
flexDirection: "row",
|
|
10515
|
+
gap: 1,
|
|
10516
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
10365
10517
|
dimColor: true,
|
|
10366
|
-
children: "
|
|
10367
|
-
})
|
|
10368
|
-
}),
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
gap: 1,
|
|
10373
|
-
children: [/* @__PURE__ */ jsxs(Text, {
|
|
10374
|
-
dimColor: true,
|
|
10375
|
-
children: [isRemove ? "Removing" : "Installing", " MCP server..."]
|
|
10376
|
-
}), /* @__PURE__ */ jsx(Spinner, {})]
|
|
10377
|
-
}),
|
|
10378
|
-
phase === "done" && /* @__PURE__ */ jsxs(Box, {
|
|
10379
|
-
flexDirection: "column",
|
|
10380
|
-
children: [hasAnyResult ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10381
|
-
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10382
|
-
title: "Plugin installed for:",
|
|
10383
|
-
items: pluginInstalled,
|
|
10384
|
-
color: "green",
|
|
10385
|
-
icon: "✔"
|
|
10386
|
-
}),
|
|
10387
|
-
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10388
|
-
title: "Plugin was already installed for:",
|
|
10389
|
-
items: pluginAlreadyInstalled,
|
|
10390
|
-
color: "green",
|
|
10391
|
-
icon: "✔",
|
|
10392
|
-
note: "It was already set up, so nothing changed. You are good to go."
|
|
10393
|
-
}),
|
|
10394
|
-
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10395
|
-
title: `MCP server ${isRemove ? "removed from" : "installed for"}:`,
|
|
10396
|
-
items: installedNow,
|
|
10397
|
-
color: "green",
|
|
10398
|
-
icon: "✔"
|
|
10399
|
-
}),
|
|
10400
|
-
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10401
|
-
title: isRemove ? "No PostHog entry left to remove for:" : "MCP server was already installed for:",
|
|
10402
|
-
items: alreadyInstalled,
|
|
10403
|
-
color: "green",
|
|
10404
|
-
icon: "✔",
|
|
10405
|
-
note: isRemove ? "It was already gone, so nothing was changed." : "Left as-is. To change which PostHog areas it can reach, run `wizard mcp remove` first, then `wizard mcp add`."
|
|
10406
|
-
}),
|
|
10407
|
-
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10408
|
-
title: `Couldn't ${isRemove ? "remove from" : "install for"}:`,
|
|
10409
|
-
items: failures,
|
|
10410
|
-
color: "red",
|
|
10411
|
-
icon: "✖",
|
|
10412
|
-
note: "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."
|
|
10413
|
-
}),
|
|
10414
|
-
loginCommands.length > 0 && /* @__PURE__ */ jsxs(Box, {
|
|
10415
|
-
flexDirection: "column",
|
|
10518
|
+
children: "Removing MCP server..."
|
|
10519
|
+
}), /* @__PURE__ */ jsx(Spinner, {})]
|
|
10520
|
+
}),
|
|
10521
|
+
phase === "working" && !isRemove && /* @__PURE__ */ jsxs(Box, {
|
|
10522
|
+
flexDirection: "column",
|
|
10523
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
10416
10524
|
marginBottom: 1,
|
|
10417
|
-
children:
|
|
10418
|
-
marginBottom: 1,
|
|
10419
|
-
children: /* @__PURE__ */ jsx(Text, { children: "Authenticate to finish (opens your browser):" })
|
|
10420
|
-
}), loginCommands.map((command) => /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
10525
|
+
children: /* @__PURE__ */ jsxs(Text, {
|
|
10421
10526
|
dimColor: true,
|
|
10422
|
-
children:
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
})
|
|
10428
|
-
}),
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10527
|
+
children: [
|
|
10528
|
+
"Found ",
|
|
10529
|
+
plural(localClients.length, "coding agent"),
|
|
10530
|
+
". Setting each one up on this computer."
|
|
10531
|
+
]
|
|
10532
|
+
})
|
|
10533
|
+
}), /* @__PURE__ */ jsx(ClientRows, {
|
|
10534
|
+
clients: localClients,
|
|
10535
|
+
rows,
|
|
10536
|
+
results: allResults,
|
|
10537
|
+
pluginNames
|
|
10538
|
+
})]
|
|
10539
|
+
}),
|
|
10540
|
+
phase === "done" && !isRemove && /* @__PURE__ */ jsxs(Box, {
|
|
10541
|
+
flexDirection: "column",
|
|
10542
|
+
children: [
|
|
10543
|
+
/* @__PURE__ */ jsx(Box, {
|
|
10544
|
+
marginBottom: 1,
|
|
10545
|
+
children: /* @__PURE__ */ jsx(ClientRows, {
|
|
10546
|
+
clients: localClients,
|
|
10547
|
+
rows,
|
|
10548
|
+
results: allResults,
|
|
10549
|
+
pluginNames
|
|
10550
|
+
})
|
|
10551
|
+
}),
|
|
10552
|
+
loginCommands.length > 0 && /* @__PURE__ */ jsxs(Box, {
|
|
10553
|
+
flexDirection: "column",
|
|
10554
|
+
marginBottom: 1,
|
|
10555
|
+
children: [/* @__PURE__ */ jsx(Text, { children: "Authenticate to finish (opens your browser):" }), loginCommands.map((command) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
10446
10556
|
" ",
|
|
10447
|
-
"Opened ",
|
|
10448
10557
|
/* @__PURE__ */ jsx(Text, {
|
|
10449
|
-
|
|
10450
|
-
children:
|
|
10558
|
+
dimColor: true,
|
|
10559
|
+
children: "$ "
|
|
10560
|
+
}),
|
|
10561
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10562
|
+
bold: true,
|
|
10563
|
+
color: Colors.primary,
|
|
10564
|
+
children: command
|
|
10451
10565
|
})
|
|
10452
|
-
] })
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
children: [" ", note.instruction]
|
|
10456
|
-
}),
|
|
10457
|
-
/* @__PURE__ */ jsxs(Text, {
|
|
10458
|
-
dimColor: true,
|
|
10459
|
-
children: [" ", "(If it didn't open, paste the URL above.)"]
|
|
10460
|
-
})
|
|
10461
|
-
]
|
|
10462
|
-
}, note.name)),
|
|
10463
|
-
installSucceeded && /* @__PURE__ */ jsxs(Box, {
|
|
10464
|
-
flexDirection: "column",
|
|
10465
|
-
marginTop: finishNotes.length > 0 ? 1 : 0,
|
|
10466
|
-
children: [samplePrompts.length > 0 && /* @__PURE__ */ jsxs(Box, {
|
|
10566
|
+
] }, command))]
|
|
10567
|
+
}),
|
|
10568
|
+
installSucceeded && samplePrompts.length > 0 && /* @__PURE__ */ jsxs(Box, {
|
|
10467
10569
|
flexDirection: "column",
|
|
10468
10570
|
marginBottom: 1,
|
|
10469
|
-
children: [/* @__PURE__ */ jsx(Text, { children: "Open
|
|
10571
|
+
children: [/* @__PURE__ */ jsx(Text, { children: "Open one and try a prompt like:" }), samplePrompts.map((prompt) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
10572
|
+
" ",
|
|
10470
10573
|
/* @__PURE__ */ jsx(Text, {
|
|
10471
10574
|
color: Colors.primary,
|
|
10472
10575
|
children: Icons.triangleSmallRight
|
|
@@ -10477,7 +10580,12 @@ const McpScreen = ({ store, installer, mode = "install", samplePrompts = [] }) =
|
|
|
10477
10580
|
children: prompt
|
|
10478
10581
|
})
|
|
10479
10582
|
] }, prompt))]
|
|
10480
|
-
}),
|
|
10583
|
+
}),
|
|
10584
|
+
readyCount < localClients.length && /* @__PURE__ */ jsx(Text, {
|
|
10585
|
+
dimColor: true,
|
|
10586
|
+
children: "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."
|
|
10587
|
+
}),
|
|
10588
|
+
installSucceeded && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Text, {
|
|
10481
10589
|
dimColor: true,
|
|
10482
10590
|
children: [
|
|
10483
10591
|
"Take the guided tour anytime with",
|
|
@@ -10488,37 +10596,164 @@ const McpScreen = ({ store, installer, mode = "install", samplePrompts = [] }) =
|
|
|
10488
10596
|
}),
|
|
10489
10597
|
"."
|
|
10490
10598
|
]
|
|
10491
|
-
})
|
|
10492
|
-
|
|
10493
|
-
] }) : flowError ? /* @__PURE__ */ jsxs(Box, {
|
|
10494
|
-
flexDirection: "column",
|
|
10495
|
-
children: [
|
|
10496
|
-
/* @__PURE__ */ jsxs(Text, {
|
|
10497
|
-
color: "red",
|
|
10498
|
-
bold: true,
|
|
10599
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
10600
|
+
dimColor: true,
|
|
10499
10601
|
children: [
|
|
10500
|
-
"
|
|
10602
|
+
"To remove it, exit and run",
|
|
10501
10603
|
" ",
|
|
10502
|
-
|
|
10503
|
-
|
|
10604
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10605
|
+
bold: true,
|
|
10606
|
+
children: "npx @posthog/wizard mcp remove"
|
|
10607
|
+
}),
|
|
10608
|
+
"."
|
|
10504
10609
|
]
|
|
10610
|
+
})] }),
|
|
10611
|
+
retrying ? null : failedNames.length > 0 ? /* @__PURE__ */ jsx(Box, {
|
|
10612
|
+
marginTop: 1,
|
|
10613
|
+
children: /* @__PURE__ */ jsx(PickerMenu, {
|
|
10614
|
+
options: [{
|
|
10615
|
+
label: stepOneExit,
|
|
10616
|
+
value: CONTINUE
|
|
10617
|
+
}, ...failedNames.map((name) => ({
|
|
10618
|
+
label: `Retry ${name}`,
|
|
10619
|
+
value: name
|
|
10620
|
+
}))],
|
|
10621
|
+
onSelect: (value) => {
|
|
10622
|
+
const picked = Array.isArray(value) ? value[0] : value;
|
|
10623
|
+
if (picked === CONTINUE) leaveStepOne();
|
|
10624
|
+
else if (picked) retry(picked);
|
|
10625
|
+
}
|
|
10626
|
+
}, failedNames.join(","))
|
|
10627
|
+
}) : /* @__PURE__ */ jsx(DoneContinue, {
|
|
10628
|
+
onContinue: leaveStepOne,
|
|
10629
|
+
label: stepOneExit
|
|
10630
|
+
})
|
|
10631
|
+
]
|
|
10632
|
+
}),
|
|
10633
|
+
phase === "assistants" && /* @__PURE__ */ jsxs(Box, {
|
|
10634
|
+
flexDirection: "column",
|
|
10635
|
+
children: [
|
|
10636
|
+
/* @__PURE__ */ jsx(Box, {
|
|
10637
|
+
flexDirection: "column",
|
|
10638
|
+
marginBottom: 1,
|
|
10639
|
+
children: /* @__PURE__ */ jsx(Text, { children: "Connect PostHog to your chat apps and AI assistants. Sign in to your account and connect." })
|
|
10505
10640
|
}),
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10641
|
+
opened.map((r) => {
|
|
10642
|
+
const client = accountClients.find((c) => c.name === r.name);
|
|
10643
|
+
return isOk(r) ? /* @__PURE__ */ jsxs(Box, {
|
|
10644
|
+
flexDirection: "column",
|
|
10645
|
+
marginBottom: 1,
|
|
10646
|
+
children: [/* @__PURE__ */ jsxs(Text, { children: [
|
|
10647
|
+
" ",
|
|
10648
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10649
|
+
color: "green",
|
|
10650
|
+
children: "✔"
|
|
10651
|
+
}),
|
|
10652
|
+
" ",
|
|
10653
|
+
r.name,
|
|
10654
|
+
" ",
|
|
10655
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10656
|
+
color: "green",
|
|
10657
|
+
children: "Opened in your browser"
|
|
10658
|
+
})
|
|
10659
|
+
] }), client?.finish && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Text, {
|
|
10660
|
+
dimColor: true,
|
|
10661
|
+
children: [" ", client.finish.instruction]
|
|
10662
|
+
}), /* @__PURE__ */ jsxs(Text, { children: [
|
|
10663
|
+
" ",
|
|
10664
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10665
|
+
dimColor: true,
|
|
10666
|
+
children: "Didn't open? "
|
|
10667
|
+
}),
|
|
10668
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10669
|
+
color: "cyan",
|
|
10670
|
+
children: client.finish.url
|
|
10671
|
+
})
|
|
10672
|
+
] })] })]
|
|
10673
|
+
}, r.name) : /* @__PURE__ */ jsxs(Box, {
|
|
10674
|
+
flexDirection: "column",
|
|
10675
|
+
marginBottom: 1,
|
|
10676
|
+
children: [/* @__PURE__ */ jsxs(Text, { children: [
|
|
10677
|
+
" ",
|
|
10678
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10679
|
+
color: "red",
|
|
10680
|
+
children: "✖"
|
|
10681
|
+
}),
|
|
10682
|
+
" ",
|
|
10683
|
+
r.name,
|
|
10684
|
+
" ",
|
|
10685
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10686
|
+
color: "red",
|
|
10687
|
+
children: "Couldn't open"
|
|
10688
|
+
})
|
|
10689
|
+
] }), r.detail && /* @__PURE__ */ jsxs(Text, {
|
|
10690
|
+
dimColor: true,
|
|
10691
|
+
children: [" ", r.detail]
|
|
10692
|
+
})]
|
|
10693
|
+
}, r.name);
|
|
10509
10694
|
}),
|
|
10510
|
-
/* @__PURE__ */
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10695
|
+
/* @__PURE__ */ jsx(PickerMenu, {
|
|
10696
|
+
options: assistantOptions,
|
|
10697
|
+
onSelect: (value) => {
|
|
10698
|
+
const picked = Array.isArray(value) ? value[0] : value;
|
|
10699
|
+
if (picked === CONTINUE) leaveAssistants();
|
|
10700
|
+
else if (picked) openAssistant(picked);
|
|
10701
|
+
}
|
|
10702
|
+
}, opened.map((r) => r.name).join(","))
|
|
10514
10703
|
]
|
|
10515
|
-
})
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10704
|
+
}),
|
|
10705
|
+
phase === "done" && isRemove && /* @__PURE__ */ jsxs(Box, {
|
|
10706
|
+
flexDirection: "column",
|
|
10707
|
+
children: [removedNow.length + alreadyRemoved.length + removeFailures.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10708
|
+
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10709
|
+
title: "MCP server removed from:",
|
|
10710
|
+
items: removedNow,
|
|
10711
|
+
color: "green",
|
|
10712
|
+
icon: "✔"
|
|
10713
|
+
}),
|
|
10714
|
+
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10715
|
+
title: "No PostHog entry left to remove for:",
|
|
10716
|
+
items: alreadyRemoved,
|
|
10717
|
+
color: "green",
|
|
10718
|
+
icon: "✔",
|
|
10719
|
+
note: "It was already gone, so nothing was changed."
|
|
10720
|
+
}),
|
|
10721
|
+
/* @__PURE__ */ jsx(ResultGroup, {
|
|
10722
|
+
title: "Couldn't remove from:",
|
|
10723
|
+
items: removeFailures,
|
|
10724
|
+
color: "red",
|
|
10725
|
+
icon: "✖",
|
|
10726
|
+
note: "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."
|
|
10727
|
+
})
|
|
10728
|
+
] }) : flowError ? /* @__PURE__ */ jsxs(Box, {
|
|
10729
|
+
flexDirection: "column",
|
|
10730
|
+
children: [
|
|
10731
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
10732
|
+
color: "red",
|
|
10733
|
+
bold: true,
|
|
10734
|
+
children: ["✖", " Removal failed"]
|
|
10735
|
+
}),
|
|
10736
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
10737
|
+
dimColor: true,
|
|
10738
|
+
children: [" ", flowError]
|
|
10739
|
+
}),
|
|
10740
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
10741
|
+
dimColor: true,
|
|
10742
|
+
children: [" ", "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."]
|
|
10743
|
+
})
|
|
10744
|
+
]
|
|
10745
|
+
}) : /* @__PURE__ */ jsxs(Text, {
|
|
10746
|
+
dimColor: true,
|
|
10747
|
+
children: [
|
|
10748
|
+
"Nothing to remove ",
|
|
10749
|
+
"—",
|
|
10750
|
+
" the PostHog MCP server wasn't configured for any editor."
|
|
10751
|
+
]
|
|
10752
|
+
}), /* @__PURE__ */ jsx(DoneContinue, { onContinue: () => finishFlow.current?.() })]
|
|
10753
|
+
})
|
|
10754
|
+
]
|
|
10755
|
+
})
|
|
10756
|
+
]
|
|
10522
10757
|
});
|
|
10523
10758
|
};
|
|
10524
10759
|
//#endregion
|
|
@@ -13741,7 +13976,8 @@ const shared = { screens: {
|
|
|
13741
13976
|
["mcp-add"]: (store, services) => /* @__PURE__ */ jsx(McpScreen, {
|
|
13742
13977
|
store,
|
|
13743
13978
|
installer: services.mcpInstaller,
|
|
13744
|
-
samplePrompts: getRolePrompts(store.session.roleAtOrganization, store.session.integration).slice(0, 3).map((p) => p.prompt)
|
|
13979
|
+
samplePrompts: getRolePrompts(store.session.roleAtOrganization, store.session.integration).slice(0, 3).map((p) => p.prompt),
|
|
13980
|
+
exitLabel: "Exit"
|
|
13745
13981
|
}),
|
|
13746
13982
|
["mcp-remove"]: (store, services) => /* @__PURE__ */ jsx(McpScreen, {
|
|
13747
13983
|
store,
|
|
@@ -16295,14 +16531,20 @@ var WizardStore = class {
|
|
|
16295
16531
|
this.sessions.addDiscoveredFeature(feature);
|
|
16296
16532
|
}
|
|
16297
16533
|
/** Capture the MCP step's outcome once; the screen reports it as the results show, before Enter. */
|
|
16298
|
-
reportMcpOutcome(outcome, installedClients = [], featuresSelected) {
|
|
16534
|
+
reportMcpOutcome(outcome, installedClients = [], featuresSelected, breakdown) {
|
|
16299
16535
|
if (this._mcpOutcomeReported) return;
|
|
16300
16536
|
this._mcpOutcomeReported = true;
|
|
16301
16537
|
const featuresPayload = outcome === "installed" && featuresSelected !== void 0 ? { mcp_features_selected: featuresSelected } : {};
|
|
16538
|
+
const breakdownPayload = breakdown ? {
|
|
16539
|
+
mcp_newly_installed_clients: breakdown.newlyInstalled,
|
|
16540
|
+
mcp_already_installed_clients: breakdown.alreadyInstalled,
|
|
16541
|
+
mcp_failed_clients: breakdown.failed
|
|
16542
|
+
} : {};
|
|
16302
16543
|
analytics.wizardCapture("mcp complete", {
|
|
16303
16544
|
mcp_outcome: outcome,
|
|
16304
16545
|
mcp_installed_clients: installedClients,
|
|
16305
16546
|
...featuresPayload,
|
|
16547
|
+
...breakdownPayload,
|
|
16306
16548
|
...sessionProperties(this.session)
|
|
16307
16549
|
});
|
|
16308
16550
|
}
|
|
@@ -16600,4 +16842,4 @@ function releaseTerminal() {
|
|
|
16600
16842
|
//#endregion
|
|
16601
16843
|
export { AUDIT_AREA_SLIDES as A, totalTokenCount as B, assembleProfile as C, getTuiProgram as D, IssueTable as E, ContentSequencer as F, ModalOverlay as G, LogViewer as H, HNViewer as I, ProgressList as J, ConfirmationInput as K, TabContainer as L, IntroScreenLayout as M, PRIVACY_PANEL_LABEL as N, displayProgress as O, PrivacyPanel as P, getContentBlocks$6 as Q, ScreenContainer as R, McpSuggestedPromptsScreen as S, McpScreen as T, LinkText as U, EventPlanViewer as V, extractUrls as W, SplitView as X, LoadingBox as Y, CardLayout as Z, getTuiTool as _, SlackConnectScreen as a, extractOAuthCode as b, LearnCard as c, MINT_FAILURE_BODY as d, MINT_FAILURE_CONTACT as f, listFlowOwners as g, flowOwner as h, OutroScreen as i, AuditChecksViewer as j, useDismissOnAnyKey as k, AiOptInRequiredScreen as l, isRunFailure as m, releaseTerminal as n, TipsCard as o, MINT_FAILURE_MESSAGE as p, GroupedPickerMenu as q, WizardStore as r, VisualizerTab as s, enterDarkTerminal as t, ServiceHealthList as u, seededProfile as v, TAILORED_ROLES as w, abortOnScreens as x, getOrAskForProjectData as y, ViewportTooSmall as z };
|
|
16602
16844
|
|
|
16603
|
-
//# sourceMappingURL=terminal-
|
|
16845
|
+
//# sourceMappingURL=terminal-BLGYQpSO.js.map
|