@@ -76,6 +76,10 @@ export class Paths {
7676 const jsonlFiles = fs
7777 . readdirSync ( this . globalProjectDir )
7878 . filter ( ( file ) => file . endsWith ( '.jsonl' ) )
79+ . filter ( ( file ) => {
80+ const sessionId = path . basename ( file , '.jsonl' ) ;
81+ return ! sessionId . startsWith ( 'agent-' ) ;
82+ } )
7983 . map ( ( file ) => {
8084 const filePath = path . join ( this . globalProjectDir , file ) ;
8185 const stats = fs . statSync ( filePath ) ;
@@ -84,12 +88,15 @@ export class Paths {
8488 // Read message count and summary
8589 let messageCount = 0 ;
8690 let summary = '' ;
91+ let gitBranch : string | undefined ;
92+ let customTitle : string | undefined ;
8793 try {
8894 const content = fs . readFileSync ( filePath , 'utf-8' ) ;
8995 const lines = content . split ( '\n' ) . filter ( Boolean ) ;
9096 messageCount = lines . length ;
9197
9298 // Extract summary: prioritize config.summary, fallback to first user message
99+ // Also scan all lines for custom-title and gitBranch
93100 if ( lines . length > 0 ) {
94101 try {
95102 const firstEntry : LogEntry = JSON . parse ( lines [ 0 ] ) ;
@@ -101,6 +108,20 @@ export class Paths {
101108 } catch ( e ) {
102109 summary = extractFirstUserMessageSummary ( lines ) ;
103110 }
111+
112+ for ( const line of lines ) {
113+ try {
114+ const entry = JSON . parse ( line ) ;
115+ if ( entry . type === 'custom-title' && entry . customTitle ) {
116+ customTitle = entry . customTitle ;
117+ }
118+ if ( entry . gitBranch ) {
119+ gitBranch = entry . gitBranch ;
120+ }
121+ } catch ( e ) {
122+ // ignore parse error
123+ }
124+ }
104125 }
105126 } catch ( e ) {
106127 // ignore read error, message count is 0
@@ -111,7 +132,8 @@ export class Paths {
111132 modified : stats . mtime ,
112133 created : stats . birthtime ,
113134 messageCount,
114- summary : normalizeSummary ( summary ) ,
135+ gitBranch,
136+ summary : normalizeSummary ( customTitle ?? summary ) ,
115137 } ;
116138 } )
117139 . sort ( ( a , b ) => b . modified . getTime ( ) - a . modified . getTime ( ) )
0 commit comments