/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ /** * @module ai/aicore/model/aicontextref * @publicApi */ /** * A reference to a context or to a single item within a context. * * * `{ id }` — attaches all prompts and files from the context. * * `{ id, fileId }` — attaches a single file from the context. * * `{ id, promptId }` — attaches a single prompt from the context. */ export type AIContextRef = { id: string; } | { id: string; fileId: string; } | { id: string; promptId: string; }; /** * The request shape of a {@link module:ai/aicore/model/aicontextref~AIContextRef context reference}. * * The AI service expects a `type` discriminator, as a reference can share a request array with entries of other * types. It is added by {@link module:ai/aicore/model/aicontext~AIContext} when the request payload is built, so it is * not part of the reference shape the integrator provides. * * @experimental **Experimental:** This is a production-ready API but may change in minor releases * without the standard deprecation policy. Check the changelog for migration guidance. */ export type AIContextRefRequestData = AIContextRef & { type: "context"; };