feat(maestro): project list replaces recents picker in spawn form (#59)

This commit is contained in:
Miguel Palhas
2026-08-23 21:06:10 +01:00
parent 9f582263b8
commit b9829bc56f
7 changed files with 336 additions and 65 deletions
+8 -2
View File
@@ -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. */