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

Function toDaemonGetData

src/daemon/selector-recording.ts:58–66  ·  view source on GitHub ↗
(result: Record<string, unknown>)

Source from the content-addressed store, hash-verified

56}
57
58export function toDaemonGetData(result: Record<string, unknown>): Record<string, unknown> {
59 const target = getResolvedTarget(result);
60 return {
61 ...(target?.kind === 'ref' ? { ref: normalizeDaemonRef(target.ref) } : {}),
62 ...(target?.kind === 'selector' ? { selector: target.selector } : {}),
63 ...(typeof result.text === 'string' ? { text: result.text } : {}),
64 ...(result.node && typeof result.node === 'object' ? { node: result.node } : {}),
65 };
66}
67
68export function toDaemonWaitData(result: Record<string, unknown>): Record<string, unknown> {
69 return {

Callers 2

dispatchGetViaRuntimeFunction · 0.90

Calls 2

getResolvedTargetFunction · 0.85
normalizeDaemonRefFunction · 0.85

Tested by

no test coverage detected