feat: 支持对话与设置页单图编辑

This commit is contained in:
cneicy committed 2026-10-05 04:21:45 +08:00
1 parent 7e2ec28b80
commit 99e087112b
8 files changed
+361 -30

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ This skill adapts the copied OpenAI imagegen skill's prompt guidance to the DSH
2. The user must select the exact model, either in their request or explicitly as the default in Settings → 生图. If neither is set, ask which model to use. Never silently choose another model or fall back after an error.
3. Call `imagegen_generate` with the exact `model`, a clear `prompt`, and only the optional parameters that the user needs. This plugin uses the configured OpenAI-compatible Images API. Do not run the vendored CLI to bypass its configuration.
4. Generated images are returned as durable image attachments and saved as original files. Show the images and mention the model and saved paths. Use `present` when a separate downloadable deliverable is useful.
5. This tool generates new images. It does not currently accept edit targets or masks. Do not claim to have edited a supplied image with text-only generation.
5. For editing an existing image, use `imagegen_edit` with `image_path`, `model`, and `prompt`. `image_path` must be an existing absolute host path to the user-selected image (use the provided host path for a chat attachment, or a previous result's saved path; never guess it). Only PNG/JPEG/WebP up to 20 MiB are accepted. This sends the actual image bytes to `/images/edits`; never substitute text-only generation for editing. State the requested changes and explicitly list what must remain unchanged. Results are saved separately; the input is never overwritten. No masks or multiple input images are supported yet. If no usable source path is available, ask the user to attach the image.
## Prompt guidance reused from imagegen