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:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user