v0.2.2 - Replace CLI Command with Knowledge Graph Integration
·
657 commits
to fix_content
since this release
π New Features
Replace CLI Command
Added intelligent text replacement functionality to the terraphim-tui CLI using knowledge graph thesaurus and Aho-Corasick pattern matching.
Usage:
# Replace npm with bun
terraphim-tui replace "npm"
# Replace with specific role
terraphim-tui replace "yarn install" --role "Engineer"
# Output as markdown links
terraphim-tui replace "pnpm" --format markdownFeatures:
- β Intelligent text replacement using knowledge graph synonyms
- β Aho-Corasick LeftmostLongest matching (longer patterns win)
- β Multiple output formats (PlainText, MarkdownLinks, WikiLinks, HTMLLinks)
- β Package manager migration support (npm/yarn/pnpm β bun)
- β Role-specific thesaurus support
- β Offline mode operation with dynamic thesaurus building
Implementation:
- Added Replace variant to Command enum in terraphim-tui
- Comprehensive test suite with 8 test scenarios
- Documentation updates across @memories.md, @scratchpad.md, @lessons-learned.md
- Knowledge graph integration with docs/src/kg/bun.md
π Bug Fixes
Clippy Warnings Resolution
- Fixed collapsible else-if in terraphim_server/build.rs
- Replaced bool assert_eq! with assert! in test files
- Fixed field reassignment with Default pattern
- Removed needless borrows for generic args
- Replaced len() > 0 with !is_empty() checks
All pre-commit checks passing β
π Documentation
- CLI implementation patterns documented in @lessons-learned.md
- LeftmostLongest matching strategy explained
- OpenDAL warnings documented (informational only)
- Complete architecture flow diagrams
π Links
- Commit: 0d83dca
- Branch: fix_content
- Files Changed: 12 files (+1844, -14)