Skip to content

Improve [[ wiki-link ("@mention") autocomplete ranking to surface…#275

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 25, 2026
Merged

Improve [[ wiki-link ("@mention") autocomplete ranking to surface…#275
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Improve [[ wiki-link ("@mention") autocomplete ranking to surface the most relevant link targets first. The page you're editing and its link-graph neighbors (incoming and outgoing links) are now boosted, so opening the picker leads with the pages you're most likely to link to; docs under skill/tooling folders (.agents, .claude, .cursor) are deprioritized as knowledge-base noise (deprioritized, not hidden — a skill still appears when it's the best match). Both the WYSIWYG and the source-mode [[ pickers re-rank in lockstep. Ranking for the command palette, full-text, and MCP search is unchanged.

…(#2116)

* feat(open-knowledge): bias @mention autocomplete toward page context

The [[ wiki-link page picker now re-ranks suggestions by link-graph context: the page being edited and its incoming/outgoing link neighbors are boosted, and docs under skill/tooling folders (.agents, .claude, .cursor) are deprioritized as knowledge-base noise (demoted, not excluded). Applies to both the initial (empty-query) list and typed queries. Ranking is captured once per [[ session from /api/forward-links + /api/backlinks; failures degrade gracefully to no-context ordering. The shared workspace search (command palette, full-text, MCP) is untouched.

* fix(open-knowledge): drop unused loadWikiLinkContext export (knip)

* fix(open-knowledge): address local review on @mention ranking

- Extend context-aware [[ ranking to the source-mode (CodeMirror) picker so it stays in lockstep with WYSIWYG (threads docName through createNestedCMExtensions; TTL-cached link context). Restores the documented lockstep invariant in wiki-link-source.ts.
- Add tests for loadWikiLinkContext: outgoing/incoming merge, external-link exclusion, self-link dedupe (current-page boost vs neighbor boost), HTTP-error and malformed-body degradation; plus a >8-page test that pins the widened candidate window.
- Re-export loadWikiLinkContext (now consumed by source-mode + tests; resolves the prior knip unused-export).
- Log on !r.ok in the link fetchers so a 5xx is distinguishable from a linkless page; guard the (currently unreachable) allSettled context-rejection arm.
- Clarify the boost-magnitude comment (full sort key is lexical + fullText*20) and document that the skill-folder list is intentionally narrow (not the broad hidden-doc predicate).

GitOrigin-RevId: b58ecdb6673dc4370c69942c4091d2b884772b6e

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28195332834). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync
inkeep-oss-sync Bot merged commit 596686a into main Jun 25, 2026
2 checks passed
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch June 25, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant