Skip to content

Commit a99317e

Browse files
authored
refactor(gateway): unify bounded chat history across transports (#128844)
1 parent 9e98229 commit a99317e

14 files changed

Lines changed: 442 additions & 962 deletions

‎config/assertion-safety-baseline.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ src/agents/tools/cron-tool-schema.ts 1
21102110
src/agents/tools/cron-tool-write.ts 2
21112111
src/agents/tools/cron-tool.ts 13
21122112
src/agents/tools/dashboard-tool.ts 3
2113-
src/agents/tools/embedded-gateway-stub.ts 13
2113+
src/agents/tools/embedded-gateway-stub.ts 8
21142114
src/agents/tools/gateway-tool.ts 5
21152115
src/agents/tools/gateway.ts 1
21162116
src/agents/tools/goal-tools.ts 4

‎src/agents/tools/embedded-gateway-stub.runtime.ts‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,18 @@ export {
1111
resolveSessionStoreKey,
1212
resolveStoredSessionKeyForAgentStore,
1313
} from "../../gateway/session-store-key.js";
14-
export {
15-
dropPreSessionStartAnnouncePairs,
16-
projectChatDisplayMessages,
17-
projectRecentChatDisplayMessages,
18-
resolveEffectiveChatHistoryMaxChars,
19-
} from "../../gateway/chat-display-projection.js";
20-
export { augmentChatHistoryWithCliSessionImports } from "../../gateway/cli-session-history.js";
14+
export { resolveEffectiveChatHistoryMaxChars } from "../../gateway/chat-display-projection.js";
2115
export { getMaxChatHistoryMessagesBytes } from "../../gateway/server-constants.js";
2216
export {
23-
augmentChatHistoryWithCanvasBlocks,
2417
CHAT_HISTORY_MAX_SINGLE_MESSAGE_BYTES,
2518
replaceOversizedChatHistoryMessages,
2619
} from "../../gateway/server-methods/chat.js";
2720
export {
28-
capArrayByJsonBytes,
29-
readRecentSessionMessagesWithStatsAsync,
30-
readSessionMessagesPageWithStatsAsync,
31-
readSessionMessagesAsync,
32-
} from "../../gateway/session-transcript-readers.js";
21+
readChatHistoryPage,
22+
resolveChatHistoryNextOffset,
23+
shouldReplayOldestChatHistoryRecord,
24+
} from "../../gateway/server-methods/chat-history-pages.js";
25+
export { capArrayByJsonBytes } from "../../gateway/session-transcript-readers.js";
3326
export {
3427
listSessionsFromStoreAsync,
3528
loadCombinedSessionStoreForGatewayCore,

0 commit comments

Comments
 (0)