Skip to content

[FEATURE] Automatically fetch github issues so the agent doesn't need to do this extra step #573

Description

@edenreich

Summary

Prompts like "can you work on this # 365?` are very common and the agent would then go and use normally gh cli to fetch the issue. This is an extra unnecessary step that cost extra tokens - another extra turn = more input tokens. It's also more convenient to see directly what issues you're referencing in the terminal.

When I reference a github issue with "#" I want a dropdown of the issues from the current repository associated with the git config (fetched from remote origin) - only the titles for the drop down.

When the user selects one of the items it's highlighted as something that will be parsed once submitted.
When the prompt is submitted the agent will get that token replaced with the actual github issue and comments. so it doesn't need to perform this extra fetch, we should also instruct the LLM to not perform another fetch unless absolutely necessary (sometimes LLMs are doing things double to verify).

Acceptance Criteria

  • A new keyword "#" helps the user to reference a github issue from git remote origin
  • A dropdown is shown for the user when typed "#"
  • When selecting the issue the text is highlighted and placed in the input
  • When the user submit the prompt - the github issue token is populated with the actual github issue and comments
  • It's tested
  • It's documented

Activity

  1. added theissue type on Jun 1, 2026
  2. added
    enhancement
    on Jun 1, 2026
  3. added a commit that references this issue on Jun 1, 2026
    5056c9d
  4. edenreich commented on Jun 1, 2026

    @edenreich
    ContributorAuthor

    @claude Can you check if we need to file a documentation request for this? use /maintainer

  5. claude commented on Jun 1, 2026

    @claude
    Contributor

    Claude finished @edenreich's task in 2m 27s —— View job


    Documentation request needed? Yes.

    Verdict

    A [DOCS] ticket should be filed against inference-gateway/docs. Per the maintainer docs follow-up rule, every feat: outside the docs repo needs a matching docs issue, and all conditions are met here:

    Check Result
    Change type feat: (PR #574, merged, closes #573)
    User-facing? Yes — new # autocomplete keyword in the chat TUI (dropdown, highlight, inline expansion)
    Internal-refactor exception? No — it's a feature, not an internal-only refactor
    Already on the docs site? No — cli.md → Chat Interface Features doesn't mention it
    Existing [DOCS] issue? None found in inference-gateway/docs

    Note: the CLI repo's own README.md documents the feature, but the central docs site (inference-gateway/docs) does not — that's the gap the ticket would close.

    Draft [DOCS] ticket (ready to file)

    Following the skill rule "do not file cross-repo issues automatically unless the user explicitly asks," I've prepared the draft below (ASCII-only, per docs-repo convention) rather than creating it. Say the word and I'll file it.

    Title: [DOCS] Document GitHub issue references (#) autocomplete and inline expansion in chat
    Repo: inference-gateway/docs · Label: documentation · Type: documentation

    ## Summary
    
    The CLI chat interface now supports GitHub issue references. Typing `#` in the
    chat input opens a dropdown of the current repository's open issues (resolved
    from the origin remote via the gh CLI). Selecting an issue inserts a highlighted
    `#N` token; on submit, the token is expanded inline into the issue's title, body,
    and recent comments before the message is sent to the LLM, so the agent works
    from full context without a redundant `gh issue view` lookup. The feature
    gracefully no-ops when gh is not installed or the repo has no remote.
    
    Shipped in inference-gateway/cli PR #574 (closes issue #573); not yet reflected
    on the docs site.
    
    Affected pages:
    - cli.md -> "Core Commands" > "Chat Interface Features": add the `#` issue
      references capability (dropdown of open issues, selection/highlight, inline
      expansion on submit).
    - Note the gh CLI prerequisite and the graceful no-op behavior.
    
    ### Acceptance Criteria
    
    - [ ] cli.md documents the `#` GitHub issue reference autocomplete (dropdown of
          open issues from the origin remote)
    - [ ] Behavior described: selecting inserts a highlighted `#N` token, expanded on
          submit into title/body/recent comments
    - [ ] Prerequisite (gh CLI installed + repo remote) and graceful no-op noted
    - [ ] Links back to source PR inference-gateway/cli#574
    One-liner to file it
    gh issue create --repo inference-gateway/docs \
      --label documentation \
      --title "[DOCS] Document GitHub issue references (#) autocomplete and inline expansion in chat" \
      --body-file <draft-body-above>
    # then set Issue Type = documentation via GraphQL updateIssueIssueType

    Cross-repo impact

    Only inference-gateway/docs is affected. The feature is CLI-only (no openapi.yaml/schemas changes), so sdks, operator, etc. are not impacted. No code changes were made in this repo for this task.

  6. edenreich commented on Jun 1, 2026

    @edenreich
    ContributorAuthor

    @claude Okay please create it

  7. claude commented on Jun 1, 2026

    @claude
    Contributor

    Claude finished @edenreich's task in 4m 37s —— View job


    Done - [DOCS] ticket filed

    Created the documentation request in inference-gateway/docs per the maintainer docs follow-up rule (you explicitly approved filing it).

    Issue: inference-gateway/docs#138 - [DOCS] Document GitHub issue references (#) autocomplete and inline expansion in chat

    • Confirmed the docs-repo template (org-default documentation_request.md), labels, and issue-type conventions
    • Verified no existing [DOCS] issue covers this feature
    • Verified the draft against the merged code (internal/services/githubissues/service.go) so the description is accurate
    • Filed the [DOCS] issue with the exact [DOCS] title prefix and full body (Summary + Acceptance Criteria, ASCII-only)
    • ⚠️ Label + Issue Type could not be applied - see below

    ⚠️ Needs a maintainer with write access (token limitation)

    This job's GitHub App token can create issues but is not permitted to label them or set their type - both calls returned Resource not accessible by integration:

    • --label documentation was silently dropped at creation (addLabelsToLabelable forbidden)
    • updateIssueIssueType (set the type) is forbidden

    So #138 is currently open with the correct title and body, but no label and no type. Two quick commands from an account with write access finish it:

    # 1) add the documentation label (it exists in the repo)
    gh issue edit 138 --repo inference-gateway/docs --add-label documentation
    
    # 2) set the issue type
    gh api graphql -f query='mutation { updateIssueIssueType(input: {
      issueId: "I_kwDOOFrtlc8AAAABEDggzA",
      issueTypeId: "IT_kwDOC6ve6c4Bf3qg"
    }) { issue { number issueType { name } } } }'

    Note on the type: the docs repo only defines three issue types - Task, Bug, Feature. There is no native Documentation type (the template's type: documentation frontmatter only resolves in the GitHub UI). Every prior [DOCS] issue in the repo (e.g. #134, #135) is typed Task, so the issueTypeId above (IT_kwDOC6ve6c4Bf3qg = Task) matches established precedent. The documentation label remains the real signal.

    Cross-repo impact

    Only inference-gateway/docs is affected - the feature is CLI-only (no openapi.yaml/schema changes), so sdks, operator, etc. are untouched. No code changes were made in this repo.

  8. inference-gateway-releaser commented on Jun 1, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.117.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions