@posthog/wizard 2.37.0 → 2.38.1

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 (97) hide show
  1. package/dist/{add-mcp-server-to-clients-CNn9br9l.js → add-mcp-server-to-clients-BB1_aH5M.js} +5 -5
  2. package/dist/{add-mcp-server-to-clients-CNn9br9l.js.map → add-mcp-server-to-clients-BB1_aH5M.js.map} +1 -1
  3. package/dist/{agent-interface-D8jnkEnB.js → agent-interface-kOuzXg84.js} +69 -1119
  4. package/dist/agent-interface-kOuzXg84.js.map +1 -0
  5. package/dist/{agent-runner-BxIYcxmA.js → agent-runner-DZhaiwD5.js} +2571 -1648
  6. package/dist/agent-runner-DZhaiwD5.js.map +1 -0
  7. package/dist/analytics-B1SC2jaf.js +2 -0
  8. package/dist/{analytics-Du8Z_3oX.js → analytics-Z_2kCTpB.js} +4 -3
  9. package/dist/{analytics-Du8Z_3oX.js.map → analytics-Z_2kCTpB.js.map} +1 -1
  10. package/dist/{api-BqKMQVhj.js → api-CwhOyprf.js} +3 -3
  11. package/dist/{api-BqKMQVhj.js.map → api-CwhOyprf.js.map} +1 -1
  12. package/dist/bin.js +64 -50
  13. package/dist/bin.js.map +1 -1
  14. package/dist/{ci-install-UlWb3u5t.js → ci-install-CWDY86uB.js} +4 -4
  15. package/dist/{ci-install-UlWb3u5t.js.map → ci-install-CWDY86uB.js.map} +1 -1
  16. package/dist/{debug-B4AH8Ahp.js → debug-BmdpjMub.js} +1 -1
  17. package/dist/{debug-CZwmzyDx.js → debug-CaRHQrDY.js} +91 -13
  18. package/dist/debug-CaRHQrDY.js.map +1 -0
  19. package/dist/{defaults-UswXMiTx.js → defaults-a0e6IRjP.js} +1 -1
  20. package/dist/{defaults-UswXMiTx.js.map → defaults-a0e6IRjP.js.map} +1 -1
  21. package/dist/{env-api-key-Db-mNPK2.js → env-api-key-DEl3LJBv.js} +1 -1
  22. package/dist/{env-api-key-Db-mNPK2.js.map → env-api-key-DEl3LJBv.js.map} +1 -1
  23. package/dist/{environment-BRXwshJO.js → environment-knibpXF2.js} +3 -3
  24. package/dist/{environment-BRXwshJO.js.map → environment-knibpXF2.js.map} +1 -1
  25. package/dist/{file-utils-D6CWLaOm.js → file-utils-DWYX_G1o.js} +2 -2
  26. package/dist/{file-utils-D6CWLaOm.js.map → file-utils-DWYX_G1o.js.map} +1 -1
  27. package/dist/{headless-ui-DvkogF0b.js → headless-ui-C4JCi9Zz.js} +2 -2
  28. package/dist/{headless-ui-DvkogF0b.js.map → headless-ui-C4JCi9Zz.js.map} +1 -1
  29. package/dist/{host-resolution-DrOzdKdY.js → host-resolution-C18FwVrM.js} +3 -3
  30. package/dist/{host-resolution-DrOzdKdY.js.map → host-resolution-C18FwVrM.js.map} +1 -1
  31. package/dist/{interactive-CXL8oJwb.js → interactive-46qgS-UA.js} +2 -2
  32. package/dist/{interactive-CXL8oJwb.js.map → interactive-46qgS-UA.js.map} +1 -1
  33. package/dist/mcp-QWL5Obf3.js +108 -0
  34. package/dist/mcp-QWL5Obf3.js.map +1 -0
  35. package/dist/{mcp-prompt-streaming-Dumivcgi.js → mcp-prompt-streaming-BpNkFksF.js} +5 -5
  36. package/dist/mcp-prompt-streaming-BpNkFksF.js.map +1 -0
  37. package/dist/{non-interactive-BI5b25U7.js → non-interactive-3_T1d0cj.js} +2 -2
  38. package/dist/{non-interactive-BI5b25U7.js.map → non-interactive-3_T1d0cj.js.map} +1 -1
  39. package/dist/{package-json-DCuoye-H.js → package-json-CDs1ZVKu.js} +1 -1
  40. package/dist/{package-json-DCuoye-H.js.map → package-json-CDs1ZVKu.js.map} +1 -1
  41. package/dist/{package-manager-9nhQBKAy.js → package-manager-C5VVQHQ-.js} +2 -2
  42. package/dist/{package-manager-9nhQBKAy.js.map → package-manager-C5VVQHQ-.js.map} +1 -1
  43. package/dist/{playground-DDYYs2ub.js → playground-CbzUpMuN.js} +783 -7
  44. package/dist/playground-CbzUpMuN.js.map +1 -0
  45. package/dist/{posthog-BrLFkaji.js → posthog-BESrI6-T.js} +1 -1
  46. package/dist/{posthog-BrLFkaji.js.map → posthog-BESrI6-T.js.map} +1 -1
  47. package/dist/{posthog-integration-Cx4RvC7E.js → posthog-integration-6vdi4wRB.js} +19 -18
  48. package/dist/posthog-integration-6vdi4wRB.js.map +1 -0
  49. package/dist/{provisioning-PosLaOt4.js → provisioning-DK0tS98H.js} +4 -4
  50. package/dist/{provisioning-PosLaOt4.js.map → provisioning-DK0tS98H.js.map} +1 -1
  51. package/dist/{registry-B43CNAAx.js → registry-DfXVjxsP.js} +5 -5
  52. package/dist/{registry-B43CNAAx.js.map → registry-DfXVjxsP.js.map} +1 -1
  53. package/dist/security-BMVH_bjk.js +431 -0
  54. package/dist/security-BMVH_bjk.js.map +1 -0
  55. package/dist/{setup-utils-CR8X8Fmf.js → setup-utils-v9I6PQyP.js} +192 -20
  56. package/dist/setup-utils-v9I6PQyP.js.map +1 -0
  57. package/dist/{start-tui-DeewAqJg.js → start-tui-CylEL6i_.js} +63 -38
  58. package/dist/start-tui-CylEL6i_.js.map +1 -0
  59. package/dist/{steps-CPvI-2Ms.js → steps-DQdpexNM.js} +7 -7
  60. package/dist/{steps-CPvI-2Ms.js.map → steps-DQdpexNM.js.map} +1 -1
  61. package/dist/{store-0uzey9Am.js → store-Db0X2V5D.js} +68 -6
  62. package/dist/store-Db0X2V5D.js.map +1 -0
  63. package/dist/subagent-Pk9jRXRf.js +108 -0
  64. package/dist/subagent-Pk9jRXRf.js.map +1 -0
  65. package/dist/{task-stream-DkbGqxZv.js → task-stream-rC4IEUHC.js} +3 -3
  66. package/dist/{task-stream-DkbGqxZv.js.map → task-stream-rC4IEUHC.js.map} +1 -1
  67. package/dist/tasks-B46phMJu.js +112 -0
  68. package/dist/tasks-B46phMJu.js.map +1 -0
  69. package/dist/{telemetry-DJNpvkYP.js → telemetry-BJAHymMq.js} +3 -3
  70. package/dist/{telemetry-DJNpvkYP.js.map → telemetry-BJAHymMq.js.map} +1 -1
  71. package/dist/{terminal-Bd6q58zn.js → terminal-BTQSAkC-.js} +143 -793
  72. package/dist/terminal-BTQSAkC-.js.map +1 -0
  73. package/dist/tools-C_m5knXt.js +122 -0
  74. package/dist/tools-C_m5knXt.js.map +1 -0
  75. package/dist/{urls-B1a2v93j.js → urls-BCmeQMIb.js} +2 -2
  76. package/dist/{urls-B1a2v93j.js.map → urls-BCmeQMIb.js.map} +1 -1
  77. package/dist/{wizard-abort-DyAGpw-u.js → wizard-abort-CMzW4LVM.js} +1 -1
  78. package/dist/{wizard-abort-BG8VNOI9.js → wizard-abort-DkngXmxN.js} +4 -4
  79. package/dist/{wizard-abort-BG8VNOI9.js.map → wizard-abort-DkngXmxN.js.map} +1 -1
  80. package/dist/{wizard-session-CqihOtk3.js → wizard-session-BoXAZEOf.js} +4 -1
  81. package/dist/wizard-session-BoXAZEOf.js.map +1 -0
  82. package/dist/{wizard-session-xzqycI7i.js → wizard-session-C8W_6X0j.js} +1 -1
  83. package/dist/wizard-tools-C8nVWLeI.js +1162 -0
  84. package/dist/wizard-tools-C8nVWLeI.js.map +1 -0
  85. package/dist/wizard-ui-WZ48rUgr.js.map +1 -1
  86. package/package.json +7 -2
  87. package/dist/agent-interface-D8jnkEnB.js.map +0 -1
  88. package/dist/agent-runner-BxIYcxmA.js.map +0 -1
  89. package/dist/debug-CZwmzyDx.js.map +0 -1
  90. package/dist/mcp-prompt-streaming-Dumivcgi.js.map +0 -1
  91. package/dist/playground-DDYYs2ub.js.map +0 -1
  92. package/dist/posthog-integration-Cx4RvC7E.js.map +0 -1
  93. package/dist/setup-utils-CR8X8Fmf.js.map +0 -1
  94. package/dist/start-tui-DeewAqJg.js.map +0 -1
  95. package/dist/store-0uzey9Am.js.map +0 -1
  96. package/dist/terminal-Bd6q58zn.js.map +0 -1
  97. package/dist/wizard-session-CqihOtk3.js.map +0 -1
@@ -1,18 +1,20 @@
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-CZwmzyDx.js";
2
- import { t as analytics } from "./analytics-Du8Z_3oX.js";
3
- import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-CR8X8Fmf.js";
4
- import { o as getUiHostFromHost } from "./urls-B1a2v93j.js";
5
- import { t as ApiError } from "./api-BqKMQVhj.js";
6
- import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-CqihOtk3.js";
7
- import { i as wizardAbort } from "./wizard-abort-BG8VNOI9.js";
8
- import { A as AUDIT_SEVERITY_STYLE, D as AUDIT_CHECKS_FILE, M as getAuditChecks, O as AUDIT_CHECKS_KEY, _ as EVENT_PLAN_FILE, b as downloadSkill, j as coerceAuditChecks, x as fetchSkillMenu } from "./agent-interface-D8jnkEnB.js";
9
- import { t as FRAMEWORK_REGISTRY } from "./registry-B43CNAAx.js";
10
- import { g as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE } from "./posthog-integration-Cx4RvC7E.js";
1
+ import { F as Integration, I as OAUTH_PORTS, J as POSTHOG_TERMS_URL, L as OAUTH_TIMEOUT_MS, U as POSTHOG_ORG_AI_SETTINGS_URL, V as POSTHOG_DOCS_URL, W as POSTHOG_PRIVACY_URL, X as REMOTE_SKILLS_BASE_URL, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, l as WIZARD_LOG_FILE, m as setUI, s as logToFile, st as WIZARD_TOOLS_MENU_FLAG_KEY, y as getBlockingServiceKeys } from "./debug-CaRHQrDY.js";
2
+ import { n as analytics } from "./analytics-Z_2kCTpB.js";
3
+ import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-v9I6PQyP.js";
4
+ import { o as getUiHostFromHost } from "./urls-BCmeQMIb.js";
5
+ import { t as ApiError } from "./api-CwhOyprf.js";
6
+ import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-BoXAZEOf.js";
7
+ import { i as wizardAbort } from "./wizard-abort-DkngXmxN.js";
8
+ import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-DZhaiwD5.js";
9
+ import { S as EVENT_PLAN_FILE } from "./agent-interface-kOuzXg84.js";
10
+ import { _ as coerceAuditChecks, g as AUDIT_SEVERITY_STYLE, i as fetchSkillMenu, m as AUDIT_CHECKS_KEY, p as AUDIT_CHECKS_FILE, r as downloadSkill, v as getAuditChecks } from "./wizard-tools-C8nVWLeI.js";
11
+ import { t as FRAMEWORK_REGISTRY } from "./registry-DfXVjxsP.js";
12
+ import { g as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE } from "./posthog-integration-6vdi4wRB.js";
11
13
  import { C as STRIPE_SDKS, S as POSTHOG_SDKS, _ as SOURCE_MAPS_CONTEXT_KEYS, b as getDetectedWarehouseSources, d as Program, f as getProgramConfig, g as DISPLAY_NAME, h as AUTOMATABLE_VARIANTS, m as SELF_DRIVING_INTEGRATE_PATH_KEY, n as useKeyBindings, p as detectSelfDrivingIntegrationProjects, t as PickerMenu, x as getContentBlocks, y as fetchHealthIssues } from "./bin.js";
12
- import { t as WizardStore } from "./store-0uzey9Am.js";
13
- 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-Bd6q58zn.js";
14
- import { t as ALL_FEATURE_VALUES } from "./defaults-UswXMiTx.js";
15
- 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-CNn9br9l.js";
14
+ import { r as totalTokenCount, t as WizardStore } from "./store-Db0X2V5D.js";
15
+ 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 SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-BTQSAkC-.js";
16
+ import { t as ALL_FEATURE_VALUES } from "./defaults-a0e6IRjP.js";
17
+ 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-BB1_aH5M.js";
16
18
  import * as fs$1 from "fs";
17
19
  import path from "path";
18
20
  import { join as join$1 } from "node:path";
@@ -172,6 +174,12 @@ var InkUI = class {
172
174
  setNotebookUrl(url) {
173
175
  this.store.setNotebookUrl(url);
174
176
  }
177
+ addTokenUsage(delta) {
178
+ this.store.addTokenUsage(delta);
179
+ }
180
+ setFinalTokenCostUsd(costUsd) {
181
+ this.store.setFinalTokenCostUsd(costUsd);
182
+ }
175
183
  setOutroData(data) {
176
184
  const live = this.store.session;
177
185
  this.store.setOutroData({
@@ -196,9 +204,7 @@ var InkUI = class {
196
204
  */
197
205
  const EXAMPLE_PROMPT = "Integrate PostHog into this project using the skill files in .posthog/skills/. Read SKILL.md first, then follow the numbered program files in order.";
198
206
  const SkillsDownloadedScreen = () => {
199
- useInput(() => {
200
- process.exit(0);
201
- });
207
+ useDismissOnAnyKey(() => process.exit(0));
202
208
  return /* @__PURE__ */ jsxs(Box, {
203
209
  flexDirection: "column",
204
210
  flexGrow: 1,
@@ -1073,7 +1079,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
1073
1079
  })),
1074
1080
  onSelect: (value) => {
1075
1081
  const integration = Array.isArray(value) ? value[0] : value;
1076
- import("./registry-B43CNAAx.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
1082
+ import("./registry-DfXVjxsP.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
1077
1083
  const config = FRAMEWORK_REGISTRY[integration];
1078
1084
  store.setFrameworkConfig(integration, config);
1079
1085
  store.setDetectedFramework(config.metadata.name);
@@ -2184,9 +2190,7 @@ const BlockedSummary$1 = ({ blocked }) => {
2184
2190
  */
2185
2191
  const SourceMapsOutroScreen = ({ store }) => {
2186
2192
  useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
2187
- useInput(() => {
2188
- store.setOutroDismissed();
2189
- });
2193
+ useDismissOnAnyKey(() => store.setOutroDismissed());
2190
2194
  const outroData = store.session.outroData;
2191
2195
  if (!outroData) return /* @__PURE__ */ jsx(Box, {
2192
2196
  flexDirection: "column",
@@ -3785,9 +3789,7 @@ const AuditChecksOutroSection = ({ checks, installDir }) => {
3785
3789
  */
3786
3790
  const AuditOutroScreen = ({ store }) => {
3787
3791
  useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
3788
- useInput(() => {
3789
- store.setOutroDismissed();
3790
- });
3792
+ useDismissOnAnyKey(() => store.setOutroDismissed());
3791
3793
  const outroData = store.session.outroData;
3792
3794
  if (!outroData) return /* @__PURE__ */ jsx(Box, {
3793
3795
  flexDirection: "column",
@@ -4171,11 +4173,6 @@ const RunScreen = ({ store }) => {
4171
4173
  label: "Tail logs",
4172
4174
  component: /* @__PURE__ */ jsx(LogViewer, { filePath: WIZARD_LOG_FILE })
4173
4175
  },
4174
- {
4175
- id: "visualizer",
4176
- label: "Visualizer",
4177
- component: /* @__PURE__ */ jsx(VisualizerTab, { store })
4178
- },
4179
4176
  {
4180
4177
  id: "hn",
4181
4178
  label: "HN",
@@ -4365,9 +4362,7 @@ const ExitScreen = () => {
4365
4362
  */
4366
4363
  const AuthErrorScreen = ({ store }) => {
4367
4364
  useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
4368
- useInput(() => {
4369
- process.exit(1);
4370
- });
4365
+ useDismissOnAnyKey(() => process.exit(1));
4371
4366
  const detail = store.session.authErrorDetail;
4372
4367
  const hasSettingsConflict = detail?.hasSettingsConflict ?? true;
4373
4368
  const conflicts = detail?.conflicts ?? [];
@@ -4533,9 +4528,7 @@ const AuthErrorScreen = ({ store }) => {
4533
4528
  const TIMEOUT_MINUTES = Math.round(OAUTH_TIMEOUT_MS / 6e4);
4534
4529
  const SessionTimeoutScreen = ({ store }) => {
4535
4530
  useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
4536
- useInput(() => {
4537
- process.exit(1);
4538
- });
4531
+ useDismissOnAnyKey(() => process.exit(1));
4539
4532
  return /* @__PURE__ */ jsxs(Box, {
4540
4533
  flexDirection: "column",
4541
4534
  flexGrow: 1,
@@ -4960,7 +4953,7 @@ function createMcpSuggestedPromptsServices(store) {
4960
4953
  };
4961
4954
  }
4962
4955
  async function* runProductionPromptStreaming(args) {
4963
- const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-Dumivcgi.js");
4956
+ const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-BpNkFksF.js");
4964
4957
  yield* runMcpPromptViaSdk(args);
4965
4958
  }
4966
4959
  //#endregion
@@ -5036,13 +5029,44 @@ const App = ({ store }) => {
5036
5029
  };
5037
5030
  //#endregion
5038
5031
  //#region src/ui/tui/exit-line.ts
5032
+ /**
5033
+ * exit-line.ts — builds the text printed to the MAIN terminal buffer after the
5034
+ * wizard leaves the alternate screen on exit.
5035
+ *
5036
+ * The TUI renders in the alternate screen buffer, which is torn down on exit —
5037
+ * everything the wizard drew (including the outro screen) is wiped. This line,
5038
+ * printed AFTER releaseTerminal(), is the only output that survives into the
5039
+ * user's scrollback. So the coding-agent handoff prompt is echoed here, on its
5040
+ * own plain line (no border, no bullets), which is what a terminal can
5041
+ * triple-click-select cleanly.
5042
+ *
5043
+ * Kept free of `ink`/`@inkjs/ui` imports so it stays a pure, unit-testable
5044
+ * function (start-tui.ts itself pulls in the whole render tree).
5045
+ */
5039
5046
  const RESET_ATTRS = "\x1B[0m";
5040
5047
  const GREEN = "\x1B[32m";
5041
5048
  const BOLD = "\x1B[1m";
5042
5049
  const DIM = "\x1B[2m";
5050
+ /**
5051
+ * Mirrors the hidden Ctrl+T HUD's tally into post-exit scrollback — but only
5052
+ * when the HUD is actually visible at exit (`store.tokenHudVisible`, which
5053
+ * defaults on in dev/test and off in production; `useDismissOnAnyKey`
5054
+ * already keeps Ctrl+T from also dismissing the outro screen underneath
5055
+ * it). A production run where the user never toggled it on shouldn't have a
5056
+ * cost number appear from nowhere once the TUI tears down. `null` when the
5057
+ * HUD is hidden, or the run never produced any usage (e.g. non-agent
5058
+ * programs).
5059
+ */
5060
+ function tokenCostLine(store) {
5061
+ if (!store.tokenHudVisible) return null;
5062
+ const usage = store.tokenUsage;
5063
+ if (totalTokenCount(usage) === 0) return null;
5064
+ return `${DIM}${usage.costIsFinal ? "Final cost" : "Cost (estimate)"}: ${formatCostUsd(usage.costUsd)} (in ${formatTokenCount(usage.inputTokens)} · out ${formatTokenCount(usage.outputTokens)} · cache read ${formatTokenCount(usage.cacheReadTokens)} · cache write ${formatTokenCount(usage.cacheCreationTokens)})${RESET_ATTRS}`;
5065
+ }
5043
5066
  function getExitLine(store) {
5044
5067
  const outro = store.session.outroData;
5045
5068
  const label = store.session.programLabel ?? "Wizard";
5069
+ const costLine = tokenCostLine(store);
5046
5070
  if (outro?.kind === "success") {
5047
5071
  const message = outro.message ?? `${label} completed successfully.`;
5048
5072
  const parts = [`${GREEN}${BOLD}✔${RESET_ATTRS} ${message}${outro.reportFile && !message.includes(outro.reportFile) ? ` Check ./${outro.reportFile} for details.` : ""}`];
@@ -5052,9 +5076,10 @@ function getExitLine(store) {
5052
5076
  parts.push(`${DIM}${outro.nextSteps.heading}${RESET_ATTRS}\n${bullets}`);
5053
5077
  }
5054
5078
  if (outro.handoffPrompt) parts.push(`${DIM}Hand this to your coding agent to finish up (triple-click to select):${RESET_ATTRS}\n` + outro.handoffPrompt);
5079
+ if (costLine) parts.push(costLine);
5055
5080
  return parts.join("\n\n");
5056
5081
  }
5057
- return `${DIM}${label} exited.${RESET_ATTRS}`;
5082
+ return costLine ? `${DIM}${label} exited.${RESET_ATTRS}\n\n${costLine}` : `${DIM}${label} exited.${RESET_ATTRS}`;
5058
5083
  }
5059
5084
  //#endregion
5060
5085
  //#region src/ui/tui/start-tui.ts
@@ -5100,4 +5125,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
5100
5125
  //#endregion
5101
5126
  export { startTUI };
5102
5127
 
5103
- //# sourceMappingURL=start-tui-DeewAqJg.js.map
5128
+ //# sourceMappingURL=start-tui-CylEL6i_.js.map