补充项目策略快捷入口
新增索引资产登记和记忆写入确认草稿入口 补充用户面策略快捷入口测试 同步AI游戏创作App技术方案和共享决策记录
This commit is contained in:
@@ -9815,6 +9815,33 @@ export function App() {
|
||||
>
|
||||
任务
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!localProject}
|
||||
onClick={() =>
|
||||
prepareChatCommandDraft('/policy-confirm project.index')
|
||||
}
|
||||
>
|
||||
索引确认
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!localProject}
|
||||
onClick={() =>
|
||||
prepareChatCommandDraft('/policy-confirm asset.register')
|
||||
}
|
||||
>
|
||||
资产登记确认
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!localProject}
|
||||
onClick={() =>
|
||||
prepareChatCommandDraft('/policy-confirm memory.write')
|
||||
}
|
||||
>
|
||||
记忆写入确认
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!localProject}
|
||||
|
||||
@@ -240,6 +240,24 @@ 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,
|
||||
).toBe(true);
|
||||
expect(
|
||||
(
|
||||
screen.getByRole('button', {
|
||||
name: '记忆写入确认',
|
||||
}) as HTMLButtonElement
|
||||
).disabled,
|
||||
).toBe(true);
|
||||
expect(
|
||||
(screen.getByRole('button', { name: '预览确认' }) as HTMLButtonElement)
|
||||
.disabled,
|
||||
@@ -2061,6 +2079,21 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
await screen.findByText(/策略:\.agent\/policy\.json/),
|
||||
).not.toBeNull();
|
||||
const composerInput = screen.getByLabelText('创作想法');
|
||||
fireEvent.click(screen.getByRole('button', { name: '索引确认' }));
|
||||
expect(composerInput).toHaveProperty(
|
||||
'value',
|
||||
'/policy-confirm project.index',
|
||||
);
|
||||
fireEvent.click(screen.getByRole('button', { name: '资产登记确认' }));
|
||||
expect(composerInput).toHaveProperty(
|
||||
'value',
|
||||
'/policy-confirm asset.register',
|
||||
);
|
||||
fireEvent.click(screen.getByRole('button', { name: '记忆写入确认' }));
|
||||
expect(composerInput).toHaveProperty(
|
||||
'value',
|
||||
'/policy-confirm memory.write',
|
||||
);
|
||||
fireEvent.click(screen.getByRole('button', { name: '预览确认' }));
|
||||
expect(composerInput).toHaveProperty(
|
||||
'value',
|
||||
|
||||
@@ -3854,7 +3854,7 @@
|
||||
- 2026-06-25 调整:`project.create` 成功后的 durable 权限证据必须在聊天 `/project` 和开发窗口初始化两条入口统一写入 `.agent/logs/command.log`,避免同一能力因为入口不同导致 `/audit` 或开发排障证据不一致。
|
||||
- 2026-06-25 调整:`.agent/run.latest.json` 和 `.agent/runs/<runId>.json` 必须记录 loop 的 `maxPasses` 与 `stopReason`,开发窗口直接展示该状态,避免只从 summary 文案推断 loop 是否跑满、通过、返工、写入产物或进入预览。本地 HTTP 预览的 `/` 映射到 `game/index.html`,路径解析必须 canonicalize 项目根目录和目标文件,只允许访问项目内 `game/` 与 `assets/`,拒绝 `memory/`、`.agent/`、`exports/`、`..`、反斜杠和符号链接越界;常见图片、音频、视频和 Web 资源必须返回对应 MIME。这样上传和画板回流资产能被生成游戏引用,但记忆、trace 和导出包不会被预览服务暴露。
|
||||
- 2026-06-26 调整,2026-07-03 更新:AI 游戏创作 App 借鉴 Harbour 的控制平面思想,但不搬 Harbour 后台。最近 run 在 `.agent/run.latest.json` 增加可选 `lifecycleStatus`,并通过 `/agent-status`、`/agent-kill`、`/agent-retry`、`/agent-resume [说明]` 控制本地生命周期,写入 `.agent/activity.jsonl`、`.agent/output.jsonl` 和 `.agent/context.bundle.json`;聊天里的状态 / 控制结果可填入 `/read .agent/output.jsonl` 草稿继续查看 run 输出,但不直接读取文件或绕过 `file.read` 策略。v1 的 kill/retry/resume 只更新本地状态和上下文包,不伪装成能中断已发出的上游 LLM 请求;后续引入独立 runner 后再把 `pending` 接入 claim。
|
||||
- 2026-07-03 调整:主窗口 Agent 状态栏新增“继续说明”,只把 `/agent-resume ` 填入聊天输入框,让用户补充说明后再走原确认流;策略快捷入口新增 preview.open、preview.stop、conversation.read 和 conversation.write 确认草稿,同样只填输入框,不直接写 `.agent/policy.json`。
|
||||
- 2026-07-03 调整:主窗口 Agent 状态栏新增“继续说明”,只把 `/agent-resume ` 填入聊天输入框,让用户补充说明后再走原确认流;策略快捷入口新增 project.index、asset.register、memory.write、preview.open、preview.stop、conversation.read 和 conversation.write 确认草稿,同样只填输入框,不直接写 `.agent/policy.json`。
|
||||
- 2026-07-03 调整:主窗口 header 常驻项目摘要只从当前已加载的 manifest / trace 派生任务完成数、ready 数、资产来源分布和最近命令结果;未选择工作区时不显示,不为了摘要额外触发 Tauri 读取或写入,也不把任务、文件、run history 或预览开发面板搬进普通用户窗口。
|
||||
- 2026-07-03 调整:`/llm-status` 读取到的 agent 级 LLM 配置状态可回填到主窗口 Agent 状态列表和单 Agent 对话头部,显示 provider 类型、模型、流式开关和 API Key 是否已读取;密钥本体仍不能进入聊天、状态列表、manifest、trace 或本地项目文件。
|
||||
- 2026-07-03 调整:开发窗口日志面板提供 `.agent/logs/command.log`、`.agent/logs/preview.log` 和 `.agent/logs/agent.log` 的只读查看入口,复用 `file.read` 授权策略;普通用户窗口仍只通过聊天 `/read` 和摘要消息查看需要的日志,不新增日志面板。
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user