Skip to content

feat(search): add fuzzy search helpers#136

Open
zhyui-1 wants to merge 1 commit into
floatboatai:mainfrom
zhyui-1:feat/search-fuzzy-utils
Open

feat(search): add fuzzy search helpers#136
zhyui-1 wants to merge 1 commit into
floatboatai:mainfrom
zhyui-1:feat/search-fuzzy-utils

Conversation

@zhyui-1

@zhyui-1 zhyui-1 commented Jul 7, 2026

Copy link
Copy Markdown

Summary / 摘要

Add fuzzy matching support to the search plugin headless helpers and document the plugin API.

Motivation / 背景与动机

  • Issue:
  • Roadmap (docs/ROADMAP.md): P2 mentions fuzzy search.
  • OpenSpec change: N/A - scoped search helper/API documentation update, no breaking change.

This improves the reusable search helper API without changing the CodeMirror search panel behavior.

Changes / 变更内容

  • packages/plugin-search:
    • Add SearchOptions.fuzzy for literal ordered-subsequence search.
    • Support fuzzy matching in findSearchMatches.
    • Support fuzzy replacement in replaceAllMatches.
    • Keep regexp behavior unchanged when regexp and fuzzy are both true.
    • Add tests for fuzzy, case-sensitive, whole-word, replace, and regexp precedence.
    • Add package README with usage examples and API notes.
  • root scripts:
    • Use corepack pnpm in workspace scripts so build/typecheck commands work consistently in environments where bare pnpm is not on PATH.

Testing / 测试

  • corepack pnpm vitest run packages/plugin-search/test/plugin-search.test.ts
  • corepack pnpm typecheck
  • corepack pnpm test
  • corepack pnpm build
  • corepack pnpm build:electron-demo

Compliance / 合规自检

  • CLA signed
  • AI disclosure: implemented with Codex assistance; changes were reviewed and validated locally.
  • New dependencies: none.
  • No build artifacts committed.
  • No secrets / .env / personal vault data committed.

Checklist / 自检清单

  • Title follows Conventional Commits.
  • Public API changes update package README / types.
  • Did not touch live-preview-table.ts.
  • New capability / breaking change -> OpenSpec proposal linked.
  • Change aligns with project scope.

Screenshots / Recordings

N/A - no visible UI changes.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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