Skip to content

feat(daemon): expose list_issues and expand #N over AG-UI - #1716

Merged
edenreich merged 2 commits into
mainfrom
fix/issue-1711
Nov 6, 2026
Merged

edenreich merged 2 commits into
mainfrom
fix/issue-1711

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1711

Summary

A daemon client of the infer daemon AG-UI binding can now show the # issue autocomplete and send issue references like the chat TUI: a new project-scoped list_issues frame answers with the project's open issues (number, title and state, an empty list wherever the TUI's trigger shows nothing), and the serve worker expands #N tokens in run_agent_input user messages before the run. The #N expansion moved into internal/agent/domain so the TUI delegation and the worker share one implementation. The remaining input-trigger gaps the audit found are tracked in #1714 (@ files) and #1715 (/ shortcuts).

Changes

  • New list_issues panel frame and issues reply in internal/presentation/headless/panel.go, backed by agentdomain.GitHubIssueService: answered with number, title and state as the service's list returns them, and an empty list when the service is nil, its IsAvailable() is false, or the list call fails. The answer rides the existing frameWriter, so it carries the lowercase app-frame type the protocol reserves for non-run traffic.
  • internal/container/container.go wires the worker's issue service into the panel; internal/sessions/registry.go adds list_issues to the daemon's project-scoped request vocabulary and routes the issues reply to the requester only.
  • #N expansion extracted to agent/domain.ExpandIssueReferences and agent/domain.FormatIssueBlock (the regex moved along, and the expansion now fetches at most 10 distinct issues per message, leaving later tokens raw). The chat TUI's expandIssueReferences now delegates, and headlessControl.enqueueRunInput applies the same expansion to run_agent_input text parts, logging failed fetches and leaving those tokens in place so the model still sees the raw reference.
  • Docs updated: docs/browser-extension-protocol.md documents list_issues -> issues in a GitHub issues section and the #N expansion in the run-input bullets, docs/ag-ui-output.md documents the worker-side expansion in the serve worker section, and the project-scoped request list includes list_issues.
  • Tests: panel cases for a served list plus the unavailable, failed-list and nil-service empty answers, a daemon relay case that the issues reply reaches only its requester, and a worker test that a #123 token in a run input reaches the queue as the issue block, plus the unchanged TUI processor suite now running through the shared function.

Downstream

A daemon client can now ask for the current project's open GitHub issues through a list_issues panel frame, relayed like the other project-scoped requests and answered with number, title and state, and an empty list where the issue service's IsAvailable() is false. The serve worker expands #N tokens in run_agent_input user messages before the run, the way the chat TUI does: the expansion moved into agent/domain (ExpandIssueReferences, FormatIssueBlock) so the TUI delegation and the worker share one implementation. Refs: #1711

Refs: #1711
A run input is expanded on the worker's stdin reader, so an unbounded list of
#N tokens stalled interrupt and approval frames behind sequential gh calls.
Tokens past the first ten distinct issues now stay raw. The duplicate fetch
timeout goes, since the issue service already bounds each call, and
formatIssueBlock is unexported.
@edenreich
edenreich merged commit 42db200 into main Nov 6, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-1711 branch November 6, 2026 17:48
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.246.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] Pressing on # and other shortcuts or missing events should be triggered over AG-UI

1 participant