Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ jobs:
throw "The desktop UI version labels do not match tag $tag"
}

$updateNotesPath = Join-Path $PWD "..\docs\desktop-update.md"
if (-not (Test-Path -LiteralPath $updateNotesPath)) {
throw "Missing docs/desktop-update.md release notes"
}
$updateNotes = Get-Content -LiteralPath $updateNotesPath -Raw
$updateNotesHeading = "(?m)^# ToolKnit Desktop {0}\s*$" -f [regex]::Escape($releaseVersion)
if ($updateNotes -notmatch $updateNotesHeading) {
throw "docs/desktop-update.md must start with the release version $releaseVersion"
}

- name: Setup Node.js
uses: actions/setup-node@v5
with:
Expand Down Expand Up @@ -165,6 +175,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
name: ToolKnit Desktop ${{ github.ref_name }}
body_path: docs/desktop-update.md
files: |
toolknit-desktop/src-tauri/target/release/bundle/nsis/*.exe
toolknit-desktop/src-tauri/target/release/bundle/nsis/*.exe.sha256
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ toolknit-desktop-changelog.md
2.0路线规划.md
排查记录.md
.codex-backups/
.mimosa/

# 第三方参考项目
开发文件/
Expand Down
69 changes: 42 additions & 27 deletions README.md

Large diffs are not rendered by default.

66 changes: 41 additions & 25 deletions README_EN.md

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions docs/desktop-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ToolKnit Desktop 2.3.0

> 此文件同时作为 GitHub Release 正文与桌面端更新页的唯一来源。标题版本必须与
> Release Tag 去掉 `v` 后的版本完全一致。

## 新增工具

- 文本与转写分类新增“提词器”:粘贴台词或读取 TXT、Markdown、DOCX、PDF 文稿,支持平滑滚动、速度与字号调节、水平/垂直镜像和专注模式;句子级语音跟随可选自动选择、Windows 系统识别或 ToolKnit 离线识别,麦克风片段只在本机处理。
- PDF 分类新增“PDF 加页码”:把一个或多个 PDF 展开成统一页面序列,实时预览页码范围、编号方式、位置与外观,页码由矢量指令直接写入,支持单个 PDF 或逐页 ZIP 导出。
- PDF 分类新增“PDF 裁剪”:在可视化预览中框选保留区域或输入精确边距,支持全部页面统一裁剪与单页独立调整,通过修改页面边界实现,不截图压缩,支持单个 PDF 或逐页 ZIP 导出。
- 图像分类新增“背景移除”:使用按需下载的本地抠图模型生成透明背景,支持前后对比、边缘优化、背景颜色预览和原始分辨率导出;模型推理和图片处理均留在本机。
- PDF 分类新增“Excel 转 PDF”:批量读取 XLSX、XLS 和 ODS,支持工作表范围、方向、纸张与缩放设置;使用 ToolKnit 管理的本地 LibreOffice 运行时渲染,并针对 WPS 工作簿提供兼容导入路径。

## 更新体验

- ToolKnit 会在启动后的空闲时段后台检查已发布的 GitHub Release,不打断当前工作。
- 全屏更新页会将当前版本、可用版本、更新说明与已验证的 GitHub Release 地址集中呈现。
- 选择“我还不想更新”会将当前版本延后 24 小时;更高的新版本不会被旧延后记录隐藏。

## 可靠性与隐私

- Release 元数据仅在本机缓存六小时,降低网络请求和 GitHub API 压力。检查过程不会发送工具输入、文件路径、账户信息或使用历史。
- 详细更新说明文件不可用时,应用会安全回退到 GitHub Release 正文;远端 Markdown 只作为文本呈现,不会执行其中的代码。
- 在配置 Tauri 签名更新端点之前,“现在去更新”会打开对应 GitHub Release,让安装包与 SHA-256 校验值仍可见、可核对。

## 发布检查

- 每次桌面端发布、打 Tag 前都必须更新本文件。
- 顶部版本必须与 `package.json`、Cargo 以及 Release Tag 保持一致。
- V2.3 桌面目录固定为 12 个分类、65 项工具;CLI / MCP 保持 46 项已发布能力。
- 将正式安装包及对应 `.sha256` 文件加入 GitHub Release。
44 changes: 44 additions & 0 deletions toolknit-desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,50 @@
> 与网页端完整更新历史保持同步:
> https://toolknit.com/changelog.html

## v2.3.0 (2026-08-31)

> 原规划的 2.2.0 未单独发布,其更新体验能力并入本版本。

### 新增工具

- 文本与转写分类新增“提词器”:粘贴台词或读取 TXT、Markdown、DOCX、PDF 文稿,支持平滑滚动、速度与字号调节、水平/垂直镜像和专注模式;句子级语音跟随提供自动选择、Windows 系统识别与 ToolKnit 离线识别(whisper.dll 本地推理)三种方式,关闭页面时停止麦克风、取消未完成识别并释放模型会话。
- PDF 分类新增“PDF 加页码”:把一个或多个 PDF 展开成统一页面序列,支持页面排序、范围选择、跳过封面、连续或分文件编号、起始值与步长、自定义文本模板、九宫格位置与多种外观样式;页码由 PDF 矢量指令直接写入,可导出单个 PDF 或逐页 ZIP。
- PDF 分类新增“PDF 裁剪”:在可视化预览中框选保留区域或输入精确边距(毫米 / PDF 点),支持全部页面统一裁剪与单页独立调整、撤销重做;裁剪通过修改页面边界实现,不会截图压缩,可导出单个 PDF 或逐页 ZIP。
- 图像分类新增“背景移除”:使用按需下载的本地抠图模型生成透明背景,支持前后对比、边缘优化、背景颜色预览和原始分辨率导出;模型推理和图片处理均留在本机。
- PDF 分类新增“Excel 转 PDF”:批量读取 XLSX、XLS 和 ODS,支持工作表范围、方向、纸张与缩放设置;使用 ToolKnit 管理的本地 LibreOffice 运行时渲染,并针对 WPS 工作簿提供兼容导入路径。
- 三项新工具统一使用自定义下拉组件,保持键盘可访问与玻璃拟态视觉的一致性。

### 更新体验

- 启动后的空闲时段后台检查已发布的 GitHub Release,不打断当前工作;全屏更新页集中呈现当前版本、可用版本、更新说明与已验证的 Release 地址。
- 选择“我还不想更新”将当前版本延后 24 小时;更高的新版本不会被旧延后记录隐藏。
- Release 元数据仅在本机缓存六小时;检查过程不发送工具输入、文件路径、账户信息或使用历史;远端 Markdown 只作为文本呈现,不会执行其中的代码。

### 修复

- 提词器:进度条与已用 / 剩余时间改为跟随真实滚动位置匀速前进,不再按句子序号跳变,也不会在长句播放时长时间冻结在 0%。
- 提词器:滚动速度按界面显示的预估时长自动推导,整个文稿的实际滚动时长与显示时长一致,调整字号或篇幅后不再出现“几乎不播放”或“进度条跑很快”。
- 提词器:修复 “GLM-5.3”“2.3.0”“3.14” 等数字中的英文句点被误判为句子边界的问题;数字后跟空格的编号列表仍正常切分。
- 提词器:修复播放 / 暂停图标在句间切换后消失的问题。
- 提词器:修复程序化滚动后当前句同步可能永久失效,导致进度、高亮和自动结束全部冻结的问题。
- 提词器:低帧率设备上播放不再随掉帧等比例变慢;播放期间暂停 WebGL 背景渲染,减少起播与滚动掉帧。
- 提词器:播放滚动改为合成器驱动的 transform 平移(浮点亚像素精度),不再受显示缩放的物理像素网格量化影响——低速倍速(如 0.4x、1.0x)下不再出现卡顿和步进抽搐,任何倍速都能吃满屏幕刷新率匀速滚动;播放期间主线程不再逐帧重绘文字,进一步降低掉帧。镜像(水平/垂直)并入同一变换矩阵并修正了应用顺序,垂直镜像下滚动方向保持正确;暂停时浮点偏移落回原生滚动,滚轮、点句定位等手动交互不受影响。
- 提词器:播放期间说明栏收起动画不再触发重复的视图重新定位,消除起播瞬间的顿挫。
- 提词器:暂停与播放改为原地冻结、原地继续——不再自动重新定位当前句,起播后进度也不会瞬间前跳;播放期间面板收展与窗口缩放同样不会移动视图。
- 提词器:控制栏改版——速度与字号改为渐升“音波”拖动条(50 根竖线、当前值以左点亮),支持拖动、点击与键盘微调,拖动时浮出数值徽标;播放 / 暂停改为白色平面图标;键盘 +/− 快捷键保留并与滑条双向联动,滑条聚焦时方向键只调节取值。
- 提词器:桌面端语音跟随放开 WebView2 媒体权限,麦克风不再被静默拒绝;配合已下载的离线识别模型即可逐句跟随,系统识别能力仍取决于 WebView2 环境。
- 提词器:离线识别模型未安装时,首页工具卡片点击直接弹出依赖下载引导(与音视频提取文字一致的拦截流程),不安装无法进入工具页;下载完成后自动进入,语音跟随启动中遇到模型缺失也会重新弹出门引并自动恢复跟随。
- 提词器:语音跟随新增逐字阅读光标——当前朗读位置下方显示白色短光标条,随识别实时前进;语音跟随模式下加大行距以容纳光标;识别结果中的常见繁体字自动映射为简体参与匹配,避免繁体输出导致跟随失效。
- 提词器:语音跟随实时窗口从 4.2 秒缩短到 3.2 秒,首条识别与后续跟随更快;音频上下文无法运行时立即明确报错而不是静默无声。
- 音视频提取文字:识别结果中的常见繁体字自动重写为简体后再发布(JSON / SRT / TXT 同步处理),桌面端与 CLI 转写一致,不再出现“识别内容正确但混入繁体”的问题。
- 工具页顶栏统一:提词器补齐“返回”按钮与 TOOL PAGE 页签,替换原品牌标识;“网页端版本”文案统一为“网页版本”,修复文本格式化页网页链接的下划线,支持作者按钮在提词器页恢复标准白底样式。
- PDF 工具:修复在 WebView2 / 浏览器内核低于 Chromium 140 的设备上,所有 PDF 工具加载文件即报 “hashOriginal.toHex is not a function” 的问题。原因是 pdf.js 6.x 的 modern 构建依赖 `Uint8Array.prototype.toHex` 等新 API 计算文档指纹;桌面端全部 12 处引用切换为官方 legacy 构建(自带 polyfill),与 CLI 侧既有做法一致,pdfjs-dist 版本与安全修复保持 6.2.108 不变,worker 体积增加约 160 KB。

### 版本与界面标识

- 桌面应用、Tauri、Rust crate 与 `@toolknit/cli` 统一升级为 `2.3.0`;首页海报、设置页、帮助中心与全部工具页的视觉版本标识同步为 2.3。
- 桌面工具目录扩展为 12 个分类 65 项。

## v2.1.1 (2026-08-25)

### 版本与界面标识
Expand Down
13 changes: 12 additions & 1 deletion toolknit-desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ ToolKnit Desktop 是 ToolKnit 网页端的开源桌面配套版本。它面向
</tr>
</table>

### v2.3.0 正式版

V2.3 在 V2.1 的本地安全基础上继续补齐真实工作流,并把桌面工具目录扩展到 12 个分类、65 项:

- 新增提词器、PDF 加页码、PDF 裁剪、背景移除和 Excel 转 PDF。
- 提词器支持本地离线语音跟随;背景移除使用本机模型;Excel 转 PDF 使用本地 LibreOffice 运行时,源文件不会上传。
- 更新检查、WebView2 安装策略、管理员重启、窗口与控件圆角、依赖下载状态和工具页交互完成兼容性加固。
- 桌面端、Tauri、Rust crate、CLI/MCP 和发布文档统一为 `2.3.0`,发布门禁覆盖 65 个桌面工具帮助映射与 46 项 MCP 能力。

### v2.1.1 版本修正

- 设置页、帮助入口和工具页的当前视觉版本标识统一为 2.1,与当前系列保持一致。
Expand Down Expand Up @@ -127,7 +136,9 @@ v2.1 将发布重点放在本地文件安全、PDF 编辑深度和真实失败

> 如果 ToolKnit 曾替你省下一次重复劳动、一个晚上的加班,或者把原本散掉的文件重新拢回秩序,欢迎把一点点支持留给它。
>
> 这些支持不会只停在一句感谢里,它们会被放回到测试设备、依赖镜像、文档、版本发布和 bug 修复里。每一笔都不算大,但都在帮它更稳地活下去。
> 为了持续给大家免费更新 ToolKnit,作者仅 AI 开发与测试每月就要自掏腰包 500 多元,长期独自承担已越来越吃力。支持会用于 AI 测试、兼容性设备、依赖镜像、文档、版本发布和 bug 修复。
>
> 赞助后可经确认加入 ToolKnit 灰度体验群,提前体验版本并提交希望加入的功能。灰度群用于交流、测试和需求收集;赞助不代表购买功能,也不承诺实现或优先排期。

<table>
<tr>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion toolknit-desktop/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ PDF、图片、音视频、文本和非 AI PPT 等本地工具不需要 AI Key
```

```text
请用 ToolKnit 生成一份可编辑 AI 文档,主题是“开源工具箱 v2.0 发布说明”,输出 PDF、预览图和控件编号图。生成后先检查编号图,如果版式空白或元素重叠,请继续调整工程文件并重新渲染。
请用 ToolKnit 生成一份可编辑 AI 文档,主题是“开源工具箱 V2.3 发布说明”,输出 PDF、预览图和控件编号图。生成后先检查编号图,如果版式空白或元素重叠,请继续调整工程文件并重新渲染。
```

查看完整中英文 Agent 手册:
Expand Down
2 changes: 1 addition & 1 deletion toolknit-desktop/cli/guides/agent-guide.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Call ToolKnit MCP's toolknit_ppt_to_image to export slides 1 through 3 of this p
When the user asks “make a PPT outline from these notes” or “plan an 8-slide talk,” the Agent should call `toolknit_ppt_outline`. This tool does not read PPTX and does not generate PPTX. It generates `outline.md`, `outline.json`, and `manifest.json` from the supplied text. If the source notes come from project files, read and summarize the text first, then pass the concise brief as `prompt`. Never put API keys in the prompt.

```text
Call ToolKnit MCP's toolknit_ppt_outline to generate an 8-slide Chinese PPT outline from the product notes I provided. The audience is open-source users, and the purpose is to help them understand ToolKnit 2.0's local-first and AI Agent capabilities and want to try it. Save into this workspace's toolknit-output folder. Resolve the output directory to an absolute path first and do not overwrite existing outputs. Report the outline.md, outline.json, manifest.json paths and missing-info list.
Call ToolKnit MCP's toolknit_ppt_outline to generate an 8-slide Chinese PPT outline from the product notes I provided. The audience is open-source users, and the purpose is to help them understand ToolKnit 2.3's local-first and AI Agent capabilities and want to try it. Save into this workspace's toolknit-output folder. Resolve the output directory to an absolute path first and do not overwrite existing outputs. Report the outline.md, outline.json, manifest.json paths and missing-info list.
```

```text
Expand Down
2 changes: 1 addition & 1 deletion toolknit-desktop/cli/lib/mcp-server.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { errorPayload, ToolKnitError } from './errors.mjs';
import { executeTool, listTools } from './tool-registry.mjs';

const SERVER_INFO = Object.freeze({ name: 'toolknit', version: '2.1.1' });
const SERVER_INFO = Object.freeze({ name: 'toolknit', version: '2.3.0' });
const SUPPORTED_PROTOCOLS = new Set(['2024-11-05', '2025-03-26', '2025-06-18']);

function response(id, result) {
Expand Down
7 changes: 7 additions & 0 deletions toolknit-desktop/cli/lib/transcription-runtime.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { fileURLToPath } from 'node:url';
import { compactFfmpegError, resolveFfmpeg, runFfmpeg } from './ffmpeg-runtime.mjs';
import { cancellationError, isCancellationError, ToolKnitError, throwIfAborted } from './errors.mjs';
import { isPlaceholderAiApiKey, requestAiCompletion } from './core/ai-provider-core.js';
import { simplifyChineseText } from './core/teleprompter-core.js';

const CLI_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const PROJECT_ROOT = path.resolve(CLI_ROOT, '..');
Expand Down Expand Up @@ -331,6 +332,12 @@ export async function transcribeMedia({ input_path, output_dir, language = 'auto
throwIfAborted(options.signal);
const sources = { json: path.join(temporary, 'transcript.json'), srt: path.join(temporary, 'transcript.srt'), txt: path.join(temporary, 'transcript.txt') };
if (!await regularFile(sources.json) || !await regularFile(sources.srt) || !await regularFile(sources.txt)) throw new ToolKnitError('PROCESSING_FAILED', 'The transcription engine did not create every expected output.');
// Whisper sometimes answers in traditional characters; publish simplified.
for (const filePath of [sources.json, sources.srt, sources.txt]) {
const content = await readFile(filePath, 'utf8');
const simplified = simplifyChineseText(content);
if (simplified !== content) await writeFile(filePath, simplified, 'utf8');
}
report(options, 94, 'Publishing transcription results.');
const stem = safeStem(input);
let suffix = 0;
Expand Down
4 changes: 2 additions & 2 deletions toolknit-desktop/cli/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion toolknit-desktop/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toolknit/cli",
"version": "2.1.1",
"version": "2.3.0",
"license": "Apache-2.0",
"description": "Local-first file processing CLI and MCP server for ToolKnit",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion toolknit-desktop/cli/toolknit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { editAiTableProject, generateAiTableProject, inspectAiTableProjectFile,
import { installTranscriptionModel, listTranscriptionModels, setCurrentTranscriptionModel, transcribeMedia } from './lib/transcription-runtime.mjs';
import { TaskRunner } from './lib/shared/task-runtime.mjs';

const VERSION = '2.1.1';
const VERSION = '2.3.0';
const CLI_ABORT_CONTROLLER = new AbortController();
let CLI_SIGNAL_COUNT = 0;

Expand Down
2 changes: 1 addition & 1 deletion toolknit-desktop/docs/agent-guide.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Call ToolKnit MCP's toolknit_ppt_to_image to export slides 1 through 3 of this p
When the user asks “make a PPT outline from these notes” or “plan an 8-slide talk,” the Agent should call `toolknit_ppt_outline`. This tool does not read PPTX and does not generate PPTX. It generates `outline.md`, `outline.json`, and `manifest.json` from the supplied text. If the source notes come from project files, read and summarize the text first, then pass the concise brief as `prompt`. Never put API keys in the prompt.

```text
Call ToolKnit MCP's toolknit_ppt_outline to generate an 8-slide Chinese PPT outline from the product notes I provided. The audience is open-source users, and the purpose is to help them understand ToolKnit 2.0's local-first and AI Agent capabilities and want to try it. Save into this workspace's toolknit-output folder. Resolve the output directory to an absolute path first and do not overwrite existing outputs. Report the outline.md, outline.json, manifest.json paths and missing-info list.
Call ToolKnit MCP's toolknit_ppt_outline to generate an 8-slide Chinese PPT outline from the product notes I provided. The audience is open-source users, and the purpose is to help them understand ToolKnit 2.3's local-first and AI Agent capabilities and want to try it. Save into this workspace's toolknit-output folder. Resolve the output directory to an absolute path first and do not overwrite existing outputs. Report the outline.md, outline.json, manifest.json paths and missing-info list.
```

```text
Expand Down
Loading