feat(chat): livre la CLI custom de chat agent (#147) et corrige Cancel
Implémente la vue chat structurée par cellule agent (toggle TUI/CLI custom, préférence persistée `preferred_view`, reattach live, composer + pièces jointes) avec le socle backend AgentSession/ChatBridge (UserPrompt, cancel_current_turn, routage interrupt_agent, commande cancel_agent_chat). Corrige le bug bloquant relevé par QA : le bouton Cancel de CustomAgentChatView interrompait tout le tour via closeAgentChat au lieu de n'annuler que le tour courant via cancelAgentChat, ce qui tuait la session contrairement au contrat produit validé. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -10,7 +10,7 @@ use std::sync::Arc;
|
||||
use domain::ports::{EventBus, FileSystem, ProjectStore};
|
||||
use domain::{
|
||||
AgentId, Direction, DomainEvent, LayoutError, LayoutId, LayoutTree, LeafCell, NodeId,
|
||||
ProjectId, SessionId,
|
||||
PreferredView, ProjectId, SessionId,
|
||||
};
|
||||
|
||||
use crate::error::AppError;
|
||||
@ -98,6 +98,13 @@ pub enum LayoutOperation {
|
||||
/// Conversation id to record, or `None` to clear.
|
||||
conversation_id: Option<String>,
|
||||
},
|
||||
/// Persist the preferred live view for an agent leaf.
|
||||
SetCellPreferredView {
|
||||
/// The hosting leaf.
|
||||
target: NodeId,
|
||||
/// Preferred live view.
|
||||
preferred_view: PreferredView,
|
||||
},
|
||||
/// Persist opaque state for a plugin-provided custom layout leaf.
|
||||
SetPluginLayoutState {
|
||||
/// The custom plugin layout node.
|
||||
@ -130,6 +137,10 @@ impl LayoutOperation {
|
||||
target,
|
||||
conversation_id,
|
||||
} => tree.set_cell_conversation(*target, conversation_id.clone()),
|
||||
Self::SetCellPreferredView {
|
||||
target,
|
||||
preferred_view,
|
||||
} => tree.set_cell_preferred_view(*target, *preferred_view),
|
||||
Self::SetPluginLayoutState { target, state } => {
|
||||
tree.set_plugin_layout_state(*target, state.clone())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user