MCPcopy Create free account
hub / github.com/callstack/agent-device / settingsCommand

Function settingsCommand

src/commands/system/runtime/system.ts:264–280  ·  view source on GitHub ↗
(runtime, options = {})

Source from the content-addressed store, hash-verified

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
282export const alertCommand: RuntimeCommand<
283 SystemAlertCommandOptions | undefined,

Callers

nothing calls this directly

Calls 4

normalizeOptionalTextFunction · 0.90
toBackendContextFunction · 0.90
toBackendResultFunction · 0.90
successTextFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…