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 = ({ ...@@ -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 = ({ ...@@ -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 = ({ ...@@ -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) => { ...@@ -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) => { ...@@ -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) => { ...@@ -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 */}
......
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