diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index 6bf5bc2dc..4318e1463 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -641,11 +641,11 @@ function normalizeAgentRuntimeState( return { ...state, currentGoal: state.currentGoal ?? state.currentTask ?? '', - waitingOn: - state.waitingOn ?? agentRuntimeWaitingOnFromPhase(state.phase), + waitingOn: state.waitingOn ?? agentRuntimeWaitingOnFromPhase(state.phase), nextStep: state.nextStep ?? agentRuntimeNextStepFromPhase(state.phase), loopIteration: state.loopIteration ?? previous?.loopIteration ?? 0, - maxLoopIterations: state.maxLoopIterations ?? previous?.maxLoopIterations ?? 3, + maxLoopIterations: + state.maxLoopIterations ?? previous?.maxLoopIterations ?? 3, toolActionBudget: state.toolActionBudget ?? previous?.toolActionBudget ?? 3, planSteps: normalizeAgentRuntimePlanSteps(state, previous), activePlanStepIndex: normalizeAgentRuntimeActivePlanStepIndex( @@ -653,24 +653,26 @@ function normalizeAgentRuntimeState( previous, ), recentToolCalls: state.recentToolCalls ?? previous?.recentToolCalls ?? [], - toolPolicy: state.toolPolicy ?? previous?.toolPolicy ?? { - allowedTools: state.allowedTools ?? [], - autoTools: [], - confirmTools: [], - deniedTools: [], - updatedAt: 0, - }, - taskQueue: state.taskQueue ?? previous?.taskQueue ?? { - total: 0, - pending: 0, - running: 0, - waitingForConfirmation: 0, - cancelled: 0, - completed: 0, - failed: 0, - latestRunId: null, - updatedAt: 0, - }, + toolPolicy: state.toolPolicy ?? + previous?.toolPolicy ?? { + allowedTools: state.allowedTools ?? [], + autoTools: [], + confirmTools: [], + deniedTools: [], + updatedAt: 0, + }, + taskQueue: state.taskQueue ?? + previous?.taskQueue ?? { + total: 0, + pending: 0, + running: 0, + waitingForConfirmation: 0, + cancelled: 0, + completed: 0, + failed: 0, + latestRunId: null, + updatedAt: 0, + }, recentEvents: state.recentEvents ?? previous?.recentEvents ?? [], recentTasks: state.recentTasks ?? previous?.recentTasks ?? [], }; @@ -752,7 +754,8 @@ function agentRuntimeStartStatus(result: AgentRuntimeResult) { function formatAgentRuntimeEvent(event: AgentRuntimeEventRecord) { const summary = event.summary || event.detail || event.runId; - const detail = event.detail && event.detail !== summary ? ` · ${event.detail}` : ''; + const detail = + event.detail && event.detail !== summary ? ` · ${event.detail}` : ''; return `${event.eventType} · ${event.status} / ${event.phase} · ${summary}${detail}`; } @@ -872,7 +875,11 @@ function AgentRuntimeStatusPanel({

{error}

{onRefreshRuntime ? ( - ) : null} @@ -886,9 +893,8 @@ function AgentRuntimeStatusPanel({ const observations = runtime.observations.slice(-2); const allRecentEvents = runtime.recentEvents ?? []; const hiddenRecentEventCount = Math.max(0, allRecentEvents.length - 4); - const recentEvents = (showAllRecentEvents - ? allRecentEvents.slice() - : allRecentEvents.slice(-4) + const recentEvents = ( + showAllRecentEvents ? allRecentEvents.slice() : allRecentEvents.slice(-4) ).reverse(); const recentToolCalls = (runtime.recentToolCalls ?? []).slice(-3).reverse(); const recentTasks = (runtime.recentTasks ?? []).slice(-3).reverse(); @@ -896,15 +902,18 @@ function AgentRuntimeStatusPanel({ const toolPolicy = runtime.toolPolicy; const taskQueueSummary = formatAgentRuntimeTaskQueue(runtime.taskQueue); const loopProgress = formatAgentRuntimeLoopProgress(runtime); - const nextStep = runtime.nextStep ?? agentRuntimeNextStepFromPhase(runtime.phase); + const nextStep = + runtime.nextStep ?? agentRuntimeNextStepFromPhase(runtime.phase); const currentGoal = runtime.currentGoal ?? runtime.currentTask; - const waitingOn = runtime.waitingOn ?? agentRuntimeWaitingOnFromPhase(runtime.phase); + const waitingOn = + runtime.waitingOn ?? agentRuntimeWaitingOnFromPhase(runtime.phase); const pendingToolAction = runtime.pendingToolAction ?? null; const delegationSource = formatAgentRuntimeDelegationSource(runtime); const canCancel = Boolean(runtime.runId) && (agentRuntimeCanCancel(runtime.status) || - (runtime.phase === 'needs-reconciliation' && Boolean(pendingToolAction))) && + (runtime.phase === 'needs-reconciliation' && + Boolean(pendingToolAction))) && Boolean(onCancelRuntimeTask); const canRetry = Boolean(runtime.runId) && @@ -955,10 +964,7 @@ function AgentRuntimeStatusPanel({ onClick={() => runtime.runId && pendingToolAction?.actionId && - onConfirmRuntimeTask?.( - runtime.runId, - pendingToolAction.actionId, - ) + onConfirmRuntimeTask?.(runtime.runId, pendingToolAction.actionId) } > 确认继续 @@ -977,7 +983,9 @@ function AgentRuntimeStatusPanel({ @@ -999,116 +1007,122 @@ function AgentRuntimeStatusPanel({ ) : null} {collapsed ? null : (
- {`task: ${runtime.taskId} · ${delegationSource ?? runtime.source}`} - {runtime.runId ? {`run: ${runtime.runId}`} : null} - {currentGoal ?

{`当前目标:${currentGoal}`}

: null} - {runtime.currentTask ?

{runtime.currentTask}

: null} - {runtime.currentAction} - {waitingOn ? {`等待:${waitingOn}`} : null} - {nextStep ? {`下一步:${nextStep}`} : null} - {pendingToolAction ? ( - - {`${ - runtime.phase === 'needs-reconciliation' - ? '待核对动作' - : '待确认动作' - }:${pendingToolAction.tool}${ - pendingToolAction.inputSummary - ? ` · ${pendingToolAction.inputSummary}` - : '' - }`} - - ) : runtime.status === 'waiting-for-confirmation' ? ( - 待确认动作摘要缺失,请刷新状态 - ) : null} - {loopProgress ? {loopProgress} : null} - {taskQueueSummary ? {taskQueueSummary} : null} - {toolPolicy ? ( - - {`工具策略:auto ${toolPolicy.autoTools.length} · confirm ${toolPolicy.confirmTools.length} · deny ${toolPolicy.deniedTools.length}`} - {toolPolicy.deniedTools.length > 0 - ? ` · deny: ${toolPolicy.deniedTools.slice(0, 3).join(', ')}` - : ''} - {toolPolicy.confirmTools.length > 0 - ? ` · confirm: ${toolPolicy.confirmTools.slice(0, 3).join(', ')}` - : ''} - - ) : null} - {planSteps.length > 0 ? ( -
- 计划进度 - {planSteps.map((step) => ( - - {formatAgentRuntimePlanStep(step)} + {`task: ${runtime.taskId} · ${delegationSource ?? runtime.source}`} + {runtime.runId ? {`run: ${runtime.runId}`} : null} + {currentGoal ?

{`当前目标:${currentGoal}`}

: null} + {runtime.currentTask ?

{runtime.currentTask}

: null} + {runtime.currentAction} + {waitingOn ? {`等待:${waitingOn}`} : null} + {nextStep ? {`下一步:${nextStep}`} : null} + {pendingToolAction ? ( + + {`${ + runtime.phase === 'needs-reconciliation' + ? '待核对动作' + : '待确认动作' + }:${pendingToolAction.tool}${ + pendingToolAction.inputSummary + ? ` · ${pendingToolAction.inputSummary}` + : '' + }`} - ))} -
- ) : planItems.length > 0 ? ( -
    - {planItems.map((item, index) => ( -
  1. {item}
  2. - ))} -
- ) : null} - {observations.length > 0 ? ( -
- {observations.map((item, index) => ( - {item} - ))} -
- ) : null} - {recentEvents.length > 0 ? ( -
- 最近事件 - {recentEvents.map((event, index) => ( - - {formatAgentRuntimeEvent(event)} - - ))} - {hiddenRecentEventCount > 0 ? ( - + ) : runtime.status === 'waiting-for-confirmation' ? ( + 待确认动作摘要缺失,请刷新状态 ) : null} -
- ) : null} - {recentToolCalls.length > 0 ? ( -
- 最近动作 - {recentToolCalls.map((toolCall, index) => ( - - {`${toolCall.tool} · ${toolCall.status} · ${toolCall.summary}`} - {toolCall.inputSummary ? ` · 目标:${toolCall.inputSummary}` : ''} - {toolCall.reason ? ` · ${toolCall.reason}` : ''} + {loopProgress ? {loopProgress} : null} + {taskQueueSummary ? {taskQueueSummary} : null} + {toolPolicy ? ( + + {`工具策略:auto ${toolPolicy.autoTools.length} · confirm ${toolPolicy.confirmTools.length} · deny ${toolPolicy.deniedTools.length}`} + {toolPolicy.deniedTools.length > 0 + ? ` · deny: ${toolPolicy.deniedTools.slice(0, 3).join(', ')}` + : ''} + {toolPolicy.confirmTools.length > 0 + ? ` · confirm: ${toolPolicy.confirmTools.slice(0, 3).join(', ')}` + : ''} - ))} -
- ) : null} - {recentTasks.length > 0 ? ( -
- 最近任务 - {recentTasks.map((task) => ( - - {formatAgentRecentRuntimeTask(task)} - - ))} -
- ) : null} - {runtime.error ?

{runtime.error}

: null} - {error ?

{error}

: null} + ) : null} + {planSteps.length > 0 ? ( +
+ 计划进度 + {planSteps.map((step) => ( + + {formatAgentRuntimePlanStep(step)} + + ))} +
+ ) : planItems.length > 0 ? ( +
    + {planItems.map((item, index) => ( +
  1. {item}
  2. + ))} +
+ ) : null} + {observations.length > 0 ? ( +
+ {observations.map((item, index) => ( + + {item} + + ))} +
+ ) : null} + {recentEvents.length > 0 ? ( +
+ 最近事件 + {recentEvents.map((event, index) => ( + + {formatAgentRuntimeEvent(event)} + + ))} + {hiddenRecentEventCount > 0 ? ( + + ) : null} +
+ ) : null} + {recentToolCalls.length > 0 ? ( +
+ 最近动作 + {recentToolCalls.map((toolCall, index) => ( + + {`${toolCall.tool} · ${toolCall.status} · ${toolCall.summary}`} + {toolCall.inputSummary + ? ` · 目标:${toolCall.inputSummary}` + : ''} + {toolCall.reason ? ` · ${toolCall.reason}` : ''} + + ))} +
+ ) : null} + {recentTasks.length > 0 ? ( +
+ 最近任务 + {recentTasks.map((task) => ( + + {formatAgentRecentRuntimeTask(task)} + + ))} +
+ ) : null} + {runtime.error ?

{runtime.error}

: null} + {error ?

{error}

: null}
)} @@ -2112,10 +2126,7 @@ function buildHomeConversationReceipt( export function AuthenticatedClient({ children, }: { - children: (session: { - user: AuthUser; - logout: () => void; - }) => ReactNode; + children: (session: { user: AuthUser; logout: () => void }) => ReactNode; }) { const [authStatus, setAuthStatus] = useState< 'checking' | 'authenticated' | 'unauthenticated' @@ -2157,10 +2168,7 @@ export function AuthenticatedClient({ isClientAuthRecoverableCheckError(error) ) { setLoginStatus( - getClientAuthErrorMessage( - error, - '登录服务暂时不可用,请稍后重试', - ), + getClientAuthErrorMessage(error, '登录服务暂时不可用,请稍后重试'), ); setAuthStatus('unauthenticated'); return; @@ -2925,8 +2933,7 @@ export function WorkspaceLauncher({ const [walletLedger, setWalletLedger] = useState( [], ); - const [walletLedgerStatus, setWalletLedgerStatus] = - useState('尚未读取明细'); + const [walletLedgerStatus, setWalletLedgerStatus] = useState('尚未读取明细'); const [accountMenuOpen, setAccountMenuOpen] = useState(false); const [helpMenuOpen, setHelpMenuOpen] = useState(false); const [launcherNotice, setLauncherNotice] = useState<{ @@ -2960,7 +2967,8 @@ export function WorkspaceLauncher({ >(null); const [agentChatLegacySessionMode, setAgentChatLegacySessionMode] = useState(false); - const [agentChatConversationPath, setAgentChatConversationPath] = useState(''); + const [agentChatConversationPath, setAgentChatConversationPath] = + useState(''); const [agentChatSessionStatus, setAgentChatSessionStatus] = useState(''); const [agentChatInput, setAgentChatInput] = useState(''); const [agentChatStatus, setAgentChatStatus] = useState('请选择项目和 Agent'); @@ -3048,7 +3056,8 @@ export function WorkspaceLauncher({ } if ( agentChatActiveSessionIdRef.current === null || - payload.runtime.state.sessionId === agentChatActiveSessionIdRef.current + payload.runtime.state.sessionId === + agentChatActiveSessionIdRef.current ) { setAgentChatActiveRuntime((current) => agentRuntimeStateFromResult(payload.runtime, current), @@ -3066,13 +3075,24 @@ export function WorkspaceLauncher({ ); setAgentChatRuntimeError(''); }, - ).then((unlisten) => { - if (disposed) { - unlisten(); - return; - } - cleanup = unlisten; - }); + ) + .then((unlisten) => { + if (disposed) { + unlisten(); + return; + } + cleanup = unlisten; + }) + .catch((error) => { + if (disposed) { + return; + } + setAgentChatRuntimeError( + `Runtime 订阅不可用:${ + error instanceof Error ? error.message : String(error) + }`, + ); + }); return () => { disposed = true; cleanup?.(); @@ -3093,7 +3113,9 @@ export function WorkspaceLauncher({ return; } setProfileDashboard(null); - setWalletLedgerStatus(error instanceof Error ? error.message : '泥点读取失败'); + setWalletLedgerStatus( + error instanceof Error ? error.message : '泥点读取失败', + ); }); void listClientShowcaseResources() .then((response) => { @@ -3101,7 +3123,9 @@ export function WorkspaceLauncher({ return; } setShowcaseResources(response.resources.slice(0, 6)); - setShowcaseStatus(response.resources.length > 0 ? '已读取灵感' : '暂无灵感'); + setShowcaseStatus( + response.resources.length > 0 ? '已读取灵感' : '暂无灵感', + ); }) .catch((error) => { if (disposed) { @@ -3233,11 +3257,11 @@ export function WorkspaceLauncher({ async function appendHomeConversation( invoke: TauriInvoke, nextProjectPath: string, - mode: HomeAgentMode, - prompt: string, - attachments: HomeAttachmentDraft[], - importedAttachments: LauncherImportedAttachment[], -) { + mode: HomeAgentMode, + prompt: string, + attachments: HomeAttachmentDraft[], + importedAttachments: LauncherImportedAttachment[], + ) { const userContent = buildHomeConversationContent(mode, prompt, attachments); await invoke('append_local_conversation_message', { projectPath: nextProjectPath, @@ -3332,7 +3356,9 @@ export function WorkspaceLauncher({ mode, initialPrompt: prompt.trim() || - (attachments.length > 0 ? '用户上传了参考附件,等待后续补充需求。' : ''), + (attachments.length > 0 + ? '用户上传了参考附件,等待后续补充需求。' + : ''), attachments: importedAttachments, recentRunStatus: null, recentRunStopReason: null, @@ -3437,7 +3463,8 @@ export function WorkspaceLauncher({ enterProjectDevelopment({ projectPath: trimmedProjectPath, projectName: - directoryStatus.projectName || projectNameFromPath(trimmedProjectPath), + directoryStatus.projectName || + projectNameFromPath(trimmedProjectPath), mode: null, initialPrompt: '', attachments: [], @@ -3652,9 +3679,7 @@ export function WorkspaceLauncher({ agentId = agentChatSelectedAgentId, ): LauncherAgentChatAgent | null { return ( - launcherAgentChatAgents.find( - (agent) => agent.id === agentId, - ) ?? + launcherAgentChatAgents.find((agent) => agent.id === agentId) ?? launcherAgentChatAgents[0] ?? null ); @@ -3793,9 +3818,7 @@ export function WorkspaceLauncher({ invoke: TauriInvoke, projectPathForChat: string, ) { - if ( - agentChatRuntimeResumeProjectPathRef.current === projectPathForChat - ) { + if (agentChatRuntimeResumeProjectPathRef.current === projectPathForChat) { return ''; } try { @@ -3858,7 +3881,9 @@ export function WorkspaceLauncher({ setAgentChatProjectPath(selectedPath); void loadAgentChatConversation(agentChatSelectedAgentId, selectedPath); } catch (error) { - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } } @@ -4022,7 +4047,9 @@ export function WorkspaceLauncher({ } setAgentChatMessages([]); setAgentChatConversationPath(''); - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } finally { if (agentChatLoadVersionRef.current === loadVersion) { setAgentChatBusy(false); @@ -4058,9 +4085,8 @@ export function WorkspaceLauncher({ agentId: agent.id, activeSessionId: agentChatActiveSessionId ?? - agentChatSessions.find( - (candidate) => candidate.archivedAt === null, - )?.sessionId ?? + agentChatSessions.find((candidate) => candidate.archivedAt === null) + ?.sessionId ?? session.sessionId, sessions: agentChatSessions, }, @@ -4102,7 +4128,9 @@ export function WorkspaceLauncher({ result, ); } catch (error) { - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); setAgentChatBusy(false); } } @@ -4141,7 +4169,9 @@ export function WorkspaceLauncher({ result, ); } catch (error) { - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); setAgentChatBusy(false); } } @@ -4184,7 +4214,9 @@ export function WorkspaceLauncher({ result, ); } catch (error) { - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); setAgentChatBusy(false); } } @@ -4228,6 +4260,7 @@ export function WorkspaceLauncher({ let stopStreamListen: (() => void) | null = null; let streamListenDisposed = false; let streamListenReady = false; + let streamListenUnavailable = false; let streamFrameId: number | null = null; let pendingStreamDraftText = ''; let pendingStreamFinishReason: string | null = null; @@ -4324,7 +4357,9 @@ export function WorkspaceLauncher({ window.cancelAnimationFrame(streamFrameId); streamFrameId = null; } - setAgentChatStatus(payload.runtimeSummary ?? 'Agent 回复完成,正在保存'); + setAgentChatStatus( + payload.runtimeSummary ?? 'Agent 回复完成,正在保存', + ); return; } if (payload.status === 'failed') { @@ -4344,13 +4379,16 @@ export function WorkspaceLauncher({ stopStreamListen = null; } } catch { + streamListenUnavailable = true; setAgentChatStatus('实时状态不可用,正在使用普通回复模式'); } } setAgentChatStatus( streamListenReady ? '已连接 Agent LLM,正在等待首个回复片段' - : '正在等待 Agent LLM 回复', + : streamListenUnavailable + ? '实时状态不可用,正在使用普通回复模式' + : '正在等待 Agent LLM 回复', ); let reply: GameCreatorChatAgentReply; if (streamListenReady) { @@ -4423,7 +4461,10 @@ export function WorkspaceLauncher({ setAgentChatStatus('正在保存 Agent 回复'); setAgentChatMessages([ ...savedUserMessages, - createLocalConversationDraftMessage(reply.replyText, streamDraftUpdatedAt), + createLocalConversationDraftMessage( + reply.replyText, + streamDraftUpdatedAt, + ), ]); const assistantResult = await invoke( 'append_local_conversation_message', @@ -4494,7 +4535,9 @@ export function WorkspaceLauncher({ setAgentChatStatus(message); } else { setAgentChatInput(content); - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } } finally { streamListenDisposed = true; @@ -4578,7 +4621,9 @@ export function WorkspaceLauncher({ return; } setAgentChatInput(content); - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } finally { if (agentChatLoadVersionRef.current === saveVersion) { setAgentChatBackgroundBusy(false); @@ -4633,7 +4678,9 @@ export function WorkspaceLauncher({ if (agentChatLoadVersionRef.current !== saveVersion) { return; } - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } finally { if (agentChatLoadVersionRef.current === saveVersion) { setAgentChatBackgroundBusy(false); @@ -4707,7 +4754,9 @@ export function WorkspaceLauncher({ if (agentChatLoadVersionRef.current !== saveVersion) { return; } - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } finally { if (agentChatLoadVersionRef.current === saveVersion) { setAgentChatBackgroundBusy(false); @@ -4786,7 +4835,9 @@ export function WorkspaceLauncher({ if (agentChatLoadVersionRef.current !== saveVersion) { return; } - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } finally { if (agentChatLoadVersionRef.current === saveVersion) { setAgentChatBackgroundBusy(false); @@ -4865,7 +4916,9 @@ export function WorkspaceLauncher({ if (agentChatLoadVersionRef.current !== saveVersion) { return; } - setAgentChatStatus(error instanceof Error ? error.message : String(error)); + setAgentChatStatus( + error instanceof Error ? error.message : String(error), + ); } finally { if (agentChatLoadVersionRef.current === saveVersion) { setAgentChatBackgroundBusy(false); @@ -4880,28 +4933,27 @@ export function WorkspaceLauncher({ directoryStatus?.projectName || workspace.split(/[\\/]/).filter(Boolean).pop() || workspace; - const status = - recentWorkspaceRefreshing - ? '检查中' - : isPendingStatus + const status = recentWorkspaceRefreshing + ? '检查中' + : isPendingStatus ? '检查中' : directoryStatus === null - ? '检查失败' - : directoryStatus?.exists === false - ? '未找到' - : directoryStatus?.isDirectory === false - ? '不是文件夹' - : directoryStatus?.manifestError - ? '无法读取' - : directoryStatus?.isGameCreatorProject === false - ? '未初始化' - : directoryStatus?.recentRunStatus - ? `run: ${directoryStatus.recentRunStatus}${ - directoryStatus.recentRunStopReason - ? ` · ${directoryStatus.recentRunStopReason}` - : '' - }` - : '本地项目'; + ? '检查失败' + : directoryStatus?.exists === false + ? '未找到' + : directoryStatus?.isDirectory === false + ? '不是文件夹' + : directoryStatus?.manifestError + ? '无法读取' + : directoryStatus?.isGameCreatorProject === false + ? '未初始化' + : directoryStatus?.recentRunStatus + ? `run: ${directoryStatus.recentRunStatus}${ + directoryStatus.recentRunStopReason + ? ` · ${directoryStatus.recentRunStopReason}` + : '' + }` + : '本地项目'; const canReveal = !recentWorkspaceRefreshing && Boolean(directoryStatus) && @@ -4935,9 +4987,12 @@ export function WorkspaceLauncher({ currentAgentChatSession?.archivedAt !== undefined; const currentAgentChatSessionMutationBlocked = Boolean( agentChatActiveRuntime && - (['running', 'pending', 'waiting-for-confirmation', 'cancelling'].includes( - agentChatActiveRuntime.status, - ) || + ([ + 'running', + 'pending', + 'waiting-for-confirmation', + 'cancelling', + ].includes(agentChatActiveRuntime.status) || agentChatActiveRuntime.phase === 'needs-reconciliation' || (agentChatActiveRuntime.taskQueue?.pending ?? 0) > 0 || (agentChatActiveRuntime.taskQueue?.running ?? 0) > 0 || @@ -4963,7 +5018,11 @@ export function WorkspaceLauncher({ ? ['创建游戏项目', '上传参考素材', '选择审批档位', '生成试玩原型'] : launcherView === 'contact' ? ['产品反馈', '商务合作', '账号与充值支持'] - : ['GameAgent V1.0 首页改版', '项目工作区和 Agent 会话建设中', '美术生成将接入平台 API']; + : [ + 'GameAgent V1.0 首页改版', + '项目工作区和 Agent 会话建设中', + '美术生成将接入平台 API', + ]; return (
@@ -5193,7 +5252,10 @@ export function WorkspaceLauncher({ ); })} -
+