Add project file picker (⌘P) and project content search (⇧⌘F) #4855
Mergedjakeleventhal(GitHub profile, opens in a new tab)merged 23 commits into
main fromrefs/pull/4855/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- apps/web/src/components/files/FileBrowserPanel.tsx line 227Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -216,3 +223,3 @@216223 initialExpansion: 1,217224 icons: T3_PIERRE_ICONS,218225 onSelectionChange: (selectedPaths) => {apps/web/src/state/queries.ts lines 309 to 324Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -219,0 +250,21 @@250+ readonly environmentId: EnvironmentId | null;251+ readonly cwd: string | null;252+ readonly query: string;253+ readonly caseSensitive: boolean;254+ readonly wholeWord: boolean;255+ readonly useRegex: boolean;256+}257+258+export function useProjectContentSearch(target: ProjectContentSearchTarget) {259+ const query = target.query.trim();260+ const debouncedQuery = useDebouncedValue(query, PROJECT_CONTENT_SEARCH_DEBOUNCE_MS);261+ const result = useEnvironmentQuery(262+ target.environmentId !== null &&263+ target.cwd !== null &&264+ query.length > 0 &&265+ debouncedQuery.length > 0266+ ? projectEnvironment.searchContents({267+ environmentId: target.environmentId,268+ input: {269+ cwd: target.cwd,270+ query: debouncedQuery,apps/web/src/components/search/ProjectContentSearchDialog.tsx lines 153 to 153OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +133,21 @@133+ const fileCount = groups.length;134+135+ return (136+ <ContentSearchPopup>137+ <DialogTitle className="sr-only">Search {target.projectName}</DialogTitle>138+ <div className="flex shrink-0 items-center gap-2 border-b p-2">139+ <Search className="ml-1 size-4 shrink-0 text-muted-foreground" />140+ <Input141+ autoFocus142+ nativeInput143+ unstyled144+ value={query}145+ onChange={(event) => setQuery(event.currentTarget.value)}146+ onKeyDown={(event) => {147+ if (event.key === "ArrowDown" && matches.length > 0) {148+ event.preventDefault();149+ setSelectedIndex((current) => (current + 1) % matches.length);150+ } else if (event.key === "ArrowUp" && matches.length > 0) {151+ event.preventDefault();152+ setSelectedIndex((current) => (current - 1 + matches.length) % matches.length);153+ } else if (event.key === "Enter") {
- apps/web/src/components/files/FileBrowserPanel.tsx line 313Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -247,3 +257,19 @@247257 model.resetPaths(treePaths);248258 }, [entryKinds, model, treePaths]);249259260+ useEffect(() => {261+ if (!selectedPath || entryKinds.get(selectedPath) !== "file") return;262+263+ syncingSelectionRef.current = true;264+ model.closeSearch();265+ for (const path of model.getSelectedPaths()) {266+ model.getItem(path)?.deselect();267+ }268+269+ const segments = selectedPath.split("/");270+ let ancestorPath = "";271+ for (const segment of segments.slice(0, -1)) {272+ ancestorPath = ancestorPath ? `${ancestorPath}/${segment}` : segment;273+ const item = model.getItem(ancestorPath);274+ if (item && "expand" in item) item.expand();275+ }apps/server/src/workspace/WorkspaceSearchIndex.ts line 271OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -157,0 +251,21 @@251+ line: string,252+ byteRanges: ReadonlyArray<readonly [number, number]>,253+): Array<{ readonly start: number; readonly end: number }> {254+ const lineBytes = Buffer.from(line);255+ const toStringIndex = (byteOffset: number) => lineBytes.subarray(0, byteOffset).toString().length;256+ return byteRanges.map(([startByte, endByte]) => {257+ const start = toStringIndex(startByte);258+ const end = toStringIndex(endByte);259+ if (!input.wholeWord || input.useRegex) return { start, end };260+261+ // Non-word whole-word edges consume the boundary character, so the raw262+ // range can include punctuation around the literal query. Re-anchor the263+ // range on the query itself for exact highlighting.264+ const matchedText = line.slice(start, end);265+ const queryIndex = input.caseSensitive266+ ? matchedText.indexOf(input.query)267+ : matchedText.toLocaleLowerCase().indexOf(input.query.toLocaleLowerCase());268+ return queryIndex === -1269+ ? { start, end }270+ : { start: start + queryIndex, end: start + queryIndex + input.query.length };271+ });apps/server/src/workspace/WorkspaceSearchIndex.ts line 226OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -155,3 +209,21 @@155209 };156210 }157211212+const WORD_CHARACTER = /[\p{Letter}\p{Mark}\p{Number}_]/u;213+214+function escapeRegexLiteral(input: string): string {215+ return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");216+}217+218+/**219+ * `\b` only matches at word-character edges, so a pattern edge that is220+ * punctuation (e.g. the query "foo-") would never match inside221+ * `\b(?:foo-)\b`. Fall back to explicit non-word boundaries for those edges.222+ */223+function wrapWholeWord(pattern: string, query: string): string {224+ const firstCharacter = Array.from(query).at(0) ?? "";225+ const lastCharacter = Array.from(query).at(-1) ?? "";226+ const leading = WORD_CHARACTER.test(firstCharacter) ? "\\b" : "(?:^|\\W)";227+ const trailing = WORD_CHARACTER.test(lastCharacter) ? "\\b" : "(?:$|\\W)";228+ return `${leading}(?:${pattern})${trailing}`;229+}
- apps/server/src/workspace/WorkspaceSearchIndex.ts line 294OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -175,4 +291,4 @@175291 FileFinder.create({176292 basePath: cwd,177293 disableMmapCache: true,178- disableContentIndexing: true,294+ disableContentIndexing: false,apps/web/src/components/files/projectFilesQueryState.ts line 152OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -136,3 +137,16 @@136137 };137138 }138139140+/**141+ * Backing query for the project file picker: the workspace index listing when142+ * the query is blank, and a debounced file-only server search otherwise.143+ * `matchedQuery` is the query the returned entries were computed for, so the144+ * caller can highlight against results instead of half-typed input.145+ */146+export function useProjectFilePickerQuery(147+ environmentId: EnvironmentId,148+ cwd: string,149+ query: string,150+ limit: number,151+) {152+ const listing = useProjectEntriesQuery(environmentId, cwd);apps/web/src/components/search/ProjectContentSearchDialog.tsx lines 237 to 238OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -0,0 +218,21 @@218+ return (219+ <section className="pb-2" key={group.path}>220+ <div className="sticky top-0 z-10 flex h-8 items-center gap-2 bg-popover/95 px-3 text-xs backdrop-blur-sm">221+ <PierreEntryIcon222+ pathValue={group.path}223+ kind="file"224+ theme={resolvedTheme}225+ className="size-3.5"226+ />227+ <span className="font-medium text-foreground">{path.name}</span>228+ {path.directory ? (229+ <span className="min-w-0 truncate text-muted-foreground">230+ {path.directory}231+ </span>232+ ) : null}233+ <span className="ml-auto rounded-full bg-muted px-1.5 py-0.5 tabular-nums text-[10px] text-muted-foreground">234+ {group.matches.length}235+ </span>236+ </div>237+ {group.matches.map((match) => (238+ <buttonapps/web/src/components/files/FileBrowserPanel.tsx lines 299 to 300Resolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -247,3 +257,8 @@247257 model.resetPaths(treePaths);248258 }, [entryKinds, model, treePaths]);249259260+ useEffect(() => {261+ if (!selectedPath || entryKinds.get(selectedPath) !== "file") return;262+263+ syncingSelectionRef.current = true;264+ model.closeSearch();apps/web/src/components/CommandPalette.tsx lines 350 to 354Resolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -340,6 +345,8 @@340345 return "An error occurred.";341346 }342347343-interface CommandPaletteOpenIntent {344- readonly kind: "add-project" | "new-thread-in";345-}348+const OVERLAY_MODE_BY_COMMAND = {349+ "commandPalette.toggle": "command",350+ "filePicker.toggle": "files",351+ "projectSearch.toggle": "content",352+} as const satisfies Partial<Record<string, SearchOverlayMode>>;packages/client-runtime/src/state/projectCommands.ts lines 63 to 67OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -60,3 +60,8 @@6060 tag: WS_METHODS.projectsSearchEntries,6161 staleTimeMs: 15_000,6262 }),63+ searchContents: createEnvironmentRpcQueryAtomFamily(runtime, {64+ label: "environment-data:projects:search-contents",65+ tag: WS_METHODS.projectsSearchContents,66+ staleTimeMs: 5_000,67+ idleTtlMs: 60_000,apps/server/src/workspace/WorkspaceSearchIndex.ts lines 226 to 228OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -155,3 +209,20 @@155209 };156210 }157211212+const WORD_CHARACTER = /[\p{Letter}\p{Mark}\p{Number}_]/u;213+214+function escapeRegexLiteral(input: string): string {215+ return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");216+}217+218+/**219+ * `\b` only matches at word-character edges, so a pattern edge that is220+ * punctuation (e.g. the query "foo-") would never match inside221+ * `\b(?:foo-)\b`. Fall back to explicit non-word boundaries for those edges.222+ */223+function wrapWholeWord(pattern: string, query: string): string {224+ const firstCharacter = Array.from(query).at(0) ?? "";225+ const lastCharacter = Array.from(query).at(-1) ?? "";226+ const leading = WORD_CHARACTER.test(firstCharacter) ? "\\b" : "(?:^|\\W)";227+ const trailing = WORD_CHARACTER.test(lastCharacter) ? "\\b" : "(?:$|\\W)";228+ return `${leading}(?:${pattern})${trailing}`;apps/web/src/components/CommandPalette.tsx line 420Resolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -409,4 +394,4 @@409394 terminalOpen,410395 },411396 });412- if (command !== "commandPalette.toggle") {397+ const mode = overlayModeForCommand(command);packages/shared/src/keybindings.ts lines 38 to 39Resolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -35,3 +35,5 @@3535 { key: "mod+-", command: "preview.zoomOut", when: "previewFocus" },3636 { key: "mod+0", command: "preview.resetZoom", when: "previewFocus" },3737 { key: "mod+k", command: "commandPalette.toggle", when: "!terminalFocus" },38+ { key: "mod+p", command: "filePicker.toggle", when: "!terminalFocus" },39+ { key: "mod+shift+f", command: "projectSearch.toggle", when: "!terminalFocus" },apps/web/src/components/files/FileBrowserPanel.tsx lines 309 to 312Resolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -247,3 +257,18 @@247257 model.resetPaths(treePaths);248258 }, [entryKinds, model, treePaths]);249259260+ useEffect(() => {261+ if (!selectedPath || entryKinds.get(selectedPath) !== "file") return;262+263+ syncingSelectionRef.current = true;264+ model.closeSearch();265+ for (const path of model.getSelectedPaths()) {266+ model.getItem(path)?.deselect();267+ }268+269+ const segments = selectedPath.split("/");270+ let ancestorPath = "";271+ for (const segment of segments.slice(0, -1)) {272+ ancestorPath = ancestorPath ? `${ancestorPath}/${segment}` : segment;273+ const item = model.getItem(ancestorPath);274+ if (item && "expand" in item) item.expand();
- apps/server/src/workspace/WorkspaceSearchIndex.ts line 455OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -307,4 +436,20 @@436+ );437+ return mapDirectorySearchResult(result, limit);438+ }439+ const result = yield* runSearch(query, pageSize, "mixedSearch", () =>440+ finder.mixedSearch(query, { pageSize }),441+ );307442 return mapMixedSearchResult(result, limit);308443 });309444310- return WorkspaceSearchIndex.of({ list, refresh, search });445+ const searchContents: WorkspaceSearchIndex["Service"]["searchContents"] = Effect.fn(446+ "WorkspaceSearchIndex.searchContents",447+ )(function* (input) {448+ const { searchQuery, regexMode } = buildContentSearchQuery(input);449+ const result = yield* runSearch(input.query, input.limit, "grep", () =>450+ finder.grep(searchQuery, {451+ mode: regexMode ? "regex" : "plain",452+ smartCase: !input.caseSensitive && !regexMode,453+ maxMatchesPerFile: input.limit,454+ pageSize: input.limit,455+ timeBudgetMs: CONTENT_SEARCH_TIME_BUDGET_MS,
- apps/server/src/workspace/WorkspaceSearchIndex.ts line 473OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -310,0 +453,21 @@453+ maxMatchesPerFile: Math.min(CONTENT_SEARCH_MAX_MATCHES_PER_FILE, input.limit),454+ pageSize: input.limit,455+ timeBudgetMs: CONTENT_SEARCH_TIME_BUDGET_MS,456+ }),457+ );458+ const matches = result.items.flatMap((match) => {459+ const matchRanges = mapContentMatchRanges(match.lineContent, match.matchRanges).filter(460+ (range) => !input.wholeWord || isWholeWordRange(match.lineContent, range),461+ );462+ if (matchRanges.length === 0) return [];463+ return [464+ {465+ path: toPosixPath(match.relativePath),466+ lineNumber: match.lineNumber,467+ lineContent: match.lineContent,468+ matchRanges,469+ },470+ ];471+ });472+ return {473+ matches,apps/web/src/components/files/FileBrowserPanel.tsx line 295OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -247,3 +259,12 @@247259 model.resetPaths(treePaths);248260 }, [entryKinds, model, treePaths]);249261262+ useEffect(() => {263+ if (!selectedPath || entryKinds.get(selectedPath) !== "file") return;264+ // A selection that originated inside the tree (clicking a row, possibly265+ // in an active tree search) is already visible; re-revealing it would266+ // close the search and clobber the user's context. Only sync external267+ // opens (file picker, content search, chat links).268+ if (model.getSelectedPaths().some((path) => path.replace(/\/$/, "") === selectedPath)) {269+ return;270+ }
- apps/web/src/components/files/FileBrowserPanel.tsx line 263OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -247,3 +259,5 @@247259 model.resetPaths(treePaths);248260 }, [entryKinds, model, treePaths]);249261262+ useEffect(() => {263+ if (!selectedPath || entryKinds.get(selectedPath) !== "file") return;apps/server/src/workspace/WorkspaceSearchIndex.ts line 263OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -157,0 +230,21 @@230+ line: string,231+ byteRanges: ReadonlyArray<readonly [number, number]>,232+): Array<{ readonly start: number; readonly end: number }> {233+ const lineBytes = Buffer.from(line);234+ const toStringIndex = (byteOffset: number) => lineBytes.subarray(0, byteOffset).toString().length;235+ return byteRanges.map(([startByte, endByte]) => ({236+ start: toStringIndex(startByte),237+ end: toStringIndex(endByte),238+ }));239+}240+241+/**242+ * Whole-word filtering happens after the grep rather than by wrapping the243+ * pattern in boundary regex: consuming boundaries such as `(?:^|\W)` swallow244+ * the separator between adjacent matches and widen the reported ranges, and245+ * `\b` cannot match punctuation-edged queries at all. Matching VS Code, a246+ * match edge is a word boundary when it touches the line edge, the247+ * neighbouring character is not a word character, or the match's own edge248+ * character is not a word character.249+ */250+function isWholeWordRange(
- apps/server/src/workspace/WorkspaceSearchIndex.ts lines 477 to 478OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -307,4 +459,20 @@307459 return mapMixedSearchResult(result, limit);308460 });309461310- return WorkspaceSearchIndex.of({ list, refresh, search });462+ const searchContents: WorkspaceSearchIndex["Service"]["searchContents"] = Effect.fn(463+ "WorkspaceSearchIndex.searchContents",464+ )(function* (input) {465+ const { searchQuery, regexMode } = buildContentSearchQuery(input);466+ const deadline = performance.now() + CONTENT_SEARCH_TIME_BUDGET_MS;467+ const matches: Array<ProjectSearchContentsResult["matches"][number]> = [];468+ let nextCursor: GrepCursor | null = null;469+ let regexFallbackError: string | undefined;470+471+ do {472+ const remainingTimeBudgetMs = Math.max(1, Math.ceil(deadline - performance.now()));473+ const result = yield* runSearch(input.query, input.limit, "grep", () =>474+ finder.grep(searchQuery, {475+ mode: regexMode ? "regex" : "plain",476+ smartCase: !input.caseSensitive && !regexMode,477+ // A single dense file must not consume the whole result page.478+ maxMatchesPerFile: Math.min(CONTENT_SEARCH_MAX_MATCHES_PER_FILE, input.limit),
- apps/web/src/components/search/ProjectContentSearchDialog.tsx line 281OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -0,0 +261,21 @@261+ <span className="font-medium text-foreground">{path.name}</span>262+ {path.directory ? (263+ <span className="min-w-0 truncate text-muted-foreground">264+ {path.directory}265+ </span>266+ ) : null}267+ <span className="ml-auto rounded-full bg-muted px-1.5 py-0.5 tabular-nums text-[10px] text-muted-foreground">268+ {group.matches.length}269+ </span>270+ </div>271+ {group.matches.map((match) => (272+ <button273+ type="button"274+ key={`${match.path}:${match.lineNumber}:${match.resultIndex}`}275+ data-content-search-result={match.resultIndex}276+ className={cn(277+ "flex h-7 w-full min-w-0 items-center gap-3 px-3 text-left font-mono text-xs hover:bg-accent/60",278+ match.resultIndex === selectedIndex && "bg-accent text-accent-foreground",279+ )}280+ onMouseEnter={() => setSelectedIndex(match.resultIndex)}281+ onClick={() => openMatch(match)}
- @@ -219,0 +267,21 @@267+ environmentId: target.environmentId,268+ input: {269+ cwd: target.cwd,270+ query: debouncedQuery,271+ limit: PROJECT_CONTENT_SEARCH_LIMIT,272+ caseSensitive: target.caseSensitive,273+ wholeWord: target.wholeWord,274+ useRegex: target.useRegex,275+ },276+ })277+ : null,278+ );279+280+ return {281+ matches: result.data?.matches ?? EMPTY_CONTENT_MATCHES,282+ error: result.error,283+ isPending: query !== debouncedQuery || result.isPending,284+ hasQuery: query.length > 0,285+ truncated: result.data?.truncated ?? false,286+ invalidRegex: target.useRegex && result.data?.regexFallbackError !== undefined,287+ };
- apps/web/src/lib/syntaxHighlighting.ts lines 19 to 24Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +4,21 @@4+ type SupportedLanguages,5+} from "@pierre/diffs";6+7+import { resolveDiffThemeName } from "./diffRendering";8+9+const highlighterPromiseCache = new Map<string, Promise<DiffsHighlighter>>();10+11+export function getSyntaxHighlighterPromise(language: string): Promise<DiffsHighlighter> {12+ const cached = highlighterPromiseCache.get(language);13+ if (cached) return cached;14+15+ const promise = getSharedHighlighter({16+ themes: [resolveDiffThemeName("dark"), resolveDiffThemeName("light")],17+ langs: [language as SupportedLanguages],18+ preferredHighlighter: "shiki-js",19+ }).catch((error) => {20+ highlighterPromiseCache.delete(language);21+ if (language === "text") {22+ // "text" itself failed — Shiki cannot initialize at all, surface the error23+ throw error;24+ }
- apps/web/src/components/files/FileBrowserPanel.tsx line 320Resolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -249,0 +280,21 @@280+ model.closeSearch();281+ for (const path of model.getSelectedPaths()) {282+ model.getItem(path)?.deselect();283+ }284+285+ // Directory rows are registered with a trailing slash (see treePath), so286+ // ancestor lookups must use the same form to expand them.287+ const segments = selectedPath.split("/");288+ let ancestorPath = "";289+ for (const segment of segments.slice(0, -1)) {290+ ancestorPath = ancestorPath ? `${ancestorPath}/${segment}` : segment;291+ const item = model.getItem(`${ancestorPath}/`) ?? model.getItem(ancestorPath);292+ if (item && "expand" in item) item.expand();293+ }294+295+ model.getItem(selectedPath)?.select();296+ model.scrollToPath(selectedPath, { focus: true, offset: "center" });297+ queueMicrotask(() => {298+ syncingSelectionRef.current = false;299+ });300+ }, [entryKinds, model, selectedPath, selectedPathRevealId, treePaths]);
- apps/server/src/workspace/WorkspaceSearchIndex.ts line 238OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -157,0 +218,21 @@218+}219+220+function codePointBefore(line: string, index: number): string | undefined {221+ if (index <= 0) return undefined;222+ const previousCodeUnit = line.charCodeAt(index - 1);223+ const previousIndex =224+ previousCodeUnit >= 0xdc00 && previousCodeUnit <= 0xdfff ? index - 2 : index - 1;225+ return codePointAt(line, previousIndex);226+}227+228+function buildContentSearchQuery(input: Omit<ProjectSearchContentsInput, "cwd">): {229+ readonly searchQuery: string;230+ readonly regexMode: boolean;231+} {232+ if (input.caseSensitive) {233+ return { searchQuery: input.query, regexMode: input.useRegex };234+ }235+ // Plain mode relies on smart case: an all-lowercase needle matches236+ // case-insensitively. Regex mode needs an explicit inline flag instead.237+ return input.useRegex238+ ? { searchQuery: `(?i:${input.query})`, regexMode: true }apps/web/src/state/queries.ts line 337OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -264,0 +317,21 @@317+ target.cwd !== null &&318+ hasQuery &&319+ debouncedQuery.trim().length > 0320+ ? projectContentSearch({321+ environmentId: target.environmentId,322+ input: {323+ cwd: target.cwd,324+ query: debouncedQuery,325+ limit: PROJECT_CONTENT_SEARCH_LIMIT,326+ caseSensitive: target.caseSensitive,327+ wholeWord: target.wholeWord,328+ useRegex: target.useRegex,329+ },330+ })331+ : null,332+ );333+334+ return {335+ matches: result.data?.matches ?? EMPTY_CONTENT_MATCHES,336+ error: result.error,337+ isPending: query !== debouncedQuery || result.isPending,
- apps/web/src/components/CommandPalette.tsx line 500OutdatedResolvedby jakeleventhal(GitHub profile, opens in a new tab)@@ -473,0 +480,21 @@480+ : props.mode === "content"481+ ? "Search project contents"482+ : "Command palette"483+ }484+ className={cn("overflow-hidden p-0", props.mode === "content" && "h-105")}485+ data-command-palette="true"486+ data-palette-mode={props.mode}487+ data-testid="command-palette"488+ finalFocus={() => {489+ composerHandleRef?.current?.focusAtEnd();490+ return false;491+ }}492+ onBackdropPointerDown={() => {493+ props.setOpen(false);494+ }}495+ onKeyDownCapture={(event) => {496+ if (event.key !== "Escape" || props.mode === "command") return;497+ event.preventDefault();498+ event.stopPropagation();499+ props.openOverlayMode("command");500+ }}
juliusmarminge merged thisabc409c
juliusmarminge closed this
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed