feat: Expose BuildSystemPromptOptions on before-agent-start event. (#3473)

Resolves: #3463
This commit is contained in:
Douglas Stephen
2026-04-20 16:06:47 -05:00
committed by GitHub
parent 7c69aadcaf
commit 1891b9ac01
9 changed files with 143 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import type { ResourceDiagnostic } from "../diagnostics.js";
import type { KeybindingsConfig } from "../keybindings.js";
import type { ModelRegistry } from "../model-registry.js";
import type { SessionManager } from "../session-manager.js";
import type { BuildSystemPromptOptions } from "../system-prompt.js";
import type {
BeforeAgentStartEvent,
BeforeAgentStartEventResult,
@@ -789,6 +790,7 @@ export class ExtensionRunner {
prompt: string,
images: ImageContent[] | undefined,
systemPrompt: string,
systemPromptOptions: BuildSystemPromptOptions,
): Promise<BeforeAgentStartCombinedResult | undefined> {
const ctx = this.createContext();
const messages: NonNullable<BeforeAgentStartEventResult["message"]>[] = [];
@@ -806,6 +808,7 @@ export class ExtensionRunner {
prompt,
images,
systemPrompt: currentSystemPrompt,
systemPromptOptions,
};
const handlerResult = await handler(event, ctx);