/
sbars
/
claude-code
Обзор
Документация
Войти
/
sbars
/
claude-code
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
services/compact/compactWarningState.ts
18 строк
693 B
kuberwastaken
init
31 мар 2026, 13:55
31 мар 2026, 13:55
ec53fcb
Код
Авторство
О чём код?
import { createStore } from '../../state/store.js' /** * Tracks whether the "context left until autocompact" warning should be suppressed. * We suppress immediately after successful compaction since we don't have accurate * token counts until the next API response. */ export const compactWarningStore = createStore<boolean>(false) /** Suppress the compact warning. Call after successful compaction. */ export function suppressCompactWarning(): void { compactWarningStore.setState(() => true) } /** Clear the compact warning suppression. Called at start of new compact attempt. */ export function clearCompactWarningSuppression(): void { compactWarningStore.setState(() => false) }