pi-ghost-autocomplete0.20.1
Inline ghost-text autocomplete extension for the Pi coding agent (pi.dev). Cloud and local LLM providers, zero-flicker rendering, no popup interference.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-ghost-autocomplete
English | Deutsch | Français | Español | 中文 | 日本語 | Português | Italiano | Русский
Pi 编程助手(@earendil-works/pi-coding-agent)的行内幽灵文本自动补全。
当你在 Pi 提示符中输入时,LLM 会预测当前行最可能的续写,并在光标右侧 以灰色"幽灵文本"显示。按右箭头接受。
多语言支持(Session 52):Unicode 感知的分词处理中文、日文、韩文 脚本,以及德语变音符号和法语重音。基于寄存器的路由确保散文以原始 语言补全,而不会被重新定义为编程指令。
快速开始
1. 获取 Mercury Edit 2 API 密钥
export INCEPTION_API_KEY="你的密钥"
2. 安装扩展
pi install npm:pi-ghost-autocomplete
3. 启动 Pi
pi
配置
| 变量 | 默认值 | 效果 |
|---|---|---|
PI_GHOST_DISABLED |
未设置 | 设为 1 禁用 |
PI_GHOST_PROVIDER |
Mercury Edit 2 | cloud、local 或 router |
INCEPTION_API_KEY |
— | API 密钥 |
PI_GHOST_CHAT_MAX_TOKENS |
256 |
聊天令牌上限 |
PI_GHOST_CHAT_TEMPERATURE |
0.75 |
聊天温度 |
完整配置参考请参阅英文 README。
寄存器路由
| 寄存器 | 分支 | 系统提示词 |
|---|---|---|
code |
FIM | 补全代码/命令/路径 |
agent-message |
聊天 | 「继续写给助手的消息」 |
general-prose |
聊天 | 「自然地续写文本,保持相同语言」 |
PI_GHOST_PROVIDER=router INCEPTION_API_KEY=你的密钥 pi ...
命令
| 命令 | 效果 |
|---|---|
/ghost |
显示配置 |
/ghost on |
本次会话启用 |
/ghost off |
本次会话禁用 |