mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
## Why The 900-byte recap prompt limit leaves little room for completed progress, unresolved caveats, and recent corrections. Recaps need this context to distinguish completed work from pending requests. ## What changed - Introduce a shared `RecapPrompt` with a 32 KiB ceiling for instructions and history, using an 8,192-token estimate. Instruct summaries to retain the broader goal, completed outcomes, and unresolved availability or validation caveats. - Select up to eight answered exchanges plus a pending request, preserving adjacent steering and progress messages. Drop older whole exchanges before excerpting both ends of oversized messages, while retaining the newest answer and pending correction. - Require a `summary` and nullable `next_action`, bounded to 700 and 200 characters respectively. Reject malformed or oversized responses and display an optional, separately styled `Next:` line. ## Testing Add coverage for UTF-8 prompt bounds, exchange selection, pending corrections, excerpt boundaries, strict response parsing, and next-action rendering. Extend the recap generation integration test to verify bounded history and the structured response schema. GitOrigin-RevId: 6c6a84bc602a168418c1952feb1d286ec0cb9e28
17 lines
529 B
Rust
17 lines
529 B
Rust
mod answered_question;
|
|
pub use answered_question::AnsweredQuestion;
|
|
mod additional_context;
|
|
mod annotated_content;
|
|
mod fragment;
|
|
mod recap_prompt;
|
|
|
|
pub use additional_context::AdditionalContextDeveloperFragment;
|
|
pub use additional_context::AdditionalContextUserFragment;
|
|
pub use annotated_content::AnnotatedContent;
|
|
pub use annotated_content::set_annotated_content;
|
|
pub use annotated_content::to_annotated_content;
|
|
pub use fragment::ContextualUserFragment;
|
|
pub use fragment::RenderedFragment;
|
|
|
|
pub use recap_prompt::RecapPrompt;
|