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

Function optimizeGetAction

src/daemon/session-script-writer.ts:122–127  ·  view source on GitHub ↗
(action: SessionAction, selectorExpr: string)

Source from the content-addressed store, hash-verified

120}
121
122function optimizeGetAction(action: SessionAction, selectorExpr: string): SessionAction | undefined {
123 const sub = action.positionals?.[0];
124 return sub === 'text' || sub === 'attrs'
125 ? { ...action, positionals: [sub, selectorExpr] }
126 : undefined;
127}
128
129function readLongPressDurationFromPositionals(positionals: string[]): string | undefined {
130 const last = positionals.at(-1);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…