优化项目名称显示 #245
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
支持修改项目名称以及LLM根据用户输入自主提炼项目名称
需求文档:优化项目名称显示与命名链路
1. 问题
当前项目名称只在创建时生成一次,且缺少用户可用的改名入口:
GameAgent 项目 {短ID},用户无法从名称看出真实创作主题。apps/ai-game-creator-shell/src-tauri/src/commands.rs的create_automatic_local_game_project_at生成GameAgent 项目 {short_id}。useHomeProjectCreation.ts使用projectNameFromPath(trimmedProjectPath)。.agent/manifest.json的name字段,最近项目列表通过inspect_local_project_directory读取;因此改名必须落在 manifest,而不是只改前端显示。2. 目标
projectId、项目类型和本地权限模型。3. 非目标
/api/external/v1。4. 方案
4.1 名称权威与校验
GameCreationAppManifest.name作为唯一权威名称。rename_local_game_project:projectPath、name。name后通过现有mutate_manifest_at/write_manifest持久化。4.2 UI 修改
projectName更新后:WorkspaceLauncher窗口标题自动跟随。4.3 LLM 自动提炼项目名
suggest_automatic_project_name:null。GameAgent 项目 {短ID}。create_automatic_local_game_project增加可选name入参;未提供时保持现有默认名,已提供时走同一套名称校验。5. 验收标准
.agent/manifest.json的name、项目列表、当前项目上下文和窗口标题一致。projectId、任务、资源、版本和权限。npm run typecheck、npm run check:encoding、git diff --check。6. 风险与边界