feat: add /context prompt breakdown
This commit is contained in:
@@ -61,6 +61,7 @@ export type SessionEntry = {
|
||||
lastTo?: string;
|
||||
lastAccountId?: string;
|
||||
skillsSnapshot?: SessionSkillSnapshot;
|
||||
systemPromptReport?: SessionSystemPromptReport;
|
||||
};
|
||||
|
||||
export function mergeSessionEntry(
|
||||
@@ -87,6 +88,48 @@ export type SessionSkillSnapshot = {
|
||||
resolvedSkills?: Skill[];
|
||||
};
|
||||
|
||||
export type SessionSystemPromptReport = {
|
||||
source: "run" | "estimate";
|
||||
generatedAt: number;
|
||||
sessionId?: string;
|
||||
sessionKey?: string;
|
||||
provider?: string;
|
||||
model?: string;
|
||||
workspaceDir?: string;
|
||||
bootstrapMaxChars?: number;
|
||||
sandbox?: {
|
||||
mode?: string;
|
||||
sandboxed?: boolean;
|
||||
};
|
||||
systemPrompt: {
|
||||
chars: number;
|
||||
projectContextChars: number;
|
||||
nonProjectContextChars: number;
|
||||
};
|
||||
injectedWorkspaceFiles: Array<{
|
||||
name: string;
|
||||
path: string;
|
||||
missing: boolean;
|
||||
rawChars: number;
|
||||
injectedChars: number;
|
||||
truncated: boolean;
|
||||
}>;
|
||||
skills: {
|
||||
promptChars: number;
|
||||
entries: Array<{ name: string; blockChars: number }>;
|
||||
};
|
||||
tools: {
|
||||
listChars: number;
|
||||
schemaChars: number;
|
||||
entries: Array<{
|
||||
name: string;
|
||||
summaryChars: number;
|
||||
schemaChars: number;
|
||||
propertiesCount?: number | null;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
export const DEFAULT_RESET_TRIGGER = "/new";
|
||||
export const DEFAULT_RESET_TRIGGERS = ["/new", "/reset"];
|
||||
export const DEFAULT_IDLE_MINUTES = 60;
|
||||
|
||||
Reference in New Issue
Block a user