@trydecember/cli 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/december.js +159 -62
  2. package/package.json +1 -1
package/dist/december.js CHANGED
@@ -65,7 +65,7 @@ var package_default;
65
65
  var init_package = __esm(() => {
66
66
  package_default = {
67
67
  name: "@trydecember/cli",
68
- version: "0.4.2",
68
+ version: "0.4.3",
69
69
  description: "a coding agent for terminal and cloud.",
70
70
  homepage: "https://trydecember.com",
71
71
  repository: {
@@ -64374,6 +64374,7 @@ function parseIgnoreLines(content) {
64374
64374
  const trimmed = line.trim();
64375
64375
  if (!trimmed || trimmed.startsWith("#"))
64376
64376
  continue;
64377
+ const isRootAnchored = trimmed.startsWith("/");
64377
64378
  let clean = trimmed;
64378
64379
  if (clean.startsWith("/")) {
64379
64380
  clean = clean.slice(1);
@@ -64386,7 +64387,7 @@ function parseIgnoreLines(content) {
64386
64387
  if (!clean.endsWith("/**")) {
64387
64388
  patterns.push(`${clean}/**`);
64388
64389
  }
64389
- if (!clean.startsWith("**/")) {
64390
+ if (!isRootAnchored && !clean.startsWith("**/")) {
64390
64391
  patterns.push(`**/${clean}`);
64391
64392
  patterns.push(`**/${clean}/**`);
64392
64393
  }
@@ -167937,7 +167938,8 @@ function getModelFamilyPrompt(options) {
167937
167938
  - Proactive Task Breakdown: Break down complex requests into orderly stages, verify each stage empirically, and maintain single-step transitions.`;
167938
167939
  } else if (model.includes("gemini")) {
167939
167940
  roleGuidelines = `### Model Specialization (Gemini)
167940
- - Structured Execution: Follow clear operational phases: 1) Explore and gather context, 2) Formulate targeted edits, 3) Verify thoroughly.
167941
+ - Structured Execution: Follow clear operational phases: 1) Explore and gather context (inspect repo layout in monorepos before deep-diving), 2) Formulate targeted edits, 3) Verify thoroughly.
167942
+ - Efficient Verification: Run verification tests only after modifying files, not during early exploratory discovery. Once targeted tests pass and git diff is verified clean, complete your response immediately without repeating status, diff, or test commands.
167941
167943
  - Absolute File Paths: STRICTLY specify absolute file paths when referencing, viewing, or editing files. NEVER output ambiguous relative paths.`;
167942
167944
  }
167943
167945
  return {
@@ -168099,7 +168101,7 @@ You operate across two environments seamlessly: locally via a terminal CLI, and
168099
168101
  `### Core Operating Principles & Guardrails
168100
168102
  1. Inspect Logs & Stack Traces First: NEVER diagnose errors or failures without fetching and reading full un-truncated error logs. Base diagnoses strictly on empirical log evidence.
168101
168103
  2. Root Cause Resolution: NEVER mask symptoms, swallow exceptions silently, use dummy fallbacks, or delete/comment out failing tests. Address the root cause directly.
168102
- 3. Execution & Verification: NEVER claim a task or fix is complete without running build, type-check, or test verification commands to empirically prove it works.
168104
+ 3. Execution & Verification: NEVER claim a task or fix is complete without running build, type-check, or test verification commands to empirically prove it works. Do not run heavy build or test suites prematurely during early discovery before any code is modified. Target verification to the modified component rather than full monorepo rebuilds when possible. Once targeted verification succeeds and git diff confirms clean changes, conclude your turn promptly without redundant re-verification loops.
168103
168105
  4. Preserving Integrity: Always preserve existing docstrings, comments, and public API signatures unless explicitly asked to modify them.
168104
168106
  5. Absolute File Paths: ALWAYS specify absolute file paths when referencing, viewing, or editing files.
168105
168107
  6. Strict Workspace Boundary: All operations (file reads, writes, searches, bash commands) must be strictly confined within the workspace directory (/workspace or current working directory). NEVER inspect, explore, or search system root paths or directories outside the workspace (such as /etc, /root, /bin, /var).
@@ -174607,7 +174609,8 @@ Failed to start process: ${err?.message || err}
174607
174609
  const targetDir = path24.isAbsolute(dirPath) ? dirPath : path24.resolve(root, dirPath);
174608
174610
  const ignores = getWorkspaceIgnores(root);
174609
174611
  try {
174610
- const cmd = `git grep -nI "${query}" ${targetDir} || grep -rnI --exclude-dir=node_modules --exclude-dir=.git "${query}" ${targetDir}`;
174612
+ const escapedQuery = query.replace(/"/g, "\\\"");
174613
+ const cmd = `git grep -nI "${escapedQuery}" -- ${targetDir} || grep -rnI --exclude-dir=node_modules --exclude-dir=.git "${escapedQuery}" ${targetDir}`;
174611
174614
  const { stdout } = await execAsync2(cmd);
174612
174615
  if (!stdout)
174613
174616
  return "";
@@ -174616,8 +174619,9 @@ Failed to start process: ${err?.message || err}
174616
174619
  const filtered = lines.filter((line) => {
174617
174620
  if (!line.trim())
174618
174621
  return false;
174619
- const filePath = line.split(":")[0];
174620
- return !isPathIgnored(filePath, ignores);
174622
+ const rawPath = line.split(":")[0];
174623
+ const relPath = path24.isAbsolute(rawPath) ? path24.relative(root, rawPath) : rawPath;
174624
+ return !isPathIgnored(relPath, ignores);
174621
174625
  });
174622
174626
  return filtered.join(`
174623
174627
  `);
@@ -215746,6 +215750,8 @@ var init_input_bar = __esm(async () => {
215746
215750
  showExitConfirm ? /* @__PURE__ */ jsx_runtime8.jsx(Box_default, {
215747
215751
  width: "100%",
215748
215752
  justifyContent: "space-between",
215753
+ height: 1,
215754
+ overflow: "hidden",
215749
215755
  children: /* @__PURE__ */ jsx_runtime8.jsx(Box_default, {
215750
215756
  gap: 2,
215751
215757
  alignItems: "center",
@@ -215762,6 +215768,7 @@ var init_input_bar = __esm(async () => {
215762
215768
  ]
215763
215769
  }) : /* @__PURE__ */ jsx_runtime8.jsx(Text3, {
215764
215770
  color: THEME.colors.muted,
215771
+ wrap: "truncate",
215765
215772
  children: "· Press Ctrl+C again to exit"
215766
215773
  })
215767
215774
  })
@@ -215769,6 +215776,8 @@ var init_input_bar = __esm(async () => {
215769
215776
  }) : /* @__PURE__ */ jsx_runtime8.jsxs(Box_default, {
215770
215777
  width: "100%",
215771
215778
  justifyContent: "space-between",
215779
+ height: 1,
215780
+ overflow: "hidden",
215772
215781
  children: [
215773
215782
  /* @__PURE__ */ jsx_runtime8.jsx(Box_default, {
215774
215783
  gap: 2,
@@ -215780,6 +215789,7 @@ var init_input_bar = __esm(async () => {
215780
215789
  children: [
215781
215790
  /* @__PURE__ */ jsx_runtime8.jsxs(Text3, {
215782
215791
  color: THEME.colors.muted,
215792
+ wrap: "truncate",
215783
215793
  children: [
215784
215794
  activeModeTag ? /* @__PURE__ */ jsx_runtime8.jsxs(Text3, {
215785
215795
  color: THEME.colors.brand,
@@ -215793,6 +215803,7 @@ var init_input_bar = __esm(async () => {
215793
215803
  ]
215794
215804
  }),
215795
215805
  totalTasksCount > 0 && /* @__PURE__ */ jsx_runtime8.jsxs(Text3, {
215806
+ wrap: "truncate",
215796
215807
  color: runningTasksCount > 0 ? THEME.colors.warning : THEME.colors.muted,
215797
215808
  children: [
215798
215809
  "·",
@@ -215819,6 +215830,7 @@ var init_input_bar = __esm(async () => {
215819
215830
  marginLeft: 2,
215820
215831
  children: /* @__PURE__ */ jsx_runtime8.jsx(Text3, {
215821
215832
  color: contextColor,
215833
+ wrap: "truncate",
215822
215834
  children: contextLabel
215823
215835
  })
215824
215836
  })
@@ -215849,7 +215861,7 @@ var init_scroll_viewport = __esm(async () => {
215849
215861
  }, ref) {
215850
215862
  const viewportRef = import_react43.useRef(null);
215851
215863
  const contentRef = import_react43.useRef(null);
215852
- const defaultHeight = explicitHeight ?? (typeof process !== "undefined" && process.stdout?.rows ? Math.max(10, process.stdout.rows - 6) : 24);
215864
+ const defaultHeight = explicitHeight ?? (typeof process !== "undefined" && process.stdout?.rows ? Math.max(1, process.stdout.rows - 6) : 24);
215853
215865
  const [viewportHeight, setViewportHeight] = import_react43.useState(defaultHeight);
215854
215866
  const [contentHeight, setContentHeight] = import_react43.useState(0);
215855
215867
  const [internalScrollTop, setInternalScrollTop] = import_react43.useState(0);
@@ -215923,6 +215935,8 @@ var init_scroll_viewport = __esm(async () => {
215923
215935
  const newTop = Math.max(0, currentTop - delta);
215924
215936
  setIsReadingMode(newTop < currentMax);
215925
215937
  setInternalScrollTop(newTop);
215938
+ stateRef.current.isReadingMode = newTop < currentMax;
215939
+ stateRef.current.internalScrollTop = newTop;
215926
215940
  notifyStateChange(newTop);
215927
215941
  }, [notifyStateChange]);
215928
215942
  const handleScrollDown = import_react43.useCallback((delta) => {
@@ -215932,9 +215946,12 @@ var init_scroll_viewport = __esm(async () => {
215932
215946
  if (newTop >= currentMax) {
215933
215947
  setIsReadingMode(false);
215934
215948
  setInternalScrollTop(currentMax);
215949
+ stateRef.current.isReadingMode = false;
215950
+ stateRef.current.internalScrollTop = currentMax;
215935
215951
  notifyStateChange(currentMax);
215936
215952
  } else {
215937
215953
  setInternalScrollTop(newTop);
215954
+ stateRef.current.internalScrollTop = newTop;
215938
215955
  notifyStateChange(newTop);
215939
215956
  }
215940
215957
  }, [notifyStateChange]);
@@ -215942,12 +215959,16 @@ var init_scroll_viewport = __esm(async () => {
215942
215959
  const currentMax = stateRef.current.maxScrollTop;
215943
215960
  setIsReadingMode(currentMax > 0);
215944
215961
  setInternalScrollTop(0);
215962
+ stateRef.current.isReadingMode = currentMax > 0;
215963
+ stateRef.current.internalScrollTop = 0;
215945
215964
  notifyStateChange(0);
215946
215965
  }, [notifyStateChange]);
215947
215966
  const handleScrollToBottom = import_react43.useCallback(() => {
215948
215967
  const currentMax = stateRef.current.maxScrollTop;
215949
215968
  setIsReadingMode(false);
215950
215969
  setInternalScrollTop(currentMax);
215970
+ stateRef.current.isReadingMode = false;
215971
+ stateRef.current.internalScrollTop = currentMax;
215951
215972
  notifyStateChange(currentMax);
215952
215973
  }, [notifyStateChange]);
215953
215974
  import_react43.default.useImperativeHandle(ref, () => ({
@@ -216002,6 +216023,7 @@ var init_scroll_viewport = __esm(async () => {
216002
216023
  height: explicitHeight,
216003
216024
  flexGrow: 1,
216004
216025
  flexShrink: 1,
216026
+ minHeight: 0,
216005
216027
  overflowY: "hidden",
216006
216028
  flexDirection: "column",
216007
216029
  width: "100%",
@@ -216097,7 +216119,10 @@ var import_react44, jsx_runtime10, DiffGutterView;
216097
216119
  var init_diff_gutter = __esm(async () => {
216098
216120
  init_theme();
216099
216121
  init_terminal_link();
216100
- await init_build2();
216122
+ await __promiseAll([
216123
+ init_build2(),
216124
+ init_use_terminal_columns()
216125
+ ]);
216101
216126
  import_react44 = __toESM(require_react(), 1);
216102
216127
  jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
216103
216128
  DiffGutterView = import_react44.default.memo(function DiffGutterView({
@@ -216116,8 +216141,12 @@ var init_diff_gutter = __esm(async () => {
216116
216141
  const isTruncated = isExpanded && parsedLines.length > maxVisibleLines;
216117
216142
  const maxLineNum = Math.max(...parsedLines.map((l) => Math.max(l.oldLineNumber || 0, l.newLineNumber || 0)), 1);
216118
216143
  const gutterWidth = Math.max(2, String(maxLineNum).length);
216119
- const displayPath = filePath ? filePath.replace(/^\.\//, "") : "";
216120
- const linkedPath = displayPath ? fileLink(displayPath, displayPath, startLine) : "";
216144
+ const columns = useTerminalColumns();
216145
+ const maxPathLen = Math.max(30, columns - 45);
216146
+ const cleanPath = filePath ? filePath.replace(/^\.\//, "") : "";
216147
+ const displayPath = cleanPath ? toRelativePath(cleanPath) : "";
216148
+ const truncatedDisplay = displayPath.length > maxPathLen ? displayPath.substring(0, maxPathLen - 3) + "..." : displayPath;
216149
+ const linkedPath = displayPath ? fileLink(truncatedDisplay, filePath || displayPath, startLine) : "";
216121
216150
  return /* @__PURE__ */ jsx_runtime10.jsxs(Box_default, {
216122
216151
  flexDirection: "column",
216123
216152
  marginY: 0,
@@ -216127,14 +216156,18 @@ var init_diff_gutter = __esm(async () => {
216127
216156
  gap: 1,
216128
216157
  alignItems: "center",
216129
216158
  children: [
216130
- /* @__PURE__ */ jsx_runtime10.jsx(Text3, {
216131
- color: THEME.colors.warning,
216132
- children: `${THEME.glyphs.status} `
216133
- }),
216134
- /* @__PURE__ */ jsx_runtime10.jsx(Text3, {
216135
- color: THEME.colors.warning,
216136
- bold: true,
216137
- children: actionLabel
216159
+ /* @__PURE__ */ jsx_runtime10.jsxs(Text3, {
216160
+ children: [
216161
+ /* @__PURE__ */ jsx_runtime10.jsx(Text3, {
216162
+ color: THEME.colors.warning,
216163
+ children: `${THEME.glyphs.status} `
216164
+ }),
216165
+ /* @__PURE__ */ jsx_runtime10.jsx(Text3, {
216166
+ color: THEME.colors.warning,
216167
+ bold: true,
216168
+ children: actionLabel
216169
+ })
216170
+ ]
216138
216171
  }),
216139
216172
  displayPath && /* @__PURE__ */ jsx_runtime10.jsx(Text3, {
216140
216173
  color: THEME.colors.text,
@@ -216161,6 +216194,7 @@ var init_diff_gutter = __esm(async () => {
216161
216194
  }),
216162
216195
  /* @__PURE__ */ jsx_runtime10.jsxs(Text3, {
216163
216196
  color: THEME.colors.muted,
216197
+ wrap: "truncate",
216164
216198
  children: [
216165
216199
  "(",
216166
216200
  isExpanded ? "ctrl+o to collapse" : "ctrl+o to view",
@@ -261585,17 +261619,19 @@ function CollapsibleThought({
261585
261619
  });
261586
261620
  }
261587
261621
  function StyledCommand({ command, truncate = true }) {
261622
+ const columns = useTerminalColumns();
261623
+ const maxArgLength = Math.max(40, columns - 38);
261588
261624
  const match = command.match(/^([A-Za-z_]+)\(([\s\S]*)\)$/);
261589
261625
  if (match) {
261590
261626
  const args = (match[2] || "").replace(/\r?\n/g, " ");
261591
261627
  const toolName = match[1];
261592
261628
  let displayArgs = args;
261593
- if (truncate && displayArgs.length > 80) {
261594
- displayArgs = displayArgs.substring(0, 80) + "...";
261595
- }
261596
261629
  if ((toolName === "read_file" || toolName === "view_file" || toolName === "Read") && args && !args.includes(" ")) {
261597
- const rel = toRelativePath(displayArgs);
261598
- displayArgs = fileLink(rel, args);
261630
+ const rel = toRelativePath(args);
261631
+ const truncatedRel = truncate && rel.length > maxArgLength ? rel.substring(0, maxArgLength - 3) + "..." : rel;
261632
+ displayArgs = fileLink(truncatedRel, args);
261633
+ } else if (truncate && displayArgs.length > maxArgLength) {
261634
+ displayArgs = displayArgs.substring(0, maxArgLength - 3) + "...";
261599
261635
  }
261600
261636
  const cmdColor = THEME.colors.warning;
261601
261637
  return /* @__PURE__ */ jsx_runtime17.jsxs(Text3, {
@@ -261621,8 +261657,8 @@ function StyledCommand({ command, truncate = true }) {
261621
261657
  });
261622
261658
  }
261623
261659
  let displayCmd = command.replace(/\r?\n/g, " ");
261624
- if (truncate && displayCmd.length > 80) {
261625
- displayCmd = displayCmd.substring(0, 80) + "...";
261660
+ if (truncate && displayCmd.length > maxArgLength) {
261661
+ displayCmd = displayCmd.substring(0, maxArgLength - 3) + "...";
261626
261662
  }
261627
261663
  return /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261628
261664
  color: THEME.colors.text,
@@ -261633,17 +261669,19 @@ function StyledRunningCommand({
261633
261669
  command,
261634
261670
  truncate = true
261635
261671
  }) {
261672
+ const columns = useTerminalColumns();
261673
+ const maxArgLength = Math.max(40, columns - 38);
261636
261674
  const match = command.match(/^([A-Za-z_]+)\(([\s\S]*)\)$/);
261637
261675
  if (match) {
261638
261676
  const args = (match[2] || "").replace(/\r?\n/g, " ");
261639
261677
  const toolName = match[1];
261640
261678
  let displayArgs = args;
261641
- if (truncate && displayArgs.length > 80) {
261642
- displayArgs = displayArgs.substring(0, 80) + "...";
261643
- }
261644
261679
  if ((toolName === "read_file" || toolName === "view_file" || toolName === "Read") && args && !args.includes(" ")) {
261645
- const rel = toRelativePath(displayArgs);
261646
- displayArgs = fileLink(rel, args);
261680
+ const rel = toRelativePath(args);
261681
+ const truncatedRel = truncate && rel.length > maxArgLength ? rel.substring(0, maxArgLength - 3) + "..." : rel;
261682
+ displayArgs = fileLink(truncatedRel, args);
261683
+ } else if (truncate && displayArgs.length > maxArgLength) {
261684
+ displayArgs = displayArgs.substring(0, maxArgLength - 3) + "...";
261647
261685
  }
261648
261686
  const cmdColor = THEME.colors.warning;
261649
261687
  return /* @__PURE__ */ jsx_runtime17.jsxs(Text3, {
@@ -261665,8 +261703,8 @@ function StyledRunningCommand({
261665
261703
  });
261666
261704
  }
261667
261705
  let displayCmd = command.replace(/\r?\n/g, " ");
261668
- if (truncate && displayCmd.length > 80) {
261669
- displayCmd = displayCmd.substring(0, 80) + "...";
261706
+ if (truncate && displayCmd.length > maxArgLength) {
261707
+ displayCmd = displayCmd.substring(0, maxArgLength - 3) + "...";
261670
261708
  }
261671
261709
  return /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261672
261710
  color: THEME.colors.text,
@@ -261696,6 +261734,7 @@ function CollapsibleCommandOutput({
261696
261734
  }),
261697
261735
  lines.length > 0 && /* @__PURE__ */ jsx_runtime17.jsxs(Text3, {
261698
261736
  color: THEME.colors.muted,
261737
+ wrap: "truncate",
261699
261738
  children: [
261700
261739
  "(",
261701
261740
  isExpanded ? "ctrl+o to collapse" : "ctrl+o to expand",
@@ -261762,22 +261801,56 @@ function getReadBlockPath(block) {
261762
261801
  const rel = toRelativePath(rawPath);
261763
261802
  return { display: rel || rawPath, target: rawPath };
261764
261803
  }
261804
+ function formatConsolidatedReadArgs(paths, maxArgLength) {
261805
+ const count = paths.length;
261806
+ if (count === 0)
261807
+ return "";
261808
+ if (count === 1) {
261809
+ const p0 = paths[0];
261810
+ const label = p0.display.length > maxArgLength ? p0.display.substring(0, Math.max(10, maxArgLength - 3)) + "..." : p0.display;
261811
+ return fileLink(label, p0.target);
261812
+ }
261813
+ if (count === 2) {
261814
+ const p0 = paths[0];
261815
+ const p1 = paths[1];
261816
+ if (p0.display.length + 2 + p1.display.length <= maxArgLength) {
261817
+ return `${fileLink(p0.display, p0.target)}, ${fileLink(p1.display, p1.target)}`;
261818
+ }
261819
+ const remainingForP1 = maxArgLength - (p0.display.length + 2);
261820
+ if (remainingForP1 >= 8) {
261821
+ const truncatedP1 = p1.display.substring(0, remainingForP1 - 3) + "...";
261822
+ return `${fileLink(p0.display, p0.target)}, ${fileLink(truncatedP1, p1.target)}`;
261823
+ }
261824
+ const truncatedP0 = p0.display.length > maxArgLength - 6 ? p0.display.substring(0, Math.max(10, maxArgLength - 9)) + "..." : p0.display;
261825
+ return `${fileLink(truncatedP0, p0.target)}, ...`;
261826
+ }
261827
+ const p0 = paths[0];
261828
+ const p1 = paths[1];
261829
+ const suffixTwo = `, +${count - 2} more`;
261830
+ if (p0.display.length + 2 + p1.display.length + suffixTwo.length <= maxArgLength) {
261831
+ return `${fileLink(p0.display, p0.target)}, ${fileLink(p1.display, p1.target)}${suffixTwo}`;
261832
+ }
261833
+ const remainingForP1 = maxArgLength - (p0.display.length + 2 + suffixTwo.length);
261834
+ if (remainingForP1 >= 8) {
261835
+ const truncatedP1 = p1.display.substring(0, remainingForP1 - 3) + "...";
261836
+ return `${fileLink(p0.display, p0.target)}, ${fileLink(truncatedP1, p1.target)}${suffixTwo}`;
261837
+ }
261838
+ const suffixOne = `, +${count - 1} more`;
261839
+ const remainingForP0 = maxArgLength - suffixOne.length;
261840
+ const label0 = p0.display.length > remainingForP0 ? p0.display.substring(0, Math.max(10, remainingForP0 - 3)) + "..." : p0.display;
261841
+ return `${fileLink(label0, p0.target)}${suffixOne}`;
261842
+ }
261765
261843
  function ConsolidatedReadsView({
261766
261844
  blocks,
261767
261845
  forceExpanded,
261768
261846
  isLastBlock
261769
261847
  }) {
261770
261848
  const isExpanded = forceExpanded ?? false;
261849
+ const columns = useTerminalColumns();
261850
+ const maxArgLength = Math.max(40, columns - 38);
261771
261851
  const paths = blocks.map(getReadBlockPath);
261772
261852
  const count = paths.length;
261773
- let inlineArgs = "";
261774
- if (count === 2) {
261775
- inlineArgs = `${fileLink(paths[0].display, paths[0].target)}, ${fileLink(paths[1].display, paths[1].target)}`;
261776
- } else if (count > 2) {
261777
- inlineArgs = `${fileLink(paths[0].display, paths[0].target)}, ${fileLink(paths[1].display, paths[1].target)}, +${count - 2} more`;
261778
- } else if (count === 1) {
261779
- inlineArgs = fileLink(paths[0].display, paths[0].target);
261780
- }
261853
+ const inlineArgs = formatConsolidatedReadArgs(paths, maxArgLength);
261781
261854
  const cmdColor = THEME.colors.warning;
261782
261855
  const isRunning = blocks.some((b) => b.status === "running");
261783
261856
  if (isRunning) {
@@ -261822,11 +261895,19 @@ function ConsolidatedReadsView({
261822
261895
  alignItems: "center",
261823
261896
  gap: 1,
261824
261897
  children: [
261825
- fileRunning ? /* @__PURE__ */ jsx_runtime17.jsx(Spinner2, {}) : /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261826
- color: cmdColor,
261827
- children: `${THEME.glyphs.status} `
261898
+ fileRunning ? /* @__PURE__ */ jsx_runtime17.jsx(Spinner2, {}) : /* @__PURE__ */ jsx_runtime17.jsxs(Text3, {
261899
+ children: [
261900
+ /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261901
+ color: cmdColor,
261902
+ children: `${THEME.glyphs.status} `
261903
+ }),
261904
+ /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261905
+ color: THEME.colors.muted,
261906
+ children: fileLink(p.display, p.target)
261907
+ })
261908
+ ]
261828
261909
  }),
261829
- /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261910
+ fileRunning && /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
261830
261911
  color: THEME.colors.muted,
261831
261912
  children: fileLink(p.display, p.target)
261832
261913
  })
@@ -261868,6 +261949,7 @@ function ConsolidatedReadsView({
261868
261949
  }),
261869
261950
  /* @__PURE__ */ jsx_runtime17.jsxs(Text3, {
261870
261951
  color: THEME.colors.muted,
261952
+ wrap: "truncate",
261871
261953
  children: [
261872
261954
  "(",
261873
261955
  isExpanded ? "ctrl+o to collapse" : "ctrl+o to expand",
@@ -261951,6 +262033,7 @@ var init_bot_message = __esm(async () => {
261951
262033
  init_terminal_link();
261952
262034
  await __promiseAll([
261953
262035
  init_build2(),
262036
+ init_use_terminal_columns(),
261954
262037
  init_diff_gutter(),
261955
262038
  init_inline_tip(),
261956
262039
  init_spinner(),
@@ -262300,14 +262383,18 @@ ${r}`;
262300
262383
  gap: 1,
262301
262384
  alignItems: "center",
262302
262385
  children: [
262303
- /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
262304
- color: THEME.colors.warning,
262305
- children: `${THEME.glyphs.status} `
262306
- }),
262307
- /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
262308
- color: THEME.colors.warning,
262309
- bold: true,
262310
- children: actionLabel
262386
+ /* @__PURE__ */ jsx_runtime17.jsxs(Text3, {
262387
+ children: [
262388
+ /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
262389
+ color: THEME.colors.warning,
262390
+ children: `${THEME.glyphs.status} `
262391
+ }),
262392
+ /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
262393
+ color: THEME.colors.warning,
262394
+ bold: true,
262395
+ children: actionLabel
262396
+ })
262397
+ ]
262311
262398
  }),
262312
262399
  /* @__PURE__ */ jsx_runtime17.jsx(Text3, {
262313
262400
  color: THEME.colors.muted,
@@ -262644,7 +262731,7 @@ var init_message_list = __esm(async () => {
262644
262731
  items: staticMessages,
262645
262732
  style: { width: "100%" },
262646
262733
  children: (msg, index) => renderSingleMessage(msg, index, staticMessages, cliVersion, latestVersion, userEmail, expandCommands, announcement)
262647
- }, `${staticKey}-${expandCommands}`),
262734
+ }, staticKey),
262648
262735
  activeMessages.map((msg, index) => renderSingleMessage(msg, staticMessages.length + index, [...staticMessages, ...activeMessages], cliVersion, latestVersion, userEmail, expandCommands, announcement))
262649
262736
  ]
262650
262737
  });
@@ -267823,6 +267910,19 @@ function ChatApp({
267823
267910
  }
267824
267911
  };
267825
267912
  }, []);
267913
+ import_react69.useEffect(() => {
267914
+ if (!process.stdout?.isTTY || isInline)
267915
+ return;
267916
+ const handleResize = () => {
267917
+ try {
267918
+ process.stdout.write("\x1B[2J\x1B[H");
267919
+ } catch {}
267920
+ };
267921
+ process.stdout.on("resize", handleResize);
267922
+ return () => {
267923
+ process.stdout.off("resize", handleResize);
267924
+ };
267925
+ }, [isInline]);
267826
267926
  use_input_default((input, key) => {
267827
267927
  if (key.ctrl && input === "c") {
267828
267928
  handleInterrupt();
@@ -271290,7 +271390,6 @@ ${formatSubscriptionCard(bundle, targetModel)}`
271290
271390
  try {
271291
271391
  await agent.loadContext(item.value);
271292
271392
  const resumedMessages = convertAgentMessagesToTuiMessages(agent.messages);
271293
- console.clear();
271294
271393
  setStaticMessages([{ id: "header", role: "header" }, ...resumedMessages]);
271295
271394
  setStaticKey((k) => k + 1);
271296
271395
  setActiveMessages([]);
@@ -271683,7 +271782,6 @@ function useAgentSession({
271683
271782
  } = state;
271684
271783
  const [expandCommands, setExpandCommands] = import_react71.useState(false);
271685
271784
  const toggleExpandCommands = import_react71.useCallback(() => {
271686
- console.clear();
271687
271785
  setExpandCommands((prev) => !prev);
271688
271786
  }, []);
271689
271787
  const [detectedSubscriptions, setDetectedSubscriptions] = import_react71.useState({});
@@ -271728,7 +271826,6 @@ function useAgentSession({
271728
271826
  }
271729
271827
  const resumed = convertAgentMessagesToTuiMessages(agent.messages);
271730
271828
  if (resumed.length > 0) {
271731
- console.clear();
271732
271829
  setStaticMessages([{ id: "header", role: "header" }, ...resumed]);
271733
271830
  setStaticKey((k) => k + 1);
271734
271831
  }
@@ -273834,12 +273931,12 @@ Options:
273834
273931
  }
273835
273932
  // src/constants/release-highlights.json
273836
273933
  var release_highlights_default = {
273837
- version: "0.4.2",
273838
- title: "What's New in v0.4.2",
273934
+ version: "0.4.3",
273935
+ title: "What's New in v0.4.3",
273839
273936
  bullets: [
273840
- "*(tui)* Enable mouse wheel, pageup/down, and arrow scrolling",
273841
- "*(docs)* Add youtube and x social links to footer and creator navigation schema",
273842
- "*(tui)* Remove empty line between tool calls and active loader"
273937
+ "Remove search mode and add prompt focus text animation",
273938
+ "*(tui)* Eagerly update scroll state ref to support rapid mouse wheel scroll events",
273939
+ "*(tui)* Prevent layout overflow and ghosting on terminal resize and small heights"
273843
273940
  ],
273844
273941
  url: "https://trydecember.com/docs/changelog"
273845
273942
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trydecember/cli",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "a coding agent for terminal and cloud.",
5
5
  "homepage": "https://trydecember.com",
6
6
  "repository": {