@posthog/wizard 2.33.0 → 2.35.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.
Files changed (83) hide show
  1. package/dist/{add-mcp-server-to-clients-Dhq75Hda.js → add-mcp-server-to-clients-to65gLPl.js} +5 -5
  2. package/dist/{add-mcp-server-to-clients-Dhq75Hda.js.map → add-mcp-server-to-clients-to65gLPl.js.map} +1 -1
  3. package/dist/{agent-interface-DCeQ5Oiw.js → agent-interface-CXL9i_vX.js} +362 -48
  4. package/dist/agent-interface-CXL9i_vX.js.map +1 -0
  5. package/dist/{agent-runner-BRajaO84.js → agent-runner-CCTTG_Rn.js} +33 -14
  6. package/dist/agent-runner-CCTTG_Rn.js.map +1 -0
  7. package/dist/{analytics-CU4o3eF8.js → analytics-DP_j88IC.js} +2 -2
  8. package/dist/{analytics-CU4o3eF8.js.map → analytics-DP_j88IC.js.map} +1 -1
  9. package/dist/{api-BBRfHEZ-.js → api-Bdxv7mWH.js} +3 -3
  10. package/dist/{api-BBRfHEZ-.js.map → api-Bdxv7mWH.js.map} +1 -1
  11. package/dist/bin.js +78 -61
  12. package/dist/bin.js.map +1 -1
  13. package/dist/check-screens.tsx +25 -0
  14. package/dist/{ci-install-D-otkGW6.js → ci-install-BO-KLPLD.js} +5 -5
  15. package/dist/ci-install-BO-KLPLD.js.map +1 -0
  16. package/dist/{debug-BewTLNNr.js → debug-Clw8ctxh.js} +1 -1
  17. package/dist/{debug-BGMe1wP6.js → debug-DXWxKT5f.js} +3 -4
  18. package/dist/debug-DXWxKT5f.js.map +1 -0
  19. package/dist/{defaults-DII5CAog.js → defaults-4rSse24X.js} +1 -1
  20. package/dist/{defaults-DII5CAog.js.map → defaults-4rSse24X.js.map} +1 -1
  21. package/dist/{env-api-key-MlzJYAvt.js → env-api-key-B3gE9Un0.js} +1 -1
  22. package/dist/{env-api-key-MlzJYAvt.js.map → env-api-key-B3gE9Un0.js.map} +1 -1
  23. package/dist/{environment-G41UFzou.js → environment-C4HyCWTC.js} +3 -3
  24. package/dist/{environment-G41UFzou.js.map → environment-C4HyCWTC.js.map} +1 -1
  25. package/dist/{file-utils-D9InAvZd.js → file-utils-CW8XbbZP.js} +2 -2
  26. package/dist/{file-utils-D9InAvZd.js.map → file-utils-CW8XbbZP.js.map} +1 -1
  27. package/dist/{headless-ui-xjHVVUqe.js → headless-ui-BoZYhNpE.js} +2 -2
  28. package/dist/{headless-ui-xjHVVUqe.js.map → headless-ui-BoZYhNpE.js.map} +1 -1
  29. package/dist/host-resolution-Dw0fS8h5.js +115 -0
  30. package/dist/host-resolution-Dw0fS8h5.js.map +1 -0
  31. package/dist/{interactive-D2CKikzz.js → interactive-pwrc7QM-.js} +2 -2
  32. package/dist/{interactive-D2CKikzz.js.map → interactive-pwrc7QM-.js.map} +1 -1
  33. package/dist/{mcp-prompt-streaming-FrArGwfv.js → mcp-prompt-streaming-DZjjoeu3.js} +10 -7
  34. package/dist/mcp-prompt-streaming-DZjjoeu3.js.map +1 -0
  35. package/dist/{non-interactive-BXx6Q-D0.js → non-interactive-BW-MZYrP.js} +2 -2
  36. package/dist/{non-interactive-BXx6Q-D0.js.map → non-interactive-BW-MZYrP.js.map} +1 -1
  37. package/dist/{package-manager-D9ojA4jO.js → package-manager-BgXgJ1Mu.js} +2 -2
  38. package/dist/{package-manager-D9ojA4jO.js.map → package-manager-BgXgJ1Mu.js.map} +1 -1
  39. package/dist/{playground-Bgtxrusl.js → playground-xuLBqzJM.js} +6 -6
  40. package/dist/{playground-Bgtxrusl.js.map → playground-xuLBqzJM.js.map} +1 -1
  41. package/dist/{posthog-DU6JXG00.js → posthog-BrLFkaji.js} +1 -1
  42. package/dist/{posthog-DU6JXG00.js.map → posthog-BrLFkaji.js.map} +1 -1
  43. package/dist/{posthog-integration-gnC9v4kg.js → posthog-integration-Bj9WmwDq.js} +16 -16
  44. package/dist/{posthog-integration-gnC9v4kg.js.map → posthog-integration-Bj9WmwDq.js.map} +1 -1
  45. package/dist/{provisioning-C3qglLdc.js → provisioning-BF2reo5_.js} +28 -9
  46. package/dist/provisioning-BF2reo5_.js.map +1 -0
  47. package/dist/{registry-BVrvFTZ0.js → registry-Dj17F0a-.js} +4 -4
  48. package/dist/{registry-BVrvFTZ0.js.map → registry-Dj17F0a-.js.map} +1 -1
  49. package/dist/{setup-utils-CanVlGbX.js → setup-utils-DyTlaGOV.js} +100 -31
  50. package/dist/setup-utils-DyTlaGOV.js.map +1 -0
  51. package/dist/{start-tui-YE7bybIr.js → start-tui-S4fBBfmO.js} +176 -38
  52. package/dist/{start-tui-YE7bybIr.js.map → start-tui-S4fBBfmO.js.map} +1 -1
  53. package/dist/{steps-N20e4IoE.js → steps-CHgikk6q.js} +7 -7
  54. package/dist/{steps-N20e4IoE.js.map → steps-CHgikk6q.js.map} +1 -1
  55. package/dist/{store-D15C9YSW.js → store-vr5j37CU.js} +4 -4
  56. package/dist/{store-D15C9YSW.js.map → store-vr5j37CU.js.map} +1 -1
  57. package/dist/{task-stream-CPjpHFhI.js → task-stream-BVF6gi8x.js} +3 -3
  58. package/dist/{task-stream-CPjpHFhI.js.map → task-stream-BVF6gi8x.js.map} +1 -1
  59. package/dist/{telemetry-DknCDWP6.js → telemetry-CR-ilpWe.js} +3 -3
  60. package/dist/{telemetry-DknCDWP6.js.map → telemetry-CR-ilpWe.js.map} +1 -1
  61. package/dist/{terminal-Cvv0a-7Q.js → terminal-uzjco-wz.js} +86 -35
  62. package/dist/terminal-uzjco-wz.js.map +1 -0
  63. package/dist/urls-ChWit8SE.js +67 -0
  64. package/dist/urls-ChWit8SE.js.map +1 -0
  65. package/dist/{wizard-abort-Cw818xPr.js → wizard-abort-BE_j8xUt.js} +4 -4
  66. package/dist/{wizard-abort-Cw818xPr.js.map → wizard-abort-BE_j8xUt.js.map} +1 -1
  67. package/dist/{wizard-abort-DMvS0YXD.js → wizard-abort-CNYxdjJl.js} +1 -1
  68. package/dist/{wizard-session-CN55LYyZ.js → wizard-session-BHoLQueN.js} +2 -1
  69. package/dist/wizard-session-BHoLQueN.js.map +1 -0
  70. package/dist/{wizard-session-BKEdX9mO.js → wizard-session-D0PJ9lsl.js} +1 -1
  71. package/dist/wizard-ui-WZ48rUgr.js.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/agent-interface-DCeQ5Oiw.js.map +0 -1
  74. package/dist/agent-runner-BRajaO84.js.map +0 -1
  75. package/dist/ci-install-D-otkGW6.js.map +0 -1
  76. package/dist/debug-BGMe1wP6.js.map +0 -1
  77. package/dist/mcp-prompt-streaming-FrArGwfv.js.map +0 -1
  78. package/dist/provisioning-C3qglLdc.js.map +0 -1
  79. package/dist/setup-utils-CanVlGbX.js.map +0 -1
  80. package/dist/terminal-Cvv0a-7Q.js.map +0 -1
  81. package/dist/urls-DrR6F_A3.js +0 -35
  82. package/dist/urls-DrR6F_A3.js.map +0 -1
  83. package/dist/wizard-session-CN55LYyZ.js.map +0 -1
@@ -1,17 +1,17 @@
1
- import { B as POSTHOG_PRIVACY_URL, G as REMOTE_SKILLS_BASE_URL, I as POSTHOG_DOCS_URL, M as OAUTH_PORTS, N as OAUTH_TIMEOUT_MS, U as POSTHOG_TERMS_URL, Z as WIZARD_TOOLS_MENU_FLAG_KEY, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, j as Integration, l as WIZARD_LOG_FILE, m as setUI, s as logToFile, y as getBlockingServiceKeys, z as POSTHOG_ORG_AI_SETTINGS_URL } from "./debug-BGMe1wP6.js";
2
- import { t as analytics } from "./analytics-CU4o3eF8.js";
3
- import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-CanVlGbX.js";
4
- import { a as getUiHostFromHost } from "./urls-DrR6F_A3.js";
5
- import { t as ApiError } from "./api-BBRfHEZ-.js";
6
- import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-CN55LYyZ.js";
7
- import { i as wizardAbort } from "./wizard-abort-Cw818xPr.js";
8
- import { C as AUDIT_CHECKS_FILE, D as coerceAuditChecks, E as AUDIT_SEVERITY_STYLE, O as getAuditChecks, _ as downloadSkill, m as EVENT_PLAN_FILE, v as fetchSkillMenu, w as AUDIT_CHECKS_KEY } from "./agent-interface-DCeQ5Oiw.js";
9
- import { d as Colors, f as Icons, m as detectProjectsWithAgent } from "./posthog-integration-gnC9v4kg.js";
1
+ import { H as POSTHOG_TERMS_URL, I as POSTHOG_DOCS_URL, M as OAUTH_PORTS, N as OAUTH_TIMEOUT_MS, R as POSTHOG_ORG_AI_SETTINGS_URL, W as REMOTE_SKILLS_BASE_URL, X as WIZARD_TOOLS_MENU_FLAG_KEY, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, j as Integration, l as WIZARD_LOG_FILE, m as setUI, s as logToFile, y as getBlockingServiceKeys, z as POSTHOG_PRIVACY_URL } from "./debug-DXWxKT5f.js";
2
+ import { t as analytics } from "./analytics-DP_j88IC.js";
3
+ import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-DyTlaGOV.js";
4
+ import { o as getUiHostFromHost } from "./urls-ChWit8SE.js";
5
+ import { t as ApiError } from "./api-Bdxv7mWH.js";
6
+ import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-BHoLQueN.js";
7
+ import { i as wizardAbort } from "./wizard-abort-BE_j8xUt.js";
8
+ import { A as coerceAuditChecks, D as AUDIT_CHECKS_KEY, E as AUDIT_CHECKS_FILE, _ as EVENT_PLAN_FILE, b as downloadSkill, j as getAuditChecks, k as AUDIT_SEVERITY_STYLE, x as fetchSkillMenu } from "./agent-interface-CXL9i_vX.js";
9
+ import { d as Colors, f as Icons, m as detectProjectsWithAgent } from "./posthog-integration-Bj9WmwDq.js";
10
10
  import { _ as fetchHealthIssues, b as POSTHOG_SDKS, d as Program, f as getProgramConfig, h as SOURCE_MAPS_CONTEXT_KEYS, m as DISPLAY_NAME, n as useKeyBindings, p as AUTOMATABLE_VARIANTS, t as PickerMenu, v as getDetectedWarehouseSources, x as STRIPE_SDKS, y as getContentBlocks } from "./bin.js";
11
- import { t as WizardStore } from "./store-D15C9YSW.js";
12
- import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as ServiceHealthList, a as useSkillEntry, b as LearnCard, c as AUDIT_AREA_SLIDES, d as McpSuggestedPromptsScreen, g as SEVERITY_ORDER, h as SEVERITY_LABEL, i as SkillSourceInfo, k as ModalOverlay, l as VisualBox, m as IssueTable, n as releaseTerminal, o as OutroScreen, p as McpScreen, r as AiOptInRequiredScreen, s as SlackConnectScreen, t as enterDarkTerminal, u as AuditChecksViewer, v as VisualizerTab, w as ScreenContainer, y as TipsCard } from "./terminal-Cvv0a-7Q.js";
13
- import { t as ALL_FEATURE_VALUES } from "./defaults-DII5CAog.js";
14
- import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-Dhq75Hda.js";
11
+ import { t as WizardStore } from "./store-vr5j37CU.js";
12
+ import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as ServiceHealthList, a as useSkillEntry, b as LearnCard, c as AUDIT_AREA_SLIDES, d as McpSuggestedPromptsScreen, g as SEVERITY_ORDER, h as SEVERITY_LABEL, i as SkillSourceInfo, k as ModalOverlay, l as VisualBox, m as IssueTable, n as releaseTerminal, o as OutroScreen, p as McpScreen, r as AiOptInRequiredScreen, s as SlackConnectScreen, t as enterDarkTerminal, u as AuditChecksViewer, v as VisualizerTab, w as ScreenContainer, y as TipsCard } from "./terminal-uzjco-wz.js";
13
+ import { t as ALL_FEATURE_VALUES } from "./defaults-4rSse24X.js";
14
+ import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-to65gLPl.js";
15
15
  import * as fs$1 from "fs";
16
16
  import path from "path";
17
17
  import { join as join$1 } from "node:path";
@@ -1072,7 +1072,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
1072
1072
  })),
1073
1073
  onSelect: (value) => {
1074
1074
  const integration = Array.isArray(value) ? value[0] : value;
1075
- import("./registry-BVrvFTZ0.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
1075
+ import("./registry-Dj17F0a-.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
1076
1076
  const config = FRAMEWORK_REGISTRY[integration];
1077
1077
  store.setFrameworkConfig(integration, config);
1078
1078
  store.setDetectedFramework(config.metadata.name);
@@ -4024,6 +4024,8 @@ const AuthErrorScreen = ({ store }) => {
4024
4024
  const detail = store.session.authErrorDetail;
4025
4025
  const hasSettingsConflict = detail?.hasSettingsConflict ?? true;
4026
4026
  const conflicts = detail?.conflicts ?? [];
4027
+ const usingManagedLogin = detail?.usingManagedLogin ?? false;
4028
+ const credentialPlaces = detail?.credentialPlaces ?? [];
4027
4029
  const logFilePath = detail?.logFilePath;
4028
4030
  return /* @__PURE__ */ jsxs(Box, {
4029
4031
  flexDirection: "column",
@@ -4034,7 +4036,42 @@ const AuthErrorScreen = ({ store }) => {
4034
4036
  bold: true,
4035
4037
  children: ["✘", " Authentication error"]
4036
4038
  }),
4037
- hasSettingsConflict ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
4039
+ usingManagedLogin ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
4040
+ /* @__PURE__ */ jsx(Box, {
4041
+ flexDirection: "column",
4042
+ marginTop: 1,
4043
+ children: /* @__PURE__ */ jsx(Text, { children: "Conflicting Anthropic credentials. The agent signed in with an existing Claude login instead of the PostHog token the Wizard provided, so the LLM Gateway rejected it (401)." })
4044
+ }),
4045
+ credentialPlaces.length > 0 && /* @__PURE__ */ jsxs(Box, {
4046
+ flexDirection: "column",
4047
+ marginTop: 1,
4048
+ paddingLeft: 2,
4049
+ children: [/* @__PURE__ */ jsx(Text, {
4050
+ dimColor: true,
4051
+ children: "Conflicting credentials may come from:"
4052
+ }), credentialPlaces.map((place) => /* @__PURE__ */ jsxs(Text, { children: [
4053
+ "•",
4054
+ " ",
4055
+ place
4056
+ ] }, place))]
4057
+ }),
4058
+ /* @__PURE__ */ jsx(Box, {
4059
+ marginTop: 1,
4060
+ children: /* @__PURE__ */ jsx(Text, {
4061
+ dimColor: true,
4062
+ children: "Log out of Claude Code (clears the stored login), then re-run the Wizard:"
4063
+ })
4064
+ }),
4065
+ /* @__PURE__ */ jsx(Box, {
4066
+ flexDirection: "column",
4067
+ marginTop: 1,
4068
+ paddingLeft: 2,
4069
+ children: /* @__PURE__ */ jsx(Text, {
4070
+ color: "cyan",
4071
+ children: "claude auth logout"
4072
+ })
4073
+ })
4074
+ ] }) : hasSettingsConflict ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
4038
4075
  /* @__PURE__ */ jsx(Box, {
4039
4076
  flexDirection: "column",
4040
4077
  marginTop: 1,
@@ -4186,15 +4223,22 @@ const SessionTimeoutScreen = ({ store }) => {
4186
4223
  //#endregion
4187
4224
  //#region src/utils/clipboard.ts
4188
4225
  /**
4189
- * Best-effort clipboard write — no third-party dependency.
4226
+ * Best-effort platform shell-outs for making a URL usable in any terminal —
4227
+ * no third-party dependency.
4190
4228
  *
4191
- * Used as a fallback so users can paste a URL their terminal can't linkify
4192
- * (e.g. macOS Terminal.app, which lacks OSC 8 hyperlink support). Shells out to
4193
- * the platform clipboard binary over stdin; never throws — returns false when no
4194
- * clipboard command is reachable (CI, headless, or the binary isn't installed).
4229
+ * Two helpers back the `wizard_ask` link overlay, for terminals that can't
4230
+ * linkify a wrapped URL (e.g. macOS Terminal.app, which lacks OSC 8 hyperlink
4231
+ * support):
4195
4232
  *
4196
- * Text is passed via stdin (never as an argv) so there's no shell-injection
4197
- * surface, and `spawn` runs without a shell.
4233
+ * - `copyToClipboard` — pipe the URL to the platform clipboard binary so the
4234
+ * user can paste it into a browser.
4235
+ * - `openInBrowser` — hand the URL to the platform opener so it launches
4236
+ * directly, no copy/paste needed.
4237
+ *
4238
+ * Both shell out with `spawn` and never a shell, and pass the URL as an argv
4239
+ * (clipboard via stdin) — so there's no shell-injection surface. Neither throws:
4240
+ * they return false when no command is reachable (CI, headless, or the binary
4241
+ * isn't installed).
4198
4242
  */
4199
4243
  /** Platform clipboard commands, in preference order. */
4200
4244
  function clipboardCommands() {
@@ -4239,6 +4283,57 @@ async function copyToClipboard(text) {
4239
4283
  logToFile("[clipboard] no working clipboard command found");
4240
4284
  return false;
4241
4285
  }
4286
+ /**
4287
+ * Platform browser-open commands, in preference order. The URL is one argv
4288
+ * element — never concatenated into a shell string — so a `?kind=…` query or
4289
+ * any other character can't escape into the command line.
4290
+ *
4291
+ * `win32` has no shell-free single binary for this: `start` is a `cmd` builtin,
4292
+ * so we invoke `cmd /c start "" <url>` (the empty `""` is `start`'s window-title
4293
+ * argument, which would otherwise swallow the URL). The URL is still a discrete
4294
+ * argv element, not interpolated into the command string.
4295
+ *
4296
+ * Takes `platform` as an argument (defaulting to the host) so the mapping is a
4297
+ * pure function the tests can exercise across platforms.
4298
+ */
4299
+ function browserOpenCommands(url, platform = process.platform) {
4300
+ if (platform === "darwin") return [{
4301
+ cmd: "open",
4302
+ args: [url]
4303
+ }];
4304
+ if (platform === "win32") return [{
4305
+ cmd: "cmd",
4306
+ args: [
4307
+ "/c",
4308
+ "start",
4309
+ "",
4310
+ url
4311
+ ]
4312
+ }];
4313
+ return [{
4314
+ cmd: "xdg-open",
4315
+ args: [url]
4316
+ }, {
4317
+ cmd: "x-www-browser",
4318
+ args: [url]
4319
+ }];
4320
+ }
4321
+ function spawnOpener({ cmd, args }) {
4322
+ return new Promise((resolve) => {
4323
+ try {
4324
+ const child = spawn(cmd, args, { stdio: "ignore" });
4325
+ child.on("error", () => resolve(false));
4326
+ child.on("close", (code) => resolve(code === 0));
4327
+ } catch {
4328
+ resolve(false);
4329
+ }
4330
+ });
4331
+ }
4332
+ async function openInBrowser(url) {
4333
+ for (const command of browserOpenCommands(url)) if (await spawnOpener(command)) return true;
4334
+ logToFile("[clipboard] no working browser-open command found");
4335
+ return false;
4336
+ }
4242
4337
  //#endregion
4243
4338
  //#region src/ui/tui/screens/WizardAskScreen.tsx
4244
4339
  /**
@@ -4254,22 +4349,42 @@ const WizardAskScreen = ({ store }) => {
4254
4349
  const [index, setIndex] = useState(0);
4255
4350
  const [answers, setAnswers] = useState({});
4256
4351
  const [lastPendingId, setLastPendingId] = useState(null);
4257
- const [copied, setCopied] = useState(false);
4352
+ const [linkStatus, setLinkStatus] = useState("idle");
4258
4353
  const richLinks = pending?.richLinks ?? false;
4259
4354
  const currentPrompt = pending?.questions[index]?.prompt ?? "";
4260
4355
  const promptUrls = richLinks ? extractUrls(currentPrompt) : [];
4261
4356
  const soleUrl = promptUrls.length === 1 ? promptUrls[0] : null;
4357
+ const isTextQuestion = pending?.questions[index]?.kind === "text";
4358
+ const canActOnLink = !!soleUrl && !isTextQuestion;
4359
+ const linkSplitIndex = canActOnLink && soleUrl ? currentPrompt.indexOf(soleUrl) : -1;
4360
+ const splitLink = soleUrl !== null && linkSplitIndex !== -1;
4361
+ const linkEnd = splitLink && soleUrl ? linkSplitIndex + soleUrl.length : 0;
4362
+ const promptHead = splitLink ? currentPrompt.slice(0, linkEnd) : currentPrompt;
4363
+ const linkTrailingText = splitLink ? currentPrompt.slice(linkEnd).replace(/^\s+/, "") : "";
4262
4364
  useEffect(() => {
4263
- setCopied(false);
4365
+ setLinkStatus("idle");
4264
4366
  if (!soleUrl) return;
4265
- let active = true;
4266
- copyToClipboard(soleUrl).then((ok) => {
4267
- if (active && ok) setCopied(true);
4268
- });
4269
- return () => {
4270
- active = false;
4271
- };
4367
+ copyToClipboard(soleUrl);
4272
4368
  }, [soleUrl]);
4369
+ useKeyBindings("wizard-ask-link", canActOnLink && soleUrl ? [{
4370
+ match: "o",
4371
+ label: "o",
4372
+ action: "open in browser",
4373
+ handler: () => {
4374
+ openInBrowser(soleUrl).then((ok) => {
4375
+ if (ok) setLinkStatus("opened");
4376
+ });
4377
+ }
4378
+ }, {
4379
+ match: "c",
4380
+ label: "c",
4381
+ action: "copy link",
4382
+ handler: () => {
4383
+ copyToClipboard(soleUrl).then((ok) => {
4384
+ if (ok) setLinkStatus("copied");
4385
+ });
4386
+ }
4387
+ }] : []);
4273
4388
  if (!pending) return null;
4274
4389
  if (pending.id !== lastPendingId) {
4275
4390
  setLastPendingId(pending.id);
@@ -4308,15 +4423,37 @@ const WizardAskScreen = ({ store }) => {
4308
4423
  }),
4309
4424
  /* @__PURE__ */ jsx(Box, {
4310
4425
  flexDirection: "column",
4311
- children: pending.richLinks ? /* @__PURE__ */ jsx(LinkText, { text: question.prompt }) : /* @__PURE__ */ jsx(Text, { children: question.prompt })
4426
+ children: pending.richLinks ? /* @__PURE__ */ jsx(LinkText, { text: promptHead }) : /* @__PURE__ */ jsx(Text, { children: question.prompt })
4312
4427
  }),
4313
- pending.richLinks && copied && /* @__PURE__ */ jsx(Box, {
4428
+ canActOnLink && /* @__PURE__ */ jsx(Box, {
4314
4429
  marginTop: 1,
4315
- children: /* @__PURE__ */ jsx(Text, {
4430
+ children: linkStatus === "idle" ? /* @__PURE__ */ jsxs(Text, {
4316
4431
  dimColor: true,
4317
- children: "Link copied to clipboard — paste it in your browser if it isn't clickable."
4432
+ children: [
4433
+ "Press ",
4434
+ /* @__PURE__ */ jsx(Text, {
4435
+ color: Colors.accent,
4436
+ children: "o"
4437
+ }),
4438
+ " to open it in your browser, or ",
4439
+ /* @__PURE__ */ jsx(Text, {
4440
+ color: Colors.accent,
4441
+ children: "c"
4442
+ }),
4443
+ " to copy the link."
4444
+ ]
4445
+ }) : linkStatus === "opened" ? /* @__PURE__ */ jsxs(Text, {
4446
+ color: Colors.success,
4447
+ children: [Icons.check, " Opening the link in your browser…"]
4448
+ }) : /* @__PURE__ */ jsxs(Text, {
4449
+ color: Colors.success,
4450
+ children: [Icons.check, " Link copied to clipboard. Paste it in your browser."]
4318
4451
  })
4319
4452
  }),
4453
+ linkTrailingText && /* @__PURE__ */ jsx(Box, {
4454
+ marginTop: 1,
4455
+ children: /* @__PURE__ */ jsx(Text, { children: linkTrailingText })
4456
+ }),
4320
4457
  /* @__PURE__ */ jsx(Box, {
4321
4458
  marginTop: 1,
4322
4459
  children: /* @__PURE__ */ jsx(QuestionInput, {
@@ -4448,7 +4585,7 @@ function createMcpInstaller() {
4448
4585
  * in a separate module so the heavy SDK import is only paid when
4449
4586
  * actually invoked.
4450
4587
  */
4451
- function createMcpSuggestedPromptsServices(_store) {
4588
+ function createMcpSuggestedPromptsServices(store) {
4452
4589
  return {
4453
4590
  performLogin: async () => {
4454
4591
  const result = await getOrAskForProjectData({
@@ -4458,6 +4595,7 @@ function createMcpSuggestedPromptsServices(_store) {
4458
4595
  projectId: void 0,
4459
4596
  email: void 0,
4460
4597
  region: void 0,
4598
+ baseUrl: store.session.baseUrl,
4461
4599
  programId: Program.McpTutorial
4462
4600
  });
4463
4601
  return {
@@ -4475,7 +4613,7 @@ function createMcpSuggestedPromptsServices(_store) {
4475
4613
  };
4476
4614
  }
4477
4615
  async function* runProductionPromptStreaming(args) {
4478
- const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-FrArGwfv.js");
4616
+ const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-DZjjoeu3.js");
4479
4617
  yield* runMcpPromptViaSdk(args);
4480
4618
  }
4481
4619
  //#endregion
@@ -4612,4 +4750,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
4612
4750
  //#endregion
4613
4751
  export { startTUI };
4614
4752
 
4615
- //# sourceMappingURL=start-tui-YE7bybIr.js.map
4753
+ //# sourceMappingURL=start-tui-S4fBBfmO.js.map