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

Method apply

src/crates/execution/agent-runtime/src/deep_review/queue.rs:207–240  ·  view source on GitHub ↗
(
        &self,
        parent_dialog_turn_id: &str,
        tool_id: &str,
        action: DeepReviewQueueControlAction,
    )

Source from the content-addressed store, hash-verified

205
206impl DeepReviewQueueControlTracker {
207 pub(crate) fn apply(
208 &self,
209 parent_dialog_turn_id: &str,
210 tool_id: &str,
211 action: DeepReviewQueueControlAction,
212 ) -> DeepReviewQueueControlSnapshot {
213 let now = Instant::now();
214 let Some(key) = DeepReviewQueueControlKey::new(parent_dialog_turn_id, tool_id) else {
215 return DeepReviewQueueControlSnapshot {
216 paused: false,
217 cancelled: false,
218 skip_optional: false,
219 };
220 };
221
222 match action {
223 DeepReviewQueueControlAction::Pause => {
224 self.paused_tools.insert(key.clone(), now);
225 }
226 DeepReviewQueueControlAction::Continue => {
227 self.paused_tools.remove(&key);
228 }
229 DeepReviewQueueControlAction::Cancel => {
230 self.cancelled_tools.insert(key.clone(), now);
231 self.paused_tools.remove(&key);
232 }
233 DeepReviewQueueControlAction::SkipOptional => {
234 self.skip_optional_turns
235 .insert(key.parent_dialog_turn_id.clone(), now);
236 }
237 }
238
239 self.snapshot(parent_dialog_turn_id, tool_id)
240 }
241
242 pub(crate) fn snapshot(
243 &self,

Callers 1

Calls 4

insertMethod · 0.45
cloneMethod · 0.45
removeMethod · 0.45
snapshotMethod · 0.45

Tested by

no test coverage detected