@thegitai/cli 1.9.0 → 1.10.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.
@@ -1749,7 +1749,15 @@ export async function runClientInteractive({ appendPromptHistory, authConfig, de
1749
1749
  syncTerminalTitle();
1750
1750
  syncAttention();
1751
1751
  const elapsedSeconds = busyElapsedSeconds(state, Date.now());
1752
- bridge.render(buildTuiFrame(state, terminalCols, terminalRows, spinnerFrame, elapsedSeconds, Date.now()));
1752
+ const frame = buildTuiFrame(state, terminalCols, terminalRows, spinnerFrame, elapsedSeconds, Date.now());
1753
+ if (frame.transcriptScrollOffset < state.transcriptScrollOffset) {
1754
+ store.update((current) => ({
1755
+ ...current,
1756
+ transcriptScrollOffset: frame.transcriptScrollOffset,
1757
+ }));
1758
+ return;
1759
+ }
1760
+ bridge.render(frame);
1753
1761
  };
1754
1762
  const remountTui = async () => {
1755
1763
  if (remountPromise) {
@@ -1633,6 +1633,15 @@ function sliceTranscriptLines(lines, maxLines, scrollOffset) {
1633
1633
  const start = Math.max(0, lines.length - maxLines - offset);
1634
1634
  return lines.slice(start, start + maxLines);
1635
1635
  }
1636
+ const BACK_TO_BOTTOM_LABEL = '↓ Back to Bottom (Ctrl + End)';
1637
+ function backToBottomLines(width) {
1638
+ const label = fitLine(BACK_TO_BOTTOM_LABEL, width);
1639
+ const pad = Math.max(0, Math.floor((width - displayWidth(label)) / 2));
1640
+ return [
1641
+ line(span(' '.repeat(pad)), span(label, { color: 'cyan', bold: true })),
1642
+ plainLine(''),
1643
+ ];
1644
+ }
1636
1645
  export function buildTuiFrame(state, cols, rows, spinnerFrame, elapsedSeconds, nowMs = 0) {
1637
1646
  const contentWidth = frameContentWidth(cols);
1638
1647
  const gutter = Math.max(Math.floor((cols - contentWidth) / 2), 0);
@@ -1721,13 +1730,26 @@ export function buildTuiFrame(state, cols, rows, spinnerFrame, elapsedSeconds, n
1721
1730
  }
1722
1731
  const reservedLines = countSectionLines(sections.filter((section) => section.kind !== 'transcript'));
1723
1732
  const composerGap = sections.some((section) => section.kind === 'composer') ? 1 : 0;
1724
- const transcriptBudget = Math.max(1, rows - reservedLines - composerGap - 1);
1733
+ let transcriptBudget = Math.max(1, rows - reservedLines - composerGap - 1);
1725
1734
  let transcriptScrollLimit = Math.max(0, transcriptLines.length - transcriptBudget);
1726
1735
  if (transcriptScrollLimit > 0 && contentWidth > 2) {
1727
1736
  transcriptLines = buildTranscriptLines(contentWidth - 2);
1728
1737
  transcriptScrollLimit = Math.max(0, transcriptLines.length - transcriptBudget);
1729
1738
  }
1730
- const transcriptScrollOffset = Math.min(Math.max(state.transcriptScrollOffset, 0), transcriptScrollLimit);
1739
+ let transcriptScrollOffset = Math.min(Math.max(state.transcriptScrollOffset, 0), transcriptScrollLimit);
1740
+ if (transcriptScrollOffset > 0 && transcriptBudget > 1) {
1741
+ transcriptBudget -= 1;
1742
+ transcriptScrollLimit += 1;
1743
+ transcriptScrollOffset = Math.min(state.transcriptScrollOffset, transcriptScrollLimit);
1744
+ const pill = backToBottomLines(contentWidth > 2 ? contentWidth - 2 : contentWidth);
1745
+ const liveIndex = sections.findIndex((section) => section.kind === 'live');
1746
+ if (liveIndex >= 0) {
1747
+ sections[liveIndex] = { ...sections[liveIndex], lines: [...pill, ...sections[liveIndex].lines] };
1748
+ }
1749
+ else {
1750
+ sections.unshift({ kind: 'live', lines: pill });
1751
+ }
1752
+ }
1731
1753
  sections.unshift({
1732
1754
  kind: 'transcript',
1733
1755
  lines: sliceTranscriptLines(transcriptLines, transcriptBudget, transcriptScrollOffset),
@@ -277,6 +277,10 @@ export function handleShellKeyEvent(store, handlers, event) {
277
277
  handlers.onRequestExit();
278
278
  return;
279
279
  }
280
+ if (key.ctrl && key.end && state.transcriptScrollOffset > 0) {
281
+ scrollTranscriptTo(store, handlers, 0);
282
+ return;
283
+ }
280
284
  if (state.userInputPrompt &&
281
285
  applyUserInputPromptEvent(store, handlers, key)) {
282
286
  return;
@@ -56,6 +56,7 @@ export function buildShortcutGroups(platform = process.platform, shortcuts = {})
56
56
  title: 'Transcript',
57
57
  rows: [
58
58
  { keys: 'PageUp / PageDown', description: 'Scroll - the mouse wheel works too' },
59
+ { keys: 'Ctrl+End', description: 'Back to bottom' },
59
60
  { keys: 'Drag', description: 'Select and copy' },
60
61
  { keys: 'Double-click', description: 'Copy a word' },
61
62
  { keys: 'Triple-click', description: 'Copy a whole row' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegitai/cli",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "TheGitAI is an AI coding agent. It reads and searches your repository, writes and edits files, runs your tests, verifies the change before handing it back, uses the apps on your computer, and remembers your corrections between sessions. Talk to it with voice dictation, and customize its keyboard shortcuts in your editor.",
5
5
  "keywords": [
6
6
  "agentic-ai",
@@ -50,11 +50,11 @@
50
50
  "@lydell/node-pty-linux-x64": "1.1.0",
51
51
  "@lydell/node-pty-win32-arm64": "1.1.0",
52
52
  "@lydell/node-pty-win32-x64": "1.1.0",
53
- "@thegitai/tui-darwin-arm64": "1.9.0",
54
- "@thegitai/tui-darwin-x64": "1.9.0",
55
- "@thegitai/tui-linux-arm64": "1.9.0",
56
- "@thegitai/tui-linux-x64": "1.9.0",
57
- "@thegitai/tui-win32-x64": "1.9.0",
53
+ "@thegitai/tui-darwin-arm64": "1.10.0",
54
+ "@thegitai/tui-darwin-x64": "1.10.0",
55
+ "@thegitai/tui-linux-arm64": "1.10.0",
56
+ "@thegitai/tui-linux-x64": "1.10.0",
57
+ "@thegitai/tui-win32-x64": "1.10.0",
58
58
  "@vscode/ripgrep": "1.18.0"
59
59
  },
60
60
  "repository": {