修复策划模式输入提示显示 #379

Merged
lhk229 merged 4 commits from fix/design_input into master 2026-09-16 02:38:06 +08:00
3 changed files with 24 additions and 2 deletions
@@ -5170,7 +5170,12 @@ pub(crate) fn create_game_creator_agent_session(
let root = Path::new(project_path.trim());
enforce_project_permission_policy(root, "conversation.read")?;
enforce_project_permission_policy(root, "conversation.write")?;
let _lock = acquire_project_write_lock(root, "conversation.write")?;
// 首轮策划消息可能紧跟项目初始化写入到达;对话保存应等待这段短暂的
// 项目锁竞争,避免把可恢复的初始化竞态直接显示成保存失败。
let _lock = acquire_game_creator_agent_runtime_project_write_lock_with_wait(
root,
"conversation.write",
)?;
create_game_creator_agent_session_at(root, agent_id.trim(), title.trim())
}
@@ -491,7 +491,9 @@ export function ProjectSupervisorView({
placeholder={
directCodex
? '告诉陶泥儿接下来要做什么,或输入 @ 选择资源'
: '告诉项目总控接下来要做什么,或输入 @ 选择资源'
: planningSurfaceActive
? ''
: '告诉项目总控接下来要做什么,或输入 @ 选择资源'
}
onChange={onChatInputChange}
/>
@@ -577,6 +577,21 @@ export function registerPlanGddApprovalTests() {
expect(screen.queryByText(/计划 \d+\/\d+/)).toBeNull();
});
it('keeps the chat composer but hides its placeholder in the planning lane', async () => {
const harness = createProjectSupervisorRuntimeHarness({
planningV2Result: planningV2WorkingResult(),
});
await mountPlanningSurface(harness);
expect(screen.getByRole('textbox', { name: '项目需求' })).not.toBeNull();
expect(
screen.queryByText('告诉策划 Agent 接下来要做什么,或输入 @ 选择资源'),
).toBeNull();
expect(
screen.queryByText('告诉项目总控接下来要做什么,或输入 @ 选择资源'),
).toBeNull();
});
it('still surfaces the clarification card on the planning lane', async () => {
// 澄清卡是 V2 策划链路唯一需要用户动手的交互面之一。
const harness = createProjectSupervisorRuntimeHarness({