This commit is contained in:
sijinhui
2024-08-01 16:31:11 +08:00
15 changed files with 541 additions and 17 deletions

View File

@@ -651,11 +651,11 @@ export function ChatActions(props: {
/>
)}
{/*<ChatAction*/}
{/* onClick={() => setShowPluginSelector(true)}*/}
{/* text={Locale.Plugin.Name}*/}
{/* icon={<PluginIcon />}*/}
{/*/>*/}
<ChatAction
onClick={() => setShowPluginSelector(true)}
text={Locale.Plugin.Name}
icon={<PluginIcon />}
/>
{showPluginSelector && (
<Selector
multiple

View File

@@ -541,7 +541,7 @@ export function ImagePreviewer(props: {
<div>
<div className={styles["main-title"]}>NextChat</div>
<div className={styles["sub-title"]}>
github.com/ChatGPTNextWeb/ChatGPT-Next-Web
github.com/Yidadaa/ChatGPT-Next-Web
</div>
<div className={styles["icons"]}>
<ExportAvatar avatar={config.avatar} />

View File

@@ -56,6 +56,7 @@ import {
Baidu,
ByteDance,
Alibaba,
Moonshot,
Google,
GoogleSafetySettingsThreshold,
OPENAI_BASE_URL,
@@ -1042,6 +1043,45 @@ export function Settings() {
</>
);
const moonshotConfigComponent = accessStore.provider ===
ServiceProvider.Moonshot && (
<>
<ListItem
title={Locale.Settings.Access.Moonshot.Endpoint.Title}
subTitle={
Locale.Settings.Access.Moonshot.Endpoint.SubTitle +
Moonshot.ExampleEndpoint
}
>
<input
type="text"
value={accessStore.moonshotUrl}
placeholder={Moonshot.ExampleEndpoint}
onChange={(e) =>
accessStore.update(
(access) => (access.moonshotUrl = e.currentTarget.value),
)
}
></input>
</ListItem>
<ListItem
title={Locale.Settings.Access.Moonshot.ApiKey.Title}
subTitle={Locale.Settings.Access.Moonshot.ApiKey.SubTitle}
>
<PasswordInput
value={accessStore.moonshotApiKey}
type="text"
placeholder={Locale.Settings.Access.Moonshot.ApiKey.Placeholder}
onChange={(e) => {
accessStore.update(
(access) => (access.moonshotApiKey = e.currentTarget.value),
);
}}
/>
</ListItem>
</>
);
const stabilityConfigComponent = accessStore.provider ===
ServiceProvider.Stability && (
<>
@@ -1364,6 +1404,7 @@ export function Settings() {
{/* {baiduConfigComponent}*/}
{/* {byteDanceConfigComponent}*/}
{/* {alibabaConfigComponent}*/}
{/* {moonshotConfigComponent}*/}
{/* {stabilityConfigComponent}*/}
{/* </>*/}
{/* )}*/}