add config: tool output char limit

This commit is contained in:
koalazf.99
2025-09-17 14:13:36 +08:00
parent a0d77f5a44
commit 514f292770
7 changed files with 100 additions and 16 deletions

View File

@@ -605,6 +605,7 @@ export async function loadCliConfig(
shouldUseNodePtyShell: settings.shouldUseNodePtyShell,
skipStartupContext: settings.skipStartupContext,
skipNextSpeakerCheck: settings.skipNextSpeakerCheck,
toolOutputCharLimit: settings.toolOutputCharLimit,
});
}

View File

@@ -577,6 +577,16 @@ export const SETTINGS_SCHEMA = {
description: 'The maximum number of tokens allowed in a session.',
showInDialog: false,
},
toolOutputCharLimit: {
type: 'number',
label: 'Tool Output Character Limit',
category: 'General',
requiresRestart: false,
default: undefined as number | undefined,
description:
'Max characters for tool outputs (read_file, read_many_files, shell). If set, text content is truncated to this limit.',
showInDialog: true,
},
systemPromptMappings: {
type: 'object',
label: 'System Prompt Mappings',