import { BaseActionViewItem, IActionViewItemOptions } from "../../../../base/browser/ui/actionbar/actionViewItems.js"; import { IAction } from "../../../../base/common/actions.js"; import { Disposable, IDisposable } from "../../../../base/common/lifecycle.js"; import { IObservable, IReader } from "../../../../base/common/observable.js"; import { URI } from "../../../../base/common/uri.js"; import { ActionWidgetDropdownActionViewItem } from "../../../../platform/actions/browser/actionWidgetDropdownActionViewItem.js"; import { MenuItemAction } from "../../../../platform/actions/common/actions.js"; import { IActionWidgetService } from "../../../../platform/actionWidget/browser/actionWidget.service.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js"; import { IContextMenuService } from "../../../../platform/contextview/browser/contextView.service.js"; import { IHoverService } from "../../../../platform/hover/browser/hover.service.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js"; import { ILabelService } from "../../../../platform/label/common/label.service.js"; import { ILogService } from "../../../../platform/log/common/log.service.js"; import { IOpenerService } from "../../../../platform/opener/common/opener.service.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; import { ITelemetryService } from "../../../../platform/telemetry/common/telemetry.service.js"; import { IThemeService } from "../../../../platform/theme/common/themeService.service.js"; import { IWorkspaceFolder } from "../../../../platform/workspace/common/workspace.js"; import { IWorkspaceContextService } from "../../../../platform/workspace/common/workspace.service.js"; import { ViewPane, IViewPaneOptions } from "../../../../workbench/browser/parts/views/viewPane.js"; import { ViewPaneContainer } from "../../../../workbench/browser/parts/views/viewPaneContainer.js"; import { IViewDescriptorService } from "../../../../workbench/common/views.service.js"; import { IChatPetService } from "../../../../workbench/contrib/chat/browser/chatPetService.service.js"; import { IEditorService } from "../../../../workbench/services/editor/common/editorService.service.js"; import { IExtensionService } from "../../../../workbench/services/extensions/common/extensions.service.js"; import { IWorkbenchLayoutService } from "../../../../workbench/services/layout/browser/layoutService.service.js"; import { IWorkspaceFolderLabelService } from "../../../../workbench/services/workspaces/common/workspaceFolderLabelService.service.js"; import { ISessionChangesService } from "./sessionChangesService.js"; import { ISessionsService } from "../../../services/sessions/browser/sessionsService.service.js"; import { IActiveSession } from "../../../services/sessions/common/sessionsManagement.js"; import { IChangesViewService } from "../common/changesViewService.service.js"; export declare function unlockChatPetCreatePullRequestAchievement(actionId: string, chatPetService: IChatPetService): boolean; /** * Menu group on {@link Menus.ChangesOperationsDropdown} whose action * takes over the primary button of the changes button bar. Every other group * on that menu only contributes dropdown entries. */ export declare const CHANGES_OPERATIONS_DROPDOWN_PRIMARY_GROUP = "primary"; export declare function isChangesActionsWorkspaceReady(activeSession: IActiveSession | undefined, mountedFolders: readonly IWorkspaceFolder[], reader: IReader | undefined): boolean; /** * Renders the session changes action button-bar (e.g. "Create Pull Request") into * a container, choosing the agent-host or git variant based on the active session. * Used to host the actions in the desktop Changes editor header. */ export declare class ChangesActionsBar extends Disposable { constructor(container: HTMLElement, excludedOperationIds: ReadonlySet, instantiationService: IInstantiationService, changesViewService: IChangesViewService, sessionsService: ISessionsService, contextKeyService: IContextKeyService); } export declare const CHANGES_HEADER_ACTIONS_ID = "workbench.changesView.headerActions"; /** Renders the {@link ChangesActionsBar} widget as the Create Pull Request title-bar action item. */ export declare class ChangesActionsBarActionViewItem extends BaseActionViewItem { private readonly instantiationService; constructor(action: IAction, options: IActionViewItemOptions, instantiationService: IInstantiationService); render(container: HTMLElement): void; } interface IChangesPickerLabel { readonly label: string; readonly tooltip?: string; readonly isNonDefault: boolean; } export declare class ChangesViewPane extends ViewPane { private readonly changesViewService; private readonly editorService; private readonly sessionsService; private readonly labelService; private readonly logService; private readonly telemetryService; private readonly sessionChangesService; private readonly workbenchLayoutService; private readonly workspaceFolderLabelService; private bodyContainer; private welcomeContainer; private emptyState; private filesHeaderNode; private fileHeaderToolbarContainer; private contentContainer; private listContainer; private actionsContainer; private changesProgressBar; private tree; private renderedTreeState; /** Folder the rendered rows' relative paths were computed against. */ private renderedTreeFolder; private detailsViewStateTransfer; private ciStatusWidget; private splitView; private splitViewContainer; private readonly treePaneSizeChange; private rebalanceSectionPanes; private sectionPanesUserResized; private readonly isMergeBaseBranchProtectedContextKey; private readonly isolationModeContextKey; private readonly hasGitRepositoryContextKey; private readonly hasUpstreamContextKey; private readonly hasIncomingChangesContextKey; private readonly hasOutgoingChangesContextKey; private readonly hasUncommittedChangesContextKey; private readonly hasBranchChangesContextKey; private readonly hasGitHubRemoteContextKey; private readonly hasPullRequestContextKey; private readonly hasOpenPullRequestContextKey; private readonly hasGitOperationInProgressContextKey; private readonly hasGitOperationInProgressObs; private readonly scopedInstantiationService; private readonly renderDisposables; private currentBodyHeight; private currentBodyWidth; constructor(options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, hoverService: IHoverService, changesViewService: IChangesViewService, editorService: IEditorService, sessionsService: ISessionsService, labelService: ILabelService, logService: ILogService, telemetryService: ITelemetryService, sessionChangesService: ISessionChangesService, workbenchLayoutService: IWorkbenchLayoutService, workspaceFolderLabelService: IWorkspaceFolderLabelService); protected renderBody(container: HTMLElement): void; getActionsContext(): URI | undefined; private onVisible; saveState(): void; private captureDetailsViewState; private setDetailsTreeChildren; private applyDetailsViewState; private _bindContextKeys; /** Layout the tree within its SplitView pane. */ private _layoutTreeInPane; private getTreePaneMinimumSize; private getTreePaneDesiredSize; /** Height needed to show {@link TREE_PANE_MIN_VISIBLE_ROWS} file rows, regardless of how many are listed. */ private getTreePaneReservedRowsSize; private getTreePaneMaximumSize; private fireTreePaneSizeChange; /** Compute the height available to the SplitView within the body. */ private getSplitViewAvailableHeight; /** Layout the SplitView to fill available body space. */ private layoutSplitView; /** * Wires the collapsible CI checks section widget to its SplitView pane: * toggling its header collapses/restores the pane, and changes to its * content show/hide the pane and re-layout. */ private _wireSectionPane; private setActiveSectionCollapsed; private getTreeSelection; private getActiveChangesetWorkspace; private getTreeRootFolder; private getTreeRootInfo; private getSessionDiscardRef; protected layoutBody(height: number, width: number): void; focus(): void; private renderSidebarList; private createChangesTree; openChanges(resource?: URI): Promise; /** * Renders the files header (Branch Changes dropdown + diff stats) into the panel. * Standard layout only; {@link DesktopChangesViewPane} overrides this to a no-op * because the header lives in the custom Changes editor instead. */ protected createFilesHeader(contentContainer: HTMLElement): void; /** * Renders the Create-PR actions button bar into the actions container. Standard * layout only; {@link DesktopChangesViewPane} overrides this to a no-op because * the actions render in the Changes editor header instead. */ protected createActionsButtonBar(): void; /** * Whether the actions container should be shown for the given session state. * Standard layout shows it for non-untitled sessions; {@link DesktopChangesViewPane} * never shows it (the actions live in the Changes editor). */ protected isActionsContainerVisible(isUntitled: boolean): boolean; /** * Whether clicking a file opens the modal single-file diff. {@link DesktopChangesViewPane} * never uses the modal editor. */ protected shouldOpenModalDiff(): boolean; /** * Whether clicking a file opens a single-file diff by default (vs the * multi-file diff editor). Alt inverts this. */ protected shouldOpenSingleFileDiffByDefault(): boolean; /** * Reveal the CI checks section: expand it if collapsed and move keyboard * focus into it. No-op when there are no checks to show. */ revealChecks(): void; private _openFileItem; private _openSingleFileDiffEditor; private _openMultiFileDiffEditor; dispose(): void; } /** * Changes view for the desktop layout: the files list lives in the docked * detail panel while the Branch Changes header, Create-PR actions, and diffs are * shown in the custom Changes editor. Overrides the standard hooks to omit the * in-panel header/actions. */ export declare class DesktopChangesViewPane extends ChangesViewPane { protected createFilesHeader(_contentContainer: HTMLElement): void; protected createActionsButtonBar(): void; protected isActionsContainerVisible(_isUntitled: boolean): boolean; protected shouldOpenModalDiff(): boolean; } export declare class ChangesViewPaneContainer extends ViewPaneContainer { constructor(layoutService: IWorkbenchLayoutService, telemetryService: ITelemetryService, instantiationService: IInstantiationService, contextMenuService: IContextMenuService, themeService: IThemeService, storageService: IStorageService, configurationService: IConfigurationService, extensionService: IExtensionService, contextService: IWorkspaceContextService, viewDescriptorService: IViewDescriptorService, logService: ILogService); create(parent: HTMLElement): void; } /** A {@link ChangesPickerSummary} lease: the summary elements to host in a picker label. */ interface IChangesPickerSummaryLease extends IDisposable { readonly elements: readonly HTMLElement[]; } /** * The active session's changes summary, shared by the Changes picker instances. * * Editor headers re-create their action view items whenever the active editor * changes, which happens several times while switching sessions. Leasing one * summary to consecutive pickers (moving its elements into each new label) lets * counter animations continue across those re-creations. The summary outlives * its last lease briefly so that the next picker can pick it up. */ export declare class ChangesPickerSummary extends Disposable { private readonly _changesViewService; private readonly _instantiationService; private static readonly RELEASE_DELAY; private readonly _content; private readonly _releaseScheduler; private _leased; constructor(_changesViewService: IChangesViewService, _instantiationService: IInstantiationService); /** * Leases the shared summary. While it is leased (e.g. two editor headers show * a picker at once), additional callers receive a summary of their own. */ acquire(): IChangesPickerSummaryLease; private _createContent; } export declare class ChangesPickerActionItem extends ActionWidgetDropdownActionViewItem { private readonly _summary; private readonly telemetryService; private readonly _labelObs; private readonly _summaryObs; private readonly _pickerEnabledObs; private readonly _summaryLease; private _container; private _labelElement; constructor(action: MenuItemAction, _summary: ChangesPickerSummary | undefined, labelObs: IObservable | undefined, actionWidgetService: IActionWidgetService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, changesViewService: IChangesViewService, telemetryService: ITelemetryService); render(container: HTMLElement): void; private updateAvailability; protected updateEnabled(): void; /** * Builds the label structure once; {@link updatePickerLabel} updates it in place. */ protected renderLabel(element: HTMLElement): IDisposable | null; private updatePickerLabel; protected getTooltip(): string; protected setAriaLabelAttributes(element: HTMLElement): void; private _getChangesetCategory; } export {};