@muzi3/fuzzy-selector
pi 终端 UI 可复用的 fzf 风格模糊选择器组件(供其他扩展 import 的库)
Package details
Install @muzi3/fuzzy-selector from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@muzi3/fuzzy-selector- Package
@muzi3/fuzzy-selector- Version
0.1.0- Published
- Aug 25, 2026
- Downloads
- 135/mo · 135/wk
- Author
- muzi3
- License
- MIT
- Types
- extension
- Size
- 9.3 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@muzi3/fuzzy-selector
pi 终端 UI 可复用的 fzf 风格模糊选择器组件(库)。
本身不注册任何命令/事件,只导出 createFuzzySelector 工厂函数,供其他扩展在 ctx.ui.custom() 里使用。
安装
pi install npm:@muzi3/fuzzy-selector
给其他扩展复用
import { createFuzzySelector } from "@muzi3/fuzzy-selector";
const selected = await ctx.ui.custom(
(tui, theme, keybindings, done) =>
createFuzzySelector({
items: myItems,
getText: (item) => item.searchText,
getLabel: (item) => item.label,
title: "Pick one",
theme, keybindings, done,
}),
{ overlay: true, overlayOptions: { width: "80%", anchor: "center" } },
);
License
MIT