defaultHintForCode function
Default hint string for code, or null when no default applies.
Implementation
String? defaultHintForCode(String code) {
switch (code) {
case AppErrorCodes.invalidArgs:
return 'Check command arguments and run --help for usage examples.';
case AppErrorCodes.sessionNotFound:
return 'Run open first or pass an explicit device selector.';
case AppErrorCodes.toolMissing:
return 'Install required platform tooling and ensure it is available in PATH.';
case AppErrorCodes.deviceNotFound:
return 'Verify the target device is booted/connected and selectors match.';
case AppErrorCodes.appNotInstalled:
return 'Run apps to discover the exact installed package or bundle id, or install the app before open.';
case AppErrorCodes.unsupportedOperation:
return 'This command is not available for the selected platform/device.';
case AppErrorCodes.notImplemented:
return 'This command is part of the planned API but is not implemented yet.';
case AppErrorCodes.commandFailed:
return 'Retry with --debug and inspect diagnostics log for details.';
case AppErrorCodes.unauthorized:
return 'Refresh daemon metadata and retry the command.';
default:
return 'Retry with --debug and inspect diagnostics log for details.';
}
}