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
@@ -71,7 +71,14 @@ export class DatabaseSessionStorage implements SessionStorage<DatabaseSessionMet
await this.appendEntry(leafEntry)
}
nextEntryId?: string | null
async createEntryId(): Promise<string> {
if (this.nextEntryId) {
const id = this.nextEntryId
this.nextEntryId = null
return id
}
return ulid()
}