дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 01:57:13 +02:00
In an SSH or WSL window, Export Test Results passed a path picked in the desktop's Save dialog to the project host. Project-side pickers (Export Test Results, Save As, patch and Git dialogs, Maven/Gradle linking, scopes, coverage and Java sources, database source files, deployment destinations, tool and plugin paths) now browse the project host, with overwrite confirmation kept; flows whose files belong to the desktop (keymap and color scheme import/export, database and ACP imports, Clone) read and write through the desktop process. Follow-up to #5439.
27 рядки
1017 B
TypeScript
27 рядки
1017 B
TypeScript
/** VCS › Create Git Repository…: `git init` in a folder chosen under the project. */
|
||
import { choosePath } from "@/platform/choosePath";
|
||
import { tx } from "@/platform/i18n";
|
||
import { call, commands } from "@/platform/ipc";
|
||
import { useProject } from "@/platform/project";
|
||
import { notifications } from "@/workbench/contributions";
|
||
import { discoverRoots } from "./store";
|
||
|
||
export async function createRepository() {
|
||
const root = useProject.getState().project?.root;
|
||
const dir = await choosePath({ title: tx("Select Directory for Git Init"), directory: true, defaultPath: root });
|
||
if (typeof dir !== "string") return;
|
||
try {
|
||
await call(commands.vcsInit(dir));
|
||
} catch (e) {
|
||
notifications().notify({
|
||
group: "vcs",
|
||
level: "error",
|
||
title: tx("Couldn't create Git repository"),
|
||
body: String((e as Error)?.message ?? e),
|
||
});
|
||
return;
|
||
}
|
||
notifications().notify({ group: "vcs", level: "info", title: tx`Created Git repository in ${dir}` });
|
||
await discoverRoots();
|
||
}
|