Skip to content

feat(gemini): Add ACP integration with model selection and improved tool display#376

Merged
bra1nDump merged 3 commits intoslopus:mainfrom
Scoteezy:feat/acp-gemini-integration
Jan 13, 2026
Merged

feat(gemini): Add ACP integration with model selection and improved tool display#376
bra1nDump merged 3 commits intoslopus:mainfrom
Scoteezy:feat/acp-gemini-integration

Conversation

@Scoteezy
Copy link
Copy Markdown
Contributor

Summary

This PR adds comprehensive Gemini integration through ACP (Agent Communication Protocol), including model selection, improved tool display, and permission system updates.

Changes

ACP Message Support

  • Add 'acp' message type schema with provider field (gemini, codex, claude, opencode)
  • Implement normalization for all ACP message types
  • Handle task_started, task_complete, turn_aborted for thinking state sync

Gemini Model Selection

  • Add Gemini models: gemini-2.5-pro, flash, flash-lite
  • Implement model selector UI in AgentInput for Gemini sessions
  • Pass selected model in meta.model to CLI
  • Default to gemini-2.5-pro for new sessions

Tool Display Improvements

  • Add GeminiEditView for proper diff display (oldText/newText fields)
  • Add GeminiExecuteView for shell commands with command/cwd/description
  • Auto-hide unknown tools for Gemini sessions
  • Add 'read', 'think', 'search', 'edit', 'shell' tools with minimal display

Permission System

  • Update Gemini permission modes (default, read-only, safe-yolo, yolo)
  • Replace agent-specific text with generic terms in UI

Translations

  • Update all language files (en, ru, zh-Hans, pt, pl, ja, it, es, ca)

…d UX

ACP Message Support:
- Add 'acp' message type schema with provider field (gemini, codex, claude, opencode)
- Implement normalization for all ACP message types in typesRaw.ts
- Handle task_started, task_complete, turn_aborted for thinking state sync

Gemini Model Selection:
- Add Gemini models to ModelMode type (gemini-2.5-pro, flash, flash-lite)
- Implement model selector UI in AgentInput for Gemini sessions
- Pass selected model in meta.model to CLI
- Default to gemini-2.5-pro for new Gemini sessions

Permission System:
- Update Gemini permission modes to match Codex-style (default, read-only, safe-yolo, yolo)
- Replace 'Claude' references with agent-agnostic text in all translations

Tool Display:
- Add lowercase 'read' alias to knownTools for Gemini compatibility
- Add 'think' tool definition for Gemini reasoning display
- Both marked as minimal for collapsed display

Session Management:
- Add modelMode and onModelModeChange props to AgentInput
- Update SessionView to pass model mode to AgentInput
- Fix isGemini detection to work on new session page via agentType prop

Translations:
- Update all language files (en, ru, zh-Hans, pt, pl, ja, it, es, ca)
- Replace Claude-specific permission text with generic agent text
- Add search, edit, shell tools to knownTools with minimal: true
- Auto-hide unknown tools for Gemini sessions in ToolView
- Prevents showing raw INPUT/OUTPUT for internal Gemini tools
- Add GeminiEditView for proper diff display (handles oldText/newText fields)
- Add GeminiExecuteView for shell commands with command/cwd/description
- Update knownTools with proper definitions for Gemini tools
- Extract titles and content from Gemini's nested toolCall structure
- Show meaningful UI instead of raw JSON for Gemini tool calls
@bra1nDump bra1nDump merged commit 45a9038 into slopus:main Jan 13, 2026
trillium added a commit to trillium/happy that referenced this pull request Jan 16, 2026
This commit adds a comprehensive status report analyzing OpenCode's current
integration state in the Happy codebase.

Key Findings:
- OpenCode status: Reserved slot but not implemented (~0% complete)
- Protocol layer ready: Added to ACP provider enum in commit ca6a056 (Jan 13, 2026)
- No active development: Zero PRs or issues specifically for OpenCode
- Forward-looking: Reserved by developer Scoteezy during Gemini ACP integration

Analysis Includes:
- Complete commit history investigation via git log and gh CLI
- Pull request analysis (PR slopus#376: Gemini/ACP integration)
- Codebase reference audit (6 integration points identified)
- Comparison with existing agents (Claude, Codex, Gemini)
- Integration readiness assessment (8-10 hour estimate)
- Risk assessment (low risk if OpenCode CLI exists)
- Prerequisites and recommended next steps

Document Structure:
1. Executive Summary - Current status and key findings
2. Commit History Analysis - Timeline of OpenCode mentions
3. Pull Request & Issue Analysis - Active development research
4. Codebase References - Line-by-line audit of 6 integration points
5. Related Commits - Agent integration timeline
6. Integration Readiness - What's ready vs what's missing
7. Prerequisites - OpenCode CLI requirements and investigation needs
8. Comparison Table - OpenCode vs Claude/Codex/Gemini
9. Risk Assessment - Low/Medium/High risk factors
10. Recommended Next Steps - 4-phase integration plan
11. Investigation Questions - 6 key questions requiring answers

This report provides a foundation for deciding whether to proceed with
OpenCode integration or defer until the OpenCode CLI is confirmed to exist
and be compatible with Happy's ACP protocol.
@r-bit-rry
Copy link
Copy Markdown

why not add support for gemini 3 models (they are part of the preview features in the gemini cli under /settings)?

JoeLuker pushed a commit to JoeLuker/happy that referenced this pull request Feb 1, 2026
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.

3 participants