@kenkaiiii/ggcoder 3.6.2 → 3.6.4
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/LICENSE +21 -0
- package/dist/cli.js +49 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/process-manager.d.ts.map +1 -1
- package/dist/core/process-manager.js +7 -0
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/session-manager.js +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +19 -2
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/grep.js +18 -10
- package/dist/tools/grep.js.map +1 -1
- package/dist/tools/subagent.d.ts.map +1 -1
- package/dist/tools/subagent.js +15 -3
- package/dist/tools/subagent.js.map +1 -1
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +27 -10
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/Footer.d.ts.map +1 -1
- package/dist/ui/components/Footer.js +3 -3
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/components/InputArea.d.ts.map +1 -1
- package/dist/ui/components/InputArea.js +3 -3
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/components/Markdown.d.ts.map +1 -1
- package/dist/ui/components/Markdown.js +3 -3
- package/dist/ui/components/Markdown.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentLoop.js +30 -2
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/hooks/useTerminalSize.d.ts +2 -4
- package/dist/ui/hooks/useTerminalSize.d.ts.map +1 -1
- package/dist/ui/hooks/useTerminalSize.js +4 -7
- package/dist/ui/hooks/useTerminalSize.js.map +1 -1
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +24 -23
- package/dist/ui/render.js.map +1 -1
- package/package.json +4 -4
package/dist/ui/render.js
CHANGED
|
@@ -5,29 +5,30 @@ import { SplashScreen } from "./components/SplashScreen.js";
|
|
|
5
5
|
import { ThemeContext, loadTheme } from "./theme/theme.js";
|
|
6
6
|
export async function renderApp(config) {
|
|
7
7
|
const theme = loadTheme(config.theme ?? "dark");
|
|
8
|
+
const isRestoredSession = config.initialHistory && config.initialHistory.length > 0;
|
|
8
9
|
const rows = process.stdout.rows ?? 24;
|
|
9
|
-
// Clear screen and
|
|
10
|
-
// Set a scroll margin (DECSTBM) so Ink's output stays in rows 2+
|
|
11
|
-
// while row 1 remains pinned — same technique tmux uses for its status bar.
|
|
12
|
-
process.stdout.write("\x1b[2J" + // clear screen
|
|
13
|
-
"\x1b[H" + // cursor to row 1, col 1
|
|
14
|
-
`\x1b[2;${rows}r` + // scroll region: row 2 to bottom
|
|
15
|
-
"\x1b[2;1H");
|
|
16
|
-
// Show animated splash screen before the main app
|
|
17
|
-
await new Promise((resolve) => {
|
|
18
|
-
const { unmount } = render(React.createElement(ThemeContext.Provider, { value: theme }, React.createElement(SplashScreen, {
|
|
19
|
-
version: config.version,
|
|
20
|
-
onDone: () => {
|
|
21
|
-
unmount();
|
|
22
|
-
resolve();
|
|
23
|
-
},
|
|
24
|
-
})));
|
|
25
|
-
});
|
|
26
|
-
// Clear screen again for the main app
|
|
10
|
+
// Clear screen and set scroll region (DECSTBM) to pin row 1 for the shimmer line
|
|
27
11
|
process.stdout.write("\x1b[2J" + // clear screen
|
|
28
12
|
"\x1b[H" + // cursor to row 1, col 1
|
|
29
13
|
`\x1b[2;${rows}r` + // scroll region: row 2 to bottom
|
|
30
14
|
"\x1b[2;1H");
|
|
15
|
+
// Show animated splash screen for new sessions only (skip for restored sessions)
|
|
16
|
+
if (!isRestoredSession) {
|
|
17
|
+
await new Promise((resolve) => {
|
|
18
|
+
const { unmount } = render(React.createElement(ThemeContext.Provider, { value: theme }, React.createElement(SplashScreen, {
|
|
19
|
+
version: config.version,
|
|
20
|
+
onDone: () => {
|
|
21
|
+
unmount();
|
|
22
|
+
resolve();
|
|
23
|
+
},
|
|
24
|
+
})));
|
|
25
|
+
});
|
|
26
|
+
// Clear screen for the main app
|
|
27
|
+
process.stdout.write("\x1b[2J" + // clear screen
|
|
28
|
+
"\x1b[H" + // cursor to row 1, col 1
|
|
29
|
+
`\x1b[2;${rows}r` + // scroll region: row 2 to bottom
|
|
30
|
+
"\x1b[2;1H");
|
|
31
|
+
}
|
|
31
32
|
const { waitUntilExit, clear } = render(React.createElement(ThemeContext.Provider, { value: theme }, React.createElement(App, {
|
|
32
33
|
provider: config.provider,
|
|
33
34
|
model: config.model,
|
|
@@ -65,11 +66,11 @@ export async function renderApp(config) {
|
|
|
65
66
|
// exitOnCtrlC is true. Disable it so our InputArea handles Ctrl+C.
|
|
66
67
|
exitOnCtrlC: false,
|
|
67
68
|
});
|
|
68
|
-
// Resize handling (terminal clear +
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
69
|
+
// Resize handling (terminal clear + Static remount) is done inside the
|
|
70
|
+
// React tree via the useTerminalSize hook, which debounces 300ms then
|
|
71
|
+
// clears screen+scrollback and bumps a resizeKey to force Ink to
|
|
72
|
+
// re-render <Static> content. The render.ts layer only needs to call
|
|
73
|
+
// clear() so Ink forgets its stale line-count tracking.
|
|
73
74
|
const onResize = () => {
|
|
74
75
|
clear();
|
|
75
76
|
};
|
package/dist/ui/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/ui/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAI7B,OAAO,EAAE,GAAG,EAAsB,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM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;QACnD,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,YAAY,EAAE,MAAM,CAAC,YAAY;KAClC,CAAC,CACH,EACD;QACE,kEAAkE;QAClE,mEAAmE;QACnE,oDAAoD;QACpD,aAAa,EAAE;YACb,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,yBAAyB,CAAC;SACnC;QACD,oEAAoE;QACpE,oEAAoE;QACpE,gEAAgE;QAChE,mEAAmE;QACnE,WAAW,EAAE,KAAK;KACnB,CACF,CAAC;IAEF,uEAAuE;IACvE,sEAAsE;IACtE,iEAAiE;IACjE,sEAAsE;IACtE,wDAAwD;IACxD,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,KAAK,EAAE,CAAC;IACV,CAAC,CAAC;IACF,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEtC,MAAM,aAAa,EAAE,CAAC;IAEtB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEvC,yDAAyD;IACzD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenkaiiii/ggcoder",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI coding agent with OAuth authentication for Anthropic and OpenAI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"marked-terminal": "^7.3.0",
|
|
34
34
|
"react": "^19.2.4",
|
|
35
35
|
"zod": "^4.3.6",
|
|
36
|
-
"@kenkaiiii/gg-agent": "3.6.
|
|
37
|
-
"@kenkaiiii/gg-ai": "3.6.
|
|
36
|
+
"@kenkaiiii/gg-agent": "3.6.4",
|
|
37
|
+
"@kenkaiiii/gg-ai": "3.6.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/node": "^25.3.
|
|
40
|
+
"@types/node": "^25.3.5",
|
|
41
41
|
"@types/react": "^19.2.14",
|
|
42
42
|
"typescript": "^5.9.3",
|
|
43
43
|
"vitest": "^4.0.18"
|