移除旧聊天面板策划挂载
删除 ProjectWorkspaceChatPane 中重复的 GDD 与 planning runtime JSX 清理旧 Pane 的策划 props 和 App 传递 将策划界面测试迁移到正式 supervisor-only 挂载路径
This commit is contained in:
@@ -11037,20 +11037,6 @@ export function App({
|
||||
projectSupervisorRuntime={projectSupervisorRuntime}
|
||||
projectSupervisorRuntimeError={projectSupervisorRuntimeError}
|
||||
projectSupervisorTransientReply={projectSupervisorTransientReply}
|
||||
planGddState={planGddState}
|
||||
planGddHydrateBusy={planGddHydrateBusy}
|
||||
planGddDecisionBusy={planGddDecisionBusy}
|
||||
planGddError={planGddError}
|
||||
onPlanGddRefresh={() => void hydratePlanGddState()}
|
||||
onPlanGddDecision={decidePlanGdd}
|
||||
onMakeGameFromApprovedGdd={
|
||||
onMakeGameFromApprovedGdd
|
||||
? () =>
|
||||
onMakeGameFromApprovedGdd(
|
||||
localProject?.projectPath ?? projectPath,
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
queueAgentRunControlFromPanel={queueAgentRunControlFromPanel}
|
||||
queueOrExecuteProjectIndex={queueOrExecuteProjectIndex}
|
||||
queuePendingCommand={queuePendingCommand}
|
||||
|
||||
+12
-56
@@ -25,8 +25,6 @@ import type {
|
||||
MemoryScope,
|
||||
PendingCommand,
|
||||
PendingUiConfirmation,
|
||||
PlanGddDecisionAction,
|
||||
PlanGddStateViewV1,
|
||||
} from '../../app/types';
|
||||
import type { ProjectAgentResultSummary } from '../../view/project-development';
|
||||
import {
|
||||
@@ -47,13 +45,10 @@ import {
|
||||
taskGroupLabels,
|
||||
taskStatusLabels,
|
||||
} from '../project-summary/projectSummary';
|
||||
import { PlanGddSurface } from './GddApprovalCard';
|
||||
import {
|
||||
pendingCommandDetail,
|
||||
pendingCommandTitle,
|
||||
} from './pendingCommandPresentation';
|
||||
import { isPlanningLaneRuntime } from './planningLane';
|
||||
import { PlanningLaneRuntimeStrip } from './PlanningLaneRuntimeStrip';
|
||||
import { resolvePendingCommandProjectPath } from './projectCommandPolicy';
|
||||
|
||||
type ProjectWorkspaceChatPaneProps = {
|
||||
@@ -180,16 +175,6 @@ type ProjectWorkspaceChatPaneProps = {
|
||||
projectSupervisorRuntime: AgentRuntimeState | null;
|
||||
projectSupervisorRuntimeError: string;
|
||||
projectSupervisorTransientReply: string;
|
||||
planGddState: PlanGddStateViewV1 | null;
|
||||
planGddHydrateBusy: boolean;
|
||||
planGddDecisionBusy: boolean;
|
||||
planGddError: string | null;
|
||||
onPlanGddRefresh: () => void;
|
||||
onPlanGddDecision: (
|
||||
action: PlanGddDecisionAction,
|
||||
comment: string | null,
|
||||
) => Promise<void>;
|
||||
onMakeGameFromApprovedGdd?: () => Promise<void>;
|
||||
queueAgentRunControlFromPanel: (action: 'kill' | 'retry' | 'resume') => void;
|
||||
queueOrExecuteProjectIndex: () => Promise<void>;
|
||||
queuePendingCommand: (command: PendingCommand) => void;
|
||||
@@ -273,13 +258,6 @@ export function ProjectWorkspaceChatPane({
|
||||
projectSupervisorRuntime,
|
||||
projectSupervisorRuntimeError,
|
||||
projectSupervisorTransientReply,
|
||||
planGddState,
|
||||
planGddHydrateBusy,
|
||||
planGddDecisionBusy,
|
||||
planGddError,
|
||||
onPlanGddRefresh,
|
||||
onPlanGddDecision,
|
||||
onMakeGameFromApprovedGdd,
|
||||
queueAgentRunControlFromPanel,
|
||||
queueOrExecuteProjectIndex,
|
||||
queuePendingCommand,
|
||||
@@ -369,17 +347,6 @@ export function ProjectWorkspaceChatPane({
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<PlanGddSurface
|
||||
state={planGddState}
|
||||
active={isPlanningLaneRuntime(projectSupervisorRuntime)}
|
||||
projectPath={projectPath}
|
||||
hydrateBusy={planGddHydrateBusy}
|
||||
decisionBusy={planGddDecisionBusy}
|
||||
error={planGddError}
|
||||
onRefresh={onPlanGddRefresh}
|
||||
onDecision={onPlanGddDecision}
|
||||
onMakeGame={onMakeGameFromApprovedGdd}
|
||||
/>
|
||||
<div className="chat-quick-actions" aria-label="预览快捷操作">
|
||||
<button
|
||||
type="button"
|
||||
@@ -865,29 +832,18 @@ export function ProjectWorkspaceChatPane({
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
{isPlanningLaneRuntime(projectSupervisorRuntime) ? (
|
||||
<PlanningLaneRuntimeStrip
|
||||
runtime={projectSupervisorRuntime}
|
||||
error={projectSupervisorRuntimeError}
|
||||
controlBusy={chatAgentBusy}
|
||||
onSupervisorRetry={handleProjectSupervisorRetry}
|
||||
onUserInput={handleProjectSupervisorUserInput}
|
||||
/>
|
||||
) : (
|
||||
<ProjectSupervisorRuntimePanel
|
||||
runtime={projectSupervisorRuntime}
|
||||
error={projectSupervisorRuntimeError}
|
||||
runtimeByAgentId={agentRuntimeById}
|
||||
controlBusy={chatAgentBusy}
|
||||
planGddAwaitingDecision={Boolean(planGddState?.pendingApproval)}
|
||||
professionalResultsByAgentId={professionalAgentResultsById}
|
||||
onToolAction={handleProjectSupervisorToolAction}
|
||||
onSupervisorRetry={handleProjectSupervisorRetry}
|
||||
onProfessionalToolAction={handleProjectProfessionalAgentToolAction}
|
||||
onProfessionalRetry={handleProjectProfessionalAgentRetry}
|
||||
onUserInput={handleProjectSupervisorUserInput}
|
||||
/>
|
||||
)}
|
||||
<ProjectSupervisorRuntimePanel
|
||||
runtime={projectSupervisorRuntime}
|
||||
error={projectSupervisorRuntimeError}
|
||||
runtimeByAgentId={agentRuntimeById}
|
||||
controlBusy={chatAgentBusy}
|
||||
professionalResultsByAgentId={professionalAgentResultsById}
|
||||
onToolAction={handleProjectSupervisorToolAction}
|
||||
onSupervisorRetry={handleProjectSupervisorRetry}
|
||||
onProfessionalToolAction={handleProjectProfessionalAgentToolAction}
|
||||
onProfessionalRetry={handleProjectProfessionalAgentRetry}
|
||||
onUserInput={handleProjectSupervisorUserInput}
|
||||
/>
|
||||
{pendingCommand ? (
|
||||
<div className="pending-command">
|
||||
<span>
|
||||
|
||||
@@ -4,21 +4,33 @@ import { resolve } from 'node:path';
|
||||
import { PlanGddStageProgress } from '../../src/features/project-workspace/GddApprovalCard';
|
||||
import {
|
||||
agentRuntimeUserInputRequest,
|
||||
App,
|
||||
createPlanGddStateView,
|
||||
createProjectSupervisorRuntimeHarness,
|
||||
expect,
|
||||
fireEvent,
|
||||
it,
|
||||
openMainProject,
|
||||
React,
|
||||
render,
|
||||
renderAppAt,
|
||||
screen,
|
||||
vi,
|
||||
waitFor,
|
||||
within,
|
||||
} from './harness';
|
||||
|
||||
function mountFormalSupervisor(
|
||||
harness: ReturnType<typeof createProjectSupervisorRuntimeHarness>,
|
||||
) {
|
||||
window.history.pushState({}, '', '/');
|
||||
render(
|
||||
React.createElement(App, {
|
||||
initialProjectPath: harness.projectPath,
|
||||
orchestrationMode: 'single-supervisor',
|
||||
projectSupervisorOnly: true,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
async function mountApprovalCard(
|
||||
harness: ReturnType<typeof createProjectSupervisorRuntimeHarness>,
|
||||
) {
|
||||
@@ -26,8 +38,7 @@ async function mountApprovalCard(
|
||||
core: { invoke: harness.invoke },
|
||||
event: { listen: harness.listen },
|
||||
};
|
||||
renderAppAt('/');
|
||||
await openMainProject(harness.projectPath);
|
||||
mountFormalSupervisor(harness);
|
||||
return await screen.findByLabelText('GDD 审批卡');
|
||||
}
|
||||
|
||||
@@ -38,8 +49,7 @@ async function mountPlanningSurface(
|
||||
core: { invoke: harness.invoke },
|
||||
event: { listen: harness.listen },
|
||||
};
|
||||
renderAppAt('/');
|
||||
await openMainProject(harness.projectPath);
|
||||
mountFormalSupervisor(harness);
|
||||
return await screen.findByLabelText('立项策划阶段进度');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user