( data: ContextData, suggestions: ContextSuggestion[], )
| 53 | // -- |
| 54 | |
| 55 | function checkNearCapacity( |
| 56 | data: ContextData, |
| 57 | suggestions: ContextSuggestion[], |
| 58 | ): void { |
| 59 | if (data.percentage >= NEAR_CAPACITY_PERCENT) { |
| 60 | suggestions.push({ |
| 61 | severity: 'warning', |
| 62 | title: `Context is ${data.percentage}% full`, |
| 63 | detail: data.isAutoCompactEnabled |
| 64 | ? 'Autocompact will trigger soon, which discards older messages. Use /compact now to control what gets kept.' |
| 65 | : 'Autocompact is disabled. Use /compact to free space, or enable autocompact in /config.', |
| 66 | }) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | function checkLargeToolResults( |
| 71 | data: ContextData, |
no test coverage detected