prompt: inject full ignore-aware file list at boot (gitignore-respected, capped 5000)
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:
@@ -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 } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user