open-research 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +285 -160
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // src/cli.ts
10
- import React4 from "react";
10
+ import React5 from "react";
11
11
  import path21 from "path";
12
12
  import { Command } from "commander";
13
13
  import { render } from "ink";
@@ -811,7 +811,7 @@ function formatDateTime(value) {
811
811
  }
812
812
 
813
813
  // src/lib/cli/version.ts
814
- var PACKAGE_VERSION = "0.1.12";
814
+ var PACKAGE_VERSION = "0.1.13";
815
815
  function getPackageVersion() {
816
816
  return PACKAGE_VERSION;
817
817
  }
@@ -865,11 +865,11 @@ import {
865
865
  startTransition,
866
866
  useDeferredValue,
867
867
  useEffect as useEffect2,
868
- useMemo as useMemo2,
868
+ useMemo as useMemo3,
869
869
  useRef,
870
- useState as useState3
870
+ useState as useState4
871
871
  } from "react";
872
- import { Box as Box4, Text as Text4, useApp, useInput as useInput3 } from "ink";
872
+ import { Box as Box5, Text as Text5, useApp, useInput as useInput4 } from "ink";
873
873
 
874
874
  // src/tui/text-input.tsx
875
875
  import { useState, useEffect } from "react";
@@ -5634,6 +5634,104 @@ function ConfigScreen({ items, onUpdate, onClose }) {
5634
5634
  ] });
5635
5635
  }
5636
5636
 
5637
+ // src/tui/session-picker.tsx
5638
+ import { useMemo as useMemo2, useState as useState3 } from "react";
5639
+ import { Box as Box3, Text as Text3, useInput as useInput3 } from "ink";
5640
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
5641
+ function timeAgo(dateStr) {
5642
+ const seconds = Math.floor((Date.now() - new Date(dateStr).getTime()) / 1e3);
5643
+ if (seconds < 60) return `${seconds}s ago`;
5644
+ const minutes = Math.floor(seconds / 60);
5645
+ if (minutes < 60) return `${minutes}m ago`;
5646
+ const hours = Math.floor(minutes / 60);
5647
+ if (hours < 24) return `${hours}h ago`;
5648
+ const days = Math.floor(hours / 24);
5649
+ if (days < 30) return `${days}d ago`;
5650
+ return new Date(dateStr).toLocaleDateString();
5651
+ }
5652
+ function SessionPicker({ sessions, onSelect, onCancel }) {
5653
+ const [filter, setFilter] = useState3("");
5654
+ const [selectedIndex, setSelectedIndex] = useState3(0);
5655
+ const filtered = useMemo2(() => {
5656
+ if (!filter) return sessions;
5657
+ const search = filter.toLowerCase();
5658
+ return sessions.filter(
5659
+ (s) => s.preview.toLowerCase().includes(search) || s.id.toLowerCase().includes(search)
5660
+ );
5661
+ }, [sessions, filter]);
5662
+ const clampedIndex = Math.min(selectedIndex, Math.max(0, filtered.length - 1));
5663
+ useInput3((input2, key) => {
5664
+ if (key.escape) {
5665
+ onCancel();
5666
+ return;
5667
+ }
5668
+ if (key.upArrow) {
5669
+ setSelectedIndex((i) => Math.max(0, i - 1));
5670
+ return;
5671
+ }
5672
+ if (key.downArrow) {
5673
+ setSelectedIndex((i) => Math.min(filtered.length - 1, i + 1));
5674
+ return;
5675
+ }
5676
+ if (key.return && filtered.length > 0) {
5677
+ onSelect(filtered[clampedIndex]);
5678
+ return;
5679
+ }
5680
+ if (key.backspace || key.delete) {
5681
+ setFilter((f) => f.slice(0, -1));
5682
+ setSelectedIndex(0);
5683
+ return;
5684
+ }
5685
+ if (key.ctrl && input2 === "u") {
5686
+ setFilter("");
5687
+ setSelectedIndex(0);
5688
+ return;
5689
+ }
5690
+ if (!key.ctrl && !key.meta && !key.tab && input2.length === 1 && input2 >= " ") {
5691
+ setFilter((f) => f + input2);
5692
+ setSelectedIndex(0);
5693
+ }
5694
+ });
5695
+ return /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [
5696
+ /* @__PURE__ */ jsx3(Text3, { bold: true, color: "cyan", children: "Resume Session" }),
5697
+ /* @__PURE__ */ jsx3(
5698
+ Box3,
5699
+ {
5700
+ borderStyle: "single",
5701
+ borderColor: filter ? "cyan" : "gray",
5702
+ paddingX: 1,
5703
+ marginTop: 1,
5704
+ marginBottom: 1,
5705
+ children: /* @__PURE__ */ jsx3(Text3, { color: "gray", children: filter ? filter : "Type to search..." })
5706
+ }
5707
+ ),
5708
+ filtered.length === 0 ? /* @__PURE__ */ jsx3(Text3, { color: "gray", children: filter ? "No matching sessions." : "No sessions found." }) : /* @__PURE__ */ jsx3(Box3, { flexDirection: "column", children: filtered.slice(0, 15).map((session, idx) => {
5709
+ const isSelected = idx === clampedIndex;
5710
+ const indicator = isSelected ? "\u203A" : " ";
5711
+ const preview = session.preview || "(empty session)";
5712
+ const age = timeAgo(session.lastActivity);
5713
+ const turns = `${session.turnCount} turn${session.turnCount !== 1 ? "s" : ""}`;
5714
+ return /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", marginBottom: isSelected ? 1 : 0, children: [
5715
+ /* @__PURE__ */ jsxs2(Box3, { children: [
5716
+ /* @__PURE__ */ jsxs2(Text3, { color: isSelected ? "cyan" : "gray", children: [
5717
+ indicator,
5718
+ " "
5719
+ ] }),
5720
+ /* @__PURE__ */ jsx3(Text3, { color: isSelected ? "white" : "gray", bold: isSelected, children: preview.length > 70 ? preview.slice(0, 70) + "\u2026" : preview })
5721
+ ] }),
5722
+ isSelected && /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
5723
+ age,
5724
+ " \xB7 ",
5725
+ turns,
5726
+ " \xB7 ",
5727
+ session.id.slice(0, 8)
5728
+ ] }) })
5729
+ ] }, session.id);
5730
+ }) }),
5731
+ /* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Type to search \xB7 Esc cancel" }) })
5732
+ ] });
5733
+ }
5734
+
5637
5735
  // src/lib/cli/update-check.ts
5638
5736
  import fs18 from "fs/promises";
5639
5737
  import path17 from "path";
@@ -6262,7 +6360,7 @@ function truncate2(value, max = 96) {
6262
6360
  }
6263
6361
 
6264
6362
  // src/tui/components.tsx
6265
- import { Box as Box3, Text as Text3 } from "ink";
6363
+ import { Box as Box4, Text as Text4 } from "ink";
6266
6364
 
6267
6365
  // src/tui/markdown.ts
6268
6366
  function renderMarkdown(text) {
@@ -6363,7 +6461,7 @@ function renderInline(text) {
6363
6461
  }
6364
6462
 
6365
6463
  // src/tui/components.tsx
6366
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
6464
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
6367
6465
  var GUTTER = {
6368
6466
  user: "\u203A",
6369
6467
  agent: "\u25AA",
@@ -6376,45 +6474,45 @@ var GUTTER = {
6376
6474
  active: "\u25CF"
6377
6475
  };
6378
6476
  function UserMessage({ text }) {
6379
- return /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", marginBottom: 1, children: [
6380
- /* @__PURE__ */ jsxs2(Box3, { children: [
6381
- /* @__PURE__ */ jsxs2(Text3, { color: "cyan", bold: true, children: [
6477
+ return /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", marginBottom: 1, children: [
6478
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6479
+ /* @__PURE__ */ jsxs3(Text4, { color: "cyan", bold: true, children: [
6382
6480
  GUTTER.user,
6383
6481
  " "
6384
6482
  ] }),
6385
- /* @__PURE__ */ jsx3(Text3, { bold: true, color: "cyan", children: "you" })
6483
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "cyan", children: "you" })
6386
6484
  ] }),
6387
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { children: text }) })
6485
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { children: text }) })
6388
6486
  ] });
6389
6487
  }
6390
6488
  function AgentMessage({ text }) {
6391
6489
  const rendered = renderMarkdown(text);
6392
- return /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", marginBottom: 1, children: [
6393
- /* @__PURE__ */ jsxs2(Box3, { children: [
6394
- /* @__PURE__ */ jsxs2(Text3, { color: "green", bold: true, children: [
6490
+ return /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", marginBottom: 1, children: [
6491
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6492
+ /* @__PURE__ */ jsxs3(Text4, { color: "green", bold: true, children: [
6395
6493
  GUTTER.agent,
6396
6494
  " "
6397
6495
  ] }),
6398
- /* @__PURE__ */ jsx3(Text3, { bold: true, color: "green", children: "agent" })
6496
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "green", children: "agent" })
6399
6497
  ] }),
6400
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { children: rendered }) })
6498
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { children: rendered }) })
6401
6499
  ] });
6402
6500
  }
6403
6501
  function SystemMessage({ text }) {
6404
6502
  if (text.trimStart().startsWith("\u2713") || text.trimStart().startsWith("\u2717")) {
6405
- return /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: text }) });
6503
+ return /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { color: "gray", dimColor: true, children: text }) });
6406
6504
  }
6407
6505
  if (text.includes("compacted") || text.includes("Context")) {
6408
- return /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsxs2(Text3, { color: "yellow", dimColor: true, children: [
6506
+ return /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsxs3(Text4, { color: "yellow", dimColor: true, children: [
6409
6507
  GUTTER.system,
6410
6508
  " ",
6411
6509
  text.trim()
6412
6510
  ] }) });
6413
6511
  }
6414
6512
  if (text.trimStart().startsWith(">")) {
6415
- return /* @__PURE__ */ jsx3(Box3, { children: /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: text }) });
6513
+ return /* @__PURE__ */ jsx4(Box4, { children: /* @__PURE__ */ jsx4(Text4, { color: "gray", dimColor: true, children: text }) });
6416
6514
  }
6417
- return /* @__PURE__ */ jsx3(Box3, { children: /* @__PURE__ */ jsxs2(Text3, { color: "gray", children: [
6515
+ return /* @__PURE__ */ jsx4(Box4, { children: /* @__PURE__ */ jsxs3(Text4, { color: "gray", children: [
6418
6516
  GUTTER.system,
6419
6517
  " ",
6420
6518
  text.trim()
@@ -6427,18 +6525,18 @@ function PromptPrefix({
6427
6525
  mode
6428
6526
  }) {
6429
6527
  if (hasQuestion) {
6430
- return /* @__PURE__ */ jsxs2(Text3, { color: "yellow", children: [
6528
+ return /* @__PURE__ */ jsxs3(Text4, { color: "yellow", children: [
6431
6529
  GUTTER.question,
6432
6530
  " "
6433
6531
  ] });
6434
6532
  }
6435
6533
  if (busy) {
6436
- return /* @__PURE__ */ jsxs2(Text3, { color: "yellow", children: [
6534
+ return /* @__PURE__ */ jsxs3(Text4, { color: "yellow", children: [
6437
6535
  frame,
6438
6536
  " "
6439
6537
  ] });
6440
6538
  }
6441
- return /* @__PURE__ */ jsxs2(Text3, { color: "cyan", children: [
6539
+ return /* @__PURE__ */ jsxs3(Text4, { color: "cyan", children: [
6442
6540
  GUTTER.user,
6443
6541
  " "
6444
6542
  ] });
@@ -6447,8 +6545,8 @@ function PendingUpdateCard({
6447
6545
  count,
6448
6546
  summary
6449
6547
  }) {
6450
- return /* @__PURE__ */ jsxs2(
6451
- Box3,
6548
+ return /* @__PURE__ */ jsxs3(
6549
+ Box4,
6452
6550
  {
6453
6551
  borderStyle: "single",
6454
6552
  borderColor: "magenta",
@@ -6456,23 +6554,23 @@ function PendingUpdateCard({
6456
6554
  marginBottom: 1,
6457
6555
  flexDirection: "column",
6458
6556
  children: [
6459
- /* @__PURE__ */ jsxs2(Box3, { children: [
6460
- /* @__PURE__ */ jsxs2(Text3, { color: "magenta", bold: true, children: [
6557
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6558
+ /* @__PURE__ */ jsxs3(Text4, { color: "magenta", bold: true, children: [
6461
6559
  GUTTER.pending,
6462
6560
  " "
6463
6561
  ] }),
6464
- /* @__PURE__ */ jsxs2(Text3, { bold: true, color: "magenta", children: [
6562
+ /* @__PURE__ */ jsxs3(Text4, { bold: true, color: "magenta", children: [
6465
6563
  count,
6466
6564
  " update",
6467
6565
  count > 1 ? "s" : "",
6468
6566
  " awaiting review"
6469
6567
  ] })
6470
6568
  ] }),
6471
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", children: summary }) }),
6472
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
6473
- /* @__PURE__ */ jsx3(Text3, { bold: true, color: "green", children: "a" }),
6569
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { color: "gray", children: summary }) }),
6570
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
6571
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "green", children: "a" }),
6474
6572
  " accept ",
6475
- /* @__PURE__ */ jsx3(Text3, { bold: true, color: "red", children: "r" }),
6573
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "red", children: "r" }),
6476
6574
  " reject"
6477
6575
  ] }) })
6478
6576
  ]
@@ -6483,8 +6581,8 @@ function QuestionCard({
6483
6581
  question,
6484
6582
  options
6485
6583
  }) {
6486
- return /* @__PURE__ */ jsxs2(
6487
- Box3,
6584
+ return /* @__PURE__ */ jsxs3(
6585
+ Box4,
6488
6586
  {
6489
6587
  borderStyle: "single",
6490
6588
  borderColor: "yellow",
@@ -6492,26 +6590,26 @@ function QuestionCard({
6492
6590
  marginBottom: 0,
6493
6591
  flexDirection: "column",
6494
6592
  children: [
6495
- /* @__PURE__ */ jsxs2(Box3, { children: [
6496
- /* @__PURE__ */ jsxs2(Text3, { color: "yellow", bold: true, children: [
6593
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6594
+ /* @__PURE__ */ jsxs3(Text4, { color: "yellow", bold: true, children: [
6497
6595
  GUTTER.question,
6498
6596
  " "
6499
6597
  ] }),
6500
- /* @__PURE__ */ jsx3(Text3, { bold: true, color: "yellow", children: "Agent needs your input" })
6598
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "yellow", children: "Agent needs your input" })
6501
6599
  ] }),
6502
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsx3(Text3, { children: question }) }),
6503
- options.length > 0 && /* @__PURE__ */ jsx3(Box3, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: options.map((opt, idx) => /* @__PURE__ */ jsxs2(Box3, { children: [
6504
- /* @__PURE__ */ jsx3(Text3, { color: "cyan", bold: true, children: idx + 1 }),
6505
- /* @__PURE__ */ jsxs2(Text3, { children: [
6600
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsx4(Text4, { children: question }) }),
6601
+ options.length > 0 && /* @__PURE__ */ jsx4(Box4, { flexDirection: "column", marginLeft: 2, marginTop: 1, children: options.map((opt, idx) => /* @__PURE__ */ jsxs3(Box4, { children: [
6602
+ /* @__PURE__ */ jsx4(Text4, { color: "cyan", bold: true, children: idx + 1 }),
6603
+ /* @__PURE__ */ jsxs3(Text4, { children: [
6506
6604
  " ",
6507
6605
  opt.label
6508
6606
  ] }),
6509
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
6607
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
6510
6608
  " \u2014 ",
6511
6609
  opt.description
6512
6610
  ] })
6513
6611
  ] }, opt.label)) }),
6514
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: options.length > 0 ? "Type number or custom answer" : "Type your answer" }) })
6612
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsx4(Text4, { color: "gray", dimColor: true, children: options.length > 0 ? "Type number or custom answer" : "Type your answer" }) })
6515
6613
  ]
6516
6614
  }
6517
6615
  );
@@ -6522,46 +6620,46 @@ function HomeScreen({
6522
6620
  fileCount,
6523
6621
  skillCount
6524
6622
  }) {
6525
- return /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", marginBottom: 1, children: [
6526
- /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", marginBottom: 1, children: [
6527
- /* @__PURE__ */ jsx3(Text3, { bold: true, color: "cyan", children: "Open Research" }),
6528
- /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: "Local-first research agent" })
6623
+ return /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", marginBottom: 1, children: [
6624
+ /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", marginBottom: 1, children: [
6625
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "cyan", children: "Open Research" }),
6626
+ /* @__PURE__ */ jsx4(Text4, { color: "gray", dimColor: true, children: "Local-first research agent" })
6529
6627
  ] }),
6530
- !hasAuth && /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", children: [
6531
- /* @__PURE__ */ jsxs2(Box3, { children: [
6532
- /* @__PURE__ */ jsxs2(Text3, { color: "yellow", children: [
6628
+ !hasAuth && /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", children: [
6629
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6630
+ /* @__PURE__ */ jsxs3(Text4, { color: "yellow", children: [
6533
6631
  GUTTER.pending,
6534
6632
  " "
6535
6633
  ] }),
6536
- /* @__PURE__ */ jsx3(Text3, { color: "yellow", children: "Connect your OpenAI account to get started" })
6634
+ /* @__PURE__ */ jsx4(Text4, { color: "yellow", children: "Connect your OpenAI account to get started" })
6537
6635
  ] }),
6538
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", children: "/auth \u2014 browser login \xB7 /auth-codex \u2014 import existing session" }) })
6636
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { color: "gray", children: "/auth \u2014 browser login \xB7 /auth-codex \u2014 import existing session" }) })
6539
6637
  ] }),
6540
- hasAuth && !hasWorkspace && /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", children: [
6541
- /* @__PURE__ */ jsxs2(Box3, { children: [
6542
- /* @__PURE__ */ jsxs2(Text3, { color: "green", children: [
6638
+ hasAuth && !hasWorkspace && /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", children: [
6639
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6640
+ /* @__PURE__ */ jsxs3(Text4, { color: "green", children: [
6543
6641
  GUTTER.success,
6544
6642
  " "
6545
6643
  ] }),
6546
- /* @__PURE__ */ jsx3(Text3, { color: "green", children: "Connected" })
6644
+ /* @__PURE__ */ jsx4(Text4, { color: "green", children: "Connected" })
6547
6645
  ] }),
6548
- /* @__PURE__ */ jsxs2(Box3, { children: [
6549
- /* @__PURE__ */ jsxs2(Text3, { color: "yellow", children: [
6646
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6647
+ /* @__PURE__ */ jsxs3(Text4, { color: "yellow", children: [
6550
6648
  GUTTER.pending,
6551
6649
  " "
6552
6650
  ] }),
6553
- /* @__PURE__ */ jsx3(Text3, { color: "yellow", children: "Create a workspace to begin" })
6651
+ /* @__PURE__ */ jsx4(Text4, { color: "yellow", children: "Create a workspace to begin" })
6554
6652
  ] }),
6555
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", children: "/init \u2014 initialize in current directory" }) })
6653
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { color: "gray", children: "/init \u2014 initialize in current directory" }) })
6556
6654
  ] }),
6557
- hasAuth && hasWorkspace && /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", children: [
6558
- /* @__PURE__ */ jsxs2(Box3, { children: [
6559
- /* @__PURE__ */ jsxs2(Text3, { color: "green", children: [
6655
+ hasAuth && hasWorkspace && /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", children: [
6656
+ /* @__PURE__ */ jsxs3(Box4, { children: [
6657
+ /* @__PURE__ */ jsxs3(Text4, { color: "green", children: [
6560
6658
  GUTTER.active,
6561
6659
  " "
6562
6660
  ] }),
6563
- /* @__PURE__ */ jsx3(Text3, { color: "green", children: "Ready" }),
6564
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
6661
+ /* @__PURE__ */ jsx4(Text4, { color: "green", children: "Ready" }),
6662
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
6565
6663
  " \u2014 ",
6566
6664
  fileCount,
6567
6665
  " files \xB7 ",
@@ -6569,7 +6667,7 @@ function HomeScreen({
6569
6667
  " skills"
6570
6668
  ] })
6571
6669
  ] }),
6572
- /* @__PURE__ */ jsx3(Box3, { marginLeft: 2, children: /* @__PURE__ */ jsx3(Text3, { color: "gray", children: "Ask a question, @mention a file, or /help for commands" }) })
6670
+ /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { color: "gray", children: "Ask a question, @mention a file, or /help for commands" }) })
6573
6671
  ] })
6574
6672
  ] });
6575
6673
  }
@@ -6578,8 +6676,8 @@ function SuggestionDropdown({
6578
6676
  selectedIndex
6579
6677
  }) {
6580
6678
  if (items.length === 0) return null;
6581
- return /* @__PURE__ */ jsxs2(
6582
- Box3,
6679
+ return /* @__PURE__ */ jsxs3(
6680
+ Box4,
6583
6681
  {
6584
6682
  flexDirection: "column",
6585
6683
  borderStyle: "single",
@@ -6591,12 +6689,12 @@ function SuggestionDropdown({
6591
6689
  const selected = idx === selectedIndex;
6592
6690
  const prefix = selected ? "\u203A" : " ";
6593
6691
  if (s.kind === "file") {
6594
- return selected ? /* @__PURE__ */ jsx3(Box3, { children: /* @__PURE__ */ jsx3(Text3, { inverse: true, bold: true, children: ` ${prefix} @${s.path} ` }) }, `file-${s.path}`) : /* @__PURE__ */ jsxs2(Box3, { children: [
6595
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", children: [
6692
+ return selected ? /* @__PURE__ */ jsx4(Box4, { children: /* @__PURE__ */ jsx4(Text4, { inverse: true, bold: true, children: ` ${prefix} @${s.path} ` }) }, `file-${s.path}`) : /* @__PURE__ */ jsxs3(Box4, { children: [
6693
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", children: [
6596
6694
  prefix,
6597
6695
  " "
6598
6696
  ] }),
6599
- /* @__PURE__ */ jsxs2(Text3, { color: "green", children: [
6697
+ /* @__PURE__ */ jsxs3(Text4, { color: "green", children: [
6600
6698
  "@",
6601
6699
  s.path
6602
6700
  ] })
@@ -6605,23 +6703,23 @@ function SuggestionDropdown({
6605
6703
  const nameColor = s.kind === "skill" ? "magenta" : "cyan";
6606
6704
  const badge = s.kind === "skill" ? " [skill]" : "";
6607
6705
  const label = `/${s.name}${badge} \u2014 ${s.description}`;
6608
- return selected ? /* @__PURE__ */ jsx3(Box3, { children: /* @__PURE__ */ jsx3(Text3, { inverse: true, bold: true, children: ` ${prefix} ${label} ` }) }, `${s.kind}-${s.name}`) : /* @__PURE__ */ jsxs2(Box3, { children: [
6609
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", children: [
6706
+ return selected ? /* @__PURE__ */ jsx4(Box4, { children: /* @__PURE__ */ jsx4(Text4, { inverse: true, bold: true, children: ` ${prefix} ${label} ` }) }, `${s.kind}-${s.name}`) : /* @__PURE__ */ jsxs3(Box4, { children: [
6707
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", children: [
6610
6708
  prefix,
6611
6709
  " "
6612
6710
  ] }),
6613
- /* @__PURE__ */ jsxs2(Text3, { color: nameColor, children: [
6711
+ /* @__PURE__ */ jsxs3(Text4, { color: nameColor, children: [
6614
6712
  "/",
6615
6713
  s.name
6616
6714
  ] }),
6617
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
6715
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
6618
6716
  badge,
6619
6717
  " \u2014 ",
6620
6718
  s.description
6621
6719
  ] })
6622
6720
  ] }, `${s.kind}-${s.name}`);
6623
6721
  }),
6624
- /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: " \u2191\u2193 navigate \xB7 enter select \xB7 tab complete" })
6722
+ /* @__PURE__ */ jsx4(Text4, { color: "gray", dimColor: true, children: " \u2191\u2193 navigate \xB7 enter select \xB7 tab complete" })
6625
6723
  ]
6626
6724
  }
6627
6725
  );
@@ -6639,30 +6737,30 @@ function FooterBar({
6639
6737
  }) {
6640
6738
  const modeLabel = mode === "auto-research" ? "auto" : mode === "auto-approve" ? "approve" : "review";
6641
6739
  const planLabel = planningStatus !== "idle" ? ` \xB7 ${planningStatus}` : "";
6642
- return /* @__PURE__ */ jsxs2(Box3, { flexDirection: "column", marginTop: 0, children: [
6643
- /* @__PURE__ */ jsxs2(Box3, { justifyContent: "space-between", children: [
6644
- /* @__PURE__ */ jsx3(Text3, { color: statusColor, children: busy ? toolActivity ? `${frame} ${toolActivity}` : `${frame} thinking...` : `${GUTTER.active} ${statusParts.join(" \xB7 ")}` }),
6645
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
6740
+ return /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", marginTop: 0, children: [
6741
+ /* @__PURE__ */ jsxs3(Box4, { justifyContent: "space-between", children: [
6742
+ /* @__PURE__ */ jsx4(Text4, { color: statusColor, children: busy ? toolActivity ? `${frame} ${toolActivity}` : `${frame} thinking...` : `${GUTTER.active} ${statusParts.join(" \xB7 ")}` }),
6743
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
6646
6744
  tokenDisplay ? `${tokenDisplay} \xB7 ` : "",
6647
6745
  workspaceName
6648
6746
  ] })
6649
6747
  ] }),
6650
- /* @__PURE__ */ jsxs2(Box3, { justifyContent: "space-between", children: [
6651
- /* @__PURE__ */ jsxs2(Text3, { color: "gray", dimColor: true, children: [
6748
+ /* @__PURE__ */ jsxs3(Box4, { justifyContent: "space-between", children: [
6749
+ /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
6652
6750
  modeLabel,
6653
6751
  planLabel,
6654
6752
  " \xB7 shift+tab cycle \xB7 /help"
6655
6753
  ] }),
6656
- /* @__PURE__ */ jsx3(Text3, { color: "gray", dimColor: true, children: "shift+enter newline \xB7 esc cancel" })
6754
+ /* @__PURE__ */ jsx4(Text4, { color: "gray", dimColor: true, children: "shift+enter newline \xB7 esc cancel" })
6657
6755
  ] })
6658
6756
  ] });
6659
6757
  }
6660
6758
 
6661
6759
  // src/tui/app.tsx
6662
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
6760
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
6663
6761
  var SPINNER_FRAMES = ["\u25D0", "\u25D3", "\u25D1", "\u25D2"];
6664
6762
  function useAnimatedFrame(active) {
6665
- const [index, setIndex] = useState3(0);
6763
+ const [index, setIndex] = useState4(0);
6666
6764
  useEffect2(() => {
6667
6765
  if (!active) {
6668
6766
  setIndex(0);
@@ -6701,36 +6799,37 @@ function App({
6701
6799
  }) {
6702
6800
  const app = useApp();
6703
6801
  const abortRef = useRef(null);
6704
- const [input2, setInput] = useState3("");
6705
- const [composerFocused, setComposerFocused] = useState3(true);
6706
- const [busy, setBusy] = useState3(false);
6707
- const [authStatus, setAuthStatus] = useState3(initialState.authStatus);
6708
- const [workspacePath, setWorkspacePath] = useState3(initialState.workspacePath);
6709
- const [workspaceFiles, setWorkspaceFiles] = useState3([]);
6710
- const [skills2, setSkills] = useState3([]);
6711
- const [messages, setMessages] = useState3([]);
6712
- const [history, setHistory] = useState3([]);
6713
- const [activeSkills, setActiveSkills] = useState3([]);
6714
- const [pendingUpdates, setPendingUpdates] = useState3(initialState.pendingUpdates);
6715
- const [statusLine, setStatusLine] = useState3("");
6716
- const [currentToolActivity, setCurrentToolActivity] = useState3("");
6717
- const [sessionTokens, setSessionTokens] = useState3(() => createSessionUsage());
6718
- const [tokenDisplay, setTokenDisplay] = useState3("");
6719
- const [showSuggestions, setShowSuggestions] = useState3(false);
6720
- const [agentMode, setAgentMode] = useState3("manual-review");
6721
- const [planningState, setPlanningState] = useState3({
6802
+ const [input2, setInput] = useState4("");
6803
+ const [composerFocused, setComposerFocused] = useState4(true);
6804
+ const [busy, setBusy] = useState4(false);
6805
+ const [authStatus, setAuthStatus] = useState4(initialState.authStatus);
6806
+ const [workspacePath, setWorkspacePath] = useState4(initialState.workspacePath);
6807
+ const [workspaceFiles, setWorkspaceFiles] = useState4([]);
6808
+ const [skills2, setSkills] = useState4([]);
6809
+ const [messages, setMessages] = useState4([]);
6810
+ const [history, setHistory] = useState4([]);
6811
+ const [activeSkills, setActiveSkills] = useState4([]);
6812
+ const [pendingUpdates, setPendingUpdates] = useState4(initialState.pendingUpdates);
6813
+ const [statusLine, setStatusLine] = useState4("");
6814
+ const [currentToolActivity, setCurrentToolActivity] = useState4("");
6815
+ const [sessionTokens, setSessionTokens] = useState4(() => createSessionUsage());
6816
+ const [tokenDisplay, setTokenDisplay] = useState4("");
6817
+ const [showSuggestions, setShowSuggestions] = useState4(false);
6818
+ const [agentMode, setAgentMode] = useState4("manual-review");
6819
+ const [planningState, setPlanningState] = useState4({
6722
6820
  status: "idle",
6723
6821
  planningHistory: []
6724
6822
  });
6725
- const [theme, setTheme] = useState3("dark");
6726
- const [config, setConfig] = useState3(null);
6727
- const [cursorToEnd, setCursorToEnd] = useState3(0);
6728
- const [screen, setScreen] = useState3("main");
6729
- const sessionId = useMemo2(() => crypto.randomUUID(), []);
6823
+ const [theme, setTheme] = useState4("dark");
6824
+ const [config, setConfig] = useState4(null);
6825
+ const [cursorToEnd, setCursorToEnd] = useState4(0);
6826
+ const [screen, setScreen] = useState4("main");
6827
+ const [resumeSessions, setResumeSessions] = useState4([]);
6828
+ const sessionId = useMemo3(() => crypto.randomUUID(), []);
6730
6829
  const deferredMessages = useDeferredValue(messages);
6731
6830
  const deferredPendingUpdates = useDeferredValue(pendingUpdates);
6732
6831
  const activityFrame = useAnimatedFrame(busy);
6733
- const [agentQuestion, setAgentQuestion] = useState3(null);
6832
+ const [agentQuestion, setAgentQuestion] = useState4(null);
6734
6833
  const previewRef = useRef(null);
6735
6834
  const isHome = deferredMessages.length === 0 && !busy;
6736
6835
  const hasWorkspace = workspacePath !== null;
@@ -6784,9 +6883,9 @@ function App({
6784
6883
  cancelled = true;
6785
6884
  };
6786
6885
  }, [homeDir]);
6787
- const [selectedSuggestion, setSelectedSuggestion] = useState3(-1);
6788
- const atMention = useMemo2(() => extractAtMention(input2), [input2]);
6789
- const suggestions = useMemo2(() => {
6886
+ const [selectedSuggestion, setSelectedSuggestion] = useState4(-1);
6887
+ const atMention = useMemo3(() => extractAtMention(input2), [input2]);
6888
+ const suggestions = useMemo3(() => {
6790
6889
  if (atMention) {
6791
6890
  return getFileSuggestions(atMention.partial, workspaceFiles);
6792
6891
  }
@@ -6941,32 +7040,32 @@ function App({
6941
7040
  addSystemMessage("No workspace. Run /init first.");
6942
7041
  break;
6943
7042
  }
6944
- const resumeSessions = await listSessions(workspacePath);
6945
- if (resumeSessions.length === 0) {
7043
+ const resumeSessions2 = await listSessions(workspacePath);
7044
+ if (resumeSessions2.length === 0) {
6946
7045
  addSystemMessage("No previous sessions found.");
6947
7046
  break;
6948
7047
  }
6949
7048
  if (!args) {
6950
7049
  addSystemMessage("Recent sessions:");
6951
- for (let ri = 0; ri < Math.min(resumeSessions.length, 10); ri++) {
6952
- const rs = resumeSessions[ri];
7050
+ for (let ri = 0; ri < Math.min(resumeSessions2.length, 10); ri++) {
7051
+ const rs = resumeSessions2[ri];
6953
7052
  addSystemMessage(` ${ri + 1}. ${rs.preview || "(empty)"} \u2014 ${rs.turnCount} turns \u2014 ${new Date(rs.lastActivity).toLocaleString()}`);
6954
7053
  }
6955
7054
  addSystemMessage("Type /resume <number> to restore a session.");
6956
7055
  break;
6957
7056
  }
6958
7057
  const resumeIdx = parseInt(args, 10);
6959
- if (isNaN(resumeIdx) || resumeIdx < 1 || resumeIdx > resumeSessions.length) {
6960
- addSystemMessage(`Invalid choice. Pick 1-${Math.min(resumeSessions.length, 10)}.`);
7058
+ if (isNaN(resumeIdx) || resumeIdx < 1 || resumeIdx > resumeSessions2.length) {
7059
+ addSystemMessage(`Invalid choice. Pick 1-${Math.min(resumeSessions2.length, 10)}.`);
6961
7060
  break;
6962
7061
  }
6963
7062
  try {
6964
- const restored = await loadSessionHistory(workspacePath, resumeSessions[resumeIdx - 1].id);
7063
+ const restored = await loadSessionHistory(workspacePath, resumeSessions2[resumeIdx - 1].id);
6965
7064
  startTransition(() => {
6966
7065
  setMessages(restored.messages);
6967
7066
  setHistory(restored.llmHistory);
6968
7067
  });
6969
- addSystemMessage(`Resumed session (${resumeSessions[resumeIdx - 1].turnCount} turns). Continue where you left off.`);
7068
+ addSystemMessage(`Resumed session (${resumeSessions2[resumeIdx - 1].turnCount} turns). Continue where you left off.`);
6970
7069
  } catch (err) {
6971
7070
  addSystemMessage(`Failed: ${err instanceof Error ? err.message : String(err)}`);
6972
7071
  }
@@ -7292,7 +7391,7 @@ ${msg.text}
7292
7391
  addSystemMessage(`Rejected: ${next.summary}`);
7293
7392
  });
7294
7393
  }
7295
- useInput3((key, inputKey) => {
7394
+ useInput4((key, inputKey) => {
7296
7395
  if (inputKey.shift && inputKey.tab) {
7297
7396
  setAgentMode((prev) => {
7298
7397
  const modes = ["manual-review", "auto-approve", "auto-research"];
@@ -7697,7 +7796,7 @@ ${msg.text}
7697
7796
  statusParts.push(agentMode);
7698
7797
  if (deferredPendingUpdates.length > 0) statusParts.push(`${deferredPendingUpdates.length} pending`);
7699
7798
  const statusColor = busy ? "yellow" : !hasAuth ? "red" : deferredPendingUpdates.length > 0 ? "magenta" : "green";
7700
- const configItems = useMemo2(() => [
7799
+ const configItems = useMemo3(() => [
7701
7800
  {
7702
7801
  key: "defaults.model",
7703
7802
  label: "Model",
@@ -7754,8 +7853,34 @@ ${msg.text}
7754
7853
  setScreen("main");
7755
7854
  setComposerFocused(true);
7756
7855
  }
7856
+ if (screen === "resume") {
7857
+ return /* @__PURE__ */ jsx5(
7858
+ SessionPicker,
7859
+ {
7860
+ sessions: resumeSessions,
7861
+ onSelect: async (session) => {
7862
+ try {
7863
+ const restored = await loadSessionHistory(workspacePath, session.id);
7864
+ startTransition(() => {
7865
+ setMessages(restored.messages);
7866
+ setHistory(restored.llmHistory);
7867
+ });
7868
+ addSystemMessage(`Resumed session (${session.turnCount} turns). Continue where you left off.`);
7869
+ } catch (err) {
7870
+ addSystemMessage(`Failed: ${err instanceof Error ? err.message : String(err)}`);
7871
+ }
7872
+ setScreen("main");
7873
+ setComposerFocused(true);
7874
+ },
7875
+ onCancel: () => {
7876
+ setScreen("main");
7877
+ setComposerFocused(true);
7878
+ }
7879
+ }
7880
+ );
7881
+ }
7757
7882
  if (screen === "config") {
7758
- return /* @__PURE__ */ jsx4(
7883
+ return /* @__PURE__ */ jsx5(
7759
7884
  ConfigScreen,
7760
7885
  {
7761
7886
  items: configItems,
@@ -7764,8 +7889,8 @@ ${msg.text}
7764
7889
  }
7765
7890
  );
7766
7891
  }
7767
- return /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [
7768
- isHome && /* @__PURE__ */ jsx4(
7892
+ return /* @__PURE__ */ jsxs4(Box5, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [
7893
+ isHome && /* @__PURE__ */ jsx5(
7769
7894
  HomeScreen,
7770
7895
  {
7771
7896
  hasAuth,
@@ -7774,24 +7899,24 @@ ${msg.text}
7774
7899
  skillCount: skills2.length
7775
7900
  }
7776
7901
  ),
7777
- deferredMessages.length > 0 && /* @__PURE__ */ jsx4(Box4, { flexDirection: "column", marginBottom: 1, children: deferredMessages.slice(-30).map((msg, idx) => {
7902
+ deferredMessages.length > 0 && /* @__PURE__ */ jsx5(Box5, { flexDirection: "column", marginBottom: 1, children: deferredMessages.slice(-30).map((msg, idx) => {
7778
7903
  if (msg.role === "system") {
7779
- return /* @__PURE__ */ jsx4(SystemMessage, { text: msg.text }, `msg-${idx}`);
7904
+ return /* @__PURE__ */ jsx5(SystemMessage, { text: msg.text }, `msg-${idx}`);
7780
7905
  }
7781
7906
  if (msg.role === "user") {
7782
- return /* @__PURE__ */ jsx4(UserMessage, { text: msg.text }, `msg-${idx}`);
7907
+ return /* @__PURE__ */ jsx5(UserMessage, { text: msg.text }, `msg-${idx}`);
7783
7908
  }
7784
- return /* @__PURE__ */ jsx4(AgentMessage, { text: msg.text }, `msg-${idx}`);
7909
+ return /* @__PURE__ */ jsx5(AgentMessage, { text: msg.text }, `msg-${idx}`);
7785
7910
  }) }),
7786
- deferredPendingUpdates.length > 0 && /* @__PURE__ */ jsx4(
7911
+ deferredPendingUpdates.length > 0 && /* @__PURE__ */ jsx5(
7787
7912
  PendingUpdateCard,
7788
7913
  {
7789
7914
  count: deferredPendingUpdates.length,
7790
7915
  summary: truncate2(deferredPendingUpdates[0].summary, 80)
7791
7916
  }
7792
7917
  ),
7793
- planningState.status === "charter-review" && planningState.charter && /* @__PURE__ */ jsxs3(
7794
- Box4,
7918
+ planningState.status === "charter-review" && planningState.charter && /* @__PURE__ */ jsxs4(
7919
+ Box5,
7795
7920
  {
7796
7921
  borderStyle: "round",
7797
7922
  borderColor: "yellow",
@@ -7799,69 +7924,69 @@ ${msg.text}
7799
7924
  marginBottom: 1,
7800
7925
  flexDirection: "column",
7801
7926
  children: [
7802
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "yellow", children: "Research Charter \u2014 Review" }),
7803
- /* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
7804
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "white", children: "Question: " }),
7805
- /* @__PURE__ */ jsx4(Text4, { children: planningState.charter.researchQuestion })
7927
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "yellow", children: "Research Charter \u2014 Review" }),
7928
+ /* @__PURE__ */ jsxs4(Box5, { marginTop: 1, flexDirection: "column", children: [
7929
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "white", children: "Question: " }),
7930
+ /* @__PURE__ */ jsx5(Text5, { children: planningState.charter.researchQuestion })
7806
7931
  ] }),
7807
- planningState.charter.successCriteria.length > 0 && /* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
7808
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "white", children: "Success Criteria:" }),
7809
- planningState.charter.successCriteria.map((c, i) => /* @__PURE__ */ jsxs3(Text4, { color: "gray", children: [
7932
+ planningState.charter.successCriteria.length > 0 && /* @__PURE__ */ jsxs4(Box5, { marginTop: 1, flexDirection: "column", children: [
7933
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "white", children: "Success Criteria:" }),
7934
+ planningState.charter.successCriteria.map((c, i) => /* @__PURE__ */ jsxs4(Text5, { color: "gray", children: [
7810
7935
  " - ",
7811
7936
  c
7812
7937
  ] }, `sc-${i}`))
7813
7938
  ] }),
7814
- planningState.charter.scopeBoundaries.length > 0 && /* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
7815
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "white", children: "Scope Boundaries:" }),
7816
- planningState.charter.scopeBoundaries.map((b, i) => /* @__PURE__ */ jsxs3(Text4, { color: "gray", children: [
7939
+ planningState.charter.scopeBoundaries.length > 0 && /* @__PURE__ */ jsxs4(Box5, { marginTop: 1, flexDirection: "column", children: [
7940
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "white", children: "Scope Boundaries:" }),
7941
+ planningState.charter.scopeBoundaries.map((b, i) => /* @__PURE__ */ jsxs4(Text5, { color: "gray", children: [
7817
7942
  " - ",
7818
7943
  b
7819
7944
  ] }, `sb-${i}`))
7820
7945
  ] }),
7821
- planningState.charter.proposedSteps.length > 0 && /* @__PURE__ */ jsxs3(Box4, { marginTop: 1, flexDirection: "column", children: [
7822
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "white", children: "Proposed Steps:" }),
7823
- planningState.charter.proposedSteps.map((s, i) => /* @__PURE__ */ jsxs3(Text4, { color: "gray", children: [
7946
+ planningState.charter.proposedSteps.length > 0 && /* @__PURE__ */ jsxs4(Box5, { marginTop: 1, flexDirection: "column", children: [
7947
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "white", children: "Proposed Steps:" }),
7948
+ planningState.charter.proposedSteps.map((s, i) => /* @__PURE__ */ jsxs4(Text5, { color: "gray", children: [
7824
7949
  " ",
7825
7950
  i + 1,
7826
7951
  ". ",
7827
7952
  s
7828
7953
  ] }, `ps-${i}`))
7829
7954
  ] }),
7830
- /* @__PURE__ */ jsx4(Box4, { marginTop: 1, children: /* @__PURE__ */ jsxs3(Text4, { color: "gray", dimColor: true, children: [
7955
+ /* @__PURE__ */ jsx5(Box5, { marginTop: 1, children: /* @__PURE__ */ jsxs4(Text5, { color: "gray", dimColor: true, children: [
7831
7956
  "Press ",
7832
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "green", children: "a" }),
7957
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "green", children: "a" }),
7833
7958
  " to approve \xB7 ",
7834
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "cyan", children: "p" }),
7959
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "cyan", children: "p" }),
7835
7960
  " to keep planning \xB7 ",
7836
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "red", children: "Esc" }),
7961
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: "red", children: "Esc" }),
7837
7962
  " to cancel"
7838
7963
  ] }) })
7839
7964
  ]
7840
7965
  }
7841
7966
  ),
7842
- dropdownVisible && /* @__PURE__ */ jsx4(
7967
+ dropdownVisible && /* @__PURE__ */ jsx5(
7843
7968
  SuggestionDropdown,
7844
7969
  {
7845
7970
  items: suggestions,
7846
7971
  selectedIndex: selectedSuggestion
7847
7972
  }
7848
7973
  ),
7849
- agentQuestion && /* @__PURE__ */ jsx4(
7974
+ agentQuestion && /* @__PURE__ */ jsx5(
7850
7975
  QuestionCard,
7851
7976
  {
7852
7977
  question: agentQuestion.question.question,
7853
7978
  options: agentQuestion.question.options
7854
7979
  }
7855
7980
  ),
7856
- /* @__PURE__ */ jsx4(
7857
- Box4,
7981
+ /* @__PURE__ */ jsx5(
7982
+ Box5,
7858
7983
  {
7859
7984
  borderStyle: "round",
7860
7985
  borderColor: agentQuestion ? "yellow" : busy ? "yellow" : composerFocused ? "cyan" : "gray",
7861
7986
  paddingX: 1,
7862
7987
  flexDirection: "column",
7863
- children: /* @__PURE__ */ jsxs3(Box4, { children: [
7864
- /* @__PURE__ */ jsx4(
7988
+ children: /* @__PURE__ */ jsxs4(Box5, { children: [
7989
+ /* @__PURE__ */ jsx5(
7865
7990
  PromptPrefix,
7866
7991
  {
7867
7992
  busy,
@@ -7870,7 +7995,7 @@ ${msg.text}
7870
7995
  mode: agentMode
7871
7996
  }
7872
7997
  ),
7873
- /* @__PURE__ */ jsx4(
7998
+ /* @__PURE__ */ jsx5(
7874
7999
  TextInput,
7875
8000
  {
7876
8001
  value: input2,
@@ -7887,13 +8012,13 @@ ${msg.text}
7887
8012
  ] })
7888
8013
  }
7889
8014
  ),
7890
- /* @__PURE__ */ jsx4(Box4, { marginTop: 0, children: /* @__PURE__ */ jsxs3(Text4, { color: agentMode === "auto-research" ? "yellow" : "gray", dimColor: agentMode === "manual-review", children: [
8015
+ /* @__PURE__ */ jsx5(Box5, { marginTop: 0, children: /* @__PURE__ */ jsxs4(Text5, { color: agentMode === "auto-research" ? "yellow" : "gray", dimColor: agentMode === "manual-review", children: [
7891
8016
  "\u2016 ",
7892
8017
  agentMode,
7893
8018
  planningState.status !== "idle" ? ` (${planningState.status})` : "",
7894
8019
  " (shift+tab to cycle)"
7895
8020
  ] }) }),
7896
- /* @__PURE__ */ jsx4(
8021
+ /* @__PURE__ */ jsx5(
7897
8022
  FooterBar,
7898
8023
  {
7899
8024
  busy,
@@ -7918,7 +8043,7 @@ program.name("open-research").version(getPackageVersion()).description("Local-fi
7918
8043
  const project = await loadWorkspaceProject(target);
7919
8044
  const auth2 = await loadStoredAuth();
7920
8045
  render(
7921
- React4.createElement(App, {
8046
+ React5.createElement(App, {
7922
8047
  initialState: {
7923
8048
  authStatus: auth2 ? "connected" : "missing",
7924
8049
  workspacePath: project ? target : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-research",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Local-first research CLI agent — discover papers, synthesize notes, run analysis, and draft artifacts from your terminal.",
5
5
  "type": "module",
6
6
  "license": "MIT",