#rss get: 3-5 separate messages with short headers (v0.21.0) #43

Merged
kamilkrzywda merged 1 commits from feat/rss-multi-message into main 2026-09-25 22:12:05 +02:00
Owner

Owner request: the single ≤190-char summary is too small — #rss get now sends 3–5 SEPARATE mesh messages, each <short header>: <one or two short sentences> (header ≤20 chars).

  • New LLM prompt asks for exactly 3–5 lines in that format; maxTokens stays 2500 (reasoning tokens count against the cap on this server)
  • Reply parsed into items: split/trim, drop empty + header-less lines, cap at 5, <3 → send what we got, 0 valid → nothing sent
  • Each item sent via its own respond(id, line) — all threaded to the trigger packet id on its channel (DM→DM / broadcast→broadcast)
  • Per-item backstop: >185-char lines hard-cut at a word boundary near 180 (fitOneLine); old whole-reply ≤190 cut removed
  • Multi-send implemented as handler returning string[] + per-line loop in CommandService (routing stays in one place; legacy no-id fallback works per line)
  • LLM failure path unchanged: single "summary failed" reply

Tests 158 → 165, build clean, oxlint clean. Lockfile untouched.

Owner request: the single ≤190-char summary is too small — `#rss get` now sends 3–5 SEPARATE mesh messages, each `<short header>: <one or two short sentences>` (header ≤20 chars). - New LLM prompt asks for exactly 3–5 lines in that format; maxTokens stays 2500 (reasoning tokens count against the cap on this server) - Reply parsed into items: split/trim, drop empty + header-less lines, cap at 5, <3 → send what we got, 0 valid → nothing sent - Each item sent via its own `respond(id, line)` — all threaded to the trigger packet id on its channel (DM→DM / broadcast→broadcast) - Per-item backstop: >185-char lines hard-cut at a word boundary near 180 (`fitOneLine`); old whole-reply ≤190 cut removed - Multi-send implemented as handler returning `string[]` + per-line loop in CommandService (routing stays in one place; legacy no-id fallback works per line) - LLM failure path unchanged: single "summary failed" reply Tests 158 → 165, build clean, oxlint clean. Lockfile untouched.
kamilkrzywda added 1 commit 2026-09-25 22:11:59 +02:00
Send #rss get summaries as 3-5 separate mesh messages (v0.21.0)
CI / build + unit (pull_request) Successful in 1m20s
cdd52a3ddb
The single-message summary was too small (owner request). The summarizer
prompt now asks for exactly 3-5 lines, one item per line, in the format
'<short header>: <one or two short sentences>' with a <=20-char header,
no intro/outro/numbering. maxTokens stays 2500 (reasoning-token headroom).

The reply is parsed into items: drop empty lines and lines without a ':'
header separator, cap at 5; fewer than 3 valid lines sends what we got
(no failure/retry), zero valid lines sends nothing. Each item goes out as
its own mesh message via respond(id, line) - all threaded to the trigger
packet id on its channel. Per-item backstop fitOneLine() hard-cuts any
line >185 chars at a word boundary near 180 so every item fits one packet;
the old whole-reply fitOnePacket() cut is gone.

CommandService sends array replies line by line through the same routing
as single replies (respond per line, or legacy sendText fallback per line
when there is no packet id). LLM failure path unchanged: single
'summary failed' reply.
kamilkrzywda merged commit 73ce49c741 into main 2026-09-25 22:12:05 +02:00
kamilkrzywda deleted branch feat/rss-multi-message 2026-09-25 22:12:05 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/MeshBot#43