feat(core): 脚本 agent 真流式思考动画 + 场景图16:9 + 资产卡/审核标修复 + 模型收敛
- 进度区改竖线时间轴:推理模型 reasoning_content 逐字转发(volcano),状态字=模型实时最新一句+秒数+折叠展开思考全文(替代旧 ProgressStream/ThinkingStream) - 场景基础资产出图改 16:9(run_base_asset_task size + 提取提示词横屏) - 已出图立绘主卡不再被在途轮询任务误盖转圈 - 审核态随项目详情持久下发(BaseAssetGroup.adopted_asset_review),刷新不丢徽章 - 设定卡加「← 返回」回三选项;模型选择器固定按 created_at 排序(默认豆包2.0Pro) - 新增 reasoning 转发回归测试 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
675b4db0aa
commit
4c21d85ba1
@@ -8,6 +8,7 @@
|
||||
|
||||
SSE 事件(每帧 `data: {json}\n\n`,json 带 type):
|
||||
tool {id,label?,status:running|done|error} —— 工具卡(加载skill/分析商品/生成分镜/提取实体/自检)
|
||||
reasoning {text} —— 推理模型思考流(逐字,纯展示,不进答案)
|
||||
delta {text} —— 模型自然语言前言(JSON 部分不外露)
|
||||
draft {draft} —— 规范化后的 ScriptDraft(前端结构化渲染)
|
||||
saved {script_version_id, version} —— 已落库的 ScriptVersion(含 segments/metadata)
|
||||
@@ -621,7 +622,15 @@ def stream_script_agent(
|
||||
messages=messages,
|
||||
temperature=0.85,
|
||||
):
|
||||
if ev.get("type") == "delta":
|
||||
et = ev.get("type")
|
||||
if et == "reasoning":
|
||||
# 思考流:推理模型在出 JSON 前会先想很久,把思考逐字下发给前端(像对话一样可见),
|
||||
# 不进 full(不是答案正文,纯展示)。这是「卡在生成分镜」假死的根因修复。
|
||||
rpiece = ev.get("text") or ""
|
||||
if rpiece:
|
||||
yield _sse({"type": "reasoning", "text": rpiece})
|
||||
continue
|
||||
if et == "delta":
|
||||
full.append(ev["text"])
|
||||
if forwarding:
|
||||
text = "".join(full)
|
||||
@@ -634,7 +643,7 @@ def stream_script_agent(
|
||||
shown = len(visible)
|
||||
if piece.strip():
|
||||
yield _sse({"type": "delta", "text": piece})
|
||||
elif ev.get("type") == "done":
|
||||
elif et == "done":
|
||||
break
|
||||
raw = "".join(full)
|
||||
draft = normalize_draft(raw, aspect_ratio=aspect_ratio, total_duration=effective_duration)
|
||||
|
||||
Reference in New Issue
Block a user