Skip to content

refactor(monitor): remove git exec from TUI, use daemon API#394

Open
proboscis wants to merge 3 commits intomainfrom
issue/orch-397/run-20260201-104501
Open

refactor(monitor): remove git exec from TUI, use daemon API#394
proboscis wants to merge 3 commits intomainfrom
issue/orch-397/run-20260201-104501

Conversation

@proboscis
Copy link
Owner

Summary

Removes direct git exec calls from the Go TUI's agent_prompt.go and delegates git operations to the daemon via the new GetGitContext endpoint.

Closes: orch-397

Changes

  • Proto: Added GetGitContext request/response messages to api/orch.proto
  • Daemon: Implemented handleProtoGetGitContext endpoint in proto_handler.go with git helper functions
  • Client: Added GetGitContext method to daemon client and OrchAPI interface
  • TUI: Replaced direct git exec calls with daemon API calls in agent_prompt.go
  • Tests: Updated mocks to include GetGitContext method

Commits

  1. feat(proto): add GetGitContext message for daemon API - Proto definitions
  2. feat(daemon): implement GetGitContext endpoint in daemon - Server-side implementation
  3. refactor(monitor): remove git exec from TUI, use daemon API - TUI changes

Architecture Compliance

Before: TUI called git rev-parse, git status --porcelain, git log -1 directly via os/exec
After: TUI calls api.GetGitContext() which goes through daemon

Testing

  • All go test ./internal/... tests pass
  • Semgrep architecture lint passes

proboscis and others added 3 commits February 1, 2026 10:56
Add GetGitContextRequest and GetGitContextResponse proto messages to support querying git context (branch, uncommitted changes, last commit) through the daemon API instead of direct git exec calls from TUI.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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