mirror of
https://github.com/labring/FastGPT.git
synced 2026-02-27 01:02:22 +08:00
Add share-link hideMenu flag and stabilize query typing (#6389)
* Initial plan * feat: support hideMenu in share chat header Co-authored-by: c121914yu <50446880+c121914yu@users.noreply.github.com> * fix: default hideMenu query value Co-authored-by: c121914yu <50446880+c121914yu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: c121914yu <50446880+c121914yu@users.noreply.github.com>
This commit is contained in:
@@ -41,7 +41,8 @@ const ChatHeader = ({
|
||||
|
||||
pane,
|
||||
chatSettings,
|
||||
reserveSpace
|
||||
reserveSpace,
|
||||
hideMenu
|
||||
}: {
|
||||
pane: ChatSidebarPaneEnum;
|
||||
chatSettings?: ChatSettingType;
|
||||
@@ -50,6 +51,7 @@ const ChatHeader = ({
|
||||
showHistory?: boolean;
|
||||
totalRecordsCount: number;
|
||||
reserveSpace?: boolean;
|
||||
hideMenu?: boolean;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { isPc } = useSystem();
|
||||
@@ -101,7 +103,7 @@ const ChatHeader = ({
|
||||
{!isVariableVisible && <VariablePopover chatType={chatType} />}
|
||||
|
||||
{/* control */}
|
||||
{!isPlugin && <ToolMenu history={history} reserveSpace={reserveSpace} />}
|
||||
{!isPlugin && !hideMenu && <ToolMenu history={history} reserveSpace={reserveSpace} />}
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
|
||||
@@ -69,6 +69,7 @@ const OutLink = (props: Props) => {
|
||||
authToken,
|
||||
customUid,
|
||||
showWorkorder,
|
||||
hideMenu = '0',
|
||||
...customVariables
|
||||
} = router.query as {
|
||||
shareId: string;
|
||||
@@ -76,6 +77,7 @@ const OutLink = (props: Props) => {
|
||||
showHead: '0' | '1';
|
||||
authToken: string;
|
||||
showWorkorder: '0' | '1';
|
||||
hideMenu: '0' | '1';
|
||||
[key: string]: string;
|
||||
};
|
||||
const { isPc } = useSystem();
|
||||
@@ -279,6 +281,7 @@ const OutLink = (props: Props) => {
|
||||
totalRecordsCount={totalRecordsCount}
|
||||
showHistory={showHistory === '1'}
|
||||
reserveSpace={showWorkorder !== undefined}
|
||||
hideMenu={hideMenu === '1'}
|
||||
/>
|
||||
) : null}
|
||||
{/* chat box */}
|
||||
|
||||
Reference in New Issue
Block a user