Skip to content

Commit 8a1ae39

Browse files
committed
Fixes
1 parent 8228b70 commit 8a1ae39

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/gitbook/src/components/AIActions/AIActionsDropdown.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ type AIAction = {
2121

2222
export function AIActionsDropdown(props: {
2323
markdown?: string;
24-
markdownUrl: string;
24+
markdownPageUrl: string;
2525
}) {
26-
const { markdown, markdownUrl } = props;
26+
const { markdown, markdownPageUrl } = props;
2727

2828
const chatController = useAIChatController();
2929
const chat = useAIChatState();
@@ -47,7 +47,7 @@ export function AIActionsDropdown(props: {
4747
icon: <AIChatIcon />,
4848
label: 'Ask Docs Assistant',
4949
description: 'Ask our Docs Assistant about this page',
50-
onClick: () => {},
50+
onClick: handleOpenAIAssistant,
5151
},
5252
...(markdown
5353
? [
@@ -74,7 +74,7 @@ export function AIActionsDropdown(props: {
7474
description: 'View this page as plain text',
7575
isExternal: true,
7676
onClick: () => {
77-
window.open(markdownUrl, '_blank');
77+
window.open(markdownPageUrl, '_blank');
7878
},
7979
},
8080
];

packages/gitbook/src/components/PageBody/PageHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export async function PageHeader(props: {
102102
{page.layout.tableOfContents ? (
103103
<AIActionsDropdown
104104
markdown={markdownResult.data}
105-
markdownUrl={`${context.linker.toPathInSite(page.path)}.md`}
105+
markdownPageUrl={`${context.linker.toPathInSite(page.path)}.md`}
106106
/>
107107
) : null}
108108
</div>

0 commit comments

Comments
 (0)