Theia API Documentation v1.77.0
    Preparing search index...
    Index
    • 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

    • Get a cached completion if available

      Parameters

      • key: string

        Cache key

      Returns InlineCompletions<InlineCompletion> | undefined

      Cached completion or undefined

    • Store a completion in the cache

      Parameters

      • key: string

        Cache key

      • value: InlineCompletions<InlineCompletion> | undefined

        Completion value to cache

      Returns void