@astrofoundry/pi-astro 0.6.1 → 0.6.4
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.
|
@@ -214,9 +214,9 @@ describe("gemini-image extension", () => {
|
|
|
214
214
|
await tool.execute("t", { prompt: "x" }, undefined, undefined, ctx);
|
|
215
215
|
// Two input calls: one for 2K tweak, one empty confirm
|
|
216
216
|
expect(ctx.ui.input).toHaveBeenCalledTimes(2);
|
|
217
|
-
// The second input's
|
|
218
|
-
const
|
|
219
|
-
expect(
|
|
217
|
+
// The second input's title should mention 2K (preview merged into title)
|
|
218
|
+
const secondTitle = ctx.ui.input.mock.calls[1][0] as string;
|
|
219
|
+
expect(secondTitle).toContain("2K");
|
|
220
220
|
});
|
|
221
221
|
|
|
222
222
|
it("review loop: tweak 'use imagen ultra, 16:9, 3 images' + empty confirms and calls Imagen", async () => {
|
|
@@ -235,7 +235,7 @@ function renderPreview(model: ImageModel, p: Params, estimate: { estimatedUsd: n
|
|
|
235
235
|
const nImages = isImagen(model) ? p.number_of_images ?? 1 : 1;
|
|
236
236
|
const lines: string[] = [];
|
|
237
237
|
lines.push(`Model: ${model}`);
|
|
238
|
-
lines.push(`Prompt: "${p.prompt
|
|
238
|
+
lines.push(`Prompt: "${p.prompt}"`);
|
|
239
239
|
if (p.image_size) lines.push(`Size: ${p.image_size}`);
|
|
240
240
|
if (p.aspect_ratio) lines.push(`Aspect ratio: ${p.aspect_ratio}`);
|
|
241
241
|
lines.push(`Images: ${nImages}`);
|
|
@@ -263,10 +263,8 @@ async function reviewAndConfirm(
|
|
|
263
263
|
: { estimatedUsd: 0, breakdown: "unknown pricing" };
|
|
264
264
|
|
|
265
265
|
const preview = renderPreview(model, current, est);
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
preview,
|
|
269
|
-
);
|
|
266
|
+
const title = `Review · ${preview}\n\nEnter to confirm, type changes (e.g. "2K", "16:9", "imagen ultra", "prompt: ..."), or "cancel".`;
|
|
267
|
+
const input = await ctx.ui.input(title);
|
|
270
268
|
if (input === undefined) {
|
|
271
269
|
throw new Error("User cancelled image generation.");
|
|
272
270
|
}
|