mirror of
https://github.com/wassname/pi-auto-compressor.git
synced 2026-09-11 12:43:11 +08:00
feat: Add early trigger, update state logic and README.md
This commit is contained in:
@@ -17,6 +17,7 @@ export interface DcpState {
|
||||
totalPruneCount: number
|
||||
previousSummary: string | null
|
||||
compressionCount: number
|
||||
forceCompressNext?: boolean
|
||||
}
|
||||
|
||||
export function createState(): DcpState {
|
||||
@@ -28,6 +29,7 @@ export function createState(): DcpState {
|
||||
totalPruneCount: 0,
|
||||
previousSummary: null,
|
||||
compressionCount: 0,
|
||||
forceCompressNext: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +41,7 @@ export function resetState(state: DcpState): void {
|
||||
state.totalPruneCount = 0
|
||||
state.previousSummary = null
|
||||
state.compressionCount = 0
|
||||
state.forceCompressNext = false
|
||||
}
|
||||
|
||||
function sortObjectKeys(value: unknown): unknown {
|
||||
|
||||
Reference in New Issue
Block a user