mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Tag current time reminders in model context (#38443)
## What changed - Wrap injected current time reminders in `<current_time_reminder>` tags. - Keep direct `clock.curr_time` tool output and log previews as plain text. ## Testing - Update core and app-server coverage for tagged reminders and untagged tool output. GitOrigin-RevId: ad27f1fa10cca7f83d1ac731e01255320bb60f47
This commit is contained in:
1 parent
53eaa297e5
commit
3ba52d6075
4 files changed
+16
-12
No files matched your search
@@ -26,7 +26,7 @@ struct CurrentTimeOutput(CurrentTimeReminder);
|
||||
|
||||
impl ToolOutput for CurrentTimeOutput {
|
||||
fn log_preview(&self) -> String {
|
||||
self.0.render()
|
||||
self.0.body()
|
||||
}
|
||||
|
||||
fn success_for_logging(&self) -> bool {
|
||||
@@ -34,8 +34,7 @@ impl ToolOutput for CurrentTimeOutput {
|
||||
}
|
||||
|
||||
fn to_response_item(&self, call_id: &str, payload: &ToolPayload) -> ResponseInputItem {
|
||||
FunctionToolOutput::from_text(self.0.render(), Some(true))
|
||||
.to_response_item(call_id, payload)
|
||||
FunctionToolOutput::from_text(self.0.body(), Some(true)).to_response_item(call_id, payload)
|
||||
}
|
||||
|
||||
fn code_mode_result(&self, _payload: &ToolPayload) -> JsonValue {
|
||||
|
||||
Reference in new issue
Block a user