fix(shared): improve compaction marker and tmux server health

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-10 15:53:09 +09:00
parent 7244d048fb
commit bd910ad011
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -30,12 +30,16 @@ export function isCompactionMessage(message: CompactionMessageLike): boolean {
return isCompactionAgent(message.info?.agent ?? message.agent) || hasCompactionPart(message.parts)
}
export function getCompactionPartStorageDir(messageID: string): string {
return join(PART_STORAGE, messageID)
}
export function hasCompactionPartInStorage(messageID: string | undefined): boolean {
if (!messageID) {
return false
}
const partDir = join(PART_STORAGE, messageID)
const partDir = getCompactionPartStorageDir(messageID)
if (!existsSync(partDir)) {
return false
}
@@ -58,4 +58,5 @@ export async function isServerRunning(serverUrl: string): Promise<boolean> {
export function resetServerCheck(): void {
serverAvailable = null
serverCheckUrl = null
delete (globalThis as Record<symbol, boolean>)[SERVER_RUNNING_KEY]
}