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

Function formatGetActionLine

src/daemon/session-script-writer.ts:222–230  ·  view source on GitHub ↗
(parts: string[], action: SessionAction)

Source from the content-addressed store, hash-verified

220}
221
222function formatGetActionLine(parts: string[], action: SessionAction): string | undefined {
223 const sub = action.positionals?.[0];
224 const ref = action.positionals?.[1];
225 if (!sub || !ref) return undefined;
226 parts.push(formatScriptArg(sub));
227 parts.push(formatScriptArg(ref));
228 if (ref.startsWith('@')) appendRefLabel(parts, action);
229 return parts.join(' ');
230}
231
232function appendRefLabel(parts: string[], action: SessionAction): void {
233 const refLabel = action.result?.refLabel;

Callers 1

formatSpecialActionLineFunction · 0.85

Calls 4

formatScriptArgFunction · 0.90
appendRefLabelFunction · 0.85
pushMethod · 0.80
startsWithMethod · 0.80

Tested by

no test coverage detected