File tree Expand file tree Collapse file tree
packages/codingcode/src/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { join } from 'path';
22import type { Message } from '../core/types.js' ;
33import type { SessionEvent , AssistantEvent , TokenUsage } from './types.js' ;
44import { readHistory , resolveSessionDir } from './io.js' ;
5+ import { getContextConfig } from '../context/config.js' ;
56
67const COMPACTIBLE_TOOLS = new Set ( [
78 'read_file' ,
@@ -14,8 +15,6 @@ const COMPACTIBLE_TOOLS = new Set([
1415 'edit_file' ,
1516] ) ;
1617
17- const MIN_CHARS_FOR_COMPACT = 50 ;
18-
1918export interface VisibilityResult {
2019 hidden : Set < string > ;
2120 compactedTurnIds : Set < number > ;
@@ -106,7 +105,7 @@ export function buildMessagesFromEvents(events: SessionEvent[]): Message[] {
106105 if (
107106 compactedTurnIds . has ( event . turnId ) &&
108107 COMPACTIBLE_TOOLS . has ( event . toolName . toLowerCase ( ) ) &&
109- event . output . length > MIN_CHARS_FOR_COMPACT
108+ event . output . length > getContextConfig ( ) . microCompactMinChars
110109 ) {
111110 output = `[Earlier: used ${ event . toolName } ]` ;
112111 }
You can’t perform that action at this time.
0 commit comments