Skip to content

feat(tools-box): introduce tools modal with builtin tools, mcp, and subagents #1854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

spoons-and-mirrors
Copy link
Contributor

@spoons-and-mirrors spoons-and-mirrors commented Aug 12, 2025

Introduce the tool box

This feature rich PR provides users with fine-grained control over their Agent's capabilities while maintaining a clean, intuitive interface that integrates seamlessly with the existing TUI experience. Deprecating #1767

image

UX Enhancements

  • Granular: The dialog lets users tailor an agent's complete toolkit without changing global configurations.
  • Clean UX: Toggle anything on or off, the dialog visually distinguishes between default and overridden settings, making it clear how the agent's behavior has been modified.
  • Agent-Specific Configurations: Users can switch between primary agents with the dialog opened (pressing tab) to manage toolsets independently for each one.
  • Fuzzy: Search matches "mcp" and "subagent" categories
  • Persisted: Tool config persists to state and is session(conversation) and agent scoped

Issues

Resolves #1142

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This violates the AGENTS.md guideline: AVOID using any type. Consider: Use a more specific type like Record<string, { name: string; description: string; type: string; source: string; defaultEnabled: boolean }>

File: packages/opencode/src/agent/agent.ts
Line: 143

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This violates the AGENTS.md guideline: AVOID using any type. Consider: Use a more specific type like Record<string, { name: string; description: string; type: string; source: string; defaultEnabled: boolean }>

File: packages/opencode/src/mcp/index.ts
Line: 158

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This violates the AGENTS.md guideline: AVOID using any type. Consider: Use a more specific type like Record<string, { name: string; description: string; type: string; source: string; defaultEnabled: boolean }>

File: packages/opencode/src/tool/registry.ts
Line: 92

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This violates the AGENTS.md guideline: AVOID else statements. Consider: Restructure this if-else block to avoid the else clause by returning early or using separate conditional blocks.

File: packages/opencode/src/session/index.ts
Around lines 817-830 in the diff (the else block in the agent description replacement logic)

@thdxr
Copy link
Contributor

thdxr commented Aug 12, 2025

OK quick thoughts

  • i see what you did with unifying under the concept of resource but i think we should leave them as separate things. basically make a tool endpoint and reuse the existing agent endpoint. i'm factoring in some plans we have for other clients with this + sync engine things

  • for agent overrides - i think we should track this durably in the session? that way if you switch back to the session it's the same config? i'm actually planning on getting rid of mode of the state() in the Session module

@spoons-and-mirrors
Copy link
Contributor Author

spoons-and-mirrors commented Aug 12, 2025

Heard. @thdxr

- stupid amount of commits rebased, no need to see my struggles
- reusing existing api endpoint and add
- session based agent config override
@spoons-and-mirrors spoons-and-mirrors force-pushed the feat/tool-box-with-agents branch from 1488dda to b11635e Compare August 13, 2025 04:24
@spoons-and-mirrors
Copy link
Contributor Author

all done !

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.

A Command to List Tools
2 participants