Skip to content

TUI compile break: missing AppCommand::add_to_history #21394

@misrtjakub

Description

@misrtjakub

Summary

Current origin/main fails to compile codex-tui with Cargo because BottomPane::clear_composer_for_ctrl_c calls AppCommand::add_to_history(text), but AppCommand does not define an AddToHistory variant or constructor.

Reproduction

Checked against origin/main at 123ec8b035.

cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable

The build fails with:

error[E0599]: no variant or associated item named `add_to_history` found for enum `app_command::AppCommand` in the current scope

Patch

I have a small patch here:

https://github.com/openai/codex/compare/main...misrtjakub:fix/tui-add-to-history-command?expand=1

It adds AppCommand::AddToHistory, the constructor used by the bottom pane, and handles the op by appending to local message history instead of falling through as an unsupported app-server operation.

Validation

cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable
cargo fmt --check
git diff --check

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions