Skip to content

feat: include workspace context in quick reply suggestions (Refs: beans-fsb0)#150

Merged
hmans merged 1 commit into
mainfrom
beans/prior-ostrich-q0ay
Mar 18, 2026
Merged

feat: include workspace context in quick reply suggestions (Refs: beans-fsb0)#150
hmans merged 1 commit into
mainfrom
beans/prior-ostrich-q0ay

Conversation

@hmans
Copy link
Copy Markdown
Owner

@hmans hmans commented Mar 18, 2026

Summary

  • Adds workspace context (git state, PR status) to the Haiku prompt used for generating quick reply suggestions after an agent turn completes
  • Quick replies now consider whether there are uncommitted changes, unpushed commits, an open PR, CI status, etc., making suggestions like "Commit these changes" or "Create a PR" contextually appropriate
  • Follows the existing callback provider pattern (QuickReplyContextFunc) for clean separation between the agent package and workspace infrastructure

Changes

  • internal/agent/manager.go — New QuickReplyContextFunc type and SetQuickReplyContext method
  • internal/agent/quickreplies.go — Updated prompt with workspace-aware instructions; GenerateQuickReplies now accepts optional context string
  • internal/commands/serve.go — Registers context provider that gathers branch name, uncommitted changes, unmerged/unpushed commits, conflicts, and PR status (number, state, CI checks, review approval)

Test plan

  • go vet ./internal/agent/ passes
  • go test ./internal/agent/ passes
  • Manual: start mise dev, open a workspace, complete an agent turn — verify quick replies reflect workspace state (e.g. suggest "Commit these changes" when there are uncommitted changes)

…ns-fsb0)

- Add QuickReplyContextFunc callback to agent Manager for providing
  workspace status to the quick reply generation prompt
- Update GenerateQuickReplies to accept optional workspace context
- Enhance Haiku prompt to consider git/PR state when suggesting replies
- Wire up context provider in serve.go gathering: branch name,
  uncommitted changes, unmerged/unpushed commits, conflicts, and
  PR status (number, state, CI checks, review approval)
@hmans hmans merged commit bf1e682 into main Mar 18, 2026
1 check passed
@hmans hmans deleted the beans/prior-ostrich-q0ay branch March 18, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant