fix: handle special char search 500 & polish live badge (#144)

* fix(search): handle numeric query FTS errors regardless of table existence

Remove the `no such table: messages_fts` condition so numeric queries
fall back to LIKE search on any FTS failure (malformed MATCH, missing
table, etc.).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(search): handle special char queries, polish live badge UI

- Add hasUnsafeChars() to catch FTS5-breaking queries (¥, @, #, etc.)
  and fall back to LIKE search, preventing 500 errors
- Polish session live badge: smaller size, remove border/shadow,
  add pulsing dot indicator for a cleaner look
- Remove spinner drop-shadow glow effect

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-23 11:18:56 +08:00
committed by GitHub
parent 5f40ae6258
commit 1f91b902da
3 changed files with 29 additions and 13 deletions
@@ -45,7 +45,10 @@ const { t } = useI18n()
</svg>
</span>
<span class="session-item-title">{{ session.title }}</span>
<span v-if="live" class="session-item-live-badge">{{ t('chat.liveMode') }}</span>
<span v-if="live" class="session-item-live-badge">
<span class="live-dot"></span>
<span>{{ t('chat.liveMode') }}</span>
</span>
</span>
<span class="session-item-meta">
<span v-if="session.model" class="session-item-model">{{ session.model }}</span>