feat(search): Endpoints tab in Search Everywhere and a Go to Endpoint action (#7510)

The request mappings the IDE indexes were only a section of Search Everywhere's All tab. They now have their own Endpoints tab, as in IDEA Ultimate (also /endpoints), and Navigate > Go to Endpoint... opens it with the editor selection as the query. No default shortcut; bindable in Settings > Keymap.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-12-02 18:29:03 +08:00
1 джерело b83c2cf11a
коміт b2a9d105e2
5 files changed
+21 -1

No files matched your search

+1
Переглянути файл
@@ -394,6 +394,7 @@ describe("parseCommand", () => {
"/classes",
"/files",
"/symbols",
"/endpoints",
"/actions",
"/text",
]);
+7
Переглянути файл
@@ -47,3 +47,10 @@ describe("plugin search categories", () => {
expect(getAction("navigate.searchEverywhere")).toBeDefined();
});
});
describe("Go to Endpoint", () => {
it("opens Search Everywhere on the indexed request mappings", async () => {
await executeAction("navigate.gotoEndpoint");
expect(useSearchEverywhere.getState()).toMatchObject({ open: true, tab: "endpoints" });
});
});
+2 -1
Переглянути файл
@@ -10,7 +10,7 @@ import { basename, isTypeKind, relDir, symbolDisplayName } from "../common/open"
import { byScore, matchText } from "../common/rank";
import { wordMatch } from "@/ui";
export type SeTab = "all" | "classes" | "files" | "symbols" | "actions" | "text" | SearchCategoryId;
export type SeTab = "all" | "classes" | "files" | "symbols" | "endpoints" | "actions" | "text" | SearchCategoryId;
export const isCustomTab = (tab: string): tab is SearchCategoryId => tab.startsWith("plugin:");
export function searchTabs(): ReadonlyArray<{ id: SeTab; label: string }> {
return [...TABS, ...searchCategories().map((c) => ({ id: c.id, label: c.title }))];
@@ -34,6 +34,7 @@ export const TABS: ReadonlyArray<{ id: SeTab; label: string }> = [
{ id: "classes", label: "Classes" },
{ id: "files", label: "Files" },
{ id: "symbols", label: "Symbols" },
{ id: "endpoints", label: "Endpoints" },
{ id: "actions", label: "Actions" },
{ id: "text", label: "Text" },
];
+10
Переглянути файл
@@ -377,6 +377,16 @@ export function activate(): void | (() => void) {
when: "projectOpen",
run: se("symbols"),
},
{
// The request mappings the IDE indexed (Search Everywhere's Endpoints): type a URL, open its
// handler. No default shortcut; RestfulToolkit users bind `Ctrl+\` in Settings › Keymap.
id: "navigate.gotoEndpoint",
title: "Go to Endpoint…",
category: "Navigate",
keywords: ["url", "route", "request mapping", "service url"],
when: "projectOpen",
run: se("endpoints"),
},
{
id: "navigate.findAction",
title: "Find Action…",
+1
Переглянути файл
@@ -455,6 +455,7 @@
"Also show the other platform's shortcut": "同时显示另一平台的快捷键",
"macOS shortcuts on Windows and Linux, Windows/Linux shortcuts on macOS.": "在 Windows 和 Linux 上显示 macOS 快捷键,在 macOS 上显示 Windows/Linux 快捷键。",
"Trust Project in Codex": "在 Codex 中信任项目",
"Go to Endpoint…": "转到端点…",
"Go to Feign Endpoint": "跳转到 Feign 端点",
"Find Feign Clients": "查找 Feign 客户端",
"Feign Clients": "Feign 客户端",