-
Notifications
You must be signed in to change notification settings - Fork 0
release: prepare v0.3.13 headless resume #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -256,21 +256,45 @@ impl InteractiveSession { | |
| conv.strip_legacy_summary_messages(); | ||
| (conv, Some(transcript)) | ||
| } | ||
| HistoryMode::ResumeAt { | ||
| selector, | ||
| resume_at, | ||
| } => { | ||
| let transcript = match preloaded { | ||
| Some(t) => t, | ||
| None => store.load_session(selector)?, | ||
| }; | ||
| // Restore only the durable message boundary: records after the | ||
| // requested conversation item id (including uncommitted tool | ||
| // calls) are not replayed to the model. | ||
| let transcript = | ||
| crate::thread_store::truncate_transcript_at_boundary(&transcript, resume_at)?; | ||
| let mut conv = store.resume_conversation(&transcript, system_prompt); | ||
| conv.strip_legacy_pinned_volatile(); | ||
| conv.strip_legacy_summary_messages(); | ||
| (conv, Some(transcript)) | ||
| } | ||
| HistoryMode::Record | HistoryMode::Disabled => { | ||
| let mut conversation = Conversation::new(); | ||
| conversation.add_system(system_prompt); | ||
| (conversation, None) | ||
| } | ||
| }; | ||
| let usage_baseline = if matches!(config.history_mode, HistoryMode::Resume(_)) { | ||
| let usage_baseline = if matches!( | ||
| config.history_mode, | ||
| HistoryMode::Resume(_) | HistoryMode::ResumeAt { .. } | ||
| ) { | ||
| loaded_transcript | ||
| .as_ref() | ||
| .and_then(|transcript| transcript.usage) | ||
| .unwrap_or_default() | ||
| } else { | ||
| UsageTotals::default() | ||
| }; | ||
| let next_event_seq = if matches!(config.history_mode, HistoryMode::Resume(_)) { | ||
| let next_event_seq = if matches!( | ||
| config.history_mode, | ||
| HistoryMode::Resume(_) | HistoryMode::ResumeAt { .. } | ||
| ) { | ||
| loaded_transcript | ||
| .as_ref() | ||
| .map(|transcript| transcript.next_event_seq) | ||
|
|
@@ -285,7 +309,7 @@ impl InteractiveSession { | |
| // Resume continues the original thread: keep its session id and | ||
| // append future items to the existing transcript file. Only Fork | ||
| // mints a new session id. | ||
| HistoryMode::Resume(_) => match loaded_transcript { | ||
| HistoryMode::Resume(_) | HistoryMode::ResumeAt { .. } => match loaded_transcript { | ||
| Some(transcript) => { | ||
| let thread_session_id = transcript.meta.session_id.clone(); | ||
| match SessionWriter::append_to_existing(transcript.path) { | ||
|
Comment on lines
+312
to
315
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Preserve the
A later plain 🤖 Prompt for AI Agents |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Specify that only non-success headless exits print a resume command.
Successful text-mode runs do not print this hint. The current wording conflicts with the release contract and its integration test.
README.md#L91-L92: qualify the resume-command statement with “non-success.”site/src/changelog/Changelog.tsx#L79-L80: qualify the English changelog summary with “non-success.”site/src/changelog/Changelog.tsx#L587-L588: qualify the Chinese changelog summary with the equivalent condition.📍 Affects 2 files
README.md#L91-L92(this comment)site/src/changelog/Changelog.tsx#L79-L80site/src/changelog/Changelog.tsx#L587-L588🤖 Prompt for AI Agents