Skip to main content

Module ui

Module ui 

Source
Expand description

ratatui three-pane rendering and the key-event loop.

Layout: status bar / three bordered panes (local | result | remote) / key hints / message line. Change chunks are tinted as bands on the panes they touch, colored by change type like IDEA (blue = modified, green = added, gray = deleted, red = conflict); the band disappears once a chunk is resolved, the current chunk is highlighted, and ? shows the full key reference.

模块拆分:

  • [theme][] — 颜色集中定义
  • [keymap][] — 按键绑定的单一事实来源(分发 / 提示条 / 帮助共用)
  • [rows][] — 渲染行数据结构与构建(折叠 / 占位)
  • [highlight][] — 词级强调与语法高亮的计算与缓存
  • [panes][] — 三栏正文渲染
  • [chrome][] — 界面整体绘制(状态栏 / 提示条 / 帮助浮层 / 二进制视图)
  • 本文件 — 事件主循环与按键分发

Structs§

UiState
UI 的瞬时状态(消息条与浮层开关)。

Enums§

Outcome
会话结束方式。

Functions§

draw
绘制整个界面(独立成 pub 函数,便于 TestBackend 冒烟测试)。
run_session
运行交互会话直至完成或退出。