Repository navigation
fix(chat): hide the raw 'Tool removed: ask_user_question' line (#140) - #150
Conversation
FlyBot already restrict()s ask_user_question off Bot sessions. DSH then writes a developer tool-removal context cell, and the chat UI prints "Tool removed: ask_user_question". Shadow that context node and hide only those notices; other tool cells stay. Fixes ThinkFlowLab#140. Co-authored-by: Danyang Chen <birfychen@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69bdf28dc8
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (block?.type === 'tool-removal' && block.toolName) parts.push(`Tool removed: ${block.toolName}`) | ||
| else if (block?.type === 'tool-addition' && block.toolName) parts.push(`Tool added: ${block.toolName}`) |
There was a problem hiding this comment.
Route context labels through the locale service
When the DSH language is Chinese and hidePluginTools changes a Bot's allowed plugin tools (core/src/host/hooks.js:642-656), this replacement renders those non-hidden addition/removal blocks with hard-coded English. Client copy is meant to follow the active DSH language (core/src/client/i18n.js:1-3), and unlike the surrounding cells these labels never call t(), so the rows stay English and cannot update on a language switch; route both labels through the locale service and add their Chinese entries.
Useful? React with 👍 / 👎.
Hides the raw
Tool removed: ask_user_questionline that DSH core shows in Bot chats. FlyBot removesask_user_questionfrom Bot sessions on purpose, which is what produces the notice.ContextCellnow returns nothing for those tool-removal notices only. Other tool-change context andtool-callcells are unchanged. Covered by a test.Closes the last remainder of #140.
Fixes #140