fix(short-drama-agent-front): 优化工作区提示与弹窗布局
This commit is contained in:
1 parent
5b134207b8
commit
72a86171dc
35 files changed
+586
-378
No files matched your search
@@ -21,12 +21,16 @@ export type OperationRecovery = {
|
||||
/** 按项目而非 graph 上锁,防止改写剧本与拆解同时提交。 */
|
||||
const operations = reactive<Record<string, Operation>>({})
|
||||
|
||||
/** 取得项目操作状态,不向浏览器持久化虚假的后台运行状态。 */
|
||||
/**
|
||||
* 取得项目响应式操作状态,首次创建也返回代理,使操作反馈及时更新。
|
||||
* @param projectId 当前项目编号
|
||||
* @returns 当前项目响应式操作状态
|
||||
*/
|
||||
export function getOperation(projectId: string): Operation {
|
||||
if (operations[projectId]) return operations[projectId]
|
||||
/** 当前 HTTP 操作锁与持久化后台活动锁合并,后台结束前不能重复启动付费操作。 */
|
||||
let requestPending = false
|
||||
return (operations[projectId] = {
|
||||
operations[projectId] = {
|
||||
/** 当前项目是否有短请求或后台任务仍在执行。 */
|
||||
get pending() {
|
||||
return requestPending || hasActiveWorkflowExecution(projectId)
|
||||
@@ -39,7 +43,8 @@ export function getOperation(projectId: string): Operation {
|
||||
error: '',
|
||||
notice: '',
|
||||
recovery: null
|
||||
})
|
||||
}
|
||||
return operations[projectId]
|
||||
}
|
||||
|
||||
/** 只提交一次;断网不自动重试,后台是否已执行由刷新后的 checkpoint 确认。 */
|
||||
|
||||
Reference in new issue
Block a user