All files / src/highlights highlights-models.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63                                                                                                                             
/**
 * Individual contribution within a combined highlight
 */
export interface HighlightContribution {
    /** SQL query ID */
    sqlId: number;
    /** Node ID */
    nodeId: number;
    /** Node name (e.g., "HashAggregate") */
    nodeName: string;
    /** Duration percentage */
    durationPct: number;
    /** Pre-formatted metrics line */
    metricsLine: string;
    /** Query prefix with color */
    queryPrefix: string;
}
 
import type { StructuredTooltip } from "@dataflint/mcp-server";
 
export interface HighlightCodeLineData {
    filePath: string;
    codeLine: number;
    text?: string;
    /** Primary SQL query ID */
    sql_id?: number;
    /** All SQL query IDs (for combined highlights) */
    sql_ids?: number[];
    node_id?: number;
    /** All node IDs (for combined highlights) */
    node_ids?: number[];
    url?: string;
    anchorText?: string;
    /** Query prefix for display (e.g., "🔵Q1|🟢Q2") */
    queryPrefix?: string;
    /** Server-computed tooltip (markdown) - backward compatible */
    tooltip?: string;
    /** Structured tooltip data for flexible rendering */
    structuredTooltip?: StructuredTooltip;
    /** Individual contributions for hierarchical display */
    contributions?: HighlightContribution[];
    /** Whether this is a performance hotspot */
    isHotspot?: boolean;
    /** Number of alerts */
    alertCount?: number;
    /** Number of findings */
    findingCount?: number;
    /** Severity level (info, warning, critical) */
    severity?: string;
    /** Alert descriptions for fix context */
    alerts?: string[];
    /** Display text (alias for text) */
    displayText?: string;
    /** Job ID this highlight belongs to (for cache invalidation) */
    jobId?: number;
    /** Display text for the most prioritized item (finding or alert) */
    topItemDisplay?: string;
    /** True if the top item has a fix suggestion */
    hasFix?: boolean;
    /** Number of additional items beyond the top one */
    additionalCount?: number;
}