nolo-cli 0.33.0-alpha.15 → 0.33.0-alpha.16

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.
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-FV63ICZC.js";
5
5
  import {
6
6
  runAgentCreateCommand
7
- } from "./chunk-N3ER5S5E.js";
7
+ } from "./chunk-6PPURIM6.js";
8
8
  import {
9
9
  positionalArgs,
10
10
  readFlagValue
@@ -16,7 +16,7 @@ import {
16
16
  fetchWithTransportFallback,
17
17
  resolveAgentRecordFromHybridStore
18
18
  } from "./chunk-YDTYDA5W.js";
19
- import "./chunk-ZDUEQ6HC.js";
19
+ import "./chunk-XEPM3JUR.js";
20
20
  import "./chunk-IEHZHWN7.js";
21
21
  import "./chunk-X2DAEZ3X.js";
22
22
  import {
@@ -83,7 +83,7 @@ async function defaultExecuteCli(provider, prompt, options) {
83
83
  return executeCli(provider, prompt, options);
84
84
  }
85
85
  async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
86
- const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-PBRWNUXC.js");
86
+ const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-ZNOVFX5A.js");
87
87
  return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
88
88
  }
89
89
  async function detectLaunchableMachineInfo() {
@@ -2,10 +2,10 @@ import {
2
2
  runAgentCreateCommand,
3
3
  runAgentReadCommand,
4
4
  runAgentUpdateCommand
5
- } from "./chunk-N3ER5S5E.js";
5
+ } from "./chunk-6PPURIM6.js";
6
6
  import "./chunk-UNHKVD2N.js";
7
7
  import "./chunk-YDTYDA5W.js";
8
- import "./chunk-ZDUEQ6HC.js";
8
+ import "./chunk-XEPM3JUR.js";
9
9
  import "./chunk-IEHZHWN7.js";
10
10
  import "./chunk-X2DAEZ3X.js";
11
11
  import "./chunk-EKLRRZIN.js";
@@ -7,13 +7,13 @@ import {
7
7
  prependSubjectDialogMarker,
8
8
  resolveWorkflowReference,
9
9
  runAgentRunCommand
10
- } from "./chunk-X52KQTFN.js";
10
+ } from "./chunk-DHT7AQTA.js";
11
11
  import {
12
12
  parseAgentRunArgs
13
13
  } from "./chunk-ZHYK3N56.js";
14
14
  import "./chunk-UNHKVD2N.js";
15
15
  import "./chunk-YDTYDA5W.js";
16
- import "./chunk-ZDUEQ6HC.js";
16
+ import "./chunk-XEPM3JUR.js";
17
17
  import "./chunk-IEHZHWN7.js";
18
18
  import "./chunk-X2DAEZ3X.js";
19
19
  import "./chunk-EKLRRZIN.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-YDTYDA5W.js";
13
13
  import {
14
14
  clearCliLocalRuntimePreparedAgentCache
15
- } from "./chunk-ZDUEQ6HC.js";
15
+ } from "./chunk-XEPM3JUR.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-EKLRRZIN.js";
@@ -25,7 +25,7 @@ import {
25
25
  parseAgentRunEvent,
26
26
  t,
27
27
  toolLabel
28
- } from "./chunk-ZDUEQ6HC.js";
28
+ } from "./chunk-XEPM3JUR.js";
29
29
  import {
30
30
  NOLO_PROJECT_MANAGER_AGENT_KEY,
31
31
  isLocalCliAgentKey
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-ZDUEQ6HC.js";
4
+ } from "./chunk-XEPM3JUR.js";
5
5
  import {
6
6
  clipMultilineText
7
7
  } from "./chunk-7RUIWGT2.js";
@@ -423,16 +423,8 @@ var STRINGS = {
423
423
  zh: "\u5F53\u524D\u73AF\u5883\u6CA1\u6709\u53EF\u7528\u7684\u526A\u8D34\u677F\u3002\u6700\u540E\u4E00\u6761\u56DE\u590D\u5DF2\u6253\u5370\u5728\u4E0A\u65B9\uFF0C\u53EF\u624B\u52A8\u590D\u5236\u3002"
424
424
  },
425
425
  copyUsage: {
426
- en: "Usage: /copy or /copy view",
427
- zh: "\u7528\u6CD5\uFF1A/copy \u6216 /copy view"
428
- },
429
- copyViewTitle: {
430
- en: "Copy view \u2014 conversation history",
431
- zh: "\u590D\u5236\u89C6\u56FE \u2014 \u5BF9\u8BDD\u5386\u53F2"
432
- },
433
- copyViewHint: {
434
- en: "Drag to select. Use PageUp/PageDown, Home/End, or the mouse wheel to scroll. Press Esc or Enter to return.",
435
- zh: "\u76F4\u63A5\u62D6\u9009\u3002\u53EF\u7528 PageUp/PageDown\u3001Home/End \u6216\u9F20\u6807\u6EDA\u8F6E\u6EDA\u52A8\u3002\u6309 Esc \u6216 Enter \u8FD4\u56DE\u3002"
426
+ en: "Usage: /copy",
427
+ zh: "\u7528\u6CD5\uFF1A/copy"
436
428
  },
437
429
  historyNoToken: {
438
430
  en: "History requires an auth token. Run `nolo login` or set AUTH_TOKEN.",
@@ -714,7 +706,6 @@ var STRINGS = {
714
706
  " /resume <dialogId> Resume a dialog directly by id",
715
707
  " /lang <zh|en> Switch interface language",
716
708
  " /copy Copy the last reply to the clipboard",
717
- " /copy view Open native scrollback for partial selection (Ctrl+O)",
718
709
  " /mouse <on|off> Toggle mouse mode (off = drag to select text)",
719
710
  " /altscreen <on|off> Toggle the terminal alternate screen (default on; off shares shell scrollback)",
720
711
  " /doc List attached docs",
@@ -750,7 +741,6 @@ var STRINGS = {
750
741
  " /resume <dialogId> \u6309 id \u76F4\u63A5\u6062\u590D\u5BF9\u8BDD",
751
742
  " /lang <zh|en> \u5207\u6362\u754C\u9762\u8BED\u8A00",
752
743
  " /copy \u590D\u5236\u6700\u540E\u4E00\u6761\u56DE\u590D\u5230\u526A\u8D34\u677F",
753
- " /copy view \u6253\u5F00\u539F\u751F\u56DE\u6EDA\u8FDB\u884C\u8DE8\u5C4F\u62D6\u9009\uFF08Ctrl+O\uFF09",
754
744
  " /mouse <on|off> \u5207\u6362\u9F20\u6807\u6A21\u5F0F\uFF08off \u540E\u53EF\u76F4\u63A5\u62D6\u9009\u6587\u672C\uFF09",
755
745
  " /altscreen <on|off> \u5207\u6362\u7EC8\u7AEF\u5907\u7528\u5C4F\uFF08\u9ED8\u8BA4 on\uFF1Boff \u6539\u4E3A\u4E0E shell \u5171\u7528\u56DE\u6EDA\uFF09",
756
746
  " /doc \u5217\u51FA\u5DF2\u6302\u8F7D\u7684\u6587\u6863",
package/index.js CHANGED
@@ -126,7 +126,7 @@ function createDaemonShortcutCommand(path, description, command2) {
126
126
  // packages/cli/agentInternalCommandEntries.ts
127
127
  function getAgentInternalCommandEntries() {
128
128
  const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args2, ctx) => {
129
- const { runAgentRunCommand } = await import("./agentRunCommand-KUFIMMXB.js");
129
+ const { runAgentRunCommand } = await import("./agentRunCommand-RX4SEBVJ.js");
130
130
  return runAgentRunCommand(args2, {
131
131
  env: ctx.env,
132
132
  scriptDir: ctx.scriptDir,
@@ -142,7 +142,7 @@ function getAgentInternalCommandEntries() {
142
142
  return runAgentListCommand(args2, deps);
143
143
  }),
144
144
  createEnvCommand(["agent", "create"], "Create a new agent", async (args2, deps) => {
145
- const { runAgentCreateCommand } = await import("./agentRecordCommands-YFND6UBV.js");
145
+ const { runAgentCreateCommand } = await import("./agentRecordCommands-O7FXP7ST.js");
146
146
  return runAgentCreateCommand(args2, deps);
147
147
  }),
148
148
  createEnvCommand(["agent", "pull"], "Cache an agent for local runs", async (args2, deps) => {
@@ -150,7 +150,7 @@ function getAgentInternalCommandEntries() {
150
150
  return runAgentPullCommand(args2, deps);
151
151
  }),
152
152
  createEnvCommand(["agent", "read"], "Read a single agent", async (args2, deps) => {
153
- const { runAgentReadCommand } = await import("./agentRecordCommands-YFND6UBV.js");
153
+ const { runAgentReadCommand } = await import("./agentRecordCommands-O7FXP7ST.js");
154
154
  return runAgentReadCommand(args2, deps);
155
155
  }),
156
156
  createAgentRunCommand(["agent", "run"], "Run an agent"),
@@ -179,26 +179,26 @@ function getAgentInternalCommandEntries() {
179
179
  return runSetupOfflineMarxistsAgentCommand(args2, deps);
180
180
  }),
181
181
  createEnvCommand(["agent", "update"], "Update agent fields", async (args2, deps) => {
182
- const { runAgentUpdateCommand } = await import("./agentRecordCommands-YFND6UBV.js");
182
+ const { runAgentUpdateCommand } = await import("./agentRecordCommands-O7FXP7ST.js");
183
183
  return runAgentUpdateCommand(args2, deps);
184
184
  }),
185
185
  createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args2, deps) => {
186
- const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-EMQB3J4A.js");
186
+ const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-XBI3DVIX.js");
187
187
  return runAgentEmailProvisionCommand(args2, deps);
188
188
  }),
189
189
  createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args2, deps) => {
190
- const { runAgentEmailBindCommand } = await import("./agentEmailCommands-EMQB3J4A.js");
190
+ const { runAgentEmailBindCommand } = await import("./agentEmailCommands-XBI3DVIX.js");
191
191
  return runAgentEmailBindCommand(args2, deps);
192
192
  }),
193
193
  createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args2, deps) => {
194
- const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-EMQB3J4A.js");
194
+ const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-XBI3DVIX.js");
195
195
  return runAgentEmailTransferCommand(args2, deps);
196
196
  }),
197
197
  createEnvCommand(
198
198
  ["agent", "email", "create-and-provision"],
199
199
  "Create an agent and provision its controlled inbox",
200
200
  async (args2, deps) => {
201
- const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-EMQB3J4A.js");
201
+ const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-XBI3DVIX.js");
202
202
  return runAgentEmailCreateAndProvisionCommand(args2, deps);
203
203
  }
204
204
  ),
@@ -219,15 +219,15 @@ function getAgentInternalCommandEntries() {
219
219
  return runAgentRevokeGrantCommand(args2, deps);
220
220
  }),
221
221
  createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args2, deps) => {
222
- const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-2BW7345K.js");
222
+ const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-RI2D7IKF.js");
223
223
  return runAgentBindCurrentCommand(args2, deps);
224
224
  }),
225
225
  createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args2, deps) => {
226
- const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-2BW7345K.js");
226
+ const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-RI2D7IKF.js");
227
227
  return runAgentSmokeCurrentCommand(args2, deps);
228
228
  }),
229
229
  createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args2, deps) => {
230
- const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-2BW7345K.js");
230
+ const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-RI2D7IKF.js");
231
231
  return runAgentRuntimeDoctorCommand(args2, deps);
232
232
  }),
233
233
  createAgentRunCommand(["agent", "chat"], "Chat with an agent")
@@ -408,15 +408,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
408
408
  return runWhoamiCommand({ args: args2, env: ctx.env });
409
409
  }),
410
410
  createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args2, deps) => {
411
- const { runMachineConnectCommand } = await import("./machineCommands-RJZZCTN7.js");
411
+ const { runMachineConnectCommand } = await import("./machineCommands-FJBYAY3I.js");
412
412
  return runMachineConnectCommand(args2, deps);
413
413
  }),
414
414
  createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args2, deps) => {
415
- const { runMachineConnectCommand } = await import("./machineCommands-RJZZCTN7.js");
415
+ const { runMachineConnectCommand } = await import("./machineCommands-FJBYAY3I.js");
416
416
  return runMachineConnectCommand(args2, deps);
417
417
  }),
418
418
  createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args2, deps) => {
419
- const { runMachineStatusCommand } = await import("./machineCommands-RJZZCTN7.js");
419
+ const { runMachineStatusCommand } = await import("./machineCommands-FJBYAY3I.js");
420
420
  return runMachineStatusCommand(args2, deps);
421
421
  }),
422
422
  createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args2, deps) => {
@@ -796,7 +796,7 @@ async function runScript(script, forwardedArgs, env) {
796
796
  return proc.exited;
797
797
  }
798
798
  async function launchTuiWorkspace(args2) {
799
- const { startTuiWorkspace } = await import("./readlineWorkspace-I2LS4HKQ.js");
799
+ const { startTuiWorkspace } = await import("./readlineWorkspace-ZPWJDKVP.js");
800
800
  const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-WUVAOIYU.js");
801
801
  return startTuiWorkspace({
802
802
  ...args2,
@@ -7,8 +7,8 @@ import {
7
7
  buildMachinePermissionPromptBlock,
8
8
  handleConnectorRunMessage,
9
9
  resolveMachineRunPermissionPolicy
10
- } from "./chunk-BFCPDCYR.js";
11
- import "./chunk-ZDUEQ6HC.js";
10
+ } from "./chunk-HEDDKJEM.js";
11
+ import "./chunk-XEPM3JUR.js";
12
12
  import "./chunk-IEHZHWN7.js";
13
13
  import "./chunk-X2DAEZ3X.js";
14
14
  import "./chunk-EKLRRZIN.js";
@@ -11,8 +11,8 @@ import {
11
11
  runtimeWorkspacePermissionPolicy,
12
12
  scopePermissionPolicyToRuntimeWorkspace,
13
13
  summarizeAgentConfigForLogs
14
- } from "./chunk-BFCPDCYR.js";
15
- import "./chunk-ZDUEQ6HC.js";
14
+ } from "./chunk-HEDDKJEM.js";
15
+ import "./chunk-XEPM3JUR.js";
16
16
  import "./chunk-IEHZHWN7.js";
17
17
  import "./chunk-X2DAEZ3X.js";
18
18
  import "./chunk-EKLRRZIN.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.33.0-alpha.15",
3
+ "version": "0.33.0-alpha.16",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {
@@ -70,7 +70,7 @@ import {
70
70
  visibleWidth,
71
71
  wrapTextToLines,
72
72
  wrapTranscriptLine
73
- } from "./chunk-X52KQTFN.js";
73
+ } from "./chunk-DHT7AQTA.js";
74
74
  import "./chunk-ZHYK3N56.js";
75
75
  import {
76
76
  getReadableCliDb
@@ -87,7 +87,7 @@ import {
87
87
  readTimestamp,
88
88
  setCliLocale,
89
89
  t
90
- } from "./chunk-ZDUEQ6HC.js";
90
+ } from "./chunk-XEPM3JUR.js";
91
91
  import "./chunk-IEHZHWN7.js";
92
92
  import "./chunk-X2DAEZ3X.js";
93
93
  import {
@@ -1989,26 +1989,6 @@ function buildTurnOffsets(history, contentWidth) {
1989
1989
  function currentTurnSeparator(history, density) {
1990
1990
  return density === "spacious" && (history.turns.length > 0 || history.currentRole === "user") ? 1 : 0;
1991
1991
  }
1992
- function buildCopyViewLines(history) {
1993
- const turns = [...history.turns];
1994
- if (history.currentRole !== null) {
1995
- turns.push({ role: history.currentRole, content: history.currentContent });
1996
- }
1997
- const lines = [];
1998
- for (const [index, turn] of turns.entries()) {
1999
- if (index > 0) lines.push("");
2000
- const normalized = stripAnsi(turn.content).replace(/\r\n/g, "\n").replace(/\r/g, "\n");
2001
- if (turn.role === "local") {
2002
- if (turn.command) {
2003
- lines.push(`\u203A ${stripAnsi(turn.command)}`);
2004
- }
2005
- lines.push(...normalized.split("\n"));
2006
- } else {
2007
- lines.push(...normalized.split("\n"));
2008
- }
2009
- }
2010
- return lines;
2011
- }
2012
1992
  function renderHistory(output, history, inputLines) {
2013
1993
  const tty = output;
2014
1994
  if (!tty.isTTY) return;
@@ -3945,9 +3925,6 @@ function applyTuiInputKey(buffer, sequence, key = {}, cursorPos, options) {
3945
3925
  if (seq === "" || key.ctrl && key.name === "c") {
3946
3926
  return { buffer, cursorPos: curPos, abort: true };
3947
3927
  }
3948
- if (seq === "" || key.ctrl && key.name === "o") {
3949
- return { buffer, cursorPos: curPos, copyView: true };
3950
- }
3951
3928
  if (seq === "\f" || key.ctrl && key.name === "l") {
3952
3929
  return { buffer, cursorPos: curPos, redraw: true };
3953
3930
  }
@@ -4032,7 +4009,7 @@ function applyTuiInputKey(buffer, sequence, key = {}, cursorPos, options) {
4032
4009
  const completed = completeSlashPrefix(buffer) ?? buffer;
4033
4010
  return { buffer: completed, cursorPos: completed.length };
4034
4011
  }
4035
- if (!seq || key.ctrl || key.meta || seq.startsWith("\x1B")) {
4012
+ if (!seq || key.ctrl || key.meta || seq.startsWith("\x1B") || seq.charCodeAt(0) < 32) {
4036
4013
  return { buffer, cursorPos: curPos };
4037
4014
  }
4038
4015
  const insertAt = snapCursorOutsidePasteChip(buffer, curPos);
@@ -4597,13 +4574,6 @@ function handleTuiInput(input, state) {
4597
4574
  action: { type: "pick-dialog" }
4598
4575
  };
4599
4576
  case "/copy":
4600
- if (argText === "view") {
4601
- return {
4602
- nextState: state,
4603
- output: "",
4604
- action: { type: "copy-view" }
4605
- };
4606
- }
4607
4577
  if (argText) {
4608
4578
  return { nextState: state, output: t("copyUsage") };
4609
4579
  }
@@ -5155,7 +5125,7 @@ function createFixedInput(output, config) {
5155
5125
  lastScrollBottom = -1;
5156
5126
  write("\x1B[r");
5157
5127
  };
5158
- let mouseEnabled = true;
5128
+ let mouseEnabled = (process.env.NOLO_TUI_MOUSE ?? "").trim() === "1";
5159
5129
  const enableMouse = () => {
5160
5130
  if (mouseEnabled) write("\x1B[?1006h\x1B[?1000h");
5161
5131
  };
@@ -5622,7 +5592,12 @@ var SIGNAL_EXIT_CODE = {
5622
5592
  };
5623
5593
  var restoreAltScreen = () => {
5624
5594
  try {
5625
- if (altScreenRestoreOutput) leaveAltScreen(altScreenRestoreOutput);
5595
+ if (altScreenRestoreOutput) {
5596
+ leaveAltScreen(altScreenRestoreOutput);
5597
+ if (altScreenRestoreOutput.isTTY) {
5598
+ altScreenRestoreOutput.write("\x1B[r\x1B[?2004l\x1B[?25h");
5599
+ }
5600
+ }
5626
5601
  } catch {
5627
5602
  }
5628
5603
  };
@@ -5636,8 +5611,9 @@ function installAltScreenRestoreHandlers(output) {
5636
5611
  preExistingSignalListeners[sig] = [...existing];
5637
5612
  const handler = () => {
5638
5613
  restoreAltScreen();
5639
- const others = process.listeners(sig).filter((fn) => fn !== handler);
5640
- if (others.length === 0) {
5614
+ const count = process.listenerCount(sig);
5615
+ const hasOtherListeners = (preExistingSignalListeners[sig]?.length ?? 0) > 0 || count > 1;
5616
+ if (!hasOtherListeners) {
5641
5617
  process.exit(SIGNAL_EXIT_CODE[sig] ?? 128 + 1);
5642
5618
  return;
5643
5619
  }
@@ -6044,10 +6020,14 @@ async function startTuiWorkspace(options) {
6044
6020
  const fetchImpl = options.fetchImpl ?? fetch;
6045
6021
  const spawnRunner = options.spawnRunner ?? spawnProcess;
6046
6022
  const selfUpdater = options.selfUpdater ?? ((target) => runSelfUpdate({ output: target }));
6023
+ const env = options.env ?? process.env;
6024
+ const startInAltScreen = (env.NOLO_TUI_ALTSCREEN ?? "").trim() === "1";
6047
6025
  if (output.isTTY) {
6048
- enterAltScreen(output);
6026
+ if (startInAltScreen) {
6027
+ enterAltScreen(output);
6028
+ output.write("\x1B[2J\x1B[H");
6029
+ }
6049
6030
  installAltScreenRestoreHandlers(output);
6050
- output.write("\x1B[2J\x1B[H");
6051
6031
  }
6052
6032
  const detected = await detectTerminalBackground({
6053
6033
  stdin: input,
@@ -6073,8 +6053,8 @@ async function startTuiWorkspace(options) {
6073
6053
  let lastSentTitle = null;
6074
6054
  const syncWindowTitle = () => {
6075
6055
  if (!output.isTTY) return;
6076
- const env = options.env ?? process.env;
6077
- const rawSetting = (env.NOLO_TUI_TITLE ?? "").trim().toLowerCase();
6056
+ const env2 = options.env ?? process.env;
6057
+ const rawSetting = (env2.NOLO_TUI_TITLE ?? "").trim().toLowerCase();
6078
6058
  if (rawSetting === "0" || rawSetting === "false") return;
6079
6059
  const currentTitle = state.dialogLabel?.trim() ?? "";
6080
6060
  if (currentTitle === lastSentTitle) return;
@@ -6122,9 +6102,6 @@ async function startTuiWorkspace(options) {
6122
6102
  reconcile: (runId) => checkStaleRun(runId, { env: process.env }),
6123
6103
  onRecordsPolled: (records) => runCompletionWatcher.observe(records)
6124
6104
  });
6125
- let copyViewExitResolver = null;
6126
- let copyViewRender = null;
6127
- let copyViewScrollTop = 0;
6128
6105
  const history = createTurnHistory();
6129
6106
  const dialogHost = createDialogHost({
6130
6107
  composer: {
@@ -6231,53 +6208,6 @@ async function startTuiWorkspace(options) {
6231
6208
  const text = lastReply ? stripAnsi(lastReply).trim() : "";
6232
6209
  return text || null;
6233
6210
  };
6234
- const openCopyView = async () => {
6235
- const lines = buildCopyViewLines(history);
6236
- if (lines.length === 0) return false;
6237
- if (!isInteractiveInput(input)) {
6238
- output.write(`${lines.join("\n")}
6239
- `);
6240
- return true;
6241
- }
6242
- const tty = output;
6243
- const renderCopyView = () => {
6244
- const rows = Math.max(1, tty.rows ?? 24);
6245
- const columns = Math.max(1, tty.columns ?? 80);
6246
- const copyLines = buildCopyViewLines(history);
6247
- const visibleHeight = Math.max(1, rows - 3);
6248
- const maxScrollTop = Math.max(0, copyLines.length - visibleHeight);
6249
- copyViewScrollTop = Math.max(0, Math.min(copyViewScrollTop, maxScrollTop));
6250
- let frame = "\x1B[2J\x1B[H";
6251
- frame += `${t("copyViewTitle")}
6252
- `;
6253
- for (let index = 0; index < visibleHeight; index++) {
6254
- frame += `${fitAnsiLine(copyLines[copyViewScrollTop + index] ?? "", columns)}
6255
- `;
6256
- }
6257
- frame += `${t("copyViewHint")}
6258
- `;
6259
- output.write(frame);
6260
- };
6261
- fixedInput.pause();
6262
- copyViewScrollTop = 0;
6263
- copyViewRender = renderCopyView;
6264
- try {
6265
- renderCopyView();
6266
- await new Promise((resolve2) => {
6267
- copyViewExitResolver = resolve2;
6268
- });
6269
- } finally {
6270
- copyViewExitResolver = null;
6271
- copyViewRender = null;
6272
- output.write("\x1B[2J\x1B[H");
6273
- resetHistoryFrameDiffCache(output);
6274
- fixedInput.resumeFromDialog();
6275
- flushPendingRender();
6276
- renderHistoryToOutput();
6277
- fixedInput.repaint(buffer, cursorPos);
6278
- }
6279
- return true;
6280
- };
6281
6211
  let modalOwnsKeyboard = false;
6282
6212
  let rawActionGateTokenHandler = null;
6283
6213
  const AUTO_THEME_POLL_MS = 3e4;
@@ -6749,10 +6679,6 @@ async function startTuiWorkspace(options) {
6749
6679
  renderHistoryToOutput();
6750
6680
  fixedInput.repaint(buffer, cursorPos);
6751
6681
  }
6752
- if (result.action?.type === "copy-view") {
6753
- const opened = await openCopyView();
6754
- if (!opened) emitCommandOutput(t("copyNothing"));
6755
- }
6756
6682
  if (result.action?.type === "copy-last") {
6757
6683
  const text = readLatestAssistantReply() ?? "";
6758
6684
  if (!text) {
@@ -6972,10 +6898,6 @@ ${err.message}` : ""}`
6972
6898
  };
6973
6899
  const onResize = () => {
6974
6900
  if (done) return;
6975
- if (copyViewExitResolver) {
6976
- copyViewRender?.();
6977
- return;
6978
- }
6979
6901
  if (fixedInput.isPaused()) {
6980
6902
  renderHistory(output, history, fixedInput.getInputLines());
6981
6903
  fixedInput.repaint(buffer, cursorPos);
@@ -7068,7 +6990,7 @@ ${err.message}` : ""}`
7068
6990
  };
7069
6991
  runWakeHandler = (event) => {
7070
6992
  if (done) return;
7071
- if (busy || fixedInput.isPaused() || copyViewExitResolver) {
6993
+ if (busy || fixedInput.isPaused()) {
7072
6994
  const { actionGateHandler, confirmDestructiveAction } = buildInteractiveTurnHandlers();
7073
6995
  ensureChatQueueBinding(actionGateHandler, confirmDestructiveAction).enqueue(event);
7074
6996
  if (fixedInput.active && !fixedInput.isPaused()) {
@@ -7085,49 +7007,6 @@ ${err.message}` : ""}`
7085
7007
  };
7086
7008
  const handleInputToken = async (sequence) => {
7087
7009
  if (done) return;
7088
- if (copyViewExitResolver) {
7089
- const tty = output;
7090
- const visibleHeight = Math.max(1, (tty.rows ?? 24) - 3);
7091
- const lines = buildCopyViewLines(history);
7092
- const maxScrollTop = Math.max(0, lines.length - visibleHeight);
7093
- const scrollAction2 = parseScrollAction(sequence);
7094
- if (scrollAction2) {
7095
- switch (scrollAction2) {
7096
- case "page-up":
7097
- copyViewScrollTop = Math.max(0, copyViewScrollTop - visibleHeight);
7098
- break;
7099
- case "page-down":
7100
- copyViewScrollTop = Math.min(maxScrollTop, copyViewScrollTop + visibleHeight);
7101
- break;
7102
- case "half-page-up":
7103
- copyViewScrollTop = Math.max(0, copyViewScrollTop - Math.max(1, Math.floor(visibleHeight / 2)));
7104
- break;
7105
- case "wheel-up":
7106
- copyViewScrollTop = Math.max(0, copyViewScrollTop - WHEEL_SCROLL_LINES);
7107
- break;
7108
- case "half-page-down":
7109
- copyViewScrollTop = Math.min(maxScrollTop, copyViewScrollTop + Math.max(1, Math.floor(visibleHeight / 2)));
7110
- break;
7111
- case "wheel-down":
7112
- copyViewScrollTop = Math.min(maxScrollTop, copyViewScrollTop + WHEEL_SCROLL_LINES);
7113
- break;
7114
- case "top":
7115
- copyViewScrollTop = 0;
7116
- break;
7117
- case "bottom":
7118
- copyViewScrollTop = maxScrollTop;
7119
- break;
7120
- }
7121
- copyViewRender?.();
7122
- return;
7123
- }
7124
- if (sequence === "\x1B" || sequence === "\r" || sequence === "\n" || sequence === "") {
7125
- const exitCopyView = copyViewExitResolver;
7126
- copyViewExitResolver = null;
7127
- exitCopyView();
7128
- }
7129
- return;
7130
- }
7131
7010
  if (modalOwnsKeyboard) {
7132
7011
  rawActionGateTokenHandler?.(sequence);
7133
7012
  return;
@@ -7190,17 +7069,6 @@ ${merged}` : merged;
7190
7069
  const result = applyTuiInputKey(buffer, sequence, {}, cursorPos, {
7191
7070
  pasteStore
7192
7071
  });
7193
- if (result.copyView) {
7194
- const opened = await openCopyView();
7195
- if (!opened) {
7196
- history.followBottom = true;
7197
- startTurn(history, "assistant");
7198
- appendToCurrentTurn(history, t("copyNothing"));
7199
- finalizeCurrentTurn(history);
7200
- paintFrame(buffer);
7201
- }
7202
- return;
7203
- }
7204
7072
  if (result.redraw) {
7205
7073
  resetHistoryFrameDiffCache(output);
7206
7074
  renderHistoryToOutput();