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

    Resolves the memory directory of the current workspace and makes it reachable for the AI workspace tools. The directory is the workspace's metadata store, so every workspace has its own memory and none of it ends up in the user's repository.

    Its path is generated and changes with the workspace, which is why it is contributed as an accessible root instead of being configured in ai-features.workspaceFunctions.allowedExternalPaths: the user cannot name a path they do not know, and prompts learn it from MEMORY_DIRECTORY_VARIABLE.

    A window without a workspace has no metadata store and therefore no memory. The variable then resolves to nothing and no directory is made accessible.

    Implements

    Index

    Constructors

    Properties

    ensuredLocation: undefined | string
    metadataStorageService: WorkspaceMetadataStorageService
    store: undefined | WorkspaceMetadataStore
    workspaceService: WorkspaceService

    Methods

    • The memory store of the current workspace, or undefined when there is no workspace to store memory for. The store instance is kept because it tracks the workspace itself: its location follows a workspace change, so nothing has to be invalidated when the workspace is replaced.

      Closing a workspace is the exception: the store cannot compute a location without one, so it keeps the location of the closed workspace. Whether a workspace is open is therefore checked on every call rather than only when the store is created.

      Returns Promise<undefined | WorkspaceMetadataStore>