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:
@ -1200,6 +1200,19 @@ pub trait AgentSession: Send + Sync {
|
||||
self.send(prompt).await
|
||||
}
|
||||
|
||||
/// Interrupts the currently running turn without shutting down the session.
|
||||
///
|
||||
/// Default is a no-op so existing structured adapters/fakes remain valid.
|
||||
/// Process-backed adapters that retain a live child during `send` should
|
||||
/// override it and kill only that child.
|
||||
///
|
||||
/// # Errors
|
||||
/// [`AgentSessionError::Io`] when the adapter attempted a concrete cancel and
|
||||
/// it failed.
|
||||
async fn cancel_current_turn(&self) -> Result<(), AgentSessionError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Termine proprement la session (tue le process/SDK sous-jacent). Idempotent.
|
||||
///
|
||||
/// # Errors
|
||||
|
||||
Reference in New Issue
Block a user