feat: add jink TUI framework integration

- Add jink dependency (io.mybatis.jink:jink:0.3.0-SNAPSHOT)
- Create UIMessage sealed interface for TUI message model
- Create ClaudeCodeComponent (main jink Component with full layout)
  - Header box with rounded magenta border
  - Message list with virtual scrolling
  - Separator lines above/below input area
  - Input area with prompt and placeholder
  - Status bar and shortcut key bar
- Create JinkReplSession (jink-based REPL replacing JLine readLine loop)
  - AgentLoop integration via callbacks -> setState
  - Permission confirmation inline in TUI
  - Streaming token display
- Update ClaudeCodeRunner to prefer jink TUI with legacy fallback
- Update AppConfig with JinkReplSession bean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
abel533
2026-04-04 14:52:55 +08:00
co-authored by Copilot
parent f9072534ef
commit 601a1c9ea9
6 changed files with 1019 additions and 3 deletions
+7
View File
@@ -56,6 +56,13 @@
<artifactId>spring-ai-starter-model-openai</artifactId>
</dependency>
<!-- Jink: React-like Terminal UI 框架(基于 JLine,提供组件化全屏渲染) -->
<dependency>
<groupId>io.mybatis.jink</groupId>
<artifactId>jink</artifactId>
<version>0.3.0-SNAPSHOT</version>
</dependency>
<!-- JLine 3: 终端交互(行编辑、历史、Tab补全、ANSI样式) -->
<dependency>
<groupId>org.jline</groupId>