chore: sync version and web controller status helpers

This commit is contained in:
Haitao Pan 2026-03-28 19:49:34 +08:00
parent e3760b3638
commit 2a5d297c10
2 changed files with 30 additions and 3 deletions

View File

@ -287,6 +287,33 @@ class AppController extends ChangeNotifier {
);
}
Future<void> prepareForExit() async {
// Web doesn't have native termination handling.
// Best effort flush if session persistence is configured.
if (usesRemoteSessionPersistence) {
// Remote sessions are persisted server-side.
}
}
Map<String, dynamic> desktopStatusSnapshot() {
final runningTasks = tasksControllerInternal.running.length;
final queuedTasks = tasksControllerInternal.queue.length;
final failedTasks = tasksControllerInternal.failed.length;
final scheduledTasks = tasksControllerInternal.scheduled.length;
return <String, dynamic>{
'connectionStatus': connection.status.name,
'connectionLabel': connection.status.label,
'runningTasks': runningTasks,
'pausedTasks': 0,
'timedOutTasks': 0,
'queuedTasks': queuedTasks,
'scheduledTasks': scheduledTasks,
'failedTasks': failedTasks,
'totalTasks': tasksControllerInternal.totalCount,
'badgeCount': runningTasks + queuedTasks,
};
}
@override
void dispose() {
unawaited(relayEventsSubscriptionInternal.cancel());

View File

@ -2,9 +2,9 @@ name: xworkmate
description: "XWorkmate desktop-first AI workspace shell."
publish_to: 'none'
version: 1.0.0+2
build-date: 2026-03-27
build-id: dc1fb76
version: 1.0.1+3
build-date: 2026-03-28
build-id: cc00864
environment:
sdk: ^3.11.0