xl0-pi-lovely-codex

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

@xl0/pi-lovely-codex

GPT "Fast mode" control and Codex-style apply_patch tool.

Install

pi install npm:@xl0/pi-lovely-codex

Use without install:

pi -e npm:@xl0/pi-lovely-codex

/lovely-codex

Lovely codex settings

GPT fast mode 🏎️

  • default -> omit service_tier - default mode
  • fast -> send service_tier: "priority" for openai and openai-codex - request fast mode on OpenAI API and Codex sub.
  • fast-codex -> send priority only for openai-codex - request fast mode on Codex sub only.

Applies only to provider openai or openai-codex, model id starting with gpt-. Fast mode shows 🏎️ in status line.

apply_patch tool

GPT models have been relentlessly fine-tuned to use the apply_patch tool in Codex. They can use the default Pi edit tool of course, but often make silly mistakes that might be just muscle memory from being trained on apply_patch for the edit task.

This extension adds the tool GPT models crave so much.

Note: Current apply_patch implementation shells out to codex --codex-run-as-apply-patch. You need to have codex installed and available on PATH.

add apply_patch controls whether Lovely Codex enables the apply_patch tool:

  • on -> always add the apply_patch tool.
  • off -> don't add the apply_patch tool.
  • gpt-only -> enable apply_patch only when current model id starts with gpt- or contains /gpt-.

Optionally, you can disable the now redundant built-in tools while apply_patch is active:

  • disable write
  • disable edit

When apply_patch becomes inactive, write/edit are restored only if they were active at session start.

Default effective values: add apply_patch = gpt-only, disable write = off, disable edit = off.

Config scopes:

  • User: ~/.pi/agent/xl0-pi-lovely-codex.json
  • Workspace: <cwd>/.pi/xl0-pi-lovely-codex.json

Workspace overrides User. All keys are optional.

Related projects

Pi Lovely Web web_search, web_fetch, web_image tools
Pi Lovely Dev Tools interactive debugging helpers /tool, /show-sysprompt, /show-context, /llm-stats
Pi Lovely IDE IDE integration
Pi Lovely Config scoped config helpers for Pi extensions
Pi Lovely Comment open the last assistant message in your editor and sync edits back into the prompt
Pi Lovely Rename automatic and manual session naming

Like this work? Hire me