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
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ ox # Start an interactive session

- Use `#[expect(lint)]` instead of `#[allow(lint)]`. `#[expect]` warns when the suppressed lint is no longer triggered, preventing stale suppressions from accumulating.
- `#[expect]` reason strings must describe the current state rather than future plans.
- For complexity / size lints (`clippy::too_many_lines`, `clippy::cognitive_complexity`, etc.), the default response is to **extract a helper**. Reach for `#[expect]` only when the function is irreducibly cohesive: and say so in the reason string.
- For complexity / size lints (`clippy::too_many_lines`, `clippy::cognitive_complexity`, etc.), the default response is to **extract a helper**. Reach for `#[expect]` only when the function is irreducibly cohesive, and explain that in the reason string.

### Section Dividers

Expand Down
26 changes: 13 additions & 13 deletions crates/oxide-code/src/agent/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,38 @@ pub(crate) const INTERRUPTED_MARKER: &str = "(interrupted)";
pub(crate) enum AgentEvent {
/// Assistant text chunk to append to the in-flight reply.
StreamToken(String),
/// Extended-thinking chunk; rendered separately from `StreamToken` and only when the user
/// Extended-thinking chunk rendered separately from `StreamToken` and only when the user
/// has thinking display enabled.
ThinkingToken(String),
/// The model invoked a tool — render the call row and prepare the result slot.
/// Tool call emitted by the model, used to render the call row and prepare the result slot.
ToolCallStart {
id: String,
name: String,
input: serde_json::Value,
},
/// Tool finished — fill the slot opened by the matching [`Self::ToolCallStart`].
/// Tool result for the slot opened by the matching [`Self::ToolCallStart`].
ToolCallEnd {
id: String,
content: String,
is_error: bool,
metadata: crate::tool::ToolMetadata,
},
/// A queued mid-turn submit was just spliced into the live transcript; the UI clears its
/// A queued mid-turn submit was just spliced into the live transcript so the UI clears its
/// queued-prompt indicator.
PromptDrained(String),
/// Turn ended cleanly with a final assistant reply (no further tool rounds).
TurnComplete,
/// User cancelled mid-turn ([`UserAction::Cancel`]); the in-flight reply is truncated and the
/// User cancelled mid-turn ([`UserAction::Cancel`]). The in-flight reply is truncated and the
/// inline [`INTERRUPTED_MARKER`] is rendered.
Cancelled,
/// Automatic compaction started before the submitted prompt runs. TUI switches to compacting
/// status while the summarizer request streams.
AutoCompactionStarted,
/// Background title generator finished; UI updates the chrome label.
/// Background title generator finished, so the UI updates the chrome label.
SessionTitleUpdated { session_id: String, title: String },
/// `/clear` rolled the session a new session UUID is now active.
/// `/clear` rolled the session, making a new session UUID active.
SessionRolled { id: String },
/// `/resume` swapped to an existing session in place — payload carries the target's
/// `/resume` swapped to an existing session in place. Payload carries the target's
/// transcript so the UI can rebuild chat without restarting the process.
SessionResumed {
id: String,
Expand Down Expand Up @@ -89,8 +89,8 @@ pub(crate) enum AgentEvent {

// ── User Actions ──

/// UI agent-loop commands. Multiplexed onto a single `mpsc` so the loop can race them
/// against in-flight stream / tool futures with one biased `select!`.
/// Commands from the UI to the agent loop. Multiplexed onto a single `mpsc` so the loop can race
/// them against in-flight stream / tool futures with one biased `select!`.
#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) enum UserAction {
SubmitPrompt(String),
Expand All @@ -108,14 +108,14 @@ pub(crate) enum UserAction {
Rename {
title: String,
},
/// Symmetric model + effort swap. At least one field must be `Some`; `None` leaves that axis
/// Symmetric model + effort swap. At least one field must be `Some`. `None` leaves that axis
/// as-is. Modal pickers and typed-arg `/model <id>` / `/effort <tier>` both flow through here.
SwapConfig {
model: Option<ResolvedModelId>,
effort: Option<Effort>,
},
/// TUI-only: live-preview the picker's highlighted theme without committing it. Cursor moves
/// in the `/theme` modal emit this; cancelling the modal restores the snapshot taken on open.
/// in the `/theme` modal emit this, and cancelling the modal restores the open-time snapshot.
PreviewTheme {
name: String,
},
Expand All @@ -124,7 +124,7 @@ pub(crate) enum UserAction {
name: String,
},
Cancel,
/// TUI-only; agent loop ignores this.
/// TUI-only. Agent loop ignores this.
ConfirmExit,
Quit,
}
Expand Down
Loading