File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const LAYOUT = {
1717 NARROW_WIDTH_THRESHOLD : 70 , // Hide buttons when terminal width is below this
1818 MAIN_CONTENT_PADDING : 2 ,
1919 INITIAL_CHATS : 25 , // Load this many immediately for fast display
20- BACKGROUND_CHATS : 975 , // Load this many more in the background for search
20+ BACKGROUND_CHATS : 475 , // Load this many more in the background for search
2121 MAX_RENDERED_CHATS : 100 , // Only render this many in the list
2222 TIME_COL_WIDTH : 12 , // e.g., "2 hours ago"
2323 MSGS_COL_WIDTH : 8 , // e.g., "99 msgs"
Original file line number Diff line number Diff line change @@ -89,12 +89,15 @@ export function getAllChats(maxChats: number = 500): ChatHistoryEntry[] {
8989 lastPrompt = getFirstUserPrompt ( messages )
9090 }
9191
92- chats . push ( {
93- chatId : info . chatId ,
94- lastPrompt,
95- timestamp : info . mtime ,
96- messageCount,
97- } )
92+ // Skip empty chats (no messages)
93+ if ( messageCount > 0 ) {
94+ chats . push ( {
95+ chatId : info . chatId ,
96+ lastPrompt,
97+ timestamp : info . mtime ,
98+ messageCount,
99+ } )
100+ }
98101 } catch ( error ) {
99102 logger . debug (
100103 { chatId : info . chatId , error : error instanceof Error ? error . message : String ( error ) } ,
You can’t perform that action at this time.
0 commit comments