| 783 | 783 | continue; |
| 784 | 784 | } |
| 785 | 785 | |
| 786 | 786 | // Search through title and messages of the chat |
| 787 | 787 | const fragments = query.trim().toLowerCase().split(/\s+/).filter(x => x); |
| 788 | | - const hasMatch = messages.some(message => { |
| 788 | + const text = [chatFile.path.split(/[\\/]/).pop().replace(/.jsonl$/, ''), |
| 789 | 789 | const text...messages.map(message => message?.mes?)].join('\n').toLowerCase(); |
| 790 | 790 | return const texthasMatch &&= fragments.every(fragment => text.includes(fragment)); |
| 791 | | - }); |
| 792 | 791 | |
| 793 | 792 | if (hasMatch) { |
| 794 | 793 | results.push({ |