Theia API Documentation v1.77.0
    Preparing search index...

    Highlights find matches in the mounted rows of the chat tree: text with the CSS Custom Highlight API, code parts with decorations in their editor.

    Only the content the matcher actually searched is highlighted: the elements to scan are derived from the match list, so content the matcher skips (tool calls, reasoning, delegated sub-chats) is never highlighted even though it renders inside the same row. While active, DOM mutations under the root (virtuoso mounting rows, streamed content) re-apply the highlights on the next animation frame.

    Implements

    Index
    codeDecorations: Map<SimpleMonacoEditor, ChatFindCodeDecorations> = ...
    current: ChatFindMatch | undefined
    currentTarget: ChatFindCurrentTarget | undefined
    matches: readonly ChatFindMatch[] = []
    observer: MutationObserver | undefined
    regexp: RegExp | undefined
    registry: ChatFindHighlightRegistry | undefined
    root: HTMLElement | undefined
    scheduled: boolean = false
    CODE_CURRENT_DECORATION: IModelDecorationOptions = ...
    CODE_MATCH_DECORATION: IModelDecorationOptions = ...

    Monaco's own find decorations, so code parts look the same as a match of the editor find widget.

    CURRENT_HIGHLIGHT: "theia-chat-find-current" = 'theia-chat-find-current'
    MATCH_HIGHLIGHT: "theia-chat-find-match" = 'theia-chat-find-match'
    • One Range per occurrence of regexp in the text of element, with its offsets in that text.

      Parameters

      • element: Element
      • regexp: RegExp

      Returns { end: number; range: Range; start: number }[]

    • Scrolls the current match into view within the chat tree's own scroll container.

      Deliberately does not use Element.scrollIntoView(): that scrolls every scrollable ancestor up to the viewport, which shifts the whole application shell. Only the first scroll container between the match and root is moved, and only when the match is not already visible.

      Parameters

      • root: HTMLElement

      Returns void