fix: pin status posts, staleness filter, correct transcript parsing

- Auto-pin status posts on creation, unpin on session completion
- Skip stale sessions (>5min since last transcript write)
- Parse OpenClaw JSONL format (type:message with nested role/content)
- Handle timestamp-prefixed transcript filenames
This commit is contained in:
sol
2026-03-07 18:41:23 +00:00
parent 7c6c8a4432
commit b5bde4ec20
2 changed files with 17 additions and 0 deletions

View File

@@ -331,6 +331,14 @@ async function startDaemon() {
logger.error({ sessionKey, err }, 'Failed to update final status');
}
// Unpin the status post when session is done
try {
await sharedStatusBox._apiCall('POST', `/api/v4/posts/${box.postId}/unpin`, null);
logger.debug({ sessionKey, postId: box.postId }, 'Status post unpinned');
} catch (unpinErr) {
logger.warn({ sessionKey, err: unpinErr }, 'Failed to unpin status post');
}
// Clean up
activeBoxes.delete(sessionKey);
watcher.removeSession(sessionKey);