@sma1lboy/kobe 0.5.6 → 0.5.8

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/cli/index.js CHANGED
@@ -4652,7 +4652,7 @@ var init_git = __esm(() => {
4652
4652
  };
4653
4653
  });
4654
4654
 
4655
- // src/tui/lib/keymap.tsx
4655
+ // src/tui/lib/keymap-dispatch.ts
4656
4656
  function matchKey(evt) {
4657
4657
  const base = [];
4658
4658
  const name = evt.name;
@@ -4676,6 +4676,28 @@ function matchKey(evt) {
4676
4676
  const prefix = `${mods.join("+")}+`;
4677
4677
  return base.map((n) => prefix + n);
4678
4678
  }
4679
+ function dispatchKeyEvent(bindingStack, evt) {
4680
+ if (evt.defaultPrevented)
4681
+ return false;
4682
+ const candidates = matchKey(evt);
4683
+ for (let i = bindingStack.length - 1;i >= 0; i--) {
4684
+ const reg = bindingStack[i];
4685
+ if (!reg)
4686
+ continue;
4687
+ const cfg = reg.config();
4688
+ if (cfg.enabled === false)
4689
+ continue;
4690
+ const hit = cfg.bindings.find((b) => candidates.includes(b.key));
4691
+ if (hit) {
4692
+ hit.cmd(evt);
4693
+ evt.preventDefault();
4694
+ return true;
4695
+ }
4696
+ }
4697
+ return false;
4698
+ }
4699
+
4700
+ // src/tui/lib/keymap.tsx
4679
4701
  function ensureInstalled() {
4680
4702
  if (installed)
4681
4703
  return;
@@ -4685,22 +4707,7 @@ function ensureInstalled() {
4685
4707
  }
4686
4708
  installed = renderer.keyInput;
4687
4709
  listener = (evt) => {
4688
- if (evt.defaultPrevented)
4689
- return;
4690
- const candidates = matchKey(evt);
4691
- for (let i = stack.length - 1;i >= 0; i--) {
4692
- const reg = stack[i];
4693
- if (!reg)
4694
- continue;
4695
- const cfg = reg.config();
4696
- if (cfg.enabled === false)
4697
- continue;
4698
- const hit = cfg.bindings.find((b) => candidates.includes(b.key));
4699
- if (hit) {
4700
- hit.cmd(evt);
4701
- return;
4702
- }
4703
- }
4710
+ dispatchKeyEvent(stack, evt);
4704
4711
  };
4705
4712
  installed.on("keypress", listener);
4706
4713
  }
@@ -5176,7 +5183,6 @@ function bindByIds(handlers) {
5176
5183
  }
5177
5184
  function useKobeKeybindings(opts) {
5178
5185
  const palette = useCommandPalette();
5179
- const dialog = useDialog();
5180
5186
  const renderer = useRenderer();
5181
5187
  const onQuit = opts.onQuit ?? (() => {
5182
5188
  try {
@@ -5188,7 +5194,6 @@ function useKobeKeybindings(opts) {
5188
5194
  });
5189
5195
  const onFocusNext = opts.onFocusNext ?? (() => {});
5190
5196
  const onFocusPrev = opts.onFocusPrev ?? (() => {});
5191
- const onFocusDetach = opts.onFocusDetach ?? (() => {});
5192
5197
  if (renderer) {
5193
5198
  const onSelection = () => {
5194
5199
  const text = renderer.getSelection()?.getSelectedText();
@@ -5230,17 +5235,7 @@ function useKobeKeybindings(opts) {
5230
5235
  "focus.next": () => onFocusNext(),
5231
5236
  "focus.prev": () => onFocusPrev(),
5232
5237
  "app.copy_or_quit": () => handleCtrlC()
5233
- }),
5234
- {
5235
- key: "escape",
5236
- cmd: () => {
5237
- if (dialog.stack.length > 0) {
5238
- dialog.pop();
5239
- } else {
5240
- onFocusDetach();
5241
- }
5242
- }
5243
- }
5238
+ })
5244
5239
  ];
5245
5240
  });
5246
5241
  useBindings(() => ({ bindings: bindings() }));
@@ -5250,7 +5245,6 @@ var init_keybindings = __esm(() => {
5250
5245
  init_solid();
5251
5246
  init_dev();
5252
5247
  init_keymap();
5253
- init_dialog();
5254
5248
  init_command_palette();
5255
5249
  [ctrlCArmed, setCtrlCArmed] = createSignal(false);
5256
5250
  KobeKeymap = [
@@ -5338,14 +5332,6 @@ var init_keybindings = __esm(() => {
5338
5332
  category: "Global",
5339
5333
  description: "Copy selection / press twice within 1.5s to quit"
5340
5334
  },
5341
- {
5342
- id: "focus.detach",
5343
- scope: "global",
5344
- keys: ["esc"],
5345
- category: "Navigation",
5346
- description: "Back to sidebar. In chat while streaming, interrupts the turn instead. Closes top dialog if any.",
5347
- hint: { keys: "esc", label: "back to sidebar" }
5348
- },
5349
5335
  {
5350
5336
  id: "chat.interrupt",
5351
5337
  scope: "workspace",
@@ -8871,7 +8857,7 @@ var init_package = __esm(() => {
8871
8857
  package_default = {
8872
8858
  $schema: "https://json.schemastore.org/package.json",
8873
8859
  name: "@sma1lboy/kobe",
8874
- version: "0.5.6",
8860
+ version: "0.5.8",
8875
8861
  description: "TUI orchestrator for Claude Code (codename)",
8876
8862
  type: "module",
8877
8863
  packageManager: "bun@1.3.13",
@@ -10647,6 +10633,9 @@ class Orchestrator {
10647
10633
  planUsageSignal() {
10648
10634
  return () => null;
10649
10635
  }
10636
+ rcBridgeSignal() {
10637
+ return () => ({ state: "off" });
10638
+ }
10650
10639
  subscribeTasks(listener2) {
10651
10640
  return this.store.subscribe(listener2);
10652
10641
  }
@@ -11361,6 +11350,8 @@ class RemoteOrchestrator {
11361
11350
  setRunState;
11362
11351
  planUsageAcc;
11363
11352
  setPlanUsage;
11353
+ rcBridgeAcc;
11354
+ setRcBridge;
11364
11355
  subscribers = new Map;
11365
11356
  pendingInputBroker = new InMemoryPendingInputBroker;
11366
11357
  constructor(client) {
@@ -11368,12 +11359,15 @@ class RemoteOrchestrator {
11368
11359
  const [tasks, setTasks] = createSignal([]);
11369
11360
  const [runState, setRunState] = createSignal(new Map);
11370
11361
  const [planUsage, setPlanUsage] = createSignal(null);
11362
+ const [rcBridge, setRcBridge] = createSignal({ state: "off" });
11371
11363
  this.tasksAcc = tasks;
11372
11364
  this.setTasks = (next) => setTasks(() => next);
11373
11365
  this.runStateAcc = runState;
11374
11366
  this.setRunState = (next) => setRunState(() => next);
11375
11367
  this.planUsageAcc = planUsage;
11376
11368
  this.setPlanUsage = (next) => setPlanUsage(() => next);
11369
+ this.rcBridgeAcc = rcBridge;
11370
+ this.setRcBridge = (next) => setRcBridge(() => next);
11377
11371
  this.client.on("*", (frame) => this.handleEvent(frame.name, frame.payload));
11378
11372
  }
11379
11373
  async init() {
@@ -11395,6 +11389,8 @@ class RemoteOrchestrator {
11395
11389
  }
11396
11390
  if (hello.planUsage)
11397
11391
  this.setPlanUsage(hello.planUsage);
11392
+ if (hello.rcBridge)
11393
+ this.setRcBridge(hello.rcBridge);
11398
11394
  await this.client.request("subscribe", { taskIds: "all" });
11399
11395
  if (hello.pending) {
11400
11396
  for (const [taskId, entries] of Object.entries(hello.pending)) {
@@ -11427,6 +11423,21 @@ class RemoteOrchestrator {
11427
11423
  planUsageSignal() {
11428
11424
  return this.planUsageAcc;
11429
11425
  }
11426
+ rcBridgeSignal() {
11427
+ return this.rcBridgeAcc;
11428
+ }
11429
+ async startRcBridge(opts = {}) {
11430
+ const res = await this.client.request("rcBridge.start", {
11431
+ taskId: opts.taskId,
11432
+ tabId: opts.tabId,
11433
+ cwd: opts.cwd
11434
+ });
11435
+ return res.status;
11436
+ }
11437
+ async stopRcBridge() {
11438
+ const res = await this.client.request("rcBridge.stop", {});
11439
+ return res.status;
11440
+ }
11430
11441
  listTasks() {
11431
11442
  return this.tasksAcc().slice();
11432
11443
  }
@@ -11567,6 +11578,12 @@ class RemoteOrchestrator {
11567
11578
  this.setPlanUsage(usage ?? null);
11568
11579
  return;
11569
11580
  }
11581
+ if (name === "rcBridge.changed") {
11582
+ const status = obj.status;
11583
+ if (status)
11584
+ this.setRcBridge(status);
11585
+ return;
11586
+ }
11570
11587
  const taskId = obj.taskId;
11571
11588
  const tabId = obj.tabId;
11572
11589
  if (!taskId || !tabId)
@@ -13525,6 +13542,447 @@ var init_pane_header = __esm(() => {
13525
13542
  init_theme();
13526
13543
  });
13527
13544
 
13545
+ // src/tui/component/rc-bridge-dialog.tsx
13546
+ import { TextAttributes as TextAttributes12 } from "@opentui/core";
13547
+ function RcBridgeDialog(props) {
13548
+ const dialog = useDialog();
13549
+ const {
13550
+ theme
13551
+ } = useTheme();
13552
+ const [busy, setBusy] = createSignal(false);
13553
+ const targetTask = () => props.activeTask?.();
13554
+ const canEnable = () => Boolean(targetTask());
13555
+ async function activate() {
13556
+ if (busy())
13557
+ return;
13558
+ const s = props.status();
13559
+ setBusy(true);
13560
+ try {
13561
+ if (s.state === "off" || s.state === "error") {
13562
+ const task = targetTask();
13563
+ if (!task)
13564
+ return;
13565
+ await props.orchestrator.startRcBridge({
13566
+ taskId: task.id,
13567
+ tabId: props.activeTabId?.() ?? undefined
13568
+ });
13569
+ } else if (s.state === "running") {
13570
+ await props.orchestrator.stopRcBridge();
13571
+ }
13572
+ } catch (err) {
13573
+ console.error("kobe: rcBridge action failed:", err);
13574
+ } finally {
13575
+ setBusy(false);
13576
+ }
13577
+ }
13578
+ useBindings(() => ({
13579
+ enabled: dialog.stack.length > 0,
13580
+ bindings: [{
13581
+ key: "return",
13582
+ cmd: () => void activate()
13583
+ }]
13584
+ }));
13585
+ return (() => {
13586
+ var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("text"), _el$7 = createElement("text"), _el$8 = createTextNode(`Binds this task's worktree to a claude.ai environment so you can pick it up from another device. claude.ai sessions on that environment run on your machine under the task's worktree \u2014 and if this tab already has a kobe conversation, you can \`/resume <id>\` it in claude.ai to keep going from where you left off.`);
13587
+ insertNode(_el$, _el$2);
13588
+ insertNode(_el$, _el$7);
13589
+ setProp(_el$, "paddingLeft", 2);
13590
+ setProp(_el$, "paddingRight", 2);
13591
+ setProp(_el$, "gap", 1);
13592
+ insertNode(_el$2, _el$3);
13593
+ insertNode(_el$2, _el$5);
13594
+ setProp(_el$2, "flexDirection", "row");
13595
+ setProp(_el$2, "justifyContent", "space-between");
13596
+ insertNode(_el$3, createTextNode(`Share to claude.ai`));
13597
+ insertNode(_el$5, createTextNode(`esc`));
13598
+ setProp(_el$5, "onMouseUp", () => dialog.clear());
13599
+ insertNode(_el$7, _el$8);
13600
+ setProp(_el$7, "wrapMode", "word");
13601
+ insert(_el$, createComponent2(Switch, {
13602
+ get children() {
13603
+ return [createComponent2(Match, {
13604
+ get when() {
13605
+ return props.status().state === "off";
13606
+ },
13607
+ get children() {
13608
+ return createComponent2(Show, {
13609
+ get when() {
13610
+ return canEnable();
13611
+ },
13612
+ get fallback() {
13613
+ return (() => {
13614
+ var _el$48 = createElement("text");
13615
+ insertNode(_el$48, createTextNode(`No active task \u2014 select a task in the sidebar first, then re-open this dialog.`));
13616
+ effect((_$p) => setProp(_el$48, "fg", theme.textMuted, _$p));
13617
+ return _el$48;
13618
+ })();
13619
+ },
13620
+ get children() {
13621
+ var _el$1 = createElement("box"), _el$10 = createElement("text"), _el$12 = createElement("box"), _el$13 = createElement("text"), _el$14 = createElement("text"), _el$16 = createElement("text");
13622
+ insertNode(_el$1, _el$10);
13623
+ insertNode(_el$1, _el$12);
13624
+ setProp(_el$1, "flexDirection", "column");
13625
+ setProp(_el$1, "gap", 0);
13626
+ insertNode(_el$10, createTextNode(`Will share:`));
13627
+ insertNode(_el$12, _el$13);
13628
+ insertNode(_el$12, _el$14);
13629
+ insertNode(_el$12, _el$16);
13630
+ setProp(_el$12, "flexDirection", "row");
13631
+ setProp(_el$12, "gap", 1);
13632
+ insert(_el$13, () => targetTask()?.title ?? "");
13633
+ insertNode(_el$14, createTextNode(`\xB7`));
13634
+ setProp(_el$16, "wrapMode", "none");
13635
+ insert(_el$16, () => targetTask()?.worktreePath ?? "");
13636
+ effect((_p$) => {
13637
+ var { textMuted: _v$, text: _v$2 } = theme, _v$3 = TextAttributes12.BOLD, _v$4 = theme.textMuted, _v$5 = theme.text;
13638
+ _v$ !== _p$.e && (_p$.e = setProp(_el$10, "fg", _v$, _p$.e));
13639
+ _v$2 !== _p$.t && (_p$.t = setProp(_el$13, "fg", _v$2, _p$.t));
13640
+ _v$3 !== _p$.a && (_p$.a = setProp(_el$13, "attributes", _v$3, _p$.a));
13641
+ _v$4 !== _p$.o && (_p$.o = setProp(_el$14, "fg", _v$4, _p$.o));
13642
+ _v$5 !== _p$.i && (_p$.i = setProp(_el$16, "fg", _v$5, _p$.i));
13643
+ return _p$;
13644
+ }, {
13645
+ e: undefined,
13646
+ t: undefined,
13647
+ a: undefined,
13648
+ o: undefined,
13649
+ i: undefined
13650
+ });
13651
+ return _el$1;
13652
+ }
13653
+ });
13654
+ }
13655
+ }), createComponent2(Match, {
13656
+ get when() {
13657
+ return props.status().state === "starting";
13658
+ },
13659
+ get children() {
13660
+ var _el$17 = createElement("text");
13661
+ insertNode(_el$17, createTextNode(`Connecting to claude.ai\u2026`));
13662
+ effect((_$p) => setProp(_el$17, "fg", theme.accent, _$p));
13663
+ return _el$17;
13664
+ }
13665
+ }), createComponent2(Match, {
13666
+ get when() {
13667
+ return props.status().state === "running";
13668
+ },
13669
+ get children() {
13670
+ var _el$19 = createElement("box"), _el$20 = createElement("box"), _el$21 = createElement("text"), _el$23 = createElement("text");
13671
+ insertNode(_el$19, _el$20);
13672
+ setProp(_el$19, "flexDirection", "column");
13673
+ setProp(_el$19, "gap", 0);
13674
+ insertNode(_el$20, _el$21);
13675
+ insertNode(_el$20, _el$23);
13676
+ setProp(_el$20, "flexDirection", "row");
13677
+ setProp(_el$20, "gap", 1);
13678
+ insertNode(_el$21, createTextNode(`Env:`));
13679
+ insert(_el$23, () => props.status().envId);
13680
+ insert(_el$19, createComponent2(Show, {
13681
+ get when() {
13682
+ return props.status().deeplink;
13683
+ },
13684
+ get children() {
13685
+ var _el$24 = createElement("box"), _el$25 = createElement("text"), _el$27 = createElement("text");
13686
+ insertNode(_el$24, _el$25);
13687
+ insertNode(_el$24, _el$27);
13688
+ setProp(_el$24, "flexDirection", "column");
13689
+ setProp(_el$24, "gap", 0);
13690
+ setProp(_el$24, "paddingTop", 1);
13691
+ insertNode(_el$25, createTextNode(`Open from another device:`));
13692
+ insert(_el$27, () => props.status().deeplink);
13693
+ effect((_p$) => {
13694
+ var { textMuted: _v$6, accent: _v$7 } = theme;
13695
+ _v$6 !== _p$.e && (_p$.e = setProp(_el$25, "fg", _v$6, _p$.e));
13696
+ _v$7 !== _p$.t && (_p$.t = setProp(_el$27, "fg", _v$7, _p$.t));
13697
+ return _p$;
13698
+ }, {
13699
+ e: undefined,
13700
+ t: undefined
13701
+ });
13702
+ return _el$24;
13703
+ }
13704
+ }), null);
13705
+ insert(_el$19, createComponent2(Show, {
13706
+ get when() {
13707
+ return props.status().bound;
13708
+ },
13709
+ get children() {
13710
+ var _el$28 = createElement("box"), _el$29 = createElement("box"), _el$30 = createElement("text"), _el$32 = createElement("text");
13711
+ insertNode(_el$28, _el$29);
13712
+ setProp(_el$28, "flexDirection", "column");
13713
+ setProp(_el$28, "gap", 0);
13714
+ setProp(_el$28, "paddingTop", 1);
13715
+ insertNode(_el$29, _el$30);
13716
+ insertNode(_el$29, _el$32);
13717
+ setProp(_el$29, "flexDirection", "row");
13718
+ setProp(_el$29, "gap", 1);
13719
+ insertNode(_el$30, createTextNode(`Sharing:`));
13720
+ setProp(_el$32, "wrapMode", "none");
13721
+ insert(_el$32, () => props.status().bound?.taskTitle ?? props.status().bound?.taskId);
13722
+ insert(_el$28, createComponent2(Show, {
13723
+ get when() {
13724
+ return props.status().bound?.sessionId;
13725
+ },
13726
+ get fallback() {
13727
+ return (() => {
13728
+ var _el$50 = createElement("text");
13729
+ insertNode(_el$50, createTextNode(`(no kobe session yet \u2014 claude.ai will start a fresh one in this worktree)`));
13730
+ setProp(_el$50, "wrapMode", "word");
13731
+ effect((_$p) => setProp(_el$50, "fg", theme.textMuted, _$p));
13732
+ return _el$50;
13733
+ })();
13734
+ },
13735
+ get children() {
13736
+ var _el$33 = createElement("box"), _el$34 = createElement("text"), _el$36 = createElement("text"), _el$37 = createTextNode(`/resume `);
13737
+ insertNode(_el$33, _el$34);
13738
+ insertNode(_el$33, _el$36);
13739
+ setProp(_el$33, "flexDirection", "column");
13740
+ setProp(_el$33, "gap", 0);
13741
+ insertNode(_el$34, createTextNode(`To continue this tab's conversation in claude.ai, run:`));
13742
+ insertNode(_el$36, _el$37);
13743
+ insert(_el$36, () => props.status().bound?.sessionId, null);
13744
+ effect((_p$) => {
13745
+ var { textMuted: _v$8, accent: _v$9 } = theme, _v$0 = TextAttributes12.BOLD;
13746
+ _v$8 !== _p$.e && (_p$.e = setProp(_el$34, "fg", _v$8, _p$.e));
13747
+ _v$9 !== _p$.t && (_p$.t = setProp(_el$36, "fg", _v$9, _p$.t));
13748
+ _v$0 !== _p$.a && (_p$.a = setProp(_el$36, "attributes", _v$0, _p$.a));
13749
+ return _p$;
13750
+ }, {
13751
+ e: undefined,
13752
+ t: undefined,
13753
+ a: undefined
13754
+ });
13755
+ return _el$33;
13756
+ }
13757
+ }), null);
13758
+ effect((_p$) => {
13759
+ var { textMuted: _v$1, text: _v$10 } = theme, _v$11 = TextAttributes12.BOLD;
13760
+ _v$1 !== _p$.e && (_p$.e = setProp(_el$30, "fg", _v$1, _p$.e));
13761
+ _v$10 !== _p$.t && (_p$.t = setProp(_el$32, "fg", _v$10, _p$.t));
13762
+ _v$11 !== _p$.a && (_p$.a = setProp(_el$32, "attributes", _v$11, _p$.a));
13763
+ return _p$;
13764
+ }, {
13765
+ e: undefined,
13766
+ t: undefined,
13767
+ a: undefined
13768
+ });
13769
+ return _el$28;
13770
+ }
13771
+ }), null);
13772
+ insert(_el$19, createComponent2(Show, {
13773
+ get when() {
13774
+ return props.status().cwd;
13775
+ },
13776
+ get children() {
13777
+ var _el$38 = createElement("box"), _el$39 = createElement("text"), _el$41 = createElement("text");
13778
+ insertNode(_el$38, _el$39);
13779
+ insertNode(_el$38, _el$41);
13780
+ setProp(_el$38, "flexDirection", "row");
13781
+ setProp(_el$38, "gap", 1);
13782
+ setProp(_el$38, "paddingTop", 1);
13783
+ insertNode(_el$39, createTextNode(`Cwd:`));
13784
+ setProp(_el$41, "wrapMode", "none");
13785
+ insert(_el$41, () => props.status().cwd);
13786
+ effect((_p$) => {
13787
+ var { textMuted: _v$12, text: _v$13 } = theme;
13788
+ _v$12 !== _p$.e && (_p$.e = setProp(_el$39, "fg", _v$12, _p$.e));
13789
+ _v$13 !== _p$.t && (_p$.t = setProp(_el$41, "fg", _v$13, _p$.t));
13790
+ return _p$;
13791
+ }, {
13792
+ e: undefined,
13793
+ t: undefined
13794
+ });
13795
+ return _el$38;
13796
+ }
13797
+ }), null);
13798
+ effect((_p$) => {
13799
+ var { textMuted: _v$14, accent: _v$15 } = theme, _v$16 = TextAttributes12.BOLD;
13800
+ _v$14 !== _p$.e && (_p$.e = setProp(_el$21, "fg", _v$14, _p$.e));
13801
+ _v$15 !== _p$.t && (_p$.t = setProp(_el$23, "fg", _v$15, _p$.t));
13802
+ _v$16 !== _p$.a && (_p$.a = setProp(_el$23, "attributes", _v$16, _p$.a));
13803
+ return _p$;
13804
+ }, {
13805
+ e: undefined,
13806
+ t: undefined,
13807
+ a: undefined
13808
+ });
13809
+ return _el$19;
13810
+ }
13811
+ }), createComponent2(Match, {
13812
+ get when() {
13813
+ return props.status().state === "stopping";
13814
+ },
13815
+ get children() {
13816
+ var _el$42 = createElement("text");
13817
+ insertNode(_el$42, createTextNode(`Disconnecting\u2026`));
13818
+ effect((_$p) => setProp(_el$42, "fg", theme.textMuted, _$p));
13819
+ return _el$42;
13820
+ }
13821
+ }), createComponent2(Match, {
13822
+ get when() {
13823
+ return props.status().state === "error";
13824
+ },
13825
+ get children() {
13826
+ var _el$44 = createElement("box"), _el$45 = createElement("text");
13827
+ insertNode(_el$44, _el$45);
13828
+ setProp(_el$44, "flexDirection", "column");
13829
+ setProp(_el$44, "gap", 0);
13830
+ insertNode(_el$45, createTextNode(`Bridge failed.`));
13831
+ insert(_el$44, createComponent2(Show, {
13832
+ get when() {
13833
+ return props.status().errorMessage;
13834
+ },
13835
+ get children() {
13836
+ var _el$47 = createElement("text");
13837
+ setProp(_el$47, "wrapMode", "word");
13838
+ insert(_el$47, () => props.status().errorMessage);
13839
+ effect((_$p) => setProp(_el$47, "fg", theme.textMuted, _$p));
13840
+ return _el$47;
13841
+ }
13842
+ }), null);
13843
+ effect((_p$) => {
13844
+ var _v$17 = theme.error, _v$18 = TextAttributes12.BOLD;
13845
+ _v$17 !== _p$.e && (_p$.e = setProp(_el$45, "fg", _v$17, _p$.e));
13846
+ _v$18 !== _p$.t && (_p$.t = setProp(_el$45, "attributes", _v$18, _p$.t));
13847
+ return _p$;
13848
+ }, {
13849
+ e: undefined,
13850
+ t: undefined
13851
+ });
13852
+ return _el$44;
13853
+ }
13854
+ })];
13855
+ }
13856
+ }), null);
13857
+ insert(_el$, createComponent2(Switch, {
13858
+ get children() {
13859
+ return [createComponent2(Match, {
13860
+ get when() {
13861
+ return props.status().state === "off";
13862
+ },
13863
+ get children() {
13864
+ return createComponent2(ActionButton, {
13865
+ label: "[ enter ] Enable",
13866
+ get disabled() {
13867
+ return busy() || !canEnable();
13868
+ },
13869
+ onClick: activate
13870
+ });
13871
+ }
13872
+ }), createComponent2(Match, {
13873
+ get when() {
13874
+ return props.status().state === "running";
13875
+ },
13876
+ get children() {
13877
+ return createComponent2(ActionButton, {
13878
+ label: "[ enter ] Disable",
13879
+ get disabled() {
13880
+ return busy();
13881
+ },
13882
+ onClick: activate,
13883
+ variant: "warning"
13884
+ });
13885
+ }
13886
+ }), createComponent2(Match, {
13887
+ get when() {
13888
+ return props.status().state === "error";
13889
+ },
13890
+ get children() {
13891
+ return createComponent2(ActionButton, {
13892
+ label: "[ enter ] Retry",
13893
+ get disabled() {
13894
+ return busy() || !canEnable();
13895
+ },
13896
+ onClick: activate
13897
+ });
13898
+ }
13899
+ }), createComponent2(Match, {
13900
+ get when() {
13901
+ return props.status().state === "starting" || props.status().state === "stopping";
13902
+ },
13903
+ get children() {
13904
+ return createComponent2(ActionButton, {
13905
+ label: "working\u2026",
13906
+ disabled: true
13907
+ });
13908
+ }
13909
+ })];
13910
+ }
13911
+ }), null);
13912
+ effect((_p$) => {
13913
+ var _v$19 = TextAttributes12.BOLD, _v$20 = theme.text, _v$21 = theme.textMuted, _v$22 = theme.textMuted;
13914
+ _v$19 !== _p$.e && (_p$.e = setProp(_el$3, "attributes", _v$19, _p$.e));
13915
+ _v$20 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$20, _p$.t));
13916
+ _v$21 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$21, _p$.a));
13917
+ _v$22 !== _p$.o && (_p$.o = setProp(_el$7, "fg", _v$22, _p$.o));
13918
+ return _p$;
13919
+ }, {
13920
+ e: undefined,
13921
+ t: undefined,
13922
+ a: undefined,
13923
+ o: undefined
13924
+ });
13925
+ return _el$;
13926
+ })();
13927
+ }
13928
+ function ActionButton(props) {
13929
+ const {
13930
+ theme
13931
+ } = useTheme();
13932
+ const fg = () => {
13933
+ if (props.disabled)
13934
+ return theme.textMuted;
13935
+ if (props.variant === "warning")
13936
+ return theme.warning;
13937
+ return theme.accent;
13938
+ };
13939
+ return (() => {
13940
+ var _el$52 = createElement("box"), _el$53 = createElement("text");
13941
+ insertNode(_el$52, _el$53);
13942
+ setProp(_el$52, "paddingLeft", 1);
13943
+ setProp(_el$52, "paddingRight", 1);
13944
+ setProp(_el$52, "onMouseUp", () => {
13945
+ if (!props.disabled)
13946
+ props.onClick?.();
13947
+ });
13948
+ insert(_el$53, () => props.label);
13949
+ effect((_p$) => {
13950
+ var _v$23 = theme.backgroundElement, _v$24 = fg(), _v$25 = TextAttributes12.BOLD;
13951
+ _v$23 !== _p$.e && (_p$.e = setProp(_el$52, "backgroundColor", _v$23, _p$.e));
13952
+ _v$24 !== _p$.t && (_p$.t = setProp(_el$53, "fg", _v$24, _p$.t));
13953
+ _v$25 !== _p$.a && (_p$.a = setProp(_el$53, "attributes", _v$25, _p$.a));
13954
+ return _p$;
13955
+ }, {
13956
+ e: undefined,
13957
+ t: undefined,
13958
+ a: undefined
13959
+ });
13960
+ return _el$52;
13961
+ })();
13962
+ }
13963
+ var init_rc_bridge_dialog = __esm(() => {
13964
+ init_solid();
13965
+ init_solid();
13966
+ init_solid();
13967
+ init_solid();
13968
+ init_solid();
13969
+ init_solid();
13970
+ init_solid();
13971
+ init_solid();
13972
+ init_dev();
13973
+ init_theme();
13974
+ init_keymap();
13975
+ init_dialog();
13976
+ RcBridgeDialog.show = (dialog, orchestrator, status, activeTask, activeTabId) => {
13977
+ dialog.replace(() => createComponent2(RcBridgeDialog, {
13978
+ orchestrator,
13979
+ status,
13980
+ activeTask,
13981
+ activeTabId
13982
+ }));
13983
+ };
13984
+ });
13985
+
13528
13986
  // src/tui/component/border.tsx
13529
13987
  var EmptyBorder, SplitBorder, HSplitBorder;
13530
13988
  var init_border = __esm(() => {
@@ -13689,7 +14147,7 @@ var init_focus = __esm(() => {
13689
14147
  });
13690
14148
 
13691
14149
  // src/tui/component/status-bar.tsx
13692
- import { TextAttributes as TextAttributes12 } from "@opentui/core";
14150
+ import { TextAttributes as TextAttributes13 } from "@opentui/core";
13693
14151
  function Hotkey(props) {
13694
14152
  const {
13695
14153
  theme
@@ -13708,7 +14166,7 @@ function Hotkey(props) {
13708
14166
  setProp(_el$5, "wrapMode", "none");
13709
14167
  insert(_el$5, () => props.label);
13710
14168
  effect((_p$) => {
13711
- var _v$ = theme.accent, _v$2 = TextAttributes12.BOLD, _v$3 = theme.textMuted;
14169
+ var _v$ = theme.accent, _v$2 = TextAttributes13.BOLD, _v$3 = theme.textMuted;
13712
14170
  _v$ !== _p$.e && (_p$.e = setProp(_el$2, "fg", _v$, _p$.e));
13713
14171
  _v$2 !== _p$.t && (_p$.t = setProp(_el$2, "attributes", _v$2, _p$.t));
13714
14172
  _v$3 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$3, _p$.a));
@@ -13742,11 +14200,7 @@ function StatusBar() {
13742
14200
  const leftHints = () => KobeKeymap.filter((b) => {
13743
14201
  if (!b.hint || b.hint.pin)
13744
14202
  return false;
13745
- if (b.scope === focus.focused())
13746
- return true;
13747
- if (b.id === "focus.detach" && focus.focused() === "workspace")
13748
- return true;
13749
- return false;
14203
+ return b.scope === focus.focused();
13750
14204
  });
13751
14205
  const rightHints = KobeKeymap.filter((b) => b.hint?.pin === "right");
13752
14206
  return (() => {
@@ -13800,7 +14254,7 @@ function StatusBar() {
13800
14254
  insertNode(_el$0, createTextNode(`Press Ctrl+C again to exit`));
13801
14255
  setProp(_el$0, "wrapMode", "none");
13802
14256
  effect((_p$) => {
13803
- var _v$4 = theme.warning, _v$5 = TextAttributes12.BOLD;
14257
+ var _v$4 = theme.warning, _v$5 = TextAttributes13.BOLD;
13804
14258
  _v$4 !== _p$.e && (_p$.e = setProp(_el$0, "fg", _v$4, _p$.e));
13805
14259
  _v$5 !== _p$.t && (_p$.t = setProp(_el$0, "attributes", _v$5, _p$.t));
13806
14260
  return _p$;
@@ -13812,7 +14266,7 @@ function StatusBar() {
13812
14266
  }
13813
14267
  }), null);
13814
14268
  effect((_p$) => {
13815
- var _v$6 = theme.primary, _v$7 = TextAttributes12.BOLD;
14269
+ var _v$6 = theme.primary, _v$7 = TextAttributes13.BOLD;
13816
14270
  _v$6 !== _p$.e && (_p$.e = setProp(_el$8, "fg", _v$6, _p$.e));
13817
14271
  _v$7 !== _p$.t && (_p$.t = setProp(_el$8, "attributes", _v$7, _p$.t));
13818
14272
  return _p$;
@@ -13838,7 +14292,7 @@ var init_status_bar = __esm(() => {
13838
14292
  });
13839
14293
 
13840
14294
  // src/tui/component/toast-overlay.tsx
13841
- import { TextAttributes as TextAttributes13 } from "@opentui/core";
14295
+ import { TextAttributes as TextAttributes14 } from "@opentui/core";
13842
14296
  function ToastOverlay() {
13843
14297
  const {
13844
14298
  theme
@@ -13881,7 +14335,7 @@ function ToastOverlay() {
13881
14335
  setProp(_el$4, "wrapMode", "none");
13882
14336
  insert(_el$4, () => toast.title);
13883
14337
  effect((_p$) => {
13884
- var _v$3 = bg(), _v$4 = fg(), _v$5 = TextAttributes13.BOLD, _v$6 = fg();
14338
+ var _v$3 = bg(), _v$4 = fg(), _v$5 = TextAttributes14.BOLD, _v$6 = fg();
13885
14339
  _v$3 !== _p$.e && (_p$.e = setProp(_el$2, "backgroundColor", _v$3, _p$.e));
13886
14340
  _v$4 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$4, _p$.t));
13887
14341
  _v$5 !== _p$.a && (_p$.a = setProp(_el$3, "attributes", _v$5, _p$.a));
@@ -13925,7 +14379,7 @@ var init_toast_overlay = __esm(() => {
13925
14379
  });
13926
14380
 
13927
14381
  // src/tui/component/create-pr-button.tsx
13928
- import { TextAttributes as TextAttributes14 } from "@opentui/core";
14382
+ import { TextAttributes as TextAttributes15 } from "@opentui/core";
13929
14383
  function isEnabled(task) {
13930
14384
  if (!task)
13931
14385
  return false;
@@ -13962,7 +14416,7 @@ function CreatePRButton(props) {
13962
14416
  insertNode(_el$4, createTextNode(`Create PR`));
13963
14417
  setProp(_el$4, "wrapMode", "none");
13964
14418
  effect((_p$) => {
13965
- var _v$ = enabled() ? onClick : undefined, _v$2 = bracketColor(), _v$3 = TextAttributes14.BOLD, _v$4 = labelColor();
14419
+ var _v$ = enabled() ? onClick : undefined, _v$2 = bracketColor(), _v$3 = TextAttributes15.BOLD, _v$4 = labelColor();
13966
14420
  _v$ !== _p$.e && (_p$.e = setProp(_el$, "onMouseUp", _v$, _p$.e));
13967
14421
  _v$2 !== _p$.t && (_p$.t = setProp(_el$2, "fg", _v$2, _p$.t));
13968
14422
  _v$3 !== _p$.a && (_p$.a = setProp(_el$2, "attributes", _v$3, _p$.a));
@@ -14252,7 +14706,7 @@ var init_markdown_parser = __esm(() => {
14252
14706
  });
14253
14707
 
14254
14708
  // src/tui/panes/chat/Markdown.tsx
14255
- import { TextAttributes as TextAttributes15 } from "@opentui/core";
14709
+ import { TextAttributes as TextAttributes16 } from "@opentui/core";
14256
14710
  function InlineSpans(props) {
14257
14711
  const {
14258
14712
  theme
@@ -14282,7 +14736,7 @@ function InlineSpans(props) {
14282
14736
  insert(_el$3, () => t.text, _el$5);
14283
14737
  effect((_$p) => setProp(_el$3, "style", {
14284
14738
  fg: theme.accent,
14285
- attributes: TextAttributes15.DIM
14739
+ attributes: TextAttributes16.DIM
14286
14740
  }, _$p));
14287
14741
  return _el$3;
14288
14742
  })();
@@ -14294,7 +14748,7 @@ function InlineSpans(props) {
14294
14748
  insert(_el$6, () => showUrl ? t.text : t.href);
14295
14749
  effect((_$p) => setProp(_el$6, "style", {
14296
14750
  fg: theme.accent,
14297
- attributes: TextAttributes15.UNDERLINE
14751
+ attributes: TextAttributes16.UNDERLINE
14298
14752
  }, _$p));
14299
14753
  return _el$6;
14300
14754
  })(), createComponent2(Show, {
@@ -14306,7 +14760,7 @@ function InlineSpans(props) {
14306
14760
  insert(_el$7, () => t.href, _el$9);
14307
14761
  effect((_$p) => setProp(_el$7, "style", {
14308
14762
  fg: theme.textMuted,
14309
- attributes: TextAttributes15.DIM
14763
+ attributes: TextAttributes16.DIM
14310
14764
  }, _$p));
14311
14765
  return _el$7;
14312
14766
  }
@@ -14483,7 +14937,7 @@ function VerticalTable(props) {
14483
14937
  var _el$20 = createElement("text");
14484
14938
  insertNode(_el$20, createTextNode(`\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`));
14485
14939
  effect((_p$) => {
14486
- var _v$4 = theme.textMuted, _v$5 = TextAttributes15.DIM;
14940
+ var _v$4 = theme.textMuted, _v$5 = TextAttributes16.DIM;
14487
14941
  _v$4 !== _p$.e && (_p$.e = setProp(_el$20, "fg", _v$4, _p$.e));
14488
14942
  _v$5 !== _p$.t && (_p$.t = setProp(_el$20, "attributes", _v$5, _p$.t));
14489
14943
  return _p$;
@@ -14574,7 +15028,7 @@ function BlockNode(props) {
14574
15028
  })();
14575
15029
  }
14576
15030
  if (b.kind === "heading") {
14577
- const attrs = b.level === 1 ? TextAttributes15.BOLD | TextAttributes15.UNDERLINE : TextAttributes15.BOLD;
15031
+ const attrs = b.level === 1 ? TextAttributes16.BOLD | TextAttributes16.UNDERLINE : TextAttributes16.BOLD;
14578
15032
  const fg = b.level <= 2 ? theme.accent : theme.text;
14579
15033
  const tokens = parseInline(b.text);
14580
15034
  return (() => {
@@ -14600,7 +15054,7 @@ function BlockNode(props) {
14600
15054
  const checkbox = item.checked ? "[x] " : "[ ] ";
14601
15055
  const bullet = b.ordered ? `${b.start + idx()}. ` : "\u2022 ";
14602
15056
  const prefix = isTask ? checkbox : bullet;
14603
- const labelAttrs = isTask && item.checked ? TextAttributes15.DIM : 0;
15057
+ const labelAttrs = isTask && item.checked ? TextAttributes16.DIM : 0;
14604
15058
  return (() => {
14605
15059
  var _el$30 = createElement("text"), _el$31 = createElement("span");
14606
15060
  insertNode(_el$30, _el$31);
@@ -14647,9 +15101,9 @@ function BlockNode(props) {
14647
15101
  }
14648
15102
  }), null);
14649
15103
  effect((_p$) => {
14650
- var _v$10 = theme.textMuted, _v$11 = TextAttributes15.ITALIC, _v$12 = {
15104
+ var _v$10 = theme.textMuted, _v$11 = TextAttributes16.ITALIC, _v$12 = {
14651
15105
  fg: theme.textMuted,
14652
- attributes: TextAttributes15.DIM
15106
+ attributes: TextAttributes16.DIM
14653
15107
  };
14654
15108
  _v$10 !== _p$.e && (_p$.e = setProp(_el$33, "fg", _v$10, _p$.e));
14655
15109
  _v$11 !== _p$.t && (_p$.t = setProp(_el$33, "attributes", _v$11, _p$.t));
@@ -14691,7 +15145,7 @@ function BlockNode(props) {
14691
15145
  var _el$37 = createElement("text");
14692
15146
  insert(_el$37, () => b.lang);
14693
15147
  effect((_p$) => {
14694
- var _v$13 = theme.textMuted, _v$14 = TextAttributes15.DIM;
15148
+ var _v$13 = theme.textMuted, _v$14 = TextAttributes16.DIM;
14695
15149
  _v$13 !== _p$.e && (_p$.e = setProp(_el$37, "fg", _v$13, _p$.e));
14696
15150
  _v$14 !== _p$.t && (_p$.t = setProp(_el$37, "attributes", _v$14, _p$.t));
14697
15151
  return _p$;
@@ -14751,7 +15205,7 @@ var init_Markdown = __esm(() => {
14751
15205
  });
14752
15206
 
14753
15207
  // src/tui/component/update-dialog.tsx
14754
- import { TextAttributes as TextAttributes16 } from "@opentui/core";
15208
+ import { TextAttributes as TextAttributes17 } from "@opentui/core";
14755
15209
  function UpdateDialog(props) {
14756
15210
  const dialog = useDialog();
14757
15211
  const {
@@ -14866,7 +15320,7 @@ function UpdateDialog(props) {
14866
15320
  }
14867
15321
  }));
14868
15322
  effect((_p$) => {
14869
- var _v$ = TextAttributes16.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.textMuted, _v$5 = theme.textMuted, _v$6 = theme.warning, _v$7 = TextAttributes16.BOLD, _v$8 = theme.textMuted, _v$9 = theme.accent, _v$0 = TextAttributes16.BOLD, _v$1 = theme.textMuted;
15323
+ var _v$ = TextAttributes17.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.textMuted, _v$5 = theme.textMuted, _v$6 = theme.warning, _v$7 = TextAttributes17.BOLD, _v$8 = theme.textMuted, _v$9 = theme.accent, _v$0 = TextAttributes17.BOLD, _v$1 = theme.textMuted;
14870
15324
  _v$ !== _p$.e && (_p$.e = setProp(_el$3, "attributes", _v$, _p$.e));
14871
15325
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$2, _p$.t));
14872
15326
  _v$3 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$3, _p$.a));
@@ -14917,17 +15371,20 @@ var init_update_dialog = __esm(() => {
14917
15371
  });
14918
15372
 
14919
15373
  // src/tui/component/top-bar.tsx
14920
- import { TextAttributes as TextAttributes17 } from "@opentui/core";
15374
+ import { TextAttributes as TextAttributes18 } from "@opentui/core";
14921
15375
  function TopBar(props) {
14922
15376
  const {
14923
15377
  theme
14924
15378
  } = useTheme();
14925
15379
  const dialog = useDialog();
15380
+ const remoteOrch = props.orchestrator instanceof RemoteOrchestrator ? props.orchestrator : null;
15381
+ const rcBridge = props.orchestrator.rcBridgeSignal();
15382
+ const isBridgeOn = () => rcBridge().state === "running" || rcBridge().state === "starting";
14926
15383
  return (() => {
14927
- var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("text"), _el$6 = createTextNode(`v`), _el$0 = createElement("box"), _el$10 = createElement("box");
15384
+ var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("text"), _el$6 = createTextNode(`v`), _el$10 = createElement("box"), _el$12 = createElement("box");
14928
15385
  insertNode(_el$, _el$2);
14929
- insertNode(_el$, _el$0);
14930
15386
  insertNode(_el$, _el$10);
15387
+ insertNode(_el$, _el$12);
14931
15388
  setProp(_el$, "flexDirection", "row");
14932
15389
  setProp(_el$, "paddingLeft", 2);
14933
15390
  setProp(_el$, "paddingRight", 2);
@@ -14958,7 +15415,7 @@ function TopBar(props) {
14958
15415
  });
14959
15416
  insert(_el$7, () => props.updateInfo()?.latest, _el$9);
14960
15417
  effect((_p$) => {
14961
- var _v$ = theme.warning, _v$2 = TextAttributes17.BOLD;
15418
+ var _v$ = theme.warning, _v$2 = TextAttributes18.BOLD;
14962
15419
  _v$ !== _p$.e && (_p$.e = setProp(_el$7, "fg", _v$, _p$.e));
14963
15420
  _v$2 !== _p$.t && (_p$.t = setProp(_el$7, "attributes", _v$2, _p$.t));
14964
15421
  return _p$;
@@ -14969,38 +15426,66 @@ function TopBar(props) {
14969
15426
  return _el$7;
14970
15427
  }
14971
15428
  }), null);
14972
- setProp(_el$0, "flexDirection", "row");
14973
- setProp(_el$0, "flexGrow", 1);
14974
- setProp(_el$0, "flexShrink", 1);
14975
- setProp(_el$0, "flexBasis", 0);
14976
- setProp(_el$0, "gap", 1);
14977
- setProp(_el$0, "justifyContent", "center");
14978
- insert(_el$0, createComponent2(Show, {
15429
+ insert(_el$2, createComponent2(Show, {
14979
15430
  get when() {
14980
- return props.activeTask() !== undefined;
15431
+ return remoteOrch && isBridgeOn();
14981
15432
  },
14982
15433
  get children() {
14983
- var _el$1 = createElement("text");
14984
- setProp(_el$1, "wrapMode", "none");
14985
- insert(_el$1, () => props.activeTask()?.branch);
15434
+ var _el$0 = createElement("text"), _el$1 = createTextNode(`\u25C9 `);
15435
+ insertNode(_el$0, _el$1);
15436
+ setProp(_el$0, "onMouseUp", () => {
15437
+ const orch = remoteOrch;
15438
+ if (orch)
15439
+ RcBridgeDialog.show(dialog, orch, rcBridge, props.activeTask, props.activeChatTabId);
15440
+ });
15441
+ insert(_el$0, (() => {
15442
+ var _c$ = memo2(() => rcBridge().state === "running");
15443
+ return () => _c$() ? rcBridge().bound?.taskTitle ?? rcBridge().envId ?? "RC" : "RC connecting\u2026";
15444
+ })(), null);
14986
15445
  effect((_p$) => {
14987
- var _v$3 = theme.text, _v$4 = TextAttributes17.BOLD;
14988
- _v$3 !== _p$.e && (_p$.e = setProp(_el$1, "fg", _v$3, _p$.e));
14989
- _v$4 !== _p$.t && (_p$.t = setProp(_el$1, "attributes", _v$4, _p$.t));
15446
+ var _v$3 = theme.accent, _v$4 = TextAttributes18.BOLD;
15447
+ _v$3 !== _p$.e && (_p$.e = setProp(_el$0, "fg", _v$3, _p$.e));
15448
+ _v$4 !== _p$.t && (_p$.t = setProp(_el$0, "attributes", _v$4, _p$.t));
14990
15449
  return _p$;
14991
15450
  }, {
14992
15451
  e: undefined,
14993
15452
  t: undefined
14994
15453
  });
14995
- return _el$1;
15454
+ return _el$0;
14996
15455
  }
14997
- }));
15456
+ }), null);
14998
15457
  setProp(_el$10, "flexDirection", "row");
14999
15458
  setProp(_el$10, "flexGrow", 1);
15000
15459
  setProp(_el$10, "flexShrink", 1);
15001
15460
  setProp(_el$10, "flexBasis", 0);
15002
- setProp(_el$10, "justifyContent", "flex-end");
15003
- insert(_el$10, createComponent2(CreatePRButton, {
15461
+ setProp(_el$10, "gap", 1);
15462
+ setProp(_el$10, "justifyContent", "center");
15463
+ insert(_el$10, createComponent2(Show, {
15464
+ get when() {
15465
+ return props.activeTask() !== undefined;
15466
+ },
15467
+ get children() {
15468
+ var _el$11 = createElement("text");
15469
+ setProp(_el$11, "wrapMode", "none");
15470
+ insert(_el$11, () => props.activeTask()?.branch);
15471
+ effect((_p$) => {
15472
+ var _v$5 = theme.text, _v$6 = TextAttributes18.BOLD;
15473
+ _v$5 !== _p$.e && (_p$.e = setProp(_el$11, "fg", _v$5, _p$.e));
15474
+ _v$6 !== _p$.t && (_p$.t = setProp(_el$11, "attributes", _v$6, _p$.t));
15475
+ return _p$;
15476
+ }, {
15477
+ e: undefined,
15478
+ t: undefined
15479
+ });
15480
+ return _el$11;
15481
+ }
15482
+ }));
15483
+ setProp(_el$12, "flexDirection", "row");
15484
+ setProp(_el$12, "flexGrow", 1);
15485
+ setProp(_el$12, "flexShrink", 1);
15486
+ setProp(_el$12, "flexBasis", 0);
15487
+ setProp(_el$12, "justifyContent", "flex-end");
15488
+ insert(_el$12, createComponent2(CreatePRButton, {
15004
15489
  get orchestrator() {
15005
15490
  return props.orchestrator;
15006
15491
  },
@@ -15009,10 +15494,10 @@ function TopBar(props) {
15009
15494
  }
15010
15495
  }));
15011
15496
  effect((_p$) => {
15012
- var _v$5 = theme.primary, _v$6 = TextAttributes17.BOLD, _v$7 = theme.textMuted;
15013
- _v$5 !== _p$.e && (_p$.e = setProp(_el$3, "fg", _v$5, _p$.e));
15014
- _v$6 !== _p$.t && (_p$.t = setProp(_el$3, "attributes", _v$6, _p$.t));
15015
- _v$7 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$7, _p$.a));
15497
+ var _v$7 = theme.primary, _v$8 = TextAttributes18.BOLD, _v$9 = theme.textMuted;
15498
+ _v$7 !== _p$.e && (_p$.e = setProp(_el$3, "fg", _v$7, _p$.e));
15499
+ _v$8 !== _p$.t && (_p$.t = setProp(_el$3, "attributes", _v$8, _p$.t));
15500
+ _v$9 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$9, _p$.a));
15016
15501
  return _p$;
15017
15502
  }, {
15018
15503
  e: undefined,
@@ -15030,11 +15515,14 @@ var init_top_bar = __esm(() => {
15030
15515
  init_solid();
15031
15516
  init_solid();
15032
15517
  init_solid();
15518
+ init_solid();
15033
15519
  init_dev();
15034
15520
  init_package();
15521
+ init_remote_orchestrator();
15035
15522
  init_theme();
15036
15523
  init_dialog();
15037
15524
  init_create_pr_button();
15525
+ init_rc_bridge_dialog();
15038
15526
  init_update_dialog();
15039
15527
  });
15040
15528
 
@@ -16228,11 +16716,22 @@ var init_use_pane_sizes = __esm(() => {
16228
16716
 
16229
16717
  // src/tui/component/new-task-dialog/state.ts
16230
16718
  import * as fs5 from "fs";
16719
+ import * as os from "os";
16720
+ function pickerModeFor(value, repoOptions) {
16721
+ const trimmed = value.trim();
16722
+ if (repoOptions.includes(trimmed))
16723
+ return "saved";
16724
+ if (trimmed.startsWith("~"))
16725
+ return "browse";
16726
+ if (trimmed.includes("/"))
16727
+ return "browse";
16728
+ return "saved";
16729
+ }
16231
16730
  function stripNewlines(v) {
16232
16731
  return v.replace(/[\r\n]+/g, "");
16233
16732
  }
16234
16733
  function nextField(field) {
16235
- return field === "repoPicker" ? "repoCustom" : field === "repoCustom" ? "baseRef" : "repoPicker";
16734
+ return field === "repo" ? "baseRef" : "repo";
16236
16735
  }
16237
16736
  function computeRepoOptions(defaultRepo, savedRepos) {
16238
16737
  const seen = new Set;
@@ -16325,6 +16824,59 @@ function listLocalBranches(repo) {
16325
16824
  return [];
16326
16825
  }
16327
16826
  }
16827
+ function expandHome(p) {
16828
+ if (p === "~")
16829
+ return os.homedir();
16830
+ if (p.startsWith("~/"))
16831
+ return os.homedir() + p.slice(1);
16832
+ return p;
16833
+ }
16834
+ function splitPathForDirSuggest(value) {
16835
+ if (!value)
16836
+ return { base: "", filter: "" };
16837
+ const normalized = value === "~" ? "~/" : value;
16838
+ const expanded = expandHome(normalized);
16839
+ if (expanded.endsWith("/"))
16840
+ return { base: expanded, filter: "" };
16841
+ const lastSlash = expanded.lastIndexOf("/");
16842
+ if (lastSlash === -1)
16843
+ return { base: "", filter: expanded };
16844
+ return { base: expanded.slice(0, lastSlash + 1), filter: expanded.slice(lastSlash + 1) };
16845
+ }
16846
+ function listSubdirs(base) {
16847
+ if (!base)
16848
+ return [];
16849
+ try {
16850
+ const entries = fs5.readdirSync(base, { withFileTypes: true });
16851
+ const out = [];
16852
+ for (const e of entries) {
16853
+ if (e.isDirectory())
16854
+ out.push(e.name);
16855
+ }
16856
+ return out.sort((a, b) => a.localeCompare(b));
16857
+ } catch {
16858
+ return [];
16859
+ }
16860
+ }
16861
+ function filterSubdirs(all, filter) {
16862
+ const f = filter.toLowerCase();
16863
+ const showHidden = f.startsWith(".");
16864
+ const visible = showHidden ? all : all.filter((n) => !n.startsWith("."));
16865
+ if (!f)
16866
+ return visible;
16867
+ return visible.filter((n) => n.toLowerCase().startsWith(f));
16868
+ }
16869
+ function joinDrill(typedValue, baseExpanded, name) {
16870
+ const out = `${baseExpanded + name}/`;
16871
+ if (typedValue.startsWith("~")) {
16872
+ const home = os.homedir();
16873
+ if (out === `${home}/`)
16874
+ return "~/";
16875
+ if (out.startsWith(`${home}/`))
16876
+ return `~${out.slice(home.length)}`;
16877
+ }
16878
+ return out;
16879
+ }
16328
16880
  function resolveBaseRef(typed, filteredBranches, cursor) {
16329
16881
  const picked = filteredBranches[cursor];
16330
16882
  if (picked)
@@ -16336,49 +16888,49 @@ var DEFAULT_BASE_REF = "main", PICKER_MAX_VISIBLE = 8;
16336
16888
  var init_state2 = () => {};
16337
16889
 
16338
16890
  // src/tui/component/new-task-dialog/dialog.tsx
16339
- import { TextAttributes as TextAttributes18 } from "@opentui/core";
16891
+ import { TextAttributes as TextAttributes19 } from "@opentui/core";
16340
16892
  function NewTaskDialogView(props) {
16341
16893
  const dialog = useDialog();
16342
16894
  const {
16343
16895
  theme
16344
16896
  } = useTheme();
16345
- const [field, setField] = createSignal("repoPicker");
16897
+ const [field, setField] = createSignal("repo");
16346
16898
  const [repo, setRepo] = createSignal(props.defaultRepo);
16347
16899
  const [baseRef, setBaseRef] = createSignal(DEFAULT_BASE_REF);
16348
16900
  const repoOptions = createMemo(() => computeRepoOptions(props.defaultRepo, props.savedRepos));
16349
- const repoFiltered = createMemo(() => {
16350
- const all = repoOptions();
16351
- if (field() !== "repoCustom")
16352
- return all;
16353
- return filterRepos(all, repo());
16354
- });
16901
+ const mode = createMemo(() => pickerModeFor(repo(), repoOptions()));
16902
+ const subdirSplit = createMemo(() => splitPathForDirSuggest(repo()));
16903
+ const subdirAll = createMemo(() => listSubdirs(subdirSplit().base));
16904
+ const subdirFiltered = createMemo(() => filterSubdirs(subdirAll(), subdirSplit().filter));
16905
+ const savedFiltered = createMemo(() => filterRepos(repoOptions(), repo()));
16906
+ const activeList = createMemo(() => mode() === "browse" ? subdirFiltered() : savedFiltered());
16355
16907
  const [repoCursor, setRepoCursor] = createSignal(0);
16356
- const branches = createMemo(() => listLocalBranches(repo().trim()));
16908
+ const activeWindow = createMemo(() => windowAround(activeList(), repoCursor()));
16909
+ const branches = createMemo(() => listLocalBranches(expandHome(repo().trim())));
16357
16910
  const branchFiltered = createMemo(() => filterBranches(branches(), baseRef()));
16358
16911
  const [branchCursor, setBranchCursor] = createSignal(0);
16912
+ const branchWindow = createMemo(() => windowAround(branchFiltered(), branchCursor()));
16359
16913
  createEffect(() => {
16360
16914
  branchFiltered();
16361
16915
  setBranchCursor(0);
16362
16916
  });
16363
16917
  createEffect(() => {
16364
- repoFiltered();
16918
+ activeList();
16365
16919
  setRepoCursor(0);
16366
16920
  });
16367
- const repoWindow = createMemo(() => windowAround(repoFiltered(), repoCursor()));
16368
- const branchWindow = createMemo(() => windowAround(branchFiltered(), branchCursor()));
16369
16921
  const [submitError, setSubmitError] = createSignal(null);
16370
16922
  createEffect(() => {
16371
16923
  repo();
16372
16924
  setSubmitError(null);
16373
16925
  });
16374
16926
  function commit() {
16375
- const r = repo().trim();
16927
+ const r = expandHome(repo().trim());
16376
16928
  if (!r)
16377
16929
  return;
16378
16930
  const reason = validateRepoPath(r);
16379
16931
  if (reason) {
16380
16932
  setSubmitError(reason);
16381
- setField("repoCustom");
16933
+ setField("repo");
16382
16934
  return;
16383
16935
  }
16384
16936
  const b = baseRef().trim() || DEFAULT_BASE_REF;
@@ -16388,11 +16940,52 @@ function NewTaskDialogView(props) {
16388
16940
  });
16389
16941
  dialog.clear();
16390
16942
  }
16391
- function selectRepoAt(absoluteIndex) {
16392
- const list = repoFiltered();
16943
+ function onRepoSubmit() {
16944
+ if (!repo().trim() && mode() === "saved") {
16945
+ const picked2 = activeList()[0];
16946
+ if (picked2) {
16947
+ setRepo(picked2);
16948
+ commit();
16949
+ return;
16950
+ }
16951
+ }
16952
+ if (mode() === "browse") {
16953
+ const list = subdirFiltered();
16954
+ const picked2 = list[repoCursor()];
16955
+ const split = subdirSplit();
16956
+ if (picked2) {
16957
+ if (split.filter) {
16958
+ setRepo(joinDrill(repo(), split.base, picked2));
16959
+ return;
16960
+ }
16961
+ const resolved = expandHome(repo().trim());
16962
+ if (!resolved || validateRepoPath(resolved) !== null) {
16963
+ setRepo(joinDrill(repo(), split.base, picked2));
16964
+ return;
16965
+ }
16966
+ }
16967
+ commit();
16968
+ return;
16969
+ }
16970
+ const picked = activeList()[repoCursor()];
16971
+ if (picked) {
16972
+ setRepo(picked);
16973
+ commit();
16974
+ return;
16975
+ }
16976
+ commit();
16977
+ }
16978
+ function selectRepoAtMouse(absoluteIndex) {
16979
+ const list = activeList();
16393
16980
  const picked = list[absoluteIndex];
16394
16981
  if (!picked)
16395
16982
  return;
16983
+ if (mode() === "browse") {
16984
+ const split = subdirSplit();
16985
+ setRepo(joinDrill(repo(), split.base, picked));
16986
+ setRepoCursor(absoluteIndex);
16987
+ return;
16988
+ }
16396
16989
  setRepo(picked);
16397
16990
  setRepoCursor(absoluteIndex);
16398
16991
  setField("baseRef");
@@ -16404,15 +16997,13 @@ function NewTaskDialogView(props) {
16404
16997
  }, {
16405
16998
  key: "up",
16406
16999
  cmd: () => {
16407
- if (field() === "repoPicker") {
16408
- const list2 = repoFiltered();
17000
+ if (field() === "repo") {
17001
+ const list2 = activeList();
16409
17002
  if (list2.length === 0)
16410
17003
  return;
16411
17004
  setRepoCursor(clampCursor(repoCursor() - 1, list2.length));
16412
17005
  return;
16413
17006
  }
16414
- if (field() === "repoCustom")
16415
- return;
16416
17007
  if (field() !== "baseRef")
16417
17008
  return;
16418
17009
  const list = branchFiltered();
@@ -16423,15 +17014,13 @@ function NewTaskDialogView(props) {
16423
17014
  }, {
16424
17015
  key: "down",
16425
17016
  cmd: () => {
16426
- if (field() === "repoPicker") {
16427
- const list2 = repoFiltered();
17017
+ if (field() === "repo") {
17018
+ const list2 = activeList();
16428
17019
  if (list2.length === 0)
16429
17020
  return;
16430
17021
  setRepoCursor(clampCursor(repoCursor() + 1, list2.length));
16431
17022
  return;
16432
17023
  }
16433
- if (field() === "repoCustom")
16434
- return;
16435
17024
  if (field() !== "baseRef")
16436
17025
  return;
16437
17026
  const list = branchFiltered();
@@ -16439,20 +17028,14 @@ function NewTaskDialogView(props) {
16439
17028
  return;
16440
17029
  setBranchCursor(clampCursor(branchCursor() + 1, list.length));
16441
17030
  }
16442
- }, {
16443
- key: "return",
16444
- cmd: () => {
16445
- if (field() === "repoPicker")
16446
- selectRepoAt(repoCursor());
16447
- }
16448
17031
  }]
16449
17032
  }));
16450
17033
  return (() => {
16451
- var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("text"), _el$14 = createElement("box"), _el$15 = createElement("text"), _el$17 = createElement("input"), _el$20 = createElement("box"), _el$21 = createElement("text"), _el$23 = createElement("input"), _el$33 = createElement("box"), _el$34 = createElement("text");
17034
+ var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("text"), _el$7 = createElement("box"), _el$8 = createElement("text"), _el$0 = createElement("input"), _el$18 = createElement("box"), _el$19 = createElement("text"), _el$21 = createElement("input"), _el$31 = createElement("box"), _el$32 = createElement("text");
16452
17035
  insertNode(_el$, _el$2);
16453
- insertNode(_el$, _el$14);
16454
- insertNode(_el$, _el$20);
16455
- insertNode(_el$, _el$33);
17036
+ insertNode(_el$, _el$7);
17037
+ insertNode(_el$, _el$18);
17038
+ insertNode(_el$, _el$31);
16456
17039
  setProp(_el$, "paddingLeft", 2);
16457
17040
  setProp(_el$, "paddingRight", 2);
16458
17041
  setProp(_el$, "gap", 1);
@@ -16463,105 +17046,106 @@ function NewTaskDialogView(props) {
16463
17046
  insertNode(_el$3, createTextNode(`New task`));
16464
17047
  insertNode(_el$5, createTextNode(`esc`));
16465
17048
  setProp(_el$5, "onMouseUp", () => props.onCancel());
17049
+ insertNode(_el$7, _el$8);
17050
+ insertNode(_el$7, _el$0);
17051
+ setProp(_el$7, "gap", 0);
17052
+ insertNode(_el$8, createTextNode(`repo`));
17053
+ setProp(_el$0, "onInput", (v) => setRepo(stripNewlines(v)));
17054
+ setProp(_el$0, "onSubmit", () => {
17055
+ if (!repo().trim())
17056
+ return;
17057
+ onRepoSubmit();
17058
+ });
16466
17059
  insert(_el$, createComponent2(Show, {
16467
17060
  get when() {
16468
- return repoOptions().length > 0;
17061
+ return memo2(() => field() === "repo")() && activeList().length > 0;
16469
17062
  },
16470
17063
  get children() {
16471
- var _el$7 = createElement("box"), _el$8 = createElement("text");
16472
- insertNode(_el$7, _el$8);
16473
- setProp(_el$7, "gap", 0);
16474
- insertNode(_el$8, createTextNode(`pick a repo`));
16475
- insert(_el$7, createComponent2(Show, {
17064
+ var _el$1 = createElement("box");
17065
+ setProp(_el$1, "gap", 0);
17066
+ setProp(_el$1, "paddingLeft", 2);
17067
+ insert(_el$1, createComponent2(Show, {
16476
17068
  get when() {
16477
- return repoWindow().start > 0;
17069
+ return activeWindow().start > 0;
16478
17070
  },
16479
17071
  get children() {
16480
- var _el$0 = createElement("text"), _el$1 = createTextNode(`\u2191 `), _el$10 = createTextNode(` more`);
16481
- insertNode(_el$0, _el$1);
16482
- insertNode(_el$0, _el$10);
16483
- setProp(_el$0, "wrapMode", "none");
16484
- insert(_el$0, () => repoWindow().start, _el$10);
16485
- effect((_$p) => setProp(_el$0, "fg", theme.textMuted, _$p));
16486
- return _el$0;
17072
+ var _el$10 = createElement("text"), _el$11 = createTextNode(`\u2191 `), _el$12 = createTextNode(` more`);
17073
+ insertNode(_el$10, _el$11);
17074
+ insertNode(_el$10, _el$12);
17075
+ setProp(_el$10, "wrapMode", "none");
17076
+ insert(_el$10, () => activeWindow().start, _el$12);
17077
+ effect((_$p) => setProp(_el$10, "fg", theme.textMuted, _$p));
17078
+ return _el$10;
16487
17079
  }
16488
17080
  }), null);
16489
- insert(_el$7, createComponent2(For, {
17081
+ insert(_el$1, createComponent2(For, {
16490
17082
  get each() {
16491
- return repoWindow().items;
17083
+ return activeWindow().items;
16492
17084
  },
16493
- children: (path8, i) => {
16494
- const absoluteIndex = () => repoWindow().start + i();
16495
- const isCursor = () => field() === "repoPicker" && absoluteIndex() === repoCursor();
16496
- const isSelected = () => repo().trim() === path8;
16497
- const isCurrentDir = () => path8 === props.defaultRepo;
17085
+ children: (name, i) => {
17086
+ const absoluteIndex = () => activeWindow().start + i();
17087
+ const isCursor = () => absoluteIndex() === repoCursor();
17088
+ const isCurrentDir = () => mode() === "saved" && name === props.defaultRepo;
17089
+ const isSelected = () => mode() === "saved" && repo().trim() === name;
17090
+ const suffix = () => mode() === "browse" ? "/" : "";
17091
+ const tag = () => isCurrentDir() ? " (current dir)" : "";
16498
17092
  return (() => {
16499
- var _el$36 = createElement("text");
16500
- setProp(_el$36, "wrapMode", "none");
16501
- setProp(_el$36, "onMouseUp", () => selectRepoAt(absoluteIndex()));
16502
- insert(_el$36, () => isCursor() ? "\u25B8 " : " ", null);
16503
- insert(_el$36, path8, null);
16504
- insert(_el$36, () => isCurrentDir() ? " (current dir)" : "", null);
17093
+ var _el$34 = createElement("text");
17094
+ setProp(_el$34, "wrapMode", "none");
17095
+ setProp(_el$34, "onMouseUp", () => selectRepoAtMouse(absoluteIndex()));
17096
+ insert(_el$34, () => isCursor() ? "\u25B8 " : " ", null);
17097
+ insert(_el$34, name, null);
17098
+ insert(_el$34, suffix, null);
17099
+ insert(_el$34, tag, null);
16505
17100
  effect((_p$) => {
16506
- var _v$10 = isCursor() ? theme.primary : isSelected() ? theme.accent : theme.textMuted, _v$11 = isCursor() ? TextAttributes18.BOLD : undefined;
16507
- _v$10 !== _p$.e && (_p$.e = setProp(_el$36, "fg", _v$10, _p$.e));
16508
- _v$11 !== _p$.t && (_p$.t = setProp(_el$36, "attributes", _v$11, _p$.t));
17101
+ var _v$10 = isCursor() ? theme.primary : isSelected() ? theme.accent : theme.textMuted, _v$11 = isCursor() ? TextAttributes19.BOLD : undefined;
17102
+ _v$10 !== _p$.e && (_p$.e = setProp(_el$34, "fg", _v$10, _p$.e));
17103
+ _v$11 !== _p$.t && (_p$.t = setProp(_el$34, "attributes", _v$11, _p$.t));
16509
17104
  return _p$;
16510
17105
  }, {
16511
17106
  e: undefined,
16512
17107
  t: undefined
16513
17108
  });
16514
- return _el$36;
17109
+ return _el$34;
16515
17110
  })();
16516
17111
  }
16517
17112
  }), null);
16518
- insert(_el$7, createComponent2(Show, {
17113
+ insert(_el$1, createComponent2(Show, {
16519
17114
  get when() {
16520
- return repoWindow().start + repoWindow().items.length < repoWindow().total;
17115
+ return activeWindow().start + activeWindow().items.length < activeWindow().total;
16521
17116
  },
16522
17117
  get children() {
16523
- var _el$11 = createElement("text"), _el$12 = createTextNode(`\u2193 `), _el$13 = createTextNode(` more`);
16524
- insertNode(_el$11, _el$12);
16525
- insertNode(_el$11, _el$13);
16526
- setProp(_el$11, "wrapMode", "none");
16527
- insert(_el$11, () => repoWindow().total - repoWindow().start - repoWindow().items.length, _el$13);
16528
- effect((_$p) => setProp(_el$11, "fg", theme.textMuted, _$p));
16529
- return _el$11;
17118
+ var _el$13 = createElement("text"), _el$14 = createTextNode(`\u2193 `), _el$15 = createTextNode(` more`);
17119
+ insertNode(_el$13, _el$14);
17120
+ insertNode(_el$13, _el$15);
17121
+ setProp(_el$13, "wrapMode", "none");
17122
+ insert(_el$13, () => activeWindow().total - activeWindow().start - activeWindow().items.length, _el$15);
17123
+ effect((_$p) => setProp(_el$13, "fg", theme.textMuted, _$p));
17124
+ return _el$13;
16530
17125
  }
16531
17126
  }), null);
16532
- effect((_$p) => setProp(_el$8, "fg", field() === "repoPicker" ? theme.accent : theme.textMuted, _$p));
16533
- return _el$7;
17127
+ return _el$1;
16534
17128
  }
16535
- }), _el$14);
16536
- insertNode(_el$14, _el$15);
16537
- insertNode(_el$14, _el$17);
16538
- setProp(_el$14, "gap", 0);
16539
- insertNode(_el$15, createTextNode(`or type a custom path`));
16540
- setProp(_el$17, "onInput", (v) => setRepo(stripNewlines(v)));
16541
- setProp(_el$17, "onSubmit", () => {
16542
- if (!repo().trim())
16543
- return;
16544
- commit();
16545
- });
17129
+ }), _el$18);
16546
17130
  insert(_el$, createComponent2(Show, {
16547
17131
  get when() {
16548
17132
  return submitError();
16549
17133
  },
16550
17134
  get children() {
16551
- var _el$18 = createElement("text"), _el$19 = createTextNode(`\u203B `);
16552
- insertNode(_el$18, _el$19);
16553
- insert(_el$18, submitError, null);
16554
- effect((_$p) => setProp(_el$18, "fg", theme.error, _$p));
16555
- return _el$18;
16556
- }
16557
- }), _el$20);
16558
- insertNode(_el$20, _el$21);
16559
- insertNode(_el$20, _el$23);
16560
- setProp(_el$20, "gap", 0);
16561
- insertNode(_el$21, createTextNode(`from branch`));
16562
- setProp(_el$23, "placeholder", DEFAULT_BASE_REF);
16563
- setProp(_el$23, "onInput", (v) => setBaseRef(stripNewlines(v)));
16564
- setProp(_el$23, "onSubmit", () => {
17135
+ var _el$16 = createElement("text"), _el$17 = createTextNode(`\u203B `);
17136
+ insertNode(_el$16, _el$17);
17137
+ insert(_el$16, submitError, null);
17138
+ effect((_$p) => setProp(_el$16, "fg", theme.error, _$p));
17139
+ return _el$16;
17140
+ }
17141
+ }), _el$18);
17142
+ insertNode(_el$18, _el$19);
17143
+ insertNode(_el$18, _el$21);
17144
+ setProp(_el$18, "gap", 0);
17145
+ insertNode(_el$19, createTextNode(`from branch`));
17146
+ setProp(_el$21, "placeholder", DEFAULT_BASE_REF);
17147
+ setProp(_el$21, "onInput", (v) => setBaseRef(stripNewlines(v)));
17148
+ setProp(_el$21, "onSubmit", () => {
16565
17149
  setBaseRef(resolveBaseRef(baseRef(), branchFiltered(), branchCursor()));
16566
17150
  commit();
16567
17151
  });
@@ -16570,41 +17154,41 @@ function NewTaskDialogView(props) {
16570
17154
  return memo2(() => !!(field() === "baseRef" && branchFiltered().length === 0))() && submitError() == null;
16571
17155
  },
16572
17156
  get children() {
16573
- var _el$24 = createElement("box"), _el$25 = createElement("text");
16574
- insertNode(_el$24, _el$25);
16575
- setProp(_el$24, "gap", 0);
16576
- setProp(_el$24, "paddingLeft", 2);
16577
- setProp(_el$24, "paddingBottom", 1);
16578
- setProp(_el$25, "wrapMode", "none");
16579
- insert(_el$25, () => branches().length === 0 ? "(no local branches found \u2014 typed text will be used as ref)" : "(no match \u2014 typed text will be used as ref)");
16580
- effect((_$p) => setProp(_el$25, "fg", theme.textMuted, _$p));
16581
- return _el$24;
17157
+ var _el$22 = createElement("box"), _el$23 = createElement("text");
17158
+ insertNode(_el$22, _el$23);
17159
+ setProp(_el$22, "gap", 0);
17160
+ setProp(_el$22, "paddingLeft", 2);
17161
+ setProp(_el$22, "paddingBottom", 1);
17162
+ setProp(_el$23, "wrapMode", "none");
17163
+ insert(_el$23, () => branches().length === 0 ? "(no local branches found \u2014 typed text will be used as ref)" : "(no match \u2014 typed text will be used as ref)");
17164
+ effect((_$p) => setProp(_el$23, "fg", theme.textMuted, _$p));
17165
+ return _el$22;
16582
17166
  }
16583
- }), _el$33);
17167
+ }), _el$31);
16584
17168
  insert(_el$, createComponent2(Show, {
16585
17169
  get when() {
16586
17170
  return memo2(() => field() === "baseRef")() && branchFiltered().length > 0;
16587
17171
  },
16588
17172
  get children() {
16589
- var _el$26 = createElement("box");
16590
- setProp(_el$26, "gap", 0);
16591
- setProp(_el$26, "paddingLeft", 2);
16592
- setProp(_el$26, "paddingBottom", 1);
16593
- insert(_el$26, createComponent2(Show, {
17173
+ var _el$24 = createElement("box");
17174
+ setProp(_el$24, "gap", 0);
17175
+ setProp(_el$24, "paddingLeft", 2);
17176
+ setProp(_el$24, "paddingBottom", 1);
17177
+ insert(_el$24, createComponent2(Show, {
16594
17178
  get when() {
16595
17179
  return branchWindow().start > 0;
16596
17180
  },
16597
17181
  get children() {
16598
- var _el$27 = createElement("text"), _el$28 = createTextNode(`\u2191 `), _el$29 = createTextNode(` more`);
16599
- insertNode(_el$27, _el$28);
16600
- insertNode(_el$27, _el$29);
16601
- setProp(_el$27, "wrapMode", "none");
16602
- insert(_el$27, () => branchWindow().start, _el$29);
16603
- effect((_$p) => setProp(_el$27, "fg", theme.textMuted, _$p));
16604
- return _el$27;
17182
+ var _el$25 = createElement("text"), _el$26 = createTextNode(`\u2191 `), _el$27 = createTextNode(` more`);
17183
+ insertNode(_el$25, _el$26);
17184
+ insertNode(_el$25, _el$27);
17185
+ setProp(_el$25, "wrapMode", "none");
17186
+ insert(_el$25, () => branchWindow().start, _el$27);
17187
+ effect((_$p) => setProp(_el$25, "fg", theme.textMuted, _$p));
17188
+ return _el$25;
16605
17189
  }
16606
17190
  }), null);
16607
- insert(_el$26, createComponent2(For, {
17191
+ insert(_el$24, createComponent2(For, {
16608
17192
  get each() {
16609
17193
  return branchWindow().items;
16610
17194
  },
@@ -16613,61 +17197,61 @@ function NewTaskDialogView(props) {
16613
17197
  const isCursor = () => absoluteIndex() === branchCursor();
16614
17198
  const isSelected = () => baseRef().trim() === name;
16615
17199
  return (() => {
16616
- var _el$37 = createElement("text");
16617
- setProp(_el$37, "wrapMode", "none");
16618
- setProp(_el$37, "onMouseUp", () => {
17200
+ var _el$35 = createElement("text");
17201
+ setProp(_el$35, "wrapMode", "none");
17202
+ setProp(_el$35, "onMouseUp", () => {
16619
17203
  setBaseRef(name);
16620
17204
  setBranchCursor(absoluteIndex());
16621
17205
  commit();
16622
17206
  });
16623
- insert(_el$37, () => isCursor() ? "\u25B8 " : " ", null);
16624
- insert(_el$37, name, null);
17207
+ insert(_el$35, () => isCursor() ? "\u25B8 " : " ", null);
17208
+ insert(_el$35, name, null);
16625
17209
  effect((_p$) => {
16626
- var _v$12 = isCursor() ? theme.primary : isSelected() ? theme.accent : theme.textMuted, _v$13 = isCursor() ? TextAttributes18.BOLD : undefined;
16627
- _v$12 !== _p$.e && (_p$.e = setProp(_el$37, "fg", _v$12, _p$.e));
16628
- _v$13 !== _p$.t && (_p$.t = setProp(_el$37, "attributes", _v$13, _p$.t));
17210
+ var _v$12 = isCursor() ? theme.primary : isSelected() ? theme.accent : theme.textMuted, _v$13 = isCursor() ? TextAttributes19.BOLD : undefined;
17211
+ _v$12 !== _p$.e && (_p$.e = setProp(_el$35, "fg", _v$12, _p$.e));
17212
+ _v$13 !== _p$.t && (_p$.t = setProp(_el$35, "attributes", _v$13, _p$.t));
16629
17213
  return _p$;
16630
17214
  }, {
16631
17215
  e: undefined,
16632
17216
  t: undefined
16633
17217
  });
16634
- return _el$37;
17218
+ return _el$35;
16635
17219
  })();
16636
17220
  }
16637
17221
  }), null);
16638
- insert(_el$26, createComponent2(Show, {
17222
+ insert(_el$24, createComponent2(Show, {
16639
17223
  get when() {
16640
17224
  return branchWindow().start + branchWindow().items.length < branchWindow().total;
16641
17225
  },
16642
17226
  get children() {
16643
- var _el$30 = createElement("text"), _el$31 = createTextNode(`\u2193 `), _el$32 = createTextNode(` more`);
16644
- insertNode(_el$30, _el$31);
16645
- insertNode(_el$30, _el$32);
16646
- setProp(_el$30, "wrapMode", "none");
16647
- insert(_el$30, () => branchWindow().total - branchWindow().start - branchWindow().items.length, _el$32);
16648
- effect((_$p) => setProp(_el$30, "fg", theme.textMuted, _$p));
16649
- return _el$30;
17227
+ var _el$28 = createElement("text"), _el$29 = createTextNode(`\u2193 `), _el$30 = createTextNode(` more`);
17228
+ insertNode(_el$28, _el$29);
17229
+ insertNode(_el$28, _el$30);
17230
+ setProp(_el$28, "wrapMode", "none");
17231
+ insert(_el$28, () => branchWindow().total - branchWindow().start - branchWindow().items.length, _el$30);
17232
+ effect((_$p) => setProp(_el$28, "fg", theme.textMuted, _$p));
17233
+ return _el$28;
16650
17234
  }
16651
17235
  }), null);
16652
- return _el$26;
17236
+ return _el$24;
16653
17237
  }
16654
- }), _el$33);
16655
- insertNode(_el$33, _el$34);
16656
- setProp(_el$33, "paddingBottom", 1);
16657
- insertNode(_el$34, createTextNode(`\u2191\u2193 pick \xB7 enter select \xB7 tab next field \xB7 esc cancel`));
17238
+ }), _el$31);
17239
+ insertNode(_el$31, _el$32);
17240
+ setProp(_el$31, "paddingBottom", 1);
17241
+ insertNode(_el$32, createTextNode(`\u2191\u2193 pick \xB7 enter select \xB7 tab next field \xB7 esc cancel`));
16658
17242
  effect((_p$) => {
16659
- var _v$ = TextAttributes18.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = field() === "repoCustom" ? theme.accent : theme.textMuted, _v$5 = repo(), _v$6 = props.defaultRepo, _v$7 = field() === "repoCustom", _v$8 = field() === "baseRef" ? theme.accent : theme.textMuted, _v$9 = baseRef(), _v$0 = field() === "baseRef", _v$1 = theme.textMuted;
17243
+ var _v$ = TextAttributes19.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = field() === "repo" ? theme.accent : theme.textMuted, _v$5 = repo(), _v$6 = props.defaultRepo, _v$7 = field() === "repo", _v$8 = field() === "baseRef" ? theme.accent : theme.textMuted, _v$9 = baseRef(), _v$0 = field() === "baseRef", _v$1 = theme.textMuted;
16660
17244
  _v$ !== _p$.e && (_p$.e = setProp(_el$3, "attributes", _v$, _p$.e));
16661
17245
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$2, _p$.t));
16662
17246
  _v$3 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$3, _p$.a));
16663
- _v$4 !== _p$.o && (_p$.o = setProp(_el$15, "fg", _v$4, _p$.o));
16664
- _v$5 !== _p$.i && (_p$.i = setProp(_el$17, "value", _v$5, _p$.i));
16665
- _v$6 !== _p$.n && (_p$.n = setProp(_el$17, "placeholder", _v$6, _p$.n));
16666
- _v$7 !== _p$.s && (_p$.s = setProp(_el$17, "focused", _v$7, _p$.s));
16667
- _v$8 !== _p$.h && (_p$.h = setProp(_el$21, "fg", _v$8, _p$.h));
16668
- _v$9 !== _p$.r && (_p$.r = setProp(_el$23, "value", _v$9, _p$.r));
16669
- _v$0 !== _p$.d && (_p$.d = setProp(_el$23, "focused", _v$0, _p$.d));
16670
- _v$1 !== _p$.l && (_p$.l = setProp(_el$34, "fg", _v$1, _p$.l));
17247
+ _v$4 !== _p$.o && (_p$.o = setProp(_el$8, "fg", _v$4, _p$.o));
17248
+ _v$5 !== _p$.i && (_p$.i = setProp(_el$0, "value", _v$5, _p$.i));
17249
+ _v$6 !== _p$.n && (_p$.n = setProp(_el$0, "placeholder", _v$6, _p$.n));
17250
+ _v$7 !== _p$.s && (_p$.s = setProp(_el$0, "focused", _v$7, _p$.s));
17251
+ _v$8 !== _p$.h && (_p$.h = setProp(_el$19, "fg", _v$8, _p$.h));
17252
+ _v$9 !== _p$.r && (_p$.r = setProp(_el$21, "value", _v$9, _p$.r));
17253
+ _v$0 !== _p$.d && (_p$.d = setProp(_el$21, "focused", _v$0, _p$.d));
17254
+ _v$1 !== _p$.l && (_p$.l = setProp(_el$32, "fg", _v$1, _p$.l));
16671
17255
  return _p$;
16672
17256
  }, {
16673
17257
  e: undefined,
@@ -16724,7 +17308,7 @@ var init_new_task_dialog = __esm(() => {
16724
17308
  });
16725
17309
 
16726
17310
  // src/tui/component/rename-task-dialog/dialog.tsx
16727
- import { TextAttributes as TextAttributes19 } from "@opentui/core";
17311
+ import { TextAttributes as TextAttributes20 } from "@opentui/core";
16728
17312
  function RenameTaskDialogView(props) {
16729
17313
  const dialog = useDialog();
16730
17314
  const {
@@ -16764,7 +17348,7 @@ function RenameTaskDialogView(props) {
16764
17348
  setProp(_el$0, "paddingBottom", 1);
16765
17349
  insertNode(_el$1, createTextNode(`enter rename \xB7 esc cancel`));
16766
17350
  effect((_p$) => {
16767
- var _v$ = TextAttributes19.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.accent, _v$5 = title(), _v$6 = props.currentTitle, _v$7 = theme.textMuted;
17351
+ var _v$ = TextAttributes20.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.accent, _v$5 = title(), _v$6 = props.currentTitle, _v$7 = theme.textMuted;
16768
17352
  _v$ !== _p$.e && (_p$.e = setProp(_el$3, "attributes", _v$, _p$.e));
16769
17353
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$2, _p$.t));
16770
17354
  _v$3 !== _p$.a && (_p$.a = setProp(_el$4, "fg", _v$3, _p$.a));
@@ -17087,7 +17671,7 @@ var init_use_workspace_tabs = __esm(() => {
17087
17671
  });
17088
17672
 
17089
17673
  // src/tui/component/resume-dialog.tsx
17090
- import { TextAttributes as TextAttributes20 } from "@opentui/core";
17674
+ import { TextAttributes as TextAttributes21 } from "@opentui/core";
17091
17675
  function ResumeDialog(props) {
17092
17676
  const dialog = useDialog();
17093
17677
  const {
@@ -17234,7 +17818,7 @@ function ResumeDialog(props) {
17234
17818
  setProp(_el$9, "paddingBottom", 1);
17235
17819
  insertNode(_el$0, createTextNode(`j/k or \u2191\u2193 navigate \u2022 enter resume \u2022 esc dismiss`));
17236
17820
  effect((_p$) => {
17237
- var _v$ = TextAttributes20.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.textMuted;
17821
+ var _v$ = TextAttributes21.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.textMuted;
17238
17822
  _v$ !== _p$.e && (_p$.e = setProp(_el$3, "attributes", _v$, _p$.e));
17239
17823
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$2, _p$.t));
17240
17824
  _v$3 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$3, _p$.a));
@@ -17559,7 +18143,7 @@ var init_mention = __esm(() => {
17559
18143
  });
17560
18144
 
17561
18145
  // src/tui/panes/chat/Composer.tsx
17562
- import { TextAttributes as TextAttributes21 } from "@opentui/core";
18146
+ import { TextAttributes as TextAttributes22 } from "@opentui/core";
17563
18147
  function resolvePlaceholder(opts) {
17564
18148
  if (!opts.hasTask)
17565
18149
  return opts.noTaskMessage ?? "(no task \u2014 press n to create)";
@@ -18127,7 +18711,7 @@ function Composer(props) {
18127
18711
  }
18128
18712
  }), null);
18129
18713
  effect((_p$) => {
18130
- var _v$20 = active() ? theme.primary : theme.text, _v$21 = active() ? TextAttributes21.BOLD : undefined;
18714
+ var _v$20 = active() ? theme.primary : theme.text, _v$21 = active() ? TextAttributes22.BOLD : undefined;
18131
18715
  _v$20 !== _p$.e && (_p$.e = setProp(_el$28, "fg", _v$20, _p$.e));
18132
18716
  _v$21 !== _p$.t && (_p$.t = setProp(_el$28, "attributes", _v$21, _p$.t));
18133
18717
  return _p$;
@@ -18234,7 +18818,7 @@ function Composer(props) {
18234
18818
  }
18235
18819
  }), null);
18236
18820
  effect((_p$) => {
18237
- var _v$22 = active() ? theme.primary : theme.text, _v$23 = active() ? TextAttributes21.BOLD : undefined;
18821
+ var _v$22 = active() ? theme.primary : theme.text, _v$23 = active() ? TextAttributes22.BOLD : undefined;
18238
18822
  _v$22 !== _p$.e && (_p$.e = setProp(_el$31, "fg", _v$22, _p$.e));
18239
18823
  _v$23 !== _p$.t && (_p$.t = setProp(_el$31, "attributes", _v$23, _p$.t));
18240
18824
  return _p$;
@@ -19068,7 +19652,7 @@ function summarizeGlob(input, output, done) {
19068
19652
  }
19069
19653
 
19070
19654
  // src/tui/panes/chat/MessageList.tsx
19071
- import { TextAttributes as TextAttributes22 } from "@opentui/core";
19655
+ import { TextAttributes as TextAttributes23 } from "@opentui/core";
19072
19656
  function previewToolInput(input) {
19073
19657
  if (input == null)
19074
19658
  return "";
@@ -19164,7 +19748,7 @@ function UserRow(props) {
19164
19748
  })() : null;
19165
19749
  })(), null);
19166
19750
  effect((_p$) => {
19167
- var _v$ = theme.accent, _v$2 = TextAttributes22.BOLD, _v$3 = theme.primary, _v$4 = TextAttributes22.BOLD;
19751
+ var _v$ = theme.accent, _v$2 = TextAttributes23.BOLD, _v$3 = theme.primary, _v$4 = TextAttributes23.BOLD;
19168
19752
  _v$ !== _p$.e && (_p$.e = setProp(_el$2, "fg", _v$, _p$.e));
19169
19753
  _v$2 !== _p$.t && (_p$.t = setProp(_el$2, "attributes", _v$2, _p$.t));
19170
19754
  _v$3 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$3, _p$.a));
@@ -19244,7 +19828,7 @@ function UserRow(props) {
19244
19828
  setProp(_el$21, "flexGrow", 1);
19245
19829
  insert(_el$22, () => view.text);
19246
19830
  effect((_p$) => {
19247
- var _v$9 = theme.accent, _v$0 = TextAttributes22.BOLD, _v$1 = theme.text;
19831
+ var _v$9 = theme.accent, _v$0 = TextAttributes23.BOLD, _v$1 = theme.text;
19248
19832
  _v$9 !== _p$.e && (_p$.e = setProp(_el$19, "fg", _v$9, _p$.e));
19249
19833
  _v$0 !== _p$.t && (_p$.t = setProp(_el$19, "attributes", _v$0, _p$.t));
19250
19834
  _v$1 !== _p$.a && (_p$.a = setProp(_el$22, "fg", _v$1, _p$.a));
@@ -19280,7 +19864,7 @@ function AssistantRow(props) {
19280
19864
  }
19281
19865
  }));
19282
19866
  effect((_p$) => {
19283
- var _v$10 = theme.accent, _v$11 = TextAttributes22.BOLD;
19867
+ var _v$10 = theme.accent, _v$11 = TextAttributes23.BOLD;
19284
19868
  _v$10 !== _p$.e && (_p$.e = setProp(_el$25, "fg", _v$10, _p$.e));
19285
19869
  _v$11 !== _p$.t && (_p$.t = setProp(_el$25, "attributes", _v$11, _p$.t));
19286
19870
  return _p$;
@@ -19355,7 +19939,7 @@ function ToolRow(props) {
19355
19939
  }), null);
19356
19940
  effect((_p$) => {
19357
19941
  var _v$18 = theme.text, _v$19 = {
19358
- attributes: TextAttributes22.BOLD
19942
+ attributes: TextAttributes23.BOLD
19359
19943
  };
19360
19944
  _v$18 !== _p$.e && (_p$.e = setProp(_el$45, "fg", _v$18, _p$.e));
19361
19945
  _v$19 !== _p$.t && (_p$.t = setProp(_el$46, "style", _v$19, _p$.t));
@@ -19523,7 +20107,7 @@ function ToolRow(props) {
19523
20107
  }
19524
20108
  }), null);
19525
20109
  effect((_p$) => {
19526
- var _v$16 = prefixColor(), _v$17 = TextAttributes22.BOLD;
20110
+ var _v$16 = prefixColor(), _v$17 = TextAttributes23.BOLD;
19527
20111
  _v$16 !== _p$.e && (_p$.e = setProp(_el$29, "fg", _v$16, _p$.e));
19528
20112
  _v$17 !== _p$.t && (_p$.t = setProp(_el$29, "attributes", _v$17, _p$.t));
19529
20113
  return _p$;
@@ -19762,7 +20346,7 @@ function BashBanner(props) {
19762
20346
  }
19763
20347
  }), null);
19764
20348
  effect((_p$) => {
19765
- var _v$28 = theme.accent, _v$29 = TextAttributes22.BOLD, _v$30 = theme.text;
20349
+ var _v$28 = theme.accent, _v$29 = TextAttributes23.BOLD, _v$30 = theme.text;
19766
20350
  _v$28 !== _p$.e && (_p$.e = setProp(_el$73, "fg", _v$28, _p$.e));
19767
20351
  _v$29 !== _p$.t && (_p$.t = setProp(_el$73, "attributes", _v$29, _p$.t));
19768
20352
  _v$30 !== _p$.a && (_p$.a = setProp(_el$76, "fg", _v$30, _p$.a));
@@ -19850,7 +20434,7 @@ function ReadGrepGlobBanner(props) {
19850
20434
  }), null);
19851
20435
  effect((_p$) => {
19852
20436
  var _v$31 = theme.text, _v$32 = {
19853
- attributes: TextAttributes22.BOLD
20437
+ attributes: TextAttributes23.BOLD
19854
20438
  };
19855
20439
  _v$31 !== _p$.e && (_p$.e = setProp(_el$81, "fg", _v$31, _p$.e));
19856
20440
  _v$32 !== _p$.t && (_p$.t = setProp(_el$82, "style", _v$32, _p$.t));
@@ -19879,7 +20463,7 @@ function SystemRow(props) {
19879
20463
  setProp(_el$87, "flexGrow", 1);
19880
20464
  insert(_el$88, () => props.text);
19881
20465
  effect((_p$) => {
19882
- var _v$33 = theme.textMuted, _v$34 = TextAttributes22.DIM, _v$35 = isError() ? theme.error : theme.textMuted;
20466
+ var _v$33 = theme.textMuted, _v$34 = TextAttributes23.DIM, _v$35 = isError() ? theme.error : theme.textMuted;
19883
20467
  _v$33 !== _p$.e && (_p$.e = setProp(_el$85, "fg", _v$33, _p$.e));
19884
20468
  _v$34 !== _p$.t && (_p$.t = setProp(_el$85, "attributes", _v$34, _p$.t));
19885
20469
  _v$35 !== _p$.a && (_p$.a = setProp(_el$88, "fg", _v$35, _p$.a));
@@ -19969,7 +20553,7 @@ function ApprovalRow(props) {
19969
20553
  insertNode(_el$103, _el$105);
19970
20554
  insert(_el$103, () => r().status, _el$105);
19971
20555
  effect((_p$) => {
19972
- var _v$44 = r().status === "approved" ? theme.success : theme.error, _v$45 = TextAttributes22.BOLD;
20556
+ var _v$44 = r().status === "approved" ? theme.success : theme.error, _v$45 = TextAttributes23.BOLD;
19973
20557
  _v$44 !== _p$.e && (_p$.e = setProp(_el$103, "fg", _v$44, _p$.e));
19974
20558
  _v$45 !== _p$.t && (_p$.t = setProp(_el$103, "attributes", _v$45, _p$.t));
19975
20559
  return _p$;
@@ -19986,7 +20570,7 @@ function ApprovalRow(props) {
19986
20570
  insertNode(_el$99, createTextNode(`[ Approve ]`));
19987
20571
  setProp(_el$99, "onMouseUp", () => props.onApprove(true));
19988
20572
  effect((_p$) => {
19989
- var _v$36 = theme.success, _v$37 = TextAttributes22.BOLD;
20573
+ var _v$36 = theme.success, _v$37 = TextAttributes23.BOLD;
19990
20574
  _v$36 !== _p$.e && (_p$.e = setProp(_el$99, "fg", _v$36, _p$.e));
19991
20575
  _v$37 !== _p$.t && (_p$.t = setProp(_el$99, "attributes", _v$37, _p$.t));
19992
20576
  return _p$;
@@ -20000,7 +20584,7 @@ function ApprovalRow(props) {
20000
20584
  insertNode(_el$101, createTextNode(`[ Reject ]`));
20001
20585
  setProp(_el$101, "onMouseUp", () => props.onApprove(false));
20002
20586
  effect((_p$) => {
20003
- var _v$38 = theme.error, _v$39 = TextAttributes22.BOLD;
20587
+ var _v$38 = theme.error, _v$39 = TextAttributes23.BOLD;
20004
20588
  _v$38 !== _p$.e && (_p$.e = setProp(_el$101, "fg", _v$38, _p$.e));
20005
20589
  _v$39 !== _p$.t && (_p$.t = setProp(_el$101, "attributes", _v$39, _p$.t));
20006
20590
  return _p$;
@@ -20013,7 +20597,7 @@ function ApprovalRow(props) {
20013
20597
  }
20014
20598
  }));
20015
20599
  effect((_p$) => {
20016
- var _v$40 = headerColor(), _v$41 = TextAttributes22.BOLD, _v$42 = headerColor(), _v$43 = TextAttributes22.BOLD;
20600
+ var _v$40 = headerColor(), _v$41 = TextAttributes23.BOLD, _v$42 = headerColor(), _v$43 = TextAttributes23.BOLD;
20017
20601
  _v$40 !== _p$.e && (_p$.e = setProp(_el$91, "fg", _v$40, _p$.e));
20018
20602
  _v$41 !== _p$.t && (_p$.t = setProp(_el$91, "attributes", _v$41, _p$.t));
20019
20603
  _v$42 !== _p$.a && (_p$.a = setProp(_el$92, "fg", _v$42, _p$.a));
@@ -20235,7 +20819,7 @@ function QuestionRow(props) {
20235
20819
  insertNode(_el$116, _el$118);
20236
20820
  insert(_el$116, () => q.header, _el$118);
20237
20821
  effect((_p$) => {
20238
- var _v$52 = theme.accent, _v$53 = TextAttributes22.BOLD;
20822
+ var _v$52 = theme.accent, _v$53 = TextAttributes23.BOLD;
20239
20823
  _v$52 !== _p$.e && (_p$.e = setProp(_el$116, "fg", _v$52, _p$.e));
20240
20824
  _v$53 !== _p$.t && (_p$.t = setProp(_el$116, "attributes", _v$53, _p$.t));
20241
20825
  return _p$;
@@ -20349,7 +20933,7 @@ function QuestionRow(props) {
20349
20933
  }
20350
20934
  }), null);
20351
20935
  effect((_p$) => {
20352
- var _v$58 = isHl() ? theme.accent : theme.textMuted, _v$59 = TextAttributes22.BOLD, _v$60 = theme.textMuted, _v$61 = isPicked() ? theme.accent : theme.textMuted, _v$62 = TextAttributes22.BOLD, _v$63 = theme.text;
20936
+ var _v$58 = isHl() ? theme.accent : theme.textMuted, _v$59 = TextAttributes23.BOLD, _v$60 = theme.textMuted, _v$61 = isPicked() ? theme.accent : theme.textMuted, _v$62 = TextAttributes23.BOLD, _v$63 = theme.text;
20353
20937
  _v$58 !== _p$.e && (_p$.e = setProp(_el$136, "fg", _v$58, _p$.e));
20354
20938
  _v$59 !== _p$.t && (_p$.t = setProp(_el$136, "attributes", _v$59, _p$.t));
20355
20939
  _v$60 !== _p$.a && (_p$.a = setProp(_el$137, "fg", _v$60, _p$.a));
@@ -20394,7 +20978,7 @@ function QuestionRow(props) {
20394
20978
  insertNode(_el$147, createTextNode(`Other`));
20395
20979
  insertNode(_el$149, createTextNode(`Type your own answer`));
20396
20980
  effect((_p$) => {
20397
- var _v$64 = isOtherHl() ? theme.accent : theme.textMuted, _v$65 = TextAttributes22.BOLD, _v$66 = theme.textMuted, _v$67 = otherPicked() ? theme.accent : theme.textMuted, _v$68 = TextAttributes22.BOLD, _v$69 = theme.text, _v$70 = theme.textMuted;
20981
+ var _v$64 = isOtherHl() ? theme.accent : theme.textMuted, _v$65 = TextAttributes23.BOLD, _v$66 = theme.textMuted, _v$67 = otherPicked() ? theme.accent : theme.textMuted, _v$68 = TextAttributes23.BOLD, _v$69 = theme.text, _v$70 = theme.textMuted;
20398
20982
  _v$64 !== _p$.e && (_p$.e = setProp(_el$143, "fg", _v$64, _p$.e));
20399
20983
  _v$65 !== _p$.t && (_p$.t = setProp(_el$143, "attributes", _v$65, _p$.t));
20400
20984
  _v$66 !== _p$.a && (_p$.a = setProp(_el$144, "fg", _v$66, _p$.a));
@@ -20450,7 +21034,7 @@ function QuestionRow(props) {
20450
21034
  }
20451
21035
  }), null);
20452
21036
  effect((_p$) => {
20453
- var _v$54 = isQuestionComplete(index()) ? theme.success : theme.textMuted, _v$55 = TextAttributes22.BOLD;
21037
+ var _v$54 = isQuestionComplete(index()) ? theme.success : theme.textMuted, _v$55 = TextAttributes23.BOLD;
20454
21038
  _v$54 !== _p$.e && (_p$.e = setProp(_el$132, "fg", _v$54, _p$.e));
20455
21039
  _v$55 !== _p$.t && (_p$.t = setProp(_el$132, "attributes", _v$55, _p$.t));
20456
21040
  return _p$;
@@ -20486,7 +21070,7 @@ function QuestionRow(props) {
20486
21070
  setProp(_el$111, "paddingTop", 1);
20487
21071
  insertNode(_el$112, createTextNode(`[submitted]`));
20488
21072
  effect((_p$) => {
20489
- var _v$46 = theme.success, _v$47 = TextAttributes22.BOLD;
21073
+ var _v$46 = theme.success, _v$47 = TextAttributes23.BOLD;
20490
21074
  _v$46 !== _p$.e && (_p$.e = setProp(_el$112, "fg", _v$46, _p$.e));
20491
21075
  _v$47 !== _p$.t && (_p$.t = setProp(_el$112, "attributes", _v$47, _p$.t));
20492
21076
  return _p$;
@@ -20498,7 +21082,7 @@ function QuestionRow(props) {
20498
21082
  }
20499
21083
  }), null);
20500
21084
  effect((_p$) => {
20501
- var _v$48 = theme.warning, _v$49 = TextAttributes22.BOLD, _v$50 = theme.warning, _v$51 = TextAttributes22.BOLD;
21085
+ var _v$48 = theme.warning, _v$49 = TextAttributes23.BOLD, _v$50 = theme.warning, _v$51 = TextAttributes23.BOLD;
20502
21086
  _v$48 !== _p$.e && (_p$.e = setProp(_el$108, "fg", _v$48, _p$.e));
20503
21087
  _v$49 !== _p$.t && (_p$.t = setProp(_el$108, "attributes", _v$49, _p$.t));
20504
21088
  _v$50 !== _p$.a && (_p$.a = setProp(_el$110, "fg", _v$50, _p$.a));
@@ -20618,7 +21202,7 @@ function MessageList(props) {
20618
21202
  insertNode(_el$160, _el$161);
20619
21203
  insert(_el$160, () => props.error, null);
20620
21204
  effect((_p$) => {
20621
- var _v$71 = theme.error, _v$72 = TextAttributes22.BOLD, _v$73 = theme.error;
21205
+ var _v$71 = theme.error, _v$72 = TextAttributes23.BOLD, _v$73 = theme.error;
20622
21206
  _v$71 !== _p$.e && (_p$.e = setProp(_el$158, "fg", _v$71, _p$.e));
20623
21207
  _v$72 !== _p$.t && (_p$.t = setProp(_el$158, "attributes", _v$72, _p$.t));
20624
21208
  _v$73 !== _p$.a && (_p$.a = setProp(_el$160, "fg", _v$73, _p$.a));
@@ -20774,7 +21358,7 @@ function ToolFoldRow(props) {
20774
21358
  setProp(_el$164, "flexGrow", 1);
20775
21359
  insert(_el$165, () => props.summary);
20776
21360
  effect((_p$) => {
20777
- var _v$74 = fg(), _v$75 = TextAttributes22.DIM, _v$76 = theme.textMuted;
21361
+ var _v$74 = fg(), _v$75 = TextAttributes23.DIM, _v$76 = theme.textMuted;
20778
21362
  _v$74 !== _p$.e && (_p$.e = setProp(_el$163, "fg", _v$74, _p$.e));
20779
21363
  _v$75 !== _p$.t && (_p$.t = setProp(_el$163, "attributes", _v$75, _p$.t));
20780
21364
  _v$76 !== _p$.a && (_p$.a = setProp(_el$165, "fg", _v$76, _p$.a));
@@ -20839,7 +21423,7 @@ var init_models = __esm(() => {
20839
21423
  });
20840
21424
 
20841
21425
  // src/tui/panes/chat/composer/ModelPicker.tsx
20842
- import { TextAttributes as TextAttributes23 } from "@opentui/core";
21426
+ import { TextAttributes as TextAttributes24 } from "@opentui/core";
20843
21427
  function ModelPicker(props) {
20844
21428
  const dialog = useDialog();
20845
21429
  const {
@@ -20919,7 +21503,7 @@ function ModelPicker(props) {
20919
21503
  })() : null;
20920
21504
  })(), null);
20921
21505
  effect((_p$) => {
20922
- var _v$5 = active() ? theme.primary : undefined, _v$6 = active() ? theme.selectedListItemText : theme.text, _v$7 = active() ? TextAttributes23.BOLD : undefined;
21506
+ var _v$5 = active() ? theme.primary : undefined, _v$6 = active() ? theme.selectedListItemText : theme.text, _v$7 = active() ? TextAttributes24.BOLD : undefined;
20923
21507
  _v$5 !== _p$.e && (_p$.e = setProp(_el$1, "backgroundColor", _v$5, _p$.e));
20924
21508
  _v$6 !== _p$.t && (_p$.t = setProp(_el$10, "fg", _v$6, _p$.t));
20925
21509
  _v$7 !== _p$.a && (_p$.a = setProp(_el$10, "attributes", _v$7, _p$.a));
@@ -20937,7 +21521,7 @@ function ModelPicker(props) {
20937
21521
  setProp(_el$8, "paddingBottom", 1);
20938
21522
  insertNode(_el$9, createTextNode(`\u2191\u2193 pick \xB7 enter select \xB7 esc cancel`));
20939
21523
  effect((_p$) => {
20940
- var _v$ = TextAttributes23.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.textMuted;
21524
+ var _v$ = TextAttributes24.BOLD, _v$2 = theme.text, _v$3 = theme.textMuted, _v$4 = theme.textMuted;
20941
21525
  _v$ !== _p$.e && (_p$.e = setProp(_el$3, "attributes", _v$, _p$.e));
20942
21526
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$2, _p$.t));
20943
21527
  _v$3 !== _p$.a && (_p$.a = setProp(_el$5, "fg", _v$3, _p$.a));
@@ -20979,10 +21563,10 @@ var init_ModelPicker = __esm(() => {
20979
21563
 
20980
21564
  // src/tui/panes/chat/composer/user-slashes.ts
20981
21565
  import { readFile as readFile6, readdir as readdir3, stat as stat3 } from "fs/promises";
20982
- import { homedir as homedir10 } from "os";
21566
+ import { homedir as homedir11 } from "os";
20983
21567
  import { join as join14 } from "path";
20984
21568
  function resolveHome() {
20985
- return process.env.HOME ?? homedir10();
21569
+ return process.env.HOME ?? homedir11();
20986
21570
  }
20987
21571
  async function safeReaddir(path8) {
20988
21572
  try {
@@ -21512,8 +22096,6 @@ var init_store2 = __esm(() => {
21512
22096
  // src/tui/panes/chat/use-chat-session.ts
21513
22097
  function useChatSession(opts) {
21514
22098
  const { orchestrator, onTaskReset } = opts;
21515
- const [statesByTab, setStatesByTab] = createSignal(new Map);
21516
- const [draftsByTab, setDraftsByTab] = createSignal(new Map);
21517
22099
  const [activeTabId, setActiveTabIdLocal] = createSignal(null);
21518
22100
  let tabSubs = new Map;
21519
22101
  let currentSubsTaskId = null;
@@ -21593,9 +22175,7 @@ function useChatSession(opts) {
21593
22175
  tabSubs.set(tabId, unsub);
21594
22176
  const tabKey2 = chatRunStateKey(taskId, tabId);
21595
22177
  const runState = orchestrator.chatRunStateSignal()().get(tabKey2);
21596
- if (runState === "running") {
21597
- patchStateForTab(tabId, (s) => ({ ...s, isStreaming: true }));
21598
- }
22178
+ patchStateForTab(tabId, (s) => ({ ...s, isStreaming: runState === "running" }));
21599
22179
  const replayPending = () => {
21600
22180
  if (opts.taskId() !== taskId)
21601
22181
  return;
@@ -21648,8 +22228,6 @@ function useChatSession(opts) {
21648
22228
  if (!id) {
21649
22229
  if (currentSubsTaskId !== null) {
21650
22230
  teardownAllSubs();
21651
- setStatesByTab(new Map);
21652
- setDraftsByTab(new Map);
21653
22231
  onTaskReset?.();
21654
22232
  }
21655
22233
  setActiveTabIdLocal(null);
@@ -21662,8 +22240,6 @@ function useChatSession(opts) {
21662
22240
  }
21663
22241
  if (currentSubsTaskId !== id) {
21664
22242
  teardownAllSubs();
21665
- setStatesByTab(new Map);
21666
- setDraftsByTab(new Map);
21667
22243
  currentSubsTaskId = id;
21668
22244
  setActiveTabIdLocal(live.activeTabId);
21669
22245
  onTaskReset?.();
@@ -21677,8 +22253,6 @@ function useChatSession(opts) {
21677
22253
  });
21678
22254
  onCleanup(() => {
21679
22255
  teardownAllSubs();
21680
- setStatesByTab(new Map);
21681
- setDraftsByTab(new Map);
21682
22256
  });
21683
22257
  return {
21684
22258
  activeTabId,
@@ -21694,14 +22268,17 @@ function useChatSession(opts) {
21694
22268
  setDraft
21695
22269
  };
21696
22270
  }
22271
+ var draftsByTab, setDraftsByTab, statesByTab, setStatesByTab;
21697
22272
  var init_use_chat_session = __esm(() => {
21698
22273
  init_dev();
21699
22274
  init_core();
21700
22275
  init_store2();
22276
+ [draftsByTab, setDraftsByTab] = createSignal(new Map);
22277
+ [statesByTab, setStatesByTab] = createSignal(new Map);
21701
22278
  });
21702
22279
 
21703
22280
  // src/tui/panes/chat/Chat.tsx
21704
- import { TextAttributes as TextAttributes24 } from "@opentui/core";
22281
+ import { TextAttributes as TextAttributes25 } from "@opentui/core";
21705
22282
  function Chat(props) {
21706
22283
  const {
21707
22284
  theme
@@ -21757,7 +22334,7 @@ function Chat(props) {
21757
22334
  });
21758
22335
  const activeTabId = session.activeTabId;
21759
22336
  const setActiveTabIdLocal = session.setActiveTabIdLocal;
21760
- const statesByTab = session.statesByTab;
22337
+ const statesByTab2 = session.statesByTab;
21761
22338
  const tabs = session.tabs;
21762
22339
  const activeState = session.activeState;
21763
22340
  const draft = session.draft;
@@ -21772,7 +22349,7 @@ function Chat(props) {
21772
22349
  const tabId = activeTabId();
21773
22350
  if (!tid || !tabId)
21774
22351
  return null;
21775
- const st = statesByTab().get(tabId);
22352
+ const st = statesByTab2().get(tabId);
21776
22353
  const u = st?.lastUsage;
21777
22354
  if (!u)
21778
22355
  return null;
@@ -22369,7 +22946,7 @@ function QueuedPromptList(props) {
22369
22946
  insertNode(_el$19, createTextNode(`[x]`));
22370
22947
  setProp(_el$19, "onMouseUp", () => props.onCancel(entry.id));
22371
22948
  effect((_p$) => {
22372
- var _v$4 = theme.textMuted, _v$5 = TextAttributes24.BOLD, _v$6 = theme.textMuted, _v$7 = theme.text, _v$8 = theme.error, _v$9 = TextAttributes24.BOLD;
22949
+ var _v$4 = theme.textMuted, _v$5 = TextAttributes25.BOLD, _v$6 = theme.textMuted, _v$7 = theme.text, _v$8 = theme.error, _v$9 = TextAttributes25.BOLD;
22373
22950
  _v$4 !== _p$.e && (_p$.e = setProp(_el$11, "fg", _v$4, _p$.e));
22374
22951
  _v$5 !== _p$.t && (_p$.t = setProp(_el$11, "attributes", _v$5, _p$.t));
22375
22952
  _v$6 !== _p$.a && (_p$.a = setProp(_el$14, "fg", _v$6, _p$.a));
@@ -22402,7 +22979,7 @@ function QueuedPromptList(props) {
22402
22979
  insertNode(_el$9, createTextNode(`+`));
22403
22980
  insert(_el$1, () => `\u2026 ${hidden()} more queued`);
22404
22981
  effect((_p$) => {
22405
- var _v$ = theme.textMuted, _v$2 = TextAttributes24.BOLD, _v$3 = theme.textMuted;
22982
+ var _v$ = theme.textMuted, _v$2 = TextAttributes25.BOLD, _v$3 = theme.textMuted;
22406
22983
  _v$ !== _p$.e && (_p$.e = setProp(_el$9, "fg", _v$, _p$.e));
22407
22984
  _v$2 !== _p$.t && (_p$.t = setProp(_el$9, "attributes", _v$2, _p$.t));
22408
22985
  _v$3 !== _p$.a && (_p$.a = setProp(_el$1, "fg", _v$3, _p$.a));
@@ -22448,7 +23025,7 @@ var init_Chat = __esm(() => {
22448
23025
  });
22449
23026
 
22450
23027
  // src/tui/component/sidebar.tsx
22451
- import { TextAttributes as TextAttributes25 } from "@opentui/core";
23028
+ import { TextAttributes as TextAttributes26 } from "@opentui/core";
22452
23029
  function Sidebar(props) {
22453
23030
  const {
22454
23031
  theme
@@ -22474,7 +23051,7 @@ function Sidebar(props) {
22474
23051
  setProp(_el$2, "paddingBottom", 1);
22475
23052
  insert(_el$3, () => props.title);
22476
23053
  effect((_p$) => {
22477
- var _v$ = theme.text, _v$2 = TextAttributes25.BOLD;
23054
+ var _v$ = theme.text, _v$2 = TextAttributes26.BOLD;
22478
23055
  _v$ !== _p$.e && (_p$.e = setProp(_el$3, "fg", _v$, _p$.e));
22479
23056
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "attributes", _v$2, _p$.t));
22480
23057
  return _p$;
@@ -22733,7 +23310,7 @@ var init_keys4 = __esm(() => {
22733
23310
  });
22734
23311
 
22735
23312
  // src/tui/panes/sidebar/Sidebar.tsx
22736
- import { TextAttributes as TextAttributes26 } from "@opentui/core";
23313
+ import { TextAttributes as TextAttributes27 } from "@opentui/core";
22737
23314
  function Sidebar2(props) {
22738
23315
  const {
22739
23316
  theme
@@ -22825,7 +23402,7 @@ function Sidebar2(props) {
22825
23402
  return () => _c$() ? `[ ${tab.label} ]` : tab.label;
22826
23403
  })());
22827
23404
  effect((_p$) => {
22828
- var _v$7 = active() ? theme.primary : theme.textMuted, _v$8 = active() ? TextAttributes26.BOLD : undefined;
23405
+ var _v$7 = active() ? theme.primary : theme.textMuted, _v$8 = active() ? TextAttributes27.BOLD : undefined;
22829
23406
  _v$7 !== _p$.e && (_p$.e = setProp(_el$13, "fg", _v$7, _p$.e));
22830
23407
  _v$8 !== _p$.t && (_p$.t = setProp(_el$13, "attributes", _v$8, _p$.t));
22831
23408
  return _p$;
@@ -22920,7 +23497,7 @@ function Sidebar2(props) {
22920
23497
  }
22921
23498
  }), null);
22922
23499
  effect((_p$) => {
22923
- var _v$9 = isCursor() ? theme.primary : isSelected() ? theme.backgroundElement : undefined, _v$0 = isCursor() ? theme.selectedListItemText : badgeColor(), _v$1 = isCursor() ? theme.selectedListItemText : theme.text, _v$10 = (isMain || isSelected() && !isCursor()) && !isCursor() ? TextAttributes26.BOLD : undefined;
23500
+ var _v$9 = isCursor() ? theme.primary : isSelected() ? theme.backgroundElement : undefined, _v$0 = isCursor() ? theme.selectedListItemText : badgeColor(), _v$1 = isCursor() ? theme.selectedListItemText : theme.text, _v$10 = (isMain || isSelected() && !isCursor()) && !isCursor() ? TextAttributes27.BOLD : undefined;
22924
23501
  _v$9 !== _p$.e && (_p$.e = setProp(_el$14, "backgroundColor", _v$9, _p$.e));
22925
23502
  _v$0 !== _p$.t && (_p$.t = setProp(_el$15, "fg", _v$0, _p$.t));
22926
23503
  _v$1 !== _p$.a && (_p$.a = setProp(_el$16, "fg", _v$1, _p$.a));
@@ -22958,7 +23535,7 @@ function Sidebar2(props) {
22958
23535
  setProp(_el$11, "wrapMode", "none");
22959
23536
  setProp(_el$11, "onMouseUp", () => props.onAddTask?.());
22960
23537
  effect((_p$) => {
22961
- var _v$ = props.width ? props.width() : SIDEBAR_WIDTH, _v$2 = focusedAccessor() ? theme.focusAccent : theme.textMuted, _v$3 = TextAttributes26.BOLD, _v$4 = focusedAccessor() ? theme.focusAccent : theme.textMuted, _v$5 = TextAttributes26.BOLD, _v$6 = theme.textMuted;
23538
+ var _v$ = props.width ? props.width() : SIDEBAR_WIDTH, _v$2 = focusedAccessor() ? theme.focusAccent : theme.textMuted, _v$3 = TextAttributes27.BOLD, _v$4 = focusedAccessor() ? theme.focusAccent : theme.textMuted, _v$5 = TextAttributes27.BOLD, _v$6 = theme.textMuted;
22962
23539
  _v$ !== _p$.e && (_p$.e = setProp(_el$, "width", _v$, _p$.e));
22963
23540
  _v$2 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$2, _p$.t));
22964
23541
  _v$3 !== _p$.a && (_p$.a = setProp(_el$3, "attributes", _v$3, _p$.a));
@@ -23034,7 +23611,10 @@ import { dirname as dirname6 } from "path";
23034
23611
  async function startBridgeServer(orch, socketPath) {
23035
23612
  await mkdir3(dirname6(socketPath), { recursive: true });
23036
23613
  await unlink3(socketPath).catch(() => {});
23614
+ const conns = new Set;
23037
23615
  const server = createServer((conn) => {
23616
+ conns.add(conn);
23617
+ conn.on("close", () => conns.delete(conn));
23038
23618
  let buffer = "";
23039
23619
  conn.on("data", (chunk) => {
23040
23620
  buffer += chunk.toString("utf8");
@@ -23067,6 +23647,9 @@ async function startBridgeServer(orch, socketPath) {
23067
23647
  return {
23068
23648
  socketPath,
23069
23649
  async close() {
23650
+ for (const conn of conns)
23651
+ conn.destroy();
23652
+ conns.clear();
23070
23653
  await new Promise((resolve4) => server.close(() => resolve4()));
23071
23654
  await unlink3(socketPath).catch(() => {});
23072
23655
  }
@@ -23160,11 +23743,11 @@ __export(exports_bridge, {
23160
23743
  startBridge: () => startBridge
23161
23744
  });
23162
23745
  import { writeFile as writeFile3 } from "fs/promises";
23163
- import { homedir as homedir11 } from "os";
23746
+ import { homedir as homedir12 } from "os";
23164
23747
  import { join as join15 } from "path";
23165
23748
  import { fileURLToPath as fileURLToPath2 } from "url";
23166
23749
  async function startBridge(orch, opts = {}) {
23167
- const home = opts.homeDir ?? process.env.KOBE_HOME_DIR ?? homedir11();
23750
+ const home = opts.homeDir ?? process.env.KOBE_HOME_DIR ?? homedir12();
23168
23751
  const runDir = join15(home, ".kobe", "run");
23169
23752
  const socketPath = join15(runDir, `bridge-${process.pid}.sock`);
23170
23753
  const mcpConfigPath = join15(runDir, `mcp-${process.pid}.json`);
@@ -23194,7 +23777,7 @@ var init_bridge = __esm(() => {
23194
23777
  });
23195
23778
 
23196
23779
  // src/tui/app.tsx
23197
- import { homedir as homedir12 } from "os";
23780
+ import { homedir as homedir13 } from "os";
23198
23781
  import { join as join16 } from "path";
23199
23782
  function Shell(props) {
23200
23783
  const themeCtx = useTheme();
@@ -23213,6 +23796,7 @@ function Shell(props) {
23213
23796
  const [workspaceContextAside, setWorkspaceContextAside] = createSignal(null);
23214
23797
  const planUsageAcc = props.orchestrator.planUsageSignal();
23215
23798
  const workspacePlanAside = createMemo(() => formatPlanUsageCompact(planUsageAcc()));
23799
+ const rcBridgeAcc = props.orchestrator.rcBridgeSignal();
23216
23800
  const [updateInfo, setUpdateInfo] = createSignal(null);
23217
23801
  onMount(() => {
23218
23802
  checkLatestVersion().then((info) => {
@@ -23303,6 +23887,20 @@ function Shell(props) {
23303
23887
  return;
23304
23888
  return parts.join(" \u2022 ");
23305
23889
  });
23890
+ const palette = useCommandPalette();
23891
+ onMount(() => {
23892
+ if (!(props.orchestrator instanceof RemoteOrchestrator))
23893
+ return;
23894
+ const orch = props.orchestrator;
23895
+ const unregister = palette.addCommand({
23896
+ name: "rcBridge.share",
23897
+ title: "Share to claude.ai (remote-control)",
23898
+ desc: "Bind this task's worktree to a claude.ai environment so you can resume the conversation from another device.",
23899
+ slashName: "share",
23900
+ run: () => RcBridgeDialog.show(dialog, orch, rcBridgeAcc, activeTask, activeChatTabIdAcc)
23901
+ });
23902
+ onCleanup(unregister);
23903
+ });
23306
23904
  let pendingPersistedId = persistedSelectedId ?? null;
23307
23905
  createEffect(() => {
23308
23906
  const tasks = tasksAcc();
@@ -23325,7 +23923,6 @@ function Shell(props) {
23325
23923
  });
23326
23924
  useKobeKeybindings({
23327
23925
  onShowHelp: () => HelpDialog.show(dialog),
23328
- onFocusDetach: () => setFocusedPane("sidebar"),
23329
23926
  onFocusNext: () => {
23330
23927
  if (focusedPane() !== "workspace")
23331
23928
  focus.cycle(1);
@@ -23400,6 +23997,7 @@ function Shell(props) {
23400
23997
  return props.orchestrator;
23401
23998
  },
23402
23999
  activeTask,
24000
+ activeChatTabId: activeChatTabIdAcc,
23403
24001
  updateInfo
23404
24002
  }), _el$2);
23405
24003
  insertNode(_el$2, _el$3);
@@ -23465,20 +24063,27 @@ function Shell(props) {
23465
24063
  return focusedPane() === "workspace";
23466
24064
  }
23467
24065
  }), _el$5);
23468
- insert(_el$4, createComponent2(CenterTabStrip, {
23469
- isChatActive: isChatTabActive,
23470
- activeFile: activeFileTabPath,
23471
- chatTabs: activeChatTabsAcc,
23472
- activeChatTabId: activeChatTabIdAcc,
23473
- activeTaskId: taskIdAcc,
23474
- chatRunState: chatRunStateAcc,
23475
- get unread() {
23476
- return notifications.unread;
23477
- },
23478
- onSelectChat: selectChatTab,
23479
- onSelectChatTab: selectChatTabById,
23480
- onSelectFile: selectFileTab,
23481
- onCloseFile: closeFileTab
24066
+ insert(_el$4, createComponent2(Show, {
24067
+ get when() {
24068
+ return selectedId();
24069
+ },
24070
+ get children() {
24071
+ return createComponent2(CenterTabStrip, {
24072
+ isChatActive: isChatTabActive,
24073
+ activeFile: activeFileTabPath,
24074
+ chatTabs: activeChatTabsAcc,
24075
+ activeChatTabId: activeChatTabIdAcc,
24076
+ activeTaskId: taskIdAcc,
24077
+ chatRunState: chatRunStateAcc,
24078
+ get unread() {
24079
+ return notifications.unread;
24080
+ },
24081
+ onSelectChat: selectChatTab,
24082
+ onSelectChatTab: selectChatTabById,
24083
+ onSelectFile: selectFileTab,
24084
+ onCloseFile: closeFileTab
24085
+ });
24086
+ }
23482
24087
  }), _el$5);
23483
24088
  setProp(_el$5, "flexGrow", 1);
23484
24089
  insert(_el$5, createComponent2(Show, {
@@ -23641,7 +24246,7 @@ async function startApp() {
23641
24246
  } of loadUserThemes()) {
23642
24247
  addTheme(name, theme);
23643
24248
  }
23644
- const homeDir2 = process.env.KOBE_HOME_DIR ?? homedir12();
24249
+ const homeDir2 = process.env.KOBE_HOME_DIR ?? homedir13();
23645
24250
  let orchestrator;
23646
24251
  if (process.env.KOBE_TEST_ENGINE || process.env.KOBE_NO_DAEMON === "1") {
23647
24252
  const engine3 = await buildEngine();
@@ -23708,6 +24313,7 @@ var init_app = __esm(() => {
23708
24313
  init_center_tab_strip();
23709
24314
  init_help_dialog();
23710
24315
  init_pane_header();
24316
+ init_rc_bridge_dialog();
23711
24317
  init_resizable_edge();
23712
24318
  init_status_bar();
23713
24319
  init_toast_overlay();
@@ -23739,7 +24345,7 @@ var exports_tui = {};
23739
24345
  __export(exports_tui, {
23740
24346
  startTui: () => startTui
23741
24347
  });
23742
- import { TextAttributes as TextAttributes27 } from "@opentui/core";
24348
+ import { TextAttributes as TextAttributes28 } from "@opentui/core";
23743
24349
  function HelpHint() {
23744
24350
  const {
23745
24351
  theme
@@ -23813,7 +24419,7 @@ function Banner() {
23813
24419
  insert(_el$20, selected);
23814
24420
  insert(_el$12, createComponent2(HelpHint, {}), null);
23815
24421
  effect((_p$) => {
23816
- var _v$7 = theme.primary, _v$8 = TextAttributes27.BOLD, _v$9 = theme.borderActive, _v$0 = theme.text, _v$1 = theme.textMuted, _v$10 = {
24422
+ var _v$7 = theme.primary, _v$8 = TextAttributes28.BOLD, _v$9 = theme.borderActive, _v$0 = theme.text, _v$1 = theme.textMuted, _v$10 = {
23817
24423
  fg: theme.accent
23818
24424
  };
23819
24425
  _v$7 !== _p$.e && (_p$.e = setProp(_el$13, "fg", _v$7, _p$.e));