agent-loft 0.2.79 → 0.2.80
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/package.json +1 -1
- package/src/agents/claude/driver.ts +1 -1
- package/web/css/sidebar.css +18 -26
- package/web/views/messages.js +15 -3
- package/web/views/sidebar.js +1 -1
- package/web/views/todos.js +1 -1
package/package.json
CHANGED
|
@@ -193,7 +193,7 @@ export class ClaudeDriver implements AgentDriver {
|
|
|
193
193
|
};
|
|
194
194
|
/** 问了、还没对上回答的:tool_use id → 那条 question */
|
|
195
195
|
const asked = new Map<string, HistoryMessage>();
|
|
196
|
-
/**
|
|
196
|
+
/** 任务清单:哪条回复里改过,就在那条上挂一份改完的(页面只恢复最后一轮的进度) */
|
|
197
197
|
const todos = new TodoTracker();
|
|
198
198
|
for (const msg of raw) {
|
|
199
199
|
if (msg.parent_tool_use_id) continue;
|
package/web/css/sidebar.css
CHANGED
|
@@ -256,7 +256,7 @@ button.conv-group:hover {
|
|
|
256
256
|
display: grid;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
/*
|
|
259
|
+
/* IM 分组常驻渠道图标,桌面悬停或键盘聚焦时显示新建加号。 */
|
|
260
260
|
.bot-row .conv-item.proj {
|
|
261
261
|
padding-right: 36px;
|
|
262
262
|
}
|
|
@@ -280,14 +280,16 @@ button.conv-group:hover {
|
|
|
280
280
|
visibility: hidden;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
|
|
284
|
-
.bot-row:
|
|
285
|
-
|
|
286
|
-
|
|
283
|
+
@media (hover: hover) and (pointer: fine) {
|
|
284
|
+
.bot-row:hover .bot-new .feishu-mark,
|
|
285
|
+
.bot-row:focus-within .bot-new .feishu-mark {
|
|
286
|
+
visibility: hidden;
|
|
287
|
+
}
|
|
287
288
|
|
|
288
|
-
.bot-row:hover .bot-new .bot-plus,
|
|
289
|
-
.bot-row:focus-within .bot-new .bot-plus {
|
|
290
|
-
|
|
289
|
+
.bot-row:hover .bot-new .bot-plus,
|
|
290
|
+
.bot-row:focus-within .bot-new .bot-plus {
|
|
291
|
+
visibility: visible;
|
|
292
|
+
}
|
|
291
293
|
}
|
|
292
294
|
|
|
293
295
|
/* 鼠标挪到右边的加号上时,整行的 hover 底色还留着 */
|
|
@@ -301,14 +303,6 @@ button.conv-group:hover {
|
|
|
301
303
|
.proj-new {
|
|
302
304
|
display: grid;
|
|
303
305
|
}
|
|
304
|
-
|
|
305
|
-
.bot-new .bot-plus {
|
|
306
|
-
visibility: visible;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.bot-new .feishu-mark {
|
|
310
|
-
visibility: hidden;
|
|
311
|
-
}
|
|
312
306
|
}
|
|
313
307
|
|
|
314
308
|
.conv-item {
|
|
@@ -411,12 +405,6 @@ button.conv-group:hover {
|
|
|
411
405
|
color: var(--fg-soft);
|
|
412
406
|
}
|
|
413
407
|
|
|
414
|
-
/* 有状态点时由状态点推到右侧,专家图标紧随其后 */
|
|
415
|
-
.conv-item > .dot + .expert-mark,
|
|
416
|
-
.conv-item > .conv-spin + .expert-mark {
|
|
417
|
-
margin-left: 0;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
408
|
.conv-item .task-mark,
|
|
421
409
|
.conv-item .feishu-mark {
|
|
422
410
|
flex-shrink: 0;
|
|
@@ -432,10 +420,9 @@ button.conv-group:hover {
|
|
|
432
420
|
height: 14px;
|
|
433
421
|
}
|
|
434
422
|
|
|
435
|
-
|
|
436
|
-
.conv-item > .
|
|
437
|
-
.conv-item > .
|
|
438
|
-
.conv-item > .conv-spin ~ .feishu-mark {
|
|
423
|
+
/* 尾部图标共用右侧空间,状态始终排在最后。 */
|
|
424
|
+
.conv-item > .task-mark ~ .dot,
|
|
425
|
+
.conv-item > .task-mark ~ .conv-spin {
|
|
439
426
|
margin-left: 0;
|
|
440
427
|
}
|
|
441
428
|
|
|
@@ -457,6 +444,11 @@ button.conv-group:hover {
|
|
|
457
444
|
display: inline-grid;
|
|
458
445
|
}
|
|
459
446
|
|
|
447
|
+
.conv-item:hover > .expert-mark ~ .dot,
|
|
448
|
+
.conv-item:hover > .expert-mark ~ .conv-spin {
|
|
449
|
+
margin-left: 0;
|
|
450
|
+
}
|
|
451
|
+
|
|
460
452
|
.conv-item:hover .task-mark,
|
|
461
453
|
.conv-item:hover .expert-mark ~ .feishu-mark {
|
|
462
454
|
display: none;
|
package/web/views/messages.js
CHANGED
|
@@ -214,13 +214,17 @@ export async function openConversation(key) {
|
|
|
214
214
|
// 历史一次性加进来,最后再统一排版,免得每加一条就强制排版一次
|
|
215
215
|
bulk = true;
|
|
216
216
|
try {
|
|
217
|
+
let todos = null;
|
|
217
218
|
for (const m of data.messages) {
|
|
219
|
+
// 面板只属于最后一轮;提问卡切开的多段回复仍算同一轮。
|
|
220
|
+
if (m.role === "user") todos = null;
|
|
221
|
+
else if (m.todos) todos = m.todos;
|
|
218
222
|
if (m.role === "user") addItem({ type: "user", text: m.text, files: m.attachments ?? [], origin: null, anchor: m.anchor });
|
|
219
223
|
else if (m.role === "question") addItem({ type: "ix", id: m.question.id, ix: historyQuestion(key, m) });
|
|
220
224
|
else addItem({ type: "ai", steps: m.steps ?? [], committed: m.text, partial: "", done: true, footer: m.footer, at: m.ts, anchor: m.anchor, segment: m.segment });
|
|
221
225
|
}
|
|
222
|
-
//
|
|
223
|
-
setTodos(
|
|
226
|
+
// 进行中这一轮的清单由下面重放 todos 事件恢复。
|
|
227
|
+
setTodos(todos);
|
|
224
228
|
S.seq.set(key, 0);
|
|
225
229
|
// 进行中这一轮弹过的卡(含已处理的):重放到 ix 事件时放回原位
|
|
226
230
|
replayCards = new Map((data.interactions ?? []).map((ix) => [ix.id, ix]));
|
|
@@ -799,7 +803,10 @@ export function applyEvent(env) {
|
|
|
799
803
|
S.items = S.items.filter((i) => i !== S.turnAi);
|
|
800
804
|
S.turnAi = null;
|
|
801
805
|
}
|
|
802
|
-
if (!queued && (!S.turnAi || S.turnAi.done))
|
|
806
|
+
if (!queued && (!S.turnAi || S.turnAi.done)) {
|
|
807
|
+
setTodos(null);
|
|
808
|
+
turnStartAt = env.ts;
|
|
809
|
+
}
|
|
803
810
|
const it = addItem({ type: "user", text: ev.text, files: ev.files ?? ev.attachments, origin: ev.origin, id: ev.id, queued });
|
|
804
811
|
// 这个页面刚发的:普通消息顶到最上面,排队消息等轮到它时再定位。
|
|
805
812
|
if (S.pinNext && ev.origin?.channel === "web") {
|
|
@@ -834,11 +841,16 @@ export function applyEvent(env) {
|
|
|
834
841
|
}
|
|
835
842
|
// 轮到它了(上一轮刚出结果):挂上「思考中」占位,用时从现在算。被当成提问的回答时那一轮还在跑,不用挂
|
|
836
843
|
if (ev.state === "started" && (!S.turnAi || S.turnAi.done)) {
|
|
844
|
+
setTodos(null);
|
|
837
845
|
turnStartAt = env.ts;
|
|
838
846
|
currentAi(env.ts);
|
|
839
847
|
}
|
|
840
848
|
return;
|
|
841
849
|
}
|
|
850
|
+
case "turn_start":
|
|
851
|
+
// 包括没有新用户消息、由后台任务触发的轮次。
|
|
852
|
+
setTodos(null);
|
|
853
|
+
return;
|
|
842
854
|
case "step": {
|
|
843
855
|
const ai = currentAi(env.ts);
|
|
844
856
|
ai.steps.push(ev.text);
|
package/web/views/sidebar.js
CHANGED
|
@@ -539,9 +539,9 @@ export function renderSidebar() {
|
|
|
539
539
|
orphan ? h("span", { class: "brand-icon lead fork-mark", html: ICON.fork }) : null,
|
|
540
540
|
h("span", { class: "title" }, convTitle(c)),
|
|
541
541
|
fold ? caret(fold.folded, fold.toggle) : null,
|
|
542
|
-
status(fold?.folded ? fold.keys : [c.key]),
|
|
543
542
|
convExpertMark(c),
|
|
544
543
|
c.taskId ? h("span", { class: "brand-icon task-mark", title: "定时任务的对话", html: ICON.clock }) : null,
|
|
544
|
+
status(fold?.folded ? fold.keys : [c.key]),
|
|
545
545
|
);
|
|
546
546
|
|
|
547
547
|
// 飞书和项目共用排序,展开后的会话跟随所属分组。
|
package/web/views/todos.js
CHANGED
|
@@ -10,7 +10,7 @@ let open = localStorage.getItem("aim.todosOpen") !== "0";
|
|
|
10
10
|
/** 当前这份清单点过 ×:清单再变才重新出来 */
|
|
11
11
|
let dismissed = false;
|
|
12
12
|
|
|
13
|
-
/** 换了一份清单(null =
|
|
13
|
+
/** 换了一份清单(null = 清空:换会话、开始新一轮) */
|
|
14
14
|
export function setTodos(list) {
|
|
15
15
|
S.todos = list?.length ? list : null;
|
|
16
16
|
dismissed = false;
|