Commit c4cc55c8 by Copilot Committed by GitHub

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>
parent db64e41f
......@@ -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 */}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment