feat(mobile): add filesystem path picker

This commit is contained in:
codeman-local
2026-07-25 15:28:19 +08:00
parent 86c634959d
commit 2667150f33
12 changed files with 1141 additions and 9 deletions
+26
View File
@@ -9,6 +9,7 @@
* - CleanupRegistration / CleanupResourceType — entries for the centralized CleanupManager
* - NiceConfig / DEFAULT_NICE_CONFIG — process priority settings for `nice`/`ionice`
* - ProcessStats — memory/CPU/child-count snapshot for resource monitoring
* - FilesystemBrowseData — bounded path-picker directory listing returned to the web UI
*/
/**
@@ -68,6 +69,31 @@ export interface ProcessStats {
updatedAt: number;
}
/** A selectable entry returned by the filesystem path-picker API. */
export interface FilesystemBrowseEntry {
name: string;
path: string;
type: 'file' | 'directory';
size?: number;
symlink?: boolean;
}
/** A named root the path picker may browse without escaping its allowlist. */
export interface FilesystemBrowseRoot {
label: string;
path: string;
}
/** Response payload for `GET /api/filesystem/browse`. */
export interface FilesystemBrowseData {
path: string;
parent: string | null;
root: string;
roots: FilesystemBrowseRoot[];
entries: FilesystemBrowseEntry[];
truncated: boolean;
}
export type CleanupResourceType = 'timer' | 'interval' | 'watcher' | 'listener' | 'stream';
/**