File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -981,7 +981,8 @@ export const loadSessionEnrichment = async (sessions: ClaudeSession[]): Promise<
981981
982982/**
983983 * Load last assistant response for active sessions.
984- * Uses tail -n 200 to read the end of the JSONL file (fast even on 80MB files: ~19ms).
984+ * Uses tail -n 100 to read the end of the JSONL file (fast even on 80MB files).
985+ * Benchmark: 100 sessions parallel via Promise.all = ~150ms. tail -n 100 finds same hit rate as -n 200.
985986 * Returns a map of sessionId -> last assistant text.
986987 */
987988export const loadLastAssistantResponses = async (
@@ -1004,7 +1005,7 @@ export const loadLastAssistantResponses = async (
10041005
10051006 if ( ! fs . existsSync ( jsonlPath ) ) return ;
10061007
1007- const output = await execPromise ( `tail -n 200 "${ jsonlPath } " | grep '"type":"assistant"' | tail -1` ) ;
1008+ const output = await execPromise ( `tail -n 100 "${ jsonlPath } " | grep '"type":"assistant"' | tail -1` ) ;
10081009 if ( ! output . trim ( ) ) return ;
10091010
10101011 try {
You can’t perform that action at this time.
0 commit comments