Skip to content

docs(shortcuts): align shortcuts guide with current behavior - #1327

Merged
edenreich merged 1 commit into
mainfrom
fix/issue-1317
Sep 25, 2026
Merged

edenreich merged 1 commit into
mainfrom
fix/issue-1317

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Resolves #1317

Summary

docs/shortcuts-guide.md described shortcut loading, naming and several built-in shortcuts the way they used to work. Every claim was re-verified against the current code and corrected, and the multi-word shortcut examples were rewritten in the actually-working subcommands: form.

Changes

  • Advanced Usage: the name: "mod tidy", name: "docker build" and name: "docker run" examples could never match, since Registry.ParseShortcut (internal/presentation/shortcuts/registry.go) takes the first whitespace-separated token as the shortcut name (/docker build looks up a shortcut called docker). Rewritten as one shortcut with subcommands:, plus a short paragraph documenting the first-token naming rule and how subcommand args compose (args: of the shortcut, then the subcommand's name, then the subcommand's args:). Verified by running the resolution code on the new YAML: /mod tidy -> go mod tidy, /docker build -> docker build -t myapp ., /docker run -> docker run -p 8080:8080 myapp.
  • README.md: the custom-docker.yaml example the issue cites had the subcommand's own name duplicated in args:, which resolved to docker build build ... (the loader appends the subcommand name automatically). Dropped the duplicated - build / - run entries so the README example matches the guide and actually runs.
  • Configuration File Format and Troubleshooting: files no longer need to be named custom-*.yaml - LoadCustomShortcuts (internal/presentation/shortcuts/custom.go) loads every *.yaml in shortcuts/ (that is how the seeded git.yaml and scm.yaml load). The real pitfall, .yml files not being picked up, is now documented.
  • Init-Created Shortcuts: /agents supports list|add|remove only (the seeded a2a.yaml in cmd/init/init.go); infer agents has no enable/disable subcommand (cmd/agents/agents.go).
  • Project setup: /install-opentask no longer runs an interactive wizard, pre-scans for .pem files or generates .github/workflows/infer.yml. It takes [owner/repo] [extra context...] and sends an install task to the chat agent (internal/presentation/shortcuts/install_opentask.go), which creates or updates .github/workflows/tasks.yml on an install branch and opens (or updates) a pull request (InstallChatPrompt in internal/github/setup/install_prompt.go).
  • Image Generation: image models are no longer recognised by name. The model list keeps only models whose gateway-reported modalities are chat-capable and drops models that report none (ListModels in internal/conversation/model.go via IsChatCapableModalities in internal/platform/models/context.go); non-chat models can appear as view-only rows in the picker but cannot be selected.
  • Project Initialization Shortcut: the /init prompt lives in prompts.yaml under init.prompt (env INFER_PROMPTS_INIT_PROMPT, config/prompts.go), not in config.yaml.

Docs-only change: no user-facing behavior was altered, so no docs ticket is needed.

Side observation (out of scope here, not changed): the seeded scm.yaml (createSCMShortcutsFile in cmd/init/init.go) repeats the gh argument in the subcommand args:, so /scm issues resolves to gh issues issue list ..., which gh rejects. Tracked in a follow-up issue.

Rewrite the multi-word shortcut examples (mod tidy, docker build/run) as subcommands so they are invocable and document the first-token naming rule; correct the file-naming claim (any *.yaml in shortcuts/ loads, .yml does not); trim /agents to its list|add|remove subcommands; describe /install-opentask as the chat-agent install task that lands .github/workflows/tasks.yml on an install branch and opens a PR; describe modalities-based image-model filtering; and point /init's prompt at prompts.yaml init.prompt.

Also drop the duplicated subcommand args from the README custom-docker.yaml example, which resolved to docker build build.
@edenreich
edenreich marked this pull request as ready for review September 25, 2026 22:10
@edenreich
edenreich requested a review from a team as a code owner September 25, 2026 22:10
@edenreich
edenreich merged commit f9119c4 into main Sep 25, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-1317 branch September 25, 2026 22:10
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.208.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Shortcuts guide describes shortcut loading and /install-opentask behavior the code no longer has

1 participant