mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 09:29:31 +08:00
feat: close #1626 hide context prompts in mask config
This commit is contained in:
@@ -585,7 +585,9 @@ export function Chat() {
|
||||
inputRef.current?.focus();
|
||||
};
|
||||
|
||||
const context: RenderMessage[] = session.mask.context.slice();
|
||||
const context: RenderMessage[] = session.mask.hideContext
|
||||
? []
|
||||
: session.mask.context.slice();
|
||||
|
||||
const accessStore = useAccessStore();
|
||||
|
||||
|
@@ -104,25 +104,41 @@ export function MaskConfig(props: {
|
||||
></input>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={Locale.Mask.Config.Sync.Title}
|
||||
subTitle={Locale.Mask.Config.Sync.SubTitle}
|
||||
title={Locale.Mask.Config.HideContext.Title}
|
||||
subTitle={Locale.Mask.Config.HideContext.SubTitle}
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={props.mask.syncGlobalConfig}
|
||||
checked={props.mask.hideContext}
|
||||
onChange={(e) => {
|
||||
if (
|
||||
e.currentTarget.checked &&
|
||||
confirm(Locale.Mask.Config.Sync.Confirm)
|
||||
) {
|
||||
props.updateMask((mask) => {
|
||||
mask.syncGlobalConfig = e.currentTarget.checked;
|
||||
mask.modelConfig = { ...globalConfig.modelConfig };
|
||||
});
|
||||
}
|
||||
props.updateMask((mask) => {
|
||||
mask.hideContext = e.currentTarget.checked;
|
||||
});
|
||||
}}
|
||||
></input>
|
||||
</ListItem>
|
||||
{props.shouldSyncFromGlobal ? (
|
||||
<ListItem
|
||||
title={Locale.Mask.Config.Sync.Title}
|
||||
subTitle={Locale.Mask.Config.Sync.SubTitle}
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={props.mask.syncGlobalConfig}
|
||||
onChange={(e) => {
|
||||
if (
|
||||
e.currentTarget.checked &&
|
||||
confirm(Locale.Mask.Config.Sync.Confirm)
|
||||
) {
|
||||
props.updateMask((mask) => {
|
||||
mask.syncGlobalConfig = e.currentTarget.checked;
|
||||
mask.modelConfig = { ...globalConfig.modelConfig };
|
||||
});
|
||||
}
|
||||
}}
|
||||
></input>
|
||||
</ListItem>
|
||||
) : null}
|
||||
</List>
|
||||
|
||||
<List>
|
||||
|
Reference in New Issue
Block a user