Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/ui/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const InKeepTrigger = dynamic(
},
) as typeof InkeepModalSearchAndChat;

import { DocsSearchItem, EndpointSearchItem } from "@/types";
import { DocsSearchItem, EndpointSearchItem, EnhancedDocsSearchItem } from "@/types";
import { Button } from "@telegraph/button";
import { Icon } from "@telegraph/icon";
import { MenuItem } from "@telegraph/menu";
Expand Down Expand Up @@ -72,7 +72,7 @@ const highlightingStyles = {
const NUM_DOCS_HITS = 12;
const NUM_ENDPOINT_HITS = 5;

type ResultItem = (DocsSearchItem & BaseItem) | (EndpointSearchItem & BaseItem);
type ResultItem = (EnhancedDocsSearchItem & BaseItem) | (EndpointSearchItem & BaseItem);

const algoliaAppId = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID || "";
const algoliaSearchApiKey =
Expand Down Expand Up @@ -178,7 +178,7 @@ const DocsSearchResult = ({
)}
</Text>
<Text as="span" size="1" color="gray" weight="regular">
{item.section}
{item.pageTitle ? `${item.pageTitle as string} •` : ""} {item.section}
</Text>
</Box>
</Link>
Expand Down Expand Up @@ -757,7 +757,7 @@ const Autocomplete = () => {
/>
) : (
<DocsSearchResult
item={item as DocsSearchItem}
item={item as EnhancedDocsSearchItem}
onClick={() => autocomplete.setQuery("")}
/>
)}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"generate-llms": "yarn run open-api-to-md && tsx scripts/generateApiMarkdown.ts && tsx scripts/generateLlmsTxt.ts",
"generate-reference-md": "tsx scripts/generateApiMarkdown.ts",
"index-apis": "tsx scripts/indexApisForSearch.ts",
"index-docs": "tsx scripts/indexDocsForSearch.ts",
"open-api-to-md": "bash scripts/openApiToMd.sh",
"predev": "yarn generate-llms",
"prebuild": "yarn generate-llms && yarn index-apis"
"prebuild": "yarn generate-llms && yarn index-docs && yarn index-apis"
},
"dependencies": {
"@algolia/autocomplete-js": "^1.6.3",
Expand Down
Loading
Loading