deepcode-ai 1.2.4 → 1.2.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 +33 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3242,17 +3242,17 @@ function parseUtilityRequest(input) {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
if (PROJECT_DISCOVERY_NOUN_PATTERN.test(normalizedInput) && (PROJECT_DISCOVERY_VERB_PATTERN.test(normalizedInput) || /\bgit\b/i.test(normalizedInput))) {
|
|
3244
3244
|
const explicitPathMatch = trimmed.match(/((?:~\/|\.{1,2}\/|\/)[^\s]+)/);
|
|
3245
|
-
const rawPath = explicitPathMatch?.[1]?.trim() || ".";
|
|
3245
|
+
const rawPath = explicitPathMatch?.[1]?.trim().replace(/[.,;:!?]+$/, "") || ".";
|
|
3246
3246
|
return { kind: "list_projects", path: rawPath, rawPath };
|
|
3247
3247
|
}
|
|
3248
3248
|
const shellListMatch = trimmed.match(/^(?:ls|dir)\s*(.+)?$/i);
|
|
3249
3249
|
if (shellListMatch) {
|
|
3250
|
-
const rawPath = shellListMatch[1]?.trim() || ".";
|
|
3250
|
+
const rawPath = (shellListMatch[1]?.trim() || ".").replace(/[.,;:!?]+$/, "");
|
|
3251
3251
|
return { kind: "list_dir", path: rawPath, rawPath };
|
|
3252
3252
|
}
|
|
3253
3253
|
if (DIRECT_UTILITY_VERB_PATTERN.test(normalizedInput)) {
|
|
3254
3254
|
const explicitPathMatch = trimmed.match(/((?:~\/|\.{1,2}\/|\/)[^\s]+)/);
|
|
3255
|
-
const rawPath = explicitPathMatch?.[1]?.trim() || ".";
|
|
3255
|
+
const rawPath = explicitPathMatch?.[1]?.trim().replace(/[.,;:!?]+$/, "") || ".";
|
|
3256
3256
|
return { kind: "list_dir", path: rawPath, rawPath };
|
|
3257
3257
|
}
|
|
3258
3258
|
return void 0;
|
|
@@ -3368,6 +3368,7 @@ function looksLikeWorkspaceRequest(input, policy) {
|
|
|
3368
3368
|
function isDirectUtilityRequest(input, policy) {
|
|
3369
3369
|
const normalizedInput = normalizeTurnInput(input);
|
|
3370
3370
|
if (!normalizedInput) return false;
|
|
3371
|
+
if (input.includes("\n") || normalizedInput.split(/\s+/).length > 25) return false;
|
|
3371
3372
|
if (normalizedInput === "pwd" || normalizedInput === "date") {
|
|
3372
3373
|
return true;
|
|
3373
3374
|
}
|
|
@@ -28588,7 +28589,7 @@ function parseVersion2(version) {
|
|
|
28588
28589
|
if (!match) return null;
|
|
28589
28590
|
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
28590
28591
|
}
|
|
28591
|
-
var VERSION = "1.2.
|
|
28592
|
+
var VERSION = "1.2.5".length > 0 ? "1.2.5" : "0.0.0-dev";
|
|
28592
28593
|
var updateCommand = {
|
|
28593
28594
|
name: "update",
|
|
28594
28595
|
description: "Check published DeepCode versions",
|
|
@@ -30236,6 +30237,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30236
30237
|
const streamingResponseLengthRef = useRef17(0);
|
|
30237
30238
|
const pendingTextBufferRef = useRef17("");
|
|
30238
30239
|
const taskStreamsBufferRef = useRef17({});
|
|
30240
|
+
const liveToolCallsBufferRef = useRef17([]);
|
|
30241
|
+
const subagentChunkBufferRef = useRef17(/* @__PURE__ */ new Map());
|
|
30239
30242
|
const drainingQueueRef = useRef17(false);
|
|
30240
30243
|
const messageQueueRef = useRef17([]);
|
|
30241
30244
|
const sessionShellAllowlistRef = useRef17(/* @__PURE__ */ new Set());
|
|
@@ -30535,6 +30538,23 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30535
30538
|
return next;
|
|
30536
30539
|
});
|
|
30537
30540
|
}
|
|
30541
|
+
const activities = liveToolCallsBufferRef.current;
|
|
30542
|
+
if (activities.length > 0) {
|
|
30543
|
+
liveToolCallsBufferRef.current = [];
|
|
30544
|
+
setLiveToolCalls((prev) => activities.reduce(reduceToolActivity, prev));
|
|
30545
|
+
}
|
|
30546
|
+
const subagentChunks = subagentChunkBufferRef.current;
|
|
30547
|
+
if (subagentChunks.size > 0) {
|
|
30548
|
+
subagentChunkBufferRef.current = /* @__PURE__ */ new Map();
|
|
30549
|
+
setSubagentMap((prev) => {
|
|
30550
|
+
const next = new Map(prev);
|
|
30551
|
+
for (const [taskId, output] of subagentChunks) {
|
|
30552
|
+
const entry = next.get(taskId);
|
|
30553
|
+
if (entry) next.set(taskId, { ...entry, currentOutput: output });
|
|
30554
|
+
}
|
|
30555
|
+
return next;
|
|
30556
|
+
});
|
|
30557
|
+
}
|
|
30538
30558
|
}, 50);
|
|
30539
30559
|
return () => clearInterval(id);
|
|
30540
30560
|
}, []);
|
|
@@ -30655,7 +30675,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30655
30675
|
);
|
|
30656
30676
|
unsubscribers.push(
|
|
30657
30677
|
runtime.events.on("activity", (activity) => {
|
|
30658
|
-
|
|
30678
|
+
liveToolCallsBufferRef.current.push(activity);
|
|
30659
30679
|
})
|
|
30660
30680
|
);
|
|
30661
30681
|
unsubscribers.push(
|
|
@@ -30674,14 +30694,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30674
30694
|
);
|
|
30675
30695
|
unsubscribers.push(
|
|
30676
30696
|
runtime.events.on("subagent:chunk", ({ taskId, text }) => {
|
|
30677
|
-
|
|
30678
|
-
|
|
30679
|
-
if (!entry) return prev;
|
|
30680
|
-
const next = new Map(prev);
|
|
30681
|
-
const combined = ((entry.currentOutput ?? "") + text).slice(-80);
|
|
30682
|
-
next.set(taskId, { ...entry, currentOutput: combined });
|
|
30683
|
-
return next;
|
|
30684
|
-
});
|
|
30697
|
+
const prev = subagentChunkBufferRef.current.get(taskId) ?? "";
|
|
30698
|
+
subagentChunkBufferRef.current.set(taskId, (prev + text).slice(-80));
|
|
30685
30699
|
})
|
|
30686
30700
|
);
|
|
30687
30701
|
unsubscribers.push(
|
|
@@ -30804,6 +30818,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30804
30818
|
setPromptSuggestion(null);
|
|
30805
30819
|
pendingTextBufferRef.current = "";
|
|
30806
30820
|
taskStreamsBufferRef.current = {};
|
|
30821
|
+
liveToolCallsBufferRef.current = [];
|
|
30822
|
+
subagentChunkBufferRef.current = /* @__PURE__ */ new Map();
|
|
30807
30823
|
setPendingAssistantText("");
|
|
30808
30824
|
setIsRunning(true);
|
|
30809
30825
|
setIsReceivingContent(false);
|
|
@@ -30838,6 +30854,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30838
30854
|
},
|
|
30839
30855
|
onIteration: (round, max) => {
|
|
30840
30856
|
setIterationInfo({ round, max });
|
|
30857
|
+
liveToolCallsBufferRef.current = [];
|
|
30858
|
+
setLiveToolCalls([]);
|
|
30841
30859
|
},
|
|
30842
30860
|
onTaskUpdate: (_task, plan) => {
|
|
30843
30861
|
setTaskPlan({
|
|
@@ -30887,6 +30905,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId }) => {
|
|
|
30887
30905
|
abortRef.current = null;
|
|
30888
30906
|
pendingTextBufferRef.current = "";
|
|
30889
30907
|
taskStreamsBufferRef.current = {};
|
|
30908
|
+
liveToolCallsBufferRef.current = [];
|
|
30909
|
+
subagentChunkBufferRef.current = /* @__PURE__ */ new Map();
|
|
30890
30910
|
setPendingAssistantText("");
|
|
30891
30911
|
setIsRunning(false);
|
|
30892
30912
|
setLiveToolCalls([]);
|