fix(agent): prevent userComment entry duplication by passing userCommentId as active prompt entry ID

This commit is contained in:
yiling
2026-07-29 11:33:26 +08:00
parent 343750e178
commit acb64f44bb
4 changed files with 60 additions and 14 deletions
+3
View File
@@ -135,6 +135,9 @@ export async function createAgentSession(params: CreateAgentSessionParams) {
sessionId,
cwd: process.cwd(),
})
if (passedUserCommentId) {
storage.nextEntryId = passedUserCommentId
}
const session = new Session(storage)
const agentDir = path.join(process.cwd(), '.pi', 'agents', agentId)