Skip to content

Add tag semantic library for 0.5.0 - #2

Merged
Yuriyagn merged 3 commits into
mainfrom
agent/0.5.0-tag-semantics
Aug 2, 2026
Merged

Add tag semantic library for 0.5.0#2
Yuriyagn merged 3 commits into
mainfrom
agent/0.5.0-tag-semantics

Conversation

@Yuriyagn

@Yuriyagn Yuriyagn commented Aug 2, 2026

Copy link
Copy Markdown
Owner

What changed

  • Add a persistent tag semantic library derived from existing tag-to-note relationships.
  • Sample up to three recent notes per changed tag and generate cached meaning, usage conditions, and classification boundaries.
  • Reuse unchanged semantics through local fingerprints and support manual, daily, weekly, or monthly incremental refreshes.
  • Inject cached semantics into tag recommendation prompts for deeper, Vault-specific reasons.
  • Add a searchable semantic-library viewer, numeric recommendation count, and responsive tag-management actions.
  • Add Chinese and English documentation, a dedicated 0.5.0 release note, and three current screenshots.

Why

Short tag names do not capture how a user actually applies a tag in their own Vault. Recommendations previously matched mostly against tag text. This release learns those conventions once, persists the resulting summaries, and reuses them without rebuilding the library for every note.

User impact

The first explicit recommendation initializes the library if needed. Scheduled updates remain off by default. Refresh requests go directly to the configured OpenAI-compatible provider and send at most three titles and 800-character excerpts per changed tag. Sample text is not persisted.

Validation

  • 26 tests passed
  • 95.37% core-module line coverage
  • TypeScript type-check passed
  • Obsidian ESLint passed
  • Release metadata verification passed
  • Production build passed
  • npm audit: 0 vulnerabilities

@Yuriyagn
Yuriyagn marked this pull request as ready for review August 2, 2026 15:49
Copilot AI review requested due to automatic review settings August 2, 2026 15:49
@Yuriyagn
Yuriyagn merged commit 54088cd into main Aug 2, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a persistent “tag semantic library” that derives tag meaning/usage boundaries from real tagged-note samples, caches the results in plugin settings, and injects that cached context into tag recommendation prompts for more Vault-specific reasoning. It also updates UI, docs, tests, and release metadata for the 0.5.0 release.

Changes:

  • Add semantic-library data collection (sampled notes + fingerprints), persistence/normalization, and a searchable viewer modal.
  • Enhance the OpenAI-compatible client to request an exact tag count, retry once when too few valid tags are returned, and support semantic-library generation.
  • Update settings/UI, documentation, release notes, versions metadata, and CI/release workflows for 0.5.0.

Reviewed changes

Copilot reviewed 19 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vitest.config.ts Adds semantic-library source file to coverage include list.
versions.json Adds version-to-minAppVersion mappings for 0.4.2 and 0.5.0.
tests/siliconflow.test.ts Expands client tests for exact-count prompting, retry behavior, and semantic context injection.
tests/semantic-library.test.ts Adds tests for evidence sampling/fingerprints and semantic-library normalization/context formatting.
styles.css Adds responsive layout improvements plus semantic-library modal styling.
src/tag-manager-modal.ts Adds a dedicated modal class for updated sizing/layout.
src/siliconflow.ts Adds semantic-context support, exact-count prompting + retry, and tag-semantics generation API.
src/settings.ts Adds semantic-library controls (view/update/schedule) and replaces the slider with a validated numeric input.
src/semantic-library.ts Introduces evidence collection, library normalization, and semantic-context formatting utilities.
src/semantic-library-modal.ts Adds a searchable modal UI to view cached tag semantics.
src/main.ts Integrates semantic-library lifecycle (init, manual update, scheduled refresh) and prompt injection.
README.md Documents semantic library behavior, privacy implications, and updated setup steps (CN).
README_EN.md Documents semantic library behavior, privacy implications, and updated setup steps (EN).
package.json Bumps package version to 0.5.0.
package-lock.json Updates lockfile version metadata for 0.5.0 and dependency graph changes.
manifest.json Bumps plugin version to 0.5.0 and sets minAppVersion to 1.5.0.
docs/releases/0.5.0.md Adds a dedicated 0.5.0 release note with screenshots and details.
CHANGELOG.md Adds changelog entries for 0.5.0 and 0.4.2.
.github/workflows/release.yml Updates actions versions and Node version used for releases.
.github/workflows/ci.yml Updates actions versions and Node version used for CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.ts
Comment on lines +161 to +164
const allowedCount = this.getAllowedTags().length;
const entryCount = Object.keys(this.settings.semanticLibrary).filter((tag) =>
this.getAllowedTags().includes(tag),
).length;
Comment thread src/semantic-library.ts
Comment on lines +142 to +145
const line = [
`- #${tag}`,
`内涵:${entry.meaning}`,
entry.useWhen ? `适用:${entry.useWhen}` : "",
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.

2 participants