(options: NativeToolsOptions = {})
| 40 | * @returns Array of native tool definitions |
| 41 | */ |
| 42 | export function getNativeTools(options: NativeToolsOptions = {}): OpenAI.Chat.ChatCompletionTool[] { |
| 43 | const { supportsImages = false } = options |
| 44 | |
| 45 | const readFileOptions: ReadFileToolOptions = { |
| 46 | supportsImages, |
| 47 | } |
| 48 | |
| 49 | return [ |
| 50 | accessMcpResource, |
| 51 | apply_diff, |
| 52 | applyPatch, |
| 53 | askFollowupQuestion, |
| 54 | attemptCompletion, |
| 55 | codebaseSearch, |
| 56 | executeCommand, |
| 57 | generateImage, |
| 58 | listFiles, |
| 59 | newTask, |
| 60 | readCommandOutput, |
| 61 | createReadFileTool(readFileOptions), |
| 62 | runSlashCommand, |
| 63 | skill, |
| 64 | searchReplace, |
| 65 | edit_file, |
| 66 | editTool, |
| 67 | searchFiles, |
| 68 | switchMode, |
| 69 | updateTodoList, |
| 70 | writeToFile, |
| 71 | ] satisfies OpenAI.Chat.ChatCompletionTool[] |
| 72 | } |
| 73 | |
| 74 | // Backward compatibility: export default tools with line ranges enabled |
| 75 | export const nativeTools = getNativeTools() |
no test coverage detected