Skip to content

fix(chat): tighten runtime internal-message filtering and add targeted tests#891

Merged
su8su merged 1 commit intomainfrom
remove_useless_system_message
Apr 22, 2026
Merged

fix(chat): tighten runtime internal-message filtering and add targeted tests#891
su8su merged 1 commit intomainfrom
remove_useless_system_message

Conversation

@su8su
Copy link
Copy Markdown
Contributor

@su8su su8su commented Apr 22, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/stores/chat.ts
function isRuntimeSystemInjection(text: string): boolean {
if (!text) return false;
const normalized = text.trim();
if (/^\s*System\s*\(untrusted\)\s*:/i.test(normalized)) return true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@su8su su8su merged commit c29ff4d into main Apr 22, 2026
6 checks passed
@su8su su8su deleted the remove_useless_system_message branch April 22, 2026 09:23
HonoACC pushed a commit to HonoACC/HonoClaw that referenced this pull request Apr 22, 2026
DigitalNomad-Chat added a commit to DigitalNomad-Chat/ClawX that referenced this pull request Apr 26, 2026
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant