import { IAction } from "../../../../base/common/actions.js"; import { Event } from "../../../../base/common/event.js"; import { Disposable } from "../../../../base/common/lifecycle.js"; import { IObservable, IReader } from "../../../../base/common/observable.js"; import { IClipboardService } from "../../../../platform/clipboard/common/clipboardService.service.js"; import { ICommandService } from "../../../../platform/commands/common/commands.service.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { IOpenerService } from "../../../../platform/opener/common/opener.service.js"; import { INotificationService } from "../../../../platform/notification/common/notification.service.js"; import { IEditorService } from "../../../../workbench/services/editor/common/editorService.service.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { ILogService } from "../../../../platform/log/common/log.service.js"; import { IExtensionService } from "../../../../workbench/services/extensions/common/extensions.service.js"; import { IExternalUriOpenerService } from "../../../../workbench/contrib/externalUriOpener/common/externalUriOpenerService.service.js"; import { ITelemetryService } from "../../../../platform/telemetry/common/telemetry.service.js"; import type { IChatBackgroundActivityPillSections } from "../../../../workbench/contrib/chat/browser/chat.js"; import { type IChatPullRequestPillSection } from "../../../../workbench/contrib/chat/browser/sessionPullRequestPill.js"; import { IDiffStats } from "../../../../workbench/contrib/chat/browser/widget/chatTurnPills.js"; import { type ChatPillsCompactMode, type IChatPillSection } from "../../../../workbench/browser/chatPills.js"; import { type IGitHubIssue } from "../../github/common/types.js"; import { IGitHubService } from "../../github/browser/githubService.service.js"; import { IResolvedSessionPullRequest } from "../../github/browser/pullRequestIconStatus.js"; import { ISessionChatPillVisibilityService } from "../../../../workbench/contrib/chat/common/sessionChatPills.service.js"; import { ISessionsService } from "../../../services/sessions/browser/sessionsService.service.js"; import { IChat, type IGitHubIssueRef } from "../../../services/sessions/common/session.js"; import { IActiveSession } from "../../../services/sessions/common/sessionsManagement.js"; import { ISessionsManagementService } from "../../../services/sessions/common/sessionsManagement.service.js"; import { ISessionsProvidersService } from "../../../services/sessions/browser/sessionsProvidersService.service.js"; import type { ISessionChatPillsDebugData } from "@codingame/monaco-vscode-workbench-service-override/vscode/vs/sessions/contrib/chat/browser/sessionChatInputToolbarDebug"; import { ISessionChangesStatsCache } from "../../../services/sessions/common/sessionChangesStatsCache.service.js"; import { ISessionChangesService } from "../../changes/browser/sessionChangesService.js"; import { IAgentWorkbenchLayoutService } from "../../../browser/workbench.service.js"; import { IChatEntitlementService } from "../../../../workbench/services/chat/common/chatEntitlementService.service.js"; import { ChatPillHoverCache } from "../../../../workbench/browser/chatPillHover.js"; interface IRecordedArtifactActions { remove?(ids: readonly string[], label: string): Promise; recordOpen?(id: string): void; } type CreateCopyAction = (key: string, label: string, copy: () => Promise) => IAction; /** Builds Agents Window pull request pill entries, enriching them when live details are available. */ export declare function buildSessionPullRequestSections(pullRequests: readonly IResolvedSessionPullRequest[], session: IActiveSession | undefined, commandService: ICommandService, clipboardService: IClipboardService, openerService: IOpenerService, sessionsService: ISessionsService, artifactActions?: IRecordedArtifactActions, hoverCache?: ChatPillHoverCache, createCopyAction?: CreateCopyAction): readonly IChatPullRequestPillSection[]; interface IResolvedSessionIssue { readonly ref: IGitHubIssueRef; readonly issue: IGitHubIssue | undefined; } /** Builds one pill entry per issue, grouping comment links and enriching entries with live details. */ export declare function buildSessionIssueSections(issues: readonly IResolvedSessionIssue[], session: IActiveSession | undefined, commandService: ICommandService, clipboardService: IClipboardService, openerService: IOpenerService, sessionsService: ISessionsService, artifactActions?: IRecordedArtifactActions, hoverCache?: ChatPillHoverCache, createCopyAction?: CreateCopyAction): readonly IChatPillSection[]; /** Returns the focused chat's changes counts represented by the shared Changes pill. */ export declare function computeSessionInputPillStats(session: IActiveSession | undefined, chat: IChat | undefined, reader: IReader, changesStatsCache?: ISessionChangesStatsCache): IDiffStats; /** * The focused chat's changes counts the shared Changes pill reports, or `undefined` * while they are not known yet: before the chat reports its changes, while the * represented changeset loads, or while the session's worktree is being created. * Unlike {@link computeSessionInputPillStats}, this never falls back to cached stats. */ export declare function readLoadedSessionInputPillStats(session: IActiveSession | undefined, chat: IChat | undefined, reader: IReader): IDiffStats | undefined; /** * The row's rendered height, reserved below the transcript by its host because * the row floats over it. Derived from the row's `2px`/`4px` padding here plus a * 22px `.monaco-text-button.small` pill; keep in sync if either changes. */ export declare const SESSION_CHAT_INPUT_TOOLBAR_HEIGHT = 28; /** A toolbar for session metadata, active-turn status, and background activity. */ export declare class SessionChatInputToolbar extends Disposable { private readonly _sessionsService; readonly element: HTMLElement; readonly backgroundActivityPillSections: IChatBackgroundActivityPillSections; readonly onDidChangeChatPetPlatform: Event; readonly onDidChangeVisibility: Event; readonly activityBarActions: IObservable; private readonly _inputPills; private _inputElement; /** Sentinel distinguishing "no override" from an explicit `undefined` session. */ private readonly _sessionOverride; /** The chat whose last-turn changes are reflected. */ private readonly _chat; private readonly _debugData; private readonly _browsers; private readonly _canvases; private readonly _backgroundActivities; private readonly _pullRequestHoverCache; private readonly _issueHoverCache; private readonly _pullRequestCopyActions; private readonly _issueCopyActions; private readonly _activityBarOpenerCheck; /** The session that owns the reflected chat, from an explicit override or resolved from the chat. */ private readonly _session; /** * Whether the reflected chat is a subagent (worker) chat. Its pills describe * the session the subagent was spawned from rather than the subagent's own * work, so the row stays hidden there. */ private readonly _isSubagentChat; /** The current turn's diff stats. */ private readonly _diffStats; /** Artifact sections shown in the artifact pill. */ private readonly _artifactSections; /** Reference sections shown in the references pill. */ private readonly _referenceSections; /** Customization sections shown in the customizations pill. */ private readonly _customizationSections; constructor(compact: ChatPillsCompactMode, focusFallback: (() => void) | undefined, clipboardService: IClipboardService, commandService: ICommandService, gitHubService: IGitHubService, _sessionsService: ISessionsService, sessionsManagementService: ISessionsManagementService, notificationService: INotificationService, sessionsProvidersService: ISessionsProvidersService, sessionChangesService: ISessionChangesService, changesStatsCache: ISessionChangesStatsCache, layoutService: IAgentWorkbenchLayoutService, openerService: IOpenerService, visibility: ISessionChatPillVisibilityService, instantiationService: IInstantiationService, entitlementService: IChatEntitlementService, telemetryService: ITelemetryService, editorService: IEditorService, externalUriOpenerService: IExternalUriOpenerService, extensionService: IExtensionService, configurationService: IConfigurationService, logService: ILogService); get visible(): boolean; setInputElement(element: HTMLElement | undefined): void; getChatPetPlatformElements(): readonly HTMLElement[]; focusFirst(): boolean; /** * Track the currently-viewed chat; the toolbar reflects that chat's last-turn * changes and status, resolving the owning session for provider gating and the * open-changes action. Clears any explicit {@link setSession} override. */ setChat(chat: IChat | undefined): void; /** * Explicitly set the session and chat to reflect, bypassing chat-to-session * resolution. Intended for component fixtures and callers that already hold * both. */ setSession(session: IActiveSession | undefined, chat: IChat | undefined): void; setDebugData(data: ISessionChatPillsDebugData | undefined): void; getDebugData(): ISessionChatPillsDebugData | undefined; private _findOwningSession; } export {};