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
1341 }1341 }
1342 // A completed assistant message only settles the turn once the1342 // A completed assistant message only settles the turn once the
1343 // session is no longer running it. Providers may emit several1343 // session is no longer running it. Providers may emit several
1344 // assistant messages per turn, and the turn must stay unsettled1344 // assistant messages per turn (commentary between tool calls), and
1345 // until the provider reports turn end.1345 // the turn must stay unsettled until the provider reports turn end
1346 // (projected as thread.session-set leaving the "running" status).
1346 const session = yield* projectionThreadSessionRepository.getByThreadId({1347 const session = yield* projectionThreadSessionRepository.getByThreadId({
1347 threadId: event.payload.threadId,1348 threadId: event.payload.threadId,
1348 });1349 });
@@ -1766,9 +1767,10 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti · 417 unmodified lines
1766 Effect.provideService(Path.Path, path),1767 Effect.provideService(Path.Path, path),
1767 Effect.provideService(ServerConfig, serverConfig),1768 Effect.provideService(ServerConfig, serverConfig),
1768 Effect.asVoid,1769 Effect.asVoid,
1769 Effect.catchTag("SqlError", (sqlError) =>1770 Effect.catchTags({
1770 Effect.fail(toPersistenceSqlError("ProjectionPipeline.projectEvent:query")(sqlError)),1771 SqlError: (sqlError) =>
1771 ),1772 Effect.fail(toPersistenceSqlError("ProjectionPipeline.projectEvent:query")(sqlError)),
1773 }),
1772 );1774 );
1773 };1775 };
1774 1776