接入做成游戏后的策划文档指令
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 5m24s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 5m36s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 5m54s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m49s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m54s
Project CI / Frontend tests (pull_request) Successful in 5m35s
Project CI / Repository checks (pull_request) Successful in 5m26s
Project CI / Backend tests (pull_request) Successful in 8m34s
Project CI / Native shell tests (pull_request) Successful in 8m51s
Project CI / AI game creator shell web tests (pull_request) Successful in 4m18s

切换到 GameAgent 后自动请求读取 design_artifacts 文档

为切换消息增加独立去重键,避免策划首轮占用
This commit is contained in:
2026-09-16 13:55:02 +08:00
parent b3e9d0a906
commit 4da1494a1d
2 changed files with 21 additions and 10 deletions
+8 -4
View File
@@ -605,16 +605,20 @@ function isPersistableDirectCodexConversationMessage(message: ChatMessage) {
return /^[a-z0-9][a-z0-9-]{5,159}$/iu.test(turnId);
}
function claimInitialSupervisorMessageForPage(projectPath: string) {
function claimInitialSupervisorMessageForPage(
projectPath: string,
messageKey = '',
) {
let claimedProjectPaths = initialSupervisorMessageClaimsByPage.get(window);
if (!claimedProjectPaths) {
claimedProjectPaths = new Set<string>();
initialSupervisorMessageClaimsByPage.set(window, claimedProjectPaths);
}
if (claimedProjectPaths.has(projectPath)) {
const claimKey = `${projectPath}\u0000${messageKey}`;
if (claimedProjectPaths.has(claimKey)) {
return false;
}
claimedProjectPaths.add(projectPath);
claimedProjectPaths.add(claimKey);
return true;
}
@@ -7501,7 +7505,7 @@ export function App({
}
if (
chatAgentBusy ||
!claimInitialSupervisorMessageForPage(latch.projectPath)
!claimInitialSupervisorMessageForPage(latch.projectPath, latch.prompt)
) {
return;
}
@@ -495,6 +495,9 @@ export function WorkspaceLauncherShell({
});
}
const approvedDesignBuildPrompt =
'查看当前项目 design_artifacts/ 目录及其子目录下的文档,理解其游戏设计,并按照这些文档将游戏实现出来。';
const currentHelpTitle =
launcherView === 'guide'
? '使用指南'
@@ -661,14 +664,18 @@ export function WorkspaceLauncherShell({
initialProjectManifest={currentProjectContext.manifest}
initialProjectKind={currentProjectContext.projectKind}
initialSupervisorMessage={
!suppressInitialGameTurn
? currentProjectContext.initialPrompt
: ''
switchedToGameRuntime
? approvedDesignBuildPrompt
: !suppressInitialGameTurn
? currentProjectContext.initialPrompt
: ''
}
initialCreationType={
!suppressInitialGameTurn
? currentProjectContext.creationType
: null
switchedToGameRuntime
? 'game'
: !suppressInitialGameTurn
? currentProjectContext.creationType
: null
}
initialAttachments={
!suppressInitialGameTurn