import { Dimension } from "../../../../base/browser/dom.js"; import { CancellationToken } from "../../../../base/common/cancellation.js"; import { IObservable } from "../../../../base/common/observable.js"; import { URI } from "../../../../base/common/uri.js"; import { IDiffEditor } from "../../../../editor/common/editorCommon.js"; import { ICodeEditor } from "../../../../editor/browser/editorBrowser.js"; import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { IActionViewItemService } from "../../../../platform/actions/browser/actionViewItemService.service.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; import { ILogService } from "../../../../platform/log/common/log.service.js"; import { ITelemetryService } from "../../../../platform/telemetry/common/telemetry.service.js"; import { IThemeService } from "../../../../platform/theme/common/themeService.service.js"; import { AbstractEditorWithViewState } from "../../../../workbench/browser/parts/editor/editorWithViewState.js"; import { IEditorOpenContext } from "../../../../workbench/common/editor.js"; import { EditorInput } from "../../../../workbench/common/editor/editorInput.js"; import { IEditorGroup } from "../../../../workbench/services/editor/common/editorGroupsService.js"; import { IEditorGroupsService } from "../../../../workbench/services/editor/common/editorGroupsService.service.js"; import { IEditorService } from "../../../../workbench/services/editor/common/editorService.service.js"; import { IMultiDiffEditorLayoutDebugState, IMultiDiffEditorViewState } from "../../../../editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js"; import { IMultiDiffEditorOptions } from "../../../../editor/common/multiDiffEditor.js"; import { ITextResourceConfigurationService } from "../../../../editor/common/services/textResourceConfiguration.service.js"; import { IAgentWorkbenchLayoutService } from "../../../browser/workbench.service.js"; import { IChangesViewService } from "../common/changesViewService.service.js"; import { SessionChangesEditorInput } from "./sessionChangesEditorInput.js"; import { ISessionChangesService } from "./sessionChangesService.js"; import { IAction } from "../../../../base/common/actions.js"; import { IActionViewItemOptions } from "../../../../base/browser/ui/actionbar/actionViewItems.js"; import { IActionViewItem } from "../../../../base/browser/ui/actionbar/actionbar.js"; import { IDiffEditorOptionsService } from "../../editor/common/diffEditorOptionsService.service.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; /** * Changes editor for the Agents window: a "Branch Changes" versions dropdown and * diff stats header sitting above an embedded multi-diff editor showing the * session's file diffs. */ export declare class SessionChangesEditor extends AbstractEditorWithViewState { private readonly contextKeyService; private readonly changesViewService; private readonly layoutService; private readonly sessionChangesService; private readonly diffEditorOptionsService; private readonly configurationService; private readonly actionViewItemService; static readonly ID = "workbench.editor.agentSessions.sessionChanges"; private widget; private viewModel; get hasViewModel(): boolean; private bodyContainer; private emptyState; get scopedContextKeyService(): IContextKeyService | undefined; private _desktop; private _scopedInstantiationService; /** Session whose changes this editor is currently showing (from its input). */ private readonly _inputSessionResource; /** * Changes for this editor's own session, scoped so a stale row does not pick * up the counts of a different (globally active) session during a switch. */ private readonly _scopedChangesObs; /** Deferred focus request awaiting the active diff editor to be rendered. */ private readonly _pendingFocus; private readonly _pendingReveal; /** Defers resolving the multi-diff while the editor part is hidden (desktop detail-only). */ private readonly _pendingResolve; private readonly _logger; constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService, instantiationService: IInstantiationService, textResourceConfigurationService: ITextResourceConfigurationService, editorService: IEditorService, editorGroupService: IEditorGroupsService, contextKeyService: IContextKeyService, changesViewService: IChangesViewService, layoutService: IAgentWorkbenchLayoutService, sessionChangesService: ISessionChangesService, diffEditorOptionsService: IDiffEditorOptionsService, logService: ILogService, configurationService: IConfigurationService, actionViewItemService: IActionViewItemService); protected createEditor(parent: HTMLElement): void; /** * Resolves the diff editor and code editor showing the given file, mirroring * {@link MultiDiffEditor.tryGetCodeEditor} so file-toolbar actions can operate * on this editor and the plain multi-diff editor uniformly. */ tryGetCodeEditor(resource: URI): { diffEditor: IDiffEditor; editor: ICodeEditor; } | undefined; getLayoutDebugState(): IObservable; getControl(): IDiffEditor | undefined; getActionViewItem(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined; resetDiffEditorWidthBasedLayout(): void; /** Creates the mobile-layout internal header toolbars. */ private _buildHeaderToolbars; get scopedInstantiationService(): IInstantiationService | undefined; setInput(input: SessionChangesEditorInput, options: IMultiDiffEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise; private _resolveInput; protected setEditorVisible(visible: boolean): void; protected computeEditorViewState(_resource: URI): IMultiDiffEditorViewState | undefined; protected tracksEditorViewState(input: EditorInput): boolean; protected tracksDisposedEditorViewState(): boolean; protected toEditorViewStateResource(input: EditorInput): URI | undefined; collapseAllDiffs(): void; expandAllDiffs(): void; collapse(resource: URI): void; expand(resource: URI): void; setOptions(options: IMultiDiffEditorOptions | undefined): void; private _applyOptions; clearInput(): void; focus(): void; layout(dimension: Dimension): void; } export declare const CHANGESET_REVIEW_ACTION_ID = "changeset.review";