mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 10:10:56 -07:00
feat(context): add remote configuration for tool output masking thresholds (#18553)
This commit is contained in:
@@ -68,7 +68,8 @@ export interface MaskingResult {
|
||||
*/
|
||||
export class ToolOutputMaskingService {
|
||||
async mask(history: Content[], config: Config): Promise<MaskingResult> {
|
||||
if (history.length === 0) {
|
||||
const maskingConfig = await config.getToolOutputMaskingConfig();
|
||||
if (!maskingConfig.enabled || history.length === 0) {
|
||||
return { newHistory: history, maskedCount: 0, tokensSaved: 0 };
|
||||
}
|
||||
|
||||
@@ -85,8 +86,6 @@ export class ToolOutputMaskingService {
|
||||
originalPart: Part;
|
||||
}> = [];
|
||||
|
||||
const maskingConfig = config.getToolOutputMaskingConfig();
|
||||
|
||||
// Decide where to start scanning.
|
||||
// If PROTECT_LATEST_TURN is true, we skip the most recent message (index history.length - 1).
|
||||
const scanStartIdx = maskingConfig.protectLatestTurn
|
||||
|
||||
Reference in New Issue
Block a user