feat(shared): add dynamic-truncator utility for context-aware output truncation
Extract and generalize dynamic output truncation logic from grep-output-truncator. Provides context window-aware truncation that adapts based on remaining tokens. Features: - truncateToTokenLimit(): Sync truncation with configurable header preservation - getContextWindowUsage(): Get current context window usage from session - dynamicTruncate(): Async truncation that queries context window state - createDynamicTruncator(): Factory for creating truncator instance 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -9,3 +9,4 @@ export * from "./pattern-matcher"
|
||||
export * from "./hook-disabled"
|
||||
export * from "./deep-merge"
|
||||
export * from "./file-utils"
|
||||
export * from "./dynamic-truncator"
|
||||
|
||||
Reference in New Issue
Block a user