feat(FN-4080): complete Step 1 — add thinking persistence resolver
Fusion-Task-Id: FN-4080 Fusion-Task-Lineage: 086863ba-7100-41ab-9cfc-197301fbcab0
This commit is contained in:
@@ -87,6 +87,8 @@ export const DEFAULT_GLOBAL_SETTINGS = {
|
||||
vitestKillThresholdPct: 90,
|
||||
// Agent log persistence controls
|
||||
persistAgentToolOutput: true,
|
||||
persistAgentThinkingLogPermanent: false,
|
||||
persistAgentThinkingLogEphemeral: false,
|
||||
persistAgentThinkingLog: false,
|
||||
researchGlobalDefaults: {
|
||||
searchProvider: undefined,
|
||||
@@ -363,3 +365,16 @@ export function isProjectSettingsKey(key: string): key is keyof ProjectSettings
|
||||
export function isGlobalOnlySettingsKey(key: string): key is keyof GlobalSettings {
|
||||
return isGlobalSettingsKey(key) && !isProjectSettingsKey(key);
|
||||
}
|
||||
|
||||
export function resolvePersistAgentThinkingLog(
|
||||
settings: Partial<GlobalSettings> | undefined,
|
||||
opts: { ephemeral: boolean },
|
||||
): boolean {
|
||||
const granular = opts.ephemeral
|
||||
? settings?.persistAgentThinkingLogEphemeral
|
||||
: settings?.persistAgentThinkingLogPermanent;
|
||||
|
||||
if (typeof granular === "boolean") return granular;
|
||||
if (typeof settings?.persistAgentThinkingLog === "boolean") return settings.persistAgentThinkingLog;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user