chore(core): improve encapsulation and remove unused exports (#19556)

This commit is contained in:
Adam Weidman
2026-02-19 13:19:32 -07:00
committed by GitHub
parent 264c7aceaa
commit a468407098
10 changed files with 22 additions and 39 deletions

View File

@@ -37,18 +37,18 @@ import { LlmRole } from '../telemetry/types.js';
* Default threshold for compression token count as a fraction of the model's
* token limit. If the chat history exceeds this threshold, it will be compressed.
*/
export const DEFAULT_COMPRESSION_TOKEN_THRESHOLD = 0.5;
const DEFAULT_COMPRESSION_TOKEN_THRESHOLD = 0.5;
/**
* The fraction of the latest chat history to keep. A value of 0.3
* means that only the last 30% of the chat history will be kept after compression.
*/
export const COMPRESSION_PRESERVE_THRESHOLD = 0.3;
const COMPRESSION_PRESERVE_THRESHOLD = 0.3;
/**
* The budget for function response tokens in the preserved history.
*/
export const COMPRESSION_FUNCTION_RESPONSE_TOKEN_BUDGET = 50_000;
const COMPRESSION_FUNCTION_RESPONSE_TOKEN_BUDGET = 50_000;
/**
* Returns the index of the oldest item to keep when compressing. May return