dsh-plugin-wiki-tools 0.2.0 → 0.2.1
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/lib/search.js +3 -2
- package/package.json +1 -1
package/lib/search.js
CHANGED
|
@@ -45,7 +45,8 @@ export async function searchVault(root, { query, limit = 10 }) {
|
|
|
45
45
|
!META_FILENAMES.has(page.name.toLowerCase()) && !page.name.startsWith('_'))
|
|
46
46
|
const inbound = new Map(pages.map(page => [page.name, []]))
|
|
47
47
|
for (const page of searchable) {
|
|
48
|
-
|
|
48
|
+
// One inbound record per source page, however many times it links.
|
|
49
|
+
for (const target of new Set(page.links)) {
|
|
49
50
|
inbound.get(target)?.push(page.name)
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -68,7 +69,7 @@ export async function searchVault(root, { query, limit = 10 }) {
|
|
|
68
69
|
score,
|
|
69
70
|
snippets: matchLines(page.content, needle).slice(0, 2),
|
|
70
71
|
inbound: inbound.get(page.name) ?? [],
|
|
71
|
-
outbound: page.links.
|
|
72
|
+
outbound: new Set(page.links).size,
|
|
72
73
|
})
|
|
73
74
|
}
|
|
74
75
|
results.sort((left, right) => right.score - left.score || left.name.localeCompare(right.name))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-wiki-tools",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Native DeepSeek Harness tools for an Obsidian wiki vault: wiki_query, wiki_write, and wiki_lint implement the mechanical core (path routing, delta tracking, index/log bookkeeping, health checks) of the wiki skill suite.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|