3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
+ import { Codicon } from '../../../../../base/common/codicons.js' ;
6
7
import { Disposable } from '../../../../../base/common/lifecycle.js' ;
8
+ import { ThemeIcon } from '../../../../../base/common/themables.js' ;
9
+ import { localize } from '../../../../../nls.js' ;
7
10
import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js' ;
8
11
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js' ;
9
12
import { registerWorkbenchContribution2 , WorkbenchPhase , type IWorkbenchContribution } from '../../../../common/contributions.js' ;
10
- import { ILanguageModelToolsService } from '../../../chat/common/languageModelToolsService.js' ;
13
+ import { ILanguageModelToolsService , ToolDataSource } from '../../../chat/common/languageModelToolsService.js' ;
11
14
import { GetTerminalOutputTool , GetTerminalOutputToolData } from './getTerminalOutputTool.js' ;
12
15
import { RunInTerminalTool , RunInTerminalToolData } from './runInTerminalTool.js' ;
13
16
@@ -31,6 +34,13 @@ class ChatAgentToolsContribution extends Disposable implements IWorkbenchContrib
31
34
const getTerminalOutputTool = instantiationService . createInstance ( GetTerminalOutputTool ) ;
32
35
this . _register ( toolsService . registerToolData ( GetTerminalOutputToolData ) ) ;
33
36
this . _register ( toolsService . registerToolImplementation ( GetTerminalOutputToolData . id , getTerminalOutputTool ) ) ;
37
+
38
+ const toolSet = this . _register ( toolsService . createToolSet ( ToolDataSource . Internal , 'runCommands' , 'runCommands' , {
39
+ icon : ThemeIcon . fromId ( Codicon . terminal . id ) ,
40
+ description : localize ( 'toolset.runCommands' , 'Runs commands in the terminal' )
41
+ } ) ) ;
42
+ toolSet . addTool ( RunInTerminalToolData ) ;
43
+ toolSet . addTool ( GetTerminalOutputToolData ) ;
34
44
}
35
45
}
36
46
registerWorkbenchContribution2 ( ChatAgentToolsContribution . ID , ChatAgentToolsContribution , WorkbenchPhase . AfterRestored ) ;
0 commit comments