MCPcopy Index your code
hub / github.com/callstack/agent-device / rotateCommand

Function rotateCommand

src/commands/system/runtime/system.ts:172–188  ·  view source on GitHub ↗
(runtime, options)

Source from the content-addressed store, hash-verified

170 SystemRotateCommandOptions,
171 SystemRotateCommandResult
172> = async (runtime, options): Promise<SystemRotateCommandResult> => {
173 if (!runtime.backend.rotate) {
174 throw new AppError('UNSUPPORTED_OPERATION', 'system.rotate is not supported by this backend');
175 }
176 const orientation = requireOrientation(options.orientation);
177 const backendResult = await runtime.backend.rotate(
178 toBackendContext(runtime, options),
179 orientation,
180 );
181 const formattedBackendResult = toBackendResult(backendResult);
182 return {
183 kind: 'systemRotated',
184 orientation,
185 ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}),
186 ...successText(`Rotated to ${orientation}`),
187 };
188};
189
190export const keyboardCommand: RuntimeCommand<
191 SystemKeyboardCommandOptions | undefined,

Callers

nothing calls this directly

Calls 5

toBackendContextFunction · 0.90
toBackendResultFunction · 0.90
successTextFunction · 0.90
requireOrientationFunction · 0.85
rotateMethod · 0.80

Tested by

no test coverage detected