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

Function describeTextSurface

src/utils/text-surface.ts:47–62  ·  view source on GitHub ↗
(
  node: TextSurfaceNode,
  displayType?: string,
)

Source from the content-addressed store, hash-verified

45}
46
47export function describeTextSurface(
48 node: TextSurfaceNode,
49 displayType?: string,
50): {
51 text: string;
52 isLargeSurface: boolean;
53 shouldSummarize: boolean;
54} {
55 const text = extractReadableText(node);
56 const isLargeSurface = isLargeTextSurface(node, displayType);
57 return {
58 text,
59 isLargeSurface,
60 shouldSummarize: isLargeSurface && shouldSummarizeTextSurface(text),
61 };
62}
63
64function shouldSummarizeTextSurface(text: string): boolean {
65 if (!text) {

Callers 1

formatSnapshotLineFunction · 0.90

Calls 3

extractReadableTextFunction · 0.85
isLargeTextSurfaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…