MCPcopy Index your code
hub / github.com/codeaashu/claude-code / checkNearCapacity

Function checkNearCapacity

src/utils/contextSuggestions.ts:55–68  ·  view source on GitHub ↗
(
  data: ContextData,
  suggestions: ContextSuggestion[],
)

Source from the content-addressed store, hash-verified

53// --
54
55function 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
70function checkLargeToolResults(
71 data: ContextData,

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected