mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
refactor
This commit is contained in:
@@ -244,21 +244,16 @@ impl App {
|
||||
self.chat_widget.apply_file_search_result(query, matches);
|
||||
}
|
||||
AppEvent::UpdateReasoningEffort(effort) => {
|
||||
// Keep App-level config in sync with TUI so forks/new sessions inherit overrides.
|
||||
self.chat_widget.set_reasoning_effort(effort);
|
||||
self.config.model_reasoning_effort = effort;
|
||||
}
|
||||
AppEvent::UpdateModel(model) => {
|
||||
self.chat_widget.set_model(model.clone());
|
||||
self.config.model = model;
|
||||
self.chat_widget.set_model(model);
|
||||
}
|
||||
AppEvent::UpdateAskForApprovalPolicy(policy) => {
|
||||
self.chat_widget.set_approval_policy(policy);
|
||||
self.config.approval_policy = policy;
|
||||
}
|
||||
AppEvent::UpdateSandboxPolicy(policy) => {
|
||||
self.chat_widget.set_sandbox_policy(policy.clone());
|
||||
self.config.sandbox_policy = policy;
|
||||
self.chat_widget.set_sandbox_policy(policy);
|
||||
}
|
||||
}
|
||||
Ok(true)
|
||||
|
||||
@@ -1323,6 +1323,4 @@ mod tests {
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// Esc backtracking is handled at the app layer (conversation fork); no composer test here.
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@ impl ChatComposerHistory {
|
||||
}
|
||||
}
|
||||
|
||||
// Removed unused reset_browsing; browsing state is reset by call sites as needed.
|
||||
|
||||
/// Update metadata when a new session is configured.
|
||||
pub fn set_metadata(&mut self, log_id: u64, entry_count: usize) {
|
||||
self.history_log_id = Some(log_id);
|
||||
|
||||
@@ -859,8 +859,6 @@ impl ChatWidget {
|
||||
}
|
||||
}
|
||||
|
||||
// Removed unused render_conversation_history (handled by existing streaming path).
|
||||
|
||||
fn request_redraw(&mut self) {
|
||||
self.frame_requester.schedule_frame();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user