MCPcopy
hub / github.com/callstack/agent-device / dispatchTypeViaRuntime

Function dispatchTypeViaRuntime

src/daemon/handlers/interaction.ts:45–59  ·  view source on GitHub ↗
(
  params: InteractionHandlerParams & {
    captureSnapshotForSession: typeof captureSnapshotForSession;
  },
)

Source from the content-addressed store, hash-verified

43}
44
45async function dispatchTypeViaRuntime(
46 params: InteractionHandlerParams & {
47 captureSnapshotForSession: typeof captureSnapshotForSession;
48 },
49): Promise<DaemonResponse> {
50 const { sessionName, sessionStore } = params;
51 const session = sessionStore.get(sessionName);
52 if (!session) return noActiveSessionError();
53 const unsupported = requireCommandSupported(PUBLIC_COMMANDS.type, session.device);
54 if (unsupported) return unsupported;
55 const recordingRecoveryResponse = await recoverAndroidRecordingDialogForType(session);
56 if (recordingRecoveryResponse) return recordingRecoveryResponse;
57
58 return await runTypeTextViaRuntime(params, session);
59}
60
61async function recoverAndroidRecordingDialogForType(
62 session: SessionState,

Callers 1

Calls 5

noActiveSessionErrorFunction · 0.90
requireCommandSupportedFunction · 0.90
runTypeTextViaRuntimeFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected