mirror of
https://github.com/openai/codex.git
synced 2026-04-28 02:11:08 +03:00
14
.codex/skills/test-tui/SKILL.md
Normal file
14
.codex/skills/test-tui/SKILL.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
name: test-tui
|
||||||
|
description: Guide for testing Codex TUI interactively
|
||||||
|
---
|
||||||
|
|
||||||
|
You can start and use Codex TUI to verify changes.
|
||||||
|
|
||||||
|
Important notes:
|
||||||
|
|
||||||
|
Start interactively.
|
||||||
|
Always set RUST_LOG="trace" when starting the process.
|
||||||
|
Pass `-c log_dir=<some_temp_dir>` argument to have logs written to a specific directory to help with debugging.
|
||||||
|
When sending a test message programmatically, send text first, then send Enter in a separate write (do not send text + Enter in one burst).
|
||||||
|
Use `just codex` target to run - `just codex -c ...`
|
||||||
@@ -147,7 +147,12 @@ where
|
|||||||
/// Creates a new [`Terminal`] with the given [`Backend`] and [`TerminalOptions`].
|
/// Creates a new [`Terminal`] with the given [`Backend`] and [`TerminalOptions`].
|
||||||
pub fn with_options(mut backend: B) -> io::Result<Self> {
|
pub fn with_options(mut backend: B) -> io::Result<Self> {
|
||||||
let screen_size = backend.size()?;
|
let screen_size = backend.size()?;
|
||||||
let cursor_pos = backend.get_cursor_position()?;
|
let cursor_pos = backend.get_cursor_position().unwrap_or_else(|err| {
|
||||||
|
// Some PTYs do not answer CPR (`ESC[6n`); continue with a safe default instead
|
||||||
|
// of failing TUI startup.
|
||||||
|
tracing::warn!("failed to read initial cursor position; defaulting to origin: {err}");
|
||||||
|
Position { x: 0, y: 0 }
|
||||||
|
});
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
backend,
|
backend,
|
||||||
buffers: [Buffer::empty(Rect::ZERO), Buffer::empty(Rect::ZERO)],
|
buffers: [Buffer::empty(Rect::ZERO), Buffer::empty(Rect::ZERO)],
|
||||||
|
|||||||
Reference in New Issue
Block a user