(runtime, options = {})
| 262 | SystemSettingsCommandOptions | undefined, |
| 263 | SystemSettingsCommandResult |
| 264 | > = async (runtime, options = {}): Promise<SystemSettingsCommandResult> => { |
| 265 | if (!runtime.backend.openSettings) { |
| 266 | throw new AppError('UNSUPPORTED_OPERATION', 'system.settings is not supported by this backend'); |
| 267 | } |
| 268 | const target = normalizeOptionalText(options.target, 'target'); |
| 269 | const backendResult = await runtime.backend.openSettings( |
| 270 | toBackendContext(runtime, options), |
| 271 | target, |
| 272 | ); |
| 273 | const formattedBackendResult = toBackendResult(backendResult); |
| 274 | return { |
| 275 | kind: 'settingsOpened', |
| 276 | ...(target ? { target } : {}), |
| 277 | ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}), |
| 278 | ...successText(target ? `Opened settings: ${target}` : 'Opened settings'), |
| 279 | }; |
| 280 | }; |
| 281 | |
| 282 | export const alertCommand: RuntimeCommand< |
| 283 | SystemAlertCommandOptions | undefined, |
nothing calls this directly
no test coverage detected
searching dependent graphs…