feat: 实现会话管理和 AI 回复保存功能

## 新增功能
- 实现会话持久化存储(JSON 文件)
- 支持会话列表显示、切换、创建、删除
- 自动保存用户消息和 AI 回复
- 优化 Markdown 渲染样式(标题、列表、代码块、表格等)
- 添加过程数据可视化(思考步骤、工具调用、响应)

## 技术改进
- 新增 ConversationMessage、ConversationMetadata 模型
- 新增 ConversationStorageService 服务(JSON 文件存储)
- 在 ChatService 中添加流式响应完成后保存 AI 回复的逻辑
- 优化删除会话逻辑:删除当前会话后切换到现有会话,而非自动创建新会话
- 优化应用初始化:优先使用现有会话,仅在没有会话时才创建新会话

## 依赖更新
- 添加 jackson-datatype-jsr310 支持 Java 8 DateTime

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
hughhuangandClaude Sonnet 4.5 committed 2026-01-31 22:03:28 +08:00
1 parent 1ffd256c9d
commit fd09a55614
11 files changed
+2697 -993

No files matched your search

+6
View File
@@ -80,6 +80,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Jackson JSR310 for Java 8 DateTime support -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
</dependencies>
<dependencyManagement>