(code: string)
| 163 | } |
| 164 | |
| 165 | export function defaultHintForCode(code: string): string | undefined { |
| 166 | switch (code) { |
| 167 | case 'INVALID_ARGS': |
| 168 | return 'Check command arguments and run --help for usage examples.'; |
| 169 | case 'SESSION_NOT_FOUND': |
| 170 | return 'Run open first or pass an explicit device selector.'; |
| 171 | case 'TOOL_MISSING': |
| 172 | return 'Install required platform tooling and ensure it is available in PATH.'; |
| 173 | case 'DEVICE_NOT_FOUND': |
| 174 | return 'Verify the target device is booted/connected and selectors match.'; |
| 175 | case 'APP_NOT_INSTALLED': |
| 176 | return 'Run apps to discover the exact installed package or bundle id, or install the app before open.'; |
| 177 | case 'UNSUPPORTED_OPERATION': |
| 178 | return 'This command is not available for the selected platform/device.'; |
| 179 | case 'NOT_IMPLEMENTED': |
| 180 | return 'This command is part of the planned API but is not implemented yet.'; |
| 181 | case 'COMMAND_FAILED': |
| 182 | return 'Retry with --debug and inspect diagnostics log for details.'; |
| 183 | case 'UNAUTHORIZED': |
| 184 | return 'Refresh daemon metadata and retry the command.'; |
| 185 | default: |
| 186 | return 'Retry with --debug and inspect diagnostics log for details.'; |
| 187 | } |
| 188 | } |
no outgoing calls
no test coverage detected