mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
feat: add bsk CLI auto update
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -218,9 +218,7 @@ impl ToolQueueRegistry {
|
||||
/// Whether `sid`'s queue is still accepting new tool dispatches.
|
||||
pub fn is_accepting(&self, sid: &SessionId) -> bool {
|
||||
let guard = self.queues.lock().expect("tool queue registry poisoned");
|
||||
guard
|
||||
.get(sid)
|
||||
.is_some_and(|entry| entry.accepting)
|
||||
guard.get(sid).is_some_and(|entry| entry.accepting)
|
||||
}
|
||||
|
||||
/// Spawn the worker task for a session id. Idempotent: spawning the
|
||||
@@ -342,10 +340,21 @@ impl ToolQueueRegistry {
|
||||
entry.accepting = false;
|
||||
(entry.sender.clone(), Arc::clone(&entry.state))
|
||||
};
|
||||
dispatch_with_sender(sender, state, sid.clone(), method, params, timeout, true, None).await
|
||||
dispatch_with_sender(
|
||||
sender,
|
||||
state,
|
||||
sid.clone(),
|
||||
method,
|
||||
params,
|
||||
timeout,
|
||||
true,
|
||||
None,
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn dispatch_with_sender(
|
||||
sender: mpsc::Sender<ToolJob>,
|
||||
state: Arc<Mutex<QueueState>>,
|
||||
|
||||
Reference in New Issue
Block a user