+
-
{
- setEnableHighResolution(!enableHighResolution);
- }}
- >
-
-
-
-
-
- {chatStore.image_gen_api && chatStore.image_gen_key && (
-
-
Generate Image
-
-
-
-
-
-
-
-
-
- setImageGenN(parseInt(e.target.value))}
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )}
-
- {images.map((image, index) => (
-
- {image.type === "image_url" && (
-

- )}
-
-
+
+
+
+ setEnableHighResolution(checked === true)
+ }
+ />
+
+
+
+
+ {chatStore.image_gen_api && chatStore.image_gen_key && (
+
+
Generate Image
+
+
+
+
+
+
+
+
+
+ setImageGenN(parseInt(e.target.value))}
+ />
+
+
+
+
-
- ))}
+ )}
+
+ {images.map((image, index) => (
+
+ {image.type === "image_url" && (
+

+ )}
+
+ {
+ const image_url = prompt("Image URL");
+ if (!image_url) {
+ return;
+ }
+ images[index].image_url = {
+ url: image_url,
+ detail: enableHighResolution ? "high" : "low",
+ };
+ setImages([...images]);
+ }}
+ >
+
+
+
+ {
+ if (image.image_url === undefined) return;
+ image.image_url.detail =
+ image.image_url?.detail === "low" ? "high" : "low";
+ setImages([...images]);
+ }}
+ />
+
+
+ {
+ if (!confirm("Are you sure to delete this image?")) {
+ return;
+ }
+ images.splice(index, 1);
+ setImages([...images]);
+ }}
+ >
+
+
+
+
+ ))}
+
+
+
+ setShowAddImage(false)}>Done
+
-