refactor: split oversized hook.ts to respect 200 LOC limit
- Extract types to types.ts - Extract constants to constants.ts - Extract session ID helpers to session-id.ts - Extract recovery logic to recovery.ts hook.ts reduced from 331 to 164 LOC Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function isCompactionAgent(agent: string | undefined): boolean {
|
||||
return agent?.trim().toLowerCase() === "compaction"
|
||||
}
|
||||
|
||||
export function resolveSessionID(props?: Record<string, unknown>): string | undefined {
|
||||
return (props?.sessionID ??
|
||||
(props?.info as { id?: string } | undefined)?.id) as string | undefined
|
||||
}
|
||||
Reference in New Issue
Block a user