Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,23 @@ git clone https://github.com/code-yeongyu/pi-apply-patch ~/.pi/agent/extensions/
cd ~/.pi/agent/extensions/pi-apply-patch && npm install

# 4. Dev / one-shot test
pi -e /path/to/pi-apply-patch/src/index.ts
pi -e /path/to/pi-apply-patch/index.ts
```

After installation, restart pi or run `/reload` inside an interactive session.

### Private provider configuration

The extension enables `openai` and `openai-codex` by default. To enable a private provider only on your machine, create `~/.pi/agent/pi-apply-patch.json`:

```json
{
"providers": ["openai", "openai-codex", "suda-mkt"]
}
```

The file is optional and is never part of the package or repository. Missing or invalid configuration falls back to the standard providers. Only models whose IDs start with `gpt-` activate `apply_patch`.

## Development

```bash
Expand All @@ -63,7 +75,7 @@ npm test
npm run typecheck
npm run check
npm pack --dry-run
pi -e ./src/index.ts
pi -e ./index.ts
```

The test suite uses vitest. TypeScript is strict, Node-only, and uses ESM imports with `.js` suffixes.
Expand Down
765 changes: 765 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./src/index.js";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"pi": {
"extensions": [
"./src/index.ts"
"./index.ts"
]
},
"scripts": {
Expand Down
Loading