feat: implement unified local launch failure handling policy

This commit is contained in:
weishu
2025-12-26 16:11:58 +08:00
parent 685c846b91
commit eee7a249fa
9 changed files with 149 additions and 21 deletions
+16
View File
@@ -0,0 +1,16 @@
export type StartedBy = 'daemon' | 'terminal';
export type LocalLaunchExitReason = 'switch' | 'exit';
export type LocalLaunchContext = {
startedBy?: StartedBy;
startingMode?: 'local' | 'remote';
};
export function getLocalLaunchExitReason(context: LocalLaunchContext): LocalLaunchExitReason {
if (context.startedBy === 'daemon' || context.startingMode === 'remote') {
return 'switch';
}
return 'exit';
}