Fray Electron
    Preparing search index...

    Function createProjectWorkflow

    • Coordinates the new-project chooser, conflict prompts, and Engine requests without blocking the renderer.

      Parameters

      • choosePath: (previousPath?: string) => void

        Opens the native destination chooser, optionally seeded with a prior path.

      • send: (path: string, choice: number) => string

        Sends a project request and returns its request id.

      • requestPrompt: (options: ProjectPrompt) => string

        Opens a renderer prompt and returns its id.

      • notify: (options: NotificationOptions) => void

        Displays workflow success or error notifications.

      • Optionalreveal: (path: string) => void

        Optional callback to reveal a created working directory.

      Returns {
          onPath: (result: ProjectPathResult<string>) => void;
          onPromptResult: (
              id: string,
              value: string | null,
              error?: string,
          ) => boolean;
          onResult: (id: string, result: ProjectCreateReply) => boolean;
          start: () => void;
      }

      Event handlers and start action for the workflow. All Engine and prompt responses arrive asynchronously.