fix(canvas): 文本生成 - 修复分镜超时并贯通 Agent 与创作页流式返回
This commit is contained in:
1 parent
482d8bdbc2
commit
7cb6aed27d
18 files changed
+944
-44
No files matched your search
@@ -27,6 +27,10 @@ type TextReplayResult struct {
|
||||
TextDraft string `json:"textDraft,omitempty"`
|
||||
FinalText string `json:"finalText,omitempty"`
|
||||
Complete bool `json:"complete"`
|
||||
Status model.TaskStatus `json:"status"`
|
||||
Stage string `json:"stage,omitempty"`
|
||||
Progress int `json:"progress"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// isTextReplayTaskRequest 识别前端自管的文本持久化请求(input 带 replay=true)。
|
||||
@@ -107,7 +111,11 @@ func (s *Service) TaskTextReplay(userID string, taskID string, after int64) (*Te
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result := &TextReplayResult{Deltas: deltas, TextDraft: task.TextDraft, Complete: task.Status == model.TaskStatusSucceeded || task.Status == model.TaskStatusFailed || task.Status == model.TaskStatusCancelled}
|
||||
result := &TextReplayResult{
|
||||
Deltas: deltas, TextDraft: task.TextDraft,
|
||||
Complete: task.Status == model.TaskStatusSucceeded || task.Status == model.TaskStatusFailed || task.Status == model.TaskStatusCancelled,
|
||||
Status: task.Status, Stage: task.Stage, Progress: task.Progress, Error: task.Error,
|
||||
}
|
||||
if task.Status == model.TaskStatusSucceeded {
|
||||
result.FinalText = taskResultText(task.ResultJSON)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user