dashboard
repositories
activity
search
login
APPS
/
PAILot
summary
reflog
commits
tree
compare
forks
blame
|
history
|
raw
|
HEAD
feat: session launcher (all-project search + switch-topic) and persistent l...
Matthias Nott
2026-07-10
1d79dcb975ae6f606a783a3d0287d8dc473e1cc8
[APPS/PAILot.git]
/
lib
/
models
/
project.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/// A PAI project the user can launch a session in, as sent by the hub's
/// `projects` control response.
class Project {
/// Display name shown in the picker (e.g. "AIBroker").
final String name;
/// Canonical name the hub uses to launch the project (create {project}).
final String launch;
final String slug;
final String path;
final int sessions;
final String lastActive; // ISO8601 (sorts lexicographically)
const Project({
required this.name,
required this.launch,
this.slug = '',
this.path = '',
this.sessions = 0,
this.lastActive = '',
});
factory Project.fromJson(Map<String, dynamic> json) {
final display = json['name'] as String? ?? 'Project';
return Project(
name: display,
launch: json['launch'] as String? ?? display,
slug: json['slug'] as String? ?? '',
path: json['path'] as String? ?? '',
sessions: json['sessions'] as int? ?? 0,
lastActive: json['lastActive'] as String? ?? '',
);
}
}