修复策划Runtime推理快照校正转发
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 5m30s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 5m39s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 5m36s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 5m59s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m51s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m30s
Project CI / Native shell tests (pull_request) Successful in 7m16s
Project CI / Frontend tests (pull_request) Successful in 6m3s
Project CI / Repository checks (pull_request) Successful in 5m36s
Project CI / Backend tests (pull_request) Successful in 10m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m35s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 5m30s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 5m39s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 5m36s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 5m59s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m51s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m30s
Project CI / Native shell tests (pull_request) Successful in 7m16s
Project CI / Frontend tests (pull_request) Successful in 6m3s
Project CI / Repository checks (pull_request) Successful in 5m36s
Project CI / Backend tests (pull_request) Successful in 10m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m35s
按累计reasoning变化发送流式事件 避免空delta校正被消费侧丢弃
This commit is contained in:
@@ -696,6 +696,7 @@ async fn request_design_provider(
|
||||
));
|
||||
let result = if llm.stream {
|
||||
let mut stream_sequence = 0_u64;
|
||||
let mut emitted_reasoning = String::new();
|
||||
client
|
||||
.stream_run(request.clone(), |delta| {
|
||||
stream_sequence = stream_sequence.saturating_add(1);
|
||||
@@ -727,13 +728,16 @@ async fn request_design_provider(
|
||||
None,
|
||||
));
|
||||
}
|
||||
if !delta.reasoning_delta.is_empty() {
|
||||
if !delta.reasoning_delta.is_empty()
|
||||
|| delta.accumulated_reasoning != emitted_reasoning
|
||||
{
|
||||
emit(design_reasoning_event(
|
||||
root,
|
||||
&turn_id,
|
||||
Some(&message_id),
|
||||
delta.accumulated_reasoning.clone(),
|
||||
));
|
||||
emitted_reasoning = delta.accumulated_reasoning.clone();
|
||||
}
|
||||
})
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user