feat(browser): 实现 AI 推理功能并优化聊天界面

- 新增 AI 推理相关功能,包括模型加载、上下文创建和消息处理
- 设计并实现聊天界面的前端逻辑,支持流式响应和消息折叠
- 集成 KaTeX、highlight.js 和 marked 库,支持数学公式和代码高亮显示
- 添加错误处理和友好的用户交互提示
This commit is contained in:
tzdwindows 7
2025-03-23 18:48:13 +08:00
parent d116e80cbf
commit d53fe66e37
7 changed files with 894 additions and 15 deletions

10
.idea/encodings.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="GBK">
<file url="file://$PROJECT_DIR$/language" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/plug-in/python/Testing/main.py" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java/com/axis/innovators/box/gui/FridaWindow.java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java/org/tzd/lm/LM.java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java/org/tzd/lm/LMApi.java" charset="UTF-8" />
</component>
</project>

6
.idea/jsLibraryMappings.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$/src/main" libraries="{highlight.js, katex, marked, mathjax}" />
</component>
</project>