Summary:
Add a simple metadata flag to message history responses so the frontend can tell whether system instructions were used during answer generation.
Why:
The message pipeline in backend/controllers/chatMessage.controller.js builds different system instructions depending on vector and vectorless retrieval. The frontend has no structured way to know whether a response used documentation context or a plain general-answer fallback.
Files to change:
backend/controllers/chatMessage.controller.js
Acceptance criteria:
- Message history responses include a boolean metadata field such as
hasSystemInstructions.
- No raw instruction text or private content is leaked.
- Existing message rendering still works without changes.
Implementation notes:
- Add the flag at the serialization layer rather than changing the stored database schema.
- Keep it boolean so the frontend can use it easily.
Summary:
Add a simple metadata flag to message history responses so the frontend can tell whether system instructions were used during answer generation.
Why:
The message pipeline in
backend/controllers/chatMessage.controller.jsbuilds different system instructions depending on vector and vectorless retrieval. The frontend has no structured way to know whether a response used documentation context or a plain general-answer fallback.Files to change:
backend/controllers/chatMessage.controller.jsAcceptance criteria:
hasSystemInstructions.Implementation notes: