Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 295 additions & 18 deletions crates/agent/src/codex.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/agent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@ pub enum ItemStatus {
InProgress,
Completed,
Failed,
Interrupted,
Declined,
}

Expand Down
1 change: 1 addition & 0 deletions crates/core/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ fn status_outcome(status: ItemStatus, output: &str) -> String {
let output = one_line(output);
let label = match status {
ItemStatus::Failed => "failed",
ItemStatus::Interrupted => "interrupted",
ItemStatus::InProgress => "in progress",
ItemStatus::Completed if !output.is_empty() => return output,
ItemStatus::Completed => "completed",
Expand Down
5 changes: 4 additions & 1 deletion crates/core/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,10 @@ fn tool_item_state(content: &ItemContent) -> Option<ToolState> {
};
Some(match status {
ItemStatus::InProgress => ToolState::Active,
ItemStatus::Completed | ItemStatus::Failed | ItemStatus::Declined => ToolState::Finished,
ItemStatus::Completed
| ItemStatus::Failed
| ItemStatus::Interrupted
| ItemStatus::Declined => ToolState::Finished,
})
}

Expand Down
1 change: 1 addition & 0 deletions crates/runtime/src/app/subagents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl AppState {
}
let turn_status = match status {
ItemStatus::Failed | ItemStatus::Declined => TurnStatus::Failed,
ItemStatus::Interrupted => TurnStatus::Interrupted,
_ => TurnStatus::Completed,
};
self.sync_mirror_turn(&mirror_id, in_progress, &item.id, turn_status, cx);
Expand Down
16 changes: 16 additions & 0 deletions crates/ui/src/chat/components/subagent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ pub(crate) fn subagent_row(
.child(Icon::new(IconName::Check).size(px(12.)))
.child(crate::tr!("chat.subagent_completed"))
.into_any_element(),
ItemStatus::Interrupted => h_flex()
.h(px(22.))
.px_2()
.gap_1()
.items_center()
.rounded(crate::material::radius_chip())
.bg(cx.theme().warning.opacity(0.12))
.text_color(cx.theme().warning)
.text_size(px(11.5))
.child(
Icon::new(IconName::CircleX)
.size(px(12.))
.text_color(cx.theme().warning),
)
.child(crate::tr!("chat.subagent_interrupted"))
.into_any_element(),
ItemStatus::Failed | ItemStatus::Declined => h_flex()
.h(px(22.))
.px_2()
Expand Down
2 changes: 2 additions & 0 deletions docs/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ platform pays that inset.
blocks sit 16px apart. There is deliberately **no divider/hairline under the
user bubble** — the eye separates turns by the space around them and by the
typographic step down from the 15px bubble to the muted activity summary.
- Subagent capsules use a spinner while active, then a compact lifecycle chip:
green for completed, amber for interrupted, and red for failed or declined.
- Turn activity = collapsible "Work Log" sections: an expanded section starts
with an 11px uppercase muted label, followed by activity rows (muted ✓ +
one-line summary; command/tool/subagent/reasoning). While a turn is running,
Expand Down
1 change: 1 addition & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ chat:
output: "Output tail"
subagent_completed: "Completed"
subagent_failed: "Failed"
subagent_interrupted: "Interrupted"
changed_files: "CHANGED FILES (%{count})"
changed_files_partial: "· PARTIAL"
more_files: "+%{count} more"
Expand Down
1 change: 1 addition & 0 deletions locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ chat:
output: "输出末尾"
subagent_completed: "已完成"
subagent_failed: "失败"
subagent_interrupted: "已中断"
changed_files: "已更改文件(%{count})"
changed_files_partial: "· 部分归因"
more_files: "+%{count} 个更多"
Expand Down