← Catalog

pi-zh-slash

Chinese slash commands for Pi: type 、设置 instead of /settings. Aliases, IME, and autocomplete without switching input source.

Extension

Install

Install with PiG

pig install npm:pi-zh-slash

Install with Pi

pi install npm:pi-zh-slash
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

pi-zh-slash

中文输入法下用顿号「、」打 Pi 命令,不必切到英文再敲 /。

、设置 → /settings,补全列表显示「设置(settings)」。

这不是界面汉化。已有 @muzi3/type-easier 把「、」当成「/」去补英文命令名;本包加上中文别名、IME 整块上屏、空格定形和回车兜底。不要和 type-easier 同时安装。

安装

pi install npm:pi-zh-slash

或:

pi install git:github.com/fujingzhai/pi-zh-slash

装完 /reload 或新开会话。

用法

行首输入顿号:

、设置          →  /settings
、模型 sonnet   →  /model sonnet
、名            →  /name     (「命名」比「自动命名」更短,不会误中)
  • 补全列表显示「中文(英文)」。选中后按回车直接执行;要先填入命令再加参数,可按 Tab
  • 、名 后按空格会立刻变成 /name ,随后参数候选与原生 / 相同
  • 输入法一次性上屏「、设置」也会弹出补全
  • 列表未开直接回车时,整句 、名 参数 会改写成 /name 参数
  • skill 命令保持英文,不造中文别名

已有别的扩展接管了编辑器时,本包只包装补全、不再换编辑器。顿号补全仍可用,但空格定形、IME 兜底和一次回车执行取决于编辑器。

自定义别名

编辑 ~/.pi/agent/pi-zh-slash.aliases.json,只追加、不覆盖内置表:

{
  "web-tools": ["联网", "搜索"]
}

改完 /reload。例子见仓库里的 aliases.example.json。

内置别名

命令中文
settings设置
model模型
tree会话树、树
thinking思考
scoped-models模型范围
export / import / share / copy导出 / 导入 / 分享 / 复制
name命名
session会话
changelog更新日志
hotkeys快捷键、热键
fork / clone分叉 / 克隆
trust信任
login / logout登录 / 登出
new新会话、新建
compact压缩
resume恢复
reload重载、刷新
quit退出
clear清空、清除
exit退出程序、结束
outline大纲
usage用量、额度、余额

后四条是常见社区扩展;没装对应扩展时不会出现在补全里。

开发

npm test

本地试跑:

pi -e ./extensions/index.ts