feat: add ToolsConfig panel with individual tool toggles#67
Open
fallleave001 wants to merge 4 commits into
Open
feat: add ToolsConfig panel with individual tool toggles#67fallleave001 wants to merge 4 commits into
fallleave001 wants to merge 4 commits into
Conversation
… settings.json - New ToolsConfig component with per-tool toggle switches (built-in + extensions) - New /api/tools endpoint for tool enumeration and config persistence - Tools button in left sidebar replaces old wrench-icon preset dropdown - Config stored in settings.json 'activeTools' field, shared with pi-cli - startRpcSession reads saved config on session creation - getPresetFromTools uses superset matching for extension compatibility
…after Disable all
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates since PR #39 (closed)
app/api/tools/route.ts— 存[]时不再删 keylib/rpc-manager.ts—[].length > 0改为Array.isArray(),空数组不被过滤hooks/useAgentSession.ts— 新建会话时同样处理空数组Summary
Replace the old wrench-icon Low/High/Off preset dropdown with a ToolsConfig
modal panel where each tool (built-in + extension) can be individually
toggled. Config is persisted to
settings.jsonunderactiveTools, sharedwith pi-cli.
Changes
app/api/tools/route.tsactiveToolsin settings.jsoncomponents/ToolsConfig.tsxlib/rpc-manager.tsstartRpcSessionreadsactiveToolsfrom settings.jsoncomponents/AppShell.tsxcomponents/ChatInput.tsxhooks/useAgentSession.ts/api/toolsBug Fixes
v3 includes a fix for "Disable all" not persisting: empty
activeToolsarraywas treated as "no config" in three places (API write/read, backend session
init, frontend session creation). All three are fixed.
Note
This PR is based on
28967e6(v0.6.12). The upstream has since added IMEcomposition handling in
ChatInput.tsxand workspace validation inSessionSidebar.tsx— this PR modifies both files and will need conflictresolution during merge.