Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model

This commit is contained in:
Connor Peet
2026-01-13 10:53:28 -08:00
1660 changed files with 77480 additions and 41089 deletions

View File

@@ -23,6 +23,7 @@ import { getRemoteName } from '../../../platform/remote/common/remoteHosts.js';
import { TelemetryTrustedValue } from '../../../platform/telemetry/common/telemetryUtils.js';
import { EditSessionIdentityMatch } from '../../../platform/workspace/common/editSessions.js';
import { DebugConfigurationProviderTriggerKind } from '../../contrib/debug/common/debug.js';
import { PromptsType } from '../../contrib/chat/common/promptSyntax/promptTypes.js';
import { ExtensionDescriptionRegistry } from '../../services/extensions/common/extensionDescriptionRegistry.js';
import { UIKind } from '../../services/extensions/common/extensionHostProtocol.js';
import { checkProposedApiEnabled, isProposedApiEnabled } from '../../services/extensions/common/extensions.js';
@@ -227,7 +228,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
rpcProtocol.set(ExtHostContext.ExtHostInteractive, new ExtHostInteractive(rpcProtocol, extHostNotebook, extHostDocumentsAndEditors, extHostCommands, extHostLogService));
const extHostLanguageModelTools = rpcProtocol.set(ExtHostContext.ExtHostLanguageModelTools, new ExtHostLanguageModelTools(rpcProtocol, extHostLanguageModels));
const extHostChatSessions = rpcProtocol.set(ExtHostContext.ExtHostChatSessions, new ExtHostChatSessions(extHostCommands, extHostLanguageModels, rpcProtocol, extHostLogService));
const extHostChatAgents2 = rpcProtocol.set(ExtHostContext.ExtHostChatAgents2, new ExtHostChatAgents2(rpcProtocol, extHostLogService, extHostCommands, extHostDocuments, extHostLanguageModels, extHostDiagnostics, extHostLanguageModelTools));
const extHostChatAgents2 = rpcProtocol.set(ExtHostContext.ExtHostChatAgents2, new ExtHostChatAgents2(rpcProtocol, extHostLogService, extHostCommands, extHostDocuments, extHostDocumentsAndEditors, extHostLanguageModels, extHostDiagnostics, extHostLanguageModelTools));
const extHostChatContext = rpcProtocol.set(ExtHostContext.ExtHostChatContext, new ExtHostChatContext(rpcProtocol));
const extHostAiRelatedInformation = rpcProtocol.set(ExtHostContext.ExtHostAiRelatedInformation, new ExtHostRelatedInformation(rpcProtocol));
const extHostAiEmbeddingVector = rpcProtocol.set(ExtHostContext.ExtHostAiEmbeddingVector, new ExtHostAiEmbeddingVector(rpcProtocol));
@@ -1061,7 +1062,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
ignoreDeleteEvents: Boolean(ignoreDelete),
};
return extHostFileSystemEvent.createFileSystemWatcher(extHostWorkspace, configProvider, extension, pattern, options);
return extHostFileSystemEvent.createFileSystemWatcher(extHostWorkspace, configProvider, extHostFileSystemInfo, extension, pattern, options);
},
get textDocuments() {
return extHostDocuments.getAllDocumentData().map(data => data.document);
@@ -1293,11 +1294,11 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostSCM.getLastInputBox(extension)!; // Strict null override - Deprecated api
},
createSourceControl(id: string, label: string, rootUri?: vscode.Uri, iconPath?: vscode.IconPath, parent?: vscode.SourceControl): vscode.SourceControl {
if (iconPath || parent) {
createSourceControl(id: string, label: string, rootUri?: vscode.Uri, iconPath?: vscode.IconPath, isHidden?: boolean, parent?: vscode.SourceControl): vscode.SourceControl {
if (iconPath || isHidden || parent) {
checkProposedApiEnabled(extension, 'scmProviderOptions');
}
return extHostSCM.createSourceControl(extension, id, label, rootUri, iconPath, parent);
return extHostSCM.createSourceControl(extension, id, label, rootUri, iconPath, isHidden, parent);
}
};
@@ -1469,7 +1470,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
// namespace: interactive
const interactive: typeof vscode.interactive = {
transferActiveChat(toWorkspace: vscode.Uri) {
transferActiveChat(toWorkspace: vscode.Uri): Thenable<void> {
checkProposedApiEnabled(extension, 'interactive');
return extHostChatAgents2.transferActiveChat(toWorkspace);
}
@@ -1541,6 +1542,18 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'chatContextProvider');
return extHostChatContext.registerChatContextProvider(selector ? checkSelector(selector) : undefined, `${extension.id}-${id}`, provider);
},
registerCustomAgentProvider(provider: vscode.CustomAgentProvider): vscode.Disposable {
checkProposedApiEnabled(extension, 'chatPromptFiles');
return extHostChatAgents2.registerPromptFileProvider(extension, PromptsType.agent, provider);
},
registerInstructionsProvider(provider: vscode.InstructionsProvider): vscode.Disposable {
checkProposedApiEnabled(extension, 'chatPromptFiles');
return extHostChatAgents2.registerPromptFileProvider(extension, PromptsType.instructions, provider);
},
registerPromptFileProvider(provider: vscode.PromptFileProvider): vscode.Disposable {
checkProposedApiEnabled(extension, 'chatPromptFiles');
return extHostChatAgents2.registerPromptFileProvider(extension, PromptsType.prompt, provider);
},
};
// namespace: lm
@@ -1863,6 +1876,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
EditSessionIdentityMatch: EditSessionIdentityMatch,
InteractiveSessionVoteDirection: extHostTypes.InteractiveSessionVoteDirection,
ChatCopyKind: extHostTypes.ChatCopyKind,
ChatSessionChangedFile: extHostTypes.ChatSessionChangedFile,
ChatEditingSessionActionOutcome: extHostTypes.ChatEditingSessionActionOutcome,
InteractiveEditorResponseFeedbackKind: extHostTypes.InteractiveEditorResponseFeedbackKind,
DebugStackFrame: extHostTypes.DebugStackFrame,
@@ -1945,7 +1959,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
McpStdioServerDefinition: extHostTypes.McpStdioServerDefinition,
McpStdioServerDefinition2: extHostTypes.McpStdioServerDefinition,
McpToolAvailability: extHostTypes.McpToolAvailability,
SettingsSearchResultKind: extHostTypes.SettingsSearchResultKind
SettingsSearchResultKind: extHostTypes.SettingsSearchResultKind,
};
};
}