Repository navigation
feat(daemon): expose list_shortcuts over AG-UI - #1718
Merged
Merged
Conversation
A daemon client can now list the shortcut registry for its / menu: built-in commands and custom shortcuts with the name, description, usage and kind the chat TUI shows. Skills stay on list_skills.
3 tasks
Contributor
|
🎉 This PR is included in version 0.246.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Resolves #1715
Summary
A daemon client of the
infer daemonAG-UI binding can now fill its/menu like the chat TUI: a new project-scopedlist_shortcutsframe answers with the shortcut registry's entries, the built-in commands and the YAML-defined custom shortcuts, each with the name, description, usage and kind the TUI shows. Skills stay on the existinglist_skillsframe.Changes
list_shortcutspanel frame andshortcutsreply ininternal/presentation/headless/panel.go, backed by the worker'sshortcuts.Registry. Entries are sorted by name, and a worker without a registry answers with an empty list. The answer rides the existingframeWriter, so it carries the lowercase app-frametype.internal/container/container.gowires the registry into the panel.internal/sessions/registry.goaddslist_shortcutsto the project-scoped request vocabulary and routes theshortcutsreply to the requester only.shortcuts.Kindwith theKindCommandandKindShortcutconstants, so the TUI badge and the frame share one implementation.docs/browser-extension-protocol.mdgains a Shortcuts section and listslist_shortcutsamong the project-scoped requests.docs/ag-ui-output.mdalready covers the panel requests aslist_*and links there, so it is unchanged.shortcutsreply reaches only its requester.Notes for review
/<name>it receives in arun_agent_inputmessage, so a client runs what it offers: a snippet shortcut throughcompletion_request, anything else through its own command surface. A worker-side command surface is left for a follow-up if the clients want one.list_skillsthemselves. The docs state the TUI's precedence: on a name clash the registry entry wins.Downstream
list_shortcutsfor their/menus. The frame is additive and both ignore unknown frame types, so no coordinated release is needed.inference-gateway/docsis not filed yet.