Repository navigation
feat(mcp): Allow toggle MCPs on/off - #3725
Conversation
|
Hm.. I'm thinking maybe there would be a switch, like in model picker to choose between disabling/enabling globally and locally? How do you like that idea? (Anyone can discuss this) |
|
yes! |
4024362 to
50ff82f
Compare
|
@andrinoff can you review this when you have time? |
andrinoff
left a comment
There was a problem hiding this comment.
Also, disabling a MCP that requires auth results in MCP asking to auth. It should only disable it
andrinoff
left a comment
There was a problem hiding this comment.
For UI review: @meowgorithm
27b8314 to
8d54273
Compare
|
You rock, Bruno. And really solid suggestions, Drew. Small UX requests
And after this this we should also do this for skills and tools too. |
Yep, its on my TODO list |
Done, updated the first post with the updated image. |
6f84064 to
21e323b
Compare
21e323b to
c598c32
Compare
|
@meowgorithm we good with the UX or do we need more adjustments? |
|
We're good to go! @andrinoff, if this looks good to you let’s merge it! /cc @gurnben |
* ui: add mouse support to the quit dialogue * ui: keep quit dialog buttons visible in small terminals * ui: align quit dialog button hit regions with centered row * ui: report all mouse motion while hoverable dialogs are open * ui: cover quit dialog mouse buttons and hover reporting in tests * chore(legal): @KevinFumbles has signed the CLA * chore(legal): @djbclark has signed the CLA * chore(legal): @wcqqq1214 has signed the CLA * chore(legal): @Souptik96 has signed the CLA * chore(legal): @alyraffauf has signed the CLA * test(server): stop a timing race from failing a fire-and-forget test (charmbracelet#3967) * chore(legal): @valdepeace has signed the CLA * chore(legal): @vitolee-1018 has signed the CLA * feat(mcp): Allow toggle MCPs on/off (charmbracelet#3725) * chore: auto-update files * fix: reorder migrations * feat(tui): display git branch (charmbracelet#2437) Co-authored-by: Kieran Klukas <kieran@dunkirk.sh> Co-authored-by: drew <me@andrinoff.com> Signed-off-by: drew <me@andrinoff.com> * v0.97.0 Signed-off-by: drew <me@andrinoff.com> * fix: remove the powerline symbol Signed-off-by: drew <me@andrinoff.com> * v0.97.1 Signed-off-by: drew <me@andrinoff.com> * chore(legal): @Shub3am has signed the CLA * chore(legal): @raytorresch has signed the CLA * server: add support for git branches * refactor(ui): poll the git branch off the render path Reading the branch was wired into the three places that render it, so a redraw could kick off a network request as a side effect and the value had to be guarded by its own mutex, in-flight flag, and expiry. The TUI already has a pattern for header data that has to be fetched: a ticker sends a poll message, a command does the work with its own timeout, and the result lands in model state that views read plainly. The Hyper credits balance is fetched this way and is passed into the header alongside what this now passes. Moving the branch onto that path drops the second cache entirely. With no caller left asking once per frame, the cache inside the git helper had nothing to protect either, and removing it also removes the stale window where a client could show a branch two expiries out of date. Asking for the branch now names its cost: it takes a context and can fail, which is honest for something that crosses the network in client/server mode. * perf(prompt): read the current git branch without spawning a shell * test: remove signing off of the branch test (charmbracelet#3999) Signed-off-by: drew <me@andrinoff.com> * chore(legal): @0-wiz-0 has signed the CLA * fix(ui): stop the attachment row from claiming files that are visible On a narrow editor the row budgeted every attachment chip at the widest filename it allows rather than the width it actually needs, so a single short-named file was counted as overflowing its own row and got an unstyled "1 more…" tacked on beside it, promising a file already on screen. Chips are now measured as they are laid out, the hint counts only what was left out, and it is drawn with a theme style. When the row has space for just one chip, that chip now gives up filename width so the hint can stay, rather than dropping the count and leaving several attached files looking like one. The name is trimmed down to a floor; past it the name would be mostly ellipsis and identify nothing, so the hint gives way instead. The renderer's style constructor also took seven positional arguments of the same type, so adding the hint's style meant editing eight files and the compiler could not have caught a transposition. Those styles now travel as one named value. --------- Signed-off-by: drew <me@andrinoff.com> Co-authored-by: Christian Rocha <christian@rocha.is> Co-authored-by: Charm <124303983+charmcli@users.noreply.github.com> Co-authored-by: Kieran Klukas <kieran@dunkirk.sh> Co-authored-by: Bruno Krugel <brunokrugel@gmail.com> Co-authored-by: Gustave <2909789120@qq.com> Co-authored-by: drew <me@andrinoff.com> Co-authored-by: Drew Smirnoff <drew@charm.land>
* ui: add mouse support to the quit dialogue * ui: keep quit dialog buttons visible in small terminals * ui: align quit dialog button hit regions with centered row * ui: report all mouse motion while hoverable dialogs are open * ui: cover quit dialog mouse buttons and hover reporting in tests * chore(legal): @KevinFumbles has signed the CLA * chore(legal): @djbclark has signed the CLA * chore(legal): @wcqqq1214 has signed the CLA * chore(legal): @Souptik96 has signed the CLA * chore(legal): @alyraffauf has signed the CLA * test(server): stop a timing race from failing a fire-and-forget test (charmbracelet#3967) * chore(legal): @valdepeace has signed the CLA * chore(legal): @vitolee-1018 has signed the CLA * feat(mcp): Allow toggle MCPs on/off (charmbracelet#3725) * chore: auto-update files * fix: reorder migrations * feat(tui): display git branch (charmbracelet#2437) Co-authored-by: Kieran Klukas <kieran@dunkirk.sh> Co-authored-by: drew <me@andrinoff.com> Signed-off-by: drew <me@andrinoff.com> * v0.97.0 Signed-off-by: drew <me@andrinoff.com> * fix: remove the powerline symbol Signed-off-by: drew <me@andrinoff.com> * v0.97.1 Signed-off-by: drew <me@andrinoff.com> * chore(legal): @Shub3am has signed the CLA * chore(legal): @raytorresch has signed the CLA * server: add support for git branches * refactor(ui): poll the git branch off the render path Reading the branch was wired into the three places that render it, so a redraw could kick off a network request as a side effect and the value had to be guarded by its own mutex, in-flight flag, and expiry. The TUI already has a pattern for header data that has to be fetched: a ticker sends a poll message, a command does the work with its own timeout, and the result lands in model state that views read plainly. The Hyper credits balance is fetched this way and is passed into the header alongside what this now passes. Moving the branch onto that path drops the second cache entirely. With no caller left asking once per frame, the cache inside the git helper had nothing to protect either, and removing it also removes the stale window where a client could show a branch two expiries out of date. Asking for the branch now names its cost: it takes a context and can fail, which is honest for something that crosses the network in client/server mode. * perf(prompt): read the current git branch without spawning a shell * test: remove signing off of the branch test (charmbracelet#3999) Signed-off-by: drew <me@andrinoff.com> * chore(legal): @0-wiz-0 has signed the CLA * fix(ui): stop the attachment row from claiming files that are visible On a narrow editor the row budgeted every attachment chip at the widest filename it allows rather than the width it actually needs, so a single short-named file was counted as overflowing its own row and got an unstyled "1 more…" tacked on beside it, promising a file already on screen. Chips are now measured as they are laid out, the hint counts only what was left out, and it is drawn with a theme style. When the row has space for just one chip, that chip now gives up filename width so the hint can stay, rather than dropping the count and leaving several attached files looking like one. The name is trimmed down to a floor; past it the name would be mostly ellipsis and identify nothing, so the hint gives way instead. The renderer's style constructor also took seven positional arguments of the same type, so adding the hint's style meant editing eight files and the compiler could not have caught a transposition. Those styles now travel as one named value. --------- Signed-off-by: drew <me@andrinoff.com> Co-authored-by: Christian Rocha <christian@rocha.is> Co-authored-by: Charm <124303983+charmcli@users.noreply.github.com> Co-authored-by: Kieran Klukas <kieran@dunkirk.sh> Co-authored-by: Bruno Krugel <brunokrugel@gmail.com> Co-authored-by: Gustave <2909789120@qq.com> Co-authored-by: drew <me@andrinoff.com> Co-authored-by: Drew Smirnoff <drew@charm.land>
共 4 个上游提交: - a9a257c feat(mcp): Allow toggle MCPs on/off (charmbracelet#3725) - 1f3827b fix: reorder migrations - 06e50a3 chore: auto-update files - 056387b chore(legal): CLA 迁移文件与本地允许乱序迁移的补丁并存,无重名冲突。




This PRs adds a new menu option that allows the user to enable and disable MCPs on demand (saved per repository, not globally).
When we disable/enable any MCP we also have a toast with status:

Closes #3234
CONTRIBUTING.md.