v1.5.1: Remove dead code and fix all build warnings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f278e53b7e
commit
a0568508ea
@@ -33,8 +33,6 @@ pub struct SubagentPanelState {
|
||||
pub conversation_id: AIConversationId,
|
||||
pub is_expanded: bool,
|
||||
pub header_mouse_state: MouseStateHandle,
|
||||
pub expand_button_mouse_state: MouseStateHandle,
|
||||
pub cancel_button_mouse_state: MouseStateHandle,
|
||||
}
|
||||
|
||||
impl SubagentPanelState {
|
||||
@@ -43,8 +41,6 @@ impl SubagentPanelState {
|
||||
conversation_id,
|
||||
is_expanded: false,
|
||||
header_mouse_state: MouseStateHandle::default(),
|
||||
expand_button_mouse_state: MouseStateHandle::default(),
|
||||
cancel_button_mouse_state: MouseStateHandle::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1576,11 +1576,7 @@ impl BlocklistAIController {
|
||||
source_conversation_id,
|
||||
question_text,
|
||||
options,
|
||||
..
|
||||
} => {
|
||||
// Auto-answer: pick the first option, or echo the question text
|
||||
// as a default answer. In a future version, this could invoke the
|
||||
// parent LLM for a contextual answer.
|
||||
let answer = options.first().cloned().unwrap_or_else(|| {
|
||||
format!("Proceed with: {}", question_text)
|
||||
});
|
||||
@@ -1590,15 +1586,11 @@ impl BlocklistAIController {
|
||||
});
|
||||
}
|
||||
PendingEventDetail::SubagentAnswer {
|
||||
answer_text, ..
|
||||
answer_text,
|
||||
} => {
|
||||
// This fires on the child's controller — complete its pending question.
|
||||
self.complete_ask_user_question_with_answer(answer_text, ctx);
|
||||
}
|
||||
PendingEventDetail::SubagentCompletionSummary { .. } => {
|
||||
// Summary is consumed by the inline panel renderer directly.
|
||||
// No controller action needed.
|
||||
}
|
||||
PendingEventDetail::SubagentCompletionSummary => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ use warp_multi_agent_api as api;
|
||||
|
||||
const MAX_RETRY_ATTEMPTS: i32 = 3;
|
||||
const MAX_PENDING_LIFECYCLE_EVENTS_PER_TARGET: usize = 200;
|
||||
pub const MAX_SUBAGENT_RETRIES: u8 = 3;
|
||||
const MAX_SUBAGENT_QUESTION_DEPTH: u8 = 3;
|
||||
|
||||
/// Stage associated with a lifecycle error detail.
|
||||
@@ -71,18 +70,13 @@ pub enum PendingEventDetail {
|
||||
source_conversation_id: AIConversationId,
|
||||
question_text: String,
|
||||
options: Vec<String>,
|
||||
depth: u8,
|
||||
},
|
||||
/// The parent's answer to a subagent's question.
|
||||
SubagentAnswer {
|
||||
target_conversation_id: AIConversationId,
|
||||
answer_text: String,
|
||||
},
|
||||
/// A subagent reporting its completion summary to the parent.
|
||||
SubagentCompletionSummary {
|
||||
source_conversation_id: AIConversationId,
|
||||
summary_text: String,
|
||||
},
|
||||
SubagentCompletionSummary,
|
||||
}
|
||||
|
||||
/// A queued event consumed by the controller.
|
||||
@@ -594,11 +588,10 @@ impl OrchestrationEventService {
|
||||
}
|
||||
});
|
||||
|
||||
if let Some(summary_text) = summary {
|
||||
if summary.is_some() {
|
||||
self.route_subagent_completion_summary(
|
||||
conversation_id,
|
||||
parent_id,
|
||||
summary_text,
|
||||
ctx,
|
||||
);
|
||||
}
|
||||
@@ -1032,7 +1025,7 @@ impl OrchestrationEventService {
|
||||
// not converted to AIAgentInput or awaited for server echo.
|
||||
PendingEventDetail::SubagentQuestion { .. }
|
||||
| PendingEventDetail::SubagentAnswer { .. }
|
||||
| PendingEventDetail::SubagentCompletionSummary { .. } => {}
|
||||
| PendingEventDetail::SubagentCompletionSummary => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1070,7 +1063,7 @@ impl OrchestrationEventService {
|
||||
pending.retain(|event| match &event.detail {
|
||||
PendingEventDetail::SubagentQuestion { .. }
|
||||
| PendingEventDetail::SubagentAnswer { .. }
|
||||
| PendingEventDetail::SubagentCompletionSummary { .. } => {
|
||||
| PendingEventDetail::SubagentCompletionSummary => {
|
||||
subagent_events.push(event.clone());
|
||||
false
|
||||
}
|
||||
@@ -1254,7 +1247,6 @@ impl OrchestrationEventService {
|
||||
source_conversation_id: child_conversation_id,
|
||||
question_text,
|
||||
options,
|
||||
depth,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1280,7 +1272,6 @@ impl OrchestrationEventService {
|
||||
source_agent_id: "parent".to_string(),
|
||||
attempt_count: 0,
|
||||
detail: PendingEventDetail::SubagentAnswer {
|
||||
target_conversation_id: child_conversation_id,
|
||||
answer_text,
|
||||
},
|
||||
};
|
||||
@@ -1300,17 +1291,13 @@ impl OrchestrationEventService {
|
||||
&mut self,
|
||||
child_conversation_id: AIConversationId,
|
||||
parent_conversation_id: AIConversationId,
|
||||
summary_text: String,
|
||||
ctx: &mut ModelContext<Self>,
|
||||
) {
|
||||
let event = PendingEvent {
|
||||
event_id: Uuid::new_v4().to_string(),
|
||||
source_agent_id: child_conversation_id.to_string(),
|
||||
attempt_count: 0,
|
||||
detail: PendingEventDetail::SubagentCompletionSummary {
|
||||
source_conversation_id: child_conversation_id,
|
||||
summary_text,
|
||||
},
|
||||
detail: PendingEventDetail::SubagentCompletionSummary,
|
||||
};
|
||||
|
||||
self.pending_events
|
||||
@@ -1351,7 +1338,7 @@ fn did_event_round_trip_through_server(
|
||||
// Local-only events never round-trip through the server.
|
||||
PendingEventDetail::SubagentQuestion { .. }
|
||||
| PendingEventDetail::SubagentAnswer { .. }
|
||||
| PendingEventDetail::SubagentCompletionSummary { .. } => false,
|
||||
| PendingEventDetail::SubagentCompletionSummary => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user