MCPcopy Create free account
hub / github.com/GCWing/BitFun / is_execution_phase

Method is_execution_phase

src/apps/cli/src/chat_state.rs:44–54  ·  view source on GitHub ↗

Returns true if the tool has entered an active execution phase (Running, Streaming, or any terminal state). Early pipeline stages (ParamsPartial, Queued, Waiting) should not overwrite these states, since priority queue ordering can cause late-arriving low-priority events to arrive after high-priority state transitions.

(&self)

Source from the content-addressed store, hash-verified

42 /// since priority queue ordering can cause late-arriving low-priority
43 /// events to arrive after high-priority state transitions.
44 pub fn is_execution_phase(&self) -> bool {
45 matches!(
46 self,
47 ToolDisplayStatus::Running
48 | ToolDisplayStatus::Streaming
49 | ToolDisplayStatus::Success
50 | ToolDisplayStatus::Failed
51 | ToolDisplayStatus::Cancelled
52 | ToolDisplayStatus::Rejected
53 )
54 }
55}
56
57/// Message role for display

Callers 1

handle_tool_eventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected