kimiflare 0.60.1 → 0.62.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/index.js CHANGED
@@ -3715,9 +3715,17 @@ ${sandboxResult.output}` : sandboxResult.output;
3715
3715
  loopExhausted = false;
3716
3716
  recentToolCalls.length = 0;
3717
3717
  continue;
3718
- } else {
3719
- return;
3720
3718
  }
3719
+ if (decision === "synthesize") {
3720
+ opts2.messages.push({
3721
+ role: "system",
3722
+ content: "You were stuck calling the same tools with identical arguments. Please synthesize and conclude your findings so far. Do not call any more tools."
3723
+ });
3724
+ loopExhausted = false;
3725
+ recentToolCalls.length = 0;
3726
+ continue;
3727
+ }
3728
+ return;
3721
3729
  }
3722
3730
  throw new AgentLoopError();
3723
3731
  }
@@ -11236,6 +11244,12 @@ var init_chat = __esm({
11236
11244
  if (evt.kind === "service_ended") {
11237
11245
  return /* @__PURE__ */ jsx8(ServiceEndedMessage, { endedAt: evt.endedAt });
11238
11246
  }
11247
+ if (evt.kind === "qrcode") {
11248
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", marginY: 1, children: [
11249
+ /* @__PURE__ */ jsx8(Text7, { color: theme.info.color, children: evt.caption }),
11250
+ /* @__PURE__ */ jsx8(Box7, { flexDirection: "column", marginTop: 1, children: evt.lines.map((line, i) => /* @__PURE__ */ jsx8(Text7, { children: line }, i)) })
11251
+ ] });
11252
+ }
11239
11253
  return /* @__PURE__ */ jsxs7(Text7, { color: theme.error, children: [
11240
11254
  "! ",
11241
11255
  evt.text
@@ -12299,19 +12313,20 @@ var init_permission = __esm({
12299
12313
  import { Box as Box10, Text as Text11 } from "ink";
12300
12314
  import SelectInput from "ink-select-input";
12301
12315
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
12302
- function LimitModal({ limit, onDecide, title, description }) {
12316
+ function LimitModal({ limit, onDecide, title, description, items }) {
12303
12317
  const theme = useTheme();
12304
- const items = [
12318
+ const defaultItems = [
12305
12319
  { label: "Continue", value: "continue" },
12306
12320
  { label: "Stop", value: "stop" }
12307
12321
  ];
12322
+ const selectItems = items ?? defaultItems;
12308
12323
  return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", borderStyle: "round", borderColor: theme.error, paddingX: 1, children: [
12309
12324
  /* @__PURE__ */ jsx12(Text11, { color: theme.error, bold: true, children: title ?? `Tool-call limit reached (${limit})` }),
12310
12325
  /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: description ?? `This session has made ${limit} tool calls. What would you like to do?` }),
12311
12326
  /* @__PURE__ */ jsx12(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx12(
12312
12327
  SelectInput,
12313
12328
  {
12314
- items,
12329
+ items: selectItems,
12315
12330
  onSelect: (item) => onDecide(item.value)
12316
12331
  }
12317
12332
  ) })
@@ -13448,6 +13463,179 @@ var init_remote_dashboard = __esm({
13448
13463
  }
13449
13464
  });
13450
13465
 
13466
+ // src/ui/inbox-modal.tsx
13467
+ import { useState as useState10, useCallback as useCallback3 } from "react";
13468
+ import { Box as Box17, Text as Text18, useInput as useInput7 } from "ink";
13469
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
13470
+ function InboxModal({ onDone, onOpen }) {
13471
+ const theme = useTheme();
13472
+ const [step, setStep] = useState10("twitter");
13473
+ const [twitter, setTwitter] = useState10("");
13474
+ const [secret, setSecret] = useState10("");
13475
+ const [messages, setMessages] = useState10([]);
13476
+ const [selectedIndex, setSelectedIndex] = useState10(0);
13477
+ const [error, setError] = useState10(null);
13478
+ const checkInbox = useCallback3(
13479
+ async (u, s) => {
13480
+ setStep("checking");
13481
+ setError(null);
13482
+ try {
13483
+ const res = await fetch(
13484
+ `${FEEDBACK_WORKER_URL}/inbox/check?u=${encodeURIComponent(u)}&s=${encodeURIComponent(s)}`
13485
+ );
13486
+ if (!res.ok) {
13487
+ throw new Error(`Server returned ${res.status}`);
13488
+ }
13489
+ const data = await res.json();
13490
+ const sorted = (data.messages ?? []).sort((a, b) => b.createdAt - a.createdAt);
13491
+ setMessages(sorted);
13492
+ setSelectedIndex(0);
13493
+ setStep("result");
13494
+ } catch (e) {
13495
+ setError(e instanceof Error ? e.message : String(e));
13496
+ setMessages([]);
13497
+ setStep("result");
13498
+ }
13499
+ },
13500
+ []
13501
+ );
13502
+ const handleTwitterSubmit = useCallback3(
13503
+ (value) => {
13504
+ const trimmed = value.trim();
13505
+ if (!trimmed) {
13506
+ onDone();
13507
+ return;
13508
+ }
13509
+ setTwitter(trimmed);
13510
+ setStep("secret");
13511
+ },
13512
+ [onDone]
13513
+ );
13514
+ const handleSecretSubmit = useCallback3(
13515
+ (value) => {
13516
+ const trimmed = value.trim();
13517
+ if (!trimmed) {
13518
+ onDone();
13519
+ return;
13520
+ }
13521
+ setSecret(trimmed);
13522
+ void checkInbox(twitter, trimmed);
13523
+ },
13524
+ [twitter, checkInbox, onDone]
13525
+ );
13526
+ const openSelected = useCallback3(() => {
13527
+ if (messages.length === 0) return;
13528
+ const msg = messages[selectedIndex];
13529
+ if (!msg) return;
13530
+ const url = `${FEEDBACK_WORKER_URL}/inbox?u=${encodeURIComponent(twitter)}&s=${encodeURIComponent(secret)}&m=${encodeURIComponent(msg.id)}`;
13531
+ onOpen(url);
13532
+ onDone();
13533
+ }, [messages, selectedIndex, twitter, secret, onOpen, onDone]);
13534
+ useInput7(
13535
+ (_input, key) => {
13536
+ if (key.escape) {
13537
+ onDone();
13538
+ return;
13539
+ }
13540
+ if (step === "result") {
13541
+ if (key.upArrow) {
13542
+ setSelectedIndex((i) => Math.max(0, i - 1));
13543
+ return;
13544
+ }
13545
+ if (key.downArrow) {
13546
+ setSelectedIndex((i) => Math.min(messages.length - 1, i + 1));
13547
+ return;
13548
+ }
13549
+ if (key.return && messages.length > 0) {
13550
+ openSelected();
13551
+ }
13552
+ }
13553
+ },
13554
+ { isActive: step === "result" }
13555
+ );
13556
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
13557
+ /* @__PURE__ */ jsx19(Text18, { color: theme.accent, bold: true, children: "/inbox" }),
13558
+ step === "twitter" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
13559
+ /* @__PURE__ */ jsx19(Text18, { color: theme.palette.foreground, children: "Enter your Twitter username (or press Enter to cancel):" }),
13560
+ /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
13561
+ CustomTextInput,
13562
+ {
13563
+ value: twitter,
13564
+ onChange: setTwitter,
13565
+ onSubmit: handleTwitterSubmit,
13566
+ focus: true
13567
+ }
13568
+ ) })
13569
+ ] }),
13570
+ step === "secret" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
13571
+ /* @__PURE__ */ jsx19(Text18, { color: theme.palette.foreground, children: "Enter your secret (or press Enter to cancel):" }),
13572
+ /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
13573
+ CustomTextInput,
13574
+ {
13575
+ value: secret,
13576
+ onChange: setSecret,
13577
+ onSubmit: handleSecretSubmit,
13578
+ mask: "*",
13579
+ focus: true
13580
+ }
13581
+ ) })
13582
+ ] }),
13583
+ step === "checking" && /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Checking your inbox\u2026" }),
13584
+ step === "result" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
13585
+ error ? /* @__PURE__ */ jsxs17(Text18, { color: theme.error, children: [
13586
+ "Error: ",
13587
+ error
13588
+ ] }) : messages.length > 0 ? /* @__PURE__ */ jsxs17(Fragment2, { children: [
13589
+ /* @__PURE__ */ jsxs17(Text18, { color: theme.palette.foreground, children: [
13590
+ "You have ",
13591
+ messages.length,
13592
+ " message",
13593
+ messages.length === 1 ? "" : "s",
13594
+ messages.some((m) => !m.seen) ? " (\u{1F534} new)" : "",
13595
+ ":"
13596
+ ] }),
13597
+ /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", marginTop: 1, children: messages.map((msg, idx) => {
13598
+ const isSelected = idx === selectedIndex;
13599
+ const dateStr = new Date(msg.createdAt).toLocaleString();
13600
+ const marker = msg.seen ? " " : "\u{1F534} ";
13601
+ return /* @__PURE__ */ jsxs17(
13602
+ Text18,
13603
+ {
13604
+ color: isSelected ? theme.accent : theme.palette.foreground,
13605
+ bold: isSelected,
13606
+ dimColor: !isSelected && msg.seen,
13607
+ children: [
13608
+ isSelected ? "> " : " ",
13609
+ marker,
13610
+ dateStr,
13611
+ msg.seen ? " (played)" : " (new)"
13612
+ ]
13613
+ },
13614
+ msg.id
13615
+ );
13616
+ }) }),
13617
+ /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "\u2191\u2193 to select \xB7 Enter to open in browser" }) })
13618
+ ] }) : /* @__PURE__ */ jsxs17(Text18, { color: theme.muted?.color ?? theme.palette.secondary, children: [
13619
+ "No messages yet for @",
13620
+ twitter,
13621
+ " / ",
13622
+ secret.replace(/./g, "*"),
13623
+ "."
13624
+ ] }),
13625
+ /* @__PURE__ */ jsx19(Text18, { dimColor: true, children: "Press Esc to close." })
13626
+ ] })
13627
+ ] });
13628
+ }
13629
+ var FEEDBACK_WORKER_URL;
13630
+ var init_inbox_modal = __esm({
13631
+ "src/ui/inbox-modal.tsx"() {
13632
+ "use strict";
13633
+ init_text_input();
13634
+ init_theme_context();
13635
+ FEEDBACK_WORKER_URL = "https://hello.kimiflare.com";
13636
+ }
13637
+ });
13638
+
13451
13639
  // src/intent/classify.ts
13452
13640
  function classifyIntent(prompt) {
13453
13641
  let intentScore = 0;
@@ -14391,6 +14579,7 @@ var init_builtins = __esm({
14391
14579
  { name: "remote", argHint: "<prompt>", description: "Run a remote session on Cloudflare", source: "builtin" },
14392
14580
  { name: "update", description: "Check for updates", source: "builtin" },
14393
14581
  { name: "hello", description: "Send a voice note to the creator", source: "builtin" },
14582
+ { name: "inbox", description: "Check for a voice reply from the creator", source: "builtin" },
14394
14583
  { name: "report", argHint: "[send] [note]", description: "Report the last API error with diagnostic logs", source: "builtin" },
14395
14584
  { name: "shell", argHint: "[auto|bash|cmd|powershell|<path>]", description: "Show or set shell for bash tool", source: "builtin" },
14396
14585
  { name: "logout", description: "Clear stored credentials", source: "builtin" },
@@ -14432,21 +14621,21 @@ var init_save = __esm({
14432
14621
  });
14433
14622
 
14434
14623
  // src/ui/command-wizard.tsx
14435
- import { useState as useState10 } from "react";
14436
- import { Box as Box17, Text as Text18, useInput as useInput7, useWindowSize } from "ink";
14624
+ import { useState as useState11 } from "react";
14625
+ import { Box as Box18, Text as Text19, useInput as useInput8, useWindowSize } from "ink";
14437
14626
  import SelectInput6 from "ink-select-input";
14438
- import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
14627
+ import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
14439
14628
  function CommandWizard({ mode, initial, existingNames, builtinNames, onDone, onSave }) {
14440
14629
  const theme = useTheme();
14441
- const [step, setStep] = useState10("name");
14442
- const [name, setName] = useState10(initial?.name ?? "");
14443
- const [description, setDescription] = useState10(initial?.description ?? "");
14444
- const [template, setTemplate] = useState10(initial?.template ?? "");
14445
- const [cmdMode, setCmdMode] = useState10(initial?.mode);
14446
- const [cmdEffort, setCmdEffort] = useState10(initial?.effort);
14447
- const [cmdModel, setCmdModel] = useState10(initial?.model);
14448
- const [source, setSource] = useState10(initial?.source ?? "project");
14449
- const [error, setError] = useState10(null);
14630
+ const [step, setStep] = useState11("name");
14631
+ const [name, setName] = useState11(initial?.name ?? "");
14632
+ const [description, setDescription] = useState11(initial?.description ?? "");
14633
+ const [template, setTemplate] = useState11(initial?.template ?? "");
14634
+ const [cmdMode, setCmdMode] = useState11(initial?.mode);
14635
+ const [cmdEffort, setCmdEffort] = useState11(initial?.effort);
14636
+ const [cmdModel, setCmdModel] = useState11(initial?.model);
14637
+ const [source, setSource] = useState11(initial?.source ?? "project");
14638
+ const [error, setError] = useState11(null);
14450
14639
  const { columns } = useWindowSize();
14451
14640
  const totalSteps = 5;
14452
14641
  const stepIndex = step === "name" ? 1 : step === "description" ? 2 : step === "template" ? 3 : step === "advanced" || step === "mode" || step === "effort" || step === "model" ? 4 : step === "location" ? 4 : 5;
@@ -14459,7 +14648,7 @@ function CommandWizard({ mode, initial, existingNames, builtinNames, onDone, onS
14459
14648
  if (existingNames.includes(trimmed) && !isEditingSelf(trimmed)) return `/${trimmed} already exists`;
14460
14649
  return null;
14461
14650
  };
14462
- useInput7((_input, key) => {
14651
+ useInput8((_input, key) => {
14463
14652
  if (key.escape) {
14464
14653
  onDone();
14465
14654
  }
@@ -14559,8 +14748,8 @@ ${template}`;
14559
14748
  const renderStep = () => {
14560
14749
  switch (step) {
14561
14750
  case "name":
14562
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14563
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14751
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14752
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14564
14753
  mode === "create" ? "Create" : "Edit",
14565
14754
  " custom command \u2014 Name (",
14566
14755
  stepIndex,
@@ -14568,8 +14757,8 @@ ${template}`;
14568
14757
  totalSteps,
14569
14758
  ")"
14570
14759
  ] }),
14571
- error && /* @__PURE__ */ jsx19(Text18, { color: theme.error, children: error }),
14572
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14760
+ error && /* @__PURE__ */ jsx20(Text19, { color: theme.error, children: error }),
14761
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14573
14762
  CustomTextInput,
14574
14763
  {
14575
14764
  value: name,
@@ -14578,11 +14767,11 @@ ${template}`;
14578
14767
  focus: true
14579
14768
  }
14580
14769
  ) }),
14581
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "letters, numbers, _ - / only; must start with a letter" })
14770
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "letters, numbers, _ - / only; must start with a letter" })
14582
14771
  ] });
14583
14772
  case "description":
14584
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14585
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14773
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14774
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14586
14775
  mode === "create" ? "Create" : "Edit",
14587
14776
  " custom command \u2014 Description (",
14588
14777
  stepIndex,
@@ -14590,7 +14779,7 @@ ${template}`;
14590
14779
  totalSteps,
14591
14780
  ")"
14592
14781
  ] }),
14593
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14782
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14594
14783
  CustomTextInput,
14595
14784
  {
14596
14785
  value: description,
@@ -14599,49 +14788,49 @@ ${template}`;
14599
14788
  focus: true
14600
14789
  }
14601
14790
  ) }),
14602
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Press Enter to skip" })
14791
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Press Enter to skip" })
14603
14792
  ] });
14604
14793
  case "template": {
14605
- const guide = /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", paddingLeft: 1, children: [
14606
- /* @__PURE__ */ jsx19(Text18, { color: theme.accent, bold: true, children: "What is this?" }),
14607
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "A prompt template \u2014 instructions to the AI." }),
14608
- /* @__PURE__ */ jsxs17(Text18, { color: theme.info.color, children: [
14794
+ const guide = /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", paddingLeft: 1, children: [
14795
+ /* @__PURE__ */ jsx20(Text19, { color: theme.accent, bold: true, children: "What is this?" }),
14796
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "A prompt template \u2014 instructions to the AI." }),
14797
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.info.color, children: [
14609
14798
  "When you type /",
14610
14799
  name || "yourcommand",
14611
14800
  " later, this gets sent to the model."
14612
14801
  ] }),
14613
- /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "column", children: [
14614
- /* @__PURE__ */ jsx19(Text18, { color: theme.accent, bold: true, children: "Variables" }),
14615
- /* @__PURE__ */ jsxs17(Text18, { color: theme.info.color, children: [
14802
+ /* @__PURE__ */ jsxs18(Box18, { marginTop: 1, flexDirection: "column", children: [
14803
+ /* @__PURE__ */ jsx20(Text19, { color: theme.accent, bold: true, children: "Variables" }),
14804
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.info.color, children: [
14616
14805
  " ",
14617
14806
  "$1, $2 ... \u2192 arguments you type"
14618
14807
  ] }),
14619
- /* @__PURE__ */ jsxs17(Text18, { color: theme.info.color, children: [
14808
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.info.color, children: [
14620
14809
  " ",
14621
14810
  "$ARGUMENTS \u2192 everything after the command"
14622
14811
  ] })
14623
14812
  ] }),
14624
- /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "column", children: [
14625
- /* @__PURE__ */ jsx19(Text18, { color: theme.accent, bold: true, children: "Dynamic inlines" }),
14626
- /* @__PURE__ */ jsxs17(Text18, { color: theme.info.color, children: [
14813
+ /* @__PURE__ */ jsxs18(Box18, { marginTop: 1, flexDirection: "column", children: [
14814
+ /* @__PURE__ */ jsx20(Text19, { color: theme.accent, bold: true, children: "Dynamic inlines" }),
14815
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.info.color, children: [
14627
14816
  " ",
14628
14817
  "!`git diff` \u2192 shell output inlined"
14629
14818
  ] }),
14630
- /* @__PURE__ */ jsxs17(Text18, { color: theme.info.color, children: [
14819
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.info.color, children: [
14631
14820
  " ",
14632
14821
  "@README.md \u2192 file contents inlined"
14633
14822
  ] })
14634
14823
  ] }),
14635
- /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "column", children: [
14636
- /* @__PURE__ */ jsx19(Text18, { color: theme.accent, bold: true, children: "Example" }),
14637
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Review this PR diff:" }),
14638
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "!`git diff main...HEAD`" }),
14639
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Focus on: $1" })
14824
+ /* @__PURE__ */ jsxs18(Box18, { marginTop: 1, flexDirection: "column", children: [
14825
+ /* @__PURE__ */ jsx20(Text19, { color: theme.accent, bold: true, children: "Example" }),
14826
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Review this PR diff:" }),
14827
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "!`git diff main...HEAD`" }),
14828
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Focus on: $1" })
14640
14829
  ] })
14641
14830
  ] });
14642
- const inputArea = /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", flexGrow: 1, children: [
14643
- error && /* @__PURE__ */ jsx19(Text18, { color: theme.error, children: error }),
14644
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14831
+ const inputArea = /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", flexGrow: 1, children: [
14832
+ error && /* @__PURE__ */ jsx20(Text19, { color: theme.error, children: error }),
14833
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14645
14834
  CustomTextInput,
14646
14835
  {
14647
14836
  value: template,
@@ -14651,13 +14840,13 @@ ${template}`;
14651
14840
  enablePaste: true
14652
14841
  }
14653
14842
  ) }),
14654
- columns < 100 && /* @__PURE__ */ jsxs17(Fragment2, { children: [
14655
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Paste multi-line templates with Ctrl+V." }),
14656
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Variables: $1 $2 ... $ARGUMENTS Shell: !`cmd` File: @path" })
14843
+ columns < 100 && /* @__PURE__ */ jsxs18(Fragment3, { children: [
14844
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Paste multi-line templates with Ctrl+V." }),
14845
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Variables: $1 $2 ... $ARGUMENTS Shell: !`cmd` File: @path" })
14657
14846
  ] })
14658
14847
  ] });
14659
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14660
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14848
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14849
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14661
14850
  mode === "create" ? "Create" : "Edit",
14662
14851
  " custom command \u2014 Template (",
14663
14852
  stepIndex,
@@ -14665,10 +14854,10 @@ ${template}`;
14665
14854
  totalSteps,
14666
14855
  ")"
14667
14856
  ] }),
14668
- columns >= 100 ? /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", marginTop: 1, children: [
14669
- /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", width: "50%", children: inputArea }),
14670
- /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", width: "50%", children: guide })
14671
- ] }) : /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", marginTop: 1, children: inputArea })
14857
+ columns >= 100 ? /* @__PURE__ */ jsxs18(Box18, { flexDirection: "row", marginTop: 1, children: [
14858
+ /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", width: "50%", children: inputArea }),
14859
+ /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", width: "50%", children: guide })
14860
+ ] }) : /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", marginTop: 1, children: inputArea })
14672
14861
  ] });
14673
14862
  }
14674
14863
  case "advanced": {
@@ -14677,8 +14866,8 @@ ${template}`;
14677
14866
  { label: "Skip", value: "skip", key: "skip" },
14678
14867
  { label: "\u2190 Cancel", value: "cancel", key: "cancel" }
14679
14868
  ];
14680
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14681
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14869
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14870
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14682
14871
  mode === "create" ? "Create" : "Edit",
14683
14872
  " custom command \u2014 Options (",
14684
14873
  stepIndex,
@@ -14686,7 +14875,7 @@ ${template}`;
14686
14875
  totalSteps,
14687
14876
  ")"
14688
14877
  ] }),
14689
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14878
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14690
14879
  SelectInput6,
14691
14880
  {
14692
14881
  items,
@@ -14706,16 +14895,16 @@ ${template}`;
14706
14895
  { label: cmdMode === "auto" ? "auto \xB7 current" : "auto", value: "auto", key: "auto" },
14707
14896
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
14708
14897
  ];
14709
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14710
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14898
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14899
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14711
14900
  "Mode override (",
14712
14901
  stepIndex,
14713
14902
  "/",
14714
14903
  totalSteps,
14715
14904
  ")"
14716
14905
  ] }),
14717
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Saved to file but not yet enforced at runtime" }),
14718
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14906
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Saved to file but not yet enforced at runtime" }),
14907
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14719
14908
  SelectInput6,
14720
14909
  {
14721
14910
  items,
@@ -14735,15 +14924,15 @@ ${template}`;
14735
14924
  { label: cmdEffort === "high" ? "high \xB7 current" : "high", value: "high", key: "high" },
14736
14925
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
14737
14926
  ];
14738
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14739
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14927
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14928
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14740
14929
  "Reasoning effort (",
14741
14930
  stepIndex,
14742
14931
  "/",
14743
14932
  totalSteps,
14744
14933
  ")"
14745
14934
  ] }),
14746
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14935
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14747
14936
  SelectInput6,
14748
14937
  {
14749
14938
  items,
@@ -14756,15 +14945,15 @@ ${template}`;
14756
14945
  ] });
14757
14946
  }
14758
14947
  case "model":
14759
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14760
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14948
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14949
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14761
14950
  "Model override (",
14762
14951
  stepIndex,
14763
14952
  "/",
14764
14953
  totalSteps,
14765
14954
  ")"
14766
14955
  ] }),
14767
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14956
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14768
14957
  CustomTextInput,
14769
14958
  {
14770
14959
  value: cmdModel ?? "",
@@ -14773,7 +14962,7 @@ ${template}`;
14773
14962
  focus: true
14774
14963
  }
14775
14964
  ) }),
14776
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Press Enter to skip" })
14965
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Press Enter to skip" })
14777
14966
  ] });
14778
14967
  case "location": {
14779
14968
  const items = [
@@ -14781,15 +14970,15 @@ ${template}`;
14781
14970
  { label: source === "global" ? "Global \xB7 current" : "Global", value: "global", key: "global" },
14782
14971
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
14783
14972
  ];
14784
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14785
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14973
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
14974
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14786
14975
  "Save location (",
14787
14976
  stepIndex,
14788
14977
  "/",
14789
14978
  totalSteps,
14790
14979
  ")"
14791
14980
  ] }),
14792
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
14981
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14793
14982
  SelectInput6,
14794
14983
  {
14795
14984
  items,
@@ -14799,7 +14988,7 @@ ${template}`;
14799
14988
  }
14800
14989
  }
14801
14990
  ) }),
14802
- /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: "Project: .kimiflare/commands/ Global: ~/.config/kimiflare/commands/" })
14991
+ /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: "Project: .kimiflare/commands/ Global: ~/.config/kimiflare/commands/" })
14803
14992
  ] });
14804
14993
  }
14805
14994
  case "confirm": {
@@ -14807,8 +14996,8 @@ ${template}`;
14807
14996
  { label: "Save", value: "save", key: "save" },
14808
14997
  { label: "Cancel", value: "cancel", key: "cancel" }
14809
14998
  ];
14810
- return /* @__PURE__ */ jsxs17(Fragment2, { children: [
14811
- /* @__PURE__ */ jsxs17(Text18, { color: theme.accent, bold: true, children: [
14999
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
15000
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.accent, bold: true, children: [
14812
15001
  mode === "create" ? "Create" : "Edit",
14813
15002
  " custom command \u2014 Confirm (",
14814
15003
  stepIndex,
@@ -14816,13 +15005,13 @@ ${template}`;
14816
15005
  totalSteps,
14817
15006
  ")"
14818
15007
  ] }),
14819
- /* @__PURE__ */ jsxs17(Text18, { color: theme.info.color, children: [
15008
+ /* @__PURE__ */ jsxs18(Text19, { color: theme.info.color, children: [
14820
15009
  source === "project" ? ".kimiflare/commands/" : "~/.config/kimiflare/commands/",
14821
15010
  name,
14822
15011
  ".md"
14823
15012
  ] }),
14824
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, flexDirection: "column", children: previewContent().split("\n").map((line, i) => /* @__PURE__ */ jsx19(Text18, { color: theme.info.color, children: line || " " }, i)) }),
14825
- /* @__PURE__ */ jsx19(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx19(
15013
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, flexDirection: "column", children: previewContent().split("\n").map((line, i) => /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, children: line || " " }, i)) }),
15014
+ /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
14826
15015
  SelectInput6,
14827
15016
  {
14828
15017
  items,
@@ -14833,7 +15022,7 @@ ${template}`;
14833
15022
  }
14834
15023
  }
14835
15024
  };
14836
- return /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: renderStep() });
15025
+ return /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: renderStep() });
14837
15026
  }
14838
15027
  var NAME_RE;
14839
15028
  var init_command_wizard = __esm({
@@ -15278,9 +15467,9 @@ var init_context_generator = __esm({
15278
15467
  });
15279
15468
 
15280
15469
  // src/ui/command-picker.tsx
15281
- import { Box as Box18, Text as Text19 } from "ink";
15470
+ import { Box as Box19, Text as Text20 } from "ink";
15282
15471
  import SelectInput7 from "ink-select-input";
15283
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
15472
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
15284
15473
  function CommandPicker({ commands, title, onPick }) {
15285
15474
  const theme = useTheme();
15286
15475
  const items = commands.map((cmd) => ({
@@ -15289,10 +15478,10 @@ function CommandPicker({ commands, title, onPick }) {
15289
15478
  key: cmd.name
15290
15479
  }));
15291
15480
  items.push({ label: "\u2190 Cancel", value: null, key: "__cancel__" });
15292
- return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15293
- /* @__PURE__ */ jsx20(Text19, { color: theme.accent, bold: true, children: title }),
15294
- /* @__PURE__ */ jsx20(Text19, { color: theme.info.color, dimColor: false, children: "Arrow keys to navigate, Enter to select." }),
15295
- /* @__PURE__ */ jsx20(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx20(
15481
+ return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15482
+ /* @__PURE__ */ jsx21(Text20, { color: theme.accent, bold: true, children: title }),
15483
+ /* @__PURE__ */ jsx21(Text20, { color: theme.info.color, dimColor: false, children: "Arrow keys to navigate, Enter to select." }),
15484
+ /* @__PURE__ */ jsx21(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx21(
15296
15485
  SelectInput7,
15297
15486
  {
15298
15487
  items,
@@ -15315,64 +15504,64 @@ var init_command_picker = __esm({
15315
15504
  });
15316
15505
 
15317
15506
  // src/ui/command-list.tsx
15318
- import { Box as Box19, Text as Text20, useInput as useInput8 } from "ink";
15319
- import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
15507
+ import { Box as Box20, Text as Text21, useInput as useInput9 } from "ink";
15508
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
15320
15509
  function CommandList({ commands, onDone }) {
15321
15510
  const theme = useTheme();
15322
- useInput8((_input, key) => {
15511
+ useInput9((_input, key) => {
15323
15512
  if (key.escape) {
15324
15513
  onDone();
15325
15514
  }
15326
15515
  });
15327
- return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15328
- /* @__PURE__ */ jsx21(Text20, { color: theme.accent, bold: true, children: "Custom commands" }),
15329
- /* @__PURE__ */ jsx21(Text20, { color: theme.info.color, dimColor: false, children: "Esc to close." }),
15330
- /* @__PURE__ */ jsxs19(Box19, { marginTop: 1, flexDirection: "column", children: [
15331
- commands.length === 0 && /* @__PURE__ */ jsx21(Text20, { color: theme.info.color, children: "No custom commands found." }),
15332
- commands.map((cmd) => /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", marginBottom: 1, children: [
15333
- /* @__PURE__ */ jsxs19(Text20, { color: theme.accent, bold: true, children: [
15516
+ return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15517
+ /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Custom commands" }),
15518
+ /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Esc to close." }),
15519
+ /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "column", children: [
15520
+ commands.length === 0 && /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, children: "No custom commands found." }),
15521
+ commands.map((cmd) => /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", marginBottom: 1, children: [
15522
+ /* @__PURE__ */ jsxs20(Text21, { color: theme.accent, bold: true, children: [
15334
15523
  "/",
15335
15524
  cmd.name
15336
15525
  ] }),
15337
- /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15526
+ /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15338
15527
  " ",
15339
15528
  "source: ",
15340
15529
  cmd.source
15341
15530
  ] }),
15342
- /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15531
+ /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15343
15532
  " ",
15344
15533
  "path: ",
15345
15534
  cmd.filepath
15346
15535
  ] }),
15347
- cmd.description && /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15536
+ cmd.description && /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15348
15537
  " ",
15349
15538
  "desc: ",
15350
15539
  cmd.description
15351
15540
  ] }),
15352
- cmd.mode && /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15541
+ cmd.mode && /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15353
15542
  " ",
15354
15543
  "mode: ",
15355
15544
  cmd.mode
15356
15545
  ] }),
15357
- cmd.effort && /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15546
+ cmd.effort && /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15358
15547
  " ",
15359
15548
  "effort: ",
15360
15549
  cmd.effort
15361
15550
  ] }),
15362
- cmd.model && /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15551
+ cmd.model && /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15363
15552
  " ",
15364
15553
  "model: ",
15365
15554
  cmd.model
15366
15555
  ] }),
15367
- /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15556
+ /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15368
15557
  " ",
15369
15558
  "template:"
15370
15559
  ] }),
15371
- cmd.template.split("\n").slice(0, 5).map((line, i) => /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15560
+ cmd.template.split("\n").slice(0, 5).map((line, i) => /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15372
15561
  " ",
15373
15562
  line || " "
15374
15563
  ] }, i)),
15375
- cmd.template.split("\n").length > 5 && /* @__PURE__ */ jsxs19(Text20, { color: theme.info.color, children: [
15564
+ cmd.template.split("\n").length > 5 && /* @__PURE__ */ jsxs20(Text21, { color: theme.info.color, children: [
15376
15565
  " ",
15377
15566
  "..."
15378
15567
  ] })
@@ -15388,20 +15577,20 @@ var init_command_list = __esm({
15388
15577
  });
15389
15578
 
15390
15579
  // src/ui/lsp-wizard.tsx
15391
- import { useState as useState11 } from "react";
15392
- import { Box as Box20, Text as Text21 } from "ink";
15580
+ import { useState as useState12 } from "react";
15581
+ import { Box as Box21, Text as Text22 } from "ink";
15393
15582
  import SelectInput8 from "ink-select-input";
15394
15583
  import { spawn as spawn3 } from "child_process";
15395
- import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
15584
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
15396
15585
  function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15397
15586
  const theme = useTheme();
15398
- const [page, setPage] = useState11("main");
15399
- const [selectedPreset, setSelectedPreset] = useState11(null);
15400
- const [customName, setCustomName] = useState11("");
15401
- const [customCommand, setCustomCommand] = useState11("");
15402
- const [installState, setInstallState] = useState11({ status: "idle", output: "" });
15403
- const [pendingServers, setPendingServers] = useState11(null);
15404
- const [pendingEnabled, setPendingEnabled] = useState11(true);
15587
+ const [page, setPage] = useState12("main");
15588
+ const [selectedPreset, setSelectedPreset] = useState12(null);
15589
+ const [customName, setCustomName] = useState12("");
15590
+ const [customCommand, setCustomCommand] = useState12("");
15591
+ const [installState, setInstallState] = useState12({ status: "idle", output: "" });
15592
+ const [pendingServers, setPendingServers] = useState12(null);
15593
+ const [pendingEnabled, setPendingEnabled] = useState12(true);
15405
15594
  const runInstall = (command) => {
15406
15595
  setInstallState({ status: "running", output: "Installing..." });
15407
15596
  const { shell, args } = getShellCommand();
@@ -15504,10 +15693,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15504
15693
  { label: "(close)", value: "__close__", key: "__close__" }
15505
15694
  ];
15506
15695
  if (page === "main") {
15507
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15508
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "LSP Servers" }),
15509
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Arrow keys to navigate, Enter to select." }),
15510
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15696
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15697
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "LSP Servers" }),
15698
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Arrow keys to navigate, Enter to select." }),
15699
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15511
15700
  SelectInput8,
15512
15701
  {
15513
15702
  items: mainItems,
@@ -15535,10 +15724,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15535
15724
  }),
15536
15725
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
15537
15726
  ];
15538
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15539
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Add LSP Server" }),
15540
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Select a language server to configure." }),
15541
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15727
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15728
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Add LSP Server" }),
15729
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Select a language server to configure." }),
15730
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15542
15731
  SelectInput8,
15543
15732
  {
15544
15733
  items,
@@ -15566,18 +15755,18 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15566
15755
  { label: isSuccess ? "Save to config \u2713" : "Save anyway", value: "save", key: "save" },
15567
15756
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
15568
15757
  ];
15569
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15570
- /* @__PURE__ */ jsxs20(Text21, { color: theme.accent, bold: true, children: [
15758
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15759
+ /* @__PURE__ */ jsxs21(Text22, { color: theme.accent, bold: true, children: [
15571
15760
  "Install ",
15572
15761
  selectedPreset.name
15573
15762
  ] }),
15574
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: selectedPreset.installHint }),
15575
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "column", children: [
15576
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Command:" }),
15577
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, children: selectedPreset.installCommand || "(none required)" })
15763
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: selectedPreset.installHint }),
15764
+ /* @__PURE__ */ jsxs21(Box21, { marginTop: 1, flexDirection: "column", children: [
15765
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Command:" }),
15766
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, children: selectedPreset.installCommand || "(none required)" })
15578
15767
  ] }),
15579
- installState.output && /* @__PURE__ */ jsx22(Box20, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx22(Text21, { color: isSuccess ? theme.accent : theme.error, children: installState.output.slice(-500) }) }),
15580
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15768
+ installState.output && /* @__PURE__ */ jsx23(Box21, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx23(Text22, { color: isSuccess ? theme.accent : theme.error, children: installState.output.slice(-500) }) }),
15769
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15581
15770
  SelectInput8,
15582
15771
  {
15583
15772
  items,
@@ -15595,16 +15784,16 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15595
15784
  }
15596
15785
  }
15597
15786
  ) }),
15598
- isSuccess && /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(Text21, { color: theme.accent, children: "Server saved. Run /lsp reload to start it." }) })
15787
+ isSuccess && /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text22, { color: theme.accent, children: "Server saved. Run /lsp reload to start it." }) })
15599
15788
  ] });
15600
15789
  }
15601
15790
  if (page === "custom-name") {
15602
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15603
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Custom LSP Server \u2014 Name" }),
15604
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Enter a name for this server (e.g., my-server)." }),
15605
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, children: [
15606
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, children: "\u203A " }),
15607
- /* @__PURE__ */ jsx22(
15791
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15792
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Custom LSP Server \u2014 Name" }),
15793
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Enter a name for this server (e.g., my-server)." }),
15794
+ /* @__PURE__ */ jsxs21(Box21, { marginTop: 1, children: [
15795
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, children: "\u203A " }),
15796
+ /* @__PURE__ */ jsx23(
15608
15797
  CustomTextInput,
15609
15798
  {
15610
15799
  value: customName,
@@ -15618,7 +15807,7 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15618
15807
  }
15619
15808
  )
15620
15809
  ] }),
15621
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15810
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15622
15811
  SelectInput8,
15623
15812
  {
15624
15813
  items: [{ label: "\u2190 Back", value: "__back__", key: "__back__" }],
@@ -15628,12 +15817,12 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15628
15817
  ] });
15629
15818
  }
15630
15819
  if (page === "custom-command") {
15631
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15632
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Custom LSP Server \u2014 Command" }),
15633
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Enter the command to start the server (space-separated)." }),
15634
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, children: [
15635
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, children: "\u203A " }),
15636
- /* @__PURE__ */ jsx22(
15820
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15821
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Custom LSP Server \u2014 Command" }),
15822
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Enter the command to start the server (space-separated)." }),
15823
+ /* @__PURE__ */ jsxs21(Box21, { marginTop: 1, children: [
15824
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, children: "\u203A " }),
15825
+ /* @__PURE__ */ jsx23(
15637
15826
  CustomTextInput,
15638
15827
  {
15639
15828
  value: customCommand,
@@ -15647,7 +15836,7 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15647
15836
  }
15648
15837
  )
15649
15838
  ] }),
15650
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15839
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15651
15840
  SelectInput8,
15652
15841
  {
15653
15842
  items: [{ label: "\u2190 Back", value: "__back__", key: "__back__" }],
@@ -15671,10 +15860,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15671
15860
  },
15672
15861
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
15673
15862
  ];
15674
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15675
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Save LSP Config" }),
15676
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Where should this server configuration be saved?" }),
15677
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15863
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15864
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Save LSP Config" }),
15865
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Where should this server configuration be saved?" }),
15866
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15678
15867
  SelectInput8,
15679
15868
  {
15680
15869
  items,
@@ -15693,10 +15882,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15693
15882
  if (page === "edit") {
15694
15883
  const keys = Object.keys(servers);
15695
15884
  if (keys.length === 0) {
15696
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15697
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Edit LSP Server" }),
15698
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, children: "No servers configured." }),
15699
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15885
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15886
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Edit LSP Server" }),
15887
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, children: "No servers configured." }),
15888
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15700
15889
  SelectInput8,
15701
15890
  {
15702
15891
  items: [{ label: "\u2190 Back", value: "__back__", key: "__back__" }],
@@ -15717,10 +15906,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15717
15906
  }),
15718
15907
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
15719
15908
  ];
15720
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15721
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Edit LSP Server" }),
15722
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Select a server to toggle enabled/disabled." }),
15723
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15909
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15910
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Edit LSP Server" }),
15911
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Select a server to toggle enabled/disabled." }),
15912
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15724
15913
  SelectInput8,
15725
15914
  {
15726
15915
  items,
@@ -15738,10 +15927,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15738
15927
  if (page === "delete") {
15739
15928
  const keys = Object.keys(servers);
15740
15929
  if (keys.length === 0) {
15741
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15742
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Delete LSP Server" }),
15743
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, children: "No servers configured." }),
15744
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15930
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15931
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Delete LSP Server" }),
15932
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, children: "No servers configured." }),
15933
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15745
15934
  SelectInput8,
15746
15935
  {
15747
15936
  items: [{ label: "\u2190 Back", value: "__back__", key: "__back__" }],
@@ -15758,10 +15947,10 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15758
15947
  })),
15759
15948
  { label: "\u2190 Back", value: "__back__", key: "__back__" }
15760
15949
  ];
15761
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15762
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Delete LSP Server" }),
15763
- /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, dimColor: false, children: "Select a server to remove from config." }),
15764
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15950
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15951
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Delete LSP Server" }),
15952
+ /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, dimColor: false, children: "Select a server to remove from config." }),
15953
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15765
15954
  SelectInput8,
15766
15955
  {
15767
15956
  items,
@@ -15778,14 +15967,14 @@ function LspWizard({ servers, currentScope, hasProjectDir, onDone, onSave }) {
15778
15967
  }
15779
15968
  if (page === "list") {
15780
15969
  const keys = Object.keys(servers);
15781
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15782
- /* @__PURE__ */ jsx22(Text21, { color: theme.accent, bold: true, children: "Configured LSP Servers" }),
15783
- keys.length === 0 ? /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, children: "No servers configured." }) : /* @__PURE__ */ jsx22(Box20, { marginTop: 1, flexDirection: "column", children: keys.map((k) => {
15970
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
15971
+ /* @__PURE__ */ jsx23(Text22, { color: theme.accent, bold: true, children: "Configured LSP Servers" }),
15972
+ keys.length === 0 ? /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, children: "No servers configured." }) : /* @__PURE__ */ jsx23(Box21, { marginTop: 1, flexDirection: "column", children: keys.map((k) => {
15784
15973
  const s = servers[k];
15785
15974
  const status = s.enabled !== false ? "enabled" : "disabled";
15786
- return /* @__PURE__ */ jsx22(Text21, { color: theme.info.color, children: ` ${k.padEnd(16)} ${status} ${s.command.join(" ")}` }, k);
15975
+ return /* @__PURE__ */ jsx23(Text22, { color: theme.info.color, children: ` ${k.padEnd(16)} ${status} ${s.command.join(" ")}` }, k);
15787
15976
  }) }),
15788
- /* @__PURE__ */ jsx22(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx22(
15977
+ /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
15789
15978
  SelectInput8,
15790
15979
  {
15791
15980
  items: [{ label: "\u2190 Back", value: "__back__", key: "__back__" }],
@@ -15913,9 +16102,9 @@ var init_lsp_wizard = __esm({
15913
16102
  });
15914
16103
 
15915
16104
  // src/ui/theme-picker.tsx
15916
- import { Box as Box21, Text as Text22 } from "ink";
16105
+ import { Box as Box22, Text as Text23 } from "ink";
15917
16106
  import SelectInput9 from "ink-select-input";
15918
- import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
16107
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
15919
16108
  function PaletteSwatches({ palette }) {
15920
16109
  const colors = [
15921
16110
  palette.primary,
@@ -15923,7 +16112,7 @@ function PaletteSwatches({ palette }) {
15923
16112
  palette.success,
15924
16113
  palette.error
15925
16114
  ];
15926
- return /* @__PURE__ */ jsx23(Box21, { children: colors.map((c, i) => /* @__PURE__ */ jsx23(Text22, { color: c, children: "\u2588" }, i)) });
16115
+ return /* @__PURE__ */ jsx24(Box22, { children: colors.map((c, i) => /* @__PURE__ */ jsx24(Text23, { color: c, children: "\u2588" }, i)) });
15927
16116
  }
15928
16117
  function ThemePicker({ themes, onPick }) {
15929
16118
  const current = useTheme();
@@ -15931,9 +16120,9 @@ function ThemePicker({ themes, onPick }) {
15931
16120
  ...themes.map((t) => ({ label: t.label, value: t.name })),
15932
16121
  { label: "< Back", value: "__back__" }
15933
16122
  ];
15934
- return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "round", borderColor: current.accent, paddingX: 1, children: [
15935
- /* @__PURE__ */ jsx23(Text22, { color: current.accent, bold: true, children: "Pick a theme (restart to apply)" }),
15936
- /* @__PURE__ */ jsx23(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx23(
16123
+ return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: current.accent, paddingX: 1, children: [
16124
+ /* @__PURE__ */ jsx24(Text23, { color: current.accent, bold: true, children: "Pick a theme (restart to apply)" }),
16125
+ /* @__PURE__ */ jsx24(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx24(
15937
16126
  SelectInput9,
15938
16127
  {
15939
16128
  items,
@@ -15948,9 +16137,9 @@ function ThemePicker({ themes, onPick }) {
15948
16137
  itemComponent: ({ label, isSelected }) => {
15949
16138
  const t = themes.find((x) => x.label === label);
15950
16139
  const color = t?.accent ?? current.accent;
15951
- return /* @__PURE__ */ jsxs21(Box21, { children: [
15952
- /* @__PURE__ */ jsx23(Text22, { color, bold: isSelected, dimColor: !isSelected, children: label }),
15953
- t && /* @__PURE__ */ jsx23(Box21, { marginLeft: 1, children: /* @__PURE__ */ jsx23(PaletteSwatches, { palette: t.palette }) })
16140
+ return /* @__PURE__ */ jsxs22(Box22, { children: [
16141
+ /* @__PURE__ */ jsx24(Text23, { color, bold: isSelected, dimColor: !isSelected, children: label }),
16142
+ t && /* @__PURE__ */ jsx24(Box22, { marginLeft: 1, children: /* @__PURE__ */ jsx24(PaletteSwatches, { palette: t.palette }) })
15954
16143
  ] });
15955
16144
  }
15956
16145
  }
@@ -17137,8 +17326,8 @@ var init_lsp_nudge = __esm({
17137
17326
  });
17138
17327
 
17139
17328
  // src/ui/file-picker.tsx
17140
- import { Box as Box22, Text as Text23 } from "ink";
17141
- import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
17329
+ import { Box as Box23, Text as Text24 } from "ink";
17330
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
17142
17331
  function FilePicker({ items, selectedIndex, query, recentFiles }) {
17143
17332
  const theme = useTheme();
17144
17333
  let startIndex = 0;
@@ -17150,12 +17339,12 @@ function FilePicker({ items, selectedIndex, query, recentFiles }) {
17150
17339
  const hasMoreBelow = items.length > startIndex + VISIBLE_LIMIT;
17151
17340
  const recentInVisible = visible.filter((item) => recentFiles?.has(item.name)).length;
17152
17341
  const hasRecentSection = recentInVisible > 0;
17153
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
17154
- /* @__PURE__ */ jsx24(Text23, { color: theme.accent, bold: true, children: query ? `Files matching "${query}"` : "Mention a file" }),
17155
- /* @__PURE__ */ jsx24(Text23, { color: theme.info.color, dimColor: true, children: "\u2191\u2193 navigate \xB7 Enter pick \xB7 Esc cancel" }),
17156
- /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "column", children: [
17157
- visible.length === 0 && /* @__PURE__ */ jsx24(Text23, { color: theme.info.color, children: "No matches" }),
17158
- hasMoreAbove && /* @__PURE__ */ jsxs22(Text23, { color: theme.info.color, dimColor: true, children: [
17342
+ return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
17343
+ /* @__PURE__ */ jsx25(Text24, { color: theme.accent, bold: true, children: query ? `Files matching "${query}"` : "Mention a file" }),
17344
+ /* @__PURE__ */ jsx25(Text24, { color: theme.info.color, dimColor: true, children: "\u2191\u2193 navigate \xB7 Enter pick \xB7 Esc cancel" }),
17345
+ /* @__PURE__ */ jsxs23(Box23, { marginTop: 1, flexDirection: "column", children: [
17346
+ visible.length === 0 && /* @__PURE__ */ jsx25(Text24, { color: theme.info.color, children: "No matches" }),
17347
+ hasMoreAbove && /* @__PURE__ */ jsxs23(Text24, { color: theme.info.color, dimColor: true, children: [
17159
17348
  "\u2026 ",
17160
17349
  startIndex,
17161
17350
  " more above"
@@ -17167,28 +17356,28 @@ function FilePicker({ items, selectedIndex, query, recentFiles }) {
17167
17356
  const label = item.isDirectory ? `${item.name}/` : item.name;
17168
17357
  const isFirstRecent = isRecent && (i === 0 || !recentFiles?.has(visible[i - 1]?.name ?? ""));
17169
17358
  const isFirstNonRecentAfterRecent = !isRecent && (i > 0 && recentFiles?.has(visible[i - 1]?.name ?? ""));
17170
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", children: [
17171
- hasRecentSection && isFirstRecent && /* @__PURE__ */ jsxs22(Text23, { color: theme.palette.success, bold: true, children: [
17359
+ return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", children: [
17360
+ hasRecentSection && isFirstRecent && /* @__PURE__ */ jsxs23(Text24, { color: theme.palette.success, bold: true, children: [
17172
17361
  " ",
17173
17362
  "Recent"
17174
17363
  ] }),
17175
- hasRecentSection && isFirstNonRecentAfterRecent && /* @__PURE__ */ jsxs22(Text23, { color: theme.info.color, dimColor: true, children: [
17364
+ hasRecentSection && isFirstNonRecentAfterRecent && /* @__PURE__ */ jsxs23(Text24, { color: theme.info.color, dimColor: true, children: [
17176
17365
  " ",
17177
17366
  "All files"
17178
17367
  ] }),
17179
- /* @__PURE__ */ jsxs22(Text23, { color: isSelected ? theme.accent : isRecent ? theme.palette.success : void 0, bold: isSelected || isRecent, children: [
17368
+ /* @__PURE__ */ jsxs23(Text24, { color: isSelected ? theme.accent : isRecent ? theme.palette.success : void 0, bold: isSelected || isRecent, children: [
17180
17369
  isSelected ? "\u203A " : isRecent ? "\u2192 " : " ",
17181
17370
  isRecent ? "\u21BB " : "",
17182
17371
  label
17183
17372
  ] })
17184
17373
  ] }, item.name);
17185
17374
  }),
17186
- hasMoreBelow && /* @__PURE__ */ jsxs22(Text23, { color: theme.info.color, dimColor: true, children: [
17375
+ hasMoreBelow && /* @__PURE__ */ jsxs23(Text24, { color: theme.info.color, dimColor: true, children: [
17187
17376
  "\u2026 ",
17188
17377
  items.length - (startIndex + VISIBLE_LIMIT),
17189
17378
  " more below"
17190
17379
  ] }),
17191
- hasRecentSection && /* @__PURE__ */ jsx24(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text23, { color: theme.info.color, dimColor: true, children: "\u21BB = recently used" }) })
17380
+ hasRecentSection && /* @__PURE__ */ jsx25(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text24, { color: theme.info.color, dimColor: true, children: "\u21BB = recently used" }) })
17192
17381
  ] })
17193
17382
  ] });
17194
17383
  }
@@ -17202,8 +17391,8 @@ var init_file_picker = __esm({
17202
17391
  });
17203
17392
 
17204
17393
  // src/ui/slash-picker.tsx
17205
- import { Box as Box23, Text as Text24 } from "ink";
17206
- import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
17394
+ import { Box as Box24, Text as Text25 } from "ink";
17395
+ import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
17207
17396
  function sourceBadge(source) {
17208
17397
  if (source === "builtin") return "";
17209
17398
  if (source === "project") return "project";
@@ -17223,12 +17412,12 @@ function SlashPicker({ items, selectedIndex, query }) {
17223
17412
  const hasMoreBelow = items.length > startIndex + VISIBLE_LIMIT2;
17224
17413
  const longestLabel = visible.reduce((m, it) => Math.max(m, commandLabel(it).length), 0);
17225
17414
  const nameColWidth = Math.max(NAME_COL_MIN_WIDTH, longestLabel + NAME_DESC_GAP);
17226
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
17227
- /* @__PURE__ */ jsx25(Text24, { color: theme.accent, bold: true, children: query ? `Commands matching "/${query}"` : "Slash commands" }),
17228
- /* @__PURE__ */ jsx25(Text24, { color: theme.info.color, children: "Arrow keys to navigate, Enter to select, Esc to cancel." }),
17229
- /* @__PURE__ */ jsxs23(Box23, { marginTop: 1, flexDirection: "column", children: [
17230
- visible.length === 0 && /* @__PURE__ */ jsx25(Text24, { color: theme.info.color, children: "No matches" }),
17231
- hasMoreAbove && /* @__PURE__ */ jsxs23(Text24, { color: theme.info.color, children: [
17415
+ return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
17416
+ /* @__PURE__ */ jsx26(Text25, { color: theme.accent, bold: true, children: query ? `Commands matching "/${query}"` : "Slash commands" }),
17417
+ /* @__PURE__ */ jsx26(Text25, { color: theme.info.color, children: "Arrow keys to navigate, Enter to select, Esc to cancel." }),
17418
+ /* @__PURE__ */ jsxs24(Box24, { marginTop: 1, flexDirection: "column", children: [
17419
+ visible.length === 0 && /* @__PURE__ */ jsx26(Text25, { color: theme.info.color, children: "No matches" }),
17420
+ hasMoreAbove && /* @__PURE__ */ jsxs24(Text25, { color: theme.info.color, children: [
17232
17421
  "\u2026 ",
17233
17422
  startIndex,
17234
17423
  " more above"
@@ -17238,16 +17427,16 @@ function SlashPicker({ items, selectedIndex, query }) {
17238
17427
  const isSelected = actualIndex === selectedIndex;
17239
17428
  const nameCol = commandLabel(item).padEnd(nameColWidth);
17240
17429
  const badge = sourceBadge(item.source);
17241
- return /* @__PURE__ */ jsxs23(Text24, { color: isSelected ? theme.accent : void 0, bold: isSelected, children: [
17430
+ return /* @__PURE__ */ jsxs24(Text25, { color: isSelected ? theme.accent : void 0, bold: isSelected, children: [
17242
17431
  isSelected ? "\u203A " : " ",
17243
17432
  nameCol,
17244
- /* @__PURE__ */ jsxs23(Text24, { color: theme.info.color, children: [
17433
+ /* @__PURE__ */ jsxs24(Text25, { color: theme.info.color, children: [
17245
17434
  item.description,
17246
17435
  badge && ` [${badge}]`
17247
17436
  ] })
17248
17437
  ] }, item.name);
17249
17438
  }),
17250
- hasMoreBelow && /* @__PURE__ */ jsxs23(Text24, { color: theme.info.color, children: [
17439
+ hasMoreBelow && /* @__PURE__ */ jsxs24(Text25, { color: theme.info.color, children: [
17251
17440
  "\u2026 ",
17252
17441
  items.length - (startIndex + VISIBLE_LIMIT2),
17253
17442
  " more below"
@@ -17357,18 +17546,19 @@ __export(app_exports, {
17357
17546
  shouldOpenMentionPicker: () => shouldOpenMentionPicker,
17358
17547
  shouldOpenSlashPicker: () => shouldOpenSlashPicker
17359
17548
  });
17360
- import React15, { useState as useState12, useRef as useRef3, useEffect as useEffect7, useCallback as useCallback3 } from "react";
17361
- import { Box as Box24, Text as Text25, useApp, useInput as useInput9, render } from "ink";
17549
+ import React16, { useState as useState13, useRef as useRef3, useEffect as useEffect7, useCallback as useCallback4 } from "react";
17550
+ import { Box as Box25, Text as Text26, useApp, useInput as useInput10, render } from "ink";
17362
17551
  import SelectInput10 from "ink-select-input";
17363
17552
  import { existsSync as existsSync4, statSync as statSync4 } from "fs";
17364
17553
  import { join as join28 } from "path";
17554
+ import QRCode from "qrcode";
17365
17555
  import { unlink as unlink4 } from "fs/promises";
17366
17556
  import { execSync as execSync2 } from "child_process";
17367
17557
  import { spawn as spawn4 } from "child_process";
17368
17558
  import { platform as platform4 } from "os";
17369
17559
  import fg4 from "fast-glob";
17370
17560
  import { readFileSync as readFileSync3 } from "fs";
17371
- import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
17561
+ import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
17372
17562
  function buildFilePickerIgnoreList(cwd) {
17373
17563
  const hardcoded = [
17374
17564
  // Dependencies
@@ -17617,13 +17807,13 @@ function App({
17617
17807
  initialCloudDeviceId
17618
17808
  }) {
17619
17809
  const { exit } = useApp();
17620
- const [cfg, setCfg] = useState12(initialCfg);
17621
- const [lspScope, setLspScope] = useState12(initialLspScope);
17622
- const [lspProjectPath, setLspProjectPath] = useState12(initialLspProjectPath);
17623
- const [cloudToken, setCloudToken] = useState12(initialCloudToken);
17624
- const [cloudDeviceId, setCloudDeviceId] = useState12(initialCloudDeviceId);
17625
- const [events, setRawEvents] = useState12([]);
17626
- const setEvents = useCallback3(
17810
+ const [cfg, setCfg] = useState13(initialCfg);
17811
+ const [lspScope, setLspScope] = useState13(initialLspScope);
17812
+ const [lspProjectPath, setLspProjectPath] = useState13(initialLspProjectPath);
17813
+ const [cloudToken, setCloudToken] = useState13(initialCloudToken);
17814
+ const [cloudDeviceId, setCloudDeviceId] = useState13(initialCloudDeviceId);
17815
+ const [events, setRawEvents] = useState13([]);
17816
+ const setEvents = useCallback4(
17627
17817
  (updater) => {
17628
17818
  setRawEvents((prev) => {
17629
17819
  const next = typeof updater === "function" ? updater(prev) : updater;
@@ -17632,55 +17822,56 @@ function App({
17632
17822
  },
17633
17823
  []
17634
17824
  );
17635
- const [input, setInput] = useState12("");
17636
- const [busy, setBusy] = useState12(false);
17637
- const [usage, setUsage] = useState12(null);
17638
- const [sessionUsage, setSessionUsage] = useState12(null);
17639
- const [gatewayMeta, setGatewayMeta] = useState12(null);
17640
- const [cloudBudget, setCloudBudget] = useState12(null);
17641
- const [showReasoning, setShowReasoning] = useState12(false);
17642
- const [perm, setPerm] = useState12(null);
17643
- const [limitModal, setLimitModal] = useState12(null);
17644
- const [loopModal, setLoopModal] = useState12(null);
17645
- const [queue, setQueue] = useState12([]);
17646
- const [history, setHistory] = useState12([]);
17647
- const [historyIndex, setHistoryIndex] = useState12(-1);
17648
- const [draftInput, setDraftInput] = useState12("");
17649
- const [mode, setMode] = useState12("edit");
17650
- const [codeMode, setCodeMode] = useState12(false);
17825
+ const [input, setInput] = useState13("");
17826
+ const [busy, setBusy] = useState13(false);
17827
+ const [usage, setUsage] = useState13(null);
17828
+ const [sessionUsage, setSessionUsage] = useState13(null);
17829
+ const [gatewayMeta, setGatewayMeta] = useState13(null);
17830
+ const [cloudBudget, setCloudBudget] = useState13(null);
17831
+ const [showReasoning, setShowReasoning] = useState13(false);
17832
+ const [perm, setPerm] = useState13(null);
17833
+ const [limitModal, setLimitModal] = useState13(null);
17834
+ const [loopModal, setLoopModal] = useState13(null);
17835
+ const [queue, setQueue] = useState13([]);
17836
+ const [history, setHistory] = useState13([]);
17837
+ const [historyIndex, setHistoryIndex] = useState13(-1);
17838
+ const [draftInput, setDraftInput] = useState13("");
17839
+ const [mode, setMode] = useState13("edit");
17840
+ const [codeMode, setCodeMode] = useState13(false);
17651
17841
  const filePickerEnabled = initialCfg?.filePicker ?? true;
17652
- const [effort, setEffort] = useState12(
17842
+ const [effort, setEffort] = useState13(
17653
17843
  initialCfg?.reasoningEffort ?? DEFAULT_REASONING_EFFORT
17654
17844
  );
17655
- const [resumeSessions, setResumeSessions] = useState12(null);
17656
- const [checkpointSession, setCheckpointSession] = useState12(null);
17657
- const [checkpointList, setCheckpointList] = useState12([]);
17658
- const [commandWizard, setCommandWizard] = useState12(null);
17659
- const [commandPicker, setCommandPicker] = useState12(null);
17660
- const [commandToDelete, setCommandToDelete] = useState12(null);
17661
- const [showCommandList, setShowCommandList] = useState12(false);
17662
- const [showLspWizard, setShowLspWizard] = useState12(false);
17663
- const [showRemoteDashboard, setShowRemoteDashboard] = useState12(false);
17664
- const [selectedRemoteSession, setSelectedRemoteSession] = useState12(null);
17665
- const [tasks, setTasks] = useState12([]);
17666
- const [tasksStartedAt, setTasksStartedAt] = useState12(null);
17667
- const [tasksStartTokens, setTasksStartTokens] = useState12(0);
17668
- const [turnStartedAt, setTurnStartedAt] = useState12(null);
17669
- const [turnPhase, setTurnPhase] = useState12("waiting");
17670
- const [currentToolName, setCurrentToolName] = useState12(null);
17671
- const [lastActivityAt, setLastActivityAt] = useState12(null);
17672
- const [verbose, setVerbose] = useState12(false);
17673
- const [hasUpdate, setHasUpdate] = useState12(initialUpdateResult?.hasUpdate ?? false);
17674
- const [latestVersion, setLatestVersion] = useState12(initialUpdateResult?.latestVersion ?? null);
17675
- const [theme, setTheme] = useState12(resolveTheme(initialCfg?.theme));
17676
- const [showThemePicker, setShowThemePicker] = useState12(false);
17677
- const [originalTheme, setOriginalTheme] = useState12(null);
17678
- const [skillsActive, setSkillsActive] = useState12(0);
17679
- const [memoryRecalled, setMemoryRecalled] = useState12(false);
17680
- const [intentTier, setIntentTier] = useState12(null);
17681
- const [kimiMdStale, setKimiMdStale] = useState12(false);
17682
- const [gitBranch, setGitBranch] = useState12(null);
17683
- const [lastSessionTopic, setLastSessionTopic] = useState12(null);
17845
+ const [resumeSessions, setResumeSessions] = useState13(null);
17846
+ const [checkpointSession, setCheckpointSession] = useState13(null);
17847
+ const [checkpointList, setCheckpointList] = useState13([]);
17848
+ const [commandWizard, setCommandWizard] = useState13(null);
17849
+ const [commandPicker, setCommandPicker] = useState13(null);
17850
+ const [commandToDelete, setCommandToDelete] = useState13(null);
17851
+ const [showCommandList, setShowCommandList] = useState13(false);
17852
+ const [showLspWizard, setShowLspWizard] = useState13(false);
17853
+ const [showRemoteDashboard, setShowRemoteDashboard] = useState13(false);
17854
+ const [selectedRemoteSession, setSelectedRemoteSession] = useState13(null);
17855
+ const [showInboxModal, setShowInboxModal] = useState13(false);
17856
+ const [tasks, setTasks] = useState13([]);
17857
+ const [tasksStartedAt, setTasksStartedAt] = useState13(null);
17858
+ const [tasksStartTokens, setTasksStartTokens] = useState13(0);
17859
+ const [turnStartedAt, setTurnStartedAt] = useState13(null);
17860
+ const [turnPhase, setTurnPhase] = useState13("waiting");
17861
+ const [currentToolName, setCurrentToolName] = useState13(null);
17862
+ const [lastActivityAt, setLastActivityAt] = useState13(null);
17863
+ const [verbose, setVerbose] = useState13(false);
17864
+ const [hasUpdate, setHasUpdate] = useState13(initialUpdateResult?.hasUpdate ?? false);
17865
+ const [latestVersion, setLatestVersion] = useState13(initialUpdateResult?.latestVersion ?? null);
17866
+ const [theme, setTheme] = useState13(resolveTheme(initialCfg?.theme));
17867
+ const [showThemePicker, setShowThemePicker] = useState13(false);
17868
+ const [originalTheme, setOriginalTheme] = useState13(null);
17869
+ const [skillsActive, setSkillsActive] = useState13(0);
17870
+ const [memoryRecalled, setMemoryRecalled] = useState13(false);
17871
+ const [intentTier, setIntentTier] = useState13(null);
17872
+ const [kimiMdStale, setKimiMdStale] = useState13(false);
17873
+ const [gitBranch, setGitBranch] = useState13(null);
17874
+ const [lastSessionTopic, setLastSessionTopic] = useState13(null);
17684
17875
  useEffect7(() => {
17685
17876
  setGitBranch(detectGitBranch());
17686
17877
  }, []);
@@ -17756,11 +17947,11 @@ ${wcagWarnings.join("\n")}` }
17756
17947
  cancelled = true;
17757
17948
  };
17758
17949
  }, [cfg?.cloudMode, initialCloudToken]);
17759
- const [cursorOffset, setCursorOffset] = useState12(0);
17760
- const [activePicker, setActivePicker] = useState12(null);
17761
- const [filePickerItems, setFilePickerItems] = useState12([]);
17950
+ const [cursorOffset, setCursorOffset] = useState13(0);
17951
+ const [activePicker, setActivePicker] = useState13(null);
17952
+ const [filePickerItems, setFilePickerItems] = useState13([]);
17762
17953
  const filePickerLoadedRef = useRef3(false);
17763
- const [customCommandsVersion, setCustomCommandsVersion] = useState12(0);
17954
+ const [customCommandsVersion, setCustomCommandsVersion] = useState13(0);
17764
17955
  const cacheStableRef = useRef3(initialCfg?.cacheStablePrompts !== false);
17765
17956
  const messagesRef = useRef3(
17766
17957
  makePrefixMessages(cacheStableRef.current, cfg?.model ?? DEFAULT_MODEL, "edit", ALL_TOOLS)
@@ -17813,11 +18004,11 @@ ${wcagWarnings.join("\n")}` }
17813
18004
  const MAX_RECENT_FILES = 10;
17814
18005
  const pickerAnchor = activePicker?.anchor ?? null;
17815
18006
  const pickerKind = activePicker?.kind ?? null;
17816
- const pickerQuery = React15.useMemo(() => {
18007
+ const pickerQuery = React16.useMemo(() => {
17817
18008
  if (pickerAnchor === null) return null;
17818
18009
  return input.slice(pickerAnchor + 1, cursorOffset);
17819
18010
  }, [input, cursorOffset, pickerAnchor]);
17820
- const filteredFileItems = React15.useMemo(() => {
18011
+ const filteredFileItems = React16.useMemo(() => {
17821
18012
  if (pickerKind !== "file" || pickerQuery === null) return [];
17822
18013
  const items = filterPickerItems(filePickerItems, pickerQuery).slice();
17823
18014
  const now2 = Date.now();
@@ -17832,7 +18023,7 @@ ${wcagWarnings.join("\n")}` }
17832
18023
  return a.name.localeCompare(b.name);
17833
18024
  });
17834
18025
  }, [pickerKind, filePickerItems, pickerQuery]);
17835
- const allSlashCommands = React15.useMemo(() => {
18026
+ const allSlashCommands = React16.useMemo(() => {
17836
18027
  const customs = customCommandsRef.current.filter((c) => !BUILTIN_COMMAND_NAMES.has(c.name.toLowerCase())).map((c) => ({
17837
18028
  name: c.name,
17838
18029
  description: c.description ?? "",
@@ -17840,7 +18031,7 @@ ${wcagWarnings.join("\n")}` }
17840
18031
  }));
17841
18032
  return [...BUILTIN_COMMANDS, ...customs];
17842
18033
  }, [customCommandsVersion]);
17843
- const filteredSlashItems = React15.useMemo(() => {
18034
+ const filteredSlashItems = React16.useMemo(() => {
17844
18035
  if (pickerKind !== "slash" || pickerQuery === null) return [];
17845
18036
  return fuzzyFilter(allSlashCommands, pickerQuery, (c) => c.name).slice(0, 50);
17846
18037
  }, [pickerKind, allSlashCommands, pickerQuery]);
@@ -17915,14 +18106,14 @@ ${wcagWarnings.join("\n")}` }
17915
18106
  setActivePicker({ ...activePicker, selected: max });
17916
18107
  }
17917
18108
  }, [filteredSlashItems.length, activePicker]);
17918
- const handlePickerUp = useCallback3(() => {
18109
+ const handlePickerUp = useCallback4(() => {
17919
18110
  setActivePicker((p) => {
17920
18111
  if (!p) return null;
17921
18112
  const next = Math.max(0, p.selected - 1);
17922
18113
  return next === p.selected ? p : { ...p, selected: next };
17923
18114
  });
17924
18115
  }, []);
17925
- const handlePickerDown = useCallback3(() => {
18116
+ const handlePickerDown = useCallback4(() => {
17926
18117
  setActivePicker((p) => {
17927
18118
  if (!p) return null;
17928
18119
  const max = p.kind === "file" ? Math.max(0, filteredFileItems.length - 1) : Math.max(0, filteredSlashItems.length - 1);
@@ -17930,7 +18121,7 @@ ${wcagWarnings.join("\n")}` }
17930
18121
  return next === p.selected ? p : { ...p, selected: next };
17931
18122
  });
17932
18123
  }, [filteredFileItems.length, filteredSlashItems.length]);
17933
- const handlePickerSelect = useCallback3(() => {
18124
+ const handlePickerSelect = useCallback4(() => {
17934
18125
  if (!activePicker) return;
17935
18126
  if (activePicker.kind === "file") {
17936
18127
  const item2 = filteredFileItems[activePicker.selected];
@@ -17949,12 +18140,12 @@ ${wcagWarnings.join("\n")}` }
17949
18140
  setActivePicker(null);
17950
18141
  submitRef.current(value);
17951
18142
  }, [activePicker, filteredFileItems, filteredSlashItems, input, cursorOffset]);
17952
- const handlePickerCancel = useCallback3(() => {
18143
+ const handlePickerCancel = useCallback4(() => {
17953
18144
  pickerCancelRef.current = cursorOffset;
17954
18145
  setActivePicker(null);
17955
18146
  }, [cursorOffset]);
17956
18147
  useEffect7(() => {
17957
- const modalActive = commandWizard !== null || commandPicker !== null || commandToDelete !== null || showCommandList || showLspWizard || resumeSessions !== null || checkpointSession !== null || perm !== null || limitModal !== null || loopModal !== null;
18148
+ const modalActive = commandWizard !== null || commandPicker !== null || commandToDelete !== null || showCommandList || showLspWizard || resumeSessions !== null || checkpointSession !== null || perm !== null || limitModal !== null || loopModal !== null || showInboxModal;
17958
18149
  if (modalActive && activePicker !== null) {
17959
18150
  setActivePicker(null);
17960
18151
  }
@@ -17968,6 +18159,7 @@ ${wcagWarnings.join("\n")}` }
17968
18159
  perm,
17969
18160
  limitModal,
17970
18161
  loopModal,
18162
+ showInboxModal,
17971
18163
  activePicker
17972
18164
  ]);
17973
18165
  useEffect7(() => {
@@ -18092,7 +18284,7 @@ ${wcagWarnings.join("\n")}` }
18092
18284
  }, 3e5);
18093
18285
  return () => clearInterval(id);
18094
18286
  }, []);
18095
- const reloadCustomCommands = useCallback3(async () => {
18287
+ const reloadCustomCommands = useCallback4(async () => {
18096
18288
  const { commands, warnings } = await loadCustomCommands(process.cwd());
18097
18289
  customCommandsRef.current = commands;
18098
18290
  setCustomCommandsVersion((v) => v + 1);
@@ -18219,7 +18411,7 @@ ${wcagWarnings.join("\n")}` }
18219
18411
  }, 30 * 60 * 1e3);
18220
18412
  return () => clearInterval(id);
18221
18413
  }, [cfg]);
18222
- const initMcp = useCallback3(async () => {
18414
+ const initMcp = useCallback4(async () => {
18223
18415
  if (!cfg?.mcpServers || mcpInitRef.current) return;
18224
18416
  mcpInitRef.current = true;
18225
18417
  const manager = mcpManagerRef.current;
@@ -18280,7 +18472,7 @@ ${wcagWarnings.join("\n")}` }
18280
18472
  ]);
18281
18473
  }
18282
18474
  }, [cfg]);
18283
- const initLsp = useCallback3(async () => {
18475
+ const initLsp = useCallback4(async () => {
18284
18476
  if (!cfg?.lspEnabled || !cfg?.lspServers || lspInitRef.current) {
18285
18477
  if (lspInitRef.current) return;
18286
18478
  if (!cfg?.lspEnabled) {
@@ -18351,7 +18543,7 @@ ${wcagWarnings.join("\n")}` }
18351
18543
  void initLsp();
18352
18544
  }
18353
18545
  }, [cfg, initMcp, initLsp]);
18354
- const ensureSessionId = useCallback3(() => {
18546
+ const ensureSessionId = useCallback4(() => {
18355
18547
  if (sessionIdRef.current) return sessionIdRef.current;
18356
18548
  const firstUser = messagesRef.current.find((m) => m.role === "user");
18357
18549
  let firstText = "session";
@@ -18364,7 +18556,7 @@ ${wcagWarnings.join("\n")}` }
18364
18556
  sessionIdRef.current = makeSessionId(firstText);
18365
18557
  return sessionIdRef.current;
18366
18558
  }, []);
18367
- const saveSessionSafe = useCallback3(async () => {
18559
+ const saveSessionSafe = useCallback4(async () => {
18368
18560
  if (!cfg) return;
18369
18561
  ensureSessionId();
18370
18562
  const now2 = (/* @__PURE__ */ new Date()).toISOString();
@@ -18390,7 +18582,7 @@ ${wcagWarnings.join("\n")}` }
18390
18582
  ]);
18391
18583
  }
18392
18584
  }, [cfg, ensureSessionId]);
18393
- const onIterationEnd = useCallback3(
18585
+ const onIterationEnd = useCallback4(
18394
18586
  async (messages, signal) => {
18395
18587
  if (signal.aborted) return messages;
18396
18588
  if (!shouldCompact({ messages })) return messages;
@@ -18468,7 +18660,7 @@ ${wcagWarnings.join("\n")}` }
18468
18660
  },
18469
18661
  [cfg]
18470
18662
  );
18471
- useInput9((inputChar, key) => {
18663
+ useInput10((inputChar, key) => {
18472
18664
  if (key.ctrl && inputChar === "c") {
18473
18665
  logger.info("input:ctrl+c", {
18474
18666
  busy: busyRef.current,
@@ -18605,7 +18797,7 @@ ${wcagWarnings.join("\n")}` }
18605
18797
  void lspManagerRef.current.stopAll().finally(() => exit());
18606
18798
  }
18607
18799
  };
18608
- const flushAssistantUpdates = useCallback3(() => {
18800
+ const flushAssistantUpdates = useCallback4(() => {
18609
18801
  flushTimeoutRef.current = null;
18610
18802
  const pending = pendingTextRef.current;
18611
18803
  if (pending.size === 0) return;
@@ -18623,7 +18815,7 @@ ${wcagWarnings.join("\n")}` }
18623
18815
  })
18624
18816
  );
18625
18817
  }, []);
18626
- const updateAssistant = useCallback3(
18818
+ const updateAssistant = useCallback4(
18627
18819
  (id, patch) => {
18628
18820
  const result = patch({ text: "", reasoning: "" });
18629
18821
  const assistantResult = result;
@@ -18652,7 +18844,7 @@ ${wcagWarnings.join("\n")}` }
18652
18844
  },
18653
18845
  [flushAssistantUpdates]
18654
18846
  );
18655
- const updateTool = useCallback3(
18847
+ const updateTool = useCallback4(
18656
18848
  (id, patch) => {
18657
18849
  setEvents(
18658
18850
  (evts) => evts.map(
@@ -18662,11 +18854,11 @@ ${wcagWarnings.join("\n")}` }
18662
18854
  },
18663
18855
  []
18664
18856
  );
18665
- const updateGatewayMeta = useCallback3((meta) => {
18857
+ const updateGatewayMeta = useCallback4((meta) => {
18666
18858
  gatewayMetaRef.current = meta;
18667
18859
  setGatewayMeta(meta);
18668
18860
  }, []);
18669
- const runCompact = useCallback3(async () => {
18861
+ const runCompact = useCallback4(async () => {
18670
18862
  if (!cfg) return;
18671
18863
  if (busy) {
18672
18864
  setEvents((e) => [...e, { kind: "info", key: mkKey(), text: "can't compact while model is running" }]);
@@ -18762,11 +18954,11 @@ ${wcagWarnings.join("\n")}` }
18762
18954
  pendingToolCallsRef.current.clear();
18763
18955
  }
18764
18956
  }, [cfg, busy, saveSessionSafe]);
18765
- const openResumePicker = useCallback3(async () => {
18957
+ const openResumePicker = useCallback4(async () => {
18766
18958
  const sessions = await listSessions(200, process.cwd());
18767
18959
  setResumeSessions(sessions);
18768
18960
  }, []);
18769
- const runInit = useCallback3(async () => {
18961
+ const runInit = useCallback4(async () => {
18770
18962
  if (!cfg) return;
18771
18963
  if (busy) {
18772
18964
  setEvents((e) => [...e, { kind: "info", key: mkKey(), text: "can't /init while model is running" }]);
@@ -19089,7 +19281,7 @@ ${wcagWarnings.join("\n")}` }
19089
19281
  pendingToolCallsRef.current.clear();
19090
19282
  }
19091
19283
  }, [cfg, busy, updateAssistant, updateTool, updateGatewayMeta]);
19092
- const handleThemePick = useCallback3(
19284
+ const handleThemePick = useCallback4(
19093
19285
  (picked) => {
19094
19286
  setShowThemePicker(false);
19095
19287
  if (!picked) return;
@@ -19107,7 +19299,7 @@ ${wcagWarnings.join("\n")}` }
19107
19299
  },
19108
19300
  []
19109
19301
  );
19110
- const doResumeSession = useCallback3(
19302
+ const doResumeSession = useCallback4(
19111
19303
  async (filePath, checkpointId) => {
19112
19304
  try {
19113
19305
  const file = checkpointId ? (await loadSessionFromCheckpoint(filePath, checkpointId)).file : await loadSession(filePath);
@@ -19159,7 +19351,7 @@ ${wcagWarnings.join("\n")}` }
19159
19351
  },
19160
19352
  []
19161
19353
  );
19162
- const handleResumePick = useCallback3(
19354
+ const handleResumePick = useCallback4(
19163
19355
  async (picked) => {
19164
19356
  setResumeSessions(null);
19165
19357
  if (!picked) return;
@@ -19181,7 +19373,7 @@ ${wcagWarnings.join("\n")}` }
19181
19373
  },
19182
19374
  [doResumeSession]
19183
19375
  );
19184
- const handleCheckpointPick = useCallback3(
19376
+ const handleCheckpointPick = useCallback4(
19185
19377
  async (checkpointId) => {
19186
19378
  const session = checkpointSession;
19187
19379
  setCheckpointSession(null);
@@ -19200,7 +19392,7 @@ ${wcagWarnings.join("\n")}` }
19200
19392
  },
19201
19393
  [checkpointSession, doResumeSession]
19202
19394
  );
19203
- const handleSlash = useCallback3(
19395
+ const handleSlash = useCallback4(
19204
19396
  (cmd) => {
19205
19397
  const raw = cmd.trim();
19206
19398
  const [head, ...rest] = raw.split(/\s+/);
@@ -19868,12 +20060,33 @@ ${lines.join("\n")}` }]);
19868
20060
  }
19869
20061
  if (c === "/hello") {
19870
20062
  const session = crypto.randomUUID();
19871
- const url = `${FEEDBACK_WORKER_URL}/?s=${session}&v=${getAppVersion()}`;
20063
+ const url = `${FEEDBACK_WORKER_URL2}/?s=${session}&v=${getAppVersion()}`;
19872
20064
  openBrowser2(url);
19873
- setEvents((e) => [
19874
- ...e,
19875
- { kind: "info", key: mkKey(), text: "Opened voice note page in your browser. Record your message there and hit Send when you're done." }
19876
- ]);
20065
+ void (async () => {
20066
+ try {
20067
+ const qr = await QRCode.toString(url, { type: "terminal", small: true });
20068
+ const lines = qr.split("\n").map((line) => line.replace(/\x1b\[[0-9;]*m/g, ""));
20069
+ setEvents((e) => [
20070
+ ...e,
20071
+ {
20072
+ kind: "qrcode",
20073
+ key: mkKey(),
20074
+ lines,
20075
+ caption: "Scan this QR code with your phone to send a voice note:"
20076
+ },
20077
+ { kind: "info", key: mkKey(), text: "Also opened voice note page in your browser." }
20078
+ ]);
20079
+ } catch {
20080
+ setEvents((e) => [
20081
+ ...e,
20082
+ { kind: "info", key: mkKey(), text: "Opened voice note page in your browser. Record your message there and hit Send when you're done." }
20083
+ ]);
20084
+ }
20085
+ })();
20086
+ return true;
20087
+ }
20088
+ if (c === "/inbox") {
20089
+ setShowInboxModal(true);
19877
20090
  return true;
19878
20091
  }
19879
20092
  if (c === "/report") {
@@ -20146,7 +20359,7 @@ ${lines.join("\n")}` }]);
20146
20359
  },
20147
20360
  [cfg, exit, usage, theme, mode, openResumePicker, runCompact, runInit, initMcp, setCfg, setShowRemoteDashboard, setSelectedRemoteSession]
20148
20361
  );
20149
- const handleCommandSave = useCallback3(
20362
+ const handleCommandSave = useCallback4(
20150
20363
  async (opts2) => {
20151
20364
  setCommandWizard(null);
20152
20365
  try {
@@ -20168,7 +20381,7 @@ ${lines.join("\n")}` }]);
20168
20381
  },
20169
20382
  [commandWizard, reloadCustomCommands, setEvents]
20170
20383
  );
20171
- const handleCommandDelete = useCallback3(
20384
+ const handleCommandDelete = useCallback4(
20172
20385
  async (cmd) => {
20173
20386
  setCommandToDelete(null);
20174
20387
  try {
@@ -20187,7 +20400,7 @@ ${lines.join("\n")}` }]);
20187
20400
  },
20188
20401
  [reloadCustomCommands, setEvents]
20189
20402
  );
20190
- const processMessage = useCallback3(
20403
+ const processMessage = useCallback4(
20191
20404
  async (text, displayText, opts2) => {
20192
20405
  if (!cfg) return;
20193
20406
  let trimmed = text.trim();
@@ -20734,7 +20947,7 @@ ${lines.join("\n")}` }]);
20734
20947
  processMessage(next.full, next.display, { queuedKey: next.key });
20735
20948
  }
20736
20949
  }, [busy, queue, processMessage]);
20737
- const submit = useCallback3(
20950
+ const submit = useCallback4(
20738
20951
  (full, display) => {
20739
20952
  const trimmedFull = full.trim();
20740
20953
  if (!trimmedFull) return;
@@ -20772,7 +20985,7 @@ ${lines.join("\n")}` }]);
20772
20985
  }
20773
20986
  }, [usage]);
20774
20987
  if (!cfg) {
20775
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(
20988
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(
20776
20989
  Onboarding,
20777
20990
  {
20778
20991
  onCancel: () => exit(),
@@ -20804,7 +21017,7 @@ ${lines.join("\n")}` }]);
20804
21017
  ) });
20805
21018
  }
20806
21019
  if (checkpointSession !== null) {
20807
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(
21020
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(
20808
21021
  CheckpointPicker,
20809
21022
  {
20810
21023
  session: checkpointSession,
@@ -20814,10 +21027,10 @@ ${lines.join("\n")}` }]);
20814
21027
  ) }) });
20815
21028
  }
20816
21029
  if (resumeSessions !== null) {
20817
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(ResumePicker, { sessions: resumeSessions, onPick: handleResumePick }) }) });
21030
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(ResumePicker, { sessions: resumeSessions, onPick: handleResumePick }) }) });
20818
21031
  }
20819
21032
  if (showRemoteDashboard) {
20820
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: selectedRemoteSession ? /* @__PURE__ */ jsx26(
21033
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: selectedRemoteSession ? /* @__PURE__ */ jsx27(
20821
21034
  RemoteSessionDetail,
20822
21035
  {
20823
21036
  session: selectedRemoteSession,
@@ -20840,7 +21053,7 @@ ${lines.join("\n")}` }]);
20840
21053
  setShowRemoteDashboard(false);
20841
21054
  }
20842
21055
  }
20843
- ) : /* @__PURE__ */ jsx26(
21056
+ ) : /* @__PURE__ */ jsx27(
20844
21057
  RemoteDashboard,
20845
21058
  {
20846
21059
  onSelect: (session) => setSelectedRemoteSession(session),
@@ -20848,8 +21061,17 @@ ${lines.join("\n")}` }]);
20848
21061
  }
20849
21062
  ) }) });
20850
21063
  }
21064
+ if (showInboxModal) {
21065
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(
21066
+ InboxModal,
21067
+ {
21068
+ onDone: () => setShowInboxModal(false),
21069
+ onOpen: (url) => openBrowser2(url)
21070
+ }
21071
+ ) }) });
21072
+ }
20851
21073
  if (showLspWizard) {
20852
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(
21074
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(
20853
21075
  LspWizard,
20854
21076
  {
20855
21077
  servers: cfg?.lspServers ?? {},
@@ -20886,7 +21108,7 @@ ${lines.join("\n")}` }]);
20886
21108
  ) }) });
20887
21109
  }
20888
21110
  if (commandWizard) {
20889
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(
21111
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(
20890
21112
  CommandWizard,
20891
21113
  {
20892
21114
  mode: commandWizard.mode,
@@ -20899,7 +21121,7 @@ ${lines.join("\n")}` }]);
20899
21121
  ) }) });
20900
21122
  }
20901
21123
  if (commandPicker) {
20902
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(
21124
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(
20903
21125
  CommandPicker,
20904
21126
  {
20905
21127
  commands: customCommandsRef.current,
@@ -20917,14 +21139,14 @@ ${lines.join("\n")}` }]);
20917
21139
  ) }) });
20918
21140
  }
20919
21141
  if (commandToDelete) {
20920
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
20921
- /* @__PURE__ */ jsxs24(Text25, { color: theme.accent, bold: true, children: [
21142
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "round", borderColor: theme.accent, paddingX: 1, children: [
21143
+ /* @__PURE__ */ jsxs25(Text26, { color: theme.accent, bold: true, children: [
20922
21144
  "Delete /",
20923
21145
  commandToDelete.name,
20924
21146
  "?"
20925
21147
  ] }),
20926
- /* @__PURE__ */ jsx26(Text25, { color: theme.info.color, children: commandToDelete.filepath }),
20927
- /* @__PURE__ */ jsx26(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx26(
21148
+ /* @__PURE__ */ jsx27(Text26, { color: theme.info.color, children: commandToDelete.filepath }),
21149
+ /* @__PURE__ */ jsx27(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx27(
20928
21150
  SelectInput10,
20929
21151
  {
20930
21152
  items: [
@@ -20943,7 +21165,7 @@ ${lines.join("\n")}` }]);
20943
21165
  ] }) });
20944
21166
  }
20945
21167
  if (showCommandList) {
20946
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(
21168
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(
20947
21169
  CommandList,
20948
21170
  {
20949
21171
  commands: customCommandsRef.current,
@@ -20952,12 +21174,12 @@ ${lines.join("\n")}` }]);
20952
21174
  ) }) });
20953
21175
  }
20954
21176
  if (showThemePicker) {
20955
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", children: /* @__PURE__ */ jsx26(ThemePicker, { themes: themeList(), onPick: handleThemePick }) }) });
21177
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", children: /* @__PURE__ */ jsx27(ThemePicker, { themes: themeList(), onPick: handleThemePick }) }) });
20956
21178
  }
20957
21179
  const hasConversation = events.some((e) => e.kind === "user" || e.kind === "assistant");
20958
- return /* @__PURE__ */ jsx26(ThemeProvider, { theme, children: /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
20959
- !hasConversation && events.length === 0 ? /* @__PURE__ */ jsx26(Welcome, {}) : /* @__PURE__ */ jsx26(ChatView, { events, showReasoning, verbose, intentTier: intentTier ?? void 0 }),
20960
- perm ? /* @__PURE__ */ jsx26(
21180
+ return /* @__PURE__ */ jsx27(ThemeProvider, { theme, children: /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
21181
+ !hasConversation && events.length === 0 ? /* @__PURE__ */ jsx27(Welcome, {}) : /* @__PURE__ */ jsx27(ChatView, { events, showReasoning, verbose, intentTier: intentTier ?? void 0 }),
21182
+ perm ? /* @__PURE__ */ jsx27(
20961
21183
  PermissionModal,
20962
21184
  {
20963
21185
  tool: perm.tool,
@@ -20971,7 +21193,7 @@ ${lines.join("\n")}` }]);
20971
21193
  submitRef.current(text);
20972
21194
  }
20973
21195
  }
20974
- ) : limitModal ? /* @__PURE__ */ jsx26(
21196
+ ) : limitModal ? /* @__PURE__ */ jsx27(
20975
21197
  LimitModal,
20976
21198
  {
20977
21199
  limit: limitModal.limit,
@@ -20981,20 +21203,24 @@ ${lines.join("\n")}` }]);
20981
21203
  setLimitModal(null);
20982
21204
  }
20983
21205
  }
20984
- ) : loopModal ? /* @__PURE__ */ jsx26(
21206
+ ) : loopModal ? /* @__PURE__ */ jsx27(
20985
21207
  LimitModal,
20986
21208
  {
20987
21209
  limit: 50,
20988
21210
  title: "Agent stuck in a loop",
20989
21211
  description: "The agent kept calling the same tools with identical arguments. What would you like to do?",
21212
+ items: [
21213
+ { label: "Continue", value: "continue" },
21214
+ { label: "Synthesize", value: "synthesize" }
21215
+ ],
20990
21216
  onDecide: (d) => {
20991
21217
  loopModal.resolve(d);
20992
21218
  loopResolveRef.current = null;
20993
21219
  setLoopModal(null);
20994
21220
  }
20995
21221
  }
20996
- ) : /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", marginTop: 1, children: [
20997
- tasks.length > 0 && /* @__PURE__ */ jsx26(
21222
+ ) : /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", marginTop: 1, children: [
21223
+ tasks.length > 0 && /* @__PURE__ */ jsx27(
20998
21224
  TaskList,
20999
21225
  {
21000
21226
  tasks,
@@ -21002,11 +21228,11 @@ ${lines.join("\n")}` }]);
21002
21228
  tokensDelta: Math.max(0, (usage?.prompt_tokens ?? 0) - tasksStartTokens)
21003
21229
  }
21004
21230
  ),
21005
- queue.length > 0 && /* @__PURE__ */ jsx26(Box24, { flexDirection: "column", marginBottom: 1, children: queue.map((q, i) => /* @__PURE__ */ jsxs24(Text25, { color: theme.info.color, dimColor: theme.info.dim, children: [
21231
+ queue.length > 0 && /* @__PURE__ */ jsx27(Box25, { flexDirection: "column", marginBottom: 1, children: queue.map((q, i) => /* @__PURE__ */ jsxs25(Text26, { color: theme.info.color, dimColor: theme.info.dim, children: [
21006
21232
  "\u23F3 ",
21007
21233
  q.display
21008
21234
  ] }, `queue_${i}`)) }),
21009
- /* @__PURE__ */ jsx26(
21235
+ /* @__PURE__ */ jsx27(
21010
21236
  StatusBar,
21011
21237
  {
21012
21238
  usage,
@@ -21029,7 +21255,7 @@ ${lines.join("\n")}` }]);
21029
21255
  intentTier: intentTier ?? void 0
21030
21256
  }
21031
21257
  ),
21032
- activePicker?.kind === "file" && /* @__PURE__ */ jsx26(
21258
+ activePicker?.kind === "file" && /* @__PURE__ */ jsx27(
21033
21259
  FilePicker,
21034
21260
  {
21035
21261
  items: filteredFileItems,
@@ -21038,7 +21264,7 @@ ${lines.join("\n")}` }]);
21038
21264
  recentFiles: new Set(recentFilesRef.current.keys())
21039
21265
  }
21040
21266
  ),
21041
- activePicker?.kind === "slash" && /* @__PURE__ */ jsx26(
21267
+ activePicker?.kind === "slash" && /* @__PURE__ */ jsx27(
21042
21268
  SlashPicker,
21043
21269
  {
21044
21270
  items: filteredSlashItems,
@@ -21046,9 +21272,9 @@ ${lines.join("\n")}` }]);
21046
21272
  query: pickerQuery ?? ""
21047
21273
  }
21048
21274
  ),
21049
- /* @__PURE__ */ jsxs24(Box24, { marginTop: 1, children: [
21050
- /* @__PURE__ */ jsx26(Text25, { color: theme.prompt ?? theme.accent, children: "\u203A " }),
21051
- /* @__PURE__ */ jsx26(
21275
+ /* @__PURE__ */ jsxs25(Box25, { marginTop: 1, children: [
21276
+ /* @__PURE__ */ jsx27(Text26, { color: theme.prompt ?? theme.accent, children: "\u203A " }),
21277
+ /* @__PURE__ */ jsx27(
21052
21278
  CustomTextInput,
21053
21279
  {
21054
21280
  value: input,
@@ -21105,7 +21331,7 @@ ${lines.join("\n")}` }]);
21105
21331
  }
21106
21332
  async function renderApp(cfg, updateResult, lspScope = "global", lspProjectPath = null, cloudToken, cloudDeviceId) {
21107
21333
  const instance = render(
21108
- /* @__PURE__ */ jsx26(
21334
+ /* @__PURE__ */ jsx27(
21109
21335
  App,
21110
21336
  {
21111
21337
  initialCfg: cfg,
@@ -21122,7 +21348,7 @@ async function renderApp(cfg, updateResult, lspScope = "global", lspProjectPath
21122
21348
  );
21123
21349
  await instance.waitUntilExit();
21124
21350
  }
21125
- var MAX_GITIGNORE_SIZE, FEEDBACK_WORKER_URL, CONTEXT_LIMIT, AUTO_COMPACT_SUGGEST_PCT, MAX_EVENTS, nextAssistantId, nextKey, mkKey, MAX_IMAGES_PER_MESSAGE;
21351
+ var MAX_GITIGNORE_SIZE, FEEDBACK_WORKER_URL2, CONTEXT_LIMIT, AUTO_COMPACT_SUGGEST_PCT, MAX_EVENTS, nextAssistantId, nextKey, mkKey, MAX_IMAGES_PER_MESSAGE;
21126
21352
  var init_app = __esm({
21127
21353
  "src/app.tsx"() {
21128
21354
  "use strict";
@@ -21159,6 +21385,7 @@ var init_app = __esm({
21159
21385
  init_deploy();
21160
21386
  init_tui_auth();
21161
21387
  init_remote_dashboard();
21388
+ init_inbox_modal();
21162
21389
  init_mode();
21163
21390
  init_classify();
21164
21391
  init_skills();
@@ -21190,7 +21417,7 @@ var init_app = __esm({
21190
21417
  init_slash_picker();
21191
21418
  init_fuzzy();
21192
21419
  MAX_GITIGNORE_SIZE = 1 * 1024 * 1024;
21193
- FEEDBACK_WORKER_URL = "https://hello.kimiflare.com";
21420
+ FEEDBACK_WORKER_URL2 = "https://hello.kimiflare.com";
21194
21421
  CONTEXT_LIMIT = 262e3;
21195
21422
  AUTO_COMPACT_SUGGEST_PCT = 0.8;
21196
21423
  MAX_EVENTS = 500;