lazy backend boot and rename workspace to project
Backend isolate now boots in two phases: resolve toolchain on spawn (binary availability only), initialize services on project.open. The dispatcher stays empty until a project activates — IPC requests before that return "No project active". Scheduler ticker only runs while a project is open. Fires an immediate first cycle on ProjectOpened so sidebar panels refresh without waiting for the next interval. Stops on ProjectClosed. Renamed workspace → project throughout backend messages (project.validate, project.open, project.ready), callbacks (onProjectOpen, onValidateProject), and methods (openProject, validateProject, resolveProject). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a89910dc36
commit
5515d88407
@@ -16,6 +16,13 @@ class DaemonDispatcher {
|
||||
_handlers[cmd] = handler;
|
||||
}
|
||||
|
||||
/// Remove all registered handlers except ping/version.
|
||||
void clear() {
|
||||
_handlers.removeWhere((k, _) => k != 'ping' && k != 'version');
|
||||
}
|
||||
|
||||
bool get isEmpty => _handlers.length <= 2; // only ping + version
|
||||
|
||||
Future<IpcResponse> dispatch(IpcRequest req) async {
|
||||
final h = _handlers[req.cmd];
|
||||
if (h == null) {
|
||||
|
||||
Reference in New Issue
Block a user