mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-01 02:01:35 +00:00
The chat search modal (Cmd+K) already searches within message content but only displayed chat titles, giving users no indication of why a chat matched their query. This adds a content snippet below each search result showing the matching text with the query term highlighted. The snippet is a ~200 char window centered on the first content match, with ellipsis for truncated text. Backend: extract snippet from already-loaded ChatModel objects (zero extra DB cost). Frontend: render snippet with highlighted query via <mark> tags with theme-aware styling. |
||
|---|---|---|
| .. | ||
| data | ||
| internal | ||
| migrations | ||
| models | ||
| retrieval | ||
| routers | ||
| socket | ||
| static | ||
| storage | ||
| tools | ||
| utils | ||
| __init__.py | ||
| alembic.ini | ||
| config.py | ||
| constants.py | ||
| env.py | ||
| functions.py | ||
| main.py | ||
| tasks.py | ||