+ {thresholdMode === 'custom' ? (
+
{
+ const threshold = parsePositiveInteger(event.target.value);
+ if (threshold === null) return;
+ applyCompaction({
enabled: compactionEnabled,
trigger: { type: 'input_tokens', value: threshold },
- },
- largeToolResponse: value.contextManagement?.largeToolResponse ?? { enabled: true },
- },
- });
- }}
- />
-
+ });
+ }}
+ />
+ ) : null}
+
+ applyCompaction(
+ mode === 'custom'
+ ? {
+ enabled: compactionEnabled,
+ trigger: { type: 'input_tokens', value: DEFAULT_COMPACTION_THRESHOLD_TOKENS },
+ }
+ : { enabled: compactionEnabled },
+ )
+ }
+ />
+
+