fix(chat): tighten runtime internal-message filtering and add targeted tests#891
fix(chat): tighten runtime internal-message filtering and add targeted tests#891
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3443055f52
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| function isRuntimeSystemInjection(text: string): boolean { | ||
| if (!text) return false; | ||
| const normalized = text.trim(); | ||
| if (/^\s*System\s*\(untrusted\)\s*:/i.test(normalized)) return true; |
There was a problem hiding this comment.
Avoid hiding messages based on a bare "System (untrusted):" prefix
This check classifies any user/assistant text that starts with System (untrusted): as internal, which creates false positives for normal chats where someone intentionally types or quotes that phrase. In the reviewed flow, applyLoadedMessages filters all isInternalMessage entries out of the visible transcript (src/stores/chat.ts:1570), so those legitimate messages disappear from the UI/history on reload and can affect downstream UX like session labeling; the runtime filter should require a stronger signal than this single prefix.
Useful? React with 👍 / 👎.
… dedupe (ValueCell-ai#821 ValueCell-ai#845 ValueCell-ai#870 ValueCell-ai#873 ValueCell-ai#875 ValueCell-ai#878 ValueCell-ai#880 ValueCell-ai#885 ValueCell-ai#886 ValueCell-ai#887 ValueCell-ai#891 ValueCell-ai#903) Overhaul execution graph card (collapse/expand, narration steps, web_fetch links), separate thinking messages, render LaTeX math, dedupe optimistic messages, hide recoverable gateway timeouts, add startup history recovery.
No description provided.