Theia API Documentation v1.65.0
    Preparing search index...
    Index

    Constructors

    Methods

    • Generate a unique cache key for code completion based on the file path, cursor position, and the hashed context (prefix and suffix). The prefix and suffix are hashed to avoid storing large or sensitive content directly in the cache key.

      Parameters

      • filePath: string

        Path of the current file

      • model: ITextModel

        Monaco text model of the file

      • position: Position

        Current cursor position in the editor

      Returns string

      Unique cache key as a string

    • Store a completion in the cache

      Parameters

      • key: string

        Cache key

      • value: undefined | InlineCompletions<InlineCompletion>

        Completion value to cache

      Returns void