MCPcopy Create free account
hub / github.com/Roy3838/Observer / renderSensorHTML

Function renderSensorHTML

app/src/utils/exportUtils.ts:92–117  ·  view source on GitHub ↗
(sensor: SensorData)

Source from the content-addressed store, hash-verified

90 };
91
92 const renderSensorHTML = (sensor: SensorData): string => {
93 const content = formatSensorContent(sensor, options.includeImages);
94 const timestamp = formatTimestamp(sensor.timestamp);
95
96 let sensorIcon = '';
97 switch (sensor.type) {
98 case 'screenshot': sensorIcon = '📷'; break;
99 case 'camera': sensorIcon = '🎥'; break;
100 case 'ocr': sensorIcon = '📄'; break;
101 case 'audio': sensorIcon = '🎵'; break;
102 case 'clipboard': sensorIcon = '📋'; break;
103 case 'memory': sensorIcon = '🧠'; break;
104 default: sensorIcon = '📊';
105 }
106
107 return `
108 <div class="sensor-item">
109 <div class="sensor-header">
110 <span class="sensor-icon">${sensorIcon}</span>
111 <strong>${sensor.type}</strong>
112 <span class="timestamp">${timestamp}</span>
113 </div>
114 <div class="sensor-content">${content}</div>
115 </div>
116 `;
117 };
118
119 const renderToolHTML = (tool: ToolCall): string => {
120 const timestamp = formatTimestamp(tool.timestamp);

Callers

nothing calls this directly

Calls 2

formatSensorContentFunction · 0.85
formatTimestampFunction · 0.70

Tested by

no test coverage detected