@kenkaiiii/ggcoder 4.3.198 → 4.3.200

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 (101) hide show
  1. package/dist/core/settings-manager.d.ts +0 -1
  2. package/dist/core/settings-manager.d.ts.map +1 -1
  3. package/dist/core/settings-manager.js +0 -2
  4. package/dist/core/settings-manager.js.map +1 -1
  5. package/dist/ui/App.d.ts +0 -1
  6. package/dist/ui/App.d.ts.map +1 -1
  7. package/dist/ui/App.js +2 -2
  8. package/dist/ui/App.js.map +1 -1
  9. package/dist/ui/components/ActivityIndicator.d.ts +5 -0
  10. package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
  11. package/dist/ui/components/ActivityIndicator.js +23 -13
  12. package/dist/ui/components/ActivityIndicator.js.map +1 -1
  13. package/dist/ui/components/ActivityIndicator.test.d.ts +2 -0
  14. package/dist/ui/components/ActivityIndicator.test.d.ts.map +1 -0
  15. package/dist/ui/components/ActivityIndicator.test.js +40 -0
  16. package/dist/ui/components/ActivityIndicator.test.js.map +1 -0
  17. package/dist/ui/components/AssistantMessage.js +1 -1
  18. package/dist/ui/components/AssistantMessage.js.map +1 -1
  19. package/dist/ui/components/StreamingArea.js +1 -1
  20. package/dist/ui/components/StreamingArea.js.map +1 -1
  21. package/dist/ui/components/index.d.ts +0 -1
  22. package/dist/ui/components/index.d.ts.map +1 -1
  23. package/dist/ui/components/index.js +0 -1
  24. package/dist/ui/components/index.js.map +1 -1
  25. package/dist/ui/render.d.ts +0 -1
  26. package/dist/ui/render.d.ts.map +1 -1
  27. package/dist/ui/render.js +0 -1
  28. package/dist/ui/render.js.map +1 -1
  29. package/package.json +6 -5
  30. package/dist/core/bridge-client.d.ts +0 -31
  31. package/dist/core/bridge-client.d.ts.map +0 -1
  32. package/dist/core/bridge-client.js +0 -124
  33. package/dist/core/bridge-client.js.map +0 -1
  34. package/dist/core/bridge-config.d.ts +0 -8
  35. package/dist/core/bridge-config.d.ts.map +0 -1
  36. package/dist/core/bridge-config.js +0 -52
  37. package/dist/core/bridge-config.js.map +0 -1
  38. package/dist/core/bridge-protocol.d.ts +0 -76
  39. package/dist/core/bridge-protocol.d.ts.map +0 -1
  40. package/dist/core/bridge-protocol.js +0 -30
  41. package/dist/core/bridge-protocol.js.map +0 -1
  42. package/dist/core/oauth/gemini.d.ts +0 -4
  43. package/dist/core/oauth/gemini.d.ts.map +0 -1
  44. package/dist/core/oauth/gemini.js +0 -293
  45. package/dist/core/oauth/gemini.js.map +0 -1
  46. package/dist/core/socket-server.d.ts +0 -15
  47. package/dist/core/socket-server.d.ts.map +0 -1
  48. package/dist/core/socket-server.js +0 -140
  49. package/dist/core/socket-server.js.map +0 -1
  50. package/dist/modes/bridge-mode.d.ts +0 -22
  51. package/dist/modes/bridge-mode.d.ts.map +0 -1
  52. package/dist/modes/bridge-mode.js +0 -281
  53. package/dist/modes/bridge-mode.js.map +0 -1
  54. package/dist/ui/buddy/Buddy.d.ts +0 -15
  55. package/dist/ui/buddy/Buddy.d.ts.map +0 -1
  56. package/dist/ui/buddy/Buddy.js +0 -118
  57. package/dist/ui/buddy/Buddy.js.map +0 -1
  58. package/dist/ui/buddy/gacha.d.ts +0 -8
  59. package/dist/ui/buddy/gacha.d.ts.map +0 -1
  60. package/dist/ui/buddy/gacha.js +0 -94
  61. package/dist/ui/buddy/gacha.js.map +0 -1
  62. package/dist/ui/buddy/species.d.ts +0 -52
  63. package/dist/ui/buddy/species.d.ts.map +0 -1
  64. package/dist/ui/buddy/species.js +0 -257
  65. package/dist/ui/buddy/species.js.map +0 -1
  66. package/dist/ui/components/ScrollableContent.d.ts +0 -22
  67. package/dist/ui/components/ScrollableContent.d.ts.map +0 -1
  68. package/dist/ui/components/ScrollableContent.js +0 -44
  69. package/dist/ui/components/ScrollableContent.js.map +0 -1
  70. package/dist/ui/components/ShimmerLine.d.ts +0 -6
  71. package/dist/ui/components/ShimmerLine.d.ts.map +0 -1
  72. package/dist/ui/components/ShimmerLine.js +0 -46
  73. package/dist/ui/components/ShimmerLine.js.map +0 -1
  74. package/dist/ui/components/SplashScreen.d.ts +0 -7
  75. package/dist/ui/components/SplashScreen.d.ts.map +0 -1
  76. package/dist/ui/components/SplashScreen.js +0 -113
  77. package/dist/ui/components/SplashScreen.js.map +0 -1
  78. package/dist/ui/components/ThinkingIndicator.d.ts +0 -6
  79. package/dist/ui/components/ThinkingIndicator.d.ts.map +0 -1
  80. package/dist/ui/components/ThinkingIndicator.js +0 -145
  81. package/dist/ui/components/ThinkingIndicator.js.map +0 -1
  82. package/dist/ui/hooks/useMouseScroll.d.ts.map +0 -1
  83. package/dist/ui/hooks/useMouseScroll.js.map +0 -1
  84. package/dist/ui/hooks/useScrollViewport.d.ts +0 -25
  85. package/dist/ui/hooks/useScrollViewport.d.ts.map +0 -1
  86. package/dist/ui/hooks/useScrollViewport.js +0 -32
  87. package/dist/ui/hooks/useScrollViewport.js.map +0 -1
  88. package/dist/ui/utils/item-heights.d.ts +0 -17
  89. package/dist/ui/utils/item-heights.d.ts.map +0 -1
  90. package/dist/ui/utils/item-heights.js +0 -73
  91. package/dist/ui/utils/item-heights.js.map +0 -1
  92. package/dist/ui/utils/scroll-pause.d.ts +0 -13
  93. package/dist/ui/utils/scroll-pause.d.ts.map +0 -1
  94. package/dist/ui/utils/sync-output.d.ts +0 -16
  95. package/dist/ui/utils/sync-output.d.ts.map +0 -1
  96. package/dist/ui/utils/sync-output.js +0 -70
  97. package/dist/ui/utils/sync-output.js.map +0 -1
  98. package/dist/utils/markdown.d.ts +0 -6
  99. package/dist/utils/markdown.d.ts.map +0 -1
  100. package/dist/utils/markdown.js +0 -25
  101. package/dist/utils/markdown.js.map +0 -1
@@ -1,145 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import React, { useMemo } from "react";
3
- import { Text, Box } from "ink";
4
- import { useTheme } from "../theme/theme.js";
5
- import { SPINNER_FRAMES, SPINNER_INTERVAL } from "../spinner-frames.js";
6
- import { useAnimationTick, useAnimationActive, deriveFrame } from "./AnimationContext.js";
7
- // ── Color pulse cycle ─────────────────────────────────────
8
- const PULSE_COLORS = [
9
- "#60a5fa", // blue
10
- "#818cf8", // indigo
11
- "#a78bfa", // violet
12
- "#818cf8", // indigo (back)
13
- "#60a5fa", // blue (back)
14
- "#38bdf8", // sky
15
- "#60a5fa", // blue (back)
16
- ];
17
- const PULSE_INTERVAL = 400;
18
- // ── Ellipsis animation ────────────────────────────────────
19
- const ELLIPSIS_FRAMES = ["", ".", "..", "..."];
20
- const ELLIPSIS_INTERVAL = 500;
21
- // ── Phrase rotation ───────────────────────────────────────
22
- const PHRASE_INTERVAL = 3000;
23
- const CONTEXTUAL_PHRASES = [
24
- {
25
- keywords: /\b(bug|fix|error|issue|broken|crash|fail|wrong)\b/i,
26
- phrases: [
27
- "Investigating",
28
- "Diagnosing",
29
- "Tracing the issue",
30
- "Hunting the bug",
31
- "Analyzing the problem",
32
- "Narrowing it down",
33
- ],
34
- },
35
- {
36
- keywords: /\b(refactor|clean|improve|optimize|simplify|restructure)\b/i,
37
- phrases: [
38
- "Studying the code",
39
- "Planning improvements",
40
- "Mapping dependencies",
41
- "Finding patterns",
42
- "Designing the approach",
43
- ],
44
- },
45
- {
46
- keywords: /\b(test|spec|coverage|assert|expect|describe|it\()\b/i,
47
- phrases: [
48
- "Designing tests",
49
- "Thinking about edge cases",
50
- "Planning test coverage",
51
- "Considering scenarios",
52
- ],
53
- },
54
- {
55
- keywords: /\b(build|deploy|ci|cd|pipeline|docker|config)\b/i,
56
- phrases: [
57
- "Checking the config",
58
- "Analyzing the pipeline",
59
- "Working through setup",
60
- "Reviewing the build",
61
- ],
62
- },
63
- {
64
- keywords: /\b(style|css|ui|layout|design|color|theme|display|render)\b/i,
65
- phrases: [
66
- "Visualizing the layout",
67
- "Crafting the design",
68
- "Considering the aesthetics",
69
- "Sketching it out",
70
- "Polishing the pixels",
71
- ],
72
- },
73
- {
74
- keywords: /\b(add|create|new|implement|feature|make|build)\b/i,
75
- phrases: [
76
- "Architecting",
77
- "Drafting the approach",
78
- "Planning the implementation",
79
- "Mapping it out",
80
- "Designing the solution",
81
- ],
82
- },
83
- {
84
- keywords: /\b(explain|how|why|what|understand|describe)\b/i,
85
- phrases: [
86
- "Reading through the code",
87
- "Connecting the dots",
88
- "Building understanding",
89
- "Tracing the logic",
90
- "Piecing it together",
91
- ],
92
- },
93
- ];
94
- const GENERAL_PHRASES = [
95
- "Thinking",
96
- "Reasoning",
97
- "Processing",
98
- "Mulling it over",
99
- "Working on it",
100
- "Contemplating",
101
- "Figuring it out",
102
- "Crunching",
103
- "Assembling thoughts",
104
- "Cooking up a plan",
105
- "Brewing ideas",
106
- "Spinning up neurons",
107
- "Loading wisdom",
108
- "Parsing the universe",
109
- "Channeling clarity",
110
- ];
111
- function selectPhrases(userMessage) {
112
- for (const set of CONTEXTUAL_PHRASES) {
113
- if (set.keywords.test(userMessage)) {
114
- return [...set.phrases, ...GENERAL_PHRASES.slice(0, 3)];
115
- }
116
- }
117
- return GENERAL_PHRASES;
118
- }
119
- function shuffleArray(arr) {
120
- const shuffled = [...arr];
121
- for (let i = shuffled.length - 1; i > 0; i--) {
122
- const j = Math.floor(Math.random() * (i + 1));
123
- [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
124
- }
125
- return shuffled;
126
- }
127
- export function ThinkingIndicator({ userMessage = "" }) {
128
- const theme = useTheme();
129
- useAnimationActive();
130
- const tick = useAnimationTick();
131
- // Derive all animation frames from the single global tick
132
- const spinnerFrame = deriveFrame(tick, SPINNER_INTERVAL, SPINNER_FRAMES.length);
133
- const colorFrame = deriveFrame(tick, PULSE_INTERVAL, PULSE_COLORS.length);
134
- const ellipsisFrame = deriveFrame(tick, ELLIPSIS_INTERVAL, ELLIPSIS_FRAMES.length);
135
- // Phrase rotation — pick phrases based on user message, shuffle, rotate
136
- const phrases = useMemo(() => shuffleArray(selectPhrases(userMessage)), [userMessage]);
137
- const phraseIndex = deriveFrame(tick, PHRASE_INTERVAL, phrases.length);
138
- const spinnerColor = PULSE_COLORS[colorFrame];
139
- const phrase = phrases[phraseIndex];
140
- const ellipsis = ELLIPSIS_FRAMES[ellipsisFrame];
141
- // Pad ellipsis to prevent text from shifting
142
- const paddedEllipsis = ellipsis + " ".repeat(3 - ellipsis.length);
143
- return (_jsxs(Box, { children: [_jsxs(Text, { color: spinnerColor, bold: true, children: [SPINNER_FRAMES[spinnerFrame], " "] }), _jsx(Text, { color: spinnerColor, bold: true, children: phrase }), _jsx(Text, { color: theme.textDim, children: paddedEllipsis })] }));
144
- }
145
- //# sourceMappingURL=ThinkingIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThinkingIndicator.js","sourceRoot":"","sources":["../../../src/ui/components/ThinkingIndicator.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE1F,6DAA6D;AAE7D,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,gBAAgB;IAC3B,SAAS,EAAE,cAAc;IACzB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,cAAc;CAC1B,CAAC;AACF,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,6DAA6D;AAE7D,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAC/C,MAAM,iBAAiB,GAAG,GAAG,CA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CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,25 +0,0 @@
1
- interface UseScrollViewportOptions {
2
- /** Total height of all content in lines */
3
- totalContentHeight: number;
4
- /** Visible viewport height in lines */
5
- viewportHeight: number;
6
- }
7
- export interface ScrollViewport {
8
- /** Lines from bottom (0 = at bottom / auto-scroll) */
9
- scrollOffset: number;
10
- /** Whether viewport is at the bottom (auto-scroll active) */
11
- isAtBottom: boolean;
12
- /** Scroll up by N lines */
13
- scrollUp: (lines: number) => void;
14
- /** Scroll down (toward bottom) by N lines */
15
- scrollDown: (lines: number) => void;
16
- /** Jump to the bottom */
17
- scrollToBottom: () => void;
18
- /** Jump to the top */
19
- scrollToTop: () => void;
20
- /** Page size (80% of viewport) */
21
- pageSize: number;
22
- }
23
- export declare function useScrollViewport({ totalContentHeight, viewportHeight, }: UseScrollViewportOptions): ScrollViewport;
24
- export {};
25
- //# sourceMappingURL=useScrollViewport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useScrollViewport.d.ts","sourceRoot":"","sources":["../../../src/ui/hooks/useScrollViewport.ts"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,2CAA2C;IAC3C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,2BAA2B;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,6CAA6C;IAC7C,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,yBAAyB;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,sBAAsB;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,kBAAkB,EAClB,cAAc,GACf,EAAE,wBAAwB,GAAG,cAAc,CAuC3C"}
@@ -1,32 +0,0 @@
1
- import { useState, useCallback, useEffect } from "react";
2
- export function useScrollViewport({ totalContentHeight, viewportHeight, }) {
3
- const [scrollOffset, setScrollOffset] = useState(0);
4
- const maxScroll = Math.max(0, totalContentHeight - viewportHeight);
5
- const pageSize = Math.max(1, Math.floor(viewportHeight * 0.8));
6
- // Clamp scroll offset when content or viewport changes
7
- useEffect(() => {
8
- setScrollOffset((prev) => Math.min(prev, maxScroll));
9
- }, [maxScroll]);
10
- const scrollUp = useCallback((lines) => {
11
- setScrollOffset((prev) => Math.min(prev + lines, maxScroll));
12
- }, [maxScroll]);
13
- const scrollDown = useCallback((lines) => {
14
- setScrollOffset((prev) => Math.max(0, prev - lines));
15
- }, []);
16
- const scrollToBottom = useCallback(() => {
17
- setScrollOffset(0);
18
- }, []);
19
- const scrollToTop = useCallback(() => {
20
- setScrollOffset(maxScroll);
21
- }, [maxScroll]);
22
- return {
23
- scrollOffset,
24
- isAtBottom: scrollOffset === 0,
25
- scrollUp,
26
- scrollDown,
27
- scrollToBottom,
28
- scrollToTop,
29
- pageSize,
30
- };
31
- }
32
- //# sourceMappingURL=useScrollViewport.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useScrollViewport.js","sourceRoot":"","sources":["../../../src/ui/hooks/useScrollViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA0BzD,MAAM,UAAU,iBAAiB,CAAC,EAChC,kBAAkB,EAClB,cAAc,GACW;IACzB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,C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,cAAc;QACd,WAAW;QACX,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { CompletedItem } from "../App.js";
2
- /**
3
- * Estimate the number of terminal lines a text string occupies
4
- * when rendered into a given width.
5
- */
6
- export declare function estimateWrappedLines(text: string, width: number): number;
7
- /**
8
- * Estimate the terminal height (in lines) of a completed item.
9
- * Doesn't need to be pixel-perfect — close enough for viewport slicing.
10
- */
11
- export declare function estimateItemHeight(item: CompletedItem, terminalWidth: number): number;
12
- /**
13
- * Compute cumulative heights for an array of items.
14
- * Returns an array where cumulativeHeights[i] = total height of items[0..i].
15
- */
16
- export declare function computeCumulativeHeights(items: CompletedItem[], terminalWidth: number): number[];
17
- //# sourceMappingURL=item-heights.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"item-heights.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/item-heights.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQxE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CA+CrF;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhG"}
@@ -1,73 +0,0 @@
1
- /**
2
- * Estimate the number of terminal lines a text string occupies
3
- * when rendered into a given width.
4
- */
5
- export function estimateWrappedLines(text, width) {
6
- if (!text || width <= 0)
7
- return 1;
8
- let total = 0;
9
- const hardLines = text.split("\n");
10
- for (const line of hardLines) {
11
- total += Math.max(1, Math.ceil((line.length + 1) / width));
12
- }
13
- return total;
14
- }
15
- /**
16
- * Estimate the terminal height (in lines) of a completed item.
17
- * Doesn't need to be pixel-perfect — close enough for viewport slicing.
18
- */
19
- export function estimateItemHeight(item, terminalWidth) {
20
- // Content width accounting for margins/padding/prefixes
21
- const contentWidth = Math.max(terminalWidth - 6, 20);
22
- switch (item.kind) {
23
- case "banner":
24
- return 5;
25
- case "user":
26
- // marginTop(1) + prompt line(s)
27
- return 1 + estimateWrappedLines(item.text, contentWidth);
28
- case "assistant": {
29
- // marginTop(1) + prefix + text lines
30
- let h = 1;
31
- if (item.thinking)
32
- h += Math.min(estimateWrappedLines(item.thinking, contentWidth), 4);
33
- if (item.text)
34
- h += estimateWrappedLines(item.text, contentWidth);
35
- return Math.max(h, 2);
36
- }
37
- case "tool_start":
38
- // marginTop(1) + spinner line
39
- return 2;
40
- case "tool_done": {
41
- // marginTop(1) + header + body (2-8 lines typically)
42
- const resultLines = item.result ? item.result.split("\n").length : 0;
43
- const bodyLines = Math.min(resultLines, 8);
44
- return 2 + bodyLines;
45
- }
46
- case "error":
47
- // marginTop(1) + error text
48
- return 1 + estimateWrappedLines(item.message, contentWidth);
49
- case "info":
50
- // marginTop(1) + info text
51
- return 1 + estimateWrappedLines(item.text, contentWidth);
52
- case "duration":
53
- // marginTop(1) + duration line
54
- return 2;
55
- case "subagent_group":
56
- // header + one line per agent + some sub-lines
57
- return 2 + item.agents.length * 2;
58
- }
59
- }
60
- /**
61
- * Compute cumulative heights for an array of items.
62
- * Returns an array where cumulativeHeights[i] = total height of items[0..i].
63
- */
64
- export function computeCumulativeHeights(items, terminalWidth) {
65
- const heights = [];
66
- let total = 0;
67
- for (const item of items) {
68
- total += estimateItemHeight(item, terminalWidth);
69
- heights.push(total);
70
- }
71
- return heights;
72
- }
73
- //# sourceMappingURL=item-heights.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"item-heights.js","sourceRoot":"","sources":["../../../src/ui/utils/item-heights.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAa;IAC9D,IAAI,C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,OAAO,CAAC,CAAC;QAEX,KAAK,WAAW,CAAC,CAAC,CAAC;YACjB,qDAAqD;YACrD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACrE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAC3C,OAAO,CAAC,GAAG,SAAS,CAAC;QACvB,CAAC;QAED,KAAK,OAAO;YACV,4BAA4B;YAC5B,OAAO,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAE9D,KAAK,MAAM;YACT,2BAA2B;YAC3B,OAAO,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAE3D,KAAK,UAAU;YACb,+BAA+B;YAC/B,OAAO,CAAC,CAAC;QAEX,KAAK,gBAAgB;YACnB,+CAA+C;YAC/C,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAsB,EAAE,aAAqB;IACpF,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,IAAI,kBAAkB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Engage the scroll lock. Called from the mouse-wheel handler in InputArea
3
- * when the user wheels during streaming. Idempotent — safe to call on
4
- * every wheel event.
5
- */
6
- export declare function pauseStreamRender(): void;
7
- /**
8
- * Release the scroll lock. Called when the user types — any keyboard
9
- * input signals they're done browsing scrollback and want to resume.
10
- */
11
- export declare function releaseStreamRender(): void;
12
- export declare function isStreamRenderPaused(): boolean;
13
- //# sourceMappingURL=scroll-pause.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scroll-pause.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/scroll-pause.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
@@ -1,16 +0,0 @@
1
- /**
2
- * DEC Private Mode 2026 — Synchronized Output.
3
- *
4
- * Wraps all stdout writes within a single microtask into BSU/ESU markers.
5
- * The terminal buffers all changes between BSU and ESU, then paints atomically.
6
- * This eliminates visible tearing/flicker during fast streaming updates.
7
- *
8
- * Matches Claude Code's pattern of batching all terminal patches into a single
9
- * BSU-prefixed, ESU-suffixed write.
10
- */
11
- /**
12
- * Monkey-patch process.stdout.write to coalesce all writes within a microtask
13
- * into a single BSU/ESU-wrapped write. No-op if the terminal doesn't support it.
14
- */
15
- export declare function enableSyncOutput(): void;
16
- //# sourceMappingURL=sync-output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-output.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/sync-output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA0BH;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAuCvC"}
@@ -1,70 +0,0 @@
1
- /**
2
- * DEC Private Mode 2026 — Synchronized Output.
3
- *
4
- * Wraps all stdout writes within a single microtask into BSU/ESU markers.
5
- * The terminal buffers all changes between BSU and ESU, then paints atomically.
6
- * This eliminates visible tearing/flicker during fast streaming updates.
7
- *
8
- * Matches Claude Code's pattern of batching all terminal patches into a single
9
- * BSU-prefixed, ESU-suffixed write.
10
- */
11
- const BSU = "\x1b[?2026h"; // Begin Synchronized Update
12
- const ESU = "\x1b[?2026l"; // End Synchronized Update
13
- /**
14
- * Detect whether the terminal supports DEC 2026 synchronized output.
15
- * tmux is excluded — it passes through BSU/ESU but breaks atomicity by chunking.
16
- */
17
- function isSyncOutputSupported() {
18
- if (process.env["TMUX"])
19
- return false;
20
- const prog = process.env["TERM_PROGRAM"] ?? "";
21
- const term = process.env["TERM"] ?? "";
22
- // Known supporting terminals
23
- if (["iTerm.app", "WezTerm", "ghostty", "vscode", "contour"].includes(prog))
24
- return true;
25
- if (term.includes("kitty") || term.includes("ghostty") || term.includes("foot"))
26
- return true;
27
- if (term.includes("alacritty"))
28
- return true;
29
- if (process.env["WT_SESSION"])
30
- return true; // Windows Terminal
31
- if (process.env["KITTY_WINDOW_ID"])
32
- return true;
33
- if (process.env["ZED_TERM"])
34
- return true;
35
- return false;
36
- }
37
- /**
38
- * Monkey-patch process.stdout.write to coalesce all writes within a microtask
39
- * into a single BSU/ESU-wrapped write. No-op if the terminal doesn't support it.
40
- */
41
- export function enableSyncOutput() {
42
- if (!isSyncOutputSupported())
43
- return;
44
- if (!process.stdout.isTTY)
45
- return;
46
- const origWrite = process.stdout.write.bind(process.stdout);
47
- let buffer = "";
48
- let flushScheduled = false;
49
- process.stdout.write = function (chunk, encodingOrCallback, callback) {
50
- const str = typeof chunk === "string" ? chunk : Buffer.from(chunk).toString();
51
- buffer += str;
52
- // Resolve callback immediately — the data is buffered
53
- const cb = typeof encodingOrCallback === "function" ? encodingOrCallback : callback;
54
- if (cb)
55
- cb();
56
- if (!flushScheduled) {
57
- flushScheduled = true;
58
- queueMicrotask(() => {
59
- flushScheduled = false;
60
- if (buffer) {
61
- const data = buffer;
62
- buffer = "";
63
- origWrite(BSU + data + ESU);
64
- }
65
- });
66
- }
67
- return true;
68
- };
69
- }
70
- //# sourceMappingURL=sync-output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":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C,KAAK;QAAE,OAAO;IAElC,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAI9C,CAAC;IAEb,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,cAAc,GAAG,KAAK,CAAC;IAE3B,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,UACrB,KAA0B,EAC1B,kBAA6D,EAC7D,QAAgC;QAEhC,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC9E,MAAM,IAAI,GAAG,CAAC;QAEd,sDAAsD;QACtD,MAAM,EAAE,GAAG,OAAO,kBAAkB,KAAK,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC;QACpF,IAAI,EAAE;YAAE,EAAE,EAAE,CAAC;QAEb,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,cAAc,GAAG,IAAI,CAAC;YACtB,cAAc,CAAC,GAAG,EAAE;gBAClB,cAAc,GAAG,KAAK,CAAC;gBACvB,IAAI,MAAM,EAAE,CAAC;oBACX,MAAM,IAAI,GAAG,MAAM,CAAC;oBACpB,MAAM,GAAG,EAAE,CAAC;oBACZ,SAAS,CAAC,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC;gBAC9B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAgC,CAAC;AACnC,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Render markdown string to ANSI-formatted terminal text.
3
- * Trims trailing whitespace/newlines.
4
- */
5
- export declare function renderMarkdown(text: string): string;
6
- //# sourceMappingURL=markdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/utils/markdown.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD"}
@@ -1,25 +0,0 @@
1
- import { marked } from "marked";
2
- import { markedTerminal } from "marked-terminal";
3
- import chalk from "chalk";
4
- // Force chalk to output ANSI codes — Ink manages the TTY so
5
- // chalk's auto-detection may incorrectly disable colors.
6
- chalk.level = 3;
7
- marked.use(markedTerminal({
8
- code: chalk.yellow,
9
- codespan: chalk.yellow,
10
- strong: chalk.bold,
11
- em: chalk.italic,
12
- heading: chalk.bold.cyan,
13
- link: chalk.underline.blueBright,
14
- href: chalk.dim,
15
- tab: 2,
16
- }));
17
- /**
18
- * Render markdown string to ANSI-formatted terminal text.
19
- * Trims trailing whitespace/newlines.
20
- */
21
- export function renderMarkdown(text) {
22
- const rendered = marked.parse(text, { async: false });
23
- return rendered.trimEnd();
24
- }
25
- //# sourceMappingURL=markdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/utils/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,4DAA4D;AAC5D,yDAAyD;AACzD,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;AAEhB,MAAM,CAAC,GAAG,CACR,cAAc,CAAC;IACb,IAAI,EAAE,KAAK,CAAC,MAAM;IAClB,QAAQ,EAAE,KAAK,CAAC,MAAM;IACtB,MAAM,EAAE,KAAK,CAAC,IAAI;IAClB,EAAE,EAAE,KAAK,CAAC,MAAM;IAChB,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI;IACxB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU;IAChC,IAAI,EAAE,KAAK,CAAC,GAAG;IACf,GAAG,EAAE,CAAC;CACP,CAAoB,CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAW,CAAC;IAChE,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC;AAC5B,CAAC"}