import { URI } from "../../../../../base/common/uri.js"; import type { SessionMeta } from "../../../../../platform/agentHost/common/state/sessionState.js"; import { type ISessionArtifact } from "../../../../services/sessions/common/session.js"; /** * A GitHub link that was explicitly recorded on the session, so it always * carries the stable id needed to remove that record. Git-/session-discovered * associations are never recorded and so are not represented by this type. */ export interface IRecordedGitHubReference { readonly url: string; readonly title?: string; /** Stable id of the recorded session artifact or reference, used for removal. */ readonly recordedReferenceId: string; /** * Whether the recorded entry is a durable artifact (`true`) or a mere * reference (`false`). Distinguishes a recorded pull request from one the * session actually produced, independent of whether it can be removed. */ readonly isArtifact: boolean; } /** All recorded entries, alongside the GitHub entries eligible for promotion into dedicated pills. */ export interface ISessionArtifactPartition { /** Every mapped artifact and reference, most recent first. */ readonly entries: readonly ISessionArtifactEntry[]; /** Recorded pull requests, most recent first; polled and shown in the pull request pill. */ readonly pullRequests: readonly IRecordedGitHubReference[]; /** Recorded issues, most recent first; polled and shown in the issue pill. */ readonly issues: readonly IRecordedGitHubReference[]; } interface ISessionArtifactEntry { readonly artifact: ISessionArtifact; } export declare function partitionSessionArtifacts(meta: SessionMeta | undefined, mapFileUri?: (uri: URI) => URI): ISessionArtifactPartition; /** Case-insensitive de-duplication that keeps the first occurrence's casing. */ export declare function dedupeLinks(...groups: readonly (readonly string[] | undefined)[]): string[]; export {};