mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
12e8764a9c
## Why Standalone image generation returns image bytes to the model, but the model also needs the host artifact path to reference the generated file in follow-up work. ## What changed - Append the default saved-image path hint alongside the generated image tool output. - Reuse the existing core image-generation hint text. - Pass the thread ID and Codex home directory needed to compute the artifact path. - Add app-server and extension coverage for the model-visible hint. ## Validation - `just fmt` - `just bazel-lock-check` - `just test -p codex-app-server standalone_image_generation_returns_saved_path_hint_to_model`
13 lines
1.1 KiB
Markdown
13 lines
1.1 KiB
Markdown
The `image_gen.imagegen` tool enables image generation from descriptions and editing of existing images based on specific instructions. Use it when:
|
|
|
|
- The user requests an image based on a scene description, such as a diagram, portrait, comic, meme, or any other visual.
|
|
- The user wants to modify an attached or previously generated image with specific changes, including adding or removing elements, altering colors, improving quality/resolution, or transforming the style (e.g., cartoon, oil painting).
|
|
|
|
Guidelines:
|
|
- In code mode, pass the result to `generatedImage(result)`.
|
|
- Set `action` to `generate` when the user asks for a brand new image.
|
|
- Set `action` to `edit` when the user asks to modify an existing image from the conversation history.
|
|
- Directly generate the image without reconfirmation or clarification.
|
|
- After each image generation, do not mention anything related to download. Do not summarize the image. Do not ask followup question. Do not say ANYTHING after you generate an image.
|
|
- Always use this tool for image editing unless the user explicitly requests otherwise. Do not use the `python` tool for image editing unless specifically instructed.
|