import { Disposable } from "../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../base/common/observable.js"; import { ThemeIcon } from "../../../../base/common/themables.js"; import { ArtifactSnapshot } from "../../../../platform/artifactIntegrations/common/artifactIntegration.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { IChatPill, IChatPillAction, IChatPillEntry } from "../../../../workbench/browser/chatPills.js"; import { ArtifactIntegrationPresentation, IArtifactDetailsHost } from "./artifactIntegrationPresentation.js"; /** One artifact listed by an {@link ArtifactIntegrationGroup}. */ export interface IArtifactIntegrationGroupMember { readonly presentation: ArtifactIntegrationPresentation; /** The artifact's undecorated entry, supplying its title, open target and entry actions such as Copy Link and Remove. */ readonly entry: IChatPillEntry; /** Moves the artifact out of the group into a pill of its own. */ readonly pinAction?: IChatPillAction; } export interface IArtifactIntegrationGroupSummary { readonly icon: ThemeIcon; /** The integration's name for its artifacts, such as "Pull Requests". */ readonly title: string; /** The title with the number of artifacts, such as "4 Pull Requests". */ readonly label: string; readonly enabledAutomations: number; } /** * Summarizes a group of artifacts sharing a group ID, possibly across integrations. The icon is the one with the * highest group priority any main integration assigned to its artifact, keeping the earlier artifact on ties, so a * group of pull requests shows a failing pull request's icon over an open one's. The label is the first fixed group * label among the artifacts' main integrations. */ export declare function getArtifactIntegrationGroupSummary(snapshots: readonly ArtifactSnapshot[]): IArtifactIntegrationGroupSummary; /** * Several artifacts sharing a group ID, presented as one pill whose dropdown lists each artifact with the * same main part and status sections its own pill would show. */ export declare class ArtifactIntegrationGroup extends Disposable { readonly members: IObservable; readonly detailsHost: IArtifactDetailsHost; readonly pill: IChatPill; readonly summary: IObservable; constructor(id: string, members: IObservable, detailsHost: IArtifactDetailsHost, instantiationService: IInstantiationService); } /** An action of a group dropdown row, and whether the dropdown stays open when it runs. */ export interface IArtifactGroupRowAction { readonly action: IChatPillAction; /** Actions that change the group's members, such as Pin and Remove, keep the dropdown open to continue with it. */ readonly keepOpen: boolean; } /** * The actions a group dropdown row offers for its artifact: Open, then the entry's own actions in the order the other * pill dropdowns show them, with Pin before the entry's promoted action, such as Remove. */ export declare function getArtifactGroupRowActions(member: Pick): readonly IArtifactGroupRowAction[];