Commit Graph

1197 Commits

Author SHA1 Message Date
Daniel 123ed61f76 ♻️ No longer create table blocks_fts_case_insensitive https://github.com/siyuan-note/siyuan/issues/17849
Signed-off-by: Daniel <845765@qq.com>
2026-06-13 12:11:23 +08:00
Daniel 59dc786120 ✨ New settings UI https://github.com/siyuan-note/siyuan/issues/17601
Signed-off-by: Daniel <845765@qq.com>
2026-06-13 12:09:59 +08:00
Daniel 6f320404c1 🎨 Support for opening the user guide on iOS https://github.com/siyuan-note/siyuan/issues/17851
Signed-off-by: Daniel <845765@qq.com>
2026-06-13 09:43:51 +08:00
游夏 36f4e3720e 🎨 Add Simplified/Traditional Chinese sensitivity option (#17846)
* ✨ 搜索支持区分繁简选项 Add Simplified/Traditional Chinese sensitivity option for search

新增搜索配置 hanSensitive(区分繁简,默认开启 = 现状行为,命名与语义
向 caseSensitive 对齐)。关闭后简体与繁体可互相检索。

- FTS 层:关闭区分繁简时,blocks_fts / blocks_fts_case_insensitive 建表
  追加 han_insensitive 分词器参数(依赖 88250/go-sqlite3 配套补丁),
  繁体在分词时按单字折叠为简体,token 偏移仍指向原文;
- 切换选项复用区分大小写现有的 FullReindex 流程;
- 高亮:EncloseHighlighting 在关闭区分繁简时将关键字逐字符展开为
  繁简等价字符类(如 诗经 -> [诗詩][经經]),与分词器使用同一份
  OpenCC TSCharacters 映射数据;
- 兼容:旧版本 conf.json 缺 hanSensitive 字段时按既往行为置为开启;
  setSearch 请求未携带该字段(现行前端/第三方调用)时保持当前值,
  避免被零值意外翻转并触发重建索引;
- 遵照配置界面重写计划(#17601),本次不改动设置界面与 i18n,仅添加
  配置数据结构字段与前端类型定义(config.d.ts)。

范围说明:本次仅覆盖块全文搜索(关键字/查询语法)的命中与高亮;
历史/资源文件搜索、数据库属性过滤、虚拟引用、查找替换的替换动作
不在本次范围内(替换保持字节精确以避免误改原文)。

Fixes #13304

* 🐛 add missing util.SearchHanSensitive referenced by highlighting and sql.SetHanSensitive

Copilot 评审指出 util.SearchHanSensitive 未定义导致无法编译:补上该全局
变量(默认 true,与既往行为一致,由 sql.SetHanSensitive 维护),并修正
conf/search.go 的 gofmt 对齐。已在本地以 dev 当前 go.mod(已合并的
88250/go-sqlite3 分词器)完成 go build -tags fts5 与 kernel/search 单测验证。
2026-06-12 15:59:50 +08:00
Daniel 501a0af7e7 ✨ Semantic search using AI embeddings https://github.com/siyuan-note/siyuan/issues/17788
Signed-off-by: Daniel <845765@qq.com>
2026-06-12 14:22:44 +08:00
Daniel 9ede47c27a ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-11 21:22:43 +08:00
Daniel 48d6816263 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-11 20:32:49 +08:00
Daniel b9859499bf ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-11 20:14:07 +08:00
Daniel cbf89f7088 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-11 08:48:38 +08:00
Daniel e32bc2fa7c ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-10 23:20:03 +08:00
Daniel 234037ac9f ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-10 23:19:58 +08:00
Daniel de81d9f72e ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-10 23:19:53 +08:00
Daniel 5c2c11f703 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-10 16:32:23 +08:00
Daniel a7a6f2b0d1 🎨 https://github.com/siyuan-note/siyuan/pull/17647
Signed-off-by: Daniel <845765@qq.com>
2026-06-10 11:48:56 +08:00
Daniel 1b43e39e0f ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-08 21:33:58 +08:00
Daniel aee98a8941 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-07 23:08:40 +08:00
Daniel e0208e875e ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-07 18:10:02 +08:00
Daniel d180f0a9ce ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-06 21:46:42 +08:00
Daniel d9e4c4c558 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-06 14:38:54 +08:00
Daniel 916bd2cf10 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-06 09:54:22 +08:00
Daniel 7510be323c ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-06 00:26:12 +08:00
Daniel 2ed68638ff ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-05 16:49:03 +08:00
Daniel 97b72ad9c7 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-04 23:41:03 +08:00
Daniel 8f3473a7f0 ✨ AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-04 17:48:04 +08:00
Daniel e6f5ef6b07 🔒 https://github.com/siyuan-note/siyuan/security/advisories/GHSA-gcm7-57gf-953c
Signed-off-by: Daniel <845765@qq.com>
2026-06-03 15:28:34 +08:00
Daniel 24ec0a6ff5 🔒 https://github.com/siyuan-note/siyuan/security/advisories/GHSA-mvjr-vv3c-w4qv
Signed-off-by: Daniel <845765@qq.com>
2026-06-03 15:28:33 +08:00
Jeffrey Chen 3431a6afeb 🎨 Support setting document title to empty 3 https://github.com/siyuan-note/siyuan/pull/17110 (#17468) 2026-06-03 11:33:05 +08:00
Daniel 1a5d6d3f8a ✨ AI Agent panel https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-02 23:18:42 +08:00
Daniel ff122d3dfa ✨ AI Agent panel https://github.com/siyuan-note/siyuan/issues/17797
Signed-off-by: Daniel <845765@qq.com>
2026-06-02 23:18:39 +08:00
Daniel 587f8bcd04 🎨 https://github.com/siyuan-note/siyuan/issues/17796
Signed-off-by: Daniel <845765@qq.com>
2026-06-01 13:07:09 +08:00
Daniel 4437737f95 🎨 https://github.com/siyuan-note/siyuan/issues/17796
Signed-off-by: Daniel <845765@qq.com>
2026-06-01 11:13:51 +08:00
Yingyi / 颖逸 650089f508 🎨 Optimized kernel plugin restart process and access permission control (#17789)
* 🎨 Refactor plugin API routes for improved organization and clarity

* 🎨 Improve plugin hot-reload handling and streamline stop logic in PluginManager
2026-05-31 17:06:53 +08:00
Daniel 08aaaedb13 ✨ Semantic search using AI embeddings https://github.com/siyuan-note/siyuan/issues/17788
Signed-off-by: Daniel <845765@qq.com>
2026-05-30 21:04:01 +08:00
Daniel 98a504e4b1 🎨 https://github.com/siyuan-note/siyuan/pull/17487
Signed-off-by: Daniel <845765@qq.com>
2026-05-30 13:44:33 +08:00
Daniel 457bd9b2de 🎨 https://github.com/siyuan-note/siyuan/issues/17785
Signed-off-by: Daniel <845765@qq.com>
2026-05-30 11:07:58 +08:00
Daniel 843a5f28ce 🎨 https://github.com/siyuan-note/siyuan/issues/17781
Signed-off-by: Daniel <845765@qq.com>
2026-05-29 20:42:14 +08:00
mm-o dda0fb9136 🎨 Add Generic Streamed Proxy Responses for Kernel Plugins (#17748)
* Add streaming proxy response for kernel plugins

* Harden kernel plugin streaming proxy
2026-05-29 09:43:21 +08:00
Jeffrey Chen c9ff08a745 🎨 Improve marketplace package compatibility check and batch update (#17757)
* 🎨 Improve marketplace package compatibility check and batch update https://github.com/siyuan-note/siyuan/issues/17754

* 🎨 Improve marketplace package compatibility check and batch update https://github.com/siyuan-note/siyuan/issues/17754
2026-05-29 09:31:53 +08:00
Yingyi / 颖逸 ff1b0bc658 ♻️ Refactor error codes for consistency in kernel plugin, broadcast and utility functions (#17770)
* Refactor error codes in broadcast, network, plugin, and utility functions for consistency

* Fix API endpoint paths in multiple functions for consistency
2026-05-29 09:29:17 +08:00
Daniel 3c875a8b46 🧑‍💻 Add kernel API /api/history/createDocHistory https://github.com/siyuan-note/siyuan/issues/17774
Signed-off-by: Daniel <845765@qq.com>
2026-05-28 20:14:19 +08:00
Daniel e493630d6d 🎨 Improve workspace path update
Signed-off-by: Daniel <845765@qq.com>
2026-05-26 18:05:37 +08:00
Jeffrey Chen 0a454d3cb7 🎨 Add read-only mode to /api/query/sql (#17696)
* 🧑‍💻 Add read-only mode to `/api/query/sql`

* 🎨 sql.CheckSingleStatement excludes end-of-line comments
2026-05-18 18:28:31 +08:00
Daniel d711ede632 🎨 https://github.com/siyuan-note/siyuan/issues/17695
Signed-off-by: Daniel <845765@qq.com>
2026-05-18 11:36:00 +08:00
Daniel e60093379c ✨ Shorthands on mobile https://github.com/siyuan-note/siyuan/issues/14414#issuecomment-4470321595
Signed-off-by: Daniel <845765@qq.com>
2026-05-17 21:11:51 +08:00
Jeffrey Chen 04915380b1 🧑‍💻 Add kernel API /api/lute/md2html (#17697) 2026-05-17 11:29:22 +08:00
Daniel 490ede88f6 ✨ Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674
Signed-off-by: Daniel <845765@qq.com>
2026-05-13 16:41:58 +08:00
Daniel 1dd7321fd5 🎨 Supports returning a list of files from data snapshots via filename search https://github.com/siyuan-note/siyuan/issues/17258
Signed-off-by: Daniel <845765@qq.com>
2026-05-13 11:26:35 +08:00
Yingyi / 颖逸 c4ae1d44e5 🎨 Fix kernel plugin related issues (#17670)
* feat(kernel-plugin): Prevent storage.put and storage.remove in read-only mode

* feat(kernel-plugin): Reload petal plugin on install

When installing a Bazaar package, ensure that if the corresponding petal exists and is enabled we call SetPetalEnabled to trigger a kernel plugin reload before scheduling the plugin reload. This ensures the petal's kernel plugin picks up the newly installed package immediately.

* feat(kernel-plugin): Use gin-contrib/sse.Event for SSE handling

Replace the custom sseEvent type with gin-contrib/sse.Event and update the SSE handling pipeline. The JS handler now accepts an event object (data, event, id, retry), which is validated and converted to sse.Event before being sent on the channel; the server renders events with c.Render(-1, e). Added import for github.com/gin-contrib/sse and bumped gin-contrib/sse to v1.1.1 in go.mod (go.sum updated accordingly).

* feat(kernel-plugin): Add global kernel plugin start/stop hooks

Introduce OnKernelPluginsStart and OnKernelPluginsStop hooks and replace the previous OnKernelPluginShutdown usage. Update Close to call OnKernelPluginsStop and wire the new hooks in the plugin manager (OnKernelPluginsStart -> GetManager().Start, OnKernelPluginsStop -> GetManager().Stop). Existing per-plugin OnKernelPluginStart/OnKernelPluginStop handlers remain unchanged. This adds global lifecycle hooks to start and stop all valid plugins via the manager.

* feat(kernel-plugin): Add plugin manager state and bazaar handling

Call kernel plugin start/stop callbacks when bazaar settings change and add lifecycle state to the PluginManager. setting.go now triggers model.OnKernelPluginsStop or model.OnKernelPluginsStart when Bazaar.PetalDisabled or Bazaar.Trust change. plugin/manager.go introduces a PluginManagerState enum, initializes the manager as stopped, adds a State() accessor, and changes lifecycleMu to an RWMutex. Start/Stop now check the current state to avoid redundant operations, skip starting if bazaar config disables plugins, and update the manager state after start/stop, with additional log messages. These changes improve safety around concurrent start/stop and ensure bazaar configuration is honored.

* feat(kernel-plugin): Add plugin hot-reload watcher and per-plugin dirs

Add fsnotify-based watcher and manager context to detect kernel.js changes and trigger plugin hot-reloads. Introduce pluginsDir, pluginDir and storageDir fields and use storageDir in storage API to prevent path traversal. Replace single plugin mutex map with per-plugin mutex map, serialize start/stop per plugin, and adjust StartPlugin/StopPlugin flow to stop first for hot-reload, honor Bazaar config flags, and propagate start context. Update KernelPlugin to accept a start context and set per-plugin directories. Add helper functions to add/remove plugin dirs from the watcher and simplify GetLoadedPlugin. (Note: go.sum changes are present but not described.)

* feat(kernel-plugin): Add storage watcher and plugin reload improvements

Introduce per-plugin fsnotify storage watcher and expose a JS API for it (siyuan.storage.watcher.add/remove). KernelPlugin now accepts a parent context, creates an fsnotify.Watcher, starts a storage watch goroutine that publishes standardized runtime events (createEventMessage) for fs changes, and provides addStorageWatch/removeStorageWatch helpers. Manager API renamed to addPluginSourceWatch/removePluginSourceWatch with safer watcher handling and clearer reload logging; StartPlugin now passes the manager context into NewKernelPlugin. Also refactor runtime start/stop event publishing to use createEventMessage and add minor logging/error handling for watcher creation and path watch operations. The JS watcher object is frozen and integrated into siyuan.storage.
2026-05-13 08:24:46 +08:00
Daniel 4b1c10ee94 🎨 Supports returning a list of files from data snapshots via filename search https://github.com/siyuan-note/siyuan/issues/17258
Signed-off-by: Daniel <845765@qq.com>
2026-05-11 20:03:16 +08:00
Jeffrey Chen c20212594d ♻️ Extract IsMobileContainer and replace the mobile ternary judgment (#17661) 2026-05-11 00:03:33 +08:00