fix(tui): la bascule TUI native <-> CLI custom ne déclenche plus de faux conflit de visibilité (#189)

This commit is contained in:
2026-08-11 19:27:15 +02:00
parent 252e82ecea
commit 17b98e3d03
4 changed files with 113 additions and 16 deletions

View File

@ -1937,11 +1937,20 @@ impl LaunchAgent {
{
let host_node =
structured.node_for_agent_in_project(input.project.id, &input.agent_id);
let node_id = match reattach_decision(
input.node_id,
host_node,
input.conversation_id.as_deref(),
) {
let decision = if input.require_structured {
input
.node_id
.or(host_node)
.map(|node_id| ReattachDecision::Rebind { node_id })
.unwrap_or(ReattachDecision::Idempotent)
} else {
reattach_decision(
input.node_id,
host_node,
input.conversation_id.as_deref(),
)
};
let node_id = match decision {
ReattachDecision::Rebind { node_id } => {
let _ = structured.rebind_agent_node_in_project(
input.project.id,