feat(maestro): project list replaces recents picker in spawn form (#59)
This commit is contained in:
+8
-2
@@ -5,6 +5,7 @@ import type {
|
||||
DaemonInfo,
|
||||
DirListing,
|
||||
GitRoot,
|
||||
Projects,
|
||||
RecentDirs,
|
||||
Session,
|
||||
Uuid,
|
||||
@@ -61,12 +62,17 @@ export async function getDaemonInfo(): Promise<DaemonInfo> {
|
||||
return jsonOrError(await fetch(routes.INFO, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
/** Recently-used working dirs, newest-first and deduped by dir (#26). Drives the
|
||||
* spawn form's recents picker. */
|
||||
/** Recently-used working dirs, newest-first and deduped by dir (#26). */
|
||||
export async function recentDirs(): Promise<RecentDirs> {
|
||||
return jsonOrError(await fetch(routes.RECENT_DIRS, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
/** Every discovered git repository / worktree, newest-activity-first (#54).
|
||||
* Drives the spawn form's project picker. */
|
||||
export async function projects(): Promise<Projects> {
|
||||
return jsonOrError(await fetch(routes.PROJECTS, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
/** Probe the enclosing git repo of `path` (#26). `root` is absent when the path
|
||||
* isn't inside a repo. `path` may be `~`/relative/absolute; the daemon resolves
|
||||
* it against its home dir. */
|
||||
|
||||
Reference in New Issue
Block a user