consciousness/poc-agent/src
Kent Overstreet f2c2c02a22 tui: fix cursor position with proper word-wrap simulation
The previous approach scanned ratatui's rendered buffer to find the
cursor position, but couldn't distinguish padding spaces from text
spaces, causing incorrect cursor placement on wrapped lines.

Replace with a word_wrap_breaks() function that computes soft line
break positions by simulating ratatui's Wrap { trim: false } algorithm
(break at word boundaries, fall back to character wrap for long words).
cursor_visual_pos() then maps a character index to (col, row) using
those break positions.

Also fixes the input area height calculation to use word-wrap semantics
instead of character-wrap, matching the actual Paragraph rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 01:09:55 -04:00
..
api Fix poc-agent for vllm/Qwen 3.5: reasoning display, tool parser 2026-03-19 00:06:26 -04:00
tools Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
agent.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
cli.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
config.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
dmn.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
journal.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
lib.rs Add lib target to poc-agent, make poc-memory depend on it 2026-03-18 22:56:48 -04:00
log.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
main.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
observe.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00
tui.rs tui: fix cursor position with proper word-wrap simulation 2026-03-19 01:09:55 -04:00
types.rs Fix poc-agent for vllm/Qwen 3.5: reasoning display, tool parser 2026-03-19 00:06:26 -04:00
ui_channel.rs Move poc-agent into workspace, improve agent prompts 2026-03-18 22:45:01 -04:00