Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): enforce configurable thread context limits #10095

Closedsaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10095/headopened View on GitHub

Showing 11 changed files with 16 additions and 11 deletions (loading 10).

x
0 of 11 viewed, 11 left
16 additions and 11 deletionsapps/server/src/orchestration/Layers/ProjectionSnapshotQuery.tsModified
View file
@@ -3417,6 +3417,21 @@
+ const messagesEffect =
+ activityRead.mode === "raw" && activityRead.query?.includeMessages === false
+ ? Effect.succeed([])
+ : (bounds === undefined
+ ? listThreadMessageRowsByThread({ threadId })
+ : listThreadMessageRowsByThreadWindow({ threadId, ...bounds })
+ ).pipe(
+ Effect.mapError(
+ toPersistenceSqlOrDecodeError(
+ "ProjectionSnapshotQuery.getThreadDetailById:listMessages:query",
+ "ProjectionSnapshotQuery.getThreadDetailById:listMessages:decodeRows",
+ ),
+ ),
+ );
+​
const [
threadRow,
messageRows,
@@ -3435,17 +3450,7 @@
- (bounds === undefined
- ? listThreadMessageRowsByThread({ threadId })
- : listThreadMessageRowsByThreadWindow({ threadId, ...bounds })