mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 03:14:11 +00:00
fix(agent): prevent userComment entry duplication by passing userCommentId as active prompt entry ID
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user