nolo-cli 0.30.0-alpha.2 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -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-BGKPABK4.js");
799
+ const { startTuiWorkspace } = await import("./readlineWorkspace-EY3BPXIU.js");
800
800
  const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-4474IBTI.js");
801
801
  return startTuiWorkspace({
802
802
  ...args2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.30.0-alpha.2",
3
+ "version": "0.30.0",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {
@@ -3637,6 +3637,7 @@ var SLASH_COMMANDS = [
3637
3637
  "/ctx",
3638
3638
  "/runtime",
3639
3639
  "/tools",
3640
+ "/thinking",
3640
3641
  "/switch",
3641
3642
  "/agent",
3642
3643
  "/agents",
@@ -4725,18 +4726,6 @@ function finalizeCurrentTurn(history) {
4725
4726
  }
4726
4727
  }
4727
4728
  }
4728
- function appendLocalTurn(history, command, output) {
4729
- finalizeCurrentTurn(history);
4730
- history.turns.push({
4731
- role: "local",
4732
- command,
4733
- content: output
4734
- });
4735
- if (history.turns.length > MAX_TUI_HISTORY_TURNS) {
4736
- history.turns = history.turns.slice(history.turns.length - MAX_TUI_HISTORY_TURNS);
4737
- }
4738
- resetStreamingTurnCache();
4739
- }
4740
4729
  function applyOutputChunkToCurrentTurn(history, chunk) {
4741
4730
  const next = applyTerminalOutputToText(history.currentContent, chunk);
4742
4731
  if (next === history.currentContent) return false;
@@ -4764,7 +4753,7 @@ function fillUserBubbleRow(row, surfaceSeq, contentWidth) {
4764
4753
  }
4765
4754
  return renderSurfaceLine({ text: row, surface: surfaceSeq, padTo: contentWidth });
4766
4755
  }
4767
- function renderTurnBlock(role, content, contentWidth, colorEnabled, command) {
4756
+ function renderTurnBlock(role, content, contentWidth, colorEnabled) {
4768
4757
  content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
4769
4758
  const lines = [];
4770
4759
  if (role === "user") {
@@ -4783,21 +4772,6 @@ function renderTurnBlock(role, content, contentWidth, colorEnabled, command) {
4783
4772
  ...surfaceSeq ? rows.map((row) => fillUserBubbleRow(row, surfaceSeq, contentWidth)) : rows
4784
4773
  );
4785
4774
  }
4786
- } else if (role === "local") {
4787
- const dimSeq = colorEnabled ? "\x1B[2m" : "";
4788
- const resetSeq = colorEnabled ? "\x1B[0m" : "";
4789
- if (command) {
4790
- lines.push(
4791
- ...wrapTranscriptLine(`${dimSeq}\u203A ${command}${resetSeq}`, contentWidth)
4792
- );
4793
- }
4794
- if (content) {
4795
- for (const line of content.split("\n")) {
4796
- lines.push(
4797
- ...wrapTranscriptLine(`${dimSeq} ${line}${resetSeq}`, contentWidth)
4798
- );
4799
- }
4800
- }
4801
4775
  } else {
4802
4776
  const styledEntry = styleAssistantTurn(content, colorEnabled);
4803
4777
  for (const logicalLine of styledEntry.split("\n")) {
@@ -4931,22 +4905,13 @@ function getAssistantPlainLines(content) {
4931
4905
  assistantPlainLinesCache.set(content, plainLines);
4932
4906
  return plainLines;
4933
4907
  }
4934
- function countTurnLines(role, content, contentWidth, command) {
4908
+ function countTurnLines(role, content, contentWidth) {
4935
4909
  content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
4936
4910
  let count = 0;
4937
4911
  if (role === "user") {
4938
4912
  for (const line of content.split("\n")) {
4939
4913
  count += wrapTranscriptLine(`\u2503 ${line}`, contentWidth, "\u2503 ").length;
4940
4914
  }
4941
- } else if (role === "local") {
4942
- if (command) {
4943
- count += wrapTranscriptLine(`\u203A ${command}`, contentWidth).length;
4944
- }
4945
- if (content) {
4946
- for (const line of content.split("\n")) {
4947
- count += wrapTranscriptLine(` ${line}`, contentWidth).length;
4948
- }
4949
- }
4950
4915
  } else {
4951
4916
  const plainLines = getAssistantPlainLines(content);
4952
4917
  for (let i = 0; i < plainLines.length; i++) {
@@ -4970,7 +4935,7 @@ function buildTurnOffsets(history, contentWidth) {
4970
4935
  if (cached && cached.width === contentWidth) {
4971
4936
  lineCount = cached.count;
4972
4937
  } else {
4973
- lineCount = countTurnLines(turn.role, turn.content, contentWidth, turn.command);
4938
+ lineCount = countTurnLines(turn.role, turn.content, contentWidth);
4974
4939
  turnLineCountCache.set(turn, { width: contentWidth, count: lineCount });
4975
4940
  }
4976
4941
  entries.push({ startRow: offset, lineCount, separatorAbove });
@@ -4990,14 +4955,7 @@ function buildCopyViewLines(history) {
4990
4955
  for (const [index, turn] of turns.entries()) {
4991
4956
  if (index > 0) lines.push("");
4992
4957
  const normalized = stripAnsi(turn.content).replace(/\r\n/g, "\n").replace(/\r/g, "\n");
4993
- if (turn.role === "local") {
4994
- if (turn.command) {
4995
- lines.push(`\u203A ${stripAnsi(turn.command)}`);
4996
- }
4997
- lines.push(...normalized.split("\n"));
4998
- } else {
4999
- lines.push(...normalized.split("\n"));
5000
- }
4958
+ lines.push(...normalized.split("\n"));
5001
4959
  }
5002
4960
  return lines;
5003
4961
  }
@@ -5061,7 +5019,7 @@ function renderHistory(output, history, inputLines) {
5061
5019
  lines = cached.lines;
5062
5020
  } else {
5063
5021
  renderCacheMissCount += 1;
5064
- lines = renderTurnBlock(turn.role, turn.content, contentWidth, colorEnabled, turn.command);
5022
+ lines = renderTurnBlock(turn.role, turn.content, contentWidth, colorEnabled);
5065
5023
  turnLineCache.set(turn, {
5066
5024
  width: contentWidth,
5067
5025
  color: colorEnabled,
@@ -6527,7 +6485,7 @@ async function startTuiWorkspace(options) {
6527
6485
  activeTurnAbort.abort();
6528
6486
  }
6529
6487
  };
6530
- const emitCommandOutput = (text, command = "") => {
6488
+ const emitCommandOutput = (text) => {
6531
6489
  if (!text) return;
6532
6490
  if (!isInteractiveInput(input)) {
6533
6491
  output.write(`${text}
@@ -6535,7 +6493,9 @@ async function startTuiWorkspace(options) {
6535
6493
  return;
6536
6494
  }
6537
6495
  history.followBottom = true;
6538
- appendLocalTurn(history, command, text);
6496
+ startTurn(history, "assistant");
6497
+ appendToCurrentTurn(history, text);
6498
+ finalizeCurrentTurn(history);
6539
6499
  renderHistoryToOutput();
6540
6500
  if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
6541
6501
  };
@@ -6556,17 +6516,21 @@ async function startTuiWorkspace(options) {
6556
6516
  const previousAgentKey = state.agentKey;
6557
6517
  state = result.nextState;
6558
6518
  const interactive = isInteractiveInput(input);
6559
- if (result.action?.type !== "chat" && result.action?.type !== "exit" && result.output) {
6560
- emitCommandOutput(result.output, interactive ? line.trim() : "");
6519
+ if (interactive && result.action?.type !== "chat") {
6520
+ history.followBottom = true;
6521
+ startTurn(history, "user");
6522
+ appendToCurrentTurn(history, line.trim());
6523
+ finalizeCurrentTurn(history);
6524
+ renderHistoryToOutput();
6525
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
6526
+ }
6527
+ if (result.output) {
6528
+ emitCommandOutput(result.output);
6561
6529
  }
6562
6530
  if (state.agentKey !== previousAgentKey) {
6563
6531
  persistExplicitAgentSwitch(previousAgentKey);
6564
6532
  }
6565
- if (result.action?.type === "exit") {
6566
- if (result.output) output.write(`${result.output}
6567
- `);
6568
- return true;
6569
- }
6533
+ if (result.action?.type === "exit") return true;
6570
6534
  if (result.action?.type === "clear") {
6571
6535
  if (result.action.dialogId) {
6572
6536
  const authToken = resolvePlatformAuthToken(options.env ?? {});
@@ -7399,7 +7363,6 @@ ${renderStatusLine(state)}
7399
7363
  }
7400
7364
  export {
7401
7365
  ANSI_ESCAPE_REGEX,
7402
- appendLocalTurn,
7403
7366
  appendToCurrentTurn,
7404
7367
  applyOutputChunkToCurrentTurn,
7405
7368
  applyScrollAction,