dskcode 0.1.35 → 0.1.36
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 +18 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2101,7 +2101,7 @@ function TodoListPanel({ items }) {
|
|
|
2101
2101
|
// package.json
|
|
2102
2102
|
var package_default = {
|
|
2103
2103
|
name: "dskcode",
|
|
2104
|
-
version: "0.1.
|
|
2104
|
+
version: "0.1.36",
|
|
2105
2105
|
repository: {
|
|
2106
2106
|
type: "git",
|
|
2107
2107
|
url: "git+https://github.com/Awu12277/deepseek-agent-cli/tree/main"
|
|
@@ -6091,6 +6091,7 @@ function ChatSession({
|
|
|
6091
6091
|
const [todoSnapshot, setTodoSnapshot] = useState4([]);
|
|
6092
6092
|
const [todoPanelVisible, setTodoPanelVisible] = useState4(true);
|
|
6093
6093
|
const todoHideTimerRef = useRef3(null);
|
|
6094
|
+
const lastDoneBatchMaxIdRef = useRef3(-1);
|
|
6094
6095
|
const [sessionMode, setSessionMode] = useState4("code");
|
|
6095
6096
|
const [thinkingEnabled, setThinkingEnabled] = useState4(true);
|
|
6096
6097
|
const [thinkingEffort, setThinkingEffort] = useState4("high");
|
|
@@ -6163,6 +6164,7 @@ function ChatSession({
|
|
|
6163
6164
|
if (hasUnfinished) {
|
|
6164
6165
|
setTodoPanelVisible(true);
|
|
6165
6166
|
} else {
|
|
6167
|
+
lastDoneBatchMaxIdRef.current = Math.max(...todoSnapshot.map((it) => it.id));
|
|
6166
6168
|
todoHideTimerRef.current = setTimeout(() => {
|
|
6167
6169
|
setTodoPanelVisible(false);
|
|
6168
6170
|
todoHideTimerRef.current = null;
|
|
@@ -6753,6 +6755,7 @@ function ChatSession({
|
|
|
6753
6755
|
setStreamError(void 0);
|
|
6754
6756
|
process.stdout.write("\x1B[2J\x1B[H\x1B[3J");
|
|
6755
6757
|
sessionRef.current?.reset();
|
|
6758
|
+
lastDoneBatchMaxIdRef.current = -1;
|
|
6756
6759
|
return;
|
|
6757
6760
|
case "navigate":
|
|
6758
6761
|
setInput("");
|
|
@@ -6882,7 +6885,20 @@ function ChatSession({
|
|
|
6882
6885
|
currentToolCallsRef.current = [];
|
|
6883
6886
|
const r = event.result;
|
|
6884
6887
|
if (event.name.startsWith("todo_") && event.todoSnapshot) {
|
|
6885
|
-
|
|
6888
|
+
const snapshot = [...event.todoSnapshot];
|
|
6889
|
+
const allTerminated = snapshot.length > 0 && snapshot.every(
|
|
6890
|
+
(it) => it.status === "done" || it.status === "failed" || it.status === "skipped"
|
|
6891
|
+
);
|
|
6892
|
+
if (allTerminated) {
|
|
6893
|
+
lastDoneBatchMaxIdRef.current = Math.max(...snapshot.map((it) => it.id));
|
|
6894
|
+
setTodoSnapshot(snapshot);
|
|
6895
|
+
} else if (lastDoneBatchMaxIdRef.current >= 0) {
|
|
6896
|
+
setTodoSnapshot(
|
|
6897
|
+
snapshot.filter((it) => it.id > lastDoneBatchMaxIdRef.current)
|
|
6898
|
+
);
|
|
6899
|
+
} else {
|
|
6900
|
+
setTodoSnapshot(snapshot);
|
|
6901
|
+
}
|
|
6886
6902
|
} else {
|
|
6887
6903
|
const line = r.success ? r.summary ?? `\u2705 ${event.name}: ${r.data.slice(0, 500)}${r.data.length > 500 ? "..." : ""}` : `\u274C ${event.name}: ${r.error ?? "\u6267\u884C\u5931\u8D25"}`;
|
|
6888
6904
|
setDisplayMessages((prev) => [
|