дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
Project & files - Project view modes (Project Files / Open Files / All Changed Files / Scratches); External Libraries for Python, JDK (src.zip), Node, Cargo, Go, Maven/Gradle jars; read-only jar/zip browsing - ⌘N New popup with type search and more file kinds; New Project, Rename Project, Reload All from Disk, Export/Import Settings, Power Save Mode - File type associations, extra content roots and exclude patterns (indexed and watched without reopening the project) Editor & navigation - Find bar: search scope (comments/strings), Preserve Case, Exclude, multiline, history; Find in Files: Module scope, custom pattern scopes, multiline - Search Everywhere filters, Assign Shortcut, settings results; named bookmark lists, file/folder bookmarks; Structure filters and Show Inherited; Recent Locations timestamps and breadcrumbs; Code Vision author - Completion options, editor tab placement/layout, inline completion (LSP 3.18) - Spell checking (Typo inspection, ide-spell) and Inspections settings with custom profiles; Code Style schemes, formatter markers, Do not format Run, VCS, services, database - Typed run configurations (Shell, Program, npm, Gradle, Maven, Docker, Compound), Modify options, Before launch, env dialog, Current File, Emulate terminal (PTY) - Git log graph/view options, Go to Hash/Branch/Tag, date filter keeps the graph; Pull/Merge/Rebase dialogs, Manage Remotes, Worktrees - Generic Services host (Docker connections/registries, run sessions); TODO scope/changes tabs with changelists; Coverage report import - Data sources: wire-compatible vendors, URL import, SSL certs, Options, Schemas and Advanced tabs, color and comment Workbench - Run Anything, Customize Main Toolbar, named tool window layouts, menu completeness, Code Cleanup, macros, "Don't Show Again", editor banners - Chinese translations for the new UI Claude-Session: https://claude.ai/code/session_01SaPPsVPuk6ZTNsoUCNCbMv
40 рядки
1.5 KiB
TypeScript
40 рядки
1.5 KiB
TypeScript
/** Run Anything entries for run configurations (npm scripts, cargo targets, user configurations…). */
|
|
import { executeAction } from "@/platform/actions";
|
|
import type { RunConfig } from "@/platform/ipc";
|
|
import type { RunAnythingItem, RunAnythingProvider } from "@/workbench/contributions";
|
|
import { useRun } from "./store";
|
|
|
|
const KIND_ICON: Record<string, string> = { npm: "file-npm", maven: "file-maven", gradle: "file-gradle" };
|
|
|
|
function item(c: RunConfig): RunAnythingItem {
|
|
return {
|
|
key: c.id,
|
|
label: c.name,
|
|
detail: c.kind,
|
|
icon: KIND_ICON[c.kind] ?? "run",
|
|
run: () => void executeAction("run.runConfig", c.id),
|
|
};
|
|
}
|
|
|
|
/** Configurations whose name contains every word of `query`, best (prefix) matches first. */
|
|
export function matchingConfigs(configs: readonly RunConfig[], query: string): RunConfig[] {
|
|
const words = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
const q = query.trim().toLowerCase();
|
|
return configs
|
|
.filter((c) => words.every((w) => c.name.toLowerCase().includes(w)))
|
|
.sort((a, b) => Number(b.name.toLowerCase().startsWith(q)) - Number(a.name.toLowerCase().startsWith(q)));
|
|
}
|
|
|
|
export const runConfigsRunAnything: RunAnythingProvider = {
|
|
id: "run.configs",
|
|
group: "Run Configurations",
|
|
order: 10,
|
|
items: (query) => matchingConfigs(useRun.getState().configs, query).map(item),
|
|
execute(line) {
|
|
const config = useRun.getState().configs.find((c) => c.name === line.trim());
|
|
if (!config) return false;
|
|
void executeAction("run.runConfig", config.id);
|
|
return true;
|
|
},
|
|
};
|