@kenkaiiii/ggcoder 5.86.0 → 5.86.2
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/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.js +12 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/project-files.d.ts +15 -0
- package/dist/core/project-files.js +37 -0
- package/dist/core/project-files.js.map +1 -0
- package/dist/modes/agent-home-mode.js +5 -5
- package/dist/modes/agent-home-mode.js.map +1 -1
- package/dist/modes/serve-mode.js +5 -5
- package/dist/modes/serve-mode.js.map +1 -1
- package/dist/system-prompt.d.ts +7 -0
- package/dist/system-prompt.js +23 -6
- package/dist/system-prompt.js.map +1 -1
- package/dist/tools/bash.js +4 -1
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts +8 -1
- package/dist/tools/prompt-hints.js +22 -2
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/routine-output.d.ts +30 -0
- package/dist/tools/routine-output.js +203 -0
- package/dist/tools/routine-output.js.map +1 -0
- package/package.json +4 -4
|
@@ -356,6 +356,8 @@ export declare class AgentSession {
|
|
|
356
356
|
* delta; anything that changes WITHOUT one is caught by the hook below.
|
|
357
357
|
*/
|
|
358
358
|
private renderedEnvironment;
|
|
359
|
+
/** Project files as of the first prompt build (undefined until then). */
|
|
360
|
+
private projectFiles;
|
|
359
361
|
/** Wall-clock start of the current run; scopes the background-process gate. */
|
|
360
362
|
private runStartedAt;
|
|
361
363
|
/** Gate injections spent this run, capped by MAX_PROCESS_GATE_INJECTIONS. */
|
|
@@ -22,7 +22,7 @@ import { ExtensionLoader } from "./extensions/loader.js";
|
|
|
22
22
|
import { shouldCompact, compact, } from "./compaction/compactor.js";
|
|
23
23
|
import { getHistoryMessageVisibility } from "./session-history.js";
|
|
24
24
|
import { sourceFingerprint as computeSourceFingerprint } from "./session-compaction.js";
|
|
25
|
-
import { getAuthStorageKeys, getContextWindow, getModel,
|
|
25
|
+
import { getAuthStorageKeys, getContextWindow, getListedModels, getModel, } from "./model-registry.js";
|
|
26
26
|
import { discoverSkillsWithBlocked } from "./skills.js";
|
|
27
27
|
import { ensureAppDirs } from "../config.js";
|
|
28
28
|
import { buildSubAgentSystemPrompt, buildSystemPrompt, } from "../system-prompt.js";
|
|
@@ -57,6 +57,7 @@ import { buildLoopBreakMessage } from "./loop-breaker.js";
|
|
|
57
57
|
import { buildRegroundingMessage, requestTextForRegrounding } from "./regrounding.js";
|
|
58
58
|
import { buildSemanticLoopJudgePrompt, buildSemanticLoopMessage, parseSemanticLoopVerdict, SEMANTIC_LOOP_JUDGE_TIMEOUT_MS, withJudgeTimeout, } from "./semantic-loop-check.js";
|
|
59
59
|
import { buildEnvDeltaMessage, buildLanguageUpdateMessage } from "./env-delta.js";
|
|
60
|
+
import { listProjectFiles } from "./project-files.js";
|
|
60
61
|
import { wrapSteeringText, buildNotificationSteeringText, buildIdleWakeNotificationText, STEERING_PREFIX, } from "./steering.js";
|
|
61
62
|
import { AgentNotificationQueue } from "./agent-notifications.js";
|
|
62
63
|
import { VerificationGate, VERIFICATION_STATE_KIND } from "./verification-gate.js";
|
|
@@ -217,6 +218,8 @@ export class AgentSession {
|
|
|
217
218
|
* delta; anything that changes WITHOUT one is caught by the hook below.
|
|
218
219
|
*/
|
|
219
220
|
renderedEnvironment = {};
|
|
221
|
+
/** Project files as of the first prompt build (undefined until then). */
|
|
222
|
+
projectFiles;
|
|
220
223
|
/** Wall-clock start of the current run; scopes the background-process gate. */
|
|
221
224
|
runStartedAt = 0;
|
|
222
225
|
/** Gate injections spent this run, capped by MAX_PROCESS_GATE_INJECTIONS. */
|
|
@@ -3317,7 +3320,7 @@ export class AgentSession {
|
|
|
3317
3320
|
const networkAllow = this.settingsManager.get("networkMode") === "allowlist"
|
|
3318
3321
|
? this.settingsManager.get("networkAllow")
|
|
3319
3322
|
: [];
|
|
3320
|
-
return { additionalRoots: this.additionalRoots, networkAllow };
|
|
3323
|
+
return { additionalRoots: this.additionalRoots, networkAllow, projectFiles: this.projectFiles };
|
|
3321
3324
|
}
|
|
3322
3325
|
/**
|
|
3323
3326
|
* Build the stable system-prompt prefix for the current tool set and state.
|
|
@@ -3329,6 +3332,10 @@ export class AgentSession {
|
|
|
3329
3332
|
async buildBasePrompt(planMode, approvedPlanPath) {
|
|
3330
3333
|
if (this.customSystemPrompt)
|
|
3331
3334
|
return this.customSystemPrompt;
|
|
3335
|
+
// Listed once: a rebuild (plan mode, /add-dir, compaction) must not churn the
|
|
3336
|
+
// prompt as the agent adds files.
|
|
3337
|
+
if (this.projectFiles === undefined)
|
|
3338
|
+
this.projectFiles = await listProjectFiles(this.cwd);
|
|
3332
3339
|
const toolNames = this.tools.map((tool) => tool.name);
|
|
3333
3340
|
const deferredToolNames = this.deferredToolNamesForPrompt(toolNames);
|
|
3334
3341
|
// Whatever is rendered now is what the model has been told.
|
|
@@ -4144,7 +4151,9 @@ export class AgentSession {
|
|
|
4144
4151
|
},
|
|
4145
4152
|
getModelList: () => {
|
|
4146
4153
|
const current = `Current: ${this.provider}:${this.model}\n\nAvailable models:\n`;
|
|
4147
|
-
const list =
|
|
4154
|
+
const list = getListedModels()
|
|
4155
|
+
.map((m) => ` ${m.provider}:${m.id} — ${m.name} (${m.costTier})`)
|
|
4156
|
+
.join("\n");
|
|
4148
4157
|
return current + list;
|
|
4149
4158
|
},
|
|
4150
4159
|
quit: () => {
|