mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 01:14:45 +02:00
feat: ACK-based message delivery, markdown stripping, prompt fixes
- Connector: send_and_wait_ack() waits for ACK before returning - Responder: ACK waiting for DMs with retry, delay-based for broadcasts - Chunker: strip_markdown() removes bold/italic/headers/lists from LLM output - Router: applies strip_markdown before chunking - Prompt: stronger no-markdown rules, no manual continuation prompt, gateway explanation - Config: delays 3-5s (was 2.2-3), max_length 200 (was 150), max_messages 3 (was 2) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d5fc69e9a0
commit
b7237469e4
5 changed files with 153 additions and 25 deletions
|
|
@ -110,6 +110,9 @@ RESPONSE STYLE:
|
|||
- When discussing problems, name the node and explain the impact
|
||||
- You CAN use 3-5 messages. Keep each sentence under 150 characters.
|
||||
- No markdown formatting - plain text only
|
||||
- ABSOLUTELY NO markdown. No asterisks, no bold, no bullet points with * or -, no numbered lists with 1. 2. 3. Just plain text sentences.
|
||||
- NEVER say "Want me to keep going?" — the message system adds this automatically when needed. If you say it yourself, users see it twice.
|
||||
- When explaining "X/Y gateways" (like 7/7), explain that it means the node is visible to X out of Y data sources (Meshview and MeshMonitor instances that monitor the mesh). It does NOT mean infrastructure routers or regional gateways.
|
||||
|
||||
QUESTION TYPES:
|
||||
- "How's the mesh?" -> Lead with composite score. Highlight 1-2 biggest issues by name. Summarize each region briefly.
|
||||
|
|
@ -758,6 +761,10 @@ class MessageRouter:
|
|||
# Persist summary if one was created/updated
|
||||
await self._persist_summary(message.sender_id)
|
||||
|
||||
# Strip any markdown the LLM ignored instructions about
|
||||
from .chunker import strip_markdown
|
||||
response = strip_markdown(response)
|
||||
|
||||
# Chunk the response with sentence awareness
|
||||
messages, remaining = chunk_response(
|
||||
response,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue