morgmart c6177440ad add agent model picker and session model sync (#137)
* Enhance chat session model management and UI integration

- Introduced model selection capabilities in the chat input and toolbar, allowing users to choose from available models based on the selected provider.
- Updated the chat session store to manage models per session, including caching and retrieval of available models.
- Implemented backend support for setting the model in active sessions, ensuring seamless integration with the ACP service.
- Enhanced the SettingsModal to support initial section selection for improved user experience.
- Added tests to validate model state management and UI interactions.

This commit builds upon the provider setup infrastructure and shared UI primitives, further refining the user experience in managing chat sessions and models.

* Enhance debugging and performance logging for ACP provider interactions

- Added detailed performance logging for various ACP provider functions, including `discoverAcpProviders`, `checkAgentInstalled`, and `checkAgentAuth`, to track execution time and results.
- Improved session management in the chat by logging state changes and model updates, ensuring better traceability during provider interactions.
- Updated the chat session store to include a new method for switching session providers, enhancing model caching and retrieval.
- Refined UI components to improve layout and responsiveness, ensuring a better user experience when selecting models and agents.

These changes aim to provide better insights into the performance of ACP interactions and improve the overall user experience in managing chat sessions.

* Refactor ACP provider interactions and improve error handling

- Removed excessive logging from various ACP provider functions, including `discoverAcpProviders`, `checkAgentInstalled`, and `checkAgentAuth`, to streamline performance.
- Enhanced error handling in the chat session management by providing clearer error messages when loading ACP providers and setting models.
- Updated the UI components to improve layout and responsiveness, ensuring a better user experience when selecting models and agents.
- Refactored the `AgentModelPicker` and `ChatView` components for better readability and maintainability.

These changes aim to simplify the codebase while improving the clarity of error messages and enhancing the overall user experience in managing chat sessions and models.

* Refactor AgentModelPicker UI and update tests for model display

- Simplified the display logic in the `AgentModelPicker` component to use nullish coalescing for better readability.
- Updated test assertions in `AgentModelPicker.test.tsx` and `ChatInput.test.tsx` to reflect changes in the model display format, ensuring consistency across the UI.
- Removed unnecessary concatenation in the button text, enhancing clarity for users selecting agents and models.

These changes aim to improve the user interface and maintain accurate test coverage for model selection functionality.

* Refactor AppShell and ChatView components for improved structure and readability

- Replaced the content rendering logic in `AppShell` with a new `AppShellContent` component to streamline the layout and enhance maintainability.
- Simplified the `ChatView` component by integrating a new `ChatContextPanel`, removing unnecessary complexity and improving the overall user interface.
- Updated the `useAcpStream` hook to include additional debug logging for better traceability of provider events.
- Cleaned up the `providerCatalog` by removing redundant code and organizing imports for clarity.

These changes aim to enhance the code structure, improve user experience, and facilitate easier future modifications.

* Fix post-rebase CI issues

Restore the missing ACP manager imports from the rebase merge and remove small lint/file-size regressions so the branch passes the local check gate again.

* Fix draft and replay model selection handling

Delay model updates until draft chats have prepared ACP sessions, and keep providerless replay model-state events so reopened chats show the correct model picker state.

* Refactor session management for improved readability and consistency

- Reformatted the `bind_session` and `emit_model_state_from_options` calls in `prepare_session_inner` and `set_model_inner` functions for better code clarity.
- Enhanced the structure of session handling logic to maintain consistency across the codebase.

These changes aim to improve the maintainability of the session management code while ensuring consistent formatting throughout the file.

* Split ACP session ops tests into a submodule

Move the session_ops unit tests out of the production Rust file so the desktop file-size check passes without adding a broader exception.
2026-04-09 09:28:39 -07:00
S
Description
an open-source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Apache-2.0 2 GiB
Languages
Rust 63.6%
TypeScript 29.6%
JavaScript 1.7%
Shell 1.6%
Python 1.5%
Other 1.8%