pi-better-openai 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/src/image.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-openai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Personal pi extension that improves OpenAI with fast mode, usage stats, and footer polish.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fast",
|
|
@@ -34,14 +34,15 @@
|
|
|
34
34
|
"format:check": "oxfmt --check .",
|
|
35
35
|
"lint": "oxlint --deny-warnings .",
|
|
36
36
|
"lint:fix": "oxlint --fix .",
|
|
37
|
-
"test": "
|
|
37
|
+
"test": "vitest run",
|
|
38
38
|
"typecheck": "tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.6.0",
|
|
42
42
|
"oxfmt": "^0.47.0",
|
|
43
43
|
"oxlint": "^1.62.0",
|
|
44
|
-
"typescript": "^6.0.3"
|
|
44
|
+
"typescript": "^6.0.3",
|
|
45
|
+
"vitest": "^4.1.5"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"@mariozechner/pi-coding-agent": ">=0.57.0",
|
package/src/image.ts
CHANGED
|
@@ -497,7 +497,7 @@ function resolveToolPrompt(params: ToolParams, ctx: ExtensionContext): string {
|
|
|
497
497
|
|
|
498
498
|
function resultText(result: CodexImageResult): string {
|
|
499
499
|
const parts = [
|
|
500
|
-
`Generated image via openai-codex/${result.model}.`,
|
|
500
|
+
`Generated image using OpenAI image_generation tool via openai-codex/${result.model}.`,
|
|
501
501
|
`Action: ${result.action}.`,
|
|
502
502
|
`Prompt: ${result.prompt}`,
|
|
503
503
|
];
|
|
@@ -649,7 +649,12 @@ export function registerOpenAIImage(
|
|
|
649
649
|
const model = resolveModel(params, ctx, cfg);
|
|
650
650
|
const requestParams = { ...params, prompt: resolveToolPrompt(params, ctx) };
|
|
651
651
|
onUpdate?.({
|
|
652
|
-
content: [
|
|
652
|
+
content: [
|
|
653
|
+
{
|
|
654
|
+
type: "text",
|
|
655
|
+
text: `Requesting OpenAI image_generation via openai-codex/${model}...`,
|
|
656
|
+
},
|
|
657
|
+
],
|
|
653
658
|
details: undefined,
|
|
654
659
|
});
|
|
655
660
|
const result = await generate(requestParams, ctx, signal);
|