History

chore(server): address effect review feedback

t3-code[bot] committed 3 months ago

Commit dbd81891 parent b5627231 file · +7 −5Browse files

Unified · Split

apps/server/src/orchestration/Layers/ProjectionPipeline.ts+7−5
@@ -1341,8 +1341,9 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti · 1340 unmodified lines
13411341 }
13421342 // A completed assistant message only settles the turn once the
13431343 // session is no longer running it. Providers may emit several
1344− // assistant messages per turn, and the turn must stay unsettled
1345− // until the provider reports turn end.
1344+ // assistant messages per turn (commentary between tool calls), and
1345+ // the turn must stay unsettled until the provider reports turn end
1346+ // (projected as thread.session-set leaving the "running" status).
13461347 const session = yield* projectionThreadSessionRepository.getByThreadId({
13471348 threadId: event.payload.threadId,
13481349 });
@@ -1766,9 +1767,10 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti · 417 unmodified lines
17661767 Effect.provideService(Path.Path, path),
17671768 Effect.provideService(ServerConfig, serverConfig),
17681769 Effect.asVoid,
1769− Effect.catchTag("SqlError", (sqlError) =>
1770− Effect.fail(toPersistenceSqlError("ProjectionPipeline.projectEvent:query")(sqlError)),
1771− ),
1770+ Effect.catchTags({
1771+ SqlError: (sqlError) =>
1772+ Effect.fail(toPersistenceSqlError("ProjectionPipeline.projectEvent:query")(sqlError)),
1773+ }),
17721774 );
17731775 };
17741776