Skip to content

Commit 10dd26a

Browse files
committed
Use new API version
1 parent c6dec8e commit 10dd26a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

bun.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"lockfileVersion": 1,
3+
"configVersion": 0,
34
"workspaces": {
45
"": {
56
"name": "gitbook",
@@ -345,7 +346,7 @@
345346
"react-dom": "catalog:",
346347
},
347348
"catalog": {
348-
"@gitbook/api": "0.153.0",
349+
"@gitbook/api": "0.154.0",
349350
"@scalar/api-client-react": "^1.3.46",
350351
"@tsconfig/node20": "^20.1.6",
351352
"@tsconfig/strictest": "^2.0.6",
@@ -726,7 +727,7 @@
726727

727728
"@fortawesome/fontawesome-svg-core": ["@fortawesome/[email protected]", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "6.6.0" } }, "sha512-KHwPkCk6oRT4HADE7smhfsKudt9N/9lm6EJ5BVg0tD1yPA5hht837fB87F8pn15D8JfTqQOjhKTktwmLMiD7Kg=="],
728729

729-
"@gitbook/api": ["@gitbook/api@0.153.0", "", { "dependencies": { "event-iterator": "^2.0.0", "eventsource-parser": "^3.0.0" } }, "sha512-ArNPFoqwId4Flicz8xPEdGqXQkzxyxP7S8Uv3wIfCX2e4cLhpcS7xCJGEHOJrqe1tNs1ovT1N2MWfpdIqzXqig=="],
730+
"@gitbook/api": ["@gitbook/api@0.154.0", "", { "dependencies": { "event-iterator": "^2.0.0", "eventsource-parser": "^3.0.0" } }, "sha512-huEgWWa2H+H4ofYEAQl9r49u0gVjDHHWVNJKhd6SgGCfefjNPHkQj9zaky/5DBQzlu/+SDmutWiOtYdrykQO8w=="],
730731

731732
"@gitbook/browser-types": ["@gitbook/browser-types@workspace:packages/browser-types"],
732733

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"catalog": {
4242
"@tsconfig/strictest": "^2.0.6",
4343
"@tsconfig/node20": "^20.1.6",
44-
"@gitbook/api": "0.153.0",
44+
"@gitbook/api": "0.154.0",
4545
"@scalar/api-client-react": "^1.3.46",
4646
"@types/react": "^19.0.0",
4747
"@types/react-dom": "^19.0.0",

packages/gitbook/src/components/Embeddable/EmbeddableRootLayout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export async function EmbeddableRootLayout({
4141
>
4242
<AIContextProvider
4343
aiMode={context.customization.ai.mode}
44-
// @ts-expect-error - TODO: suggestions is not available in the API yet, remove this expect when it's been added
4544
suggestions={context.customization.ai.suggestions}
4645
trademark={context.customization.trademark.enabled}
4746
>

packages/gitbook/src/components/Search/useSearchResults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ export function useSearchResults(props: {
192192
cancelled = true;
193193
clearTimeout(timeout);
194194
};
195-
}, [query, scope, trackEvent, withAI, siteSpaceId, siteSpaceIds, disabled]);
195+
}, [query, scope, trackEvent, withAI, siteSpaceId, siteSpaceIds, disabled, suggestions]);
196196

197197
const aiEnrichedResults: ResultType[] = React.useMemo(() => {
198198
if (!withAI) {
199199
return resultsState.results;
200200
}
201201
return withAskTriggers(resultsState.results, query, assistants);
202-
}, [resultsState.results, query, withAI]);
202+
}, [resultsState.results, query, withAI, assistants]);
203203

204204
return { ...resultsState, results: aiEnrichedResults };
205205
}

0 commit comments

Comments
 (0)