Fix the entity search by reversing includes call - #2808
Conversation
…ng URIs, incl. data URIs)
- Replace Jest dependencies with Vitest and @vitest/coverage-v8 - Update test scripts to use 'vitest run --coverage' - Create vitest.config.ts for both servers with node environment and coverage settings - Update all test files: - Change imports from '@jest/globals' to 'vitest' - Replace jest.mock() with vi.mock() - Replace jest.fn() with vi.fn() - Update mock clearing/restoring to use vi methods - Remove jest.config.cjs files - All 151 tests passing (24 in sequentialthinking, 127 in filesystem) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This PR adds the Zettelkasten to the community servers list. Comprehensive AI-powered knowledge management system that implements the proven Zettelkasten (slip-box) method with modern AI assistance. - **Atomic Note Management**: Create, organize, and connect atomic ideas - **AI-Powered Workflows**: CEQRC process for enhanced learning - **Full-Text Search**: SQLite FTS5 with advanced query syntax - **Intelligent Linking**: AI-suggested connections between notes - **Multiple Interfaces**: CLI, REST API, Streamlit UI, and MCP server - **Comprehensive Documentation**: Setup guides and examples included - **Transport**: STDIO - **Tools**: 7 comprehensive tools for note management and AI workflows - **Dependencies**: OpenAI API (optional, has stub mode) - **Python**: 3.11+ with modern async/await patterns - **Setup**: Automated setup script with Claude Desktop config generation - **URL**: https://github.com/joshylchen/zettelkasten - **License**: MIT - **Documentation**: Complete setup guide in `docs/MCP_SETUP.md` - **Tests**: Comprehensive test coverage included This server demonstrates sophisticated MCP patterns and provides real value for knowledge workers and researchers using AI assistants.
domdomegg
left a comment
There was a problem hiding this comment.
Thanks for the PR! It seems like there's a lot of other changes on this branch which makes it hard to review and not possible to merge. Can you check what's going on here? Thanks!
|
Thanks for looking into this! I took a closer look and I believe the original search logic is actually correct. The current code on main: e.name.toLowerCase().includes(query.toLowerCase())This means: "does the entity name contain the search query?" — so searching for The proposed change: query.toLowerCase().includes(e.name)This inverts the semantics to: "does the search query contain the entity name?" — so searching for There's also a secondary issue: Additionally, the PR includes a number of unrelated changes ( Closing on that basis. If you're still seeing a search bug, could you open a new issue with a specific reproduction case? We'd be happy to look into it. (Triaged with help from Claude Code.) |
In main, entity search was broken, the "includes" call on line 151 should have called the method on the query with the argument of the entityName, not the reverse
From the javascript docs:
Server Details
Motivation and Context
bugfix
How Has This Been Tested?
Yes, tested on Claude Desktop only. "what do you know about elmo", fix is only
Breaking Changes
No, just fixes the "search_nodes" tool call
Types of changes
Checklist
Additional context
Just a bug fix