feat(ai): add @oh-my-pi/pi-ai package with tool name prefixing
- Port pi-ai from upstream with Bun-first approach (source files, no dist) - Add cli_ prefix to tool names in OAuth mode to avoid collisions - Improve beta header handling with proper deduplication - Convert codex-instructions.md to Bun text embed - Strip .js extensions from all imports
This commit is contained in:
@@ -113,7 +113,7 @@ export default function (pi: ExtensionAPI) {
|
||||
**Use StringEnum for string parameters** (required for Google API compatibility):
|
||||
|
||||
```typescript
|
||||
import { StringEnum } from "@mariozechner/pi-ai";
|
||||
import { StringEnum } from "@oh-my-pi/pi-ai";
|
||||
|
||||
// Good
|
||||
action: StringEnum(["list", "add"] as const);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* correct for that point in history.
|
||||
*/
|
||||
|
||||
import { StringEnum } from "@mariozechner/pi-ai";
|
||||
import { StringEnum } from "@oh-my-pi/pi-ai";
|
||||
import type { ExtensionAPI, ExtensionContext, Theme } from "@oh-my-pi/pi-coding-agent";
|
||||
import { matchesKey, Text, truncateToWidth } from "@oh-my-pi/pi-tui";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
@@ -263,7 +263,7 @@ export default function (pi: ExtensionAPI) {
|
||||
return new Text(
|
||||
`${theme.fg("success", "✓ Added ") + theme.fg("accent", `#${added.id}`)} ${theme.fg("muted", added.text)}`,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user