codebolt 1.10.1 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codebolt +2 -0
- package/dist/assets/agents.json +5 -5
- package/dist/assets/worker/childSearch.js +150 -0
- package/dist/bin/gotui +0 -0
- package/dist/index.js +3068 -1558
- package/package.json +3 -5
package/bin/codebolt
ADDED
package/dist/assets/agents.json
CHANGED
|
@@ -1337,7 +1337,7 @@
|
|
|
1337
1337
|
"code-generation"
|
|
1338
1338
|
],
|
|
1339
1339
|
"title": "Act",
|
|
1340
|
-
"zipFilePath": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agent/
|
|
1340
|
+
"zipFilePath": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agent/6f54b0a3-abaf-4ebf-b997-445ff4bfd1b8.zip",
|
|
1341
1341
|
"unique_id": "act",
|
|
1342
1342
|
"metadata": {
|
|
1343
1343
|
"agent_routing": {
|
|
@@ -1420,11 +1420,11 @@
|
|
|
1420
1420
|
}
|
|
1421
1421
|
],
|
|
1422
1422
|
"slug": "c4d3fdb9cf9e4f828a1d0160bbfc9ae9",
|
|
1423
|
-
"version": "1.1.
|
|
1423
|
+
"version": "1.1.52",
|
|
1424
1424
|
"author": "ravi",
|
|
1425
1425
|
"status": 1,
|
|
1426
|
-
"updatedAt": "2026-
|
|
1427
|
-
"sourceCodeUrl": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agentsource/
|
|
1426
|
+
"updatedAt": "2026-03-03T03:41:02.339Z",
|
|
1427
|
+
"sourceCodeUrl": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agentsource/5ed06b01-d76e-4ac7-9ba5-6d505db7a383.zip",
|
|
1428
1428
|
"lastUpdatedUI": 0,
|
|
1429
1429
|
"githubUrl": null,
|
|
1430
1430
|
"isInvalid": 0,
|
|
@@ -1882,4 +1882,4 @@
|
|
|
1882
1882
|
"isDisabled": 0,
|
|
1883
1883
|
"isPrivate": 0
|
|
1884
1884
|
}
|
|
1885
|
-
]
|
|
1885
|
+
]
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// List of files and directories to ignore
|
|
5
|
+
const ignoredPatterns = [
|
|
6
|
+
'node_modules',
|
|
7
|
+
'dist',
|
|
8
|
+
'build',
|
|
9
|
+
'coverage',
|
|
10
|
+
'.git',
|
|
11
|
+
'.next',
|
|
12
|
+
'.nuxt',
|
|
13
|
+
'.vscode',
|
|
14
|
+
'.idea',
|
|
15
|
+
'logs',
|
|
16
|
+
'*.log',
|
|
17
|
+
'.DS_Store',
|
|
18
|
+
'Thumbs.db',
|
|
19
|
+
'*.tmp',
|
|
20
|
+
'*.temp',
|
|
21
|
+
'.env',
|
|
22
|
+
'.env.local',
|
|
23
|
+
'.env.development.local',
|
|
24
|
+
'.env.test.local',
|
|
25
|
+
'.env.production.local'
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
// Function to check if a file/directory should be ignored
|
|
29
|
+
const shouldIgnore = (fileName) => {
|
|
30
|
+
// Check for exact matches
|
|
31
|
+
if (ignoredPatterns.includes(fileName)) return true;
|
|
32
|
+
|
|
33
|
+
// Check for files starting with dot (hidden files/folders)
|
|
34
|
+
if (fileName.startsWith('.')) return true;
|
|
35
|
+
|
|
36
|
+
// Check for pattern matches (like *.log, *.tmp)
|
|
37
|
+
for (const pattern of ignoredPatterns) {
|
|
38
|
+
if (pattern.includes('*')) {
|
|
39
|
+
const regex = new RegExp(pattern.replace(/\*/g, '.*'));
|
|
40
|
+
if (regex.test(fileName)) return true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return false;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Recursive search function for folders
|
|
48
|
+
const searchFolder = (dir, query, results = [], activeFile = null) => {
|
|
49
|
+
const files = fs.readdirSync(dir);
|
|
50
|
+
for (const file of files) {
|
|
51
|
+
// Skip ignored files and directories
|
|
52
|
+
if (shouldIgnore(file)) continue;
|
|
53
|
+
|
|
54
|
+
const filePath = path.join(dir, file);
|
|
55
|
+
const stat = fs.statSync(filePath);
|
|
56
|
+
if (stat.isDirectory()) {
|
|
57
|
+
searchFolder(filePath, query, results, activeFile);
|
|
58
|
+
} else if (file.toLowerCase().includes(query.toLowerCase())) {
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
results.push(filePath);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Prioritize active file if it's in the results
|
|
65
|
+
if (activeFile && results.includes(activeFile)) {
|
|
66
|
+
results = results.filter(file => file !== activeFile);
|
|
67
|
+
results.unshift(activeFile);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return results;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Search function for a specific file
|
|
74
|
+
function searchInFile(filePath, searchTerm) {
|
|
75
|
+
try {
|
|
76
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
77
|
+
const lines = content.split('\n');
|
|
78
|
+
return lines
|
|
79
|
+
.map((line, index) => ({ line, index }))
|
|
80
|
+
.filter(({ line }) => line.toLowerCase().includes(searchTerm.toLowerCase()))
|
|
81
|
+
.map(({ line, index }) => ({
|
|
82
|
+
filePath,
|
|
83
|
+
line: index + 1,
|
|
84
|
+
content: line.trim(),
|
|
85
|
+
}));
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(`Error reading file ${filePath}: ${error.message}`);
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Global search function for the entire directory
|
|
93
|
+
function globalSearch(directory, searchTerm) {
|
|
94
|
+
try {
|
|
95
|
+
const results = [];
|
|
96
|
+
const files = fs.readdirSync(directory);
|
|
97
|
+
|
|
98
|
+
for (const file of files) {
|
|
99
|
+
if (shouldIgnore(file)) continue;
|
|
100
|
+
|
|
101
|
+
const filePath = path.join(directory, file);
|
|
102
|
+
const stat = fs.statSync(filePath);
|
|
103
|
+
|
|
104
|
+
if (stat.isDirectory()) {
|
|
105
|
+
results.push(...globalSearch(filePath, searchTerm));
|
|
106
|
+
} else {
|
|
107
|
+
// @ts-ignore
|
|
108
|
+
results.push(...searchInFile(filePath, searchTerm));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return results;
|
|
113
|
+
} catch (error) {
|
|
114
|
+
console.error(`Error processing directory ${directory}: ${error.message}`);
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Task execution logic
|
|
120
|
+
process.on('message', (workerData) => {
|
|
121
|
+
try {
|
|
122
|
+
let result;
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
if (workerData.task === 'search') {
|
|
125
|
+
// @ts-ignore
|
|
126
|
+
result = searchInFile(workerData.filePath, workerData.searchTerm);
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
} else if (workerData.task === 'globalSearch') {
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
result = globalSearch(workerData.directory, workerData.searchTerm);
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
} else if (workerData.task === 'folderSearch') {
|
|
133
|
+
// @ts-ignore
|
|
134
|
+
result = searchFolder(workerData.directory, workerData.searchTerm, [], workerData.activeFile);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Send result back to the main process
|
|
138
|
+
// @ts-ignore
|
|
139
|
+
process.send(result);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
console.error(`Error executing worker task: ${error.message}`);
|
|
142
|
+
// @ts-ignore
|
|
143
|
+
process.send({ error: error.message });
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// Handle process termination
|
|
148
|
+
process.on('SIGTERM', () => {
|
|
149
|
+
process.exit(0);
|
|
150
|
+
});
|
package/dist/bin/gotui
CHANGED
|
Binary file
|