Skip to content

Small fixes: remove redundant code and deduplicate defaults#30

Merged
twaugh merged 7 commits intomainfrom
small-fixes
Mar 17, 2026
Merged

Small fixes: remove redundant code and deduplicate defaults#30
twaugh merged 7 commits intomainfrom
small-fixes

Conversation

@twaugh
Copy link
Copy Markdown
Owner

@twaugh twaugh commented Mar 17, 2026

Summary

  • Remove duplicate evictEmbeddingCache function (identical to invalidateEmbeddingCache)
  • Remove redundant invalidateEmbeddingCache() call at end of indexBlocks (already called internally by putEmbeddings/deleteEmbeddings)
  • Derive settings defaults from schema instead of duplicating them in getSettings()
  • Extract syncGraphName helper to deduplicate graph name fetch pattern in main.ts

Test plan

  • All 56 tests pass after each individual commit
  • Production build succeeds

🤖 Generated with Claude Code

twaugh and others added 7 commits March 17, 2026 10:15
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
evictEmbeddingCache was identical to invalidateEmbeddingCache. Replace
all usages with invalidateEmbeddingCache and remove the duplicate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
putEmbeddings and deleteEmbeddings already call
invalidateEmbeddingCache internally, so the explicit call at the end
of indexBlocks was unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The default values for each setting were specified both in
settingsSchema and in getSettings(). Now getSettings() derives its
defaults from the schema, so each default is defined in one place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The getCurrentGraph/setGraphName pattern was repeated in both the
auto-index-on-load and graph-change handlers. Extract it into a
shared helper function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@twaugh twaugh merged commit 05c50f4 into main Mar 17, 2026
1 check passed
@twaugh twaugh deleted the small-fixes branch March 17, 2026 10:23
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