Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
e198aed
feat: 优化windows下右上角控制栏样式
hellodigua Feb 15, 2026
0988aad
release: v0.11.2
hellodigua Feb 15, 2026
90e4502
fix: Windows 上动态更新 overlay 颜色以匹配主题
hellodigua Feb 16, 2026
1f4c0cf
chore: 暂时隐藏向量模型配置
hellodigua Feb 16, 2026
8a12aa5
refactor: 重构部分图表为插件形式
hellodigua Feb 19, 2026
bc6c385
chore: 更新项目描述
hellodigua Feb 20, 2026
fe0a2ed
fix: 部分UI在英文设置下未国际化
hellodigua Feb 21, 2026
284118c
feat(agent): add session-based context timeline and runtime status
n-WN Feb 23, 2026
b9daae8
chore: remove @ai-sdk dependencies and legacy LLM service implementat…
hellodigua Feb 26, 2026
da3d253
chore: remove over-engineered sessionLog module
hellodigua Feb 26, 2026
90afe5f
refactor(llm): unify LLM access layer via pi-ai
hellodigua Feb 26, 2026
f7c427d
refactor(tools): modularize tool system with AgentTool + TypeBox + i18n
hellodigua Feb 26, 2026
e6849af
refactor(agent): split monolithic Agent into modular architecture
hellodigua Feb 26, 2026
1b059a5
refactor: add shared types and improve ChatStatusBar with i18n
hellodigua Feb 26, 2026
07fffb0
refactor: data flow inversion, IPC contract fixes, and frontend adapt…
hellodigua Feb 26, 2026
1823042
style: auto-format code (eslint --fix)
hellodigua Feb 27, 2026
c36878c
feat(ai): 实现聊天记录预处理管道
hellodigua Feb 27, 2026
dc0881e
feat(ai): 预处理设置界面与配置管理
hellodigua Feb 27, 2026
9ce333a
feat(ai): 增加 DEBUG 模式与 AI 日志增强
hellodigua Feb 27, 2026
4000d4c
chore: remove error package lock version
hellodigua Feb 27, 2026
1ad4c69
docs: fix broken documentation links
beckxie Feb 27, 2026
729b19f
fix: 修复预处理设置页面的两个BUG
hellodigua Feb 28, 2026
c6aaa73
release: v0.12.1
hellodigua Feb 28, 2026
f36623d
feat: 完成助手模式初版
hellodigua Mar 1, 2026
60be78b
feat: 完善助手功能,新增分析tools
hellodigua Mar 10, 2026
6edb3e3
feat: 优化助手逻辑
hellodigua Mar 10, 2026
bfe72d8
feat: AI对话界面UI优化
hellodigua Mar 10, 2026
2b354d2
feat: 移除自定义筛选的AI功能
hellodigua Mar 10, 2026
502e604
feat: 总览模块样式调整
hellodigua Mar 10, 2026
ebff151
feat: 提升导出聊天记录的展示位置
hellodigua Mar 10, 2026
e7f2ee7
style: format and lint codebase
hellodigua Mar 11, 2026
a633b4f
feat: 支持繁体中文和日语国际化
hellodigua Mar 11, 2026
4df938a
docs: update
hellodigua Mar 12, 2026
5124b26
feat: 设置页面重构
hellodigua Mar 12, 2026
cc24d7f
feat: 部分UI优化
hellodigua Mar 12, 2026
95fc70a
docs: 更新用户协议
hellodigua Mar 14, 2026
7a1a9fc
feat: 聊天对话支持使用技能
hellodigua Mar 15, 2026
db9b670
feat: 支持@选择成员
hellodigua Mar 15, 2026
ef7ac49
refactor: 重构AIChat组织
hellodigua Mar 15, 2026
3ab730b
fix: 修复nlp停用词调用顺序问题导致的报错
hellodigua Mar 15, 2026
c26594d
feat: 调用模型的时候,切换页面不再终止进程 resolve #14
hellodigua Mar 15, 2026
4b10cf2
feat: 移除旧版提示词系统
hellodigua Mar 15, 2026
cf7a7fc
feat: 重构目录位置
hellodigua Mar 16, 2026
9e8f9e8
feat: 完成助手市场和技能市场
hellodigua Mar 16, 2026
8f08091
fix: 修复Gemini API配置问题 (fix #97)
hellodigua Mar 16, 2026
c744309
chore: 构建版本日志流程优化
hellodigua Mar 16, 2026
f646415
chore: 优化构建分包策略
hellodigua Mar 17, 2026
9247a29
release: v0.13.0
hellodigua Mar 17, 2026
0a7dce2
fix: 修复每日消息趋势不展示的问题
hellodigua Mar 18, 2026
64c23ef
chore: 新增 创建assistant技能
hellodigua Mar 19, 2026
39b0652
fix: 增加默认assistant兜底
hellodigua Mar 25, 2026
b6fdc38
fix: 修复 AI 会话链路与前端 type-check 错误
hellodigua Mar 25, 2026
7eaba39
refactor: 清理 parser worker rag merger 的历史类型问题
hellodigua Mar 25, 2026
31c212d
feat: 优化助手选择UI
hellodigua Mar 25, 2026
6d90552
fix: 修复消息去重误判并统一空字符串去重语义
lnexin Mar 27, 2026
6d5e6f6
feat: 支持API导出
hellodigua Mar 26, 2026
7ce50ea
feat: 支持API导入
hellodigua Mar 26, 2026
792cb0e
feat: API服务 UI优化
hellodigua Mar 26, 2026
d1d8177
feat: 优化身份卡片样式
hellodigua Mar 26, 2026
4ea4df7
feat: 设置支持选择选择会话默认进入的标签页
hellodigua Mar 27, 2026
073c6be
feat: 点击预设问题自动提问
hellodigua Mar 27, 2026
64b52e4
feat: 样式优化
hellodigua Mar 27, 2026
4355344
docs: 新增AGENTS.md
hellodigua Mar 27, 2026
c688d68
feat: 总览样式优化
hellodigua Mar 27, 2026
48c88aa
release: v0.14.0
hellodigua Mar 27, 2026
462ea14
feat: 版本日志弹窗完善类型
hellodigua Mar 28, 2026
fdd9707
feat: 总览页样式优化
hellodigua Mar 28, 2026
b3d1171
feat: 废弃部分AI工具
hellodigua Mar 29, 2026
bfca7ff
fix: SQL Lab 和摘要生成的 AI 错误静默吞没问题
hellodigua Mar 29, 2026
211a811
feat: 新增对话数据缓存管理模块,优化统计数据读取性能
hellodigua Mar 29, 2026
e099dde
feat: 新增获取聊天概览工具
hellodigua Mar 29, 2026
346a38d
feat: 重构 AI 工具分类体系
hellodigua Mar 29, 2026
da3d7bc
feat: 新增部分AI工具
hellodigua Mar 29, 2026
4599ce4
feat: 成员管理迁移到首页
hellodigua Apr 2, 2026
75183db
feat: 迁移成员Tab内的模块到其他Tab
hellodigua Apr 2, 2026
88f1af0
feat: 优化SQL对话模块交互逻辑
hellodigua Apr 2, 2026
a8e4042
release: v0.14.1
hellodigua Apr 2, 2026
3a4d722
refactor: 抽取会话分析页公共逻辑并统一头部文案
hellodigua Apr 2, 2026
0a81238
feat: 支持 FTS5 全文搜索,并新增快速搜索工具
hellodigua Apr 3, 2026
59e6bdb
feat: 精简部分工具的搜索参数以节省token
hellodigua Apr 6, 2026
b532eee
feat: add E2E test framework for Electron applications with robust po…
l17728 Apr 3, 2026
a8c3b03
test: add reusable e2e launcher smoke framework and scripts
hellodigua Apr 6, 2026
d641772
refactor: AI对话代码整理
hellodigua Apr 6, 2026
f66826b
feat: 优化对话UI
hellodigua Apr 6, 2026
bfc96a7
fix: 完善AI对话报错信息
hellodigua Apr 6, 2026
3189de3
style: 代码格式优化
hellodigua Apr 6, 2026
72c0d40
feat: AI对话样式优化
hellodigua Apr 6, 2026
e74af1a
feat: AI对话支持复制
hellodigua Apr 6, 2026
fbd3155
feat: toast样式优化
hellodigua Apr 6, 2026
84284a4
docs: update intro images
hellodigua Apr 6, 2026
f1cfc4c
feat: 新增 7天内记住助手选择功能
hellodigua Apr 6, 2026
e86df09
release: v0.14.2
hellodigua Apr 6, 2026
d49a094
feat: 搜索工具自动携带上下文消息
hellodigua Apr 7, 2026
b8a3823
fix: 补全工具调用显示名称的 i18n 翻译
hellodigua Apr 7, 2026
7919929
feat: 增加查询缓存以加速访问
hellodigua Apr 7, 2026
4929b49
docs: update
hellodigua Apr 7, 2026
a0155b5
chore: 支持Linux打包
hellodigua Apr 7, 2026
fa3282f
feat: 移除旧版提示词
hellodigua Apr 7, 2026
53208de
feat: 实验室新增基础工具用于调试
hellodigua Apr 7, 2026
12941c4
chore: 升级到node24
hellodigua Apr 7, 2026
6103255
feat: 重构模型配置逻辑
hellodigua Apr 8, 2026
5c97a15
fix(ci): align packaging workflow with Node 24 and pnpm
hellodigua Apr 8, 2026
a0661c0
fix(windows): align title bar overlay color with light theme background
hellodigua Apr 8, 2026
915efeb
refactor: 优化AI配置弹窗代码组织
hellodigua Apr 8, 2026
d93ed0b
feat: 新用户首先弹出语言选择弹窗
hellodigua Apr 8, 2026
df1bccc
release: v0.15.0
hellodigua Apr 8, 2026
d7a02a1
fix: 第三方/本地服务编辑弹窗丢失多个自定义模型
hellodigua Apr 9, 2026
0b89076
feat: 统一官网多语言链接规则
hellodigua Apr 9, 2026
11e530e
feat: 私聊下新增主动性分析视图
hellodigua Apr 9, 2026
cff15a3
feat: 优化语录下部分逻辑
hellodigua Apr 9, 2026
42aa600
feat: 优化footer
hellodigua Apr 9, 2026
76ad262
feat: 关系剩余内容完成国际化
hellodigua Apr 9, 2026
bf2b69b
release: v0.16.0
hellodigua Apr 9, 2026
96e21f7
feat: 完善whatsApp聊天记录检测机制
hellodigua Apr 10, 2026
b8a0e9e
feat: 新增指定格式导入
hellodigua Apr 10, 2026
62b4816
feat: 移除诊断建议,并新增提示
hellodigua Apr 10, 2026
5b7d695
chore: 缓存 electron 和 electron-builder 二进制文件以加速打包
hellodigua Apr 10, 2026
1a3026c
feat: 默认截图关闭移动端适配
hellodigua Apr 10, 2026
dd7f6df
feat: 抽离首页工具,提升为全局工具侧边栏
hellodigua Apr 10, 2026
8b35b3f
feat: 统一卡片最大宽度
hellodigua Apr 10, 2026
f2ee63c
feat: 抽离主题色卡片,预留主题配色模式
hellodigua Apr 10, 2026
11496f5
feat: 重构总览模块卡片
hellodigua Apr 10, 2026
af07ad4
feat: 主题卡片支持截屏
hellodigua Apr 10, 2026
ffab2d3
fix: 支持 WhatsApp 12小时制时间格式及NNBSP字符
kongjiyu Apr 10, 2026
ae97545
fix: WhatsApp 时间解析正则与行匹配正则宽严一致性修复
hellodigua Apr 11, 2026
44dd1d1
feat: 优化总览身份卡,统一各项时间范围查询逻辑
hellodigua Apr 11, 2026
92d9533
feat: DEBUG模式下新增快速调试工具
hellodigua Apr 11, 2026
5b96fec
feat: 消息Tab下新增分享卡片
hellodigua Apr 11, 2026
72e0e42
feat: WhatsApp V2 时间戳弹性解析器,自动适配各地区导出变体
hellodigua Apr 11, 2026
9285d17
release: v0.17.0
hellodigua Apr 11, 2026
2950570
docs: 新增官网文档并支持自动化同步和构建
hellodigua Apr 12, 2026
8e523e6
docs: update
hellodigua Apr 12, 2026
8c91ff1
feat: 完善WhatsApp检测逻辑
hellodigua Apr 12, 2026
17bb3d7
feat: 支持远程下载分词词库,并支持繁体中文词库
hellodigua Apr 12, 2026
3557f07
feat: 词云支持关键词过滤(resolve #126)
hellodigua Apr 12, 2026
744e533
feat: 查询缓存逻辑优化
hellodigua Apr 12, 2026
6254a23
feat: 部分Loading统一
hellodigua Apr 12, 2026
e628390
feat: 重构话题,话题新增话题卡片
hellodigua Apr 12, 2026
dd88c49
release: v0.17.1
hellodigua Apr 13, 2026
3c022b0
chore: 日志同步逻辑优化
hellodigua Apr 13, 2026
c69dcdf
docs: 新增繁体中文文档
hellodigua Apr 13, 2026
2b3f1fc
refactor: lint format
hellodigua Apr 13, 2026
c7ad09b
feat: 话题迁移至洞察
hellodigua Apr 13, 2026
beea029
feat: 数据管理的部分表头支持排序
hellodigua Apr 13, 2026
ad4afc7
feat: 不同平台的聊天数据支持合并(resolve #74)
hellodigua Apr 13, 2026
452deed
feat: 成员管理中支持成员消息合并
hellodigua Apr 13, 2026
a330e87
feat: 优化暗色模式下配色,提升视觉体验
hellodigua Apr 13, 2026
7b93e89
fix: 收紧远程配置拉取并强化更新安装确认(resolve #137)
hellodigua Apr 14, 2026
35c9ac1
fix: 为词库下载增加 SHA256 完整性校验(resolve #137)
hellodigua Apr 14, 2026
5748001
chore: 增加适配ARM架构linux系统的deb安装包(resolve #136)
hellodigua Apr 14, 2026
f20553d
fix: 修复暗色截图导出背景透明异常
hellodigua Apr 14, 2026
6592398
feat: AI日志文件写入文件原始路径
hellodigua Apr 14, 2026
7263967
fix(llm): add runtime UA headers for openai-compatible requests
hellodigua Apr 14, 2026
165ae83
fix: 修复词库刷新与合并ID碰撞等问题
hellodigua Apr 14, 2026
0c27321
release: v0.17.2
hellodigua Apr 14, 2026
647f61f
fix: 修复从设置/AI对话页返回后时间筛选重置为全部的问题
hellodigua Apr 15, 2026
ea91420
feat: AI 模型配置支持自定义名称
hellodigua Apr 15, 2026
769b80e
feat: AI服务商支持 Anthropic
hellodigua Apr 15, 2026
1c46600
feat: 模型第三方服务支持自选接口类型
hellodigua Apr 15, 2026
a1a587f
feat: 样式小规模优化
hellodigua Apr 15, 2026
0aa99af
feat: 新增语言偏好Tab
hellodigua Apr 17, 2026
0fb514f
feat: 对话列表支持排序和筛选
hellodigua Apr 17, 2026
8f1fb26
refactor(types): 抽离 language preference 为共享类型
hellodigua Apr 17, 2026
cb10785
release: v0.17.3
hellodigua Apr 17, 2026
86cadc5
feat(api): 实现 Import API v1 完整协议与层级数据源管理
hellodigua Apr 19, 2026
0be921e
release: v0.17.4
hellodigua Apr 19, 2026
1f32d11
fix: 兼容旧版dataSources升级新版数据结构导致的自动化页面白屏问题
hellodigua Apr 20, 2026
19fa37e
fix: 修复切换对话后,选择的Tab重置的BUG
hellodigua Apr 20, 2026
cbf01df
fix: 修复本地模型验证失效的问题(resolve #145)
hellodigua Apr 20, 2026
108f9c1
feat: 预设服务和第三方服务API地址旁显示验证按钮
hellodigua Apr 20, 2026
919c0ff
feat: 合并聊天记录时,删除原聊天记录改为可选(resolve #139)
hellodigua Apr 20, 2026
1f0e1a8
feat: 使用原生逻辑替换node-machine-id依赖以解决部分Linux无法修改API密钥的问题(resolve #145)
hellodigua Apr 20, 2026
1aa8a02
feat: 优化关系卡片样式
hellodigua Apr 20, 2026
a1ff9cd
fix: 修复话题在消息过少时候展示空状态的BUG
hellodigua Apr 20, 2026
831d064
fix: 更安全的dataSource迁移方式
hellodigua Apr 20, 2026
2944f92
release: v0.17.5
hellodigua Apr 20, 2026
64d8f74
feat: 关键词分析迁移到实验室
hellodigua Apr 20, 2026
8294cbc
feat: 语录整体迁移到洞察
hellodigua Apr 20, 2026
62ab06d
fix: Windows更新时使用静默安装模式避免NSIS弹出关闭提示导致更新失败(resolve #144)
hellodigua Apr 21, 2026
231374e
feat: 统一关系Tab
hellodigua Apr 21, 2026
96f3be6
feat: 添加Memory Tab
hellodigua Apr 21, 2026
271744a
feat: 聊天记录查看器移动到工具Panel
hellodigua Apr 21, 2026
770f44f
feat: 工具Panel新增Mini模式
hellodigua Apr 21, 2026
3474e00
fix: Pull 拉取时指定 limit=1000 避免远端数据源一次性导出过多数据导致卡顿
hellodigua Apr 22, 2026
11a1e40
fix: Pull 增量同步增加 60 秒重叠窗口避免消息丢失
hellodigua Apr 22, 2026
cac864b
feat: 修改添加数据源表单提示
hellodigua Apr 22, 2026
87a6316
feat: AI助手交互逻辑优化
hellodigua Apr 22, 2026
0cdaa8f
feat: 隐藏记忆入口
hellodigua Apr 22, 2026
b270ecc
fix: 修复存量类型警告
hellodigua Apr 22, 2026
31f595a
release: v0.18.0
hellodigua Apr 22, 2026
2be18ad
feat: 支持DeepSeek V4模型
hellodigua Apr 24, 2026
c3e1654
feat: 支持开机自启动
hellodigua Apr 24, 2026
ad62f9e
feat: 优化设置弹窗弹出方式
hellodigua Apr 24, 2026
a6e5741
feat: 优化快速提问展示逻辑
hellodigua Apr 24, 2026
68e7285
feat: 全局样式优化
hellodigua Apr 24, 2026
071a8db
fix: AI对话中的链接应该在浏览器中打开(resolve #150)
hellodigua Apr 24, 2026
0f4a0da
feat: 迁移至ChatLab组织
hellodigua Apr 24, 2026
120eb93
release: v0.18.1
hellodigua Apr 24, 2026
ef2334b
feat: 订阅新增类型选择
xunchahaha Apr 25, 2026
352a071
feat: 支持远程会话分页发现
hellodigua Apr 26, 2026
c97e2e7
feat: 支持配置每次拉取消息数
hellodigua Apr 26, 2026
6e10dd1
chore: Github Actions 权限变更
hellodigua Apr 26, 2026
b28b763
release: v0.18.2
hellodigua Apr 26, 2026
a80730e
fix: 修复设置页内弹窗被遮挡的 z-index 问题
hellodigua Apr 27, 2026
30d61fd
feat: 禁止将数据目录设置在应用安装目录下
hellodigua Apr 27, 2026
541708b
fix: 修复弹窗样式覆盖问题
hellodigua Apr 27, 2026
ed6a979
feat: 支持快捷工具入口位置配置
hellodigua Apr 27, 2026
e2c20e2
feat: 默认时间筛选优化
hellodigua Apr 27, 2026
9eb20da
release: v0.18.3
hellodigua Apr 27, 2026
57455e3
feat: AI 对话错误详情展示优化
hellodigua Apr 28, 2026
97de1e9
feat: OpenAI 兼容 API 地址自动补全 /v1 并支持实时预览
hellodigua Apr 28, 2026
5e919d3
feat: 支持远程模型列表获取功能
hellodigua Apr 28, 2026
3423bf0
feat: 优化部分展示样式
hellodigua Apr 28, 2026
dd1fdfe
chore: 同步日志技能逻辑优化
hellodigua Apr 28, 2026
78689b2
fix: 修复部分逻辑漏洞
hellodigua Apr 28, 2026
70a1645
release: v0.18.4
hellodigua Apr 28, 2026
ecdb699
feat: 支持模型上下文窗口预设和配置
hellodigua Apr 29, 2026
5fc7b56
feat: 支持上下文自动压缩和新增相关配置
hellodigua Apr 29, 2026
b290a85
feat: 优化上下文窗口配置逻辑
hellodigua Apr 29, 2026
59f1548
feat: 重构debug模式,新增原始数据查看
hellodigua Apr 30, 2026
47ef10f
feat: 上下文压缩逻辑优化
hellodigua Apr 30, 2026
0c3bbcb
feat: 优化AI模型配置文案和UI
hellodigua Apr 30, 2026
df0b2a3
feat: 上下文压缩行为优化
hellodigua May 1, 2026
99b4d3e
feat: debug_context 记录完整 LLM 上下文
hellodigua May 2, 2026
f6cc5c8
feat: 优化设置和展示逻辑
hellodigua May 6, 2026
50da84f
feat: 移除向量模型配置逻辑
hellodigua May 6, 2026
f181c70
feat: 新用户支持查看Demo示例
hellodigua May 6, 2026
0f9f21d
feat: 迁移到pnpm-workspace
hellodigua May 6, 2026
63af381
fix: 修复部分BUG
hellodigua May 6, 2026
4e7ba91
release: v0.19.0
hellodigua May 6, 2026
3e26e5b
feat: 使用新Icon
hellodigua May 7, 2026
6035ad2
chore: simplify Linux download links in release notes to AppImage only
hellodigua May 7, 2026
24bdcc0
docs: update
hellodigua May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MAIN_VITE_SERVER_API=127.0.0.1
RENDERER_VITE_SERVER_URL=

# 程序信息
RENDERER_VITE_SITE_TITLE="聊天记录分析"
RENDERER_VITE_SITE_TITLE="重构你的社交记忆"
RENDERER_VITE_SITE_KEYWORDS=""
RENDERER_VITE_SITE_DES=""
RENDERER_VITE_SITE_URL=""
Expand Down
216 changes: 158 additions & 58 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ on:
tags:
- 'v*'

permissions:
contents: write

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
# macOS 构建需要分架构
# better-sqlite3 等原生模块会通过 prebuild 下载对应架构的预编译二进制
Expand All @@ -27,33 +33,44 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
node-version: '24'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-${{ matrix.arch }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-pnpm-store-

- name: Install dependencies
run: pnpm install
run: |
echo "node-linker=hoisted" >> .npmrc
pnpm install

- name: Cache Electron and electron-builder binaries
uses: actions/cache@v5
with:
path: |
~/Library/Caches/electron
~/Library/Caches/electron-builder
key: ${{ runner.os }}-${{ matrix.arch }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-electron-builder-

# macOS 签名和公证需要的 API Key 文件
- name: Create Apple API Key File
Expand All @@ -76,7 +93,7 @@ jobs:
run: pnpm build && pnpm exec electron-builder --mac --${{ matrix.arch }} --config electron-builder.yml -p never

- name: Upload macOS artifacts (${{ matrix.arch }})
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ChatLab-mac-${{ matrix.arch }}
path: |
Expand All @@ -92,33 +109,44 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
node-version: '24'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install
run: |
echo "node-linker=hoisted" >> .npmrc
pnpm install

- name: Cache Electron and electron-builder binaries
uses: actions/cache@v5
with:
path: |
~/AppData/Local/electron/Cache
~/AppData/Local/electron-builder/Cache
key: ${{ runner.os }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-builder-

- name: Build Electron app for Windows
env:
Expand All @@ -128,7 +156,7 @@ jobs:
run: pnpm build:win

- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ChatLab-win
path: |
Expand All @@ -139,35 +167,119 @@ jobs:
if-no-files-found: warn
retention-days: 1 # 只保留1天,Release后会上传到GitHub Releases

build-linux:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x64
- os: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '24'
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-${{ matrix.arch }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-pnpm-store-

- name: Install dependencies
run: |
echo "node-linker=hoisted" >> .npmrc
pnpm install

- name: Cache Electron and electron-builder binaries
uses: actions/cache@v5
with:
path: |
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-${{ matrix.arch }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-electron-builder-

- name: Build Electron app for Linux (${{ matrix.arch }})
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
APTABASE_APP_KEY: ${{ secrets.APTABASE_APP_KEY }}
run: |
if [ "${{ matrix.arch }}" = "arm64" ]; then
pnpm run build && pnpm exec electron-builder --linux deb --arm64 --config electron-builder.yml -p never
else
pnpm build:linux
fi

- name: Upload Linux artifacts (${{ matrix.arch }})
uses: actions/upload-artifact@v6
with:
name: ChatLab-linux-${{ matrix.arch }}
path: |
dist/*.AppImage
dist/*.deb
dist/*.tar.gz
dist/*.yml
dist/*.json
if-no-files-found: warn
retention-days: 1

release:
needs: [build-mac, build-win]
needs: [build-mac, build-win, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取完整历史用于生成 changelog
uses: actions/checkout@v5

- name: Download macOS artifacts (x64)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ChatLab-mac-x64
path: dist

- name: Download macOS artifacts (arm64)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ChatLab-mac-arm64
path: dist

- name: Download Windows artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ChatLab-win
path: dist

- name: Download Linux artifacts
uses: actions/download-artifact@v8
with:
name: ChatLab-linux-x64
path: dist

- name: Download Linux artifacts (arm64)
uses: actions/download-artifact@v8
with:
name: ChatLab-linux-arm64
path: dist

- name: List files
run: ls -la dist/

Expand All @@ -184,52 +296,37 @@ jobs:

echo "Current version: $CURRENT_VERSION"

# 获取上一个 tag
PREVIOUS_TAG=$(git tag --sort=-creatordate | grep -v "^${CURRENT_VERSION}$" | head -n 1)
# 从 changelog JSON 中提取最新版本的 summary
EN_SUMMARY=$(jq -r '.[0].summary' docs/public/changelogs/en.json)
CN_SUMMARY=$(jq -r '.[0].summary' docs/public/changelogs/cn.json)

if [ -z "$PREVIOUS_TAG" ]; then
echo "No previous tag found, using first commit"
COMMIT_RANGE="HEAD"
else
echo "Previous tag: $PREVIOUS_TAG"
COMMIT_RANGE="${PREVIOUS_TAG}..HEAD"
fi
echo "EN summary: $EN_SUMMARY"
echo "CN summary: $CN_SUMMARY"

# 生成 release notes
{
echo "## What's New"
echo ""
echo "$EN_SUMMARY"
echo ""
echo "## 更新内容"
echo ""
echo "$CN_SUMMARY"
echo ""
echo "---"
echo ""
echo "Full Changelog: [English](https://github.com/ChatLab/ChatLab/blob/main/docs/public/changelogs/en.json) | [中文](https://github.com/ChatLab/ChatLab/blob/main/docs/public/changelogs/cn.json) | [日本語](https://github.com/ChatLab/ChatLab/blob/main/docs/public/changelogs/ja.json)"
echo ""

# 提取 feat commits
FEATS=$(git log $COMMIT_RANGE --pretty=format:"%s" --grep="^feat" 2>/dev/null | sed 's/^feat[:(]//' | sed 's/^[^)]*): //' | sed 's/^/- /')
if [ -n "$FEATS" ]; then
echo "### 新功能"
echo "$FEATS"
echo ""
fi

# 提取 fix commits
FIXES=$(git log $COMMIT_RANGE --pretty=format:"%s" --grep="^fix" 2>/dev/null | sed 's/^fix[:(]//' | sed 's/^[^)]*): //' | sed 's/^/- 🐛 /')
if [ -n "$FIXES" ]; then
echo "### 修复"
echo "$FIXES"
echo ""
fi

# 如果没有 feat 和 fix,显示提示
if [ -z "$FEATS" ] && [ -z "$FIXES" ]; then
echo "- 常规更新和优化"
echo ""
fi

echo "---"
echo ""
echo "## Download"
echo ""
echo "| Platform | File |"
echo "|-----------------|-------------|"
echo "| Mac (Apple Silicon) | [ChatLab-${VERSION_NUMBER}-arm64.dmg](https://github.com/hellodigua/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}-arm64.dmg) |"
echo "| Mac (Intel) | [ChatLab-${VERSION_NUMBER}-x64.dmg](https://github.com/hellodigua/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}-x64.dmg) |"
echo "| Windows | [ChatLab-${VERSION_NUMBER}-setup.exe](https://github.com/hellodigua/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}-setup.exe) |"
echo "| Mac (Apple Silicon) | [ChatLab-${VERSION_NUMBER}-arm64.dmg](https://github.com/ChatLab/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}-arm64.dmg) |"
echo "| Mac (Intel) | [ChatLab-${VERSION_NUMBER}-x64.dmg](https://github.com/ChatLab/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}-x64.dmg) |"
echo "| Windows | [ChatLab-${VERSION_NUMBER}-setup.exe](https://github.com/ChatLab/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}-setup.exe) |"
echo "| Linux | [ChatLab-${VERSION_NUMBER}.AppImage](https://github.com/ChatLab/ChatLab/releases/download/v${VERSION_NUMBER}/ChatLab-${VERSION_NUMBER}.AppImage) |"
} > release_notes.md

echo "Generated release notes:"
Expand All @@ -245,6 +342,9 @@ jobs:
dist/*.exe
dist/*.dmg
dist/*.zip
dist/*.AppImage
dist/*.deb
dist/*.tar.gz
dist/*.yml
dist/*.blockmap
env:
Expand Down
Loading