Skip to content

Commit 177a182

Browse files
feedback
1 parent ae96bd5 commit 177a182

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

packages/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"@types/react-dom": "^18",
147147
"@typescript-eslint/eslint-plugin": "^8.3.0",
148148
"@typescript-eslint/parser": "^8.3.0",
149+
"cross-env": "^7.0.3",
149150
"eslint": "^8",
150151
"eslint-config-next": "14.2.6",
151152
"eslint-plugin-react": "^7.35.0",

packages/web/src/app/[domain]/components/searchBar/useSuggestionsData.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Suggestion, SuggestionMode } from "./searchSuggestionsBox";
55
import { getRepos, search } from "@/app/api/(client)/client";
66
import { getSearchContexts } from "@/actions";
77
import { useMemo } from "react";
8-
import { Symbol } from "@/features/search/types";
8+
import { SearchSymbol } from "@/features/search/types";
99
import { languageMetadataMap } from "@/lib/languageMetadata";
1010
import {
1111
VscSymbolClass,
@@ -87,7 +87,7 @@ export const useSuggestionsData = ({
8787
}
8888

8989
// De-duplicate on symbol name & kind.
90-
const symbolMap = new Map<string, Symbol>(symbols.map((symbol: Symbol) => [`${symbol.kind}.${symbol.symbol}`, symbol]));
90+
const symbolMap = new Map<string, SearchSymbol>(symbols.map((symbol: SearchSymbol) => [`${symbol.kind}.${symbol.symbol}`, symbol]));
9191
const suggestions = Array.from(symbolMap.values()).map((symbol) => ({
9292
value: symbol.symbol,
9393
Icon: getSymbolIcon(symbol),
@@ -158,7 +158,7 @@ export const useSuggestionsData = ({
158158
}
159159
}
160160

161-
const getSymbolIcon = (symbol: Symbol) => {
161+
const getSymbolIcon = (symbol: SearchSymbol) => {
162162
switch (symbol.kind) {
163163
case "methodSpec":
164164
case "method":

packages/web/src/features/search/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type SearchResultRange = z.infer<typeof rangeSchema>;
1616
export type SearchResultLocation = z.infer<typeof locationSchema>;
1717
export type SearchResultFile = SearchResponse["files"][number];
1818
export type SearchResultChunk = SearchResultFile["chunks"][number];
19-
export type Symbol = z.infer<typeof symbolSchema>;
19+
export type SearchSymbol = z.infer<typeof symbolSchema>;
2020

2121
export type ListRepositoriesResponse = z.infer<typeof listRepositoriesResponseSchema>;
2222
export type Repository = ListRepositoriesResponse["repos"][number];

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5343,6 +5343,7 @@ __metadata:
53435343
codemirror-lang-sparql: "npm:^2.0.0"
53445344
codemirror-lang-spreadsheet: "npm:^1.3.0"
53455345
codemirror-lang-zig: "npm:^0.1.0"
5346+
cross-env: "npm:^7.0.3"
53465347
embla-carousel-auto-scroll: "npm:^8.3.0"
53475348
embla-carousel-react: "npm:^8.3.0"
53485349
escape-string-regexp: "npm:^5.0.0"

0 commit comments

Comments
 (0)