dsh-knit 0.4.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 +21 -0
- package/README.en.md +178 -0
- package/README.md +167 -0
- package/assets/knit-icon-24-mono-4px.svg +1 -0
- package/cordis.patch.yml +8 -0
- package/package.json +63 -0
- package/src/client/client.js +1170 -0
- package/src/host/index.js +653 -0
- package/src/host/relevance.js +236 -0
- package/test/client.test.mjs +500 -0
- package/test/entry.test.mjs +232 -0
- package/test/harness.mjs +235 -0
- package/test/host.test.mjs +249 -0
- package/test/i18n.test.mjs +344 -0
- package/test/icon.test.mjs +153 -0
- package/test/tier1.test.mjs +443 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Polinni
|
|
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.en.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Knit
|
|
2
|
+
|
|
3
|
+
> Your agent writes 20 documents a day. You can't find the one you just saw.
|
|
4
|
+
> Knit puts them next to the conversation — whatever you're talking about, the relevant doc is on top.
|
|
5
|
+
|
|
6
|
+
<img src="https://raw.githubusercontent.com/PolinniZhong/dsh-knit/main/docs/screenshot.png"
|
|
7
|
+
alt="Screenshot from a real machine: the Knit sidebar listing the workspace documents, with a Markdown preview expanded in place"
|
|
8
|
+
width="880">
|
|
9
|
+
|
|
10
|
+
*Screenshot from a real machine, not a mock-up: a workspace with 16 documents, the list plus an
|
|
11
|
+
inline preview. Note the top line — **before a session has any conversation to go on, it falls
|
|
12
|
+
back to newest-first and states its basis instead of pretending to rank.** Send a message and that
|
|
13
|
+
line switches to what you're currently talking about.*
|
|
14
|
+
|
|
15
|
+
Scans the whole project folder · Order follows the conversation · No model calls, no network
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
dsh plugin --profile web add dsh-knit
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## "Isn't this just a recent-files list?"
|
|
24
|
+
|
|
25
|
+
**Fair. Two differences:**
|
|
26
|
+
|
|
27
|
+
1. **Scope** — a recent-files list only remembers files you *opened*. Knit scans the
|
|
28
|
+
**entire project folder**. Restart DSH, start a new session, come back tomorrow: it's all still there.
|
|
29
|
+
2. **Order** — that list sorts by time. Knit sorts by **what you're currently talking about**.
|
|
30
|
+
|
|
31
|
+
Three sentences on what it is:
|
|
32
|
+
|
|
33
|
+
1. Scans **every Markdown file in the project folder**, not just the ones from this turn —
|
|
34
|
+
they survive restarts, new sessions, and days.
|
|
35
|
+
2. The order **follows the conversation**: talk about architecture and the architecture doc
|
|
36
|
+
floats up; talk about competitors and the competitor analysis floats up.
|
|
37
|
+
3. **No model calls, no network egress**: plain local string matching — zero latency,
|
|
38
|
+
zero cost, your documents never leave the machine.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## How "relevant" is computed
|
|
43
|
+
|
|
44
|
+
No magic, just string operations. Three steps:
|
|
45
|
+
|
|
46
|
+
**1. Read the conversation.** The host takes the last 6 user/assistant messages, and only
|
|
47
|
+
counts real user messages (`agent.inject()` synthetic context would drag the topic off course).
|
|
48
|
+
Newer messages weigh more: 3 / 2 / 1 / 1 …
|
|
49
|
+
|
|
50
|
+
**2. Extract keywords.**
|
|
51
|
+
|
|
52
|
+
- **ASCII words** — high value, one occurrence is enough (`chokidar`, `mtime`)
|
|
53
|
+
- **Chinese 2/3-grams** — either occurring twice, or appearing in the newest message
|
|
54
|
+
- stop-word filtering plus greedy de-overlap (picking「相关性排序」drops「相关性」and「排序」)
|
|
55
|
+
|
|
56
|
+
**3. Score the documents.** Weighted hits per keyword per document:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
title ×4 + summary ×2 + first 2500 chars of body ×1
|
|
60
|
+
each keyword caps at 6 hits (so long docs can't farm score)
|
|
61
|
+
plus a 10% recency nudge (relevance still dominates)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
All of it is string arithmetic — **no embeddings, no model calls**.
|
|
65
|
+
|
|
66
|
+
**And the honest boundary**: with only one or two messages there are too few keywords, so it
|
|
67
|
+
falls back to sorting by modification time and says so in the panel — it does not pretend to rank.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Install
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
dsh plugin --profile web add dsh-knit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then **restart DSH** and hard-refresh the browser (`Cmd + Shift + R`).
|
|
78
|
+
|
|
79
|
+
**How to open it:**
|
|
80
|
+
|
|
81
|
+
- The **Knit icon button in the session header** (right next to the sidebar toggle) — one click
|
|
82
|
+
- Or the right sidebar's tab bar「+」→「Knit recent docs」
|
|
83
|
+
|
|
84
|
+
**Optional**: if `dsh-better-sidebar` is installed, the panel also registers
|
|
85
|
+
as one of its tabs. Each host is an independent optional dependency; missing one doesn't affect the other.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Features
|
|
90
|
+
|
|
91
|
+
| | |
|
|
92
|
+
|---|---|
|
|
93
|
+
| **Sorted by relevance to the current conversation** (local keyword matching, no model) | ✅ |
|
|
94
|
+
| One-click toggle between relevance / modification time (preference kept in localStorage) | ✅ |
|
|
95
|
+
| Scans `.md` in the session workspace (recursive, depth ≤ 6, skips `node_modules` / `.git` / `dist`) | ✅ |
|
|
96
|
+
| Each row shows H1 title (or filename) + relative time + first-paragraph summary | ✅ |
|
|
97
|
+
| Click to preview inline, click again to collapse | ✅ |
|
|
98
|
+
| Relative-path images actually render (`./img/a.png`, `../assets/b.png`) | ✅ |
|
|
99
|
+
| Preview pane is height-draggable (20%–80%, remembered), fullscreen-able, `Esc` to exit | ✅ |
|
|
100
|
+
| Double-click opens in a new tab | ✅ |
|
|
101
|
+
| Filter box over title / summary / path | ✅ |
|
|
102
|
+
| Keyboard: `↑` `↓` move-and-preview, `Enter` toggle, `Esc` collapse | ✅ |
|
|
103
|
+
| Auto-refresh every 5s plus a manual button; docs changed in the last 2 min get 🆕 | ✅ |
|
|
104
|
+
| Bilingual (zh/en), follows the DSH language live — no plugin reload needed | ✅ |
|
|
105
|
+
| Zero model calls, zero network egress | ✅ |
|
|
106
|
+
|
|
107
|
+
> Relevance is deliberately **not visualised** (no percentages, no bars) — the ranking itself is
|
|
108
|
+
> the answer; position is relevance.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## What it reads, and what it doesn't
|
|
113
|
+
|
|
114
|
+
- Reads only `.md` files **inside the current session workspace** (anything resolving outside is rejected)
|
|
115
|
+
- Reads only **the current session's** conversation events (used for ranking)
|
|
116
|
+
- **Makes no outbound network requests**: the client has exactly two `fetch` calls, both to
|
|
117
|
+
the plugin's own same-origin routes
|
|
118
|
+
- **No install-time scripts** (no `install` / `postinstall`)
|
|
119
|
+
- **Zero dependencies** — nothing to build, no build-authorisation prompt
|
|
120
|
+
- The file-reading route only allows an **image-extension allowlist**, and responds with
|
|
121
|
+
`nosniff` plus `default-src 'none'; sandbox`
|
|
122
|
+
|
|
123
|
+
The relevance figure only affects ordering — it is **never displayed and never sent anywhere**.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Known limitations
|
|
128
|
+
|
|
129
|
+
- **Short conversations degrade the ranking**: one or two messages give too few keywords, so it
|
|
130
|
+
falls back to modification time and says so in the panel
|
|
131
|
+
- **Chinese segmentation is n-gram approximation**: no tokenizer dependency was added; good
|
|
132
|
+
enough in practice, not linguistically precise
|
|
133
|
+
- **The right sidebar's default page becomes the guide**: DSH's rule is "if there's exactly one
|
|
134
|
+
guide entry, open it directly"; the built-in Files entry takes that slot, so expanding the
|
|
135
|
+
sidebar shows the guide first and Knit needs one more click on its pill
|
|
136
|
+
- **Markdown only**: formats other than `.md` are not listed
|
|
137
|
+
- **Right-sidebar state is memory-only**: a refresh or a new session collapses it again
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
git clone https://github.com/PolinniZhong/dsh-knit.git
|
|
145
|
+
cd dsh-knit
|
|
146
|
+
|
|
147
|
+
npm test # 105 tests, zero dependencies, no npm install needed
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**How changes take effect**: the host half (`src/host/`) **requires a DSH restart** (no hot reload);
|
|
151
|
+
the client half (`src/client/`) only needs a hard browser refresh.
|
|
152
|
+
|
|
153
|
+
**There is no build step**: the client half is a hand-written `window.__ModuleLoader__.load({...})`
|
|
154
|
+
using `React.createElement` instead of JSX, so there's no tsbuild / tsc. Static assets are inlined
|
|
155
|
+
too — changing the icon means editing both the `assets/` source and `KNIT_ICON_PATH` in
|
|
156
|
+
`src/client/client.js`; `test/icon.test.mjs` asserts the two are byte-identical.
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
knit/
|
|
160
|
+
├── package.json # dsh.bundle.patch + dsh.client
|
|
161
|
+
├── cordis.patch.yml # the insert line mounted into the plugin tree
|
|
162
|
+
├── assets/ # icon source (path inlined into client.js)
|
|
163
|
+
├── src/
|
|
164
|
+
│ ├── host/index.js # /knit/api/recent · /doc · /raw
|
|
165
|
+
│ ├── host/relevance.js # the relevance engine (pure functions)
|
|
166
|
+
│ └── client/client.js # dual-host registration + panel UI
|
|
167
|
+
└── test/ # 105 tests
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Details and trade-offs live in the source comments; see [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
171
|
+
for the contribution flow and [CHANGELOG.md](CHANGELOG.md) for the version history.
|
|
172
|
+
|
|
173
|
+
> Versioning: `0.x` means the feature set still moves and breaking changes are possible.
|
|
174
|
+
> `1.0.0` waits until **real retention is validated** — not merely "features are done".
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
[MIT](LICENSE) © Polinni
|
package/README.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Knit
|
|
2
|
+
|
|
3
|
+
> Agent 一天产出 20 篇文档,你找不到刚才那篇。
|
|
4
|
+
> Knit 把它们放到对话旁边 —— 你正在聊什么,相关的那篇就在最上面。
|
|
5
|
+
|
|
6
|
+
<img src="https://raw.githubusercontent.com/PolinniZhong/dsh-knit/main/docs/screenshot.png"
|
|
7
|
+
alt="Knit 面板真机截图:右侧栏列出工作区里的文档,下方就地展开 Markdown 预览"
|
|
8
|
+
width="880">
|
|
9
|
+
|
|
10
|
+
*真机截图(不是原型):一个含 16 篇文档的工作区,列表 + 就地预览。
|
|
11
|
+
注意顶行:**新会话还没聊起来时,它退回按最新排并如实说明依据,不假装排了个序** ——
|
|
12
|
+
一发出消息,这一行就会换成按你正在聊什么排序。*
|
|
13
|
+
|
|
14
|
+
扫整个项目文件夹的 Markdown · 排序跟着对话走 · 不调模型、不联网
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
dsh plugin --profile web add dsh-knit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 这不就是个「最近文件列表」吗?
|
|
23
|
+
|
|
24
|
+
**是的,但有两个关键区别:**
|
|
25
|
+
|
|
26
|
+
1. **范围**:最近打开列表只记你**点开过**的文件;Knit 扫**整个项目文件夹**。
|
|
27
|
+
重启 DSH、新开会话、跨天回来,它都还在。
|
|
28
|
+
2. **排序**:它按时间排;Knit 按**你正在聊什么**排。
|
|
29
|
+
|
|
30
|
+
三句话说完它是什么:
|
|
31
|
+
|
|
32
|
+
1. 扫**整个项目文件夹**的 Markdown,不只是这一轮生成的那几篇 —— 重启、换会话、跨天都还在
|
|
33
|
+
2. 排序**跟着你正在聊什么走**:聊架构,架构文档浮上来;聊竞品,竞品分析浮上来
|
|
34
|
+
3. **不调模型、不联网**:全是本地字符串运算,零延迟、零成本、文档不出本机
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 「相关」是怎么算出来的
|
|
39
|
+
|
|
40
|
+
没有玄学,就是字符串运算。三步:
|
|
41
|
+
|
|
42
|
+
**1. 读当前会话。** 取最近 6 条用户 / 助手消息,只认真人输入的用户消息
|
|
43
|
+
(`agent.inject()` 塞进来的合成上下文不算,那会把话题带偏)。越新的消息权重越高:3 / 2 / 1 / 1 …
|
|
44
|
+
|
|
45
|
+
**2. 抽关键词。**
|
|
46
|
+
|
|
47
|
+
- **英文词**:取值很高,出现 1 次就要(`chokidar`、`mtime` 这种精确词)
|
|
48
|
+
- **中文 2/3-gram**:出现 2 次,或出现在最新那条消息里
|
|
49
|
+
- 虚词表过滤 + 贪心去重叠(选了「相关性排序」就不再算「相关性」和「排序」)
|
|
50
|
+
|
|
51
|
+
**3. 给文档打分。** 每个词对每篇文档算加权命中:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
标题 ×4 + 摘要 ×2 + 正文前 2500 字 ×1
|
|
55
|
+
单个词命中数封顶 6 次(防止长文档堆词刷分)
|
|
56
|
+
再叠 10% 的时间新鲜度微调(主排序仍是相关性)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
全是字符串运算 —— **没有 embedding,没有模型调用**。
|
|
60
|
+
|
|
61
|
+
**并且老实说边界**:对话只有一两句时关键词太少,它会退回按修改时间排,
|
|
62
|
+
并在面板上说明这一点 —— 不假装排了个序。
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 安装
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
dsh plugin --profile web add dsh-knit
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
装完**重启 DSH**,然后硬刷新浏览器(`Cmd + Shift + R`)。
|
|
73
|
+
|
|
74
|
+
**怎么打开:**
|
|
75
|
+
|
|
76
|
+
- **会话头部右侧的 Knit 图标按钮**(就在右侧栏展开按钮旁边)—— 一键开面板
|
|
77
|
+
- 或右侧栏 tab 条上的「+」→「Knit 最近文档」
|
|
78
|
+
|
|
79
|
+
**可选**:装了 `dsh-better-sidebar` 的话,面板也会注册成它的一个 tab;
|
|
80
|
+
没装不受影响,两边是各自独立的可选依赖。
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 功能
|
|
85
|
+
|
|
86
|
+
| 能力 | |
|
|
87
|
+
|---|---|
|
|
88
|
+
| **按当前对话相关性排序**(纯本地关键词匹配,零模型) | ✅ |
|
|
89
|
+
| 相关性 / 修改时间双模式一键切换(偏好记在 localStorage) | ✅ |
|
|
90
|
+
| 扫描会话工作区里的 `.md`(递归,深度 ≤ 6,跳过 `node_modules` / `.git` / `dist`) | ✅ |
|
|
91
|
+
| 每项显示:H1 标题(无则文件名)+ 相对时间 + 首段摘要 | ✅ |
|
|
92
|
+
| 单击就地展开预览,再点收起 | ✅ |
|
|
93
|
+
| 相对路径图片真正渲染(`./img/a.png`、`../assets/b.png`) | ✅ |
|
|
94
|
+
| 预览面板可拖高度(20%–80%,位置记住)、可全屏,`Esc` 退出 | ✅ |
|
|
95
|
+
| 双击在新标签页打开 | ✅ |
|
|
96
|
+
| 过滤框:按标题 / 摘要 / 路径实时过滤 | ✅ |
|
|
97
|
+
| 键盘导航:`↑` `↓` 移动即预览 / `Enter` 切换 / `Esc` 收起 | ✅ |
|
|
98
|
+
| 每 5 秒自动刷新 + 手动刷新;2 分钟内改动过的文档打 🆕 | ✅ |
|
|
99
|
+
| 中英双语,跟随 DSH 语言实时切换(不用重载插件) | ✅ |
|
|
100
|
+
| 零模型调用、零网络出口 | ✅ |
|
|
101
|
+
|
|
102
|
+
> 相关度**不做可视化**(不显示百分比、不画长条)—— 排序本身就是答案,名次即相关度。
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 它读什么,不读什么
|
|
107
|
+
|
|
108
|
+
- 只读**当前会话工作区内**的 `.md` 文件(路径越出工作区一律拒绝)
|
|
109
|
+
- 只读**当前会话**的对话事件(用来排序)
|
|
110
|
+
- **不发起任何对外网络请求**:客户端只有两处 `fetch`,都指向插件自己的同源路由
|
|
111
|
+
- **没有安装期脚本**(无 `install` / `postinstall`)
|
|
112
|
+
- **零依赖** —— 装完不需要构建授权,也没有构建步骤
|
|
113
|
+
- 按路径读文件的接口只放行**图片扩展名白名单**,响应带 `nosniff` 与 `default-src 'none'; sandbox`
|
|
114
|
+
|
|
115
|
+
面板里那份「相关度」只影响排序,**不显示也不外传**。
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 已知限制
|
|
120
|
+
|
|
121
|
+
- **对话太短时排序会退化**:只有一两句时关键词不足,退回按修改时间,并在面板上说明
|
|
122
|
+
- **中文分词是 n-gram 近似**:没有引入分词库(那会带来依赖),效果够用但不算精细
|
|
123
|
+
- **右侧栏默认页会变成 guide**:DSH 的规则是「guide 入口只有一个才直接开那一页」,
|
|
124
|
+
内置 Files 占了一个,所以展开右侧栏先看到 guide,需要点一下胶囊
|
|
125
|
+
- **只扫 Markdown**:`.md` 以外的格式不进来
|
|
126
|
+
- **右侧栏状态是 memory-only**:刷新或新会话会回到收起状态
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 开发
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
git clone https://github.com/PolinniZhong/dsh-knit.git
|
|
134
|
+
cd dsh-knit
|
|
135
|
+
|
|
136
|
+
npm test # 105 项,零依赖,不需要先 npm install
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**改动生效方式**:宿主半边(`src/host/`)改了**必须重启 DSH**(实测不热加载);
|
|
140
|
+
客户端半边(`src/client/`)改了硬刷新浏览器即可。
|
|
141
|
+
|
|
142
|
+
**没有构建步骤**:客户端半边是手写的 `window.__ModuleLoader__.load({...})`,
|
|
143
|
+
用 `React.createElement` 而不是 JSX,所以不需要 tsdown / tsc。
|
|
144
|
+
静态资源也是内联的 —— 改图标要同时改 `assets/` 源文件和 `src/client/client.js` 里的
|
|
145
|
+
`KNIT_ICON_PATH`,`test/icon.test.mjs` 会核对两者逐字一致。
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
knit/
|
|
149
|
+
├── package.json # dsh.bundle.patch + dsh.client
|
|
150
|
+
├── cordis.patch.yml # 挂进 plugin tree 的 insert 行
|
|
151
|
+
├── assets/ # 图标源文件(path 已内联进 client.js)
|
|
152
|
+
├── src/
|
|
153
|
+
│ ├── host/index.js # /knit/api/recent · /doc · /raw
|
|
154
|
+
│ ├── host/relevance.js # 相关性引擎(纯函数)
|
|
155
|
+
│ └── client/client.js # 双宿主注册 + 面板 UI
|
|
156
|
+
└── test/ # 105 项测试
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
细节和取舍写在源码注释里;贡献流程见 [CONTRIBUTING.md](CONTRIBUTING.md),
|
|
160
|
+
版本变更见 [CHANGELOG.md](CHANGELOG.md)。
|
|
161
|
+
|
|
162
|
+
> 版本策略:`0.x` 表示功能还在动,可能有破坏性变更。
|
|
163
|
+
> `1.0.0` 留给「真实留存被验证之后」,不因为功能做完就发。
|
|
164
|
+
|
|
165
|
+
## 协议
|
|
166
|
+
|
|
167
|
+
[MIT](LICENSE) © Polinni
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 100" fill="none" stroke="currentColor" stroke-width="16.67" stroke-linecap="round" stroke-linejoin="round"><path d="M78.73 31.92L78.44 31.53L78.12 31.16L77.79 30.80L77.44 30.45L77.07 30.11L76.69 29.79L76.30 29.48L75.89 29.19L75.46 28.91L75.02 28.64L74.57 28.39L74.10 28.16L73.62 27.94L73.13 27.74L72.62 27.55L72.11 27.38L71.58 27.23L71.04 27.09L70.49 26.97L69.93 26.87L69.36 26.79L68.78 26.72L68.20 26.67L67.60 26.64L67.00 26.63L66.39 26.63L65.78 26.65L65.16 26.70L64.53 26.76L63.90 26.83L63.26 26.93L62.62 27.05L61.98 27.18L61.33 27.33L60.68 27.50L60.03 27.69L59.38 27.90L58.73 28.13L58.08 28.37L57.43 28.64L56.78 28.92L56.13 29.21L55.48 29.53L54.83 29.86L54.19 30.22L53.55 30.58L52.91 30.97L52.28 31.37L51.66 31.79L51.04 32.23L50.42 32.68L49.82 33.14L49.21 33.63L48.62 34.12L48.03 34.64L47.46 35.16L46.89 35.71L46.33 36.26L45.78 36.83L45.23 37.41L44.70 38.01L44.18 38.61L43.68 39.23L43.18 39.86L42.69 40.51M51.45 83.91L51.94 83.83L52.42 83.74L52.90 83.63L53.37 83.49L53.84 83.34L54.31 83.16L54.77 82.97L55.23 82.75L55.68 82.52L56.13 82.26L56.57 81.99L57.01 81.69L57.43 81.38L57.85 81.05L58.26 80.70L58.67 80.33L59.06 79.94L59.45 79.54L59.82 79.12L60.19 78.68L60.54 78.22L60.88 77.75L61.21 77.26L61.54 76.76L61.84 76.24L62.14 75.70L62.42 75.15L62.69 74.59L62.95 74.01L63.19 73.42L63.42 72.82L63.64 72.20L63.84 71.57L64.02 70.93L64.19 70.28L64.35 69.62L64.49 68.95L64.62 68.27L64.73 67.58L64.82 66.88L64.90 66.17L64.96 65.46L65.00 64.74L65.03 64.01L65.04 63.27L65.04 62.54L65.01 61.79L64.98 61.04L64.92 60.29L64.85 59.53L64.76 58.77L64.65 58.01L64.53 57.25L64.39 56.49L64.23 55.72L64.06 54.96L63.87 54.20L63.66 53.43L63.44 52.67L63.20 51.91L62.95 51.16L62.68 50.41L62.39 49.66L62.09 48.91L61.77 48.17M19.85 34.46L19.68 34.91L19.52 35.38L19.39 35.85L19.27 36.33L19.18 36.82L19.10 37.32L19.05 37.82L19.01 38.32L19.00 38.84L19.00 39.35L19.02 39.87L19.07 40.40L19.13 40.92L19.22 41.45L19.32 41.99L19.44 42.52L19.59 43.05L19.75 43.59L19.94 44.13L20.14 44.66L20.37 45.19L20.61 45.73L20.87 46.26L21.16 46.79L21.46 47.31L21.78 47.84L22.12 48.35L22.48 48.87L22.86 49.38L23.25 49.88L23.67 50.38L24.10 50.87L24.55 51.36L25.02 51.84L25.50 52.31L26.00 52.77L26.52 53.23L27.05 53.67L27.60 54.11L28.16 54.53L28.74 54.95L29.33 55.36L29.94 55.75L30.56 56.14L31.20 56.51L31.84 56.87L32.50 57.22L33.17 57.56L33.86 57.88L34.55 58.19L35.26 58.49L35.97 58.78L36.70 59.05L37.43 59.30L38.17 59.54L38.93 59.77L39.68 59.98L40.45 60.18L41.22 60.36L42.00 60.53L42.79 60.68L43.57 60.82L44.37 60.94L45.16 61.04"/></svg>
|
package/cordis.patch.yml
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-knit",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Knit — recent Markdown documents in the DSH sidebar, sorted by relevance to the current conversation. Zero model calls.",
|
|
6
|
+
"main": "./src/host/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/host/index.js",
|
|
9
|
+
"./client": "./src/client/client.js",
|
|
10
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"assets",
|
|
15
|
+
"src",
|
|
16
|
+
"test",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node --test test/host.test.mjs test/client.test.mjs test/tier1.test.mjs test/entry.test.mjs test/i18n.test.mjs test/icon.test.mjs"
|
|
23
|
+
},
|
|
24
|
+
"dsh": {
|
|
25
|
+
"bundle": {
|
|
26
|
+
"patch": "./cordis.patch.yml"
|
|
27
|
+
},
|
|
28
|
+
"client": {
|
|
29
|
+
"platform": "web",
|
|
30
|
+
"inject": [
|
|
31
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=22.19"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"dsh-plugin",
|
|
40
|
+
"deepseek-harness",
|
|
41
|
+
"dsh",
|
|
42
|
+
"markdown",
|
|
43
|
+
"documents",
|
|
44
|
+
"sidebar",
|
|
45
|
+
"right-sidebar",
|
|
46
|
+
"recent-files",
|
|
47
|
+
"relevance",
|
|
48
|
+
"knowledge-base",
|
|
49
|
+
"最近文档",
|
|
50
|
+
"侧边栏",
|
|
51
|
+
"知识管理"
|
|
52
|
+
],
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/PolinniZhong/dsh-knit.git"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/PolinniZhong/dsh-knit",
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/PolinniZhong/dsh-knit/issues"
|
|
60
|
+
},
|
|
61
|
+
"author": "Polinni",
|
|
62
|
+
"license": "MIT"
|
|
63
|
+
}
|