import type { Theme } from "./theme.js"; export type SyntaxHighlightLanguage = "c" | "cpp" | "csharp" | "css" | "go" | "html" | "java" | "javascript" | "json" | "markdown" | "python" | "rust" | "shell" | "typescript" | "yaml"; export type SyntaxLineHighlight = { language: SyntaxHighlightLanguage; start: number; context?: SyntaxHighlightContext; }; export type SyntaxHighlightContext = { /** Complete logical line, before it was soft-wrapped for display. */ text: string; /** Source range represented by this visual line. */ rangeStart: number; rangeEnd: number; /** Visual column where rangeStart is rendered. */ renderStart: number; /** Source column where syntax parsing begins. */ syntaxStart: number; }; export type ToolBodySyntaxHighlight = { language: SyntaxHighlightLanguage; startLine: number; endLine?: number; startColumn?: number; }; export type ToolBodySyntaxHighlights = ToolBodySyntaxHighlight | readonly ToolBodySyntaxHighlight[]; export type SyntaxHighlightSegment = { start: number; end: number; foreground?: string; bold?: boolean; }; export declare function syntaxHighlightLanguageForPath(filePath: string): SyntaxHighlightLanguage | undefined; export declare function syntaxHighlightLanguageForMarkdownFence(info: string): SyntaxHighlightLanguage | undefined; export declare function syntaxHighlightSegmentsForLine(text: string, highlight: SyntaxLineHighlight, colors: Theme["colors"]): SyntaxHighlightSegment[];