@adecore/agents-react 0.55.2 → 0.56.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/chat/ui/WorkflowAgentLine.js +35 -44
- package/dist/host-hooks.d.ts +1 -0
- package/dist/host-hooks.js +4 -0
- package/dist/host.d.ts +1 -0
- package/dist/locales/en/agent-providers.d.ts +5 -0
- package/dist/locales/en/agent-providers.js +6 -1
- package/dist/locales/nl/agent-providers.d.ts +5 -0
- package/dist/locales/nl/agent-providers.js +6 -1
- package/dist/providers/AccountDetail.js +429 -378
- package/dist/providers/account-actions.d.ts +1 -0
- package/dist/providers/account-actions.js +18 -0
- package/package.json +9 -9
- package/src/chat/ui/WorkflowAgentLine.tsx +3 -3
- package/src/host-hooks.ts +6 -0
- package/src/host.ts +6 -0
- package/src/locales/en/agent-providers.ts +6 -1
- package/src/locales/nl/agent-providers.ts +6 -1
- package/src/providers/AccountDetail.tsx +27 -1
- package/src/providers/account-actions.ts +13 -0
|
@@ -45,11 +45,11 @@ function Elapsed(t0) {
|
|
|
45
45
|
}
|
|
46
46
|
/*
|
|
47
47
|
* One agent of a workflow: its label, what it does or did, and its time. It opens the agent's
|
|
48
|
-
* conversation when `onOpen` is given and the agent started; one still waiting has no transcript yet
|
|
49
|
-
* `selected` marks the agent whose conversation is open beside it.
|
|
48
|
+
* conversation when `onOpen` is given and the agent started; one still waiting has no transcript yet
|
|
49
|
+
* and, like a line without `onOpen`, draws no arrow. `selected` marks the agent whose conversation is open beside it.
|
|
50
50
|
*/
|
|
51
51
|
export function WorkflowAgentLine(t0) {
|
|
52
|
-
const $ = _c(
|
|
52
|
+
const $ = _c(54);
|
|
53
53
|
const {
|
|
54
54
|
view,
|
|
55
55
|
provider,
|
|
@@ -235,63 +235,54 @@ export function WorkflowAgentLine(t0) {
|
|
|
235
235
|
} else {
|
|
236
236
|
t20 = $[37];
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
t22 = clsx("shrink-0 text-text-faint", t21);
|
|
242
|
-
$[38] = t21;
|
|
243
|
-
$[39] = t22;
|
|
244
|
-
} else {
|
|
245
|
-
t22 = $[39];
|
|
246
|
-
}
|
|
247
|
-
let t23;
|
|
248
|
-
if ($[40] !== t22) {
|
|
249
|
-
t23 = /*#__PURE__*/_jsx(Icon, {
|
|
238
|
+
let t21;
|
|
239
|
+
if ($[38] !== open) {
|
|
240
|
+
t21 = open !== undefined && /*#__PURE__*/_jsx(Icon, {
|
|
250
241
|
icon: ChevronRight,
|
|
251
242
|
size: 12,
|
|
252
|
-
className:
|
|
243
|
+
className: "shrink-0 text-text-faint"
|
|
253
244
|
});
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
245
|
+
$[38] = open;
|
|
246
|
+
$[39] = t21;
|
|
256
247
|
} else {
|
|
257
|
-
|
|
248
|
+
t21 = $[39];
|
|
258
249
|
}
|
|
259
|
-
let
|
|
260
|
-
if ($[
|
|
261
|
-
|
|
250
|
+
let t22;
|
|
251
|
+
if ($[40] !== t19 || $[41] !== t20 || $[42] !== t21) {
|
|
252
|
+
t22 = /*#__PURE__*/_jsxs("span", {
|
|
262
253
|
className: "flex h-5 shrink-0 items-center gap-2",
|
|
263
|
-
children: [t19, t20,
|
|
254
|
+
children: [t19, t20, t21]
|
|
264
255
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
256
|
+
$[40] = t19;
|
|
257
|
+
$[41] = t20;
|
|
258
|
+
$[42] = t21;
|
|
259
|
+
$[43] = t22;
|
|
269
260
|
} else {
|
|
270
|
-
|
|
261
|
+
t22 = $[43];
|
|
271
262
|
}
|
|
272
|
-
let
|
|
273
|
-
if ($[
|
|
274
|
-
|
|
263
|
+
let t23;
|
|
264
|
+
if ($[44] !== agent.index || $[45] !== open || $[46] !== ref || $[47] !== selected || $[48] !== t13 || $[49] !== t18 || $[50] !== t22 || $[51] !== t6 || $[52] !== t7) {
|
|
265
|
+
t23 = /*#__PURE__*/_jsxs("button", {
|
|
275
266
|
ref: ref,
|
|
276
267
|
"data-workflow-agent": t4,
|
|
277
268
|
"aria-pressed": selected,
|
|
278
269
|
className: t6,
|
|
279
270
|
disabled: t7,
|
|
280
271
|
onClick: open,
|
|
281
|
-
children: [t13, t18,
|
|
272
|
+
children: [t13, t18, t22]
|
|
282
273
|
});
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
274
|
+
$[44] = agent.index;
|
|
275
|
+
$[45] = open;
|
|
276
|
+
$[46] = ref;
|
|
277
|
+
$[47] = selected;
|
|
278
|
+
$[48] = t13;
|
|
279
|
+
$[49] = t18;
|
|
280
|
+
$[50] = t22;
|
|
281
|
+
$[51] = t6;
|
|
282
|
+
$[52] = t7;
|
|
283
|
+
$[53] = t23;
|
|
293
284
|
} else {
|
|
294
|
-
|
|
285
|
+
t23 = $[53];
|
|
295
286
|
}
|
|
296
|
-
return
|
|
287
|
+
return t23;
|
|
297
288
|
}
|
package/dist/host-hooks.d.ts
CHANGED
|
@@ -35,4 +35,5 @@ export declare function useHostReplyAuthor(...args: Parameters<ChatHost['useRepl
|
|
|
35
35
|
export declare function useHostMapSource(maps: NonNullable<ChatHost['maps']>, scopeId: string): ReturnType<NonNullable<ChatHost['maps']>['useSource']>;
|
|
36
36
|
export declare function useCommandNames(look: Required<Pick<CommandLook, 'useNames'>>, scopeId: string, chatId: string): ReturnType<NonNullable<CommandLook['useNames']>>;
|
|
37
37
|
export declare function useHostCanReorderAccounts(scopeId: string): boolean;
|
|
38
|
+
export declare function useHostCanShareAccountConfig(scopeId: string): boolean;
|
|
38
39
|
export declare function useHostAccountRule(scopeId: string, chatId: string): AccountRule | null;
|
package/dist/host-hooks.js
CHANGED
|
@@ -109,6 +109,10 @@ export function useHostCanReorderAccounts(scopeId) {
|
|
|
109
109
|
const useCanReorder = useChatHost().useCanReorderAccounts ?? (() => true);
|
|
110
110
|
return useCanReorder(scopeId);
|
|
111
111
|
}
|
|
112
|
+
export function useHostCanShareAccountConfig(scopeId) {
|
|
113
|
+
const useCanShare = useChatHost().useCanShareAccountConfig ?? (() => false);
|
|
114
|
+
return useCanShare(scopeId);
|
|
115
|
+
}
|
|
112
116
|
export function useHostAccountRule(scopeId, chatId) {
|
|
113
117
|
const useRule = useChatHost().useAccountRule ?? (() => null);
|
|
114
118
|
return useRule(scopeId, chatId);
|
package/dist/host.d.ts
CHANGED
|
@@ -377,6 +377,7 @@ export interface ChatHost {
|
|
|
377
377
|
openLogin: ((scopeId: string, kind: AgentKind, accountId: string, name: string) => Promise<void>) | null;
|
|
378
378
|
useLoginBlocked(scopeId: string): string | null;
|
|
379
379
|
useCanReorderAccounts?(scopeId: string): boolean;
|
|
380
|
+
useCanShareAccountConfig?(scopeId: string): boolean;
|
|
380
381
|
useAccountRule?(scopeId: string, chatId: string): AccountRule | null;
|
|
381
382
|
runProviderCommand?(scopeId: string, kind: AgentKind, command: string): void;
|
|
382
383
|
useMachinePlatform?(scopeId: string): ProviderPlatform | null;
|
|
@@ -149,7 +149,12 @@ export default {
|
|
|
149
149
|
confirm: 'Remove account'
|
|
150
150
|
},
|
|
151
151
|
saveFailed: 'Could not save the account',
|
|
152
|
-
reorderFailed: 'Could not change the order of the accounts'
|
|
152
|
+
reorderFailed: 'Could not change the order of the accounts',
|
|
153
|
+
shareConfigFailed: 'Could not change what this account shares',
|
|
154
|
+
shareConfig: {
|
|
155
|
+
label: 'Use the setup of the default account',
|
|
156
|
+
description: 'Instructions, skills, agents and commands come from the default {{provider}} account. Sign-in and history stay apart.'
|
|
157
|
+
}
|
|
153
158
|
},
|
|
154
159
|
add: {
|
|
155
160
|
title: 'Add {{provider}} account',
|
|
@@ -149,7 +149,12 @@ export default {
|
|
|
149
149
|
confirm: 'Account verwijderen'
|
|
150
150
|
},
|
|
151
151
|
saveFailed: 'Kon het account niet opslaan',
|
|
152
|
-
reorderFailed: 'Kon de volgorde van de accounts niet wijzigen'
|
|
152
|
+
reorderFailed: 'Kon de volgorde van de accounts niet wijzigen',
|
|
153
|
+
shareConfigFailed: 'Kon niet wijzigen wat dit account deelt',
|
|
154
|
+
shareConfig: {
|
|
155
|
+
label: 'De opzet van het standaardaccount gebruiken',
|
|
156
|
+
description: "Instructies, skills, agents en commando's komen van het standaardaccount van {{provider}}. Inloggen en geschiedenis blijven apart."
|
|
157
|
+
}
|
|
153
158
|
},
|
|
154
159
|
add: {
|
|
155
160
|
title: '{{provider}}-account toevoegen',
|