дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat: Third pass aligning core experience with IntelliJ IDEA
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
Цей коміт міститься в:
1 джерело
294198a727
коміт
1e00ea5ee2
426 files changed
+85241
-2886
No files matched your search
@@ -5,10 +5,16 @@
|
||||
* (`ide-http`).
|
||||
*/
|
||||
import { activeEditor, registerEditorContribution, registerLanguageMode } from "@/editor/api";
|
||||
import { registerActions } from "@/platform/actions";
|
||||
import { executeAction, getAction, registerActions } from "@/platform/actions";
|
||||
import { call, commands, emitLocalIdeEvent, IpcError, isTauri } from "@/platform/ipc";
|
||||
import { useProject } from "@/platform/project";
|
||||
import { editorService, notifications, registerServiceView, showServiceView } from "@/workbench/contributions";
|
||||
import {
|
||||
editorService,
|
||||
notifications,
|
||||
registerMenuGroup,
|
||||
registerServiceView,
|
||||
showServiceView,
|
||||
} from "@/workbench/contributions";
|
||||
import { HTTP_LANGUAGE, httpEditorExtension, refreshRequests, requestAtCaret } from "./editor";
|
||||
import { HttpClientHeaderActions, HttpClientView } from "./HttpClientView";
|
||||
import { httpLanguageDescription } from "./language";
|
||||
@@ -44,11 +50,31 @@ async function runAtCaret() {
|
||||
await runRequest(filePath(e.ctx.path, e.ctx.virtual), e.view.state.doc.toString(), r.index);
|
||||
}
|
||||
|
||||
/** New HTTP Request: a scratch `requests[_n].http` with an example request. */
|
||||
async function newRequest() {
|
||||
/** New › HTTP Request in `directory`: the name prompt of the file templates (features/templates), with the example body. */
|
||||
function newRequestArg(directory: string) {
|
||||
return {
|
||||
directory,
|
||||
template: {
|
||||
id: "http-request",
|
||||
name: "HTTP Request",
|
||||
icon: "file-http",
|
||||
extension: "http",
|
||||
nameStyle: "asis",
|
||||
kinds: [{ id: "request", label: "HTTP Request", body: NEW_REQUEST_TEMPLATE }],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function directoryArg(arg: unknown): string | null {
|
||||
const dir = (arg as { directory?: unknown } | undefined)?.directory;
|
||||
return typeof dir === "string" && dir ? dir : null;
|
||||
}
|
||||
|
||||
/** New HTTP Request: `requests[_n].http` in `directory`, else a scratch, with an example request. */
|
||||
async function newRequest(directory?: string) {
|
||||
try {
|
||||
const { appDataDir } = await import("@tauri-apps/api/path");
|
||||
const dir = `${(await appDataDir()).replace(/\/+$/, "")}/scratches`;
|
||||
const dir = directory ?? `${(await appDataDir()).replace(/\/+$/, "")}/scratches`;
|
||||
try {
|
||||
await call(commands.fsCreateDir(dir));
|
||||
} catch (e) {
|
||||
@@ -88,6 +114,13 @@ export function activate(): () => void {
|
||||
component: HttpClientView,
|
||||
headerActions: HttpClientHeaderActions,
|
||||
}),
|
||||
registerMenuGroup({
|
||||
id: "http.new",
|
||||
menus: ["new"],
|
||||
order: 20,
|
||||
items: (_menu, { paths: [directory] }) =>
|
||||
directory ? [{ kind: "action", action: "http.newRequest", arg: { directory }, label: "HTTP Request" }] : [],
|
||||
}),
|
||||
registerActions([
|
||||
{
|
||||
id: "http.runRequest",
|
||||
@@ -115,7 +148,13 @@ export function activate(): () => void {
|
||||
icon: "file-http",
|
||||
keywords: ["http client", "rest", "scratch", "curl"],
|
||||
when: "projectOpen",
|
||||
run: () => (isTauri() ? newRequest() : undefined),
|
||||
// `{ directory }` (New › HTTP Request): ask for the name there, like IDEA.
|
||||
run: async ({ arg }) => {
|
||||
const directory = directoryArg(arg);
|
||||
if (directory && getAction("templates.newFromTemplate"))
|
||||
await executeAction("templates.newFromTemplate", newRequestArg(directory));
|
||||
else if (isTauri()) await newRequest(directory ?? undefined);
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "http.showToolWindow",
|
||||
|
||||
Reference in new issue
Заблокувати користувача