Skip to content

feat(web): add image generation model config to routing settings#82

Open
DivXPro wants to merge 33 commits into
qqqqqf-q:mainfrom
DivXPro:feat/imageGen4Desktop
Open

feat(web): add image generation model config to routing settings#82
DivXPro wants to merge 33 commits into
qqqqqf-q:mainfrom
DivXPro:feat/imageGen4Desktop

Conversation

@DivXPro

@DivXPro DivXPro commented May 25, 2026

Copy link
Copy Markdown
Contributor

Add ImageGenModelSettingControl to web routing settings page, using platform settings (image_generative.model) for persistence. Also increase image model test timeout from 15s to 60s to accommodate slower image generation APIs.

Add ImageGenModelSettingControl to web routing settings page, using
platform settings (image_generative.model) for persistence. Also increase
image model test timeout from 15s to 60s to accommodate slower image
generation APIs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d05b3593e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

setTestErrorMenuStyle(null)
try {
if (value === '') {
await updatePlatformSetting(accessToken, IMAGE_GENERATIVE_MODEL_KEY, '')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use DELETE when clearing image model setting

Selecting the empty option (Not Set) currently sends PUT /v1/admin/platform-settings/image_generative.model with an empty value, but the API rejects empty values (value must not be empty in platformapi/v1_platform_settings.go). In this scenario, users cannot clear the image generation model and the async handler rejects, so the UI cannot persist the unset action. This branch should call deletePlatformSetting(...) instead of updatePlatformSetting(..., '').

Useful? React with 👍 / 👎.

DivXPro and others added 28 commits May 25, 2026 14:15
- Add image_generate to AUXILIARY_RENDERED_TOOL_NAMES
- Create StreamingArtifactEntry on image_generate tool-result
- Render image artifacts via ArtifactImage instead of ArtifactIframe
- Filter inline-rendered image artifacts from MarkdownRenderer to avoid duplication

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add messageAttachmentStore to image_generate executor with WithMessageAttachmentStore builder
- loadInputImages fallback to attachment store when artifact store misses
- artifactKeyMatchesAccount supports attachments/{accountID}/ prefix
- Inject uploaded image key annotation into LLM context so model can reference attachments

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… in messages

- Scan all assistant messages for artifact:<key> references
- Only show image_generate streaming artifact at top-level when the key
  is NOT already referenced in an assistant message bubble
- Remove currentRunArtifacts filtering so MarkdownRenderer can render
  images during streaming inside the message bubble

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…liminate flash

- Never show image_generate in visibleStreamingArtifacts during streaming
- Compute fallbackImageGenerateArtifacts only after run completes and
  the artifact key is not referenced in messages
- Preserve image_generate streaming artifacts on run completion for fallback
- Update persona prompts and toolmeta: image_generate does not need visualize_read_me

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…story for fallback rendering

Do not clear streamingArtifactsRef when releasing completed handoff to
history. image_generate artifacts need to persist for fallback rendering
after the run ends. They are cleared by resetLiveState() when the next
run starts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Persist pending form messages as thread messages on run.input_requested
- Finalize form messages (submitted/dismissed) on input submission
- Expire pending forms on terminal run end (completed/cancelled/failed)
- Add AskUserFormMessageCard component for editable and read-only views
- Route form-mode input-request events through message stream instead of overlay
- Widen web message types to support AskUserFormContent tagged union

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…assthrough

- normalizeInputRequest now preserves display_mode field from SSE events
- Add display_mode to AgentInputRequestData type
- Create optimistic form message in message store on form-mode input-request
- Remove setAwaitingInput for form mode (form card handles all input)
- Rewrite AskUserFormMessageCard from wizard to unified scrollable form
- Update display_mode description in tool spec

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…rlay, remove filename bar, remove count label

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…mage support

Replace single artifactRef with generatedImages data model to handle
multiple images per image_generate call without overwriting. Images render
via GeneratedImageGroup in the assistant turn path, with markdown
suppression via suppressedArtifactKeys to prevent duplicates.

Fix: when hasAssistantTurn=true, skip passing generatedImages to
MessageBubble to avoid double rendering in both segment and bubble paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… skill

Active trigger is better controlled via ecommerce system SKILL or MCP.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Split Step 1 into two explicit ask_user calls (product info then image config)
to ensure module selection and resolution are always collected. Add guardrail
to Step 4: image_generate must not be called before user confirms prompts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ArrayEnumFieldSchema items.enum does not support enumNames in the ask_user
form renderer. Switch to items.anyOf (const + title) so users see Chinese
module names instead of raw enum keys.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…rwrites

Multiple image_generate calls within the same run produced identical
artifact keys (accountID/runID/generated-image.png), causing later calls
to overwrite earlier images. Add toolCallID to the key path so each call
produces a unique artifact key.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Move form-mode ask_user from message flow to input area during filling;
  submitted/dismissed forms appear in chat flow only via message sync
- Remove "Submitted"/"Dismissed" status badge from submitted form view
- Fix SelectField/OneOfSelectField dropdown clipping by using createPortal +
  position:fixed with auto up/down direction, outside click dismiss, and
  scroll-close to prevent misalignment
- Extract shared PopoverSelect component to eliminate duplication between
  SelectField and OneOfSelectField

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
DivXPro and others added 3 commits May 26, 2026 16:52
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The dedup logic in extractFilesFromTransfer was keyed by MIME type prefix
('image'), so only one image file survived each drop. Switch to identity-based
dedup (name|size|lastModified) so that truly distinct files all pass through
while still suppressing genuine duplicates from Electron clipboard bugs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此文件不应提交

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此文件不应提交

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此文件不应提交

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此文件不应提交

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants