persist last-opened project and wire welcome open dialog
ProjectManager.open() now saves app.lastProject to user settings. Boot calls openLast() instead of opening cwd — first launch shows the welcome screen, subsequent launches restore the last project directly into Claude. The welcome "Open project" button shows a modal path-entry dialog that validates against git and activates the Claude tab on success. Removed the dead "New Claude session" button since secondary sessions are spawned via command palette. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,11 +33,20 @@ class ProjectManager extends ChangeNotifier {
|
||||
}
|
||||
_current = Directory(root);
|
||||
await _settings.setProjectDir(_current);
|
||||
await _settings.set<String>('app.lastProject', root);
|
||||
_events.emit(ProjectOpened(path: root));
|
||||
notifyListeners();
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<bool> openLast() async {
|
||||
final last = _settings.get<String>('app.lastProject');
|
||||
if (last == null || last.isEmpty) return false;
|
||||
final dir = Directory(last);
|
||||
if (!await dir.exists()) return false;
|
||||
return open(last);
|
||||
}
|
||||
|
||||
Future<void> close() async {
|
||||
if (_current == null) return;
|
||||
_current = null;
|
||||
|
||||
Reference in New Issue
Block a user