Constructors

Properties

cache: Map<string, CacheEntry>
maxSize: number = 100

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