zen-code 3.0.5 → 4.1.0
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/FileSystemConfigStore-ezrLDNGJ.mjs +91 -0
- package/dist/{use-input-1eSjZocJ.mjs → MultiLineTextInput-DjNvaZzA.mjs} +11966 -11473
- package/dist/{app-p0LqnAgS.mjs → app-C-NaCZSh.mjs} +3499 -3199
- package/dist/{checkpoint-1sAx_j1E-CQSUsimO.mjs → checkpoint-1sAx_j1E-22R2HLa7.mjs} +2 -2
- package/dist/{checkpoint-DxiUsHMy-noED47AT.mjs → checkpoint-DxiUsHMy-CaZzTHEH.mjs} +2 -2
- package/dist/get_allowed_models-DWso18Ri.mjs +253 -0
- package/dist/{graphBuilder-DGVR99NP.mjs → graphBuilder-BSX1uOgk.mjs} +10308 -11932
- package/dist/{id-Cu1daf1j.mjs → id-CW5jldpA.mjs} +10 -10
- package/dist/{index-TZW9juZS.mjs → index-C37SAWjK.mjs} +3 -3
- package/dist/index-DFARkGOA.mjs +442 -0
- package/dist/index-DHHejsBD.mjs +212 -0
- package/dist/load-Bh8eo6qE.mjs +119 -0
- package/dist/load-Cjl9cJ0o.mjs +105 -0
- package/dist/memories-FoRbTUbN.mjs +115 -0
- package/dist/nonInteractive.mjs +30 -25
- package/dist/{queue-D6tEGCGs-C_utZwzP.mjs → queue-D6tEGCGs-CGkpBFRj.mjs} +1 -1
- package/dist/{shallow-DBKZP8qx.mjs → shallow-CehIJgqa.mjs} +3 -3
- package/dist/subTasks-DRzFBQoV.mjs +210 -0
- package/dist/tasks-D5CMeC2P.mjs +237 -0
- package/dist/zen-code.mjs +2 -2
- package/dist/zen-init.mjs +198 -161
- package/dist/zen-keyboard.mjs +1 -1
- package/package.json +5 -3
- package/dist/FileSystemConfigStore-Bog5vylu.mjs +0 -47
- package/dist/client-D-FCM8pg.mjs +0 -3862
- package/dist/get_allowed_models-BIpXaphz.mjs +0 -774
- package/dist/tasks-DdsMQRlx.mjs +0 -113
package/dist/tasks-DdsMQRlx.mjs
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import "micromatch";
|
|
2
|
-
import "./client-D-FCM8pg.mjs";
|
|
3
|
-
import "lowdb";
|
|
4
|
-
import "lowdb/node";
|
|
5
|
-
import "yaml";
|
|
6
|
-
import { T as a } from "./graphBuilder-DGVR99NP.mjs";
|
|
7
|
-
class r {
|
|
8
|
-
store = null;
|
|
9
|
-
projectRoot;
|
|
10
|
-
constructor(t) {
|
|
11
|
-
this.projectRoot = t;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 初始化 Store
|
|
15
|
-
*/
|
|
16
|
-
async initialize() {
|
|
17
|
-
this.store || (this.store = new a(this.projectRoot), await this.store.initialize());
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* 确保 Store 已初始化
|
|
21
|
-
*/
|
|
22
|
-
ensureInitialized() {
|
|
23
|
-
if (!this.store)
|
|
24
|
-
throw new Error("TasksStore not initialized. Call initialize() first.");
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 获取所有任务
|
|
28
|
-
*/
|
|
29
|
-
async getAllTasks() {
|
|
30
|
-
return this.ensureInitialized(), await this.store.getAllTasks();
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 根据 status 获取任务
|
|
34
|
-
*/
|
|
35
|
-
async getTasksByStatus(t) {
|
|
36
|
-
return this.ensureInitialized(), await this.store.getTasksByStatus(t);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 获取单个任务
|
|
40
|
-
*/
|
|
41
|
-
async getTask(t) {
|
|
42
|
-
return this.ensureInitialized(), await this.store.getTask(t);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* 更新任务状态
|
|
46
|
-
*/
|
|
47
|
-
async updateTaskStatus(t, e) {
|
|
48
|
-
return this.ensureInitialized(), await this.store.updateTask(t, { status: e });
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* 删除任务
|
|
52
|
-
*/
|
|
53
|
-
async deleteTask(t) {
|
|
54
|
-
return this.ensureInitialized(), await this.store.deleteTask(t);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 批量添加任务
|
|
58
|
-
*/
|
|
59
|
-
async addTasks(t) {
|
|
60
|
-
this.ensureInitialized(), await this.store.addTasks(t);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* 获取活跃 Plan ID
|
|
64
|
-
*/
|
|
65
|
-
async getActivePlan() {
|
|
66
|
-
return this.ensureInitialized(), await this.store.getActivePlan();
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* 设置活跃 Plan ID
|
|
70
|
-
*/
|
|
71
|
-
async setActivePlan(t) {
|
|
72
|
-
this.ensureInitialized(), await this.store.setActivePlan(t);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* 获取任务统计
|
|
76
|
-
*/
|
|
77
|
-
async getTaskStats() {
|
|
78
|
-
const t = await this.getAllTasks();
|
|
79
|
-
return {
|
|
80
|
-
total: t.length,
|
|
81
|
-
pickup: t.filter((e) => e.status === "pickup").length,
|
|
82
|
-
running: t.filter((e) => e.status === "running").length,
|
|
83
|
-
complete: t.filter((e) => e.status === "complete").length,
|
|
84
|
-
error: t.filter((e) => e.status === "error").length,
|
|
85
|
-
review: t.filter((e) => e.status === "review").length,
|
|
86
|
-
feedback: t.filter((e) => e.status === "feedback").length
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 获取执行历史
|
|
91
|
-
*/
|
|
92
|
-
async getHistory(t) {
|
|
93
|
-
return this.ensureInitialized(), await this.store.getHistory(t);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* 清空所有任务(慎用)
|
|
97
|
-
*/
|
|
98
|
-
async clearAllTasks() {
|
|
99
|
-
this.ensureInitialized(), await this.store.clearAllTasks();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
let i = null;
|
|
103
|
-
function k(s) {
|
|
104
|
-
if (!i) {
|
|
105
|
-
if (!s)
|
|
106
|
-
throw new Error("projectRoot is required for first initialization");
|
|
107
|
-
i = new r(s);
|
|
108
|
-
}
|
|
109
|
-
return i;
|
|
110
|
-
}
|
|
111
|
-
export {
|
|
112
|
-
k as getTasksStore
|
|
113
|
-
};
|