import { IHistoryNavigationWidget } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/history"; import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { CodeEditorWidget } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget"; import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service"; import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service"; import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service"; import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service"; import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service"; import { ISharedWebContentExtractorService } from "@codingame/monaco-vscode-api/vscode/vs/platform/webContentExtractor/common/webContentExtractor.service"; import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service"; import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService"; import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEntitlementService.service"; import { IChatMode } from "@codingame/monaco-vscode-9911aec2-e4dd-5483-8369-9d695cc70d8a-common/vscode/vs/workbench/contrib/chat/common/chatModes"; import { IChatModeService } from "@codingame/monaco-vscode-9911aec2-e4dd-5483-8369-9d695cc70d8a-common/vscode/vs/workbench/contrib/chat/common/chatModes.service"; import { IChatFollowup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService"; import { ChatRequestVariableSet, IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries"; import { IChatResponseViewModel } from "@codingame/monaco-vscode-9911aec2-e4dd-5483-8369-9d695cc70d8a-common/vscode/vs/workbench/contrib/chat/common/chatViewModel"; import { IChatInputState } from "../common/chatWidgetHistoryService.js"; import { IChatWidgetHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service"; import { ChatAgentLocation, ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants"; import { ILanguageModelChatMetadata, ILanguageModelChatMetadataAndIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels"; import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service"; import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service"; import { IChatWidget } from "@codingame/monaco-vscode-9911aec2-e4dd-5483-8369-9d695cc70d8a-common/vscode/vs/workbench/contrib/chat/browser/chat"; import { ChatAttachmentModel } from "./chatAttachmentModel.js"; import { ChatDragAndDrop } from "./chatDragAndDrop.js"; import { ChatSelectedTools } from "./chatSelectedTools.js"; import { IChatViewState } from "./chatWidget.js"; import { ChatImplicitContext } from "./contrib/chatImplicitContext.js"; import { ChatRelatedFiles } from "./contrib/chatInputRelatedFilesContrib.js"; export interface IChatInputStyles { overlayBackground: string; listForeground: string; listBackground: string; } interface IChatInputPartOptions { renderFollowups: boolean; renderStyle?: "compact"; menus: { executeToolbar: MenuId; inputSideToolbar?: MenuId; telemetrySource?: string; }; editorOverflowWidgetsDomNode?: HTMLElement; renderWorkingSet?: boolean; enableImplicitContext?: boolean; supportsChangingModes?: boolean; dndContainer?: HTMLElement; widgetViewKindTag: string; } export interface IWorkingSetEntry { uri: URI; } export declare class ChatInputPart extends Disposable implements IHistoryNavigationWidget { private readonly location; private readonly options; private readonly inline; private readonly historyService; private readonly modelService; private readonly instantiationService; private readonly contextKeyService; private readonly configurationService; private readonly keybindingService; private readonly accessibilityService; private readonly languageModelsService; private readonly logService; private readonly fileService; private readonly editorService; private readonly themeService; private readonly textModelResolverService; private readonly storageService; private readonly labelService; private readonly agentService; private readonly sharedWebExtracterService; private readonly experimentService; private readonly entitlementService; private readonly chatModeService; private readonly promptsService; private static _counter; private _onDidLoadInputState; readonly onDidLoadInputState: Event; private _onDidChangeHeight; readonly onDidChangeHeight: Event; private _onDidFocus; readonly onDidFocus: Event; private _onDidBlur; readonly onDidBlur: Event; private _onDidChangeContext; readonly onDidChangeContext: Event<{ removed?: IChatRequestVariableEntry[]; added?: IChatRequestVariableEntry[]; }>; private _onDidAcceptFollowup; readonly onDidAcceptFollowup: Event<{ followup: IChatFollowup; response: IChatResponseViewModel | undefined; }>; private readonly _attachmentModel; get attachmentModel(): ChatAttachmentModel; readonly selectedToolsModel: ChatSelectedTools; getAttachedAndImplicitContext(sessionId: string): ChatRequestVariableSet; get hasPromptFileAttachments(): boolean; private _indexOfLastAttachedContextDeletedWithKeyboard; private _indexOfLastOpenedContext; private _implicitContext; get implicitContext(): ChatImplicitContext | undefined; private _relatedFiles; get relatedFiles(): ChatRelatedFiles | undefined; private _hasFileAttachmentContextKey; private readonly _onDidChangeVisibility; private readonly _contextResourceLabels; private readonly inputEditorMaxHeight; private inputEditorHeight; private container; private inputSideToolbarContainer?; private followupsContainer; private readonly followupsDisposables; private attachmentsContainer; private chatInputOverlay; private attachedContextContainer; private readonly attachedContextDisposables; private relatedFilesContainer; private chatEditingSessionWidgetContainer; private _inputPartHeight; get inputPartHeight(): number; private _followupsHeight; get followupsHeight(): number; private _editSessionWidgetHeight; get editSessionWidgetHeight(): number; get attachmentsHeight(): number; private _inputEditor; private _inputEditorElement; private executeToolbar; private inputActionsToolbar; private addFilesToolbar; get inputEditor(): CodeEditorWidget; readonly dnd: ChatDragAndDrop; private history; private historyNavigationBackwardsEnablement; private historyNavigationForewardsEnablement; private inputModel; private inputEditorHasText; private chatCursorAtTop; private inputEditorHasFocus; private currentlyEditingInputKey; private promptFileAttached; private chatModeKindKey; private modelWidget; private modeWidget; private readonly _waitForPersistedLanguageModel; private _onDidChangeCurrentLanguageModel; private _currentLanguageModel; get currentLanguageModel(): string | undefined; get selectedLanguageModel(): ILanguageModelChatMetadataAndIdentifier | undefined; private _onDidChangeCurrentChatMode; readonly onDidChangeCurrentChatMode: Event; private readonly _currentModeObservable; get currentModeKind(): ChatModeKind; get currentModeObs(): IObservable; private cachedDimensions; private cachedExecuteToolbarWidth; private cachedInputToolbarWidth; readonly inputUri: URI; private readonly _chatEditsActionsDisposables; private readonly _chatEditsDisposables; private _chatEditsListPool; private _chatEditList; get selectedElements(): URI[]; private _attemptedWorkingSetEntriesCount; get attemptedWorkingSetEntriesCount(): number; private readonly getInputState; private _generating?; constructor(location: ChatAgentLocation, options: IChatInputPartOptions, styles: IChatInputStyles, getContribsInputState: () => any, inline: boolean, historyService: IChatWidgetHistoryService, modelService: IModelService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, keybindingService: IKeybindingService, accessibilityService: IAccessibilityService, languageModelsService: ILanguageModelsService, logService: ILogService, fileService: IFileService, editorService: IEditorService, themeService: IThemeService, textModelResolverService: ITextModelService, storageService: IStorageService, labelService: ILabelService, agentService: IChatAgentService, sharedWebExtracterService: ISharedWebContentExtractorService, experimentService: IWorkbenchAssignmentService, entitlementService: IChatEntitlementService, chatModeService: IChatModeService, promptsService: IPromptsService); private getSelectedModelStorageKey; private getSelectedModelIsDefaultStorageKey; private initSelectedModel; setEditing(enabled: boolean): void; switchModel(modelMetadata: Pick): void; switchModelByQualifiedName(qualifiedModelName: string): boolean; switchToNextModel(): void; openModelPicker(): void; openModePicker(): void; private checkModelSupported; setChatMode(mode: ChatModeKind | string, storeSelection?: boolean): void; private setChatMode2; private modelSupportedForDefaultAgent; private getModels; private setCurrentLanguageModelToDefault; private setCurrentLanguageModel; private loadHistory; private _getAriaLabel; private validateCurrentChatMode; initForNewChatModel(state: IChatViewState, modelIsEmpty: boolean): void; private setExpModelOrWait; private getDefaultModeExperimentStorageKey; logInputHistory(): void; setVisible(visible: boolean): void; get generating(): Promise | undefined; startGenerating(): IDisposable; get element(): HTMLElement; showPreviousValue(): Promise; showNextValue(): Promise; private navigateHistory; setValue(value: string, transient: boolean): void; private saveCurrentValue; focus(): void; hasFocus(): boolean; acceptInput(isUserQuery?: boolean): Promise; validateAgentMode(): void; private getFilteredEntry; private _acceptInputForVoiceover; private _handleAttachedContextChange; render(container: HTMLElement, initialValue: string, widget: IChatWidget): void; toggleChatInputOverlay(editing: boolean): void; renderAttachedContext(): void; private handleAttachmentDeletion; private handleAttachmentOpen; private handleAttachmentNavigation; renderChatEditingSessionState(chatEditingSession: IChatEditingSession | null): Promise; renderChatRelatedFiles(): Promise; renderFollowups(items: IChatFollowup[] | undefined, response: IChatResponseViewModel | undefined): Promise; get contentHeight(): number; layout(height: number, width: number): void; private previousInputEditorDimension; private _layout; private getLayoutData; getViewState(): IChatInputState; saveState(): void; } export {};