feat: Pos処理の非同期化・Busy状態の削除

This commit is contained in:
2026-05-04 15:52:27 +09:00
parent 5b38aa6a87
commit 954cf200e2
15 changed files with 537 additions and 256 deletions
@@ -74,6 +74,12 @@ pub trait LlmClient: Send + Sync {
}
}
impl Clone for Box<dyn LlmClient> {
fn clone(&self) -> Self {
self.clone_boxed()
}
}
/// `Box<dyn LlmClient>` に対する `LlmClient` の実装
///
/// これにより、動的ディスパッチを使用するクライアントも `Worker` で利用可能になる。
@@ -45,7 +45,9 @@ impl Scheme for DummyScheme {
}
fn parse_sse(&self, _: &str, _: &str, _: &mut ()) -> Result<Vec<Event>, ClientError> {
if self.parse_fail {
Err(ClientError::Sse("simulated mid-stream parse failure".into()))
Err(ClientError::Sse(
"simulated mid-stream parse failure".into(),
))
} else {
Ok(vec![])
}