MCPcopy
hub / github.com/steipete/oracle / formatUserErrorMetadata

Function formatUserErrorMetadata

src/cli/sessionDisplay.ts:313–328  ·  view source on GitHub ↗
(metadata?: SessionUserErrorMetadata)

Source from the content-addressed store, hash-verified

311}
312
313export function formatUserErrorMetadata(metadata?: SessionUserErrorMetadata): string | null {
314 if (!metadata) {
315 return null;
316 }
317 const parts: string[] = [];
318 if (metadata.category) {
319 parts.push(metadata.category);
320 }
321 if (metadata.message) {
322 parts.push(`message=${metadata.message}`);
323 }
324 if (metadata.details && Object.keys(metadata.details).length > 0) {
325 parts.push(`details=${JSON.stringify(metadata.details)}`);
326 }
327 return parts.length > 0 ? parts.join(' | ') : null;
328}
329
330export function buildReattachLine(metadata: SessionMetadata): string | null {
331 if (!metadata.id) {

Callers 2

attachSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected