Files
Genarrative/apps/ai-game-creator-shell
k88936 f68773db9a 资源编辑错误通道补 typed 错误并把平台失败原文带出
- 新增 project/resource_editor/error.rs:ResourceEditError 只有 RemoteGenerationFailed { server_message } 与 Other(String) 两个变体,to_user_msg 是唯一写「资源编辑生成失败:…」的地方,Other 上留 // TODO refactor string-typed
- 轮询到 status=failed 时读平台 error 原文装进 RemoteGenerationFailed 带出,账本仍只写 terminal_failure_code,原文不进账本
- 删掉轮询与提交期 HTTP 400 两处首句失败文案的 remote-terminal-failed 前缀;ensure_resource_edit_phase_resumable 里的三个 token 保留
- 两个入口拆成 typed 实现与 Result<_, String> 外观:derive_local_project_resource_typed / resume_local_project_resource_edit_typed,旧名映射 to_user_msg 供既有调用点与 Tauri 命令使用
- 不提供 impl From<String>,每处 String 错误显式 .map_err(ResourceEditError::Other)
- terminal_failure_code 加 // TODO clean unnecessary 并写明清理前置条件(字段无 skip_serializing_if、账本带 deny_unknown_fields)
- 测试:远端终态断言平台原文进文案且不进账本,抠图远端失败改用 typed 入口覆盖无 error 时的兜底
2026-10-02 18:42:41 +08:00
..
2026-08-17 14:32:13 +08:00