import { IChatSessionsService } from "./chatSessionsService.service.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; import { IWorkspace } from "../../../../platform/workspace/common/workspace.js"; import { ServicesAccessor } from "../../../../platform/instantiation/common/instantiation.js"; import { RawContextKey } from "../../../../platform/contextkey/common/contextkey.js"; import { URI } from "../../../../base/common/uri.js"; export declare function managedPolicyRequiresAgentHostMessage(): string; export declare function isLocalChatSessionSubjectToManagedPolicy(sessionResource: URI, location: ChatAgentLocation): boolean; export declare const CONTINUE_CHAT_IN_COPILOT_ACTION_ID = "workbench.action.chat.continueInCopilot"; export declare const CONTINUE_AGENT_HOST_CHAT_IN_COPILOT_ACTION_ID = "workbench.action.chat.continueAgentHostChatInCopilot"; export { ChatAIDisabledSettingId } from "../../../../platform/chat/common/chatSettings.js"; export declare enum BYOKUtilityModelDefault { None = "none", MainAgent = "mainAgent", Copilot = "copilot" } export declare enum ChatConfiguration { PluginsEnabled = "chat.plugins.enabled", PluginLocations = "chat.pluginLocations", PluginMarketplaces = "chat.plugins.marketplaces", ExtraMarketplaces = "chat.plugins.extraMarketplaces", EnabledPlugins = "chat.plugins.enabledPlugins", AgentEnabled = "chat.agent.enabled", AgentsPickerInAttachContextMenu = "sessions.chat.experimental.agentsPickerInAttachContextMenu", PlanAgentDefaultModel = "chat.planAgent.defaultModel", ExploreAgentDefaultModel = "chat.exploreAgent.defaultModel", UtilityModel = "chat.utilityModel", UtilitySmallModel = "chat.utilitySmallModel", BYOKUtilityModelDefault = "chat.byokUtilityModelDefault", RequestQueueingDefaultAction = "chat.requestQueuing.defaultAction", SaveBeforeSend = "chat.saveBeforeSend", AgentStatusEnabled = "chat.agentsControl.enabled", EditorAssociations = "chat.editorAssociations", UnifiedAgentsBar = "chat.unifiedAgentsBar.enabled", AgentSessionProjectionEnabled = "chat.agentSessionProjection.enabled", MigrateLegacyCopilotCliSessions = "chat.agentSessions.migrateLegacyCopilotCli", ShowExternalAgentSessions = "chat.agentSessions.showExternal", OpenSessionsInEditor = "chat.agentSessions.openInEditor", AutoMarkAsDoneMergedSessionsAfterDays = "chat.agentSessions.autoMarkAsDoneMergedSessionsAfterDays", AutoDeleteMarkedAsDoneMergedSessionsAfterDays = "chat.agentSessions.autoDeleteMarkedAsDoneMergedSessionsAfterDays", ExtensionToolsEnabled = "chat.extensionTools.enabled", RepoInfoEnabled = "chat.repoInfo.enabled", EditRequests = "chat.editRequests", PasteAsAttachmentThreshold = "chat.pasteAsAttachmentThreshold", InlineReferencesStyle = "chat.inlineReferences.style", InlineAttachmentsEnabled = "chat.inlineAttachments.enabled", AutoReply = "chat.autoReply", GlobalAutoApprove = "chat.tools.global.autoApprove", AutoApproveEdits = "chat.tools.edits.autoApprove", AutoApprovedUrls = "chat.tools.urls.autoApprove", EligibleForAutoApproval = "chat.tools.eligibleForAutoApproval", EnableMath = "chat.math.enabled", CheckpointsEnabled = "chat.checkpoints.enabled", ThinkingStyle = "chat.agent.thinkingStyle", ThinkingGenerateTitles = "chat.agent.thinking.generateTitles", TerminalToolsInThinking = "chat.agent.thinking.terminalTools", TerminalAgentHostEnabled = "chat.terminal.agentHost.enabled", InlineChatAgentHostEnabled = "chat.inlineChat.agentHost.enabled", CollapseCompletedResponses = "chat.agent.collapseCompletedResponses", SimpleTerminalCollapsible = "chat.tools.terminal.simpleCollapsible", TerminalOutputReflow = "chat.tools.terminal.outputReflow", CompressOutputEnabled = "chat.tools.compressOutput.enabled", ThinkingPhrases = "chat.agent.thinking.phrases", AutoExpandToolFailures = "chat.tools.autoExpandFailures", TodosShowWidget = "chat.tools.todos.showWidget", NotifyWindowOnConfirmation = "chat.notifyWindowOnConfirmation", NotifyWindowOnResponseReceived = "chat.notifyWindowOnResponseReceived", ChatViewSessionsEnabled = "chat.viewSessions.enabled", SessionSyncEnabled = "chat.sessionSync.enabled", SessionSyncExcludeRepositories = "chat.sessionSync.excludeRepositories", ChatViewSessionsGrouping = "chat.viewSessions.grouping", ChatViewSessionsOrientation = "chat.viewSessions.orientation", ChatViewProgressBadgeEnabled = "chat.viewProgressBadge.enabled", ChatContextUsageEnabled = "chat.contextUsage.enabled", Verbose = "chat.verbose", ProgressBorder = "chat.progressBorder.enabled", PersistentProgress = "chat.persistentProgress", PersistentProgressVerbosity = "chat.persistentProgressVerbosity", SessionStateIndicatorEnabled = "chat.experimental.sessionStateIndicator.enabled", SubagentToolCustomAgents = "chat.customAgentInSubagent.enabled", SubagentsAllowInvocationsFromSubagents = "chat.subagents.allowInvocationsFromSubagents", SubagentsShowCreditUsage = "chat.subagents.showCreditUsage", ShowCodeBlockProgressAnimation = "chat.agent.codeBlockProgress", RestoreLastPanelSession = "chat.restoreLastPanelSession", ExitAfterDelegation = "chat.exitAfterDelegation", ExplainChangesEnabled = "chat.editing.explainChanges.enabled", RevealNextChangeOnResolve = "chat.editing.revealNextChangeOnResolve", OpenChangedFileInDiffEditor = "chat.editing.openChangedFileInDiffEditor", EditorWorkingSetEnabled = "chat.editor.workingSet.enabled", GrowthNotificationEnabled = "chat.growthNotification.enabled", ChatClosedPromoNotification = "chat.closedPromoNotification", TitleBarSignInEnabled = "chat.titleBar.signIn.enabled", WelcomePageSignInEnabled = "chat.welcomePage.signIn.enabled", WelcomePageAgentsWindowGraphic = "chat.welcomePage.agentsWindowGraphic", WelcomePageAgentsWindowSectionStyle = "chat.welcomePage.agentsWindowSectionStyle", TitleBarOpenInAgentsWindowEnabled = "chat.titleBar.openInAgentsWindow.enabled", TitleBarOpenInAgentsWindowRichHover = "chat.titleBar.openInAgentsWindow.richHover", OpenInAgentsWindowTransferDraft = "chat.experimental.openInAgentsWindow.transferDraft", AgentsParallelWorkBannerEnabled = "chat.agentsParallelWorkBanner.enabled", AgentsWindowBannerEnabled = "chat.agentsWindowBanner.enabled", AgentsWindowBannerDeveloperMode = "chat.agentsWindowBanner.developerMode", AgentsWindowBannerRevealCurrentSession = "chat.agentsWindowBanner.revealCurrentSession", CopilotHarnessIntroductionMode = "chat.copilotHarnessIntroduction.mode", HarnessSwitchFeedbackSurveyEnabled = "chat.harnessSwitchFeedbackSurvey.enabled", ChatCustomizationsStructuredPreviewEnabled = "chat.customizations.structuredPreview.enabled", ChatCustomizationsToggleStyle = "chat.experimental.customizations.toggleStyle", ChatCustomizationsPromptMigrationEnabled = "chat.customizations.promptMigration.enabled", ChatCustomizationsUserDataMigrationEnabled = "chat.customizations.userDataMigration.enabled", ChatCustomizationsLocationsMigrationEnabled = "chat.customizations.locationsMigration.enabled", ChatCustomizationsMcpServerMigrationEnabled = "chat.customizations.mcpServerMigration.enabled", ChatCustomizationsMigrationEnabled = "chat.customizations.migration.enabled", AutopilotAdvancedEnabled = "chat.autopilot.advanced.enabled", DefaultPermissionLevel = "chat.permissions.default", ExperimentalModePermissionsPicker = "chat.experimentalModePermissionsPicker", DefaultConfiguration = "chat.defaultConfiguration", DefaultModel = "chat.defaultModel", ImageCarouselEnabled = "imageCarousel.chat.enabled", ArtifactsEnabled = "chat.artifacts.enabled", ArtifactsRulesByMimeType = "chat.artifacts.rules.byMimeType", ArtifactsRulesByFilePath = "chat.artifacts.rules.byFilePath", ArtifactsRulesByMemoryFilePath = "chat.artifacts.rules.byMemoryFilePath", ToolConfirmationCarousel = "chat.tools.confirmationCarousel.enabled", ToolRiskAssessmentEnabled = "chat.tools.riskAssessment.enabled", ToolRiskAssessmentModel = "chat.tools.riskAssessment.model", DefaultNewSessionMode = "chat.newSession.defaultMode", AgentHostDebugLogsDefaultExportLocation = "chat.agentHost.debugLogs.defaultExportLocation", EditorPreferCopilotHarness = "chat.editor.preferCopilotHarness", DefaultToCopilotHarness = "chat.defaultToCopilotHarness", TemporaryDefaultToLocalHarness = "chat.temporaryDefaultToLocalHarness", EditorLocalAgentEnabled = "chat.editor.localAgent.enabled", AgentsHandoffTipMode = "chat.agentsHandoffTip.mode", AgentsHandoffTipDelaySeconds = "chat.agentsHandoffTip.delaySeconds", BtwTipEnabled = "chat.btwTip.enabled", CopilotCliCommandEnabled = "chat.copilotCliCommand.enabled", IncrementalRendering = "chat.experimental.incrementalRendering.enabled", IncrementalRenderingStyle = "chat.experimental.incrementalRendering.animationStyle", IncrementalRenderingBuffering = "chat.experimental.incrementalRendering.buffering", ExperimentalStickyScrollEnabled = "chat.experimental.stickyScroll.enabled", RichLinks = "chat.experimental.richLinks.enabled", CollectInstructionsInExtension = "chat.experimental.collectInstructionsInExtension", ImplicitContextActiveEditor = "chat.implicitContext.includeActiveEditor" } export declare const CHAT_ATTACH_CONTEXT_ACTION_ID = "workbench.action.chat.attachContext"; export declare enum CopilotHarnessIntroductionMode { Off = "off", NewSession = "newSession", AfterRequest = "afterRequest" } export declare function getCopilotHarnessIntroductionMode(configurationService: IConfigurationService): CopilotHarnessIntroductionMode; export declare enum ChatClosedPromoNotification { None = "none", CopilotIconPopup = "copilotIconPopup" } /** The graphic that explains the Agents window above the Agents window button on the Welcome page. */ export declare enum AgentsWindowGraphicVariant { None = "none", /** The editor window and the Agents window side by side. */ WindowComparison = "windowComparison", /** Editor windows for several projects become one Agents window. */ ManyWindowsToOne = "manyWindowsToOne", /** {@link ManyWindowsToOne} when more than one editor window is open, and {@link WindowComparison} otherwise. */ Auto = "auto" } export declare function getAgentsWindowGraphicVariant(configurationService: IConfigurationService): AgentsWindowGraphicVariant; /** * What hovering or focusing the title bar's Agents window button shows to users who are new to the Agents window. * Each hover card is named after the graphic it shows, like the values of {@link AgentsWindowGraphicVariant}. */ export declare enum OpenInAgentsTitleBarHoverVariant { /** A simple tooltip, and the button grows to show its label. */ None = "none", /** A hover card with the {@link AgentsWindowGraphicVariant.ManyWindowsToOne} graphic, and the button stays an icon. */ ManyWindowsToOne = "manyWindowsToOne", /** A hover card with the {@link AgentsWindowGraphicVariant.WindowComparison} graphic, and the button stays an icon. */ WindowComparison = "windowComparison" } /** * Reads the graphic of the hover card that the title bar's Agents window button shows to users who are new to the Agents window, * or `undefined` for a simple tooltip, the setting's default {@link OpenInAgentsTitleBarHoverVariant.None}. */ export declare function getOpenInAgentsTitleBarHoverCardDesign(configurationService: IConfigurationService): AgentsWindowGraphicVariant.ManyWindowsToOne | AgentsWindowGraphicVariant.WindowComparison | undefined; /** How the Agents window graphic, its captions and the Agents window button are set apart from the rest of the Welcome page. */ export declare enum AgentsWindowSectionStyle { None = "none", /** A subtle surface around the section, like the walkthrough tiles. */ Card = "card", /** A subtle border around the section. The default. */ Outline = "outline", /** A surface tinted with the accent color around the section. */ Tint = "tint", /** A subtle surface across the width of the page's content. */ Band = "band", /** Lines across the width of the page's content above and below the section. */ Separator = "separator" } /** Reads the section style, falling back to the setting's default, {@link AgentsWindowSectionStyle.Outline}. */ export declare function getAgentsWindowSectionStyle(configurationService: IConfigurationService): AgentsWindowSectionStyle; export declare const AGENT_SESSION_CLEANUP_SETTINGS_TAG = "agentSessionCleanup"; export declare const DEFAULT_AGENTS_HANDOFF_TIP_DELAY_SECONDS = 5; /** * The "kind" of agents for custom agents. */ export declare enum ChatModeKind { Ask = "ask", Edit = "edit", Agent = "agent" } /** * The permission level controlling tool auto-approval behavior. */ export declare enum ChatPermissionLevel { /** Use existing auto-approve settings */ Default = "default", /** Delegate approval decisions to a model */ Assisted = "assisted", /** Auto-approve all tool calls, auto-retry on error */ AutoApprove = "autoApprove", /** Everything AutoApprove does plus an internal stop hook that continues until the task is done */ Autopilot = "autopilot" } export declare function isChatPermissionLevel(level: unknown | undefined): level is ChatPermissionLevel; /** * Shape of the {@link ChatConfiguration.DefaultConfiguration} * object setting. Controls the starting `mode` and `approvals` for new agent-host * sessions (such as Copilot CLI). All properties are optional — a missing property * falls back to the per-axis default. */ export type AgentSessionMode = "interactive" | "plan" | "autopilot"; /** Approval values exposed by the `chat.defaultConfiguration` setting. */ export declare enum ChatDefaultPermissionLevel { Manual = "manual", Assisted = "assisted", AllowAll = "allowAll" } export interface IChatDefaultConfiguration { /** Starting agent mode: `interactive` / `plan` / `autopilot`. */ readonly mode?: AgentSessionMode; /** Starting approval level: `manual` / `assisted` / `allowAll`. */ readonly approvals?: ChatDefaultPermissionLevel; } /** Maps a default-configuration value to the internal Agent Host permission level. */ export declare function getChatPermissionLevelFromDefaultConfiguration(value: unknown): ChatPermissionLevel | undefined; /** * Returns true if the permission level enables auto-approval of all tool calls. * Both {@link ChatPermissionLevel.AutoApprove} and {@link ChatPermissionLevel.Autopilot} enable auto-approval. */ export declare function isAutoApproveLevel(level: ChatPermissionLevel | undefined): boolean; /** * True for {@link ChatPermissionLevel.Autopilot} only. Unlike {@link isAutoApproveLevel}, this * excludes {@link ChatPermissionLevel.AutoApprove}, so it can gate Autopilot-only behavior such as * risk-based skipping of tool calls. */ export declare function isAutopilotLevel(level: ChatPermissionLevel | undefined): boolean; export declare enum ThinkingDisplayMode { Collapsed = "collapsed", CollapsedPreview = "collapsedPreview", FixedScrolling = "fixedScrolling" } export declare enum ChatProgressAnimation { Off = "off", Draw = "draw", DrawMonochrome = "drawMonochrome", DrawMonochromeNoIcon = "drawMonochromeNoIcon" } export declare enum ChatProgressVerbosity { Verbose = "verbose", Compact = "compact", Conversation = "conversation" } export declare enum CollapsedToolsDisplayMode { Off = "off", WithThinking = "withThinking", Always = "always" } export declare enum ChatNotificationMode { Off = "off", WindowNotFocused = "windowNotFocused", Always = "always" } export type RawChatParticipantLocation = "panel" | "terminal" | "notebook" | "editing-session"; export declare enum ChatAgentLocation { /** * This is chat, whether it's in the sidebar, a chat editor, or quick chat. * Leaving the values alone as they are in stored data so we don't have to normalize them. */ Chat = "panel", Terminal = "terminal", Notebook = "notebook", /** * EditorInline means inline chat in a text editor. */ EditorInline = "editor" } export declare namespace ChatAgentLocation { function fromRaw(value: RawChatParticipantLocation | string): ChatAgentLocation; } /** Schemes whose models are chat input editors. */ export declare const chatInputSchemes: readonly string[]; export declare function isChatInputModel(uri: URI): boolean; export declare function isSupportedChatFileScheme(accessor: ServicesAccessor, scheme: string): boolean; /** * Returns the effective default session type for a new chat in the VS Code * editor window. * * Virtual workspaces always default to {@link localChatSessionType}. Otherwise, * when the agent host is enabled and either `chat.defaultToCopilotHarness` is opted in or the * agent sandbox is enforced by policy, Agent Host Copilot CLI is the default. It falls back to * the local harness when enabled, or to the first visible non-local provider. */ export declare function getComputedDefaultSessionType(configurationService: IConfigurationService, chatSessionsService: Pick, workspace: IWorkspace, agentHostEnabled: boolean, managedSandboxEnforced?: boolean, managedPolicyRequiresAgentHost?: boolean): string; export declare function getComputedDefaultSessionResource(configurationService: IConfigurationService, chatSessionsService: Pick, workspace: IWorkspace, agentHostEnabled: boolean): URI; export declare function isNewChatSessionTypeUsable(sessionType: string, configurationService: IConfigurationService, chatSessionsService: Pick, workspace: IWorkspace, agentHostEnabled?: boolean, managedSandboxEnforced?: boolean, managedPolicyRequiresAgentHost?: boolean): boolean; /** * Whether the session type belongs to a local Agent Host provider (Claude or Codex) that policy * disables. Saved chats of such a provider stay readable, but it cannot start new chats, so new-chat * resolution must not select it. */ export declare function isLocalAgentHostSessionTypeDisabledByPolicy(sessionType: string, configurationService: IConfigurationService): boolean; /** Why a new chat session type was selected. */ export type SessionTypeSelectionReason = /** A caller explicitly chose the session type. */ "explicitOverride" /** The session type was automatically set to Local in a virtual workspace. */ | "virtualWorkspace" /** The user's last usable session type was restored. */ | "rememberedSelection" /** The current session's usable type was preserved. */ | "currentSession" /** The Copilot harness preference replaced a local current session. */ | "copilotPreference" /** An intended Agent Host session could not be acquired, so Local was used. */ | "agentHostUnavailable" /** Settings and available capabilities determined the default type. */ | "computedDefault"; export declare function getLocalFallbackSessionTypeSelectionReason(sessionType: string, didAcquireSession: boolean, inheritedReason?: SessionTypeSelectionReason): SessionTypeSelectionReason | undefined; export interface IDefaultNewChatSessionTypeOptions { readonly explicitOverride?: string; readonly currentSessionType?: string; } export interface IResolvedNewChatSessionType { /** The session type to open for the new chat. */ readonly sessionType: string; readonly selectionReason: SessionTypeSelectionReason; } export declare function getDefaultNewChatSessionType(configurationService: IConfigurationService, chatSessionsService: Pick, storageService: IStorageService, workspace: IWorkspace, agentHostEnabled: boolean, options?: IDefaultNewChatSessionTypeOptions, managedSandboxEnforced?: boolean, managedPolicyRequiresAgentHost?: boolean): string; export declare function getDefaultNewChatSessionTypeAndReasonFromServices(configurationService: IConfigurationService, chatSessionsService: Pick, storageService: IStorageService, workspace: IWorkspace, agentHostEnabled: boolean, options?: IDefaultNewChatSessionTypeOptions, managedSandboxEnforced?: boolean, managedPolicyRequiresAgentHost?: boolean): IResolvedNewChatSessionType; export declare function getDefaultNewChatSessionTypeAndReason(accessor: ServicesAccessor, options?: IDefaultNewChatSessionTypeOptions): IResolvedNewChatSessionType; export declare function getDefaultNewChatSessionResource(configurationService: IConfigurationService, chatSessionsService: Pick, storageService: IStorageService, workspace: IWorkspace, agentHostEnabled: boolean, options?: IDefaultNewChatSessionTypeOptions, managedSandboxEnforced?: boolean): URI; export declare function recordUserSelectedSessionType(storageService: IStorageService, configurationService: IConfigurationService, chatSessionsService: Pick, workspace: IWorkspace, sessionType: string, agentHostEnabled: boolean): void; /** * Whether the legacy local chat harness is enabled. Virtual workspaces always keep it. Outside * virtual workspaces, an enterprise-mandated sandbox floor disables it: the sandbox is implemented * by the Agent Host, so the enterprise has declared these users governed. */ export declare function isEditorLocalAgentEnabled(configurationService: IConfigurationService, workspace: IWorkspace, managedSandboxEnforced?: boolean): boolean; export declare function isVisibleEditorChatSessionType(sessionType: string, configurationService: IConfigurationService, chatSessionsService: Pick, workspace: IWorkspace, managedSandboxEnforced?: boolean, agentHostEnabled?: boolean, managedPolicyRequiresAgentHost?: boolean): boolean; export declare const MANAGE_CHAT_COMMAND_ID = "workbench.action.chat.manage"; export declare const CHAT_OPEN_AGENT_HOST_CHAT_COMMAND_ID = "workbench.action.chat.openAgentHostChat"; export { CHAT_SUBAGENT_RESOURCE_QUERY_PARAM, getAgentHostSessionResource } from "../../../../platform/agentHost/common/agentHostSessionIdentity.js"; export declare const OPEN_WORKSPACE_IN_AGENTS_WINDOW_COMMAND_ID = "workbench.action.openWorkspaceInAgentsWindow"; export declare const OPEN_AGENTS_WINDOW_COMMAND_ID = "workbench.action.openAgentsWindow"; export { AGENTS_WINDOW_TOTAL_SESSIONS_STORAGE_KEY } from "../../../../platform/chat/common/agentsWindowInvitation.js"; export declare const OPEN_AGENTS_WINDOW_PRECONDITION: import("../../../../platform/contextkey/common/contextkey.js").ContextKeyExpression | undefined; export declare const ChatEditorTitleMaxLength = 30; export declare const CHAT_TERMINAL_OUTPUT_MAX_PREVIEW_LINES = 1000; export declare const CONTEXT_MODELS_EDITOR: RawContextKey; export declare const CONTEXT_MODELS_SEARCH_FOCUS: RawContextKey;