@kenkaiiii/ggcoder 4.3.164 → 4.3.166
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/dist/cli.js +13 -5
- package/dist/cli.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/model-registry.d.ts +18 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +28 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +6 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/ui/App.d.ts +6 -1
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +39 -54
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/Footer.d.ts +8 -2
- package/dist/ui/components/Footer.d.ts.map +1 -1
- package/dist/ui/components/Footer.js +43 -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 +50 -19
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +40 -3
- package/dist/ui/render.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-manager.d.ts","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"settings-manager.d.ts","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAIF,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,QAAQ,CAAC,EAAE,MAAM;IAIvB,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC;IAazB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAI5C,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9E,MAAM,IAAI,QAAQ;CAGnB"}
|
|
@@ -11,7 +11,12 @@ const SettingsSchema = z.object({
|
|
|
11
11
|
defaultModel: z.string().optional(),
|
|
12
12
|
maxTokens: z.number().int().min(256).default(16384),
|
|
13
13
|
thinkingEnabled: z.boolean().default(false),
|
|
14
|
-
thinkingLevel: z
|
|
14
|
+
thinkingLevel: z
|
|
15
|
+
.preprocess(
|
|
16
|
+
// Legacy "max" → "xhigh" migration for settings files written before
|
|
17
|
+
// the rename. Matches OpenAI's GPT-5.5-era naming for the top tier.
|
|
18
|
+
(v) => (v === "max" ? "xhigh" : v), z.enum(["low", "medium", "high", "xhigh"]))
|
|
19
|
+
.optional(),
|
|
15
20
|
theme: z
|
|
16
21
|
.enum([
|
|
17
22
|
"auto",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-manager.js","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,8DAA8D;AAE9D,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACtC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC3D,eAAe,EAAE,CAAC;SACf,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;SAC/F,OAAO,CAAC,WAAW,CAAC;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACnD,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC3C,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"settings-manager.js","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WA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IACvB,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,GAAG,CAA2B,GAAM;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,GAAG,CAA2B,GAAM,EAAE,KAAkB;QAC5D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createTools, createReadTool, createWriteTool, createEditTool, createBashTool, createFindTool, createGrepTool, createLsTool, } from "./tools/index.js";
|
|
2
2
|
export { buildSystemPrompt } from "./system-prompt.js";
|
|
3
3
|
export { createSession, loadSession, listSessions, getMostRecentSession, persistMessage, } from "./session.js";
|
|
4
|
-
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
4
|
+
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, getMaxThinkingLevel, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
5
5
|
export { runPrintMode } from "./modes/index.js";
|
|
6
6
|
export { renderApp } from "./ui/render.js";
|
|
7
7
|
export { APP_NAME, VERSION, getAppPaths, ensureAppDirs } from "./config.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5E,YAAY,EACV,SAAS,EACT,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,EACnB,YAAY,IAAI,kBAAkB,EAClC,WAAW,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5E,YAAY,EACV,SAAS,EACT,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,EACnB,YAAY,IAAI,kBAAkB,EAClC,WAAW,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { buildSystemPrompt } from "./system-prompt.js";
|
|
|
5
5
|
// Session (legacy — still usable)
|
|
6
6
|
export { createSession, loadSession, listSessions, getMostRecentSession, persistMessage, } from "./session.js";
|
|
7
7
|
// Core
|
|
8
|
-
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
8
|
+
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, getMaxThinkingLevel, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
9
9
|
// Modes
|
|
10
10
|
export { runPrintMode } from "./modes/index.js";
|
|
11
11
|
// UI entry
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kCAAkC;AAClC,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,WAAW;AACX,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,SAAS;AACT,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kCAAkC;AAClC,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,WAAW;AACX,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,SAAS;AACT,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/ui/App.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Message, type Provider, type ThinkingLevel } from "@kenkaiiii/gg-ai";
|
|
2
2
|
import type { AgentTool } from "@kenkaiiii/gg-agent";
|
|
3
3
|
import type { PasteInfo } from "./components/InputArea.js";
|
|
4
4
|
import { type SubAgentInfo } from "./components/SubAgentPanel.js";
|
|
@@ -49,7 +49,12 @@ interface ToolDoneItem {
|
|
|
49
49
|
}
|
|
50
50
|
interface ErrorItem {
|
|
51
51
|
kind: "error";
|
|
52
|
+
/** Plain-English headline, e.g. "OpenAI returned an error." */
|
|
53
|
+
headline: string;
|
|
54
|
+
/** Detailed message body (clean, no JSON). */
|
|
52
55
|
message: string;
|
|
56
|
+
/** Action line — "Retry, this is an OpenAI issue" / "Report this ggcoder bug …". */
|
|
57
|
+
guidance: string;
|
|
53
58
|
id: string;
|
|
54
59
|
}
|
|
55
60
|
interface InfoItem {
|
package/dist/ui/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/ui/App.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/ui/App.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,aAAa,EAGnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAK3D,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAmBjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AA8BjE,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,s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C1B,SAAS,EAAE,QAAQ,EAAE,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,qBAAqB,EAAE,OAAO,CAAC;QAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;QACpF,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,aAAa,CAAC,EAAE;YACd,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,SAAS,CAAC,EAAE;gBAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;gBAAC,MAAM,CAAC,EAAE,MAAM,CAAA;aAAE,CAAC;SAC/E,CAAC;QACF,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAID,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,2CAw7FlC"}
|
package/dist/ui/App.js
CHANGED
|
@@ -9,6 +9,7 @@ import { readFileSync, writeFileSync } from "node:fs";
|
|
|
9
9
|
import { homedir } from "node:os";
|
|
10
10
|
import { join } from "node:path";
|
|
11
11
|
import { playNotificationSound } from "../utils/sound.js";
|
|
12
|
+
import { formatError, } from "@kenkaiiii/gg-ai";
|
|
12
13
|
import { extractImagePaths } from "../utils/image.js";
|
|
13
14
|
import { useAgentLoop } from "./hooks/useAgentLoop.js";
|
|
14
15
|
import { isEyesActive, journalCount } from "@kenkaiiii/ggcoder-eyes";
|
|
@@ -37,7 +38,7 @@ import { useTheme, useSetTheme } from "./theme/theme.js";
|
|
|
37
38
|
import { useAnimationTick, useAnimationActive, deriveFrame, } from "./components/AnimationContext.js";
|
|
38
39
|
import { useTerminalTitle } from "./hooks/useTerminalTitle.js";
|
|
39
40
|
import { getGitBranch } from "../utils/git.js";
|
|
40
|
-
import { getModel, getContextWindow } from "../core/model-registry.js";
|
|
41
|
+
import { getModel, getContextWindow, getMaxThinkingLevel } from "../core/model-registry.js";
|
|
41
42
|
import { SessionManager } from "../core/session-manager.js";
|
|
42
43
|
import { log } from "../core/logger.js";
|
|
43
44
|
import { getPendingUpdate, startPeriodicUpdateCheck, stopPeriodicUpdateCheck, } from "../core/auto-update.js";
|
|
@@ -54,42 +55,28 @@ import { detectVerifyCommands } from "../core/verify-commands.js";
|
|
|
54
55
|
import { extractPlanSteps, findCompletedMarkers, markStepsCompleted, segmentDisplayText, stripDoneMarkers, } from "../utils/plan-steps.js";
|
|
55
56
|
import { getMCPServers } from "../core/mcp/index.js";
|
|
56
57
|
import { trimFlushedItems, flushOnTurnText, flushOnTurnEnd, flushOverflow, } from "./live-item-flush.js";
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return "The provider's service is temporarily unavailable. Try again in a moment.";
|
|
80
|
-
}
|
|
81
|
-
if (lower.includes("timeout") || lower.includes("timed out")) {
|
|
82
|
-
return "The request to the provider timed out. Their servers may be slow — try again.";
|
|
83
|
-
}
|
|
84
|
-
if (lower.includes("500") && lower.includes("internal server error")) {
|
|
85
|
-
return "The provider experienced an internal error. This is not a ggcoder issue.";
|
|
86
|
-
}
|
|
87
|
-
if (lower.includes("does not recognize the requested model") ||
|
|
88
|
-
(lower.includes("model") &&
|
|
89
|
-
(lower.includes("not exist") || lower.includes("not found") || lower.includes("no access")))) {
|
|
90
|
-
return "Use /model to switch to a different model, or check that your account has access to the requested model.";
|
|
91
|
-
}
|
|
92
|
-
return null;
|
|
58
|
+
/** Where ggcoder bugs should be reported. Surfaced in the guidance line. */
|
|
59
|
+
const GGCODER_BUG_REPORT_URL = "github.com/kenkaiiii/gg-framework/issues";
|
|
60
|
+
/**
|
|
61
|
+
* Build an ErrorItem from any thrown value. Centralises headline / message /
|
|
62
|
+
* guidance extraction so every error answers the same question for the user:
|
|
63
|
+
* "Should I retry, or is this a ggcoder bug to report?"
|
|
64
|
+
*/
|
|
65
|
+
function toErrorItem(err, id, contextPrefix) {
|
|
66
|
+
const f = formatError(err);
|
|
67
|
+
const headline = contextPrefix ? `${contextPrefix} — ${f.headline}` : f.headline;
|
|
68
|
+
// For ggcoder bugs, swap the generic "see /help" guidance for an actual URL
|
|
69
|
+
// so users have a clear place to send the report.
|
|
70
|
+
const guidance = f.source === "ggcoder"
|
|
71
|
+
? `This looks like a ggcoder bug — please send it to the dev at ${GGCODER_BUG_REPORT_URL}.`
|
|
72
|
+
: f.guidance;
|
|
73
|
+
return {
|
|
74
|
+
kind: "error",
|
|
75
|
+
headline,
|
|
76
|
+
message: f.message,
|
|
77
|
+
guidance,
|
|
78
|
+
id,
|
|
79
|
+
};
|
|
93
80
|
}
|
|
94
81
|
/** Tools that get aggregated into a single compact group when concurrent. */
|
|
95
82
|
const AGGREGATABLE_TOOLS = new Set(["read", "grep", "find", "ls"]);
|
|
@@ -411,9 +398,9 @@ export function App(props) {
|
|
|
411
398
|
}, [currentProvider, onRuntimeStateChange]);
|
|
412
399
|
useEffect(() => {
|
|
413
400
|
onRuntimeStateChange?.({
|
|
414
|
-
thinking: thinkingEnabled ? (
|
|
401
|
+
thinking: thinkingEnabled ? getMaxThinkingLevel(currentModel) : undefined,
|
|
415
402
|
});
|
|
416
|
-
}, [thinkingEnabled,
|
|
403
|
+
}, [thinkingEnabled, currentModel, onRuntimeStateChange]);
|
|
417
404
|
// Mirror session state into renderApp's closure so resetUI() can re-seed
|
|
418
405
|
// the conversation on remount. Each panel that previously did a bare ANSI
|
|
419
406
|
// screen clear (overlay open/close, plan accept/reject, /clear, startTask)
|
|
@@ -724,9 +711,7 @@ export function App(props) {
|
|
|
724
711
|
const msg = err instanceof Error ? err.message : String(err);
|
|
725
712
|
log("ERROR", "compaction", `Compaction failed: ${msg}`);
|
|
726
713
|
// Replace spinner with error
|
|
727
|
-
setLiveItems((prev) => prev.map((item) => item.id === spinId
|
|
728
|
-
? { kind: "error", message: `Compaction failed: ${msg}`, id: spinId }
|
|
729
|
-
: item));
|
|
714
|
+
setLiveItems((prev) => prev.map((item) => item.id === spinId ? toErrorItem(err, spinId, "Compaction failed") : item));
|
|
730
715
|
return messages; // Return unchanged on failure
|
|
731
716
|
}
|
|
732
717
|
}, [currentModel, currentProvider, activeApiKey]);
|
|
@@ -810,7 +795,7 @@ export function App(props) {
|
|
|
810
795
|
tools: currentTools,
|
|
811
796
|
webSearch: props.webSearch,
|
|
812
797
|
maxTokens: props.maxTokens,
|
|
813
|
-
thinking: thinkingEnabled ? (
|
|
798
|
+
thinking: thinkingEnabled ? getMaxThinkingLevel(currentModel) : undefined,
|
|
814
799
|
apiKey: activeApiKey,
|
|
815
800
|
baseUrl: activeBaseUrl,
|
|
816
801
|
accountId: activeAccountId,
|
|
@@ -1446,7 +1431,7 @@ export function App(props) {
|
|
|
1446
1431
|
...prev,
|
|
1447
1432
|
isAbort
|
|
1448
1433
|
? { kind: "stopped", text: "Auto-setup cancelled.", id: getId() }
|
|
1449
|
-
:
|
|
1434
|
+
: toErrorItem(err, getId()),
|
|
1450
1435
|
]);
|
|
1451
1436
|
}
|
|
1452
1437
|
};
|
|
@@ -1521,7 +1506,7 @@ export function App(props) {
|
|
|
1521
1506
|
void agentLoop.run(action.prompt).catch((err) => {
|
|
1522
1507
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
1523
1508
|
log("ERROR", "error", errMsg);
|
|
1524
|
-
setLiveItems((prev) => [...prev,
|
|
1509
|
+
setLiveItems((prev) => [...prev, toErrorItem(err, getId())]);
|
|
1525
1510
|
});
|
|
1526
1511
|
// Intentional one-shot: run once on mount, never re-fire on re-render.
|
|
1527
1512
|
}, []);
|
|
@@ -1729,7 +1714,7 @@ export function App(props) {
|
|
|
1729
1714
|
...prev,
|
|
1730
1715
|
isAbort
|
|
1731
1716
|
? { kind: "stopped", text: "Request was stopped.", id: getId() }
|
|
1732
|
-
:
|
|
1717
|
+
: toErrorItem(err, getId()),
|
|
1733
1718
|
]);
|
|
1734
1719
|
}
|
|
1735
1720
|
// Reload custom commands in case a setup command created new ones
|
|
@@ -1853,7 +1838,7 @@ export function App(props) {
|
|
|
1853
1838
|
...prev,
|
|
1854
1839
|
isAbort
|
|
1855
1840
|
? { kind: "stopped", text: "Request was stopped.", id: getId() }
|
|
1856
|
-
:
|
|
1841
|
+
: toErrorItem(err, getId()),
|
|
1857
1842
|
]);
|
|
1858
1843
|
}
|
|
1859
1844
|
}, [agentLoop, props.onSlashCommand, compactConversation]);
|
|
@@ -2050,8 +2035,8 @@ export function App(props) {
|
|
|
2050
2035
|
case "server_tool_done":
|
|
2051
2036
|
return (_jsx(ServerToolExecution, { status: "done", name: item.name, input: item.input, durationMs: item.durationMs, resultType: item.resultType }, item.id));
|
|
2052
2037
|
case "error": {
|
|
2053
|
-
const
|
|
2054
|
-
return (_jsxs(Box, { marginTop: 1, flexDirection: "column", flexShrink: 1, children: [_jsxs(Text, { color: theme.error, wrap: "wrap", children: ["✗ ", item.
|
|
2038
|
+
const showMessage = item.message && item.message !== item.headline;
|
|
2039
|
+
return (_jsxs(Box, { marginTop: 1, flexDirection: "column", flexShrink: 1, children: [_jsxs(Text, { color: theme.error, wrap: "wrap", children: ["✗ ", item.headline] }), showMessage && (_jsx(Text, { color: theme.textDim, wrap: "wrap", children: ` ${item.message}` })), _jsx(Text, { color: theme.textDim, wrap: "wrap", children: ` → ${item.guidance}` })] }, item.id));
|
|
2055
2040
|
}
|
|
2056
2041
|
case "info":
|
|
2057
2042
|
return (_jsx(Box, { marginTop: 1, flexShrink: 1, children: _jsx(Text, { color: theme.textDim, wrap: "wrap", children: item.text }) }, item.id));
|
|
@@ -2186,7 +2171,7 @@ export function App(props) {
|
|
|
2186
2171
|
...prev,
|
|
2187
2172
|
isAbort
|
|
2188
2173
|
? { kind: "stopped", text: "Request was stopped.", id: getId() }
|
|
2189
|
-
:
|
|
2174
|
+
: toErrorItem(err, getId()),
|
|
2190
2175
|
]);
|
|
2191
2176
|
setRunAllTasks(false);
|
|
2192
2177
|
}
|
|
@@ -2277,7 +2262,7 @@ export function App(props) {
|
|
|
2277
2262
|
log("ERROR", "pixel", msg);
|
|
2278
2263
|
currentPixelFixRef.current = null;
|
|
2279
2264
|
setRunAllPixel(false);
|
|
2280
|
-
setLiveItems((prev) => [...prev,
|
|
2265
|
+
setLiveItems((prev) => [...prev, toErrorItem(err, getId())]);
|
|
2281
2266
|
}
|
|
2282
2267
|
})();
|
|
2283
2268
|
}, [props.cwd, stdout, agentLoop, currentProvider, currentModel]);
|
|
@@ -2457,7 +2442,7 @@ export function App(props) {
|
|
|
2457
2442
|
catch (err) {
|
|
2458
2443
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
2459
2444
|
log("ERROR", "error", errMsg);
|
|
2460
|
-
setLiveItems((prev) => [...prev,
|
|
2445
|
+
setLiveItems((prev) => [...prev, toErrorItem(err, getId())]);
|
|
2461
2446
|
}
|
|
2462
2447
|
})();
|
|
2463
2448
|
}, onReject: (planPath, feedback) => {
|
|
@@ -2489,7 +2474,7 @@ export function App(props) {
|
|
|
2489
2474
|
void agentLoop.run(rejectionMsg).catch((err) => {
|
|
2490
2475
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
2491
2476
|
log("ERROR", "error", errMsg);
|
|
2492
|
-
setLiveItems((prev) => [...prev,
|
|
2477
|
+
setLiveItems((prev) => [...prev, toErrorItem(err, getId())]);
|
|
2493
2478
|
});
|
|
2494
2479
|
} })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { flexDirection: "column", flexGrow: 1, paddingRight: 1, children: [liveItems.map((item) => renderItem(item)), _jsx(StreamingArea, { isRunning: agentLoop.isRunning, streamingText: agentLoop.streamingText, streamingThinking: agentLoop.streamingThinking, showThinking: props.showThinking, thinkingMs: agentLoop.thinkingMs, planMode: planMode })] }), agentLoop.isRunning && agentLoop.activityPhase !== "idle" ? (_jsx(Box, { marginTop: 1, borderStyle: "round", borderColor: agentLoop.activityPhase === "thinking"
|
|
2495
2480
|
? THINKING_BORDER_COLORS[thinkingBorderFrame]
|
|
@@ -2552,6 +2537,6 @@ export function App(props) {
|
|
|
2552
2537
|
id: getId(),
|
|
2553
2538
|
},
|
|
2554
2539
|
]);
|
|
2555
|
-
}, cwd: props.cwd, commands: allCommands, eyesCount: eyesCount }), overlay === "model" ? (_jsx(ModelSelector, { onSelect: handleModelSelect, onCancel: () => setOverlay(null), loggedInProviders: props.loggedInProviders ?? [currentProvider], currentModel: currentModel, currentProvider: currentProvider })) : overlay === "theme" ? (_jsx(ThemeSelector, { onSelect: handleThemeSelect, onCancel: () => setOverlay(null), currentTheme: theme.name })) : (_jsx(Footer, { model: currentModel, tokensIn: agentLoop.contextUsed, cwd: displayedCwd, gitBranch: gitBranch, thinkingEnabled:
|
|
2540
|
+
}, cwd: props.cwd, commands: allCommands, eyesCount: eyesCount }), overlay === "model" ? (_jsx(ModelSelector, { onSelect: handleModelSelect, onCancel: () => setOverlay(null), loggedInProviders: props.loggedInProviders ?? [currentProvider], currentModel: currentModel, currentProvider: currentProvider })) : overlay === "theme" ? (_jsx(ThemeSelector, { onSelect: handleThemeSelect, onCancel: () => setOverlay(null), currentTheme: theme.name })) : (_jsx(Footer, { model: currentModel, tokensIn: agentLoop.contextUsed, cwd: displayedCwd, gitBranch: gitBranch, thinkingLevel: thinkingEnabled ? getMaxThinkingLevel(currentModel) : undefined, planMode: planMode, exitPending: exitPending })), (bgTasks.length > 0 || (eyesCount !== undefined && eyesCount > 0) || updatePending) && (_jsxs(Box, { children: [bgTasks.length > 0 && (_jsx(BackgroundTasksBar, { tasks: bgTasks, focused: taskBarFocused, expanded: taskBarExpanded, selectedIndex: selectedTaskIndex, onExpand: handleTaskBarExpand, onCollapse: handleTaskBarCollapse, onKill: handleTaskKill, onExit: handleTaskBarExit, onNavigate: handleTaskNavigate })), eyesCount !== undefined && eyesCount > 0 && (_jsx(Box, { paddingLeft: bgTasks.length > 0 ? 2 : 1, paddingRight: 1, children: _jsx(Text, { color: theme.accent, bold: true, children: `${eyesCount} eyes signal${eyesCount === 1 ? "" : "s"} · Run /eyes-improve to enhance GG Coder` }) })), updatePending && (_jsx(Box, { paddingLeft: bgTasks.length > 0 || (eyesCount !== undefined && eyesCount > 0) ? 2 : 1, paddingRight: 1, children: _jsx(Text, { color: theme.success, bold: true, children: "\u2728 Update ready \u00B7 restart to apply" }) }))] }))] }))] }));
|
|
2556
2541
|
}
|
|
2557
2542
|
//# sourceMappingURL=App.js.map
|