mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 00:30:48 +00:00
Earlier draft used a simple normalize-and-fall-through resolver: any empty/whitespace per-chat_id systemPrompt fell through to the groups['*'] wildcard. That doesn't match the WhatsApp resolver (extensions/whatsapp/src/system-prompt.ts), where defining the systemPrompt key on the specific group (even as '') means 'this group has no prompt' and suppresses the wildcard. Make iMessage resolution byte-identical: - specific != null && specific.systemPrompt != null -> use the trimmed specific (empty trim -> undefined, wildcard suppressed). - otherwise -> trimmed wildcard. Add the resolver as a small exported helper resolveIMessageGroupSystemPrompt so the unit tests cover it directly. Update the per-group systemPrompt doc section in docs/channels/imessage.md to copy WhatsApp's resolution hierarchy language and add an explicit-suppression example. Refs #78285.