]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server, ui: only offer a working directory when a tool reads it (#26762)
authorPascal <redacted>
Sat, 8 Aug 2026 14:36:21 +0000 (16:36 +0200)
committerGitHub <redacted>
Sat, 8 Aug 2026 14:36:21 +0000 (16:36 +0200)
commit18f7ad7fc912444acc0f51995a4b8e45fd9a0cd4
tree1d84078b81624bd6c43a4b6a9f630ff3f4fd6170
parentdd2c7c44710e860a428b46a92e2a9e39c428628b
server, ui: only offer a working directory when a tool reads it (#26762)

The working directory chip showed up as soon as the server exposed any
builtin tool, so a server started with just get_datetime, or a user who
turned every filesystem tool off in the settings, still got a control
that nothing would read.

Tools now declare whether they resolve their paths and run against the
working directory, next to the write permission they already publish in
the /tools listing. The WebUI shows the chip and enables the /cwd
command only when at least one such tool is both served and left
enabled.
tools/server/server-tools.cpp
tools/server/server-tools.h
tools/ui/src/lib/components/app/chat/ChatForm/ChatForm.svelte
tools/ui/src/lib/constants/chat-commands.ts
tools/ui/src/lib/hooks/use-chat-form-pickers.svelte.ts
tools/ui/src/lib/stores/tools.svelte.ts
tools/ui/src/lib/types/mcp.d.ts
tools/ui/tests/client/components/ChatFormPickersHarness.svelte