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,
|
pane,
|
||||||
chatSettings,
|
chatSettings,
|
||||||
reserveSpace
|
reserveSpace,
|
||||||
|
hideMenu
|
||||||
}: {
|
}: {
|
||||||
pane: ChatSidebarPaneEnum;
|
pane: ChatSidebarPaneEnum;
|
||||||
chatSettings?: ChatSettingType;
|
chatSettings?: ChatSettingType;
|
||||||
@@ -50,6 +51,7 @@ const ChatHeader = ({
|
|||||||
showHistory?: boolean;
|
showHistory?: boolean;
|
||||||
totalRecordsCount: number;
|
totalRecordsCount: number;
|
||||||
reserveSpace?: boolean;
|
reserveSpace?: boolean;
|
||||||
|
hideMenu?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { isPc } = useSystem();
|
const { isPc } = useSystem();
|
||||||
@@ -101,7 +103,7 @@ const ChatHeader = ({
|
|||||||
{!isVariableVisible && <VariablePopover chatType={chatType} />}
|
{!isVariableVisible && <VariablePopover chatType={chatType} />}
|
||||||
|
|
||||||
{/* control */}
|
{/* control */}
|
||||||
{!isPlugin && <ToolMenu history={history} reserveSpace={reserveSpace} />}
|
{!isPlugin && !hideMenu && <ToolMenu history={history} reserveSpace={reserveSpace} />}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ const OutLink = (props: Props) => {
|
|||||||
authToken,
|
authToken,
|
||||||
customUid,
|
customUid,
|
||||||
showWorkorder,
|
showWorkorder,
|
||||||
|
hideMenu = '0',
|
||||||
...customVariables
|
...customVariables
|
||||||
} = router.query as {
|
} = router.query as {
|
||||||
shareId: string;
|
shareId: string;
|
||||||
@@ -76,6 +77,7 @@ const OutLink = (props: Props) => {
|
|||||||
showHead: '0' | '1';
|
showHead: '0' | '1';
|
||||||
authToken: string;
|
authToken: string;
|
||||||
showWorkorder: '0' | '1';
|
showWorkorder: '0' | '1';
|
||||||
|
hideMenu: '0' | '1';
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
};
|
};
|
||||||
const { isPc } = useSystem();
|
const { isPc } = useSystem();
|
||||||
@@ -279,6 +281,7 @@ const OutLink = (props: Props) => {
|
|||||||
totalRecordsCount={totalRecordsCount}
|
totalRecordsCount={totalRecordsCount}
|
||||||
showHistory={showHistory === '1'}
|
showHistory={showHistory === '1'}
|
||||||
reserveSpace={showWorkorder !== undefined}
|
reserveSpace={showWorkorder !== undefined}
|
||||||
|
hideMenu={hideMenu === '1'}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{/* chat box */}
|
{/* chat box */}
|
||||||
|
|||||||
Reference in New Issue
Block a user