@posthog/wizard 2.18.0 → 2.20.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/README.md +11 -0
- package/dist/{add-mcp-server-to-clients-DnPwZl1P.js → add-mcp-server-to-clients-iV7BuQpD.js} +72 -13
- package/dist/add-mcp-server-to-clients-iV7BuQpD.js.map +1 -0
- package/dist/{agent-interface-C2VEF-BD.js → agent-interface-B-LAvrNL.js} +165 -52
- package/dist/agent-interface-B-LAvrNL.js.map +1 -0
- package/dist/{agent-runner-Dw8cjZoN.js → agent-runner-w2Qu9M13.js} +16 -11
- package/dist/{agent-runner-Dw8cjZoN.js.map → agent-runner-w2Qu9M13.js.map} +1 -1
- package/dist/{analytics-C-zcTO6g.js → analytics-C8lJzXjY.js} +2 -2
- package/dist/{analytics-C-zcTO6g.js.map → analytics-C8lJzXjY.js.map} +1 -1
- package/dist/{api-B3MWP3vm.js → api-eUlUinVy.js} +25 -4
- package/dist/{api-B3MWP3vm.js.map → api-eUlUinVy.js.map} +1 -1
- package/dist/bin.js +79 -50
- package/dist/bin.js.map +1 -1
- package/dist/check-screens.tsx +124 -0
- package/dist/{ci-install-DLuSmSq6.js → ci-install-CSo7Q1pK.js} +4 -4
- package/dist/{ci-install-DLuSmSq6.js.map → ci-install-CSo7Q1pK.js.map} +1 -1
- package/dist/{debug-BorYMfpE.js → debug-BJu_sS4l.js} +36 -21
- package/dist/debug-BJu_sS4l.js.map +1 -0
- package/dist/{debug--gQGudnY.js → debug-CTViFiF-.js} +1 -1
- package/dist/{defaults-DA3-9dHT.js → defaults-BNWIWzjc.js} +34 -8
- package/dist/defaults-BNWIWzjc.js.map +1 -0
- package/dist/{environment-DIOtLqTQ.js → environment-Dk_dWk3t.js} +3 -3
- package/dist/{environment-DIOtLqTQ.js.map → environment-Dk_dWk3t.js.map} +1 -1
- package/dist/{interactive-DjGjlvY3.js → interactive-BS2rIf1v.js} +2 -2
- package/dist/{interactive-DjGjlvY3.js.map → interactive-BS2rIf1v.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-Dm47tmiy.js → mcp-prompt-streaming-BiMrlLl0.js} +4 -4
- package/dist/{mcp-prompt-streaming-Dm47tmiy.js.map → mcp-prompt-streaming-BiMrlLl0.js.map} +1 -1
- package/dist/{non-interactive-C2f3Gwva.js → non-interactive-C39d_KIp.js} +2 -2
- package/dist/{non-interactive-C2f3Gwva.js.map → non-interactive-C39d_KIp.js.map} +1 -1
- package/dist/{package-manager-Bl2KOUFK.js → package-manager-BfOTvFt-.js} +2 -2
- package/dist/{package-manager-Bl2KOUFK.js.map → package-manager-BfOTvFt-.js.map} +1 -1
- package/dist/{playground-ZLG68cvx.js → playground-3OeRB7JU.js} +23 -9
- package/dist/playground-3OeRB7JU.js.map +1 -0
- package/dist/{posthog-integration-B_DLodqr.js → posthog-integration-8iTgqy2J.js} +20 -12
- package/dist/posthog-integration-8iTgqy2J.js.map +1 -0
- package/dist/{provisioning-Bk4E6VYn.js → provisioning-DxaT7bWw.js} +3 -3
- package/dist/{provisioning-Bk4E6VYn.js.map → provisioning-DxaT7bWw.js.map} +1 -1
- package/dist/{registry-DMM3UmZD.js → registry-apQfB3rf.js} +4 -4
- package/dist/{registry-DMM3UmZD.js.map → registry-apQfB3rf.js.map} +1 -1
- package/dist/{setup-utils-Df9ezAjZ.js → setup-utils-B9xqAXXl.js} +35 -20
- package/dist/{setup-utils-Df9ezAjZ.js.map → setup-utils-B9xqAXXl.js.map} +1 -1
- package/dist/{slides-DwvXZ8iS.js → slides-BEshbXqG.js} +448 -187
- package/dist/slides-BEshbXqG.js.map +1 -0
- package/dist/{start-tui-P9aMwBzt.js → start-tui-CCpKnZOY.js} +245 -57
- package/dist/start-tui-CCpKnZOY.js.map +1 -0
- package/dist/{steps-RCRZbLjZ.js → steps-DKbDDnVH.js} +6 -6
- package/dist/{steps-RCRZbLjZ.js.map → steps-DKbDDnVH.js.map} +1 -1
- package/dist/{task-stream-CZRj6auI.js → task-stream-CZawuzlz.js} +2 -2
- package/dist/{task-stream-CZRj6auI.js.map → task-stream-CZawuzlz.js.map} +1 -1
- package/dist/{telemetry-CMbVbpaY.js → telemetry-DUeOcmpo.js} +2 -2
- package/dist/{telemetry-CMbVbpaY.js.map → telemetry-DUeOcmpo.js.map} +1 -1
- package/dist/{urls-BzG_Jtw9.js → urls-B6wBIwr1.js} +2 -2
- package/dist/{urls-BzG_Jtw9.js.map → urls-B6wBIwr1.js.map} +1 -1
- package/dist/wizard-abort-D8XZdVAR.js +2 -0
- package/dist/{wizard-abort-QuKm_B5z.js → wizard-abort-DhGgTlUA.js} +14 -7
- package/dist/wizard-abort-DhGgTlUA.js.map +1 -0
- package/dist/{wizard-session-d27JGRGi.js → wizard-session-G3VWD6hv.js} +3 -1
- package/dist/{wizard-session-d27JGRGi.js.map → wizard-session-G3VWD6hv.js.map} +1 -1
- package/dist/{wizard-session-y304gEEI.js → wizard-session-wPJtNl4c.js} +1 -1
- package/dist/wizard-ui-YdGFRyu_.js.map +1 -1
- package/package.json +4 -2
- package/dist/add-mcp-server-to-clients-DnPwZl1P.js.map +0 -1
- package/dist/agent-interface-C2VEF-BD.js.map +0 -1
- package/dist/debug-BorYMfpE.js.map +0 -1
- package/dist/defaults-DA3-9dHT.js.map +0 -1
- package/dist/playground-ZLG68cvx.js.map +0 -1
- package/dist/posthog-integration-B_DLodqr.js.map +0 -1
- package/dist/slides-DwvXZ8iS.js.map +0 -1
- package/dist/start-tui-P9aMwBzt.js.map +0 -1
- package/dist/wizard-abort-Dl8WJQgJ.js +0 -2
- package/dist/wizard-abort-QuKm_B5z.js.map +0 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { M as POSTHOG_DOCS_URL, O as Integration, R as REMOTE_SKILLS_BASE_URL, U as WIZARD_TOOLS_MENU_FLAG_KEY, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, k as OAUTH_PORTS, l as WIZARD_LOG_FILE, m as setUI, q as getSkillsBaseUrl, s as logToFile, y as getBlockingServiceKeys } from "./debug-
|
|
2
|
-
import { t as analytics } from "./analytics-
|
|
3
|
-
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-
|
|
4
|
-
import { a as getUiHostFromHost } from "./urls-
|
|
5
|
-
import { t as ApiError } from "./api-
|
|
6
|
-
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { f as Colors, p as Icons, t as EVENT_PLAN_FILE } from "./posthog-integration-
|
|
1
|
+
import { M as POSTHOG_DOCS_URL, O as Integration, R as REMOTE_SKILLS_BASE_URL, U as WIZARD_TOOLS_MENU_FLAG_KEY, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, k as OAUTH_PORTS, l as WIZARD_LOG_FILE, m as setUI, q as getSkillsBaseUrl, s as logToFile, y as getBlockingServiceKeys } from "./debug-BJu_sS4l.js";
|
|
2
|
+
import { t as analytics } from "./analytics-C8lJzXjY.js";
|
|
3
|
+
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-B9xqAXXl.js";
|
|
4
|
+
import { a as getUiHostFromHost } from "./urls-B6wBIwr1.js";
|
|
5
|
+
import { i as fetchSlackConnected, t as ApiError } from "./api-eUlUinVy.js";
|
|
6
|
+
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-G3VWD6hv.js";
|
|
7
|
+
import { i as wizardAbort } from "./wizard-abort-DhGgTlUA.js";
|
|
8
|
+
import { _ as AUDIT_CHECKS_KEY, b as coerceAuditChecks, g as AUDIT_CHECKS_FILE, m as fetchSkillMenu, p as downloadSkill, x as getAuditChecks, y as AUDIT_SEVERITY_STYLE } from "./agent-interface-B-LAvrNL.js";
|
|
9
|
+
import { f as Colors, p as Icons, t as EVENT_PLAN_FILE } from "./posthog-integration-8iTgqy2J.js";
|
|
10
10
|
import { a as getProgramConfig, d as getContentBlocks, f as POSTHOG_SDKS, i as Program, o as DISPLAY_NAME, p as STRIPE_SDKS, s as SOURCE_MAPS_CONTEXT_KEYS, u as fetchHealthIssues } from "./bin.js";
|
|
11
|
-
import {
|
|
12
|
-
import { t as ALL_FEATURE_VALUES } from "./defaults-
|
|
13
|
-
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-
|
|
11
|
+
import { D as ProgressList, E as useKeyBindings, O as LoadingBox, S as ConfirmationInput, T as PickerMenu, _ as TabContainer, a as McpSuggestedPromptsScreen, b as LogViewer, c as McpScreen, d as SEVERITY_ORDER, f as ServiceHealthList, g as HNViewer, i as AuditChecksViewer, j as WizardStore, k as SplitView, l as IssueTable, m as LearnCard, n as AUDIT_AREA_SLIDES, p as TipsCard, r as VisualBox, s as getSlackAppCard, t as AUDIT_3000_AREA_SLIDES, u as SEVERITY_LABEL, v as ScreenContainer, w as useStdoutDimensions, x as ModalOverlay, y as EventPlanViewer } from "./slides-BEshbXqG.js";
|
|
12
|
+
import { t as ALL_FEATURE_VALUES } from "./defaults-BNWIWzjc.js";
|
|
13
|
+
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-iV7BuQpD.js";
|
|
14
14
|
import { spawn, spawnSync } from "node:child_process";
|
|
15
15
|
import { join } from "node:path";
|
|
16
16
|
import * as fs$1 from "fs";
|
|
17
17
|
import path from "path";
|
|
18
|
+
import opn from "opn";
|
|
18
19
|
import { Box, Text, render, useInput } from "ink";
|
|
19
20
|
import { Fragment, createElement, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
20
21
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -535,13 +536,6 @@ function formatSummaryLine(issues) {
|
|
|
535
536
|
}
|
|
536
537
|
//#endregion
|
|
537
538
|
//#region src/ui/tui/screens/SettingsOverrideScreen.tsx
|
|
538
|
-
function sourcePath(source) {
|
|
539
|
-
switch (source) {
|
|
540
|
-
case "project": return ".claude/settings.json";
|
|
541
|
-
case "managed": return "/Library/Application Support/ClaudeCode/managed-settings.json";
|
|
542
|
-
default: return source;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
539
|
const SettingsOverrideScreen = ({ store }) => {
|
|
546
540
|
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
547
541
|
const [feedback, setFeedback] = useState(null);
|
|
@@ -565,11 +559,10 @@ const SettingsOverrideScreen = ({ store }) => {
|
|
|
565
559
|
flexDirection: "column",
|
|
566
560
|
marginBottom: 1,
|
|
567
561
|
children: [/* @__PURE__ */ jsxs(Text, { children: [
|
|
568
|
-
"Your settings file at",
|
|
569
|
-
" ",
|
|
562
|
+
"Your settings file at ",
|
|
570
563
|
/* @__PURE__ */ jsx(Text, {
|
|
571
564
|
bold: true,
|
|
572
|
-
children:
|
|
565
|
+
children: conflict.path
|
|
573
566
|
}),
|
|
574
567
|
" sets:"
|
|
575
568
|
] }), /* @__PURE__ */ jsx(Box, {
|
|
@@ -585,7 +578,7 @@ const SettingsOverrideScreen = ({ store }) => {
|
|
|
585
578
|
})
|
|
586
579
|
] }, key))
|
|
587
580
|
})]
|
|
588
|
-
}, conflict.
|
|
581
|
+
}, conflict.path)), /* @__PURE__ */ jsx(Text, {
|
|
589
582
|
dimColor: true,
|
|
590
583
|
children: "These settings override credentials and prevent the Wizard from reaching the PostHog LLM Gateway. We can back up the file and continue."
|
|
591
584
|
})]
|
|
@@ -594,16 +587,20 @@ const SettingsOverrideScreen = ({ store }) => {
|
|
|
594
587
|
//#endregion
|
|
595
588
|
//#region src/ui/tui/screens/ManagedSettingsScreen.tsx
|
|
596
589
|
/**
|
|
597
|
-
* ManagedSettingsScreen — Modal
|
|
598
|
-
*
|
|
590
|
+
* ManagedSettingsScreen — Modal for read-only settings conflicts that block
|
|
591
|
+
* the Wizard from reaching the PostHog LLM Gateway: org-managed settings, the
|
|
592
|
+
* user's global `~/.claude` config, and gitignored project-local overrides.
|
|
599
593
|
*
|
|
600
|
-
* Unlike SettingsOverrideScreen, the wizard cannot back up or
|
|
601
|
-
*
|
|
594
|
+
* Unlike SettingsOverrideScreen, the wizard cannot safely back up or remove
|
|
595
|
+
* these files for the user, so it names the exact file and key and asks the
|
|
596
|
+
* user to fix it and re-run. Managed (root-owned) files need an IT admin; the
|
|
597
|
+
* rest the user can edit themselves.
|
|
602
598
|
*/
|
|
603
599
|
function sourceLabel(source) {
|
|
604
600
|
switch (source) {
|
|
605
|
-
case "managed": return "
|
|
606
|
-
case "
|
|
601
|
+
case "managed": return "Organization-managed settings";
|
|
602
|
+
case "user": return "Your global Claude Code settings";
|
|
603
|
+
case "project-local": return "Project-local settings";
|
|
607
604
|
default: return source;
|
|
608
605
|
}
|
|
609
606
|
}
|
|
@@ -611,12 +608,13 @@ const ManagedSettingsScreen = ({ store }) => {
|
|
|
611
608
|
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
612
609
|
const readOnlyConflicts = store.session.settingsConflicts?.filter((c) => !c.writable);
|
|
613
610
|
if (!readOnlyConflicts || readOnlyConflicts.length === 0) return null;
|
|
611
|
+
const hasManaged = readOnlyConflicts.some((c) => c.source === "managed");
|
|
614
612
|
return /* @__PURE__ */ jsxs(ModalOverlay, {
|
|
615
613
|
borderColor: "red",
|
|
616
|
-
title: `${Icons.warning}
|
|
617
|
-
width:
|
|
614
|
+
title: `${Icons.warning} Settings conflict`,
|
|
615
|
+
width: 72,
|
|
618
616
|
footer: /* @__PURE__ */ jsx(ConfirmationInput, {
|
|
619
|
-
message: "
|
|
617
|
+
message: "Fix the file(s) above, then re-run the Wizard.",
|
|
620
618
|
confirmLabel: "",
|
|
621
619
|
cancelLabel: "Exit [Esc]",
|
|
622
620
|
onConfirm: () => process.exit(1),
|
|
@@ -625,33 +623,40 @@ const ManagedSettingsScreen = ({ store }) => {
|
|
|
625
623
|
children: [
|
|
626
624
|
/* @__PURE__ */ jsx(Text, {
|
|
627
625
|
dimColor: true,
|
|
628
|
-
children: "
|
|
626
|
+
children: "These Claude Code settings override credentials and prevent the Wizard from reaching the PostHog LLM Gateway."
|
|
629
627
|
}),
|
|
630
628
|
readOnlyConflicts.map((conflict) => /* @__PURE__ */ jsxs(Box, {
|
|
631
629
|
flexDirection: "column",
|
|
632
630
|
marginTop: 1,
|
|
633
|
-
children: [
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
631
|
+
children: [
|
|
632
|
+
/* @__PURE__ */ jsx(Text, {
|
|
633
|
+
bold: true,
|
|
634
|
+
children: sourceLabel(conflict.source)
|
|
635
|
+
}),
|
|
636
|
+
/* @__PURE__ */ jsx(Text, {
|
|
637
|
+
dimColor: true,
|
|
638
|
+
children: conflict.path
|
|
639
|
+
}),
|
|
640
|
+
/* @__PURE__ */ jsx(Box, {
|
|
641
|
+
flexDirection: "column",
|
|
642
|
+
paddingLeft: 2,
|
|
643
|
+
children: conflict.keys.map((key) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
644
|
+
Icons.bullet,
|
|
645
|
+
" ",
|
|
646
|
+
/* @__PURE__ */ jsx(Text, {
|
|
647
|
+
color: "yellow",
|
|
648
|
+
bold: true,
|
|
649
|
+
children: key
|
|
650
|
+
})
|
|
651
|
+
] }, key))
|
|
652
|
+
})
|
|
653
|
+
]
|
|
654
|
+
}, conflict.path)),
|
|
650
655
|
/* @__PURE__ */ jsx(Box, {
|
|
651
656
|
marginTop: 1,
|
|
652
657
|
children: /* @__PURE__ */ jsx(Text, {
|
|
653
658
|
dimColor: true,
|
|
654
|
-
children: "
|
|
659
|
+
children: hasManaged ? "Remove these keys (or run \"claude auth logout\"). Managed files are root-owned — ask your IT administrator." : "Remove these keys, or run \"claude auth logout\", then re-run the Wizard."
|
|
655
660
|
})
|
|
656
661
|
})
|
|
657
662
|
]
|
|
@@ -1042,7 +1047,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
1042
1047
|
})),
|
|
1043
1048
|
onSelect: (value) => {
|
|
1044
1049
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
1045
|
-
import("./registry-
|
|
1050
|
+
import("./registry-apQfB3rf.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
|
|
1046
1051
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
1047
1052
|
store.setFrameworkConfig(integration, config);
|
|
1048
1053
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -4259,6 +4264,155 @@ const RunScreen = ({ store }) => {
|
|
|
4259
4264
|
});
|
|
4260
4265
|
};
|
|
4261
4266
|
//#endregion
|
|
4267
|
+
//#region src/ui/tui/screens/SlackConnectScreen.tsx
|
|
4268
|
+
/**
|
|
4269
|
+
* SlackConnectScreen — the dedicated "Connect Slack" step shown after the
|
|
4270
|
+
* MCP tutorial (`wizard mcp tutorial`) and after a successful install
|
|
4271
|
+
* (`wizard mcp add`).
|
|
4272
|
+
*
|
|
4273
|
+
* Presents the PostHog Slack app plus role-tailored use-cases. The copy
|
|
4274
|
+
* adapts to whether Slack is already connected (polled while the screen
|
|
4275
|
+
* is up, held as local state):
|
|
4276
|
+
* • not connected (or unknown) — nudge + "Open Slack setup", which
|
|
4277
|
+
* launches the browser at the integration settings page and keeps
|
|
4278
|
+
* the screen alive; the poll flips it to connected once the user
|
|
4279
|
+
* finishes the manual OAuth step in the browser.
|
|
4280
|
+
* • already connected — confirm it and skip the connect CTA, so users
|
|
4281
|
+
* who already have it aren't nagged.
|
|
4282
|
+
* "Skip" / "Done" / esc dismiss the step (`slackStepDismissed`) and let
|
|
4283
|
+
* the router advance to exit.
|
|
4284
|
+
*/
|
|
4285
|
+
var ChoiceValue = /* @__PURE__ */ function(ChoiceValue) {
|
|
4286
|
+
ChoiceValue["Open"] = "open";
|
|
4287
|
+
ChoiceValue["Skip"] = "skip";
|
|
4288
|
+
return ChoiceValue;
|
|
4289
|
+
}(ChoiceValue || {});
|
|
4290
|
+
const POLL_INTERVAL_MS = 3e3;
|
|
4291
|
+
const SlackConnectScreen = ({ store }) => {
|
|
4292
|
+
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
4293
|
+
const role = store.session.roleAtOrganization;
|
|
4294
|
+
const slack = getSlackAppCard();
|
|
4295
|
+
useEffect(() => {
|
|
4296
|
+
analytics.wizardCapture("slack connect shown", { role });
|
|
4297
|
+
}, []);
|
|
4298
|
+
const connected = store.session.slackConnected === true;
|
|
4299
|
+
const credentials = store.session.credentials;
|
|
4300
|
+
useEffect(() => {
|
|
4301
|
+
if (!credentials || connected) return;
|
|
4302
|
+
let cancelled = false;
|
|
4303
|
+
let timer;
|
|
4304
|
+
const controller = new AbortController();
|
|
4305
|
+
const check = () => {
|
|
4306
|
+
fetchSlackConnected(credentials.accessToken, credentials.projectId, credentials.host, controller.signal).then((isConnected) => {
|
|
4307
|
+
if (cancelled) return;
|
|
4308
|
+
if (isConnected) store.setSlackConnected(true);
|
|
4309
|
+
else timer = setTimeout(check, POLL_INTERVAL_MS);
|
|
4310
|
+
}).catch((err) => {
|
|
4311
|
+
if (cancelled) return;
|
|
4312
|
+
analytics.captureException(err instanceof Error ? err : new Error(String(err)), { step: "slack_connected_check" });
|
|
4313
|
+
});
|
|
4314
|
+
};
|
|
4315
|
+
check();
|
|
4316
|
+
return () => {
|
|
4317
|
+
cancelled = true;
|
|
4318
|
+
if (timer) clearTimeout(timer);
|
|
4319
|
+
controller.abort();
|
|
4320
|
+
};
|
|
4321
|
+
}, [
|
|
4322
|
+
credentials,
|
|
4323
|
+
connected,
|
|
4324
|
+
store
|
|
4325
|
+
]);
|
|
4326
|
+
const dismiss = () => {
|
|
4327
|
+
analytics.wizardCapture("slack connect skipped", {
|
|
4328
|
+
role,
|
|
4329
|
+
connected
|
|
4330
|
+
});
|
|
4331
|
+
store.setSlackStepDismissed();
|
|
4332
|
+
};
|
|
4333
|
+
const handleSelect = (value) => {
|
|
4334
|
+
if ((Array.isArray(value) ? value[0] : value) === "open") {
|
|
4335
|
+
analytics.wizardCapture("slack connect opened", { role });
|
|
4336
|
+
opn(slack.setupUrl, { wait: false }).catch(() => {});
|
|
4337
|
+
return;
|
|
4338
|
+
}
|
|
4339
|
+
dismiss();
|
|
4340
|
+
};
|
|
4341
|
+
useKeyBindings("slack-connect", [{
|
|
4342
|
+
match: "escape",
|
|
4343
|
+
label: "esc",
|
|
4344
|
+
action: connected ? "done" : "skip",
|
|
4345
|
+
handler: () => dismiss()
|
|
4346
|
+
}]);
|
|
4347
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
4348
|
+
flexDirection: "column",
|
|
4349
|
+
flexGrow: 1,
|
|
4350
|
+
children: /* @__PURE__ */ jsxs(Box, {
|
|
4351
|
+
marginTop: 1,
|
|
4352
|
+
flexDirection: "column",
|
|
4353
|
+
children: [
|
|
4354
|
+
connected ? /* @__PURE__ */ jsxs(Text, {
|
|
4355
|
+
bold: true,
|
|
4356
|
+
color: Colors.success,
|
|
4357
|
+
children: [Icons.check, " Slack connected"]
|
|
4358
|
+
}) : /* @__PURE__ */ jsx(Text, {
|
|
4359
|
+
bold: true,
|
|
4360
|
+
color: Colors.accent,
|
|
4361
|
+
children: slack.headline
|
|
4362
|
+
}),
|
|
4363
|
+
/* @__PURE__ */ jsx(Box, {
|
|
4364
|
+
marginTop: 1,
|
|
4365
|
+
children: /* @__PURE__ */ jsx(Text, { children: connected ? "Slack is connected — here's what you can do:" : slack.pitch })
|
|
4366
|
+
}),
|
|
4367
|
+
/* @__PURE__ */ jsx(Box, {
|
|
4368
|
+
marginTop: 1,
|
|
4369
|
+
flexDirection: "column",
|
|
4370
|
+
children: slack.capabilities.map((capability, i) => /* @__PURE__ */ jsx(Box, {
|
|
4371
|
+
marginTop: i === 0 ? 0 : 1,
|
|
4372
|
+
children: /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsxs(Text, {
|
|
4373
|
+
color: "cyan",
|
|
4374
|
+
children: [Icons.diamond, " "]
|
|
4375
|
+
}), capability] })
|
|
4376
|
+
}, i))
|
|
4377
|
+
}),
|
|
4378
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
4379
|
+
marginTop: 1,
|
|
4380
|
+
flexDirection: "column",
|
|
4381
|
+
children: [!connected && /* @__PURE__ */ jsxs(Text, {
|
|
4382
|
+
dimColor: true,
|
|
4383
|
+
children: ["Connect it: ", /* @__PURE__ */ jsx(Text, {
|
|
4384
|
+
color: "cyan",
|
|
4385
|
+
children: slack.setupUrl
|
|
4386
|
+
})]
|
|
4387
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
4388
|
+
dimColor: true,
|
|
4389
|
+
children: ["Learn more: ", /* @__PURE__ */ jsx(Text, {
|
|
4390
|
+
color: "cyan",
|
|
4391
|
+
children: slack.learnMoreUrl
|
|
4392
|
+
})]
|
|
4393
|
+
})]
|
|
4394
|
+
}),
|
|
4395
|
+
/* @__PURE__ */ jsx(Box, {
|
|
4396
|
+
marginTop: 1,
|
|
4397
|
+
children: /* @__PURE__ */ jsx(PickerMenu, {
|
|
4398
|
+
options: connected ? [{
|
|
4399
|
+
label: "Done",
|
|
4400
|
+
value: "skip"
|
|
4401
|
+
}] : [{
|
|
4402
|
+
label: "Open Slack setup",
|
|
4403
|
+
value: "open"
|
|
4404
|
+
}, {
|
|
4405
|
+
label: "Skip",
|
|
4406
|
+
value: "skip"
|
|
4407
|
+
}],
|
|
4408
|
+
onSelect: handleSelect
|
|
4409
|
+
})
|
|
4410
|
+
})
|
|
4411
|
+
]
|
|
4412
|
+
})
|
|
4413
|
+
});
|
|
4414
|
+
};
|
|
4415
|
+
//#endregion
|
|
4262
4416
|
//#region src/ui/tui/screens/KeepSkillsScreen.tsx
|
|
4263
4417
|
/**
|
|
4264
4418
|
* KeepSkillsScreen — Ask whether to keep installed skills in .claude/skills/.
|
|
@@ -4613,6 +4767,7 @@ const AuthErrorScreen = ({ store }) => {
|
|
|
4613
4767
|
});
|
|
4614
4768
|
const detail = store.session.authErrorDetail;
|
|
4615
4769
|
const hasSettingsConflict = detail?.hasSettingsConflict ?? true;
|
|
4770
|
+
const conflicts = detail?.conflicts ?? [];
|
|
4616
4771
|
const logFilePath = detail?.logFilePath;
|
|
4617
4772
|
return /* @__PURE__ */ jsxs(Box, {
|
|
4618
4773
|
flexDirection: "column",
|
|
@@ -4627,13 +4782,32 @@ const AuthErrorScreen = ({ store }) => {
|
|
|
4627
4782
|
/* @__PURE__ */ jsx(Box, {
|
|
4628
4783
|
flexDirection: "column",
|
|
4629
4784
|
marginTop: 1,
|
|
4630
|
-
children: /* @__PURE__ */ jsx(Text, { children: "The Wizard couldn't connect to the PostHog LLM Gateway. Claude Code settings on this machine
|
|
4785
|
+
children: /* @__PURE__ */ jsx(Text, { children: "The Wizard couldn't connect to the PostHog LLM Gateway. Claude Code settings on this machine override the Wizard's credentials." })
|
|
4786
|
+
}),
|
|
4787
|
+
conflicts.length > 0 && /* @__PURE__ */ jsx(Box, {
|
|
4788
|
+
flexDirection: "column",
|
|
4789
|
+
marginTop: 1,
|
|
4790
|
+
paddingLeft: 2,
|
|
4791
|
+
children: conflicts.map((conflict) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
4792
|
+
"•",
|
|
4793
|
+
" ",
|
|
4794
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4795
|
+
bold: true,
|
|
4796
|
+
children: conflict.path
|
|
4797
|
+
}),
|
|
4798
|
+
" sets",
|
|
4799
|
+
" ",
|
|
4800
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4801
|
+
color: "yellow",
|
|
4802
|
+
children: conflict.keys.join(", ")
|
|
4803
|
+
})
|
|
4804
|
+
] }, conflict.path))
|
|
4631
4805
|
}),
|
|
4632
4806
|
/* @__PURE__ */ jsx(Box, {
|
|
4633
4807
|
marginTop: 1,
|
|
4634
4808
|
children: /* @__PURE__ */ jsx(Text, {
|
|
4635
4809
|
dimColor: true,
|
|
4636
|
-
children: "
|
|
4810
|
+
children: "Remove those keys from the file(s) above, or log out of Claude Code, then re-run the Wizard:"
|
|
4637
4811
|
})
|
|
4638
4812
|
}),
|
|
4639
4813
|
/* @__PURE__ */ jsx(Box, {
|
|
@@ -4910,11 +5084,15 @@ function createMcpSuggestedPromptsServices(_store) {
|
|
|
4910
5084
|
user: result.user
|
|
4911
5085
|
};
|
|
4912
5086
|
},
|
|
5087
|
+
checkSlackConnected: async (credentials, signal) => {
|
|
5088
|
+
const { fetchSlackConnected } = await import("./api-eUlUinVy.js").then((n) => n.n);
|
|
5089
|
+
return fetchSlackConnected(credentials.accessToken, credentials.projectId, credentials.host, signal);
|
|
5090
|
+
},
|
|
4913
5091
|
runPromptStreaming: (args) => runProductionPromptStreaming(args)
|
|
4914
5092
|
};
|
|
4915
5093
|
}
|
|
4916
5094
|
async function* runProductionPromptStreaming(args) {
|
|
4917
|
-
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-
|
|
5095
|
+
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-BiMrlLl0.js");
|
|
4918
5096
|
yield* runMcpPromptViaSdk(args);
|
|
4919
5097
|
}
|
|
4920
5098
|
//#endregion
|
|
@@ -4959,6 +5137,7 @@ function createScreens(store, services) {
|
|
|
4959
5137
|
store,
|
|
4960
5138
|
services: services.mcpSuggestedPromptsServices
|
|
4961
5139
|
}),
|
|
5140
|
+
["slack-connect"]: /* @__PURE__ */ jsx(SlackConnectScreen, { store }),
|
|
4962
5141
|
["keep-skills"]: /* @__PURE__ */ jsx(KeepSkillsScreen, { store }),
|
|
4963
5142
|
["outro"]: /* @__PURE__ */ jsx(OutroScreen, { store }),
|
|
4964
5143
|
["exit"]: /* @__PURE__ */ jsx(ExitScreen, {}),
|
|
@@ -5017,16 +5196,25 @@ function startTUI(version, program = Program.PostHogIntegration) {
|
|
|
5017
5196
|
const store = new WizardStore(program);
|
|
5018
5197
|
store.version = version;
|
|
5019
5198
|
setUI(new InkUI(store));
|
|
5020
|
-
const { unmount: inkUnmount } = render(createElement(App, { store }));
|
|
5199
|
+
const { unmount: inkUnmount, waitUntilExit } = render(createElement(App, { store }));
|
|
5200
|
+
store.runInitHooks();
|
|
5201
|
+
process.stdin.on("error", (err) => {
|
|
5202
|
+
if (err.code !== "EIO") throw err;
|
|
5203
|
+
});
|
|
5021
5204
|
let cleaned = false;
|
|
5022
5205
|
const cleanup = () => {
|
|
5023
5206
|
if (cleaned) return;
|
|
5024
5207
|
cleaned = true;
|
|
5208
|
+
logToFile(`[start-tui] unmounting TUI, leaving alt screen (exitCode=${process.exitCode ?? "unset"})`);
|
|
5025
5209
|
inkUnmount();
|
|
5026
5210
|
releaseTerminal();
|
|
5027
5211
|
process.stdout.write(getExitLine(store) + "\n");
|
|
5028
5212
|
};
|
|
5029
5213
|
process.on("exit", cleanup);
|
|
5214
|
+
waitUntilExit().then(() => {
|
|
5215
|
+
cleanup();
|
|
5216
|
+
process.exit(process.exitCode ?? 0);
|
|
5217
|
+
});
|
|
5030
5218
|
return {
|
|
5031
5219
|
unmount: cleanup,
|
|
5032
5220
|
store,
|
|
@@ -5036,4 +5224,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
|
|
|
5036
5224
|
//#endregion
|
|
5037
5225
|
export { startTUI };
|
|
5038
5226
|
|
|
5039
|
-
//# sourceMappingURL=start-tui-
|
|
5227
|
+
//# sourceMappingURL=start-tui-CCpKnZOY.js.map
|