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

    Migrates the legacy .prompts/project-info.prompttemplate prompt fragment to a root AGENTS.md, and carries the retargeted agent's settings over to its new id.

    Idempotent: once the legacy file has been renamed to .bak a re-run does nothing, and an AGENTS.md that already exists is never overwritten.

    Index
    aiConfigurationService: AiConfigurationService
    fileService: FileService
    logger: ILogger
    migrationInFlight: Promise<AgentsMdMigrationReport[]> | undefined

    In-flight migration promise used to serialize migrate calls. Startup and the initial workspace-trust resolution both trigger a migration, and the Re-run AGENTS.md migration command can land on top of either; without this guard they race on the same legacy file, and whichever createFile loses throws because the write deliberately passes no overwrite.

    workspaceService: WorkspaceService
    workspaceTrustService: WorkspaceTrustService
    • Carries the retargeted agent's settings from its former id to AgentsMd, including the prompt ids in selectedVariants. Does nothing once the new id is present.

      Reads and writes user scope only, explicitly. The effective value is merged across scopes and, while the workspace is untrusted, has its workspace and folder contributions suppressed, whereas a update() write lands in the narrowest scope the key is already defined in. Passing that merged value to update() would therefore rewrite a workspace-scoped ai-features.agentSettings with an object assembled from a different set of scopes, dropping every entry the read had suppressed. Addressing one scope on both sides is what makes this safe to run outside the trust gate.

      A ProjectInfo entry stored in workspace or folder scope is consequently left alone rather than renamed; it goes stale, which costs the user that agent's model assignment, and is the deliberate trade against touching a file the workspace owns.

      Returns Promise<void>