fix: use systemPrompt instead of prependContext for end marker instruction #5

Merged
zhi merged 1 commits from fix/moderator-and-system-prompt into feat/turn-based-speaking 2026-02-28 19:25:24 +00:00
Collaborator

Changes

  1. Fix prompt injection: Changed before_prompt_build hook to return systemPrompt instead of prependContext. This ensures the end marker instruction is injected once per session as a system prompt, not repeatedly prepended to each user message.

  2. Add moderatorBotToken to config docs: Added moderatorBotToken field to CONFIG.example.json for documentation.

  • Issue 1: moderator completely not working (needs moderatorBotToken config)
  • Issue 2: injected prompt being injected on every user message instead of as system prompt
## Changes 1. **Fix prompt injection**: Changed `before_prompt_build` hook to return `systemPrompt` instead of `prependContext`. This ensures the end marker instruction is injected once per session as a system prompt, not repeatedly prepended to each user message. 2. **Add moderatorBotToken to config docs**: Added `moderatorBotToken` field to CONFIG.example.json for documentation. ## Related Issues - Issue 1: moderator completely not working (needs moderatorBotToken config) - Issue 2: injected prompt being injected on every user message instead of as system prompt
zhi added 1 commit 2026-02-28 19:25:10 +00:00
- Change before_prompt_build hook to return systemPrompt instead of prependContext
- This ensures the end marker instruction is injected once per session as a system prompt, not repeatedly prepended to each user message
- Add moderatorBotToken to CONFIG.example.json for documentation
zhi merged commit 6a81f75fd0 into feat/turn-based-speaking 2026-02-28 19:25:24 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nav/Dirigent#5