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

Function handleTriggerAppEventCommand

src/core/dispatch.ts:312–327  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  interactor: Interactor,
  positionals: string[],
  context: DispatchContext | undefined,
)

Source from the content-addressed store, hash-verified

310}
311
312async function handleTriggerAppEventCommand(
313 device: DeviceInfo,
314 interactor: Interactor,
315 positionals: string[],
316 context: DispatchContext | undefined,
317): Promise<Record<string, unknown>> {
318 const { eventName, payload } = parseTriggerAppEventArgs(positionals);
319 const eventUrl = resolveAppEventUrl(device, eventName, payload);
320 await interactor.open(eventUrl, { appBundleId: context?.appBundleId });
321 return {
322 event: eventName,
323 eventUrl,
324 transport: 'deep-link',
325 ...successText(`Triggered app event: ${eventName}`),
326 };
327}
328
329async function handleScreenshotCommand(
330 interactor: Interactor,

Callers 1

dispatch.tsFile · 0.85

Calls 4

parseTriggerAppEventArgsFunction · 0.90
resolveAppEventUrlFunction · 0.90
successTextFunction · 0.90
openMethod · 0.80

Tested by

no test coverage detected