You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] /scm shortcuts seeded by infer init resolve to invalid gh commands #1328
The scm.yaml seeded by infer init (createSCMShortcutsFile in cmd/init/init.go) resolves to invalid gh commands, so both of its /scm subcommands fail at runtime.
Steps to Reproduce
Run infer init on a fresh userspace so ~/.infer/shortcuts/scm.yaml is seeded.
Start a chat session and run /scm issues (or /scm issue 123).
Expected Behavior
/scm issues should run gh issue list --json ... --limit 20 and /scm issue <number> should run gh issue view <number> --json ....
Actual Behavior
CustomShortcut.resolveCommandConfig (internal/presentation/shortcuts/custom.go) appends the subcommand's own name: before its args: when the subcommand defines no command: of its own, so the seeded YAML resolves to invalid commands:
/scm issues runs gh issues issue list --json ... - gh rejects it with unknown command "issues" for "gh" (gh's command is singular gh issue list).
/scm issue <number> runs gh issue issue view --json ... - the duplicated issue makes gh fail as well.
Suggested fix: give each subcommand its own command: gh with the full args (the pattern the seeded /git commit subcommand uses with command: bash), then update the "SCM Shortcuts" customization example in docs/shortcuts-guide.md (it currently mirrors the seeded file).
Discovered while verifying the subcommand-resolution behavior during #1317 (PR #1327); the resolution trace is recorded there.
Fixed. PR: #1329 (draft, fix/issue-1328, board at QA).
What changed (3 files, +34):
cmd/init/init.go - the seeded scm.yaml subcommands now declare their own command: gh with the full args, so /scm issues resolves to gh issue list --json ... --limit 20 and /scm issue <number> to gh issue view <number> --json .... The name-append path in resolveCommandConfig was left alone; the sibling seeded files (git.yaml, mcp.yaml, reset.yaml, insights.yaml) use it correctly and are already pinned by TestVendoredShortcutsDelegateToCommands.
cmd/init/init_test.go - one small regression test (TestSCMShortcutsSpellFullGHCommands) asserting each /scm subcommand declares command: gh and starts with the real gh subcommand.
docs/shortcuts-guide.md - the SCM customization example mirrors the fixed seeded file.
Checks:go test ./cmd/init/... and task precommit:run (mod tidy, fmt, lint:imports, golangci-lint, markdownlint) all pass.
Follow-ups: [DOCS] sweep ticket filed at inference-gateway/docs#789 for the standalone docs site; no other repos affected (no schema/gateway/env changes).
Activity
edenreich commentedon Sep 25, 2026
@infer Can you fix this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Sep 25, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1329
✅ Infer Result: Success
Fixed. PR: #1329 (draft,
fix/issue-1328, board at QA).What changed (3 files, +34):
cmd/init/init.go- the seededscm.yamlsubcommands now declare their owncommand: ghwith the full args, so/scm issuesresolves togh issue list --json ... --limit 20and/scm issue <number>togh issue view <number> --json .... The name-append path inresolveCommandConfigwas left alone; the sibling seeded files (git.yaml,mcp.yaml,reset.yaml,insights.yaml) use it correctly and are already pinned byTestVendoredShortcutsDelegateToCommands.cmd/init/init_test.go- one small regression test (TestSCMShortcutsSpellFullGHCommands) asserting each/scmsubcommand declarescommand: ghand starts with the real gh subcommand.docs/shortcuts-guide.md- the SCM customization example mirrors the fixed seeded file.Checks:
go test ./cmd/init/...andtask precommit:run(mod tidy, fmt, lint:imports, golangci-lint, markdownlint) all pass.Follow-ups: [DOCS] sweep ticket filed at inference-gateway/docs#789 for the standalone docs site; no other repos affected (no schema/gateway/env changes).
Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 5m 45sTokens: 1,502,622 in · 20,421 out · 1,523,043 total (26 requests)
Tool calls: 44 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
fix(shortcuts): seed scm.yaml subcommands with their own gh command (#…
inference-gateway-releaser commentedon Sep 26, 2026
🎉 This issue has been resolved in version 0.208.2 🎉
The release is available on:
Your semantic-release bot 📦🚀