dsh-tiddlywiki 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 dsh-tiddlywiki contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-tiddlywiki contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -24,7 +24,8 @@ TiddlyWiki 的特性正好合适:单文件、纯文本、wiki 语法、自带
24
24
  |---|---|
25
25
  | Agent 工具 | `tiddlywiki_search` / `get` / `put` / `delete` / `git_sync` |
26
26
  | 人编辑 | 侧边栏「TiddlyWiki」入口 → 中央列内嵌完整 TW 编辑器(iframe 直连 TW 服务) |
27
- | 快速笔记 | 聊天区右下角常驻悬浮控件(可折叠,可多选/自动补全 tag,Ctrl+Enter 保存;设置页可整体隐藏) |
27
+ | 快速笔记 | 聊天区右下角常驻悬浮控件(可折叠,**Markdown 语法高亮**、**文件上传**、可多选/自动补全 tag,Ctrl+Enter 保存;设置页可整体隐藏) |
28
+ | 一键同步 | 右下角「同步」悬浮按钮 + 设置页「同步」按钮:点一下 pull → commit → push;按钮状态点实时反映 git 状态(待提交/可更新/已同步),可配置隐藏 |
28
29
  | 零摩擦生命周期 | 随 dsh 自动启动/关闭;TW 子进程崩溃自动重启(退避);端口/目录/首次 git init 全自动 |
29
30
  | 同步 | 单线程交替模型:开工 pull,收工 commit+push,自动 commit(60s 防抖,可关) |
30
31
 
@@ -43,7 +44,7 @@ dsh plugin --profile web add github:bbqisbbq/dsh-tiddlywiki
43
44
  dsh plugin --profile web add link:C:\Users\bbq\.dsh\plugins\dsh-tiddlywiki
44
45
  ```
45
46
 
46
- 首次启动会向 wiki **写入一次**「dsh-tiddlywiki 插件说明」笔记(tag `docs`),并默认安装「侧边移到左侧.css」界面补丁(把 TW 右侧栏移到左边;被删除后,只要设置页「侧边栏移左 CSS」开关开着就会随启动补丁还原)。
47
+ 首次启动会向 wiki **写入一次**「dsh-tiddlywiki 插件说明」笔记(tag `docs`)。
47
48
 
48
49
  ## 发布 / 仓库
49
50
 
@@ -87,7 +88,8 @@ dsh plugin --profile web add link:C:\Users\bbq\.dsh\plugins\dsh-tiddlywiki
87
88
  tag: "inbox"
88
89
  ui:
89
90
  showQuickNote: true # 是否显示右下角「快速笔记」按钮
90
- sidebarLeftCss: true # 是否启用「侧边移到左侧.css」补丁(被删后随启动还原)
91
+ showPanelStatus: true # 是否显示 TW 面板右下角「状态/重载」悬浮按钮
92
+ showSyncButton: true # 是否显示右下角「同步」悬浮按钮
91
93
  auth:
92
94
  username: "" # 默认 loopback 匿名;暴露到非 loopback 时才需要
93
95
  password: ""
@@ -112,12 +114,16 @@ dsh plugin --profile web add link:C:\Users\bbq\.dsh\plugins\dsh-tiddlywiki
112
114
 
113
115
  同步纪律(三条):开工先 `pull --rebase --autostash`;收工 `commit + push`;
114
116
  自动 commit 防抖 60s。真冲突 → abort 并报冲突文件,agent 人工处理,不自动吞数据。
117
+ **pull 若拉到新内容,`action=pull`/`sync` 会自动重启 TW(同端口)**,后续读写/搜索
118
+ 均为最新快照,不会读到旧缓存。
115
119
 
116
120
  ### 人(GUI)
117
121
 
118
122
  - 侧边栏「TiddlyWiki」按钮开关中央编辑器面板。
119
- - 右下角「快速笔记」悬浮控件:写草稿/随手记,Ctrl+Enter 保存为独立 tiddler;
123
+ - 右下角「快速笔记」悬浮控件:写草稿/随手记,**Markdown 语法高亮**(打字即高亮标题/代码/粗斜体/链接等),支持**文件上传**(点「📎 上传」或直接把文件拖进编辑器——文件存到 wiki 的 `files/` 文件夹并随 git 同步,图片插入 `![名](/files/名)`、其它文件插入 `[名](/files/名)`,在 TW 里可直接打开),Ctrl+Enter 保存为独立 tiddler;
120
124
  或点「**✏️ 在 TW 中编辑**」——保存后**弹出独立小窗**(可拖动/缩放)加载 TiddlyWiki **原生编辑器**编辑该条。
125
+ - 右下角「**同步**」悬浮按钮:点一下对 wiki 仓库做 **pull → commit → push**,按钮上的状态点实时反映 git 状态(🟢 已同步 / 🟡 有未提交改动 / 🔴 落后于远端 / ⚪ 离线),悬停可看分支/领先/落后/上次同步时间;每 30s 自动刷新。
126
+ 若这次 pull 实际拉到了新内容,**TW 服务会自动重启(同端口)**,保证界面显示的是最新快照而不是旧缓存(无需手动去面板点「重启 TW」)。
121
127
  - 面板服务异常时显示错误 +「重试」按钮(POST `/dsh-tiddlywiki/restart`)。
122
128
 
123
129
  ### 设置页(插件/主题管理 + 配置)
@@ -126,8 +132,8 @@ DSH **设置 → TiddlyWiki 知识库** 是插件的配置面板(`settings.sec
126
132
 
127
133
  | 区块 | 内容 |
128
134
  |---|---|
129
- | 状态/重启 | TW 运行状态 + git 概览 + 「重启 TW」按钮 |
130
- | 常规配置 | 快速笔记默认 tag、git 自动 commit/防抖/远端/分支——改了什么保存什么 |
135
+ | 状态/重启 | TW 运行状态 + git 概览 + 「**同步**」按钮(pull→commit→push)+ 「重启 TW」按钮 |
136
+ | 常规配置 | 快速笔记默认 tag、git 自动 commit/防抖/远端/分支、**ui 开关**(快速笔记/面板状态/同步按钮)——改了什么保存什么 |
131
137
  | 插件管理 | 自带官方插件勾选(可搜索)→ 应用并自动重启 TW |
132
138
  | 主题管理 | 自带主题**多选加载 + 单选活动** → 应用并自动重启 TW |
133
139
  | 语言管理 | 自带官方语言包勾选(含 zh-Hans/zh-CN 简体)→ 应用并自动重启 TW |
package/cordis.patch.yml CHANGED
@@ -1,13 +1,13 @@
1
- # dsh-tiddlywiki bundle patch: inserts the plugin row into the web profile
2
- # roster. Applied as a profile bundle layer (the `dsh.bundle.patch` manifest
3
- # field) over dsh-base; activate with
4
- # `dsh plugin --profile web add link:<path-to-this-package>` and restart dsh web.
5
- #
6
- # The row is a bare plugin by package name: the node half (exports ".") runs
7
- # in the host process (WikiServer, routes, tiddlywiki_* tools, prompt section,
8
- # auto-commit), and the `dsh.client` declaration in package.json makes the
9
- # browser half (exports "./client", served at /plugins/dsh-tiddlywiki/client.js)
10
- # load in the web GUI.
11
- - insert:
12
- - id: dsh-tiddlywiki
13
- name: dsh-tiddlywiki
1
+ # dsh-tiddlywiki bundle patch: inserts the plugin row into the web profile
2
+ # roster. Applied as a profile bundle layer (the `dsh.bundle.patch` manifest
3
+ # field) over dsh-base; activate with
4
+ # `dsh plugin --profile web add link:<path-to-this-package>` and restart dsh web.
5
+ #
6
+ # The row is a bare plugin by package name: the node half (exports ".") runs
7
+ # in the host process (WikiServer, routes, tiddlywiki_* tools, prompt section,
8
+ # auto-commit), and the `dsh.client` declaration in package.json makes the
9
+ # browser half (exports "./client", served at /plugins/dsh-tiddlywiki/client.js)
10
+ # load in the web GUI.
11
+ - insert:
12
+ - id: dsh-tiddlywiki
13
+ name: dsh-tiddlywiki