Skip to content

Commit f200ff8

Browse files
committed
Add skip persist event option
1 parent 6449b0d commit f200ff8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/server/grimoire/src/lib/spellbook.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export class Spellbook<
387387

388388
async createOrGetAgentChannel(eventKey: string, event: EventPayload) {
389389
// don't persist playtest channel events
390-
if (event.isPlaytest) return
390+
if (event.isPlaytest || event.skipPersist) return
391391
const agentId = this.agent.id
392392
const agentChannel = await this.prisma.agent_channels
393393
.findFirst({

packages/shared/servicesShared/src/lib/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export type EventPayload<T = any, Y = any> = {
199199
skipSave?: boolean
200200
// entities: any[]
201201
channelType: string
202+
skipPersist?: boolean
202203
rawData: string
203204
timestamp: string
204205
stateKey?: string

0 commit comments

Comments
 (0)