This commit is contained in:
Rai (Michael Pokorny)
2025-06-24 20:32:13 -07:00
parent d07d7a7440
commit 1fb774909d
3 changed files with 26 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ repos:
files: ^agentydragon/tasks/[0-9]{2}-.*\.md$
- id: cargo-build
name: Check Rust workspace builds
entry: bash -lc 'cd codex-rs && cargo build --workspace --locked'
entry: bash -lc 'cd codex-rs && RUSTFLAGS="-D warnings" cargo build --workspace --locked'
language: system
pass_filenames: false
require_serial: true

View File

@@ -18,6 +18,9 @@ This file documents the changes introduced on the `agentydragon` branch
## Dependency updates
- Added `uuid` crate to `codex-rs/cli` and `codex-rs/tui`.
## Pre-commit config changes
- Configured Rust build hook in `.pre-commit-config.yaml` to fail on warnings by setting `RUSTFLAGS="-D warnings"`.
## codex-rs/tui: Undo feedback decision with Esc key
- Pressing `Esc` in feedback-entry mode now cancels feedback entry and returns to the select menu, preserving the partially entered feedback text.
- Added a unit test for the ESC cancellation behavior in `tui/src/user_approval_widget.rs`.
@@ -51,4 +54,4 @@ Tasks live under `agentydragon/tasks/` as individual Markdown files. Please upda
---
*This README was autogenerated to summarize changes on the `agentydragon` branch.*
*This README was autogenerated to summarize changes on the `agentydragon` branch.*

View File

@@ -132,6 +132,27 @@ impl ChatComposer<'_> {
}
Input { key: Key::Enter, shift: false, alt: false, ctrl: false } => {
if let Some(cmd) = popup.selected_command() {
// Inline DSL for mount-add/remove with args or dispatch other commands.
let first_line = self
.textarea
.lines()
.first()
.map(|s| s.as_str())
.unwrap_or("");
let stripped = first_line.trim_start().strip_prefix('/').unwrap_or(first_line);
let mut parts = stripped.splitn(2, char::is_whitespace);
let _cmd_token = parts.next().unwrap_or("");
let args = parts.next().unwrap_or("").trim_start();
if !args.is_empty() && (*cmd == SlashCommand::MountAdd || *cmd == SlashCommand::MountRemove) {
let ev = if *cmd == SlashCommand::MountAdd {
AppEvent::InlineMountAdd(args.to_string())
} else {
AppEvent::InlineMountRemove(args.to_string())
};
self.app_event_tx.send(ev);
} else {
self.app_event_tx.send(AppEvent::DispatchCommand(*cmd));
}
self.textarea.select_all();
self.textarea.cut();
self.command_popup = None;