init
This commit is contained in:
commit
ec53fcbe95
1905 changed files with 513762 additions and 0 deletions
18
services/compact/compactWarningState.ts
Normal file
18
services/compact/compactWarningState.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue