mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Offer recent project folders in the launcher and the desktop app
AI Assisted
This commit is contained in:
1 parent
2e2b3e1139
commit
8459836d3b
14 files changed
+1037
-86
No files matched your search
@@ -280,6 +280,18 @@ export function folderName(dir) {
|
||||
return lastSegment(dir) || String(dir || "").trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* The folder picker's rows: Choose a folder first (the OS dialog), then one
|
||||
* row per recent folder from the `recent_folders` command, newest first,
|
||||
* named by the folder with its full path as the detail.
|
||||
*/
|
||||
export function folderPickerRows(recent) {
|
||||
return [
|
||||
{ kind: 'browse', label: 'Choose a folder...' },
|
||||
...(recent || []).map((r) => ({ kind: 'folder', dir: r.dir, label: r.name, detail: r.dir })),
|
||||
];
|
||||
}
|
||||
|
||||
function lastSegment(dir) {
|
||||
return String(dir || "")
|
||||
.trim()
|
||||
|
||||
Reference in new issue
Block a user