@adecore/agents-react 0.63.0-untangle.1 → 0.63.1
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.
|
@@ -17,7 +17,6 @@ import { backgroundCounts } from '../activity.js';
|
|
|
17
17
|
import { badgeCountOf, entryTimeOf, flyoutSubagents, progressOf, statusWordOf, subagentTitle, summaryWordOf, taskRowStateOf } from '../subagent-list.js';
|
|
18
18
|
import { useSubagentSupport } from '../subagent-support.js';
|
|
19
19
|
import { canOpenSubagent, crumbOf, openFromMain, useSubagentTrail } from '../subagent-view.js';
|
|
20
|
-
import { waitingOnLabel, waitingOnOf } from '../waiting-on.js';
|
|
21
20
|
import { flyoutWorkflows, workflowPillOf } from '../workflow-list.js';
|
|
22
21
|
import { WorkflowRow } from './rows/WorkflowRow.js';
|
|
23
22
|
import { SubagentStopButton } from './SubagentStopButton.js';
|
|
@@ -164,10 +163,7 @@ export function ChatActivity(t0) {
|
|
|
164
163
|
icon: shells > 0 ? SquareTerminal : Activity,
|
|
165
164
|
size: 14
|
|
166
165
|
}),
|
|
167
|
-
label:
|
|
168
|
-
tasks: background
|
|
169
|
-
}),
|
|
170
|
-
heading: [shells > 0 && t("activity.shells", {
|
|
166
|
+
label: [shells > 0 && t("activity.shells", {
|
|
171
167
|
count: shells
|
|
172
168
|
}), monitors > 0 && t("activity.monitors", {
|
|
173
169
|
count: monitors
|
|
@@ -326,43 +322,6 @@ function Flyout(t0) {
|
|
|
326
322
|
}
|
|
327
323
|
return t6;
|
|
328
324
|
}
|
|
329
|
-
/* What the background chip says: the oldest command or monitor and how long it has run, on a clock of its own. */
|
|
330
|
-
function BackgroundLabel(t0) {
|
|
331
|
-
const $ = _c(7);
|
|
332
|
-
const {
|
|
333
|
-
tasks
|
|
334
|
-
} = t0;
|
|
335
|
-
const now = useNow(1000);
|
|
336
|
-
let t1;
|
|
337
|
-
let t2;
|
|
338
|
-
if ($[0] !== now || $[1] !== tasks) {
|
|
339
|
-
const waiting = waitingOnOf({
|
|
340
|
-
background: tasks
|
|
341
|
-
});
|
|
342
|
-
t1 = "truncate";
|
|
343
|
-
t2 = waiting === null ? null : waitingOnLabel(waiting, now);
|
|
344
|
-
$[0] = now;
|
|
345
|
-
$[1] = tasks;
|
|
346
|
-
$[2] = t1;
|
|
347
|
-
$[3] = t2;
|
|
348
|
-
} else {
|
|
349
|
-
t1 = $[2];
|
|
350
|
-
t2 = $[3];
|
|
351
|
-
}
|
|
352
|
-
let t3;
|
|
353
|
-
if ($[4] !== t1 || $[5] !== t2) {
|
|
354
|
-
t3 = /*#__PURE__*/_jsx("span", {
|
|
355
|
-
className: t1,
|
|
356
|
-
children: t2
|
|
357
|
-
});
|
|
358
|
-
$[4] = t1;
|
|
359
|
-
$[5] = t2;
|
|
360
|
-
$[6] = t3;
|
|
361
|
-
} else {
|
|
362
|
-
t3 = $[6];
|
|
363
|
-
}
|
|
364
|
-
return t3;
|
|
365
|
-
}
|
|
366
325
|
function WorkflowIcon(t0) {
|
|
367
326
|
const $ = _c(2);
|
|
368
327
|
const {
|
|
@@ -13,7 +13,7 @@ import { useChatPreferences } from '../preferences.js';
|
|
|
13
13
|
import { readingWidthStyle } from '../reading-width.js';
|
|
14
14
|
import { INITIAL_CONVERSATION, SubagentConversation } from '../subagent-conversation.js';
|
|
15
15
|
import { useSubagentSupport } from '../subagent-support.js';
|
|
16
|
-
import { openBelow, useSubagentTrail } from '../subagent-view.js';
|
|
16
|
+
import { openBelow, useSubagentItem, useSubagentTrail } from '../subagent-view.js';
|
|
17
17
|
import { firstRowInView, restoreAnchor, wantsEarlier } from '../timeline-scroll.js';
|
|
18
18
|
import { CoveredBottomContext } from './covered-bottom.js';
|
|
19
19
|
import { FileLinkContext } from './file-links.js';
|
|
@@ -129,6 +129,8 @@ export function SubagentTimeline(t0) {
|
|
|
129
129
|
}
|
|
130
130
|
useEffect(t5, t6);
|
|
131
131
|
const hideTools = useHostHidesToolCalls(scope.id, chatId);
|
|
132
|
+
const item = useSubagentItem(chatId, toolUseId);
|
|
133
|
+
const stale = state.status === "ready" && !state.live && item?.status === "running";
|
|
132
134
|
const rows = deriveTimelineRows(state.items, {
|
|
133
135
|
expandedGroups: groups.ids,
|
|
134
136
|
expandedTurns: NO_TURNS,
|
|
@@ -333,6 +335,9 @@ export function SubagentTimeline(t0) {
|
|
|
333
335
|
}), state.live && /*#__PURE__*/_jsx("div", {
|
|
334
336
|
className: "chat-live-text pt-1 text-xs",
|
|
335
337
|
children: t("subagents.working")
|
|
338
|
+
}), stale && /*#__PURE__*/_jsx("div", {
|
|
339
|
+
className: "pt-1 text-xs text-text-faint",
|
|
340
|
+
children: t("subagents.stale")
|
|
336
341
|
})]
|
|
337
342
|
}), /*#__PURE__*/_jsx(TimelineMenuPopup, {
|
|
338
343
|
target: target,
|
package/dist/chat/waiting-on.js
CHANGED
|
@@ -60,7 +60,7 @@ export function waitingOnLabel(waiting, now) {
|
|
|
60
60
|
});
|
|
61
61
|
case 'command':
|
|
62
62
|
return t('waitingOn.command', {
|
|
63
|
-
command: waiting.task.
|
|
63
|
+
command: waiting.task.description || waiting.task.command || t(`activity.${waiting.task.kind}`),
|
|
64
64
|
age: formatElapsedShort(Math.max(0, now - waiting.task.startedAt))
|
|
65
65
|
});
|
|
66
66
|
case 'background':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents-react",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.1",
|
|
4
4
|
"description": "React agent chat threads, composers, approvals, provider accounts and usage views.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"test:visuals": "bun --config=integration.bunfig.toml --conditions=source test ./src/chat/visual-viewport.integration.test.ts"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@adecore/agent-contracts": "0.63.
|
|
76
|
-
"@adecore/editor": "0.63.
|
|
77
|
-
"@adecore/editor-react": "0.63.
|
|
78
|
-
"@adecore/intelligent-ui": "0.63.
|
|
79
|
-
"@adecore/merge": "0.63.
|
|
80
|
-
"@adecore/utils": "0.63.
|
|
75
|
+
"@adecore/agent-contracts": "0.63.1",
|
|
76
|
+
"@adecore/editor": "0.63.1",
|
|
77
|
+
"@adecore/editor-react": "0.63.1",
|
|
78
|
+
"@adecore/intelligent-ui": "0.63.1",
|
|
79
|
+
"@adecore/merge": "0.63.1",
|
|
80
|
+
"@adecore/utils": "0.63.1",
|
|
81
81
|
"@codemirror/commands": "^6.11.1",
|
|
82
82
|
"@codemirror/language": "^6.13.1",
|
|
83
83
|
"@codemirror/state": "^6.7.6",
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"zustand": "^5.0.16"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@adecore/ui": "^0.63.
|
|
104
|
+
"@adecore/ui": "^0.63.1",
|
|
105
105
|
"i18next": "^26.4.2",
|
|
106
106
|
"react": "^19.3.0",
|
|
107
107
|
"react-dom": "^19.3.0",
|
|
108
108
|
"react-i18next": "^17.0.15"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@adecore/ui": "0.63.
|
|
111
|
+
"@adecore/ui": "0.63.1",
|
|
112
112
|
"@types/bun": "^1.4.4",
|
|
113
113
|
"@types/react": "^19.3.0",
|
|
114
114
|
"@types/react-dom": "^19.3.0",
|
|
@@ -16,7 +16,6 @@ import { backgroundCounts } from '../activity';
|
|
|
16
16
|
import { badgeCountOf, entryTimeOf, flyoutSubagents, progressOf, statusWordOf, subagentTitle, summaryWordOf, taskRowStateOf } from '../subagent-list';
|
|
17
17
|
import { useSubagentSupport } from '../subagent-support';
|
|
18
18
|
import { canOpenSubagent, crumbOf, openFromMain, useSubagentTrail, type SubagentStep } from '../subagent-view';
|
|
19
|
-
import { waitingOnLabel, waitingOnOf } from '../waiting-on';
|
|
20
19
|
import { flyoutWorkflows, workflowPillOf, type WorkflowCall, type WorkflowWord } from '../workflow-list';
|
|
21
20
|
import { WorkflowRow } from './rows/WorkflowRow';
|
|
22
21
|
import { SubagentStopButton } from './SubagentStopButton';
|
|
@@ -99,8 +98,7 @@ export function ChatActivity({ chatId, workflows: showsWorkflows = true }: { cha
|
|
|
99
98
|
{background.length > 0 && (
|
|
100
99
|
<Flyout
|
|
101
100
|
icon={<Icon icon={shells > 0 ? SquareTerminal : Activity} size={14} />}
|
|
102
|
-
label={
|
|
103
|
-
heading={[shells > 0 && t('activity.shells', { count: shells }), monitors > 0 && t('activity.monitors', { count: monitors })]
|
|
101
|
+
label={[shells > 0 && t('activity.shells', { count: shells }), monitors > 0 && t('activity.monitors', { count: monitors })]
|
|
104
102
|
.filter(Boolean)
|
|
105
103
|
.join(' · ')}
|
|
106
104
|
>
|
|
@@ -136,14 +134,6 @@ function Flyout({ icon, label, heading = label, children }: { icon: ReactNode; l
|
|
|
136
134
|
);
|
|
137
135
|
}
|
|
138
136
|
|
|
139
|
-
/* What the background chip says: the oldest command or monitor and how long it has run, on a clock of its own. */
|
|
140
|
-
function BackgroundLabel({ tasks }: { tasks: readonly ChatBackgroundTask[] }) {
|
|
141
|
-
const now = useNow(1000);
|
|
142
|
-
const waiting = waitingOnOf({ background: tasks });
|
|
143
|
-
|
|
144
|
-
return <span className="truncate">{waiting === null ? null : waitingOnLabel(waiting, now)}</span>;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
137
|
function WorkflowIcon({ word }: { word: WorkflowWord }) {
|
|
148
138
|
return word === 'stalled' ? <Icon icon={TriangleAlert} size={14} className="shrink-0 text-status-needs-you" /> : <StatusIcon word={word} />;
|
|
149
139
|
}
|
|
@@ -12,7 +12,7 @@ import { useChatPreferences } from '../preferences';
|
|
|
12
12
|
import { readingWidthStyle } from '../reading-width';
|
|
13
13
|
import { INITIAL_CONVERSATION, SubagentConversation, type SubagentConversationState } from '../subagent-conversation';
|
|
14
14
|
import { useSubagentSupport } from '../subagent-support';
|
|
15
|
-
import { openBelow, useSubagentTrail, type SubagentStep } from '../subagent-view';
|
|
15
|
+
import { openBelow, useSubagentItem, useSubagentTrail, type SubagentStep } from '../subagent-view';
|
|
16
16
|
import { firstRowInView, restoreAnchor, wantsEarlier, type ReadingAnchor } from '../timeline-scroll';
|
|
17
17
|
import { CoveredBottomContext } from './covered-bottom';
|
|
18
18
|
import { FileLinkContext } from './file-links';
|
|
@@ -84,6 +84,9 @@ export function SubagentTimeline({
|
|
|
84
84
|
}, [state.unsupported, scope]);
|
|
85
85
|
|
|
86
86
|
const hideTools = useHostHidesToolCalls(scope.id, chatId);
|
|
87
|
+
const item = useSubagentItem(chatId, toolUseId);
|
|
88
|
+
// The row still says it runs, but the machine found no process that has it any more.
|
|
89
|
+
const stale = state.status === 'ready' && !state.live && item?.status === 'running';
|
|
87
90
|
|
|
88
91
|
const rows = deriveTimelineRows(state.items, {
|
|
89
92
|
expandedGroups: groups.ids,
|
|
@@ -207,6 +210,7 @@ export function SubagentTimeline({
|
|
|
207
210
|
);
|
|
208
211
|
})}
|
|
209
212
|
{state.live && <div className="chat-live-text pt-1 text-xs">{t('subagents.working')}</div>}
|
|
213
|
+
{stale && <div className="pt-1 text-xs text-text-faint">{t('subagents.stale')}</div>}
|
|
210
214
|
</ContextMenu.Trigger>
|
|
211
215
|
<TimelineMenuPopup target={target} thread={threadRef} />
|
|
212
216
|
</ContextMenu.Root>
|
package/src/chat/waiting-on.ts
CHANGED
|
@@ -81,7 +81,7 @@ export function waitingOnLabel(waiting: WaitingOn, now: number): string {
|
|
|
81
81
|
return waiting.until === undefined ? t('waitingOn.paused') : t('waitingOn.pausedUntil', { time: formatMoment(waiting.until, now) });
|
|
82
82
|
case 'command':
|
|
83
83
|
return t('waitingOn.command', {
|
|
84
|
-
command: waiting.task.
|
|
84
|
+
command: waiting.task.description || waiting.task.command || t(`activity.${waiting.task.kind}`),
|
|
85
85
|
age: formatElapsedShort(Math.max(0, now - waiting.task.startedAt))
|
|
86
86
|
});
|
|
87
87
|
case 'background':
|