补充常用产物读取入口
新增主窗口常用生成产物读取草稿入口 补充用户面快捷入口测试 同步AI游戏创作App技术方案和共享决策记录
This commit is contained in:
@@ -218,6 +218,14 @@ type ProjectFileActionDraft = {
|
||||
assetCommand: string;
|
||||
};
|
||||
|
||||
const commonProjectArtifactReadDrafts = [
|
||||
{ label: '读设计', path: 'game/game_design.md' },
|
||||
{ label: '读数值', path: 'game/balance.json' },
|
||||
{ label: '读美术清单', path: 'assets/manifest.art.json' },
|
||||
{ label: '读音频清单', path: 'assets/manifest.audio.json' },
|
||||
{ label: '读发布说明', path: 'exports/README.md' },
|
||||
] as const;
|
||||
|
||||
interface ListLocalProjectFilesResult {
|
||||
projectPath: string;
|
||||
files: LocalProjectFileEntry[];
|
||||
@@ -9705,6 +9713,18 @@ export function App() {
|
||||
>
|
||||
资产
|
||||
</button>
|
||||
{commonProjectArtifactReadDrafts.map((artifact) => (
|
||||
<button
|
||||
key={artifact.path}
|
||||
type="button"
|
||||
disabled={!localProject}
|
||||
onClick={() =>
|
||||
prepareChatCommandDraft(`/read ${artifact.path}`)
|
||||
}
|
||||
>
|
||||
{artifact.label}
|
||||
</button>
|
||||
))}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => prepareChatCommandDraft('/canvas ')}
|
||||
|
||||
@@ -2085,6 +2085,17 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
'uploaded · text/plain · uploaded',
|
||||
),
|
||||
).not.toBeNull();
|
||||
for (const [buttonName, draftValue] of [
|
||||
['读设计', '/read game/game_design.md'],
|
||||
['读数值', '/read game/balance.json'],
|
||||
['读美术清单', '/read assets/manifest.art.json'],
|
||||
['读音频清单', '/read assets/manifest.audio.json'],
|
||||
['读发布说明', '/read exports/README.md'],
|
||||
] as const) {
|
||||
fireEvent.click(screen.getByRole('button', { name: buttonName }));
|
||||
expect(composerInput).toHaveProperty('value', draftValue);
|
||||
await waitFor(() => expect(document.activeElement).toBe(composerInput));
|
||||
}
|
||||
fireEvent.click(screen.getByRole('button', { name: '打开画板' }));
|
||||
expect(composerInput).toHaveProperty('value', '/canvas ');
|
||||
await waitFor(() => expect(document.activeElement).toBe(composerInput));
|
||||
|
||||
@@ -3860,6 +3860,7 @@
|
||||
- 2026-07-03 调整:开发窗口日志面板提供 `.agent/logs/command.log`、`.agent/logs/preview.log` 和 `.agent/logs/agent.log` 的只读查看入口,复用 `file.read` 授权策略;普通用户窗口仍只通过聊天 `/read` 和摘要消息查看需要的日志,不新增日志面板。
|
||||
- 2026-07-03 调整:单 Agent 对话面板允许用户把当前输入手动追加到该 agent 的 `memory/agents/<group>/<role>.md` 私有记忆;写入复用 `memory.write` 项目策略、项目锁和 Tauri 本地目录能力,不把普通对话流水自动混入私有记忆。
|
||||
- 2026-07-03 调整:主窗口新增音效登记和画板音频导入快捷入口,只填入 `/asset-register assets/audio/sfx.wav audio audio/wav` 或 `/import-canvas-asset assets/audio/sfx.wav ` 草稿;音乐组仍复用现有资产登记 / 画板回流链路,不新增独立音频生成系统。
|
||||
- 2026-07-03 调整:主窗口新增常用生成产物读取入口,只把设计、数值、美术清单、音频清单和发布说明对应的 `/read` 草稿填入聊天输入框;实际读取仍走聊天侧 `file.read` 权限流,不直接读本地文件。
|
||||
- 2026-06-25 调整:本地 HTTP 预览静态 `HEAD` 必须返回与 `GET` 相同的真实 `Content-Length`,但不返回 body;浏览器、图片、音频和视频探测不能拿到 `Content-Length: 0` 的假响应。
|
||||
- 2026-06-25 调整:普通用户通过聊天输入 `/run` 触发待确认 `game.run_local`,确认后只能复用白名单 `game.static_smoke` 自检当前 `game/index.html`,通过后启动 `127.0.0.1` 本地 HTTP 预览。独立执行 `game.static_smoke` 时如果已有 `.agent/run.latest.json`,必须追加 `Playtest / game.static_smoke` trace step,避免“运行了代码但编排 trace 不可见”。
|
||||
- 2026-06-25 调整:普通用户通过聊天输入 `/trace` 触发只读 `agent.trace_read`,读取 `.agent/run.latest.json` 并在聊天里摘要 loop 轮次、stopReason、nextStep、active / carry-over 任务、repairRoutes、agent 建议命令和最近 step。trace 面板仍只在开发窗口展示,普通用户窗口不新增面板。
|
||||
|
||||
@@ -171,6 +171,7 @@ game-project/
|
||||
- 聊天输入 `/files` 会通过 `file.list` 只读列出本地项目内的文件摘要;主窗口最近项目文件可一键读取,也可一键填入 `/read` 或 `/asset-register` 草稿,但资产登记仍必须走聊天确认;`/checkpoints` 复用 `file.list` / `file.read` 只读列出最近 checkpoint id、文件数、大小和可复制的 `/diff` / `/restore` 命令,主窗口最近 checkpoint 列表也可填入对应草稿;普通用户仍不暴露文件读写面板。
|
||||
- 聊天输入 `/assets` 会读取 `.agent/manifest.json` 并在聊天里列出本地项目资产路径、类型和来源,资产列表消息和主窗口最近项目资产入口都可一键填入对应资产的 `/read` 草稿;`/asset-register 路径 [kind] [mediaType]` 可确认后登记项目内已有资产;主窗口音效快捷入口只填入 `/asset-register assets/audio/sfx.wav audio audio/wav` 草稿,不直接写 manifest;普通用户仍不暴露资产面板。
|
||||
- 聊天输入 `/read 本地相对路径` 会通过 `file.read` 只读返回项目内文本文件内容并在聊天中截断长文本;普通用户仍不暴露文件写入或删除能力。
|
||||
- 主窗口常用生成产物入口只把 `game/game_design.md`、`game/balance.json`、`assets/manifest.art.json`、`assets/manifest.audio.json` 和 `exports/README.md` 的 `/read` 草稿填入聊天输入框;读取仍由聊天侧 `file.read` 权限流执行。
|
||||
- 聊天输入 `/tasks` 会读取 `.agent/manifest.json` 并在聊天里列出专业组、角色、任务状态、产物交接和下一步可执行任务;普通用户仍不暴露任务面板。
|
||||
- 聊天输入 `/trace` 会通过 `agent.trace_read` 只读读取 `.agent/run.latest.json`,在聊天里汇总最近一次 loop 的轮次、stopReason、nextStep、active/carry-over 任务、repairRoutes、agent 建议命令、产物快照和最近 step;没有待同步建议命令时,首个安全产物可一键填入 `/read <path>` 草稿;active、carry-over、repairRoutes 和 dependencyWaves 必须把 taskId 映射成专业组 / 角色 / 任务名,避免普通用户只能看到内部 id;普通用户仍不暴露开发 trace 面板。
|
||||
- 主窗口可从 agent 状态列表进入单个 agent 对话;该入口只加载目标 agent 的 conversation JSONL,发送消息后追加到同一 agent conversation,不开启平行任务图、不 fork run,也不归档历史会话。
|
||||
|
||||
Reference in New Issue
Block a user