Repository navigation
feat(notes): suggest links to the topics and named things a note mentions - #140
Merged
Merged
Conversation
…ions A note lists what its text names but doesn't link yet: the namespace's topics by any label, and its people, organisations and other named things by name or alias. One click adds the link. The assistant sees the same list as could_link when it reads a note. No model is asked. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
Owner
Author
|
The Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before: a note that mentioned "Ada Lovelace" or "capsids" in plain text wasn't connected to that person or topic unless someone typed an @ or # link.
After: under the editor, a note suggests links to what it names but doesn't link yet: the namespace's topics, matched by any of their labels, and its people, organisations, places and other named things, matched by name or alias. One click adds the link and the note joins the graph. The assistant sees the same list as
could_linkwhen it reads a note, so it can link its own notes.Motivation and Context
Notes module: "self-organised by the AI ... ontology-based organisation". No model is asked: the matcher compares the namespace's own vocabulary with the note's words, using
topics._vocabandanalyze.ent_key. Dates and numbers are never suggested. A single word only matches when it's written with a capital, which keeps common words out. New route:GET /api/v1/notes/{id}/suggestions.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Checked locally: notes tests pass, along with ruff, tsc and eslint. The OpenAPI client was regenerated. The full backend suite is running.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
Generated by Claude Code