File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ interface DefaultAgentPromptProps extends BasePromptElementProps {
25
25
*/
26
26
export class DefaultAgentPrompt extends PromptElement < DefaultAgentPromptProps > {
27
27
async render ( state : void , sizing : PromptSizing ) {
28
- const hasTerminalTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . RunInTerminal ) ;
28
+ const hasTerminalTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . RunInTerminal || tool . name === ToolName . RunInTerminalCore ) ;
29
29
const hasReplaceStringTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . ReplaceString ) ;
30
30
const hasInsertEditTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . EditFile ) ;
31
31
const hasApplyPatchTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . ApplyPatch ) ;
@@ -367,7 +367,7 @@ class ApplyPatchInstructions extends PromptElement<DefaultAgentPromptProps> {
367
367
368
368
class GenericEditingTips extends PromptElement < DefaultAgentPromptProps > {
369
369
override render ( ) {
370
- const hasTerminalTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . RunInTerminal ) ;
370
+ const hasTerminalTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . RunInTerminal || tool . name === ToolName . RunInTerminalCore ) ;
371
371
return < >
372
372
Follow best practices when editing files. If a popular external library exists to solve a problem, use it and properly install the package e.g. { hasTerminalTool && 'with "npm install" or ' } creating a "requirements.txt".< br />
373
373
If you're building a webapp from scratch, give it a beautiful and modern UI.< br />
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ export class AgentUserMessage extends PromptElement<AgentUserMessageProps> {
280
280
const hasCreateFileTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . CreateFile ) ;
281
281
const hasEditFileTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . EditFile ) ;
282
282
const hasEditNotebookTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . EditNotebook ) ;
283
- const hasTerminalTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . RunInTerminal ) ;
283
+ const hasTerminalTool = ! ! this . props . availableTools ?. find ( tool => tool . name === ToolName . RunInTerminal || tool . name === ToolName . RunInTerminalCore ) ;
284
284
const attachmentHint = ( this . props . endpoint . family === 'gpt-4.1' ) && this . props . chatVariables . hasVariables ( ) ?
285
285
' (See <attachments> above for file contents. You may not need to search or read the file again.)'
286
286
: '' ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export const enum ToolName {
17
17
ListDirectory = 'list_dir' ,
18
18
GetErrors = 'get_errors' ,
19
19
RunInTerminal = 'run_in_terminal' ,
20
+ RunInTerminalCore = 'run_in_terminal2' ,
20
21
GetTerminalOutput = 'get_terminal_output' ,
21
22
GetScmChanges = 'get_changed_files' ,
22
23
UpdateUserPreferences = 'update_user_preferences' ,
You can’t perform that action at this time.
0 commit comments