Theia API Documentation v1.76.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

    Constructors

    Properties

    codeDecorations: Map<SimpleMonacoEditor, ChatFindCodeDecorations> = ...
    current: undefined | ChatFindMatch
    currentTarget: undefined | ChatFindCurrentTarget
    matches: readonly ChatFindMatch[] = []
    observer: undefined | MutationObserver
    regexp: undefined | RegExp
    registry: undefined | ChatFindHighlightRegistry
    root: undefined | HTMLElement
    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'

    Methods

    • 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