mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Add turn-scoped context contributions (#28911)
## Summary - keep context injection on a single ContextContributor trait - split context injection into thread-scoped and turn-scoped contribution methods - wire turn-scoped fragments into initial context assembly so extensions can contribute context from turn-local state
This commit is contained in:
14 files changed
+307
-33
No files matched your search
@@ -48,7 +48,7 @@ impl MemoriesExtensionConfig {
|
||||
}
|
||||
|
||||
impl ContextContributor for MemoriesExtension {
|
||||
fn contribute<'a>(
|
||||
fn contribute_thread_context<'a>(
|
||||
&'a self,
|
||||
_session_store: &'a ExtensionData,
|
||||
thread_store: &'a ExtensionData,
|
||||
|
||||
@@ -181,7 +181,7 @@ async fn prompt_contribution_uses_memory_summary_when_enabled() {
|
||||
});
|
||||
|
||||
let fragments = extension
|
||||
.contribute(&ExtensionData::new("session"), &thread_store)
|
||||
.contribute_thread_context(&ExtensionData::new("session"), &thread_store)
|
||||
.await;
|
||||
|
||||
assert_eq!(fragments.len(), 1);
|
||||
|
||||
Reference in new issue
Block a user