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:
Copilot
2026-02-06 09:59:09 +08:00
committed by GitHub
parent db64e41f81
commit c4cc55c8f2
2 changed files with 7 additions and 2 deletions

View File

@@ -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>
);

View File

@@ -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 */}