Chat search: multi-room listing no longer advises a chunk-losing --after #71
Loading…
Reference in a new issue
No description provided.
Delete branch "eureka/chat-listing-continuation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes follow-up
gamecult-chat:follow_up:chat-search-listing-cursorin part (the lossy advice); the owner fix is specified below and not built here.Defect
huginn chat searchwith no texts lists chunks oldest-first byts_start_msand, when truncated, printed--after <last.ts_end_ms + 1>.--afterkeeps chunks whose span ends at or after the instant. Across rooms the spans overlap (r1 [1..10], r2 [5..20], r3 [6..8], top_k=1: page 1 = r1,--after 11returns r2 and skips r3). Chunks in one room do not overlap, so single-room paging is correct.This PR
render::chat_hitstakesone_room; the CLI passesrooms.len() == 1. A truncated listing of one room keeps the--afterline; any other listing says--aftercannot continue several rooms and to list one--roomat a time. Test:chat_search_prints_cited_messages_and_sends_its_selectorscovers one room, none named, two named.cargo clippy --workspace --all-targets -- -D warningsclean on the pinned 1.95.0 (with #72's one-line fix applied; main alone is red there).Spec for the owner fix (not in this PR)
search_chat,ChatIndex::chat_scroll), not the renderer. The continuation is a typedChatCursor { ts_start_ms, after_event_id }carried inChatQuery.cursorand returned inChatHits.next; the CLI prints--cursor <token>,--afterstays a time filter only.order_by ts_start_mshas no id tiebreak, so ties at onets_start_msneed the scroll to start atstart_from = ts_start_msinclusive and skip hits up to and includingafter_event_idin a stable (room, first_event_id) order; the fake index must order the same way.ChatQueryandChatHitsgain an optional field; schemas underschemas/regenerate; daemon and CLI deploy together (daemon first).chat_hitfiltering a boundary chunk to nothing leavestruncatedtrue with fewer than k hits (compute truncation after the filter, or continue from the last scrolled chunk, not the last printed). Bodies already print on one line with\nescaped.