Commit graph

18 commits

Author SHA1 Message Date
Nathan Sobo
f81993574e Connect Native Agent responses to UI display
User-visible improvements:
- Native Agent now shows AI responses in the chat interface
- Uses configured default model from settings instead of random selection
- Streams responses in real-time as the model generates them

Technical changes:
- Implemented response stream forwarding from Thread to AcpThread
- Created Session struct to manage Thread and AcpThread together
- Added proper SessionUpdate handling for text chunks and tool calls
- Fixed model selection to use LanguageModelRegistry's default
- Added comprehensive logging for debugging model interactions
- Removed unused cwd parameter - native agent captures context differently than external agents
2025-08-02 09:58:33 -06:00
Nathan Sobo
604a88f6e3 Add comprehensive test for AgentConnection with ModelSelector
- Add public session_id() method to AcpThread to enable testing
- Fix ModelSelector methods to use async move closures properly to avoid borrow conflicts
- Add test_agent_connection that verifies:
  - Model selector is available for agent2
  - Can list available models
  - Can create threads with default model
  - Can query selected model for a session
  - Can send prompts using the selected model
  - Can cancel sessions
  - Handles errors for invalid sessions
- Remove unnecessary mut keywords from async closures
2025-08-02 08:45:51 -06:00
Nathan Sobo
a4fe8c6972 Add ModelSelector capability to AgentConnection
- Add ModelSelector trait to acp_thread crate with list_models, select_model, and selected_model methods
- Extend AgentConnection trait with optional model_selector() method returning Option<Rc<dyn ModelSelector>>
- Implement ModelSelector for agent2's AgentConnection using LanguageModelRegistry
- Make selected_model field mandatory on Thread struct
- Update Thread::new to require a default_model parameter
- Update agent2 to fetch default model from registry when creating threads
- Fix prompt method to use the thread's selected model directly
- All methods use &mut AsyncApp for async-friendly operations
2025-08-02 08:28:37 -06:00
Agus Zubiaga
76f0f9163d Merge branch 'main' into new-acp 2025-08-01 18:17:48 -03:00
Agus Zubiaga
8563ed2252 Compiling 2025-08-01 17:07:50 -03:00
Ben Brandt
e5c6a596a9
agent_ui: More agent notifications (#35441)
Release Notes:

- N/A
2025-08-01 14:29:02 +00:00
Agus Zubiaga
27708143ec Fix auth 2025-07-30 13:30:50 -03:00
Ben Brandt
f028ca4d1a
Merge branch 'main' into mcp-acp-gemini 2025-07-30 12:24:01 +02:00
Agus Zubiaga
6656403ce8 Auth WIP 2025-07-29 21:15:00 -03:00
Agus Zubiaga
9353ba7887
Fix remaining agent server integration tests (#35222)
Release Notes:

- N/A
2025-07-29 12:40:59 +00:00
Ben Brandt
254c6be42b
Fix broken test 2025-07-29 10:12:57 +02:00
Agus Zubiaga
ced3d09f10 Extract acp_connection 2025-07-28 18:43:01 -03:00
Agus Zubiaga
0f395df9a8 Update to new schema 2025-07-28 18:02:21 -03:00
Agus Zubiaga
c2fc70eef7
ACP over MCP server impl (#35196)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-07-28 14:14:10 +00:00
Agus Zubiaga
2d0f10c48a
Refactor to use new ACP crate (#35043)
This will prepare us for running the protocol over MCP

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-07-24 14:39:29 -03:00
Agus Zubiaga
405244d422
Display ACP plans (#34816)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-07-21 11:11:37 -03:00
Ben Brandt
cfe1adc792
E2E Claude tests (#34702)
- **Fix cancellation of tool calls**
- **Make tool_call test more resilient**
- **Fix tool call confirmation test**

Release Notes:

- N/A
2025-07-18 13:17:41 +00:00
Agus Zubiaga
8e4555455c
Claude experiment (#34577)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-07-17 14:25:55 +00:00