补充Agent对话与继续草稿入口

新增对话读写策略确认草稿入口

新增Agent继续说明草稿入口

补充用户面快捷入口测试

同步AI游戏创作App技术方案和共享决策记录
This commit is contained in:
AIGameCreator App
2026-07-03 02:14:55 +08:00
parent 4a6540a5af
commit 1ad51e30c6
4 changed files with 59 additions and 0 deletions
+25
View File
@@ -9479,6 +9479,24 @@ export function App() {
>
Agent确认
</button>
<button
type="button"
disabled={!localProject}
onClick={() =>
prepareChatCommandDraft('/policy-confirm conversation.read')
}
>
读对话确认
</button>
<button
type="button"
disabled={!localProject}
onClick={() =>
prepareChatCommandDraft('/policy-confirm conversation.write')
}
>
存对话确认
</button>
<button
type="button"
disabled={!localProject}
@@ -9894,6 +9912,13 @@ export function App() {
>
继续
</button>
<button
type="button"
disabled={!localProject}
onClick={() => prepareChatCommandDraft('/agent-resume ')}
>
继续说明
</button>
<button
type="button"
disabled={!localProject}
@@ -247,6 +247,20 @@ describe('AI 游戏创作 App 界面边界', () => {
(screen.getByRole('button', { name: 'Agent确认' }) as HTMLButtonElement)
.disabled,
).toBe(true);
expect(
(
screen.getByRole('button', {
name: '读对话确认',
}) as HTMLButtonElement
).disabled,
).toBe(true);
expect(
(
screen.getByRole('button', {
name: '存对话确认',
}) as HTMLButtonElement
).disabled,
).toBe(true);
expect(
(screen.getByRole('button', { name: 'Trace' }) as HTMLButtonElement)
.disabled,
@@ -343,6 +357,10 @@ describe('AI 游戏创作 App 界面边界', () => {
(screen.getByRole('button', { name: '继续' }) as HTMLButtonElement)
.disabled,
).toBe(true);
expect(
(screen.getByRole('button', { name: '继续说明' }) as HTMLButtonElement)
.disabled,
).toBe(true);
expect(
(screen.getByRole('button', { name: '输出' }) as HTMLButtonElement)
.disabled,
@@ -1920,6 +1938,16 @@ describe('AI 游戏创作 App 界面边界', () => {
'value',
'/policy-confirm agent.run_status',
);
fireEvent.click(screen.getByRole('button', { name: '读对话确认' }));
expect(composerInput).toHaveProperty(
'value',
'/policy-confirm conversation.read',
);
fireEvent.click(screen.getByRole('button', { name: '存对话确认' }));
expect(composerInput).toHaveProperty(
'value',
'/policy-confirm conversation.write',
);
expect(screen.queryByText('project.policy_write')).toBeNull();
expect(invoke).not.toHaveBeenCalledWith(
'write_project_permission_policy',
@@ -14929,6 +14957,9 @@ describe('AI 游戏创作 App 界面边界', () => {
detail: undefined,
});
});
const composerInput = screen.getByLabelText('创作想法');
fireEvent.click(screen.getByRole('button', { name: '继续说明' }));
expect(composerInput).toHaveProperty('value', '/agent-resume ');
});
it('requires project policy confirmation before reading agent run status from the panel', async () => {