@adecore/agents-react 0.63.0-untangle.1 → 0.63.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.
|
@@ -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 {
|
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.0
|
|
3
|
+
"version": "0.63.0",
|
|
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.0
|
|
76
|
-
"@adecore/editor": "0.63.0
|
|
77
|
-
"@adecore/editor-react": "0.63.0
|
|
78
|
-
"@adecore/intelligent-ui": "0.63.0
|
|
79
|
-
"@adecore/merge": "0.63.0
|
|
80
|
-
"@adecore/utils": "0.63.0
|
|
75
|
+
"@adecore/agent-contracts": "0.63.0",
|
|
76
|
+
"@adecore/editor": "0.63.0",
|
|
77
|
+
"@adecore/editor-react": "0.63.0",
|
|
78
|
+
"@adecore/intelligent-ui": "0.63.0",
|
|
79
|
+
"@adecore/merge": "0.63.0",
|
|
80
|
+
"@adecore/utils": "0.63.0",
|
|
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.0
|
|
104
|
+
"@adecore/ui": "^0.63.0",
|
|
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.0
|
|
111
|
+
"@adecore/ui": "0.63.0",
|
|
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
|
}
|
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':
|