Skip to content

The knowledge base says what each file holds, on mouse-over - #25

Merged
ddehilster merged 1 commit into
mainfrom
feat/kb-file-descriptions
Sep 18, 2026
Merged

ddehilster merged 1 commit into
mainfrom
feat/kb-file-descriptions

Conversation

@ddehilster

Copy link
Copy Markdown
Member

Hovering over a .dict or .kbb file in the Knowledge Base list now shows what the file holds, above its path. The description is the comment paragraph at the top of the file, the same rule the Knowledge Base view in the NLP++ extension for VS Code uses (kbView.ts fileDescription). Files under kb/user/ are listed by name only: colors.dict, not user/colors.dict.

@visualtext/analyzer-views 0.6.0

  • AnalyzerFile takes an optional description. <nlp-knowledge-base> shows it above the path on mouse-over, or just the path when there is none.
  • kbDescription(text) in /rules reads the opening # or /* */ comment paragraph. It stops at a bare # and skips a /* that sits alone on its line. It reads at most the first 4 KB and 8 lines.
  • kbLabel(path) gives the file's name in the list: the path with kb/user/ removed.

NLP Studio fills in description from the first 20 lines of each file already loaded in the editor, so a 10 MB .kbb is never read whole.

The admin console gets the new names once it moves to the 0.6.0 tgz. For the descriptions, it also has to send each file's head (or its description) with the file list. That will be a separate PR there.

Tests: analyzer-views 61 pass, studio 29 pass, and both type-check.

🤖 Generated with Claude Code

<nlp-knowledge-base> rows take a description -- the comment paragraph at
the top of the .dict or .kbb file, read by kbDescription() the way the
extension's KNOWLEDGE BASE view reads it -- and show it above the path.
Files under kb/user/ are named without the kb/user/ (kbLabel()).

NLP Studio fills the description from each file's first lines.
analyzer-views 0.6.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ddehilster
ddehilster merged commit ae5e135 into main Sep 18, 2026
2 checks passed
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