Commit Graph
5 Commits
Author SHA1 Message Date
liuzhandCopilot b2066c0cc7 feat: 流式Markdown渲染 - 行缓冲+ANSI样式输出
- MarkdownRenderer新增StreamState和renderStreamingLine()方法
- 流式输出改为行缓冲模式:累积token到换行再渲染输出
- 支持:粗体/斜体→ANSI样式, 代码块→语法高亮边框,
  列表→●圆点, 标题→彩色, 引用→竖线, 链接→下划线
- 代码块状态跨行追踪(StreamState)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 01:20:28 +08:00
liuzhandCopilot 749062fba7 feat: P1功能增强 - 3命令+代码高亮+状态行
新增3个命令:
- /resume: 恢复已保存的对话(支持list/序号选择)
- /export: 导出对话为Markdown文件
- /commit: 创建Git commit(支持AI生成commit message)

代码语法高亮(MarkdownRenderer增强):
- 支持Java/JS/TS/Python/Bash/SQL关键字着色
- 字符串字面量黄色、数字紫色、注释灰色斜体
- 注解(@Annotation)亮黄色
- true/false/null 红色
- 新增引用块、有序列表、复选框、链接渲染
- 代码块边框对齐

底部状态行(StatusLine):
- 模型名、Token用量、费用、API调用次数、工作目录
- 非dumb终端自动启用
- 每次Agent循环后刷新显示

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-01 22:25:26 +08:00
liuzh cc0d3f8b00 Revert "fix: 将所有emoji/Unicode特殊字符替换为ASCII安全字符"
This reverts commit 3cd67ffe451be2cc7a66b5c554966f1d5aa58c7c.
2026-04-01 20:43:31 +08:00
liuzhandCopilot eeceaaaea9 fix: 将所有emoji/Unicode特殊字符替换为ASCII安全字符
Windows cmd/PowerShell默认codepage下emoji显示为?号。
全局替换: 👋->移除, 💭->[Thinking], ⚙->*, ✓->[OK], ✗->[FAIL],
◆->>, ⚠->[!], ->[OK], •->|/-, →->>>, ✏️->[Edit]等。
❯保留(windows-vtp终端下正常显示)。

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-01 20:37:55 +08:00
liuzhandCopilot d67f41358d feat: Phase1 项目骨架 - Maven项目结构、核心AgentLoop、6个工具、命令系统、控制台渲染、REPL会话
实现内容:
- pom.xml: JDK25 + Spring AI 2.0.0-M4 + JLine3 + Picocli
- core/AgentLoop: 基于ChatModel的显式工具循环(非ChatClient)
- tool/: Tool接口 + ToolRegistry + ToolCallbackAdapter(适配Spring AI)
- tool/impl/: BashTool, FileReadTool, FileWriteTool, FileEditTool, GlobTool, GrepTool
- command/: SlashCommand接口 + CommandRegistry + /help, /clear, /exit
- console/: AnsiStyle, BannerPrinter, ToolStatusRenderer, ThinkingRenderer, SpinnerAnimation, MarkdownRenderer
- context/: SystemPromptBuilder, ClaudeMdLoader(多级CLAUDE.md加载)
- repl/ReplSession: REPL主循环(Scanner降级方案)
- config/AppConfig: Spring Bean装配
- application.yml: Anthropic/OpenAI双模型配置

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-01 19:22:04 +08:00