mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat: implement unified local launch failure handling policy
This commit is contained in:
@@ -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';
|
||||
}
|
||||
Reference in New Issue
Block a user