@algolia/wizard 0.78.0 → 0.80.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/main.js CHANGED
@@ -4,7 +4,7 @@
4
4
  import { render } from "ink";
5
5
 
6
6
  // src/ui/App.tsx
7
- import { Box as Box21, Text as Text22, useApp as useApp2, useInput as useInput9, useWindowSize as useWindowSize8 } from "ink";
7
+ import { Box as Box22, Text as Text23, useApp as useApp2, useInput as useInput9, useWindowSize as useWindowSize8 } from "ink";
8
8
  import Spinner3 from "ink-spinner";
9
9
 
10
10
  // src/lib/terminalSize.ts
@@ -2306,7 +2306,7 @@ async function ensureApplication(resumeAppId) {
2306
2306
  // package.json
2307
2307
  var package_default = {
2308
2308
  name: "@algolia/wizard",
2309
- version: "0.78.0",
2309
+ version: "0.80.0",
2310
2310
  description: "Magically implement Algolia functionality in your codebase",
2311
2311
  type: "module",
2312
2312
  engines: {
@@ -2362,7 +2362,6 @@ var package_default = {
2362
2362
  dotenv: "^17.4.2",
2363
2363
  hono: "^4.13.8",
2364
2364
  ink: "^7.0.5",
2365
- "ink-picture": "^2.1.0",
2366
2365
  "ink-spinner": "^5.0.0",
2367
2366
  ioredis: "^5.11.1",
2368
2367
  nanoid: "^5.1.15",
@@ -3859,6 +3858,14 @@ function reviewScriptTool(ctx) {
3859
3858
  });
3860
3859
  }
3861
3860
 
3861
+ // src/lib/tools/utils/redactSecrets.ts
3862
+ function redactSecrets(output, secrets) {
3863
+ return [...new Set(Object.values(secrets).filter(Boolean))].sort((a, b) => b.length - a.length).reduce(
3864
+ (redacted, secret) => redacted.split(secret).join("[REDACTED]"),
3865
+ output
3866
+ );
3867
+ }
3868
+
3862
3869
  // src/lib/tools/utils/runShell.ts
3863
3870
  import { spawn as spawn2 } from "node:child_process";
3864
3871
 
@@ -3880,9 +3887,14 @@ var DEFAULT_SHELL_TIMEOUT_MS = 10 * 60 * 1e3;
3880
3887
  async function refuseByDefault() {
3881
3888
  return "reject";
3882
3889
  }
3890
+ async function emptyShellEnv() {
3891
+ await Promise.resolve();
3892
+ return {};
3893
+ }
3883
3894
  function createShellContext(overrides = {}) {
3884
3895
  return {
3885
- env: async () => ({}),
3896
+ env: emptyShellEnv,
3897
+ secretEnv: emptyShellEnv,
3886
3898
  timeoutMs: DEFAULT_SHELL_TIMEOUT_MS,
3887
3899
  executions: [],
3888
3900
  approve: refuseByDefault,
@@ -3925,7 +3937,9 @@ function runShell(command, opts) {
3925
3937
  clearTimeout(killTimer);
3926
3938
  resolve6({
3927
3939
  exitCode,
3928
- output: truncateText(output.trim()),
3940
+ output: truncateText(
3941
+ redactSecrets(output.trim(), opts.secrets ?? {})
3942
+ ),
3929
3943
  timedOut,
3930
3944
  durationMs: Date.now() - startedAt
3931
3945
  });
@@ -4251,13 +4265,22 @@ async function resolveShellEnv(ctx, command) {
4251
4265
  return {};
4252
4266
  });
4253
4267
  }
4254
- async function runAndRecord(ctx, command, cwd, resolvedEnv) {
4268
+ async function resolveSecretShellEnv(ctx, command) {
4269
+ return ctx.shell.secretEnv().catch((err) => {
4270
+ logger.warn(
4271
+ { err, command },
4272
+ "runShell: could not resolve secret command env"
4273
+ );
4274
+ return {};
4275
+ });
4276
+ }
4277
+ async function runAndRecord(ctx, command, environment) {
4255
4278
  useWizard.getState().pushNotice({ messages: [`Running: ${command}`] });
4256
- const env = resolvedEnv ?? await resolveShellEnv(ctx, command);
4257
4279
  const run2 = await (ctx.shell.run ?? runShell)(command, {
4258
- cwd,
4259
- env,
4260
- timeoutMs: ctx.shell.timeoutMs
4280
+ cwd: environment.cwd,
4281
+ env: environment.values,
4282
+ timeoutMs: ctx.shell.timeoutMs,
4283
+ secrets: environment.secrets
4261
4284
  });
4262
4285
  logger.info(
4263
4286
  {
@@ -4269,29 +4292,40 @@ async function runAndRecord(ctx, command, cwd, resolvedEnv) {
4269
4292
  "runShell finished"
4270
4293
  );
4271
4294
  await markInteraction();
4295
+ const output = redactSecrets(run2.output, environment.secrets);
4272
4296
  ctx.shell.executions.push({
4273
4297
  command,
4274
- cwd,
4298
+ cwd: environment.cwd,
4275
4299
  approved: true,
4276
4300
  exitCode: run2.exitCode,
4277
- output: run2.output,
4301
+ output,
4278
4302
  timedOut: run2.timedOut,
4279
4303
  durationMs: run2.durationMs
4280
4304
  });
4281
4305
  return {
4282
4306
  exitCode: run2.exitCode,
4283
4307
  timedOut: run2.timedOut,
4284
- output: run2.output
4308
+ output
4285
4309
  };
4286
4310
  }
4287
4311
  async function runReviewedCommand(ctx, command, cwd) {
4288
4312
  const approval = getReviewedCommandApproval(ctx, command, cwd);
4289
4313
  if (!approval) return void 0;
4290
- const env = await resolveShellEnv(ctx, command);
4291
4314
  if (!await reviewedCommandApprovalIsCurrent(approval)) {
4292
4315
  return `Refused: ${relative5(ctx.root, approval.filePath)} changed after review. Call reviewScript again before running it.`;
4293
4316
  }
4294
- const result = await runAndRecord(ctx, command, cwd, env);
4317
+ const [env, secrets] = await Promise.all([
4318
+ resolveShellEnv(ctx, command),
4319
+ resolveSecretShellEnv(ctx, command)
4320
+ ]);
4321
+ if (!await reviewedCommandApprovalIsCurrent(approval)) {
4322
+ return `Refused: ${relative5(ctx.root, approval.filePath)} changed after review. Call reviewScript again before running it.`;
4323
+ }
4324
+ const result = await runAndRecord(
4325
+ ctx,
4326
+ command,
4327
+ { cwd, values: { ...env, ...secrets }, secrets }
4328
+ );
4295
4329
  if (result.exitCode === SUCCESS_EXIT_CODE && !result.timedOut) {
4296
4330
  clearReviewedCommandApproval(ctx);
4297
4331
  }
@@ -4304,7 +4338,14 @@ async function approveAndRun(ctx, command, cwd, explanation) {
4304
4338
  logger.info({ command }, "runShell: user rejected the command");
4305
4339
  return "The user rejected this command. Do not retry it. Propose a different command, or report the limitation via reportStatus.";
4306
4340
  }
4307
- return runAndRecord(ctx, command, cwd);
4341
+ return runUnreviewedCommand(ctx, command, cwd);
4342
+ }
4343
+ async function runUnreviewedCommand(ctx, command, cwd) {
4344
+ const [env, secrets] = await Promise.all([
4345
+ resolveShellEnv(ctx, command),
4346
+ resolveSecretShellEnv(ctx, command)
4347
+ ]);
4348
+ return runAndRecord(ctx, command, { cwd, values: env, secrets });
4308
4349
  }
4309
4350
  function runShellTool(ctx, createModel = defaultCreateModel) {
4310
4351
  return tool9({
@@ -4363,7 +4404,7 @@ function runShellTool(ctx, createModel = defaultCreateModel) {
4363
4404
  if (lateReview !== void 0) return lateReview;
4364
4405
  const storedApprovalIsCurrent = !usedStoredApproval || useWizard.getState().isCommandApproved(command, resolved2.target);
4365
4406
  if (isSafe && storedApprovalIsCurrent) {
4366
- return runAndRecord(ctx, command, resolved2.target);
4407
+ return runUnreviewedCommand(ctx, command, resolved2.target);
4367
4408
  }
4368
4409
  return approveAndRun(ctx, command, resolved2.target, explanation);
4369
4410
  });
@@ -5868,12 +5909,12 @@ function ingestFailure(attempt, executions) {
5868
5909
  }
5869
5910
  return { reason: `it failed (exit ${attempt.exitCode ?? "unknown"})`, detail };
5870
5911
  }
5871
- function makeToolContext(root, appId, env = async () => ({})) {
5912
+ function makeToolContext(root, appId, env = async () => ({}), secretEnv = async () => ({})) {
5872
5913
  return {
5873
5914
  ...createToolContext(
5874
5915
  DEFAULT_TOOL_LIMITS,
5875
5916
  root,
5876
- createShellContext({ env, approve: storeApproval(root) })
5917
+ createShellContext({ env, secretEnv, approve: storeApproval(root) })
5877
5918
  ),
5878
5919
  appId
5879
5920
  };
@@ -6097,11 +6138,17 @@ async function implement(ctx, useCases = DEFAULT_IMPLEMENT_USE_CASES) {
6097
6138
  let ingestDurationMs;
6098
6139
  let ingestOutcomeMessage;
6099
6140
  const ingestKeyAppId = ingestAppId;
6100
- const ingestionTools = ingestKeyAppId && ingestWriteKey ? makeToolContext(repoRoot, ctx.appId, async () => ({
6101
- [APP_ID_VAR]: ingestKeyAppId,
6102
- [API_KEY_VAR]: ingestWriteKey,
6103
- [INDEX_NAME_VAR]: targetIndex
6104
- })) : makeToolContext(repoRoot, ctx.appId);
6141
+ const ingestionTools = ingestKeyAppId && ingestWriteKey ? makeToolContext(
6142
+ repoRoot,
6143
+ ctx.appId,
6144
+ async () => ({
6145
+ [APP_ID_VAR]: ingestKeyAppId,
6146
+ [INDEX_NAME_VAR]: targetIndex
6147
+ }),
6148
+ async () => ({
6149
+ [API_KEY_VAR]: ingestWriteKey
6150
+ })
6151
+ ) : makeToolContext(repoRoot, ctx.appId);
6105
6152
  async function runImplementationUseCase(currentUseCase, extraInstructions = [], isRetry = false) {
6106
6153
  if (agentRuns > 0) ctx.recordStepExecution();
6107
6154
  agentRuns += 1;
@@ -7158,20 +7205,37 @@ function getWorkflow(id) {
7158
7205
  }
7159
7206
 
7160
7207
  // src/ui/Welcome.tsx
7161
- import { dirname as dirname6, join as join12 } from "node:path";
7162
- import { fileURLToPath as fileURLToPath2 } from "node:url";
7163
7208
  import { useState as useState10 } from "react";
7164
- import { Box as Box12, Spacer, Text as Text13, useInput as useInput6, useWindowSize as useWindowSize6 } from "ink";
7209
+ import { Box as Box13, Spacer, Text as Text14, useInput as useInput6, useWindowSize as useWindowSize6 } from "ink";
7210
+
7211
+ // src/ui/Logo.tsx
7212
+ import { Box as Box11, Text as Text12 } from "ink";
7213
+ import { jsx as jsx10 } from "react/jsx-runtime";
7214
+ var LOGO = [
7215
+ " \u2597\u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588",
7216
+ " \u2597\u259F\u2588\u2580\u2580 \u2588\u2588",
7217
+ " \u259F\u2588\u259B \u2597\u2584\u2588\u2588\u2588\u2588\u2584\u2596 \u2588\u2588",
7218
+ "\u2590\u2588\u258C \u259F\u2588\u259B\u2580 \u2580\u259C\u2588\u2599 \u2588\u2588",
7219
+ "\u2588\u2588 \u2590\u2588\u258C \u2590\u2588\u258C \u2588\u2588",
7220
+ "\u2588\u2588 \u2590\u2588\u258C \u259D\u2598 \u2588\u2588",
7221
+ "\u2590\u2588\u258C \u259C\u2588\u2599\u2584 \u2584\u2584\u2588\u2584 \u2588\u2588",
7222
+ " \u259C\u2588\u2599 \u259D\u2580\u2588\u2588\u2588\u2588\u2580\u2580\u259C\u2588\u2584 \u2588\u2588",
7223
+ " \u259D\u259C\u2588\u2584\u2584 \u259D\u259C\u2588\u2588\u2588",
7224
+ " \u259D\u2580\u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2580\u2598 \u259D\u2580\u2588"
7225
+ ];
7226
+ function Logo() {
7227
+ return /* @__PURE__ */ jsx10(Box11, { flexDirection: "column", children: LOGO.map((line, i) => /* @__PURE__ */ jsx10(Text12, { color: COLORS.brand, children: line }, i)) });
7228
+ }
7165
7229
 
7166
7230
  // src/ui/ResizeNotice.tsx
7167
- import { Box as Box11, Text as Text12, useWindowSize as useWindowSize5 } from "ink";
7168
- import { jsx as jsx10, jsxs as jsxs11 } from "react/jsx-runtime";
7231
+ import { Box as Box12, Text as Text13, useWindowSize as useWindowSize5 } from "ink";
7232
+ import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
7169
7233
  function ResizeNotice() {
7170
7234
  const { columns, rows } = useWindowSize5();
7171
7235
  if (rows >= MIN_ROWS && columns >= MIN_COLUMNS) return null;
7172
- return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
7173
- /* @__PURE__ */ jsx10(Text12, { color: COLORS.badge, children: `Terminal is ${columns}x${rows}. Recommended size is ${MIN_COLUMNS}x${MIN_ROWS}.` }),
7174
- /* @__PURE__ */ jsx10(Text12, { color: COLORS.muted, children: "Enlarge the pane for the full layout." })
7236
+ return /* @__PURE__ */ jsxs11(Box12, { flexDirection: "column", children: [
7237
+ /* @__PURE__ */ jsx11(Text13, { color: COLORS.badge, children: `Terminal is ${columns}x${rows}. Recommended size is ${MIN_COLUMNS}x${MIN_ROWS}.` }),
7238
+ /* @__PURE__ */ jsx11(Text13, { color: COLORS.muted, children: "Enlarge the pane for the full layout." })
7175
7239
  ] });
7176
7240
  }
7177
7241
 
@@ -7200,26 +7264,19 @@ var sidebarItems = [
7200
7264
  ];
7201
7265
 
7202
7266
  // src/ui/Welcome.tsx
7203
- import Image, { TerminalInfoContext, defaultTerminalInfo } from "ink-picture";
7204
- import { jsx as jsx11, jsxs as jsxs12 } from "react/jsx-runtime";
7205
- var IMAGE_PATH = join12(dirname6(fileURLToPath2(import.meta.url)), "algolia.png");
7206
- var TERMINAL_INFO = {
7207
- ...defaultTerminalInfo,
7208
- supportsUnicode: true,
7209
- supportsColor: true
7210
- };
7267
+ import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
7211
7268
  function SidebarItem({
7212
7269
  title,
7213
7270
  description
7214
7271
  }) {
7215
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
7216
- /* @__PURE__ */ jsxs12(Box12, { gap: 1, children: [
7217
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.success, children: "\u2192" }),
7218
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.strong, bold: true, children: title })
7272
+ return /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", children: [
7273
+ /* @__PURE__ */ jsxs12(Box13, { gap: 1, children: [
7274
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.success, children: "\u2192" }),
7275
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.strong, bold: true, children: title })
7219
7276
  ] }),
7220
- /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", gap: 2, children: [
7221
- /* @__PURE__ */ jsx11(Spacer, {}),
7222
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.muted, children: description })
7277
+ /* @__PURE__ */ jsxs12(Box13, { flexDirection: "row", gap: 2, children: [
7278
+ /* @__PURE__ */ jsx12(Spacer, {}),
7279
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: description })
7223
7280
  ] })
7224
7281
  ] });
7225
7282
  }
@@ -7257,29 +7314,19 @@ function Welcome() {
7257
7314
  if (rows < MIN_ROWS) {
7258
7315
  layout = scales["small"];
7259
7316
  }
7260
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", justifyContent: "space-between", width: "100%", children: [
7261
- /* @__PURE__ */ jsx11(
7262
- Box12,
7317
+ return /* @__PURE__ */ jsxs12(Box13, { flexDirection: "row", justifyContent: "space-between", width: "100%", children: [
7318
+ /* @__PURE__ */ jsx12(
7319
+ Box13,
7263
7320
  {
7264
7321
  paddingY: layout.main.padding.y,
7265
7322
  paddingX: layout.main.padding.x,
7266
7323
  flexDirection: "column",
7267
7324
  justifyContent: "center",
7268
- children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 2, children: [
7269
- /* @__PURE__ */ jsx11(ResizeNotice, {}),
7270
- showLogo && /* @__PURE__ */ jsx11(TerminalInfoContext.Provider, { value: TERMINAL_INFO, children: /* @__PURE__ */ jsx11(
7271
- Image,
7272
- {
7273
- src: IMAGE_PATH,
7274
- objectFit: "contain",
7275
- alt: "Algolia",
7276
- width: 20,
7277
- height: 10,
7278
- protocol: "halfBlock"
7279
- }
7280
- ) }),
7281
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.muted, children: "\u2726 From zero \u2192 working search in ~10 minutes" }),
7282
- /* @__PURE__ */ jsx11(Box12, { flexDirection: "column", children: actions.map((action, i) => /* @__PURE__ */ jsx11(
7325
+ children: /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", gap: 2, children: [
7326
+ /* @__PURE__ */ jsx12(ResizeNotice, {}),
7327
+ showLogo && /* @__PURE__ */ jsx12(Logo, {}),
7328
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: "\u2726 From zero \u2192 working search in ~10 minutes" }),
7329
+ /* @__PURE__ */ jsx12(Box13, { flexDirection: "column", children: actions.map((action, i) => /* @__PURE__ */ jsx12(
7283
7330
  SelectRow,
7284
7331
  {
7285
7332
  highlighted: i === index,
@@ -7288,21 +7335,21 @@ function Welcome() {
7288
7335
  },
7289
7336
  action.label
7290
7337
  )) }),
7291
- /* @__PURE__ */ jsxs12(Box12, { gap: 2, children: [
7292
- /* @__PURE__ */ jsxs12(Text13, { children: [
7293
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.primary, children: "[\u2191] [\u2193]" }),
7294
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.dim, children: " move" })
7338
+ /* @__PURE__ */ jsxs12(Box13, { gap: 2, children: [
7339
+ /* @__PURE__ */ jsxs12(Text14, { children: [
7340
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.primary, children: "[\u2191] [\u2193]" }),
7341
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.dim, children: " move" })
7295
7342
  ] }),
7296
- /* @__PURE__ */ jsxs12(Text13, { children: [
7297
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.primary, children: "[enter]" }),
7298
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.dim, children: " confirm" })
7343
+ /* @__PURE__ */ jsxs12(Text14, { children: [
7344
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.primary, children: "[enter]" }),
7345
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.dim, children: " confirm" })
7299
7346
  ] })
7300
7347
  ] })
7301
7348
  ] })
7302
7349
  }
7303
7350
  ),
7304
7351
  showSidebar && /* @__PURE__ */ jsxs12(
7305
- Box12,
7352
+ Box13,
7306
7353
  {
7307
7354
  backgroundColor: COLORS.bg.sidebar,
7308
7355
  width: 40,
@@ -7312,8 +7359,8 @@ function Welcome() {
7312
7359
  flexDirection: "column",
7313
7360
  justifyContent: "center",
7314
7361
  children: [
7315
- /* @__PURE__ */ jsx11(Text13, { color: COLORS.muted, children: "WHAT THIS WIZARD WILL DO" }),
7316
- sidebarItems.map((i, idx) => /* @__PURE__ */ jsx11(SidebarItem, { title: i.title, description: i.description }, idx))
7362
+ /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: "WHAT THIS WIZARD WILL DO" }),
7363
+ sidebarItems.map((i, idx) => /* @__PURE__ */ jsx12(SidebarItem, { title: i.title, description: i.description }, idx))
7317
7364
  ]
7318
7365
  }
7319
7366
  )
@@ -7321,7 +7368,7 @@ function Welcome() {
7321
7368
  }
7322
7369
 
7323
7370
  // src/ui/LearnMore.tsx
7324
- import { Box as Box13, Text as Text14, useInput as useInput7, useWindowSize as useWindowSize7 } from "ink";
7371
+ import { Box as Box14, Text as Text15, useInput as useInput7, useWindowSize as useWindowSize7 } from "ink";
7325
7372
 
7326
7373
  // src/ui/copy/learn-more.ts
7327
7374
  var accessIntro = "Everything runs locally on your machine. Nothing is written or sent without an explicit yes from you.";
@@ -7363,7 +7410,7 @@ var policyLinks = [
7363
7410
  ];
7364
7411
 
7365
7412
  // src/ui/LearnMore.tsx
7366
- import { jsx as jsx12, jsxs as jsxs13 } from "react/jsx-runtime";
7413
+ import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
7367
7414
  var TAG_COLORS = {
7368
7415
  READ: COLORS.success,
7369
7416
  WRITE: COLORS.badge,
@@ -7499,7 +7546,7 @@ function LearnMore() {
7499
7546
  });
7500
7547
  const visible = rows.slice(scroll.offset, scroll.offset + scroll.capacity);
7501
7548
  return /* @__PURE__ */ jsxs13(
7502
- Box13,
7549
+ Box14,
7503
7550
  {
7504
7551
  flexDirection: "column",
7505
7552
  paddingX: PADDING_X,
@@ -7507,23 +7554,23 @@ function LearnMore() {
7507
7554
  width: "100%",
7508
7555
  flexGrow: 1,
7509
7556
  children: [
7510
- /* @__PURE__ */ jsx12(ResizeNotice, {}),
7511
- /* @__PURE__ */ jsx12(ScrollView, { scroll, children: visible.map((row, i) => /* @__PURE__ */ jsx12(Text14, { wrap: "truncate", children: row.parts.map((part, j) => /* @__PURE__ */ jsx12(Text14, { color: part.color, bold: part.bold, children: part.text }, j)) }, `learn-more-${scroll.offset}-${i}`)) }),
7512
- scrollable && /* @__PURE__ */ jsxs13(Text14, { children: [
7513
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.primary, children: "[j] [k]" }),
7514
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.dim, children: " scroll" })
7557
+ /* @__PURE__ */ jsx13(ResizeNotice, {}),
7558
+ /* @__PURE__ */ jsx13(ScrollView, { scroll, children: visible.map((row, i) => /* @__PURE__ */ jsx13(Text15, { wrap: "truncate", children: row.parts.map((part, j) => /* @__PURE__ */ jsx13(Text15, { color: part.color, bold: part.bold, children: part.text }, j)) }, `learn-more-${scroll.offset}-${i}`)) }),
7559
+ scrollable && /* @__PURE__ */ jsxs13(Text15, { children: [
7560
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.primary, children: "[j] [k]" }),
7561
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.dim, children: " scroll" })
7515
7562
  ] }),
7516
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 3, children: [
7517
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 1, children: [
7518
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: "[" }),
7519
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.primary, children: "esc" }),
7520
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: "] back" })
7563
+ /* @__PURE__ */ jsxs13(Box14, { flexDirection: "row", gap: 3, children: [
7564
+ /* @__PURE__ */ jsxs13(Box14, { flexDirection: "row", gap: 1, children: [
7565
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.muted, children: "[" }),
7566
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.primary, children: "esc" }),
7567
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.muted, children: "] back" })
7521
7568
  ] }),
7522
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 1, children: [
7523
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: "[" }),
7524
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.primary, children: "enter" }),
7525
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.muted, children: "]" }),
7526
- /* @__PURE__ */ jsx12(Text14, { color: COLORS.success, bold: true, children: "start wizard" })
7569
+ /* @__PURE__ */ jsxs13(Box14, { flexDirection: "row", gap: 1, children: [
7570
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.muted, children: "[" }),
7571
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.primary, children: "enter" }),
7572
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.muted, children: "]" }),
7573
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.success, bold: true, children: "start wizard" })
7527
7574
  ] })
7528
7575
  ] })
7529
7576
  ]
@@ -7532,17 +7579,17 @@ function LearnMore() {
7532
7579
  }
7533
7580
 
7534
7581
  // src/ui/Sidebar.tsx
7535
- import { Box as Box16, Text as Text17 } from "ink";
7582
+ import { Box as Box17, Text as Text18 } from "ink";
7536
7583
 
7537
7584
  // src/ui/Steps.tsx
7538
- import { Box as Box14, Text as Text15 } from "ink";
7585
+ import { Box as Box15, Text as Text16 } from "ink";
7539
7586
  import Spinner2 from "ink-spinner";
7540
- import { jsx as jsx13, jsxs as jsxs14 } from "react/jsx-runtime";
7587
+ import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
7541
7588
  function Steps() {
7542
7589
  const { steps } = useWizard();
7543
7590
  const visibleSteps = steps.filter(isStepVisible);
7544
- return /* @__PURE__ */ jsx13(Box14, { flexDirection: "column", gap: 1, children: visibleSteps.map((s) => /* @__PURE__ */ jsx13(Box14, { flexDirection: "column", children: /* @__PURE__ */ jsxs14(Text15, { color: COLORS.status[s.status], children: [
7545
- s.status === "running" ? /* @__PURE__ */ jsx13(Spinner2, { type: "dots" }) : MARKER[s.status],
7591
+ return /* @__PURE__ */ jsx14(Box15, { flexDirection: "column", gap: 1, children: visibleSteps.map((s) => /* @__PURE__ */ jsx14(Box15, { flexDirection: "column", children: /* @__PURE__ */ jsxs14(Text16, { color: COLORS.status[s.status], children: [
7592
+ s.status === "running" ? /* @__PURE__ */ jsx14(Spinner2, { type: "dots" }) : MARKER[s.status],
7546
7593
  " ",
7547
7594
  s.title
7548
7595
  ] }) }, s.id)) });
@@ -7551,27 +7598,27 @@ function CurrentStep() {
7551
7598
  const { steps } = useWizard();
7552
7599
  const currentStep = steps.filter(isStepVisible).find((s) => s.status === "running");
7553
7600
  if (!currentStep) return null;
7554
- return /* @__PURE__ */ jsxs14(Text15, { color: COLORS.status.running, children: [
7555
- /* @__PURE__ */ jsx13(Spinner2, { type: "dots" }),
7601
+ return /* @__PURE__ */ jsxs14(Text16, { color: COLORS.status.running, children: [
7602
+ /* @__PURE__ */ jsx14(Spinner2, { type: "dots" }),
7556
7603
  " ",
7557
7604
  ` ${currentStep.title}`
7558
7605
  ] });
7559
7606
  }
7560
7607
 
7561
7608
  // src/ui/Progress.tsx
7562
- import { Box as Box15, Text as Text16 } from "ink";
7563
- import { jsx as jsx14, jsxs as jsxs15 } from "react/jsx-runtime";
7609
+ import { Box as Box16, Text as Text17 } from "ink";
7610
+ import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
7564
7611
  function Progress() {
7565
7612
  const { steps, currentStepIndex } = useWizard();
7566
7613
  const visibleSteps = steps.filter(isStepVisible);
7567
7614
  if (visibleSteps.length === 0) return null;
7568
7615
  const visibleCountThroughCurrent = steps.slice(0, currentStepIndex + 1).filter(isStepVisible).length;
7569
7616
  const activeStepNumber = Math.max(1, visibleCountThroughCurrent);
7570
- return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "row", gap: 1, children: [
7571
- /* @__PURE__ */ jsx14(Text16, { color: COLORS.muted, children: "STEP" }),
7572
- /* @__PURE__ */ jsx14(Text16, { color: COLORS.strong, bold: true, children: activeStepNumber }),
7573
- /* @__PURE__ */ jsx14(Text16, { color: COLORS.strong, bold: true, children: "/" }),
7574
- /* @__PURE__ */ jsx14(Text16, { color: COLORS.strong, bold: true, children: visibleSteps.length })
7617
+ return /* @__PURE__ */ jsxs15(Box16, { flexDirection: "row", gap: 1, children: [
7618
+ /* @__PURE__ */ jsx15(Text17, { color: COLORS.muted, children: "STEP" }),
7619
+ /* @__PURE__ */ jsx15(Text17, { color: COLORS.strong, bold: true, children: activeStepNumber }),
7620
+ /* @__PURE__ */ jsx15(Text17, { color: COLORS.strong, bold: true, children: "/" }),
7621
+ /* @__PURE__ */ jsx15(Text17, { color: COLORS.strong, bold: true, children: visibleSteps.length })
7575
7622
  ] });
7576
7623
  }
7577
7624
 
@@ -7582,10 +7629,10 @@ var sidebarCommands = [
7582
7629
  ];
7583
7630
 
7584
7631
  // src/ui/Sidebar.tsx
7585
- import { jsx as jsx15, jsxs as jsxs16 } from "react/jsx-runtime";
7632
+ import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
7586
7633
  function Sidebar() {
7587
7634
  return /* @__PURE__ */ jsxs16(
7588
- Box16,
7635
+ Box17,
7589
7636
  {
7590
7637
  backgroundColor: "#14171E",
7591
7638
  width: 30,
@@ -7594,16 +7641,16 @@ function Sidebar() {
7594
7641
  flexDirection: "column",
7595
7642
  justifyContent: "space-between",
7596
7643
  children: [
7597
- /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", gap: 1, children: [
7598
- /* @__PURE__ */ jsx15(Text17, { color: COLORS.muted, children: "PROGRESS" }),
7599
- /* @__PURE__ */ jsx15(Steps, {})
7644
+ /* @__PURE__ */ jsxs16(Box17, { flexDirection: "column", gap: 1, children: [
7645
+ /* @__PURE__ */ jsx16(Text18, { color: COLORS.muted, children: "PROGRESS" }),
7646
+ /* @__PURE__ */ jsx16(Steps, {})
7600
7647
  ] }),
7601
- /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", gap: 1, children: [
7602
- /* @__PURE__ */ jsx15(Progress, {}),
7603
- /* @__PURE__ */ jsx15(Box16, { flexDirection: "column", children: sidebarCommands.map((c) => {
7604
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", gap: 1, children: [
7605
- /* @__PURE__ */ jsx15(Text17, { color: COLORS.primary, children: `[${c.keyHint}]` }),
7606
- /* @__PURE__ */ jsx15(Text17, { color: COLORS.muted, children: c.description })
7648
+ /* @__PURE__ */ jsxs16(Box17, { flexDirection: "column", gap: 1, children: [
7649
+ /* @__PURE__ */ jsx16(Progress, {}),
7650
+ /* @__PURE__ */ jsx16(Box17, { flexDirection: "column", children: sidebarCommands.map((c) => {
7651
+ return /* @__PURE__ */ jsxs16(Box17, { flexDirection: "row", gap: 1, children: [
7652
+ /* @__PURE__ */ jsx16(Text18, { color: COLORS.primary, children: `[${c.keyHint}]` }),
7653
+ /* @__PURE__ */ jsx16(Text18, { color: COLORS.muted, children: c.description })
7607
7654
  ] }, c.keyHint);
7608
7655
  }) })
7609
7656
  ] })
@@ -7613,12 +7660,12 @@ function Sidebar() {
7613
7660
  }
7614
7661
 
7615
7662
  // src/ui/Ribbon.tsx
7616
- import { Box as Box17, Text as Text18 } from "ink";
7617
- import { jsx as jsx16, jsxs as jsxs17 } from "react/jsx-runtime";
7663
+ import { Box as Box18, Text as Text19 } from "ink";
7664
+ import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
7618
7665
  function Ribbon() {
7619
7666
  const firstCommand = sidebarCommands[0];
7620
7667
  return /* @__PURE__ */ jsxs17(
7621
- Box17,
7668
+ Box18,
7622
7669
  {
7623
7670
  backgroundColor: "#14171E",
7624
7671
  flexDirection: "row",
@@ -7626,11 +7673,11 @@ function Ribbon() {
7626
7673
  paddingX: 2,
7627
7674
  paddingY: 1,
7628
7675
  children: [
7629
- /* @__PURE__ */ jsx16(Progress, {}),
7630
- /* @__PURE__ */ jsx16(CurrentStep, {}),
7631
- /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", gap: 1, children: [
7632
- /* @__PURE__ */ jsx16(Text18, { color: COLORS.primary, children: `[${firstCommand.keyHint}]` }),
7633
- /* @__PURE__ */ jsx16(Text18, { color: COLORS.muted, children: firstCommand.description })
7676
+ /* @__PURE__ */ jsx17(Progress, {}),
7677
+ /* @__PURE__ */ jsx17(CurrentStep, {}),
7678
+ /* @__PURE__ */ jsxs17(Box18, { flexDirection: "row", gap: 1, children: [
7679
+ /* @__PURE__ */ jsx17(Text19, { color: COLORS.primary, children: `[${firstCommand.keyHint}]` }),
7680
+ /* @__PURE__ */ jsx17(Text19, { color: COLORS.muted, children: firstCommand.description })
7634
7681
  ] })
7635
7682
  ]
7636
7683
  }
@@ -7641,8 +7688,8 @@ function Ribbon() {
7641
7688
  import { useState as useState12 } from "react";
7642
7689
 
7643
7690
  // src/ui/Logs.tsx
7644
- import { Box as Box18, Text as Text19, useInput as useInput8 } from "ink";
7645
- import { jsx as jsx17, jsxs as jsxs18 } from "react/jsx-runtime";
7691
+ import { Box as Box19, Text as Text20, useInput as useInput8 } from "ink";
7692
+ import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
7646
7693
  var KIND_COLOR = {
7647
7694
  tool: COLORS.primary,
7648
7695
  prompt: COLORS.badge
@@ -7678,9 +7725,9 @@ function Logs() {
7678
7725
  else if (input === "j" || key.downArrow) scroll.scrollBy(1);
7679
7726
  });
7680
7727
  const visible = logs.slice(scroll.offset, scroll.offset + scroll.capacity);
7681
- return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", paddingX: 4, paddingY: 2, flexGrow: 1, children: [
7682
- logs.length === 0 && /* @__PURE__ */ jsx17(Text19, { color: COLORS.dim, children: "No logs yet." }),
7683
- /* @__PURE__ */ jsx17(ScrollView, { scroll, children: visible.map((entry) => {
7728
+ return /* @__PURE__ */ jsxs18(Box19, { flexDirection: "column", paddingX: 4, paddingY: 2, flexGrow: 1, children: [
7729
+ logs.length === 0 && /* @__PURE__ */ jsx18(Text20, { color: COLORS.dim, children: "No logs yet." }),
7730
+ /* @__PURE__ */ jsx18(ScrollView, { scroll, children: visible.map((entry) => {
7684
7731
  const timestamp = `[${formatTimestamp(entry.startedAt)}]`;
7685
7732
  const durationText = entry.kind === "tool" && entry.durationMs !== void 0 ? `${entry.durationMs}ms` : "";
7686
7733
  const rawPreview = rawInputText(entry.input);
@@ -7690,28 +7737,28 @@ function Logs() {
7690
7737
  const name = truncate3(entry.name, budget);
7691
7738
  budget -= name.length;
7692
7739
  const preview = rawPreview ? truncate3(rawPreview, budget) : "";
7693
- return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "row", gap: ROW_GAP, children: [
7694
- /* @__PURE__ */ jsx17(Text19, { color: COLORS.dim, children: timestamp }),
7695
- /* @__PURE__ */ jsx17(Text19, { color: logNameColor(entry), wrap: "truncate", children: name }),
7696
- preview && /* @__PURE__ */ jsx17(Text19, { color: COLORS.dim, wrap: "truncate", children: preview }),
7697
- durationText && /* @__PURE__ */ jsx17(Text19, { color: COLORS.dim, children: durationText })
7740
+ return /* @__PURE__ */ jsxs18(Box19, { flexDirection: "row", gap: ROW_GAP, children: [
7741
+ /* @__PURE__ */ jsx18(Text20, { color: COLORS.dim, children: timestamp }),
7742
+ /* @__PURE__ */ jsx18(Text20, { color: logNameColor(entry), wrap: "truncate", children: name }),
7743
+ preview && /* @__PURE__ */ jsx18(Text20, { color: COLORS.dim, wrap: "truncate", children: preview }),
7744
+ durationText && /* @__PURE__ */ jsx18(Text20, { color: COLORS.dim, children: durationText })
7698
7745
  ] }, entry.id);
7699
7746
  }) }),
7700
- /* @__PURE__ */ jsxs18(Text19, { children: [
7701
- /* @__PURE__ */ jsx17(Text19, { color: COLORS.primary, children: "[j] [k]" }),
7702
- /* @__PURE__ */ jsx17(Text19, { color: COLORS.dim, children: " scroll" })
7747
+ /* @__PURE__ */ jsxs18(Text20, { children: [
7748
+ /* @__PURE__ */ jsx18(Text20, { color: COLORS.primary, children: "[j] [k]" }),
7749
+ /* @__PURE__ */ jsx18(Text20, { color: COLORS.dim, children: " scroll" })
7703
7750
  ] })
7704
7751
  ] });
7705
7752
  }
7706
7753
 
7707
7754
  // src/ui/Tips.tsx
7708
7755
  import { useEffect as useEffect3, useRef as useRef4, useState as useState11 } from "react";
7709
- import { Box as Box20, Text as Text21 } from "ink";
7756
+ import { Box as Box21, Text as Text22 } from "ink";
7710
7757
  import terminalLink from "terminal-link";
7711
7758
 
7712
7759
  // src/ui/Code.tsx
7713
- import { Box as Box19, Text as Text20 } from "ink";
7714
- import { jsx as jsx18 } from "react/jsx-runtime";
7760
+ import { Box as Box20, Text as Text21 } from "ink";
7761
+ import { jsx as jsx19 } from "react/jsx-runtime";
7715
7762
  var TOKEN_RE = /("(?:\\.|[^"\\])*"|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|[{}[\]:,])/g;
7716
7763
  function highlightJson(json) {
7717
7764
  const parts = json.split(TOKEN_RE);
@@ -7720,22 +7767,22 @@ function highlightJson(json) {
7720
7767
  if (part[0] === '"') {
7721
7768
  const next = parts.slice(i + 1).find((p) => p.trim());
7722
7769
  const isKey = next?.trimStart().startsWith(":");
7723
- return /* @__PURE__ */ jsx18(Text20, { color: isKey ? "cyan" : "green", children: part }, i);
7770
+ return /* @__PURE__ */ jsx19(Text21, { color: isKey ? "cyan" : "green", children: part }, i);
7724
7771
  }
7725
7772
  if (part === "true" || part === "false" || part === "null") {
7726
- return /* @__PURE__ */ jsx18(Text20, { color: "magenta", children: part }, i);
7773
+ return /* @__PURE__ */ jsx19(Text21, { color: "magenta", children: part }, i);
7727
7774
  }
7728
7775
  if (/^-?\d/.test(part)) {
7729
- return /* @__PURE__ */ jsx18(Text20, { color: "yellow", children: part }, i);
7776
+ return /* @__PURE__ */ jsx19(Text21, { color: "yellow", children: part }, i);
7730
7777
  }
7731
7778
  if (/^[{}[\]:,]$/.test(part)) {
7732
- return /* @__PURE__ */ jsx18(Text20, { color: COLORS.dim, children: part }, i);
7779
+ return /* @__PURE__ */ jsx19(Text21, { color: COLORS.dim, children: part }, i);
7733
7780
  }
7734
- return /* @__PURE__ */ jsx18(Text20, { children: part }, i);
7781
+ return /* @__PURE__ */ jsx19(Text21, { children: part }, i);
7735
7782
  });
7736
7783
  }
7737
7784
  function Code({ children }) {
7738
- return /* @__PURE__ */ jsx18(Box19, { children: /* @__PURE__ */ jsx18(Text20, { children: highlightJson(children) }) });
7785
+ return /* @__PURE__ */ jsx19(Box20, { children: /* @__PURE__ */ jsx19(Text21, { children: highlightJson(children) }) });
7739
7786
  }
7740
7787
 
7741
7788
  // src/ui/copy/tips.ts
@@ -7949,26 +7996,26 @@ function tipsByIds(ids) {
7949
7996
  }
7950
7997
 
7951
7998
  // src/ui/Tips.tsx
7952
- import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
7999
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
7953
8000
  var TICK_MS = 16;
7954
8001
  var CHUNK_HOLD_MS = 2e3;
7955
8002
  var HOLD_MS = 12e3;
7956
8003
  function TipTitle({ children }) {
7957
- return /* @__PURE__ */ jsxs19(Box20, { gap: 1, children: [
7958
- /* @__PURE__ */ jsx19(Text21, { color: "cyan", children: "\u2726" }),
7959
- /* @__PURE__ */ jsx19(Text21, { color: "white", bold: true, children })
8004
+ return /* @__PURE__ */ jsxs19(Box21, { gap: 1, children: [
8005
+ /* @__PURE__ */ jsx20(Text22, { color: "cyan", children: "\u2726" }),
8006
+ /* @__PURE__ */ jsx20(Text22, { color: "white", bold: true, children })
7960
8007
  ] });
7961
8008
  }
7962
8009
  function InlineSegment({ segment }) {
7963
8010
  switch (segment.type) {
7964
8011
  case "highlight":
7965
- return /* @__PURE__ */ jsx19(Text21, { color: COLORS.success, children: segment.value });
8012
+ return /* @__PURE__ */ jsx20(Text22, { color: COLORS.success, children: segment.value });
7966
8013
  case "link":
7967
- return /* @__PURE__ */ jsx19(Text21, { color: "cyan", underline: true, children: segment.href ? terminalLink(segment.value, segment.href) : segment.value });
8014
+ return /* @__PURE__ */ jsx20(Text22, { color: "cyan", underline: true, children: segment.href ? terminalLink(segment.value, segment.href) : segment.value });
7968
8015
  case "codeword":
7969
- return /* @__PURE__ */ jsx19(Text21, { color: COLORS.highlight.fg, backgroundColor: COLORS.highlight.bg, children: segment.value });
8016
+ return /* @__PURE__ */ jsx20(Text22, { color: COLORS.highlight.fg, backgroundColor: COLORS.highlight.bg, children: segment.value });
7970
8017
  default:
7971
- return /* @__PURE__ */ jsx19(Text21, { color: COLORS.muted, children: segment.value });
8018
+ return /* @__PURE__ */ jsx20(Text22, { color: COLORS.muted, children: segment.value });
7972
8019
  }
7973
8020
  }
7974
8021
  function TipContent({
@@ -8002,10 +8049,10 @@ function TipContent({
8002
8049
  blocks.push({ type: "inline", segments: [segment] });
8003
8050
  }
8004
8051
  }
8005
- return /* @__PURE__ */ jsx19(Box20, { flexDirection: "column", marginLeft: 2, gap: 1, children: blocks.map(
8006
- (block, i) => block.type === "code" ? /* @__PURE__ */ jsx19(Code, { children: block.segment.value }, i) : /* @__PURE__ */ jsx19(Text21, { children: block.segments.map((segment, j) => /* @__PURE__ */ jsxs19(Text21, { children: [
8052
+ return /* @__PURE__ */ jsx20(Box21, { flexDirection: "column", marginLeft: 2, gap: 1, children: blocks.map(
8053
+ (block, i) => block.type === "code" ? /* @__PURE__ */ jsx20(Code, { children: block.segment.value }, i) : /* @__PURE__ */ jsx20(Text22, { children: block.segments.map((segment, j) => /* @__PURE__ */ jsxs19(Text22, { children: [
8007
8054
  j > 0 && " ",
8008
- /* @__PURE__ */ jsx19(InlineSegment, { segment })
8055
+ /* @__PURE__ */ jsx20(InlineSegment, { segment })
8009
8056
  ] }, j)) }, i)
8010
8057
  ) });
8011
8058
  }
@@ -8082,9 +8129,9 @@ function Tips({
8082
8129
  if (!tip) return null;
8083
8130
  const titleRevealed = tip.title.slice(0, revealed);
8084
8131
  const contentRevealed = Math.max(0, revealed - tip.title.length);
8085
- return /* @__PURE__ */ jsxs19(Box20, { flexDirection: "column", marginBottom: 1, gap: 1, children: [
8086
- /* @__PURE__ */ jsx19(TipTitle, { children: titleRevealed }),
8087
- /* @__PURE__ */ jsx19(TipContent, { chunks: tip.chunks, revealed: contentRevealed })
8132
+ return /* @__PURE__ */ jsxs19(Box21, { flexDirection: "column", marginBottom: 1, gap: 1, children: [
8133
+ /* @__PURE__ */ jsx20(TipTitle, { children: titleRevealed }),
8134
+ /* @__PURE__ */ jsx20(TipContent, { chunks: tip.chunks, revealed: contentRevealed })
8088
8135
  ] });
8089
8136
  }
8090
8137
 
@@ -8126,7 +8173,7 @@ function useRepaintOnResize(debounceMs = 100) {
8126
8173
  }
8127
8174
 
8128
8175
  // src/ui/App.tsx
8129
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
8176
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
8130
8177
  function App() {
8131
8178
  const {
8132
8179
  phase,
@@ -8198,7 +8245,7 @@ function App() {
8198
8245
  the whole screen, and the scrolling throws off its cursor arithmetic.
8199
8246
  Flicker and leftover rows. */
8200
8247
  /* @__PURE__ */ jsxs20(
8201
- Box21,
8248
+ Box22,
8202
8249
  {
8203
8250
  backgroundColor: COLORS.bg.main,
8204
8251
  flexDirection: "row",
@@ -8207,15 +8254,15 @@ function App() {
8207
8254
  overflow: "hidden",
8208
8255
  children: [
8209
8256
  mainWindowVisible && /* @__PURE__ */ jsxs20(
8210
- Box21,
8257
+ Box22,
8211
8258
  {
8212
8259
  flexDirection,
8213
8260
  width: "100%",
8214
8261
  maxHeight: rows,
8215
8262
  justifyContent: "space-between",
8216
8263
  children: [
8217
- showLogs ? /* @__PURE__ */ jsx20(Logs, {}) : /* @__PURE__ */ jsxs20(
8218
- Box21,
8264
+ showLogs ? /* @__PURE__ */ jsx21(Logs, {}) : /* @__PURE__ */ jsxs20(
8265
+ Box22,
8219
8266
  {
8220
8267
  flexDirection: "column",
8221
8268
  paddingX: 4,
@@ -8224,35 +8271,35 @@ function App() {
8224
8271
  flexGrow: 1,
8225
8272
  gap: 1,
8226
8273
  children: [
8227
- /* @__PURE__ */ jsxs20(Box21, { flexGrow: 2, flexDirection: "column", children: [
8228
- phase === "preflight" && !user && /* @__PURE__ */ jsx20(Box21, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text22, { color: COLORS.strong, bold: true, children: [
8229
- /* @__PURE__ */ jsx20(Spinner3, { type: "dots" }),
8274
+ /* @__PURE__ */ jsxs20(Box22, { flexGrow: 2, flexDirection: "column", children: [
8275
+ phase === "preflight" && !user && /* @__PURE__ */ jsx21(Box22, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text23, { color: COLORS.strong, bold: true, children: [
8276
+ /* @__PURE__ */ jsx21(Spinner3, { type: "dots" }),
8230
8277
  " Signing in to Algolia"
8231
8278
  ] }) }),
8232
- phase === "preflight" && user && /* @__PURE__ */ jsx20(Box21, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text22, { color: COLORS.strong, bold: true, children: [
8233
- /* @__PURE__ */ jsx20(Spinner3, { type: "dots" }),
8279
+ phase === "preflight" && user && /* @__PURE__ */ jsx21(Box22, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text23, { color: COLORS.strong, bold: true, children: [
8280
+ /* @__PURE__ */ jsx21(Spinner3, { type: "dots" }),
8234
8281
  " Getting things ready"
8235
8282
  ] }) }),
8236
- phase === "authenticating" && /* @__PURE__ */ jsxs20(Box21, { flexDirection: "column", marginBottom: 1, children: [
8237
- /* @__PURE__ */ jsxs20(Text22, { color: COLORS.strong, bold: true, children: [
8238
- /* @__PURE__ */ jsx20(Spinner3, { type: "dots" }),
8283
+ phase === "authenticating" && /* @__PURE__ */ jsxs20(Box22, { flexDirection: "column", marginBottom: 1, children: [
8284
+ /* @__PURE__ */ jsxs20(Text23, { color: COLORS.strong, bold: true, children: [
8285
+ /* @__PURE__ */ jsx21(Spinner3, { type: "dots" }),
8239
8286
  " Signing in to Algolia"
8240
8287
  ] }),
8241
- /* @__PURE__ */ jsx20(Text22, { color: COLORS.muted, children: "A browser window will open \u2014 complete sign-in there." })
8288
+ /* @__PURE__ */ jsx21(Text23, { color: COLORS.muted, children: "A browser window will open \u2014 complete sign-in there." })
8242
8289
  ] }),
8243
- settingUpAppId && /* @__PURE__ */ jsx20(Box21, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text22, { color: COLORS.strong, bold: true, children: [
8244
- /* @__PURE__ */ jsx20(Spinner3, { type: "dots" }),
8290
+ settingUpAppId && /* @__PURE__ */ jsx21(Box22, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text23, { color: COLORS.strong, bold: true, children: [
8291
+ /* @__PURE__ */ jsx21(Spinner3, { type: "dots" }),
8245
8292
  " Setting up Wizard using app",
8246
8293
  " ",
8247
8294
  settingUpAppId
8248
8295
  ] }) }),
8249
- phase === "running" && !settingUpAppId && loadingMessage && /* @__PURE__ */ jsx20(Box21, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text22, { color: COLORS.strong, bold: true, children: [
8250
- /* @__PURE__ */ jsx20(Spinner3, { type: "dots" }),
8296
+ phase === "running" && !settingUpAppId && loadingMessage && /* @__PURE__ */ jsx21(Box22, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs20(Text23, { color: COLORS.strong, bold: true, children: [
8297
+ /* @__PURE__ */ jsx21(Spinner3, { type: "dots" }),
8251
8298
  " ",
8252
8299
  loadingMessage
8253
8300
  ] }) }),
8254
- /* @__PURE__ */ jsx20(CliOutput, {}),
8255
- showTips && currentStep && /* @__PURE__ */ jsx20(
8301
+ /* @__PURE__ */ jsx21(CliOutput, {}),
8302
+ showTips && currentStep && /* @__PURE__ */ jsx21(
8256
8303
  Tips,
8257
8304
  {
8258
8305
  stepId: currentStep.id,
@@ -8260,24 +8307,24 @@ function App() {
8260
8307
  onRevealStateChange: setTipState
8261
8308
  }
8262
8309
  ),
8263
- showNoticesInMain && showNotices && /* @__PURE__ */ jsx20(Notices, { showAll: true, border: false }),
8264
- /* @__PURE__ */ jsx20(Review, {}),
8265
- !showTips && /* @__PURE__ */ jsx20(PromptInput, {}),
8266
- phase === "error" && error && /* @__PURE__ */ jsx20(Box21, { marginTop: 1, children: /* @__PURE__ */ jsxs20(Text22, { color: COLORS.status.error, children: [
8310
+ showNoticesInMain && showNotices && /* @__PURE__ */ jsx21(Notices, { showAll: true, border: false }),
8311
+ /* @__PURE__ */ jsx21(Review, {}),
8312
+ !showTips && /* @__PURE__ */ jsx21(PromptInput, {}),
8313
+ phase === "error" && error && /* @__PURE__ */ jsx21(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs20(Text23, { color: COLORS.status.error, children: [
8267
8314
  "\u2716 ",
8268
8315
  error
8269
8316
  ] }) })
8270
8317
  ] }),
8271
- !showNoticesInMain && showNotices && /* @__PURE__ */ jsx20(Notices, {}),
8272
- showTips && !holdForTip && /* @__PURE__ */ jsx20(PromptInput, {})
8318
+ !showNoticesInMain && showNotices && /* @__PURE__ */ jsx21(Notices, {}),
8319
+ showTips && !holdForTip && /* @__PURE__ */ jsx21(PromptInput, {})
8273
8320
  ]
8274
8321
  }
8275
8322
  ),
8276
- showSidebar ? /* @__PURE__ */ jsx20(Sidebar, {}) : /* @__PURE__ */ jsx20(Ribbon, {})
8323
+ showSidebar ? /* @__PURE__ */ jsx21(Sidebar, {}) : /* @__PURE__ */ jsx21(Ribbon, {})
8277
8324
  ]
8278
8325
  }
8279
8326
  ),
8280
- phase === "idle" && (homeScreen === "learnMore" ? /* @__PURE__ */ jsx20(LearnMore, {}) : /* @__PURE__ */ jsx20(Welcome, {}))
8327
+ phase === "idle" && (homeScreen === "learnMore" ? /* @__PURE__ */ jsx21(LearnMore, {}) : /* @__PURE__ */ jsx21(Welcome, {}))
8281
8328
  ]
8282
8329
  }
8283
8330
  )
@@ -8493,7 +8540,7 @@ async function seedWorkflowState(workflow, value) {
8493
8540
 
8494
8541
  // src/lib/resetState.ts
8495
8542
  import { readdir as readdir3, rm as rm2 } from "node:fs/promises";
8496
- import { join as join13 } from "node:path";
8543
+ import { join as join12 } from "node:path";
8497
8544
  var KEEP = ["wizard.log"];
8498
8545
  async function resetProjectState() {
8499
8546
  const dir = stateDir();
@@ -8507,7 +8554,7 @@ async function resetProjectState() {
8507
8554
  const targets = entries.filter((name) => !KEEP.includes(name));
8508
8555
  await Promise.all(
8509
8556
  targets.map(
8510
- (name) => rm2(join13(dir, name), { recursive: true, force: true })
8557
+ (name) => rm2(join12(dir, name), { recursive: true, force: true })
8511
8558
  )
8512
8559
  );
8513
8560
  return { dir, removed: targets };
@@ -8516,7 +8563,7 @@ async function resetProjectState() {
8516
8563
  // package.json with { type: 'json' }
8517
8564
  var package_default2 = {
8518
8565
  name: "@algolia/wizard",
8519
- version: "0.78.0",
8566
+ version: "0.80.0",
8520
8567
  description: "Magically implement Algolia functionality in your codebase",
8521
8568
  type: "module",
8522
8569
  engines: {
@@ -8572,7 +8619,6 @@ var package_default2 = {
8572
8619
  dotenv: "^17.4.2",
8573
8620
  hono: "^4.13.8",
8574
8621
  ink: "^7.0.5",
8575
- "ink-picture": "^2.1.0",
8576
8622
  "ink-spinner": "^5.0.0",
8577
8623
  ioredis: "^5.11.1",
8578
8624
  nanoid: "^5.1.15",
@@ -8623,7 +8669,7 @@ async function checkVersion() {
8623
8669
  }
8624
8670
 
8625
8671
  // src/main.tsx
8626
- import { jsx as jsx21 } from "react/jsx-runtime";
8672
+ import { jsx as jsx22 } from "react/jsx-runtime";
8627
8673
  var FAILURE_EXIT_CODE = 1;
8628
8674
  async function exitProcessWithError(store, instance, message) {
8629
8675
  store.setError(message);
@@ -8686,7 +8732,7 @@ ${formatStepList(workflow)}`);
8686
8732
  async function run(opts) {
8687
8733
  const { workflow, skipResumePrompt } = opts;
8688
8734
  const store = useWizard.getState();
8689
- const instance = render(/* @__PURE__ */ jsx21(App, {}), { incrementalRendering: true });
8735
+ const instance = render(/* @__PURE__ */ jsx22(App, {}), { incrementalRendering: true });
8690
8736
  await store.waitForStart();
8691
8737
  store.syncSteps(
8692
8738
  workflow.steps.map((s) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/wizard",
3
- "version": "0.78.0",
3
+ "version": "0.80.0",
4
4
  "description": "Magically implement Algolia functionality in your codebase",
5
5
  "type": "module",
6
6
  "engines": {
@@ -56,7 +56,6 @@
56
56
  "dotenv": "^17.4.2",
57
57
  "hono": "^4.13.8",
58
58
  "ink": "^7.0.5",
59
- "ink-picture": "^2.1.0",
60
59
  "ink-spinner": "^5.0.0",
61
60
  "ioredis": "^5.11.1",
62
61
  "nanoid": "^5.1.15",
package/dist/algolia.png DELETED
Binary file