Documentation
¶
Overview ¶
Package githubissues provides cached, gh-CLI-backed access to the current repository's GitHub issues for the chat input's "#" autocomplete and "#N" inline expansion features. It shells out to the user's existing gh installation so authentication is inherited automatically; when gh is missing, the repo has no remote, or auth has expired, the service returns empty results without error so the chat features become silent no-ops.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements agentdomain.GitHubIssueService.
func (*Service) GetIssue ¶
func (s *Service) GetIssue(ctx context.Context, number int) (*agentdomain.GitHubIssue, error)
GetIssue fetches a single issue with body and the last maxComments comments. Uncached; called once per "#N" token at message-submit time.
func (*Service) IsAvailable ¶
IsAvailable reports whether the gh CLI is on PATH and a repo is configured. The result is computed lazily on first call and cached for the process lifetime - a missing gh today is missing for the rest of the session, and the autocomplete UI should not block on `gh repo view` per keystroke.
func (*Service) ListIssues ¶
func (s *Service) ListIssues(ctx context.Context) ([]agentdomain.GitHubIssue, error)
ListIssues returns recent open issues for the current repo, newest first, capped at maxResults. Cached for cacheTTL. Returns ([], nil) on any environment failure (no gh, not a repo, not authed) so the autocomplete UI can treat absence as "show nothing" rather than as an error.