mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-03 00:26:40 +08:00
commit
836e2e40b8
@ -329,4 +329,5 @@
|
|||||||
|
|
||||||
.cus-modal-container {
|
.cus-modal-container {
|
||||||
max-width: none !important;
|
max-width: none !important;
|
||||||
|
width: 80vw !important;
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,7 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
}) {
|
}) {
|
||||||
console.log("-----", props);
|
// console.log("-----", props);
|
||||||
|
|
||||||
const getCheckCardAvatar = (value: string): React.ReactNode => {
|
const getCheckCardAvatar = (value: string): React.ReactNode => {
|
||||||
if (value.startsWith("gpt")) {
|
if (value.startsWith("gpt")) {
|
||||||
@ -525,8 +525,18 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
return <></>;
|
return <></>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const clickMaskEvent = (event: React.MouseEvent) => {
|
||||||
|
const div = document.getElementById("modal-mask");
|
||||||
|
// console.log('-----', event.target)
|
||||||
|
if (event.target === div) {
|
||||||
|
props.onClose?.();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
onClick={(event) => clickMaskEvent(event)}
|
||||||
|
id="modal-mask"
|
||||||
className={styles["modal-mask"] + " " + styles["modal-mask-container"]}
|
className={styles["modal-mask"] + " " + styles["modal-mask-container"]}
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
@ -541,8 +551,13 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
defaultValue={props.defaultSelectedValue}
|
defaultValue={props.defaultSelectedValue}
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
gutter={[16, 16]}
|
gutter={[16, 8]}
|
||||||
style={{ marginLeft: "-8px", marginRight: "-8px" }}
|
style={{
|
||||||
|
marginLeft: "-8px",
|
||||||
|
marginRight: "-8px",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{props.items.map((item, i) => {
|
{props.items.map((item, i) => {
|
||||||
const selected = props.defaultSelectedValue === item.value;
|
const selected = props.defaultSelectedValue === item.value;
|
||||||
@ -557,6 +572,7 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
props.onClose?.();
|
props.onClose?.();
|
||||||
}}
|
}}
|
||||||
avatar={getCheckCardAvatar(item.value?.toString() ?? "")}
|
avatar={getCheckCardAvatar(item.value?.toString() ?? "")}
|
||||||
|
style={{ marginBottom: "8px", width: "250px" }}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
);
|
);
|
||||||
|
@ -161,6 +161,7 @@ const openaiModels = [
|
|||||||
const googleModels = [
|
const googleModels = [
|
||||||
"gemini-1.0-pro",
|
"gemini-1.0-pro",
|
||||||
"gemini-1.5-pro-latest",
|
"gemini-1.5-pro-latest",
|
||||||
|
"gemini-1.5-flash-latest",
|
||||||
"gemini-pro-vision",
|
"gemini-pro-vision",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -296,13 +296,12 @@ export function isVisionModel(model: string) {
|
|||||||
"vision",
|
"vision",
|
||||||
"claude-3",
|
"claude-3",
|
||||||
"gemini-1.5-pro",
|
"gemini-1.5-pro",
|
||||||
"gpt-4-turbo",
|
"gemini-1.5-flash",
|
||||||
"gpt-4o",
|
|
||||||
];
|
];
|
||||||
const isGpt4TurboPreview = model === "gpt-4-turbo-preview";
|
const isGpt4Turbo =
|
||||||
|
model.includes("gpt-4-turbo") && !model.includes("preview");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
visionKeywords.some((keyword) => model.includes(keyword)) &&
|
visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo
|
||||||
!isGpt4TurboPreview
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user