Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(project): clone a git repository from the create project dialog

vastsa10ba823a68dd
diff --git a/apps/desktop/electron/main/ipc/workspace-ipc.ts b/apps/desktop/electron/main/ipc/workspace-ipc.ts
index 97f2dbdf5..3c053ca3a 100644
--- a/apps/desktop/electron/main/ipc/workspace-ipc.ts
+++ b/apps/desktop/electron/main/ipc/workspace-ipc.ts
@@ -391,6 +391,28 @@ export function registerWorkspaceIpc({
});
return { workspace, canceled: false };
});
+
+ handle(
+ IPC.invoke.projectCloneCheckout,
+ async (input: { url?: unknown; parentPath?: unknown } = {}) => {
+ const url = typeof input.url === "string" ? input.url.trim() : "";
+ const parentPath =
+ typeof input.parentPath === "string" ? input.parentPath.trim() : "";
+ if (!url || !parentPath) {
+ throw Object.assign(
+ new Error("repository URL and parent folder required"),
+ { errorCode: ErrorCodes.INVALID_ARGUMENT },
+ );
+ }
+ // Clone only. The renderer still creates the logical project group, so
+ // the active host workspace stays untouched until activation.
+ const dest = await cloneGitRepository({ url, parentPath });
+ return {
+ path: dest,
+ name: dest.split(/[\\/]/).filter(Boolean).at(-1) || dest,
+ };
+ },
+ );
handle(IPC.invoke.projectSet, async (path: string) => {
if (!host) throw new Error("host unavailable");
setCurrentWorkspacePath(path);
diff --git a/apps/desktop/src/components/ProjectCreateDialog.tsx b/apps/desktop/src/components/ProjectCreateDialog.tsx
index c9d373ec9..a4b552aca 100644
--- a/apps/desktop/src/components/ProjectCreateDialog.tsx
+++ b/apps/desktop/src/components/ProjectCreateDialog.tsx
@@ -3,9 +3,11 @@ import { createPortal } from "react-dom";
import { useTranslation } from "react-i18next";
import { MAX_PROJECT_NAME_CHARS } from "../lib/sidebar-preferences";
import { api } from "../lib/api";
+import { parseGitCloneUrl } from "../lib/git-clone-url";
import { useAppStore } from "../stores/app-store";
import { Button, TooltipButton } from "./ui";
import {
+ IconBranch,
IconClose,
IconFolder,
IconMonitor,
@@ -14,6 +16,9 @@ import {
IconX,
} from "./icons";
+/** The Create project dialog creates from local folders or one git checkout. */
+type ProjectSource = "local" | "git";
+
function pathParts(path: string) {
return path.split(/[\\/]/).filter(Boolean);
}
@@ -37,19 +42,32 @@ export function ProjectCreateDialog() {
const open = useAppStore((state) => state.createProjectDialogOpen);
const close = useAppStore((state) => state.closeProjectDialog);
const createProject = useAppStore((state) => state.createProjectFromFolders);
+ const createProjectFromGit = useAppStore(
+ (state) => state.createProjectFromGit,
+ );
const showToast = useAppStore((state) => state.showToast);
+ const [source, setSource] = useState<ProjectSource>("local");
const [name, setName] = useState("");
const [folders, setFolders] = useState<string[]>([]);
+ const [gitUrl, setGitUrl] = useState("");
+ const [cloneParent, setCloneParent] = useState("");
const [busy, setBusy] = useState(false);
const inputRef = useRef<HTMLInputElement | null>(null);
const dialogRef = useRef<HTMLDivElement | null>(null);
const busyRef = useRef(false);
+ // The repository name seeds the project name until the user types their own.
+ const nameTouchedRef = useRef(false);
+ const cloneTarget = parseGitCloneUrl(gitUrl);
useEffect(() => {
if (!open) return;
+ setSource("local");
setName("");
setFolders([]);
+ setGitUrl("");
+ setCloneParent("");
busyRef.current = false;
+ nameTouchedRef.current = false;
setBusy(false);
const previousOverflow = document.body.style.overflow;
const previouslyFocused = document.activeElement as HTMLElement | null;
@@ -86,6 +104,12 @@ export function ProjectCreateDialog() {
};
}, [close, open]);
+ // A pasted repository URL names the project without stealing a typed name.
+ useEffect(() => {
+ if (source !== "git" || nameTouchedRef.current) return;
+ setName(cloneTarget?.name ?? "");
+ }, [cloneTarget?.name, source]);
+
if (!open) return null;
const addFolders = async () => {
@@ -106,17 +130,43 @@ export function ProjectCreateDialog() {
}
};
+ const chooseCloneParent = async () => {
+ if (busyRef.current) return;
+ try {
+ const result = await api.pickProjectFolders();
+ if (result.canceled || result.folders.length === 0) return;
+ setCloneParent(result.folders[0]);
+ } catch (error) {
+ showToast(error instanceof Error ? error.message : String(error), {
+ variant: "error",
+ });
+ }
+ };
+
const submit = async () => {
const trimmedName = name.trim();
- if (!trimmedName || folders.length === 0 || busyRef.current) return;
+ if (!trimmedName || busyRef.current) return;
+ if (source === "git") {
+ if (!cloneTarget || !cloneParent) return;
+ } else if (folders.length === 0) {
+ return;
+ }
busyRef.current = true;
setBusy(true);
try {
- await createProject({
- name: trimmedName,
- folders,
- primaryPath: folders[0],
- });
+ if (source === "git" && cloneTarget) {
+ await createProjectFromGit({
+ name: trimmedName,
+ url: cloneTarget.url,
+ parentPath: cloneParent,
+ });
+ } else {
+ await createProject({
+ name: trimmedName,
+ folders,
+ primaryPath: folders[0],
+ });
+ }
} catch (error) {
showToast(error instanceof Error ? error.message : String(error), {
variant: "error",
@@ -191,7 +241,10 @@ export function ProjectCreateDialog() {
className="field-input project-create-dialog-name-field"
value={name}
maxLength={MAX_PROJECT_NAME_CHARS}
- onChange={(event) => setName(event.target.value)}
+ onChange={(event) => {
+ nameTouchedRef.current = true;
+ setName(event.target.value);
+ }}
aria-label={t("project.createNameLabel")}
disabled={busy}
spellCheck={false}
@@ -201,75 +254,184 @@ export function ProjectCreateDialog() {
</section>
<section
- className="project-create-dialog-section project-create-dialog-folders"
- aria-labelledby="project-create-folders-heading"
+ className="project-create-dialog-section project-create-dialog-source-section"
+ aria-labelledby="project-create-source-heading"
>
<div className="project-create-dialog-section-head">
- <h3 id="project-create-folders-heading" className="project-create-dialog-section-title">
- {t("project.createFoldersLabel")}
- {folders.length > 0 ? (
- <span className="project-create-dialog-count">{folders.length}</span>
- ) : null}
+ <h3
+ id="project-create-source-heading"
+ className="project-create-dialog-section-title"
+ >
+ {t("project.createSourceLabel")}
</h3>
- <span className="project-create-dialog-source" data-project-source="local">
+ </div>
+ <div
+ className="project-create-dialog-source-options"
+ role="group"
+ aria-label={t("project.createSourceLabel")}
+ >
+ <button
+ type="button"
+ className={`project-create-dialog-source-option${
+ source === "local" ? " is-active" : ""
+ }`}
+ data-project-source="local"
+ aria-pressed={source === "local"}
+ disabled={busy}
+ onClick={() => setSource("local")}
+ >
<IconMonitor size={15} aria-hidden />
{t("project.createComputer")}
- </span>
+ </button>
+ <button
+ type="button"
+ className={`project-create-dialog-source-option${
+ source === "git" ? " is-active" : ""
+ }`}
+ data-project-source="git"
+ aria-pressed={source === "git"}
+ disabled={busy}
+ onClick={() => setSource("git")}
+ >
+ <IconBranch size={15} aria-hidden />
+ {t("project.createSourceGit")}
+ </button>
</div>
+ </section>
- {folders.length > 0 ? (
- <div className="project-create-dialog-folder-list" role="list">
- {folders.map((path, index) => (
- <div
- className={`project-create-folder-row${index === 0 ? " is-primary" : ""}`}
- key={path}
- role="listitem"
- >
- <span className="project-create-folder-icon" aria-hidden>
- <IconFolder size={17} />
- </span>
- <span className="project-create-folder-copy" title={path}>
- <span className="project-create-folder-name">{folderName(path)}</span>
- <span className="project-create-folder-path">{folderParent(path)}</span>
- </span>
- {index === 0 ? (
- <span className="project-create-primary-tag">
- <IconStar size={11} fill="currentColor" aria-hidden />
- {t("project.createPrimary")}
- </span>
- ) : null}
- <TooltipButton
- type="button"
- className="project-create-folder-remove"
- tooltip={t("project.createRemoveFolder")}
- ariaLabel={`${t("project.createRemoveFolder")}: ${folderName(path)}`}
- disabled={busy}
- onClick={() => setFolders((current) => current.filter((item) => item !== path))}
- >
- <IconX size={15} />
- </TooltipButton>
- </div>
- ))}
+ {source === "local" ? (
+ <section
+ className="project-create-dialog-section project-create-dialog-folders"
+ aria-labelledby="project-create-folders-heading"
+ >
+ <div className="project-create-dialog-section-head">
+ <h3 id="project-create-folders-heading" className="project-create-dialog-section-title">
+ {t("project.createFoldersLabel")}
+ {folders.length > 0 ? (
+ <span className="project-create-dialog-count">{folders.length}</span>
+ ) : null}
+ </h3>
+ <span className="project-create-dialog-source" data-project-source="local">
+ <IconMonitor size={15} aria-hidden />
+ {t("project.createComputer")}
+ </span>
</div>
- ) : null}
- <button
- type="button"
- aria-label={t("project.createAddFolder")}
- className={`project-create-add-folder${folders.length === 0 ? " is-empty" : ""}`}
- onClick={() => void addFolders()}
- disabled={busy}
+ {folders.length > 0 ? (
+ <div className="project-create-dialog-folder-list" role="list">
+ {folders.map((path, index) => (
+ <div
+ className={`project-create-folder-row${index === 0 ? " is-primary" : ""}`}
+ key={path}
+ role="listitem"
+ >
+ <span className="project-create-folder-icon" aria-hidden>
+ <IconFolder size={17} />
+ </span>
+ <span className="project-create-folder-copy" title={path}>
+ <span className="project-create-folder-name">{folderName(path)}</span>
+ <span className="project-create-folder-path">{folderParent(path)}</span>
+ </span>
+ {index === 0 ? (
+ <span className="project-create-primary-tag">
+ <IconStar size={11} fill="currentColor" aria-hidden />
+ {t("project.createPrimary")}
+ </span>
+ ) : null}
+ <TooltipButton
+ type="button"
+ className="project-create-folder-remove"
+ tooltip={t("project.createRemoveFolder")}
+ ariaLabel={`${t("project.createRemoveFolder")}: ${folderName(path)}`}
+ disabled={busy}
+ onClick={() => setFolders((current) => current.filter((item) => item !== path))}
+ >
+ <IconX size={15} />
+ </TooltipButton>
+ </div>
+ ))}
+ </div>
+ ) : null}
+
+ <button
+ type="button"
+ aria-label={t("project.createAddFolder")}
+ className={`project-create-add-folder${folders.length === 0 ? " is-empty" : ""}`}
+ onClick={() => void addFolders()}
+ disabled={busy}
+ >
+ <span className="project-create-add-folder-icon" aria-hidden>
+ <IconNewProject size={18} />
+ </span>
+ <span className="project-create-add-folder-copy">
+ <span className="project-create-add-folder-title">
+ {t("project.createAddFolder")}
+ </span>
+ </span>
+ </button>
+ </section>
+ ) : (
+ <section
+ className="project-create-dialog-section project-create-dialog-clone"
+ aria-labelledby="project-create-clone-heading"
>
- <span className="project-create-add-folder-icon" aria-hidden>
- <IconNewProject size={18} />
- </span>
- <span className="project-create-add-folder-copy">
- <span className="project-create-add-folder-title">
- {t("project.createAddFolder")}
+ <div className="project-create-dialog-section-head">
+ <h3 id="project-create-clone-heading" className="project-create-dialog-section-title">
+ {t("project.createRepositoryLabel")}
+ </h3>
+ <span className="project-create-dialog-source" data-project-source="git">
+ <IconBranch size={15} aria-hidden />
+ {t("project.createSourceGit")}
</span>
- </span>
- </button>
- </section>
+ </div>
+
+ <input
+ id="project-create-clone-url"
+ className="field-input project-create-dialog-url-field"
+ value={gitUrl}
+ placeholder={t("project.cloneUrlPlaceholder")}
+ aria-label={t("project.createRepositoryLabel")}
+ spellCheck={false}
+ autoCorrect="off"
+ autoCapitalize="off"
+ autoComplete="off"
+ disabled={busy}
+ onChange={(event) => setGitUrl(event.target.value)}
+ />
+
+ <button
+ type="button"
+ className={`project-create-dialog-location${
+ cloneParent ? " is-chosen" : ""
+ }`}
+ aria-label={t("project.createChooseLocation")}
+ onClick={() => void chooseCloneParent()}
+ disabled={busy}
+ >
+ <span className="project-create-dialog-location-icon" aria-hidden>
+ <IconFolder size={17} />
+ </span>
+ <span className="project-create-dialog-location-copy">
+ <span className="project-create-dialog-location-title">
+ {cloneParent
+ ? folderName(cloneParent)
+ : t("project.createChooseLocation")}
+ </span>
+ <span className="project-create-dialog-location-path">
+ {cloneParent
+ ? folderParent(cloneParent)
+ : t("project.createLocationHint")}
+ </span>
+ </span>
+ </button>
+
+ <p className="project-create-dialog-clone-hint" role="status">
+ {cloneTarget
+ ? t("project.cloneDestHint", { name: cloneTarget.name })
+ : t("project.cloneUrlHint")}
+ </p>
+ </section>
+ )}
</div>
<div className="project-create-dialog-actions">
@@ -279,9 +441,19 @@ export function ProjectCreateDialog() {
<Button
type="submit"
variant="primary"
- disabled={!name.trim() || folders.length === 0 || busy}
+ disabled={
+ source === "git"
+ ? !name.trim() || !cloneTarget || !cloneParent || busy
+ : !name.trim() || folders.length === 0 || busy
+ }
>
- {busy ? t("project.createSaving") : t("project.createAction")}
+ {busy
+ ? source === "git"
+ ? t("project.cloning")
+ : t("project.createSaving")
+ : source === "git"
+ ? t("project.cloneAction")
+ : t("project.createAction")}
</Button>
</div>
</form>
diff --git a/apps/desktop/src/lib/api.ts b/apps/desktop/src/lib/api.ts
index a16d45383..bc282c853 100644
--- a/apps/desktop/src/lib/api.ts
+++ b/apps/desktop/src/lib/api.ts
@@ -534,6 +534,11 @@ export const api = {
IPC.invoke.projectClone,
{ url },
),
+ cloneProjectInto: (url: string, parentPath: string) =>
+ invoke<{ path: string; name: string }>(IPC.invoke.projectCloneCheckout, {
+ url,
+ parentPath,
+ }),
pickFiles: () =>
invoke<{ token: string | null; canceled?: boolean }>(IPC.invoke.composerPickFiles),
getDroppedFilePath: (file: File) =>
diff --git a/apps/desktop/src/stores/app-state.ts b/apps/desktop/src/stores/app-state.ts
index 3d54a80e9..7df47228e 100644
--- a/apps/desktop/src/stores/app-state.ts
+++ b/apps/desktop/src/stores/app-state.ts
@@ -248,6 +248,12 @@ export type AppState = {
folders: string[];
primaryPath: string;
}) => Promise<void>;
+ /** Clone a public git remote into a chosen folder, then create its project. */
+ createProjectFromGit: (input: {
+ name: string;
+ url: string;
+ parentPath: string;
+ }) => Promise<void>;
cloneProject: (url: string) => Promise<ProjectWorkspace | null>;
/** Re-read the active workspace metadata without changing the visible project. */
refreshProject: (path: string) => Promise<ProjectWorkspace | null>;
diff --git a/apps/desktop/src/stores/slices/project-slice.ts b/apps/desktop/src/stores/slices/project-slice.ts
index bb6222f40..dc48e8247 100644
--- a/apps/desktop/src/stores/slices/project-slice.ts
+++ b/apps/desktop/src/stores/slices/project-slice.ts
@@ -59,6 +59,65 @@ export type ProjectSliceDependencies = StoreAccess & {
persistCurrentSidebar: (getState: () => AppState) => void;
};
+/**
+ * Create one logical project group from already-resolved folders and activate
+ * its primary root. The Create project dialog reaches this through a local
+ * folder pick and through a git checkout, so both sources share one project
+ * semantic and one activation path.
+ */
+async function createNamedProjectGroup(
+ {
+ get,
+ set,
+ runtime,
+ }: Pick<ProjectSliceDependencies, "get" | "set" | "runtime">,
+ {
+ name,
+ folders,
+ primaryPath,
+ }: { name: string; folders: string[]; primaryPath?: string },
+): Promise<void> {
+ const normalizedName = name.trim();
+ if (!normalizedName) {
+ throw new Error(i18n.t("errors.projectNameLength"));
+ }
+ const uniqueFolders = folders.filter(
+ (path, index, all) =>
+ Boolean(normalizeProjectPath(path)) &&
+ all.findIndex(
+ (candidate) => normalizeProjectPath(candidate) === normalizeProjectPath(path),
+ ) === index,
+ );
+ if (uniqueFolders.length === 0) {
+ throw new Error(i18n.t("project.createFolderRequired"));
+ }
+ const normalizedPrimary = normalizeProjectPath(primaryPath ?? uniqueFolders[0]);
+ const primary =
+ uniqueFolders.find((path) => normalizeProjectPath(path) === normalizedPrimary) ??
+ uniqueFolders[0];
+ const orderedFolders = [
+ primary,
+ ...uniqueFolders.filter(
+ (path) => normalizeProjectPath(path) !== normalizeProjectPath(primary),
+ ),
+ ];
+ const intent = runtime.beginNavigationIntent();
+ const created = await api.createProjectGroup(normalizedName, orderedFolders);
+ if (!runtime.navigationIntentIsCurrent(intent)) return;
+ const groupPrimary = created.group.primaryPath || primary;
+ const workspace = await get().activateProject(groupPrimary, {
+ navigationIntent: intent,
+ });
+ if (!workspace || !runtime.navigationIntentIsCurrent(intent)) return;
+ // Keep the existing renderer-local metadata in sync so the sidebar can
+ // render the group name immediately; the host group is authoritative on
+ // the next archive refresh and for agent context.
+ get().renameProject(groupPrimary, normalizedName);
+ const onboarding = await api.getOnboarding();
+ if (!runtime.navigationIntentIsCurrent(intent)) return;
+ set({ createProjectDialogOpen: false, onboarding, page: "chat" });
+}
+
/**
* Purge renderer-local state for one session whose durable row is already gone
* (deleted directly, or removed together with its project). This never talks to
@@ -163,6 +222,7 @@ export function createProjectSlice({
| "openProject"
| "closeProjectDialog"
| "createProjectFromFolders"
+ | "createProjectFromGit"
| "clearProject"
| "deleteProject"
| "toggleSessionPinned"
@@ -317,46 +377,19 @@ export function createProjectSlice({
closeProjectDialog: () => {
set({ createProjectDialogOpen: false });
},
- createProjectFromFolders: async ({ name, folders, primaryPath }) => {
- const normalizedName = name.trim();
- if (!normalizedName) {
- throw new Error(i18n.t("errors.projectNameLength"));
- }
- const uniqueFolders = folders.filter(
- (path, index, all) =>
- Boolean(normalizeProjectPath(path)) &&
- all.findIndex(
- (candidate) => normalizeProjectPath(candidate) === normalizeProjectPath(path),
- ) === index,
+ createProjectFromFolders: async ({ name, folders, primaryPath }) =>
+ createNamedProjectGroup(
+ { get, set, runtime },
+ { name, folders, primaryPath },
+ ),
+ createProjectFromGit: async ({ name, url, parentPath }) => {
+ // Clone first, then create the project through the same group path, so a
+ // checkout and a folder pick produce identical project semantics.
+ const checkout = await api.cloneProjectInto(url, parentPath);
+ await createNamedProjectGroup(
+ { get, set, runtime },
+ { name, folders: [checkout.path], primaryPath: checkout.path },
);
- if (uniqueFolders.length === 0) {
- throw new Error(i18n.t("project.createFolderRequired"));
- }
- const normalizedPrimary = normalizeProjectPath(primaryPath);
- const primary =
- uniqueFolders.find((path) => normalizeProjectPath(path) === normalizedPrimary) ??
- uniqueFolders[0];
- const orderedFolders = [
- primary,
- ...uniqueFolders.filter(
- (path) => normalizeProjectPath(path) !== normalizeProjectPath(primary),
- ),
- ];
- const intent = runtime.beginNavigationIntent();
- const created = await api.createProjectGroup(normalizedName, orderedFolders);
- if (!runtime.navigationIntentIsCurrent(intent)) return;
- const groupPrimary = created.group.primaryPath || primary;
- const workspace = await get().activateProject(groupPrimary, {
- navigationIntent: intent,
- });
- if (!workspace || !runtime.navigationIntentIsCurrent(intent)) return;
- // Keep the existing renderer-local metadata in sync so the sidebar can
- // render the group name immediately; the host group is authoritative on
- // the next archive refresh and for agent context.
- get().renameProject(groupPrimary, normalizedName);
- const onboarding = await api.getOnboarding();
- if (!runtime.navigationIntentIsCurrent(intent)) return;
- set({ createProjectDialogOpen: false, onboarding, page: "chat" });
},
clearProject: async (opts) => {
diff --git a/apps/desktop/src/styles/project-create-dialog.css b/apps/desktop/src/styles/project-create-dialog.css
index 90b444476..3ef4ffef3 100644
--- a/apps/desktop/src/styles/project-create-dialog.css
+++ b/apps/desktop/src/styles/project-create-dialog.css
@@ -152,6 +152,131 @@
white-space: nowrap;
}
+.project-create-dialog-source-options {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 8px;
+}
+
+.project-create-dialog-source-option {
+ display: inline-flex;
+ min-height: 34px;
+ align-items: center;
+ justify-content: center;
+ gap: 6px;
+ border: 1px solid var(--ds-border-subtle);
+ border-radius: var(--radius-md);
+ background: var(--ds-tile);
+ color: var(--ds-text-secondary);
+ font-size: var(--text-sm-plus);
+ font-weight: var(--font-weight-medium);
+ line-height: var(--leading-compact-plus);
+ transition:
+ background var(--motion-duration-fast) var(--motion-ease-out),
+ border-color var(--motion-duration-fast) var(--motion-ease-out),
+ color var(--motion-duration-fast) var(--motion-ease-out);
+}
+
+.project-create-dialog-source-option:hover:not(:disabled) {
+ background: var(--ds-tile-hover);
+ color: var(--ds-text-primary);
+}
+
+.project-create-dialog-source-option.is-active {
+ border-color: color-mix(in oklab, var(--ds-accent) 55%, transparent);
+ background: color-mix(in oklab, var(--ds-accent) 12%, var(--ds-tile));
+ color: var(--ds-text-primary);
+}
+
+.project-create-dialog-source-option:focus-visible,
+.project-create-dialog-url-field:focus-visible,
+.project-create-dialog-location:focus-visible {
+ outline: 1.5px solid color-mix(in oklab, var(--ds-accent) 80%, transparent);
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.project-create-dialog-url-field {
+ min-width: 0;
+ min-height: 32px;
+ padding: 6px 12px;
+ font-size: var(--text-base);
+ font-weight: var(--font-weight-normal);
+ line-height: var(--leading-normal);
+}
+
+.project-create-dialog-url-field::placeholder {
+ color: var(--ds-text-muted);
+}
+
+.project-create-dialog-location {
+ display: flex;
+ width: 100%;
+ align-items: center;
+ gap: 10px;
+ margin-top: 8px;
+ border-radius: var(--radius-md);
+ background: var(--ds-tile);
+ padding: 10px 12px;
+ color: var(--ds-text-primary);
+ text-align: left;
+ transition: background var(--motion-duration-fast) var(--motion-ease-out);
+}
+
+.project-create-dialog-location:hover:not(:disabled) {
+ background: var(--ds-tile-hover);
+}
+
+.project-create-dialog-location-icon {
+ display: inline-flex;
+ width: 28px;
+ height: 28px;
+ flex: 0 0 auto;
+ align-items: center;
+ justify-content: center;
+ border-radius: var(--radius-sm);
+ background: var(--ds-tile-deep);
+ color: var(--ds-text-secondary);
+}
+
+.project-create-dialog-location.is-chosen .project-create-dialog-location-icon {
+ color: var(--ds-accent);
+}
+
+.project-create-dialog-location-copy {
+ display: flex;
+ min-width: 0;
+ flex: 1;
+ flex-direction: column;
+ gap: 2px;
+}
+
+.project-create-dialog-location-title {
+ overflow: hidden;
+ color: var(--ds-text-primary);
+ font-size: var(--text-md);
+ font-weight: var(--font-weight-medium);
+ line-height: var(--leading-compact-plus);
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.project-create-dialog-location-path {
+ overflow: hidden;
+ color: var(--ds-text-muted);
+ font-size: var(--text-xs-plus);
+ line-height: var(--leading-compact);
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.project-create-dialog-clone-hint {
+ margin: 8px 0 0;
+ color: var(--ds-text-muted);
+ font-size: var(--text-xs-plus);
+ line-height: var(--leading-compact);
+}
+
.project-create-dialog-count {
display: inline-flex;
min-width: 18px;
@@ -376,9 +501,13 @@
@media (prefers-reduced-motion: reduce) {
.project-create-dialog-close,
.project-create-dialog-name-field,
+ .project-create-dialog-source-option,
+ .project-create-dialog-location,
.project-create-folder-row,
.project-create-folder-remove,
.project-create-add-folder {
transition: none;
}
+ transition: none;
+ }
}
diff --git a/apps/desktop/test/git-clone.test.mjs b/apps/desktop/test/git-clone.test.mjs
index 57d8083e5..2e1aeb983 100644
--- a/apps/desktop/test/git-clone.test.mjs
+++ b/apps/desktop/test/git-clone.test.mjs
@@ -92,3 +92,25 @@ test("cloneGitRepository runs git clone -- url dest", async () => {
rmSync(root, { recursive: true, force: true });
}
});
+
+test("cloneGitRepository rejects a private host before git runs", async () => {
+ const root = mkdtempSync(join(tmpdir(), "pi-clone-"));
+ try {
+ let ran = false;
+ await assert.rejects(
+ () =>
+ cloneGitRepository({
+ url: "https://192.168.1.2/team/repo.git",
+ parentPath: root,
+ run: async () => {
+ ran = true;
+ return { code: 0, stderr: "" };
+ },
+ }),
+ /git repository URL/,
+ );
+ assert.equal(ran, false);
+ } finally {
+ rmSync(root, { recursive: true, force: true });
+ }
+});
diff --git a/apps/desktop/test/project-create-dialog.test.mjs b/apps/desktop/test/project-create-dialog.test.mjs
index 7a09dd4e6..3e1334963 100644
--- a/apps/desktop/test/project-create-dialog.test.mjs
+++ b/apps/desktop/test/project-create-dialog.test.mjs
@@ -29,10 +29,33 @@ test("create project dialog supports named multi-folder setup", () => {
assert.match(dialog, /project-create-dialog-content/);
assert.match(dialog, /project-create-dialog-section/);
assert.match(dialog, /project-create-dialog-field-label/);
- assert.match(dialog, /disabled=\{!name\.trim\(\) \|\| folders\.length === 0 \|\| busy\}/);
+ assert.match(dialog, /!name\.trim\(\) \|\| folders\.length === 0 \|\| busy/);
assert.match(dialog, /querySelectorAll<HTMLElement>\(/);
});
+test("create project dialog can create the project from a git checkout", () => {
+ // Same dialog, same name field: the source toggle turns the folder list into
+ // one repository URL plus its clone destination.
+ assert.match(dialog, /type ProjectSource = "local" \| "git"/);
+ assert.match(dialog, /data-project-source="git"/);
+ assert.match(dialog, /parseGitCloneUrl/);
+ assert.match(dialog, /project\.createSourceLabel/);
+ assert.match(dialog, /project\.createRepositoryLabel/);
+ assert.match(dialog, /project\.createChooseLocation/);
+ assert.match(dialog, /project\.cloneDestHint/);
+ assert.match(dialog, /api\.pickProjectFolders\(\)/);
+ assert.match(dialog, /createProjectFromGit\(\{/);
+ assert.match(dialog, /url: cloneTarget\.url/);
+ assert.match(dialog, /parentPath: cloneParent/);
+ assert.match(dialog, /!name\.trim\(\) \|\| !cloneTarget \|\| !cloneParent \|\| busy/);
+ assert.match(dialog, /project\.cloning/);
+ assert.match(store, /createProjectFromGit: async \(\{ name, url, parentPath \}\)/);
+ assert.match(store, /api\.cloneProjectInto\(url, parentPath\)/);
+ assert.match(store, /folders: \[checkout\.path\], primaryPath: checkout\.path/);
+ assert.match(api, /cloneProjectInto: \(url: string, parentPath: string\)/);
+ assert.match(protocol, /projectCloneCheckout:\s*"pi-desktop\/project\/cloneCheckout"/);
+});
+
test("project creation creates one logical group with a primary workspace", () => {
assert.match(store, /createProjectDialogOpen: boolean/);
assert.match(store, /openProject: async \(\) => \{\s*set\(\{ createProjectDialogOpen: true \}\)/);
@@ -43,6 +66,9 @@ test("project creation creates one logical group with a primary workspace", () =
assert.doesNotMatch(store, /for \(const path of orderedFolders\)/);
assert.match(store, /get\(\)\.renameProject\(groupPrimary, normalizedName\)/);
assert.match(store, /set\(\{ createProjectDialogOpen: false, onboarding, page: "chat" \}\)/);
+ // Folder picks and git checkouts share one project creation semantic.
+ assert.match(store, /async function createNamedProjectGroup\(/);
+ assert.match(store, /createProjectFromFolders: async \(\{ name, folders, primaryPath \}\) =>\s*createNamedProjectGroup\(/);
});
test("folder picker is a renderer-only multi-directory selection", () => {
@@ -62,6 +88,18 @@ test("folder picker is a renderer-only multi-directory selection", () => {
assert.doesNotMatch(handler, /workspace\.set/);
});
+test("clone checkout handler clones without touching the active workspace", () => {
+ const start = main.indexOf("IPC.invoke.projectCloneCheckout");
+ const end = main.indexOf("IPC.invoke.projectSet", start);
+ const handler = main.slice(start, end);
+ assert.ok(start >= 0 && end > start, "clone checkout handler should exist");
+ assert.match(handler, /parentPath/);
+ assert.match(handler, /cloneGitRepository\(\{ url, parentPath \}\)/);
+ // The renderer still creates the group, so the handler never sets a workspace.
+ assert.doesNotMatch(handler, /workspace\.set/);
+ assert.doesNotMatch(handler, /dialog\.showOpenDialog/);
+});
+
test("create project dialog remains usable on narrow screens and reduced motion", () => {
assert.match(styles, /width: min\(100%, 480px\)/);
assert.match(styles, /border-radius: var\(--radius-lg-plus\)/);
@@ -75,4 +113,8 @@ test("create project dialog remains usable on narrow screens and reduced motion"
assert.match(styles, /project-create-dialog-actions/);
assert.match(styles, /@media \(prefers-reduced-motion: reduce\)/);
assert.match(styles, /overflow-y: auto/);
+ assert.match(styles, /\.project-create-dialog-source-options \{/);
+ assert.match(styles, /\.project-create-dialog-source-option\.is-active \{/);
+ assert.match(styles, /\.project-create-dialog-location\.is-chosen/);
+ assert.match(styles, /\.project-create-dialog-clone-hint \{/);
});
diff --git a/docs/adr/0273-git-checkout-create-project-source.md b/docs/adr/0273-git-checkout-create-project-source.md
new file mode 100644
index 000000000..22f1e6836
--- /dev/null
+++ b/docs/adr/0273-git-checkout-create-project-source.md
@@ -0,0 +1,62 @@
+# ADR 0273: Git Checkout as a Create Project Source
+
+- Status: Accepted for implementation
+- Date: 2026-09-17
+- Deciders: PI-Desktop desktop UI maintainers
+- Amends: ADR 0233, ADR 0247
+
+## Context
+
+ADR 0233 gave the renderer one Create project surface that collects a name and
+local folders, and the home switcher already cloned a git project through
+`project/clone` under the public-host rules of ADR 0247. A user with no project
+at all still could not start from a repository: the switcher only renders
+inside the hero of a project-bound session, and the dialog had no repository
+source. The first project of a fresh installation therefore required a local
+folder before any clone entry was reachable.
+
+The existing clone picks its parent through a native dialog and returns a
+workspace the renderer activates immediately. Reusing it inside the dialog would
+either end the dialog flow halfway or activate a project before its group
+exists.
+
+## Decision
+
+1. The Create project dialog owns a source selector with two equal peers: This
+ computer (local folders) and Git repository.
+2. The git source keeps the dialog's one name field, adds a repository URL field
+ and one clone destination row, and parses the URL in the renderer with the
+ same `parseGitCloneUrl` rules the home switcher uses (ADR 0247).
+3. Main exposes additive `project/cloneCheckout({ url, parentPath })`: it clones
+ into an explicit parent folder and returns `{ path, name }` without touching
+ the active workspace and without opening a picker.
+4. Project creation still flows through `project-group/create`. A checkout
+ becomes the primary root of one logical group and the entered name names the
+ group, exactly like a folder pick (ADR 0233). Folder picks and checkouts
+ share one creation helper in the project slice.
+5. `project/clone` keeps its current behavior for the home switcher; the two
+ clone entries do not share UI.
+
+## Consequences
+
+- A fresh installation can create its first project directly from a public
+ repository without opening an unrelated folder first.
+- The clone destination is explicit: the dialog collects it before `git clone`
+ runs, so a checkout never lands in an implicit directory.
+- Private, loopback, link-local, credential-bearing, and malformed remotes stay
+ rejected before git runs (ADR 0247); the dialog disables Create for them.
+- A checkout that succeeds while group creation fails leaves the cloned folder
+ on disk; the error surfaces as a toast and the folder can be added afterwards.
+- No protocol, schema, host RPC, or storage change: the new channel is a narrow
+ main-process capability, and the host still owns every durable project record.
+
+## Alternatives considered
+
+- **Move the home switcher clone entry to the empty home:** rejected because the
+ hero without a project-bound session has no switcher surface, and the create
+ dialog is the documented first-project entry.
+- **Reuse `project/clone` inside the dialog:** rejected because its native parent
+ picker and immediate workspace return would activate a project before the group
+ is created.
+- **Let the main process pick the destination silently:** rejected because a
+ `git clone` should never choose its own destination folder.
diff --git a/docs/adr/README.md b/docs/adr/README.md
index 27917774a..50df04fc9 100644
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@ -299,3 +299,4 @@ Each ADR includes:
| 0269 | [Move capability documents between the global and project levels](0269-capability-level-transfer.md) | Accepted for implementation (amends ADR 0112) |
| 0268 | Remove quotes, annotations, and side chats | Accepted (supersedes message-quotes-and-side-chats / response-annotations / floating-annotation-index) |
| 0272 | [Judge a public-network address on the route the request will dial](0272-connection-time-public-network-route.md) | Accepted for implementation (amends ADR 0243; issue #419 / PR #473) |
+| 0273 | [Git checkout as a Create project source](0273-git-checkout-create-project-source.md) | Accepted for implementation (amends ADR 0233; ADR 0247) |
diff --git a/docs/spec/03-runtime/01-ipc-protocol.md b/docs/spec/03-runtime/01-ipc-protocol.md
index 923884750..7f438e461 100644
--- a/docs/spec/03-runtime/01-ipc-protocol.md
+++ b/docs/spec/03-runtime/01-ipc-protocol.md
@@ -56,6 +56,7 @@ Examples:
- `pi-desktop/project/open`
- `pi-desktop/project/pickFolders`
- `pi-desktop/project/clone`
+- `pi-desktop/project/cloneCheckout`
- `pi-desktop/project/openFolder`
- `pi-desktop/project-group/list`
- `pi-desktop/project-group/create`
@@ -1257,6 +1258,10 @@ authorization code. `accountLabel` is a display string.
changing the active workspace
- `project/clone({ url })`: pick a parent directory, `git clone` the URL into
it, and return the cloned workspace (the renderer then activates it)
+- `project/cloneCheckout({ url, parentPath })`: `git clone` a public remote
+ into an explicit parent folder and return `{ path, name }` without changing
+ the active workspace; the Create project dialog uses it before it creates the
+ logical project group
- `project/openFolder(path)`: open a known project directory in the system file
manager
- `project/get()`: current workspace
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index 796321b15..ff9ba3ffc 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -480,7 +480,11 @@ visually distinct from list content.
activated and names the group, while every other selected folder is retained
as a group root and is shown in Project archive details, not as an open
project tab. Group chats, instructions, and memory use the same group
- identity. The dialog follows
+ identity. A source selector offers This computer and Git repository: the git
+ source swaps the folder list for a repository URL field plus a clone
+ destination row, seeds the project name from the repository name until the
+ user types their own, and creates the project by cloning into the chosen
+ folder first. The dialog follows
the shell's neutral gray surfaces, with a 480px maximum width,
`--radius-lg-plus` (18px) corners, and the shared `--ds-shadow-dialog`
elevation. Its compact type hierarchy uses `--text-lg` for the title,
@@ -492,9 +496,9 @@ visually distinct from list content.
repeat its label as placeholder text. Edit project reuses the same surface,
loads the host-owned group, allows the name and non-primary folders to be
adjusted, keeps Primary first and non-removable, and rejects removal of a
- folder that still owns chats. The folder section exposes the current
- local source as a compact source chip; a future remote source can replace
- that slot without changing the project name or workspace list contract. The
+ folder that still owns chats. The source selector offers This computer and
+ Git repository as equal peers; a repository URL reuses the clone rules of
+ ADR 0247 and its checkout becomes the primary root of the same group.
dialog does not add explanatory copy for durable memory or multi-selection.
The surface has no outer stroke, section rules, footer divider, or dashed
picker border. The action row stays fixed while the content scrolls; narrow
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 3f7b46de5..316512b9f 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -11939,6 +11939,33 @@ plugin-form fixtures in an isolated temporary directory at runtime.
- **Milestone**: M5
- **Status**: Unit-covered (`apps/desktop/test/git-clone.test.mjs`)
+
+#### E2E-258: Create project dialog can start from a git repository
+
+- **Preconditions**: The Create project dialog opens from the Projects heading
+ (no existing project is required); `git` is installed.
+- **Steps**:
+ 1. Switch the source selector to Git repository.
+ 2. Paste `https://github.com/octocat/Hello-World.git` and confirm the project
+ name field is seeded with `Hello-World`, then type a custom name.
+ 3. Choose a clone destination folder and confirm the destination row shows it.
+ 4. Confirm Create and inspect the workspace, sidebar, and project archive.
+ 5. Reopen the dialog, switch to Git repository, and paste a private or
+ malformed remote.
+- **Expected**: The dialog swaps the folder list for a repository URL field plus
+ a clone destination row and keeps one project name field; Create stays
+ disabled until the URL parses and a folder is chosen. Confirming runs
+ `git clone` into the chosen folder with the renderer still owning project
+ creation: the checkout becomes the primary root and the entered name names the
+ group. Private, loopback, link-local, credential-bearing, and malformed
+ remotes leave Create disabled (ADR 0247) and no folder is written.
+- **Specs linked**: `03-runtime/01-ipc-protocol.md` §9, `04-ux/08-component-spec.md`,
+ ADR 0273, ADR 0233, ADR 0247
+- **Acceptance**: Quality (project entry), D (workspace)
+- **Milestone**: M5
+- **Status**: Unit-covered (`apps/desktop/test/project-create-dialog.test.mjs`,
+ `apps/desktop/test/git-clone.test.mjs`); full UI scenario Draft (run only in a
+ capable environment when this surface changes)
#### E2E-257: Importing into an archived project restores its visibility
- **Preconditions**: A durable project has been archived in the renderer
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 7cee8dde7..7d83ae5ac 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -5735,3 +5735,26 @@ that was sitting at the bottom — including after the turn had finished.
`--ds-bg-composer` / `--ds-tile-deep`. See
`04-ux/11-asktool-question-card.md`, `04-ux/07-ui-design-system.md` §6.4, and
E2E-078.
+
+## 2026-09-17 — A git checkout is a Create project source (D438)
+
+- The Create project dialog only collected a project name and local folders
+ (ADR 0233), and the home switcher's Clone git project entry renders inside the
+ hero of a project-bound session. A fresh installation therefore had to open an
+ unrelated local folder before any repository could be cloned.
+- The dialog now owns a source selector with two equal peers: This computer and
+ Git repository. The git source keeps the one name field (seeded from the
+ repository name until the user types), adds a repository URL field and one
+ clone destination row, and parses URLs with the switcher's `parseGitCloneUrl`
+ rules, so private, loopback, link-local, credential-bearing, and malformed
+ remotes keep Create disabled (ADR 0247).
+- Main exposes additive `project/cloneCheckout({ url, parentPath })`: it clones
+ into the explicit parent folder and returns `{ path, name }` without touching
+ the active workspace and without opening a picker. `project/clone` keeps its
+ native-picker behavior for the home switcher.
+- Project creation is unchanged: both sources call one project-slice helper,
+ `project-group/create` still writes the only durable record, and a checkout
+ becomes the primary root of the same logical group (ADR 0233).
+- Renderer plus one narrow main-process capability: no protocol, schema, host
+ RPC, permission, storage, or preference change. See ADR 0273,
+ `03-runtime/01-ipc-protocol.md` §9, `04-ux/08-component-spec.md`, and E2E-258.
diff --git a/docs/zh-CN/spec/03-runtime/01-ipc-protocol.md b/docs/zh-CN/spec/03-runtime/01-ipc-protocol.md
index 8b94214ac..57ebfa32b 100644
--- a/docs/zh-CN/spec/03-runtime/01-ipc-protocol.md
+++ b/docs/zh-CN/spec/03-runtime/01-ipc-protocol.md
@@ -56,6 +56,7 @@ event: pi-desktop/<domain>/event/<name>
- `pi-desktop/session/list`
- `pi-desktop/project/open`
- `pi-desktop/project/clone`
+- `pi-desktop/project/cloneCheckout`
- `pi-desktop/project/openFolder`
- `pi-desktop/project-group/list`
- `pi-desktop/project-group/create`
@@ -1031,6 +1032,7 @@ StrictMode 会在挂载时把 effect 跑两遍,第二次尝试会再开一个
- `project/open()`:系统目录选择器
- `project/clone({ url })`:选择父目录,将 URL `git clone` 进去,并返回克隆后的工作区(由渲染器激活)
+- `project/cloneCheckout({ url, parentPath })`:将公共远程 `git clone` 到显式指定的父目录,返回 `{ path, name }`,不更改当前工作空间;新建项目对话框先用它克隆,再创建逻辑项目组
- `project/openFolder(path)`:打开系统文件中已知的项目目录
- `project/get()`:当前工作空间
- `project/list()`:持久的项目记录,包括导入创建的条目
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index c606e27df..0f22169f0 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -7231,6 +7231,21 @@ runner 会在运行时的隔离临时目录中生成六个插件形态 fixture
- **里程碑**:M5
- **状态**:单元覆盖(`apps/desktop/test/git-clone.test.mjs`)
+
+#### E2E-258:新建项目对话框可以直接从 Git 仓库开始
+
+- **前提条件**:从「项目」标题栏打开新建项目对话框(不需要已有项目);已安装 `git`。
+- **步骤**:
+ 1. 将来源切换到「Git 仓库」。
+ 2. 粘贴 `https://github.com/octocat/Hello-World.git`,确认项目名称自动填为 `Hello-World`,再改成自定义名称。
+ 3. 选择克隆保存位置,确认位置行显示该文件夹。
+ 4. 确认创建,检查工作空间、侧边栏与项目归档。
+ 5. 重新打开对话框,切到「Git 仓库」,粘贴私网或非法远程地址。
+- **预期**:对话框把文件夹列表换成仓库地址输入框加克隆保存位置行,并保留同一个项目名称字段;地址解析成功且选定文件夹前,创建按钮保持禁用。确认后先在所选文件夹执行 `git clone`,项目创建仍由渲染器负责:克隆出的目录成为主要根,输入的名称命名该项目组。私网、回环、链路本地、带凭据和非法远程地址会让创建保持禁用(ADR 0247),且不写入任何文件夹。
+- **链接规格**:`03-runtime/01-ipc-protocol.md` §9、`04-ux/08-component-spec.md`、ADR 0273、ADR 0233、ADR 0247
+- **验收**:品质(项目入口)、D(工作区)
+- **里程碑**:M5
+- **状态**:单元覆盖(`apps/desktop/test/project-create-dialog.test.mjs`、`apps/desktop/test/git-clone.test.mjs`);渲染桌面旅程为草稿(除非明确要求,不本地运行 E2E)
#### E2E-257:导入到已归档项目后恢复其可见性
- **前提条件**:一个持久项目已在渲染器侧边栏偏好中归档,并从默认侧边栏隐藏。一个核心导入候选携带该项目路径,测试插件可以使用明确的 host project id 导入会话。
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index 66747538f..b3109d52d 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -4322,3 +4322,11 @@ that amendment are retired by ADR 0268; the upstream work-panel lifecycle stays.
`07-plugins/04-plugin-security.md`、`03-runtime/01-ipc-protocol.md`
(`NATIVE_MENU_ACTIONS`)、E2E-072 与
`apps/desktop/test/window-toggle-shortcut.test.mjs`。
+
+## 2026-09-17 — Git 检出成为新建项目的来源(D438)
+
+- 新建项目对话框此前只收集项目名称与本地文件夹(ADR 0233),而首页「克隆 Git 项目」入口只在绑定项目的会话 hero 中渲染。全新安装因此必须先打开一个无关的本地文件夹才能克隆仓库。
+- 对话框现在拥有两种对等来源:此电脑与 Git 仓库。Git 来源保留同一个名称字段(在用户输入前用仓库名预填),增加仓库地址输入框和一个克隆保存位置行,并复用切换器的 `parseGitCloneUrl` 规则,因此私网、回环、链路本地、带凭据与非法远程都会让创建按钮保持禁用(ADR 0247)。
+- 主进程新增可加的 `project/cloneCheckout({ url, parentPath })`:它克隆到显式指定的父目录并返回 `{ path, name }`,不更改当前工作空间、也不弹出选择器。`project/clone` 为首页切换器保留原有的原生选择器行为。
+- 项目创建语义不变:两种来源调用同一个项目 slice 助手,`project-group/create` 仍写入唯一的持久记录,检出目录成为同一逻辑项目组的主要根(ADR 0233)。
+- 渲染器加一条窄的主进程能力:协议、schema、host RPC、权限、存储与偏好均无变化。见 ADR 0273、`03-runtime/01-ipc-protocol.md` §9、`04-ux/08-component-spec.md` 与 E2E-258。
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index aac353bbb..3aaed52fb 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1072,6 +1072,11 @@ sklm: {
"createNameLabel": "Projektname",
"createFoldersLabel": "Arbeitsbereich",
"createComputer": "Dieser Computer",
+ "createSourceLabel": "Quelle",
+ "createSourceGit": "Git-Repository",
+ "createRepositoryLabel": "Repository-URL",
+ "createChooseLocation": "Ordner wählen",
+ "createLocationHint": "Zielordner des Klons",
"createPrimary": "Primär",
"createRemoveFolder": "Ordner entfernen",
"createAddFolder": "Ordner hinzufügen",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index a00e9031b..6c71ed613 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -1088,6 +1088,11 @@ sklm: {
createNameLabel: "Project name",
createFoldersLabel: "Workspace",
createComputer: "This computer",
+ createSourceLabel: "Source",
+ createSourceGit: "Git repository",
+ createRepositoryLabel: "Repository URL",
+ createChooseLocation: "Choose folder",
+ createLocationHint: "Where the clone is saved",
createPrimary: "Primary",
createRemoveFolder: "Remove folder",
createAddFolder: "Add folder",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index ed1b91e0c..ae3aa3502 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1072,6 +1072,11 @@ sklm: {
"createNameLabel": "Nombre del proyecto",
"createFoldersLabel": "Espacio de trabajo",
"createComputer": "Este equipo",
+ "createSourceLabel": "Origen",
+ "createSourceGit": "Repositorio Git",
+ "createRepositoryLabel": "URL del repositorio",
+ "createChooseLocation": "Elegir carpeta",
+ "createLocationHint": "Carpeta donde se guarda el clon",
"createPrimary": "Principal",
"createRemoveFolder": "Quitar carpeta",
"createAddFolder": "Añadir carpeta",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index 6697256a5..0c87debbd 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1072,6 +1072,11 @@ sklm: {
"createNameLabel": "Nom du projet",
"createFoldersLabel": "Espace de travail",
"createComputer": "Cet ordinateur",
+ "createSourceLabel": "Source",
+ "createSourceGit": "Dépôt Git",
+ "createRepositoryLabel": "URL du dépôt",
+ "createChooseLocation": "Choisir un dossier",
+ "createLocationHint": "Dossier d'enregistrement du clone",
"createPrimary": "Principal",
"createRemoveFolder": "Supprimer le dossier",
"createAddFolder": "Ajouter un dossier",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 9b72755cb..725475c35 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1089,6 +1089,11 @@ sklm: {
createNameLabel: "프로젝트 이름",
createFoldersLabel: "작업 공간",
createComputer: "이 컴퓨터",
+ createSourceLabel: "출처",
+ createSourceGit: "Git 저장소",
+ createRepositoryLabel: "저장소 주소",
+ createChooseLocation: "폴더 선택",
+ createLocationHint: "클론을 저장할 위치",
createPrimary: "기본",
createRemoveFolder: "폴더 제거",
createAddFolder: "폴더 추가",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 7ed3ec66e..ea195ef66 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1089,6 +1089,11 @@ sklm: {
createNameLabel: "Proje adı",
createFoldersLabel: "Çalışma alanı",
createComputer: "Bu bilgisayar",
+ createSourceLabel: "Kaynak",
+ createSourceGit: "Git deposu",
+ createRepositoryLabel: "Depo adresi",
+ createChooseLocation: "Klasör seç",
+ createLocationHint: "Klonun kaydedileceği yer",
createPrimary: "Birincil",
createRemoveFolder: "Klasörü kaldır",
createAddFolder: "Klasör ekle",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index 02c99db06..c3ad3510b 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1075,6 +1075,11 @@ sklm: {
createNameLabel: "项目名称",
createFoldersLabel: "工作区",
createComputer: "此电脑",
+ createSourceLabel: "来源",
+ createSourceGit: "Git 仓库",
+ createRepositoryLabel: "仓库地址",
+ createChooseLocation: "选择文件夹",
+ createLocationHint: "克隆保存的位置",
createPrimary: "主要",
createRemoveFolder: "移除文件夹",
createAddFolder: "添加文件夹",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index 88f8817eb..1e1adccf0 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1075,6 +1075,11 @@ sklm: {
createNameLabel: "專案名稱",
createFoldersLabel: "工作區",
createComputer: "此電腦",
+ createSourceLabel: "來源",
+ createSourceGit: "Git 倉庫",
+ createRepositoryLabel: "倉庫位址",
+ createChooseLocation: "選擇資料夾",
+ createLocationHint: "複製存放的位置",
createPrimary: "主要",
createRemoveFolder: "移除資料夾",
createAddFolder: "新增資料夾",
diff --git a/packages/shared/src/protocol.ts b/packages/shared/src/protocol.ts
index 668081d2e..2d0e70d6d 100644
--- a/packages/shared/src/protocol.ts
+++ b/packages/shared/src/protocol.ts
@@ -127,6 +127,7 @@ export const IPC = {
projectGroupInstructionsGet: "pi-desktop/project-group/instructions/get",
projectGroupInstructionsSave: "pi-desktop/project-group/instructions/save",
projectClone: "pi-desktop/project/clone",
+ projectCloneCheckout: "pi-desktop/project/cloneCheckout",
projectGet: "pi-desktop/project/get",
projectList: "pi-desktop/project/list",
projectSet: "pi-desktop/project/set",