webui: fix tool selector toggle/counter, key tools by stable identity#24065
Merged
allozaur merged 2 commits intoJun 4, 2026
Merged
Conversation
Key the disabled set, counts and toggles by a stable per-tool key instead of bare function name, deduped from one canonical list. Per-tool checkboxes become presentational (single row handler, no nested button), category checkboxes drop the tristate (n/total carries partial). One getEnabledToolsForLLM keeps normalized MCP schemas and dedupes by name.
Contributor
Author
|
Thanks @MaxKruse for the repro and the first fix. |
|
@ServeurpersoCom All good on my end! Thx! |
allozaur
approved these changes
Jun 3, 2026
Contributor
Author
|
I still have one small commit to make for linter |
… svelte/prefer-svelte-reactivity
allozaur
approved these changes
Jun 4, 2026
ggerganov
approved these changes
Jun 4, 2026
gabe-l-hart
added a commit
to gabe-l-hart/llama.cpp
that referenced
this pull request
Jun 4, 2026
* origin/master: (57 commits) server : disable on-device spec checkpoints (ggml-org#24108) arg: fix double mtp downloads (ggml-org#24128) webui: [a11y] fix keyboard navigation issues in chat interface and sidebar (ggml-org#23132) Move duplicated imatrix code into single common imatrix-loader.cpp (ggml-org#22445) ui: Fixed packages (ggml-org#24119) ui: added single line reasoning preview (ggml-org#23601) return filter to save memory (ggml-org#24125) convert: Fix Gemma 4 Unified conversion (ggml-org#24118) ggml: vectorize ggml_vec_dot_q4_1_q8_1 with WASM SIMD128 (ggml-org#22209) server: avoid unnecessary checkpoint restore when new tokens are present (ggml-org#24110) agents: refactor, include more guidelines (ggml-org#24111) webui: fix tool selector toggle/counter, key tools by stable identity (ggml-org#24065) build : use umbrella Headers directory for XCFramework module map (ggml-org#23974) server : add header to tools/server/server-http.h (ggml-org#24089) cmake: skip cvector-generator and export-lora when CPU backend is disabled (ggml-org#24053) fix(mtmd): handle Gemma 4 audio projector embedding size (ggml-org#24091) readme : add status badges (ggml-org#24104) tests : refactor test-save-load-state to accept token input (ggml-org#24073) metal : reduce rset heartbeat from 500ms -> 5ms (ggml-org#24074) ggml-webgpu: FlashAttention refactor + standardize quantization support (ggml-org#23834) ...
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.
Overview
Refactor and simplify the tool selector logic, builtin and MCP.
Two visual states for every checkbox, matching the internal state, and a plain Select-All for categories. Dropped the tristate since the n/total count already shows partial selection
Additional information
The disabled set was keyed by the bare function name, so duplicate names in a group counted twice and toggled together, and the same name across groups bled between counters. On top of that each row nested a checkbox button inside the row button, which double-fired the toggle on a direct click and was invalid HTML that only broke on some browsers. The fix is to give every tool a stable key (builtin:name, mcp-serverId:name, custom:name) and route the disabled set, counts, toggles and group state through it, all derived from one canonical deduped list. The checkboxes become presentational so the row owns the single handler, and the enabled-tools and lookup paths are merged down to one each.
Disabled selection resets once (new storage key, no migration), quick to reconfigure. Around 50 lines removed.
Closes #22796, supersedes #23276.
Video
ToolSelector.mp4
Requirements