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