feat(server): preserve budgeted history across provider handoffs #12352
Merged
juliusmarmingemerged 13 commits into
t3code/codex-turn-mapping fromrefs/pull/12352/head·merged by juliusmarminge View on GitHubShowing 24 changed files with 88 additions and 5 deletions (loading 21).
x
@@ -170,7 +170,7 @@
- "Read durable state and a paginated timeline from a T3 thread in the calling project, or from a thread the user attached to this conversation as context. The default messages view returns user messages, assistant messages, and proposed plans; activity returns all summarized timeline items. Reading an untruncated terminal assistant result from this parent thread's direct app-owned child acknowledges that child's automatic completion delivery. Continue with afterPosition=nextPosition.",
+ "Read durable state and a paginated timeline from a T3 thread in the calling project, or from a thread the user attached to this conversation as context. The default messages view returns user messages, assistant messages, and proposed plans; activity returns all summarized timeline items. Reading an untruncated terminal assistant result from this parent thread's direct app-owned child acknowledges that child's automatic completion delivery. Continue with afterPosition=nextPosition. Recover long item text with itemId and textOffset=nextTextOffset until nextTextOffset is null; offsets count UTF-16 code units.",
@@ -701,10 +701,13 @@
+ readonly textOffset?: number;
- const textTruncated = text !== null && text.length > input.maxChars;
+ const offset = input.textOffset ?? 0;
+ const end = offset + input.maxChars;
+ const textTruncated = text !== null && text.length > end;
@@ -727,8 +730,9 @@