
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
import { Disposable } from '../../../../../base/common/lifecycle.js';
import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.service.js';
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
import { ILanguageModelToolsService } from '../languageModelToolsService.service.js';
import { ConfirmationTool, ConfirmationToolData } from './confirmationTool.js';
import { EditTool, EditToolData } from './editFileTool.js';
import { TodoListToolWriteOnlySettingId, TodoListToolDescriptionFieldSettingId, createManageTodoListToolData, ManageTodoListTool } from './manageTodoListTool.js';

let BuiltinToolsContribution = class BuiltinToolsContribution extends Disposable {
    static { this.ID = 'chat.builtinTools'; }
    constructor(toolsService, instantiationService, configurationService) {
        super();
        this.configurationService = configurationService;
        const editTool = instantiationService.createInstance(EditTool);
        this._register(toolsService.registerTool(EditToolData, editTool));
        const writeOnlyMode = this.configurationService.getValue(TodoListToolWriteOnlySettingId) === true;
        const includeDescription = this.configurationService.getValue(TodoListToolDescriptionFieldSettingId) !== false;
        const todoToolData = createManageTodoListToolData(writeOnlyMode, includeDescription);
        const manageTodoListTool = this._register(instantiationService.createInstance(ManageTodoListTool, writeOnlyMode, includeDescription));
        this._register(toolsService.registerTool(todoToolData, manageTodoListTool));
        const confirmationTool = instantiationService.createInstance(ConfirmationTool);
        this._register(toolsService.registerTool(ConfirmationToolData, confirmationTool));
    }
};
BuiltinToolsContribution = ( __decorate([
    ( __param(0, ILanguageModelToolsService)),
    ( __param(1, IInstantiationService)),
    ( __param(2, IConfigurationService))
], BuiltinToolsContribution));
const InternalFetchWebPageToolId = 'vscode_fetchWebPage_internal';

export { BuiltinToolsContribution, InternalFetchWebPageToolId };
