@papercraneai/sandbox-agent 0.1.4 → 0.1.5
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/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -403,18 +403,26 @@ async function buildFileTree(dirPath) {
|
|
|
403
403
|
if (entry.name === "node_modules" || entry.name.startsWith(".")) {
|
|
404
404
|
continue;
|
|
405
405
|
}
|
|
406
|
+
const entryPath = join(dirPath, entry.name);
|
|
407
|
+
const entryStat = await stat(entryPath);
|
|
408
|
+
const mtime = entryStat.mtimeMs;
|
|
406
409
|
if (entry.isDirectory()) {
|
|
407
|
-
const children = await buildFileTree(
|
|
410
|
+
const children = await buildFileTree(entryPath);
|
|
411
|
+
// For folders, use the most recent mtime of any child (or folder's own mtime)
|
|
412
|
+
const childMtimes = children.map(c => c.mtime || 0);
|
|
413
|
+
const maxChildMtime = childMtimes.length > 0 ? Math.max(...childMtimes) : 0;
|
|
408
414
|
nodes.push({
|
|
409
415
|
name: entry.name,
|
|
410
416
|
type: "folder",
|
|
417
|
+
mtime: Math.max(mtime, maxChildMtime),
|
|
411
418
|
children
|
|
412
419
|
});
|
|
413
420
|
}
|
|
414
421
|
else {
|
|
415
422
|
nodes.push({
|
|
416
423
|
name: entry.name,
|
|
417
|
-
type: "file"
|
|
424
|
+
type: "file",
|
|
425
|
+
mtime
|
|
418
426
|
});
|
|
419
427
|
}
|
|
420
428
|
}
|
|
@@ -1164,6 +1172,7 @@ app.post("/chat", async (req, res) => {
|
|
|
1164
1172
|
"client-tools": clientToolsServer
|
|
1165
1173
|
},
|
|
1166
1174
|
allowedTools: allowedTools || defaultTools,
|
|
1175
|
+
settingSources: ["project"],
|
|
1167
1176
|
hooks,
|
|
1168
1177
|
abortController,
|
|
1169
1178
|
includePartialMessages: true
|
|
@@ -1190,7 +1199,7 @@ app.post("/chat", async (req, res) => {
|
|
|
1190
1199
|
let gotResult = false;
|
|
1191
1200
|
log.debug({ ...ctx, elapsed: Date.now() - requestStartTime }, "Starting Claude SDK query");
|
|
1192
1201
|
// Determine which model is being used (either provided or SDK default)
|
|
1193
|
-
const usedModel = model || options.model || "claude-sonnet-4-
|
|
1202
|
+
const usedModel = model || options.model || "claude-sonnet-4-6";
|
|
1194
1203
|
for await (const msg of query({
|
|
1195
1204
|
prompt: createPrompt(),
|
|
1196
1205
|
options
|