prompt: inject full ignore-aware file list at boot (gitignore-respected, capped 5000)
ci / check (macos-latest) (push) Canceled after 0s
ci / check (ubuntu-latest) (push) Canceled after 0s
ci / check (windows-latest) (push) Canceled after 0s

walk() at boot -> Session.workspaceFiles -> systemPrompt Environment
section + subagent system prompts. read_many_files still on-demand,
but the agent now sees the tree without a tool call.
This commit is contained in:
asepharyana
2026-09-09 14:19:29 +07:00
parent b7c3490993
commit 0bdf642672
5 changed files with 44 additions and 2 deletions
+3
View File
@@ -98,6 +98,8 @@ export type SessionOptions = {
learnerModel?: LanguageModel;
/** Emit learner notices to the UI. */
onNotice?: (text: string) => void;
/** Ignore-aware file list injected into the system prompt at boot; gitignore-respected. */
workspaceFiles?: readonly string[];
/** Disable background auto-learn (tests). */
disableAutoLearn?: boolean;
};
@@ -487,6 +489,7 @@ export class Session {
availableTools: this.activeTools(),
canAsk: this.opts.ask !== undefined && this.activeTools().includes('ask'),
...(this.mcpServerNamesForPrompt() ? { mcpServers: this.mcpServerNamesForPrompt() } : {}),
...(this.opts.workspaceFiles && this.opts.workspaceFiles.length > 0 ? { workspaceFiles: this.opts.workspaceFiles } : {}),
});
}