A pi coding agent extension package that translates user input before it is sent to the agent.
pi-konjac uses Firefox Translations / Bergamot models through @browsermt/bergamot-translator.
- Translates pi
inputevents before agent processing. - Defaults to
ja->en [base-memory]. - Lets you choose any Bergamot registry model pair and architecture from
/konjac.
Install from npm:
pi install npm:pi-konjacInstall from GitHub:
pi install https://github.com/oshiteku/pi-konjac- Inputs from other extensions are not translated.
- Slash commands are not translated.
- If the source language is
en, non-empty normal text is translated. - If the source language is not
en, only inputs containing non-ASCII text are translated. This prevents commands and paths likenpm test,PATCH /api/users, andsrc/auth.tsfrom being altered. - Empty translation results, or results identical to the input, are passed through unchanged.
Defaults:
~/.pi/agent/pi-konjac/settings.json
~/.pi/agent/cache/pi-konjac/models/
Environment overrides:
PI_KONJAC_HOME=/path/to/configPI_KONJAC_CACHE_DIR=/path/to/cachePI_CODING_AGENT_DIR=/path/to/agent
pnpm install
pnpm check
pnpm translate -- "ログイン処理を確認してください。"Try another model:
pnpm translate -- --from en --to zh --architecture base-memory "Please check the login process."MPL-2.0. See LICENSE.
pi-konjac uses @browsermt/bergamot-translator and follows parts of its Node.js worker/model-loading patterns.