mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
chore: fix all warnings; docs: require clean build
- Remove unused mut and dead code in TUI jump-back flow - Update AGENTS.md to state build-fast.sh is the required check and all compiler warnings must be fixed
This commit is contained in:
@@ -10,7 +10,8 @@ In the codex-rs folder where the rust code lives:
|
||||
|
||||
Completion/build step
|
||||
|
||||
- On completion of work, run only `./build-fast.sh` from the repo root. This script verifies file integrity and is the single required check right now.
|
||||
- Always validate using `./build-fast.sh` from the repo root. This is the single required check and must pass cleanly.
|
||||
- Policy: All errors AND all warnings must be fixed before you’re done. Treat any compiler warning as a failure and address it (rename unused vars with `_`, remove `mut`, delete dead code, etc.).
|
||||
- Do not run additional format/lint/test commands on completion (e.g., `just fmt`, `just fix`, `cargo test`) unless explicitly requested for a specific task.
|
||||
|
||||
When making individual changes prefer running tests on individual files or projects first if asked, but otherwise rely on `./build-fast.sh` at the end.
|
||||
|
||||
@@ -803,7 +803,7 @@ impl App<'_> {
|
||||
// Replace widget with a new one bound to the forked conversation
|
||||
let session_conf = new_conv.session_configured.clone();
|
||||
let conv = new_conv.conversation.clone();
|
||||
let mut new_widget = ChatWidget::new_from_existing(
|
||||
let new_widget = ChatWidget::new_from_existing(
|
||||
cfg,
|
||||
conv,
|
||||
session_conf,
|
||||
|
||||
@@ -3702,18 +3702,6 @@ impl ChatWidget<'_> {
|
||||
self.bottom_pane.is_task_running()
|
||||
}
|
||||
|
||||
fn find_nth_last_user_cell_index(&self, nth: usize) -> Option<usize> {
|
||||
if nth == 0 { return None; }
|
||||
let mut count = 0usize;
|
||||
for (idx, cell) in self.history_cells.iter().enumerate().rev() {
|
||||
if cell.kind() == crate::history_cell::HistoryCellType::User {
|
||||
count += 1;
|
||||
if count == nth { return Some(idx); }
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
// begin_jump_back no longer used: backend fork handles it.
|
||||
|
||||
pub(crate) fn undo_jump_back(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user