Skip to content

fix(mothership): fix tool hidden in ui#4564

Merged
Sg312 merged 1 commit into
stagingfrom
dev
May 12, 2026
Merged

fix(mothership): fix tool hidden in ui#4564
Sg312 merged 1 commit into
stagingfrom
dev

Conversation

@Sg312
Copy link
Copy Markdown
Collaborator

@Sg312 Sg312 commented May 12, 2026

Summary

Fix tool hidden in ui

Type of Change

  • Bug fix

Testing

Manual

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped May 12, 2026 2:22am

Request Review

@Sg312 Sg312 changed the title Fix fix(mothership): fix tool hidden in ui May 12, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR replaces a call to the shared isToolHiddenInUi helper (from lib/copilot/tools/client/hidden-tools.ts) with an inlined HIDDEN_TOOL_NAMES Set and a local isHiddenToolCall function inside message-content.tsx.

  • The hidden-tools.ts module is retained and still consumed by four other files (use-chat.ts, store-utils.ts, tool.ts, display-message.ts), creating two independent copies of the same tool-name list.
  • Functionally the sets are identical today, but any future update to the shared module won't be reflected in message-content.tsx without a separate manual edit, risking silent leakage of internal tool calls into the rendered UI.

Confidence Score: 3/5

The change introduces a duplicate copy of the hidden-tool list that is no longer tied to the authoritative source, which could cause internal tool calls to appear in the UI if the shared list is updated without a matching edit here.

The inlined HIDDEN_TOOL_NAMES set matches hidden-tools.ts today, but the two lists are now independently maintained. Since hidden-tools.ts is still the active source for four other consumers, a future addition there won't filter in message-content.tsx, silently surfacing implementation-level tool calls in the rendered message UI.

apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx — the inlined tool-name set needs to be reconciled with the shared source in lib/copilot/tools/client/hidden-tools.ts.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx Removes import of shared isToolHiddenInUi and inlines a duplicate HIDDEN_TOOL_NAMES Set — the shared source in hidden-tools.ts is still used by four other modules, so the two lists can silently diverge.

Reviews (1): Last reviewed commit: "Fix" | Re-trigger Greptile

Comment on lines +20 to +24
const HIDDEN_TOOL_NAMES = new Set([
'tool_search_tool_regex',
'load_agent_skill',
'load_custom_tool',
])
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.

P1 Duplicated hidden-tool list will silently diverge

hidden-tools.ts still exists and is the authoritative source consumed by use-chat.ts, store-utils.ts, tool.ts, and display-message.ts. By inlining a second copy of HIDDEN_TOOL_NAMES here, any future addition to the shared set (e.g. a new internal tool) won't be picked up by parseBlocks, so those tool calls will leak into the rendered UI while every other consumer filters them correctly. The simpler fix is to restore the import of isToolHiddenInUi from @/lib/copilot/tools/client/hidden-tools.

@Sg312 Sg312 merged commit 9b333ea into staging May 12, 2026
25 checks passed
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