@algolia/wizard 0.9.0-rc.53.57 → 0.9.0-rc.53.58

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 (2) hide show
  1. package/dist/main.js +29 -53
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -247,20 +247,15 @@ var useWizard = create((set, get) => ({
247
247
  error: null,
248
248
  inputReq: null,
249
249
  _resolve: null,
250
- // Sign-in happens after the welcome screen's enter, so `endAuth` lands on
251
- // 'preflight': returning to 'idle' would put the welcome screen back up and
252
- // ask the user to confirm the run a second time.
250
+ // `endAuth` lands on 'preflight', not 'idle': sign-in happens after the
251
+ // welcome screen, so going back would gate the run a second time.
253
252
  beginAuth: () => set({ phase: "authenticating", cliOutput: [] }),
254
253
  endAuth: () => set((s) => s.phase === "authenticating" ? { phase: "preflight" } : {}),
255
- // Only meaningful from 'idle' — once the workflow is running there's nothing
256
- // left to confirm. `homeScreen` resets so preflight shows Welcome rather than
257
- // the Learn more sub-view.
258
254
  confirmStart: () => set(
259
255
  (s) => s.phase === "idle" ? { phase: "preflight", homeScreen: "home" } : {}
260
256
  ),
261
257
  openLearnMore: () => set({ homeScreen: "learnMore" }),
262
258
  backToHome: () => set({ homeScreen: "home" }),
263
- // Resolves whether the phase left 'idle' before or after this is called.
264
259
  waitForStart: () => new Promise((resolve4) => {
265
260
  if (get().phase !== "idle") {
266
261
  resolve4();
@@ -294,9 +289,8 @@ var useWizard = create((set, get) => ({
294
289
  setUser: (user) => set({ user }),
295
290
  appendToken: (text) => set((s) => ({ output: s.output + text })),
296
291
  clearOutput: () => set({ output: "" }),
297
- // Renders the first notice of a burst immediately, then drains later arrivals
298
- // one per `NOTICE_INTERVAL_MS`. The timer stays armed through an empty drain
299
- // so the cooldown covers the time since the last render, across bursts.
292
+ // The timer stays armed through an empty drain, so the spacing covers the
293
+ // time since the last render even across bursts.
300
294
  pushNotice: (notice) => {
301
295
  const { notices, _noticeQueue, _noticeTimer } = get();
302
296
  if (_noticeTimer === null) {
@@ -329,8 +323,6 @@ var useWizard = create((set, get) => ({
329
323
  get()._clearNoticeQueue();
330
324
  set({ notices: [] });
331
325
  },
332
- // Unthrottled, unlike `pushNotice`: holding these back would land output
333
- // after the command it belongs to has already exited.
334
326
  pushCliOutput: (stream, text) => set((s) => ({
335
327
  cliOutput: [...s.cliOutput, { id: nanoid(), stream, text }].slice(
336
328
  -CLI_OUTPUT_LIMIT
@@ -360,8 +352,6 @@ var useWizard = create((set, get) => ({
360
352
  _resolve: resolve4
361
353
  });
362
354
  }),
363
- // Logs what the user picked, not the prompt text — that just duplicates
364
- // on-screen content.
365
355
  submitInput: async (value) => {
366
356
  await markInteraction();
367
357
  get()._resolve?.(value);
@@ -1681,7 +1671,6 @@ function App() {
1681
1671
  track("AI Wizard Interaction", {
1682
1672
  context: "global",
1683
1673
  key: "esc",
1684
- // No step is active until `startWorkflow` — report the phase instead.
1685
1674
  currentStep: currentStep?.id ?? phase
1686
1675
  });
1687
1676
  exit();
@@ -1704,9 +1693,7 @@ function App() {
1704
1693
  height: scrollsPastViewport ? void 0 : rows,
1705
1694
  overflow: scrollsPastViewport ? "visible" : "hidden",
1706
1695
  children: [
1707
- mainWindowVisible && // Without a cap the scrolling lists in here grow to their content
1708
- // instead of windowing (see `useScrollWindow`).
1709
- /* @__PURE__ */ jsxs14(
1696
+ mainWindowVisible && /* @__PURE__ */ jsxs14(
1710
1697
  Box15,
1711
1698
  {
1712
1699
  flexDirection,
@@ -1714,35 +1701,29 @@ function App() {
1714
1701
  maxHeight: rows,
1715
1702
  justifyContent: "space-between",
1716
1703
  children: [
1717
- showLogs ? /* @__PURE__ */ jsx13(Logs, {}) : (
1718
- /* Fill the space the sidebar/ribbon leaves — width beside the
1719
- sidebar, height above the ribbon. The height matters even
1720
- stacked: it is what the prompt's scrolling list measures itself
1721
- against (see SelectPrompt). */
1722
- /* @__PURE__ */ jsxs14(
1723
- Box15,
1724
- {
1725
- flexDirection: "column",
1726
- paddingX: 4,
1727
- paddingY: 2,
1728
- width: showSidebar ? 70 : "100%",
1729
- flexGrow: 1,
1730
- children: [
1731
- phase === "authenticating" && /* @__PURE__ */ jsxs14(Box15, { flexDirection: "column", marginBottom: 1, children: [
1732
- /* @__PURE__ */ jsx13(Text15, { color: COLORS.strong, bold: true, children: "Signing in to Algolia" }),
1733
- /* @__PURE__ */ jsx13(Text15, { color: COLORS.muted, children: "A browser window will open \u2014 complete sign-in there." })
1734
- ] }),
1735
- /* @__PURE__ */ jsx13(CliOutput, {}),
1736
- /* @__PURE__ */ jsx13(Notices, {}),
1737
- /* @__PURE__ */ jsx13(PromptInput, {}),
1738
- phase === "running" && showSidebar && /* @__PURE__ */ jsx13(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx13(CurrentStep, {}) }),
1739
- phase === "error" && error && /* @__PURE__ */ jsx13(Box15, { marginTop: 1, children: /* @__PURE__ */ jsxs14(Text15, { color: COLORS.status.error, children: [
1740
- "\u2716 ",
1741
- error
1742
- ] }) })
1743
- ]
1744
- }
1745
- )
1704
+ showLogs ? /* @__PURE__ */ jsx13(Logs, {}) : /* @__PURE__ */ jsxs14(
1705
+ Box15,
1706
+ {
1707
+ flexDirection: "column",
1708
+ paddingX: 4,
1709
+ paddingY: 2,
1710
+ width: showSidebar ? 70 : "100%",
1711
+ flexGrow: 1,
1712
+ children: [
1713
+ phase === "authenticating" && /* @__PURE__ */ jsxs14(Box15, { flexDirection: "column", marginBottom: 1, children: [
1714
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.strong, bold: true, children: "Signing in to Algolia" }),
1715
+ /* @__PURE__ */ jsx13(Text15, { color: COLORS.muted, children: "A browser window will open \u2014 complete sign-in there." })
1716
+ ] }),
1717
+ /* @__PURE__ */ jsx13(CliOutput, {}),
1718
+ /* @__PURE__ */ jsx13(Notices, {}),
1719
+ /* @__PURE__ */ jsx13(PromptInput, {}),
1720
+ phase === "running" && showSidebar && /* @__PURE__ */ jsx13(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx13(CurrentStep, {}) }),
1721
+ phase === "error" && error && /* @__PURE__ */ jsx13(Box15, { marginTop: 1, children: /* @__PURE__ */ jsxs14(Text15, { color: COLORS.status.error, children: [
1722
+ "\u2716 ",
1723
+ error
1724
+ ] }) })
1725
+ ]
1726
+ }
1746
1727
  ),
1747
1728
  showSidebar ? /* @__PURE__ */ jsx13(Sidebar, {}) : /* @__PURE__ */ jsx13(Ribbon, {})
1748
1729
  ]
@@ -3067,7 +3048,7 @@ async function runAnalysis(mode, extraInstructions = []) {
3067
3048
  // package.json
3068
3049
  var package_default = {
3069
3050
  name: "@algolia/wizard",
3070
- version: "0.9.0-rc.53.57",
3051
+ version: "0.9.0-rc.53.58",
3071
3052
  description: "Magically implement Algolia functionality in your codebase",
3072
3053
  type: "module",
3073
3054
  engines: {
@@ -3818,8 +3799,6 @@ var implementSchema = z26.object({
3818
3799
  ingestRecordCount: z26.number().optional(),
3819
3800
  ingestDurationMs: z26.number().optional(),
3820
3801
  ingestionSource: z26.enum(["local", "fileUpload", "generated"]),
3821
- // Hints, not ground truth: the search agent may rename the prefix to match
3822
- // the project's build tool, and its summary carries the final names.
3823
3802
  searchEnvVars: z26.array(
3824
3803
  z26.object({
3825
3804
  name: z26.string(),
@@ -3949,8 +3928,6 @@ function searchInstructions(input) {
3949
3928
  doc,
3950
3929
  `Add the search UI at ${input.searchLocation ? `"${input.searchLocation}"` : "the best shared, always-rendered layout location (e.g. a header/nav component)"} so it is reachable across the app \u2014 at least a working SearchBox and Hits against the "${input.targetIndex}" index.`,
3951
3930
  "Read the App ID and a search-only API key from public env vars; never hardcode them. A search-only key is safe to expose client-side.",
3952
- // appId always resolves (requireApplication throws otherwise); only the key
3953
- // can fall back to a placeholder.
3954
3931
  `Values: App ID "${input.appId}", search-only key ${input.searchKey ? `"${input.searchKey}"` : "(placeholder for the developer to fill in)"}.`,
3955
3932
  // Not the agent's to rename: the wizard writes these exact names into
3956
3933
  // ".env" right after this step, so a renamed prefix would leave the code
@@ -4300,7 +4277,6 @@ ${run2.output}` : status;
4300
4277
  );
4301
4278
  }
4302
4279
  await ctx.requestUserInput({
4303
- // Nothing to ask — the continue/decline hints carry the whole prompt.
4304
4280
  prompt: "",
4305
4281
  promptType: "enterToContinue",
4306
4282
  options: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/wizard",
3
- "version": "0.9.0-rc.53.57",
3
+ "version": "0.9.0-rc.53.58",
4
4
  "description": "Magically implement Algolia functionality in your codebase",
5
5
  "type": "module",
6
6
  "engines": {