import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { ILanguageModelChatMetadata } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels"; import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service"; export interface DefaultModelArrays { readonly modelIds: string[]; readonly modelLabels: string[]; readonly modelDescriptions: string[]; } export interface DefaultModelContributionOptions { /** Configuration key for the setting (used in schema notification). */ readonly configKey: string; /** Configuration section id for `notifyConfigurationSchemaUpdated`, or `undefined` to skip notification. */ readonly configSectionId: string | undefined; /** Log prefix, e.g. `'[PlanAgentDefaultModel]'`. */ readonly logPrefix: string; /** Additional filter beyond `isUserSelectable`. Return `true` to include the model. */ readonly filter?: (metadata: ILanguageModelChatMetadata) => boolean; /** * How model identifiers are encoded in the stored setting value. * - `'qualifiedName'` (default): `${name} (${vendor})` — matches * {@link ILanguageModelChatMetadata.asQualifiedName}. Kept for backward * compatibility with existing settings (plan/explore agent). * - `'vendorAndId'`: `${vendor}/${id}` — stable composite of API-stable * fields, directly usable with `vscode.lm.selectChatModels`. */ readonly storageFormat?: "qualifiedName" | "vendorAndId"; /** * Optional override for the label of the default ("empty") enum entry. * When omitted, defaults to `"Auto (Vendor Default)"`. */ readonly defaultEntryLabel?: string; /** * Optional override for the description of the default ("empty") enum * entry. See {@link defaultEntryLabel}. */ readonly defaultEntryDescription?: string; } /** * Creates the initial static arrays used by configuration registration code. * The returned arrays are mutated in-place by {@link DefaultModelContribution}. * */ export declare function createDefaultModelArrays(defaultEntryLabel?: string, defaultEntryDescription?: string): DefaultModelArrays; /** * Shared base class for workbench contributions that populate a dynamic enum * of language models for a settings picker. */ export declare abstract class DefaultModelContribution extends Disposable { private readonly _arrays; private readonly _options; private readonly _languageModelsService; private readonly _logService; constructor(_arrays: DefaultModelArrays, _options: DefaultModelContributionOptions, _languageModelsService: ILanguageModelsService, _logService: ILogService); private _updateModelValues; }