-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexec.js
More file actions
55 lines (52 loc) · 2.3 KB
/
exec.js
File metadata and controls
55 lines (52 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Barrel re-export 鈥?keeps backward-compatible imports while the real
// implementations live in focused sub-modules:
//
// src/tools/file-read.js 鈥?read_file, list_dir, grep_search, find_files
// src/tools/file-write.js 鈥?write_file, str_replace_in_file, apply_patch
// src/tools/shell.js 鈥?run_shell
// src/tools/web-search.js 鈥?web_search
// src/tools/utils.js 鈥?truncate, ensurePathAllowed (shared helpers)
//
// To add a new tool: create a new sub-module and re-export it here, then
// register it in ToolExecutor (src/chat/tool-executor.js).
'use strict';
const { toolReadFile, toolListDir, toolGrepSearch, toolFindFiles,
toolGetDiagnostics } = require('./file-read');
const { toolWriteFile, toolStrReplaceInFile, toolApplyPatch } = require('./file-write');
const { toolRunShell, isDangerous } = require('./shell');
const { toolRunShellBg } = require('./bg-shell');
const { toolReadTerminal } = require('./read-terminal');
const { toolWebSearch } = require('./web-search');
const { toolWebFetch } = require('./web-fetch');
const { toolSavePlan } = require('./save-plan');
const { truncate } = require('./utils');
const { toolGetEditorContext } = require('./editor-context');
const { toolGitStatus, toolGitDiff, toolGitLog } = require('./git');
const { toolFindReferences, toolGoToDefinition } = require('./lsp');
const { toolMemoryRead, toolMemoryWrite } = require('./memory');
module.exports = {
toolReadFile,
toolListDir,
toolGrepSearch,
toolFindFiles,
toolGetDiagnostics,
toolWriteFile,
toolStrReplaceInFile,
toolApplyPatch,
toolRunShell,
toolRunShellBg,
toolReadTerminal,
toolWebSearch,
toolWebFetch,
toolSavePlan,
truncate,
isDangerous,
toolGetEditorContext,
toolGitStatus,
toolGitDiff,
toolGitLog,
toolFindReferences,
toolGoToDefinition,
toolMemoryRead,
toolMemoryWrite,
};