import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service"; import type { ResolveSessionConfigResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IWorkspaceTrustManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service"; import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service"; import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service"; import { IAgentHostNewSessionFolderService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.service"; import { IAgentHostUntitledProvisionalSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service"; export declare class AgentHostUntitledProvisionalSessionService extends Disposable implements IAgentHostUntitledProvisionalSessionService { private readonly _agentHostService; private readonly _logService; private readonly _configurationService; private readonly _environmentService; private readonly _newSessionFolderService; private readonly _workspaceTrustManagementService; readonly _serviceBrand: undefined; private readonly _entries; private readonly _pending; private readonly _resolvedConfigs; private readonly _resolvedConfigRequestSeq; private readonly _rebound; private readonly _sequencer; private readonly _onDidChange; readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; constructor(_agentHostService: IAgentHostService, _logService: ILogService, chatService: IChatService, _configurationService: IConfigurationService, _environmentService: IWorkbenchEnvironmentService, _newSessionFolderService: IAgentHostNewSessionFolderService, _workspaceTrustManagementService: IWorkspaceTrustManagementService); get(sessionResource: URI): URI | undefined; waitForPending(sessionResource: URI): Promise; getOrCreate(sessionResource: URI, provider: string, workingDirectory: URI | undefined): Promise; /** * Whether the folder the provisional agent would run in is trusted. When a * working directory is known (it may be a standalone folder outside the * open workspace, e.g. a per-session folder), gate on that folder's trust; * otherwise fall back to whole-workspace trust. */ private _isTargetFolderTrusted; tryRebind(oldSessionResource: URI, newSessionResource: URI, provider: string, workingDirectory: URI | undefined): Promise; /** * Recreate the provisional backend session for `sessionResource` at a new * working directory, preserving the user's config choices. A created * session's cwd is immutable, so the only way to honor a folder change is to * dispose and recreate. Reuses the same deterministic backend URI so the * chat-resource-to-backend mapping stays stable. Sequencer-queued so it * settles in order with config-chip changes for the same resource. */ private _changeWorkingDirectory; disposeSession(sessionResource: URI): Promise; dispose(): void; /** * Convert the chat-input UI session URI (`agent-host-PROVIDER:/`) * to the agent-host backend URI (`PROVIDER:/`). */ private _toBackendUri; getResolvedConfig(sessionResource: URI): ResolveSessionConfigResult | undefined; refreshResolvedConfig(sessionResource: URI, provider: string, workingDirectory: URI | undefined, config: Record | undefined): Promise; applyConfigChange(sessionResource: URI, provider: string, workingDirectory: URI | undefined, partial: Record): Promise; /** * Workbench-side initial config seed sent at `createSession` time so the * agent's own server-side defaults don't fill `state.config.values` for * keys the workbench wants to control. Without this, the merge filter in * `agentHostSessionHandler` sees those agent defaults as "user-set" and * drops the workbench defaults. * * - `isolation`: workbench has no isolation picker, so always `'folder'`. * - `mode` / `autoApprove`: seeded from the single * `chat.defaultConfiguration` object setting (`mode` and * `approvals` properties). The approval seed is clamped to `'default'` * when the `chat.tools.global.autoApprove` policy is off. The local-only * `chat.permissions.default` setting is NOT used. * * Skipped entirely in the Agents window, where the sessions provider * supplies config via `request.agentHostSessionConfig` instead. */ private _getInitialConfig; }