dsh-archify-projects 0.2.0 → 0.2.2
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/README.md +2 -1
- package/dist/client.js +46 -11
- package/dist/client.js.map +1 -1
- package/docs/HANDOVER.md +117 -2
- package/lib/host/context.js.map +1 -1
- package/lib/host/index.js +1 -1
- package/lib/host/runner.js +85 -15
- package/lib/host/runner.js.map +1 -1
- package/lib/shared/types.js +25 -0
- package/lib/shared/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -134,7 +134,8 @@ pnpm add link:/absolute/path/to/dsh-archify-projects # 或在 package.json 里
|
|
|
134
134
|
`agentPresets.mount`),所以:
|
|
135
135
|
|
|
136
136
|
- DSH 左侧会话列表按 origin 过滤子代理会话 —— 分析不会往你的对话列表里塞新条目;
|
|
137
|
-
- 会话的模型走 `agentOptions
|
|
137
|
+
- 会话的模型走 `agentOptions`:设置里没选就用 **DSH 里配的默认模型**
|
|
138
|
+
(`agentDefaultModel`),**只影响这一次运行**,不会改掉 DSH 里你的默认模型;
|
|
138
139
|
- 宿主版本没有这条路(缺 `agents.create` / `agentPresets`)时安静退回普通会话,
|
|
139
140
|
工具白名单、preset、产物回收都不变。
|
|
140
141
|
|
package/dist/client.js
CHANGED
|
@@ -87,6 +87,32 @@ function isRunAlive(run, now = Date.now()) {
|
|
|
87
87
|
function isRunning(project, now = Date.now()) {
|
|
88
88
|
return project.runs.some((run) => isRunAlive(run, now)) || allDiagrams(project).some((d) => d.status === "queued" || d.status === "running");
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* 把 todo 收敛到「已经没人在跑」的状态。
|
|
92
|
+
*
|
|
93
|
+
* agent 经常在最后一步(回报产物标记)没来得及再写一次 `todo_write` 就被判 idle,
|
|
94
|
+
* 台账里于是留下一条永远 `in_progress` 的记录:页面会一直转圈、卡片一直显示
|
|
95
|
+
* 「正在:回报产物标记与统计」,用户以为跑了几天还没结束。
|
|
96
|
+
*
|
|
97
|
+
* 规则:运行结束就不再有任何「正在进行」。
|
|
98
|
+
* - `succeeded` → 剩下的 in_progress 记成 completed(整轮跑完了,最后一步确实发生);
|
|
99
|
+
* - `failed` → 退回 pending(做到哪一步不知道,别假装完成);
|
|
100
|
+
* - `running` → 原样返回(还在跑,本来就有当前步骤)。
|
|
101
|
+
*/
|
|
102
|
+
function settleTodos(todos, status) {
|
|
103
|
+
if (status === "running") return todos;
|
|
104
|
+
const next = status === "succeeded" ? "completed" : "pending";
|
|
105
|
+
let changed = false;
|
|
106
|
+
const settled = todos.map((todo) => {
|
|
107
|
+
if (todo.status !== "in_progress") return todo;
|
|
108
|
+
changed = true;
|
|
109
|
+
return {
|
|
110
|
+
...todo,
|
|
111
|
+
status: next
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
return changed ? settled : todos;
|
|
115
|
+
}
|
|
90
116
|
|
|
91
117
|
// src/shared/format.ts
|
|
92
118
|
/**
|
|
@@ -1205,7 +1231,7 @@ function AtlasCard({ t, project, busy, ago, onOpen, onUpdate }) {
|
|
|
1205
1231
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1206
1232
|
className: "dap-thumbs",
|
|
1207
1233
|
children: diagrams.slice(0, 3).map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1208
|
-
className:
|
|
1234
|
+
className: "dap-thumb",
|
|
1209
1235
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1210
1236
|
className: "dap-thumb__title",
|
|
1211
1237
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: item.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1462,7 +1488,8 @@ function Workbench({ t, project, diagram, tab, busy, question, pricing, ago, onT
|
|
|
1462
1488
|
children: t("progress.title")
|
|
1463
1489
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TodoList, {
|
|
1464
1490
|
t,
|
|
1465
|
-
todos: project.lastRun?.todos ?? []
|
|
1491
|
+
todos: project.lastRun?.todos ?? [],
|
|
1492
|
+
status: project.lastRun?.status ?? null
|
|
1466
1493
|
})]
|
|
1467
1494
|
}),
|
|
1468
1495
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1706,14 +1733,15 @@ function RunBar({ t, project }) {
|
|
|
1706
1733
|
});
|
|
1707
1734
|
}
|
|
1708
1735
|
/** todo 列表:✓ / spinner / ○。 */
|
|
1709
|
-
function TodoList({ t, todos }) {
|
|
1736
|
+
function TodoList({ t, todos, status = null }) {
|
|
1710
1737
|
if (todos.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1711
1738
|
className: "dap-hint",
|
|
1712
1739
|
children: t("progress.none")
|
|
1713
1740
|
});
|
|
1741
|
+
const shown = status === null ? todos : settleTodos(todos, status);
|
|
1714
1742
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1715
1743
|
className: "dap-todos",
|
|
1716
|
-
children:
|
|
1744
|
+
children: shown.map((todo) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1717
1745
|
className: todo.status === "completed" ? "dap-todo dap-todo--done" : todo.status === "in_progress" ? "dap-todo dap-todo--now" : "dap-todo",
|
|
1718
1746
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1719
1747
|
className: "dap-todo__mark",
|
|
@@ -2244,7 +2272,9 @@ const PAGE_CSS = `
|
|
|
2244
2272
|
.dap-card {
|
|
2245
2273
|
border: 1px solid var(--dsw-alias-border-l1); border-radius: var(--dsw-radius-lg);
|
|
2246
2274
|
background: var(--dsw-alias-bg-layer-1); padding: 14px; display: flex; flex-direction: column; gap: 10px;
|
|
2247
|
-
cursor: pointer; text-align: left; width: 100%; transition: border-color .15s, box-shadow .15s;
|
|
2275
|
+
cursor: pointer; text-align: left; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s;
|
|
2276
|
+
/* 宿主没有全局 border-box:不写死就会让 100% 宽 + 14px padding 溢出栅格列。 */
|
|
2277
|
+
box-sizing: border-box;
|
|
2248
2278
|
}
|
|
2249
2279
|
.dap-card:hover { border-color: var(--dsw-alias-border-l3); box-shadow: var(--dsw-shadow-lv2); }
|
|
2250
2280
|
.dap-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
|
|
@@ -2252,16 +2282,21 @@ const PAGE_CSS = `
|
|
|
2252
2282
|
.dap-repo__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2253
2283
|
.dap-repo__path { font-size: 11px; color: var(--dsw-alias-label-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, monospace; }
|
|
2254
2284
|
.dap-chips { display: flex; flex-wrap: wrap; gap: 5px; }
|
|
2255
|
-
|
|
2285
|
+
/* 图条:等宽分栏,行宽永远等于卡片内容宽。
|
|
2286
|
+
旧的 1fr 1fr 会被子项的 min-content 撑宽(撑出卡片边框外),必须 minmax(0, 1fr);
|
|
2287
|
+
auto-fit 让「只有一张图」时自然占满整行,不再靠 grid-column: 1 / -1 单独拉长。 */
|
|
2288
|
+
.dap-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 6px; }
|
|
2256
2289
|
.dap-thumb {
|
|
2257
2290
|
border: 1px solid var(--dsw-alias-border-l1); border-radius: var(--dsw-radius-md);
|
|
2258
|
-
background: var(--dsw-alias-bg-layer-2); padding: 6px 8px;
|
|
2291
|
+
background: var(--dsw-alias-bg-layer-2); padding: 6px 8px;
|
|
2292
|
+
min-width: 0; box-sizing: border-box;
|
|
2259
2293
|
}
|
|
2260
|
-
.dap-
|
|
2261
|
-
.dap-thumb__title {
|
|
2262
|
-
.dap-thumb__title
|
|
2294
|
+
.dap-thumb__title { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--dsw-alias-label-secondary); min-width: 0; }
|
|
2295
|
+
.dap-thumb__title b { flex: 1 1 auto; min-width: 0; font-weight: 550; color: var(--dsw-alias-label-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2296
|
+
.dap-thumb__title .dap-thumb__count { flex: none; }
|
|
2263
2297
|
.dap-thumb__count { font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
|
|
2264
|
-
.dap-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--dsw-alias-label-tertiary); }
|
|
2298
|
+
.dap-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--dsw-alias-label-tertiary); min-width: 0; }
|
|
2299
|
+
.dap-card__foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2265
2300
|
|
|
2266
2301
|
/* ---------------------------------------------------------------- 工作台 */
|
|
2267
2302
|
.dap-wb { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: stretch; flex: 1; min-height: 0; }
|