@adecore/agents-react 0.46.3 → 0.48.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/agents/accounts.d.ts +9 -1
- package/dist/agents/accounts.js +31 -7
- package/dist/chat/account-choice.d.ts +5 -4
- package/dist/chat/account-choice.js +47 -39
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/index.js +1 -0
- package/dist/chat/logic/scrubber.js +12 -0
- package/dist/chat/logic/timeline-copy.js +2 -0
- package/dist/chat/logic/timeline.d.ts +6 -1
- package/dist/chat/logic/timeline.js +36 -10
- package/dist/chat/preferences.d.ts +2 -2
- package/dist/chat/preferences.js +11 -5
- package/dist/chat/ui/AccountPill.js +9 -6
- package/dist/chat/ui/ChatActivity.d.ts +2 -1
- package/dist/chat/ui/ChatActivity.js +295 -61
- package/dist/chat/ui/Composer.d.ts +2 -1
- package/dist/chat/ui/Composer.js +492 -486
- package/dist/chat/ui/LimitState.js +180 -172
- package/dist/chat/ui/PromptEditor.js +4 -1
- package/dist/chat/ui/ReferenceChip.d.ts +2 -1
- package/dist/chat/ui/ReferenceChip.js +135 -100
- package/dist/chat/ui/UnifiedDiff.js +22 -19
- package/dist/chat/ui/composer/ComposerControls.js +1 -1
- package/dist/chat/ui/composer/ComposerMenu.js +17 -11
- package/dist/chat/ui/composer/chips.d.ts +3 -0
- package/dist/chat/ui/composer/chips.js +14 -10
- package/dist/chat/ui/composer/use-chat-controls.js +70 -67
- package/dist/chat/ui/diff/EditorEditDiff.d.ts +3 -1
- package/dist/chat/ui/diff/EditorEditDiff.js +24 -18
- package/dist/chat/ui/diff/EditorPatchDiff.d.ts +3 -1
- package/dist/chat/ui/diff/EditorPatchDiff.js +4 -2
- package/dist/chat/ui/diff/diff-props.d.ts +2 -0
- package/dist/chat/ui/reference-icons.d.ts +3 -0
- package/dist/chat/ui/reference-icons.js +15 -2
- package/dist/chat/ui/rows/MessageRows.d.ts +6 -1
- package/dist/chat/ui/rows/MessageRows.js +166 -10
- package/dist/chat/ui/rows/RowContainer.js +21 -22
- package/dist/chat/ui/rows/Rows.js +37 -19
- package/dist/chat/ui/rows/WorkflowRow.d.ts +2 -1
- package/dist/chat/ui/rows/WorkflowRow.js +197 -191
- package/dist/chat/ui/rows/row-rhythm.d.ts +1 -0
- package/dist/chat/ui/rows/row-rhythm.js +12 -3
- package/dist/chat/workflow-list.d.ts +12 -0
- package/dist/chat/workflow-list.js +54 -0
- package/dist/host-hooks.d.ts +3 -0
- package/dist/host-hooks.js +8 -0
- package/dist/host.d.ts +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/locales/en/agent-chat.d.ts +9 -0
- package/dist/locales/en/agent-chat.js +9 -0
- package/dist/locales/en/agent-providers.d.ts +5 -0
- package/dist/locales/en/agent-providers.js +8 -3
- package/dist/locales/nl/agent-chat.d.ts +9 -0
- package/dist/locales/nl/agent-chat.js +9 -0
- package/dist/locales/nl/agent-providers.d.ts +5 -0
- package/dist/locales/nl/agent-providers.js +8 -3
- package/dist/providers/AccountOrderList.d.ts +10 -0
- package/dist/providers/AccountOrderList.js +158 -0
- package/dist/providers/CliDetail.js +55 -61
- package/dist/providers/account-actions.d.ts +1 -0
- package/dist/providers/account-actions.js +39 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/usage/limit-groups.js +6 -1
- package/package.json +8 -8
- package/src/agents/accounts.ts +42 -6
- package/src/chat/account-choice.ts +31 -10
- package/src/chat/index.ts +1 -0
- package/src/chat/logic/scrubber.ts +5 -0
- package/src/chat/logic/timeline-copy.ts +2 -0
- package/src/chat/logic/timeline.ts +33 -2
- package/src/chat/preferences.ts +33 -8
- package/src/chat/ui/AccountPill.tsx +3 -3
- package/src/chat/ui/ChatActivity.tsx +52 -6
- package/src/chat/ui/Composer.tsx +19 -3
- package/src/chat/ui/LimitState.tsx +4 -2
- package/src/chat/ui/PromptEditor.tsx +3 -1
- package/src/chat/ui/ReferenceChip.tsx +15 -5
- package/src/chat/ui/UnifiedDiff.tsx +12 -1
- package/src/chat/ui/composer/ComposerControls.tsx +1 -1
- package/src/chat/ui/composer/ComposerMenu.tsx +4 -2
- package/src/chat/ui/composer/chips.ts +15 -9
- package/src/chat/ui/composer/use-chat-controls.ts +4 -1
- package/src/chat/ui/diff/EditorEditDiff.tsx +9 -4
- package/src/chat/ui/diff/EditorPatchDiff.tsx +5 -1
- package/src/chat/ui/diff/diff-props.ts +3 -0
- package/src/chat/ui/reference-icons.ts +13 -1
- package/src/chat/ui/rows/MessageRows.tsx +35 -0
- package/src/chat/ui/rows/RowContainer.tsx +2 -2
- package/src/chat/ui/rows/Rows.tsx +3 -0
- package/src/chat/ui/rows/WorkflowRow.tsx +9 -4
- package/src/chat/ui/rows/row-rhythm.ts +12 -3
- package/src/chat/workflow-list.ts +65 -0
- package/src/host-hooks.ts +13 -0
- package/src/host.ts +23 -1
- package/src/index.ts +1 -0
- package/src/locales/en/agent-chat.ts +9 -0
- package/src/locales/en/agent-providers.ts +8 -3
- package/src/locales/nl/agent-chat.ts +9 -0
- package/src/locales/nl/agent-providers.ts +8 -3
- package/src/providers/AccountOrderList.tsx +124 -0
- package/src/providers/CliDetail.tsx +33 -28
- package/src/providers/account-actions.ts +30 -0
- package/src/providers/index.ts +11 -1
- package/src/usage/limit-groups.ts +8 -1
|
@@ -127,7 +127,7 @@ function ResumeAtResetToggle(t0) {
|
|
|
127
127
|
*/
|
|
128
128
|
function _temp() {}
|
|
129
129
|
function ContinueOn(t0) {
|
|
130
|
-
const $ = _c(
|
|
130
|
+
const $ = _c(67);
|
|
131
131
|
const {
|
|
132
132
|
chatId,
|
|
133
133
|
info,
|
|
@@ -141,280 +141,288 @@ function ContinueOn(t0) {
|
|
|
141
141
|
const actions = useChatActions();
|
|
142
142
|
const limits = useUsageLimits();
|
|
143
143
|
const [busy, setBusy] = useState(false);
|
|
144
|
-
const targets = continueTargets(choice.accounts, limits, info.provider, info.account);
|
|
145
144
|
let t1;
|
|
146
|
-
if ($[0] !== choice.
|
|
147
|
-
t1 =
|
|
148
|
-
$[0] = choice.
|
|
149
|
-
$[1] =
|
|
150
|
-
$[2] = info.provider;
|
|
151
|
-
$[3] = limits;
|
|
152
|
-
$[4] = t1;
|
|
145
|
+
if ($[0] !== choice.offered) {
|
|
146
|
+
t1 = target => choice.offered.some(entry => entry.id === target.id);
|
|
147
|
+
$[0] = choice.offered;
|
|
148
|
+
$[1] = t1;
|
|
153
149
|
} else {
|
|
154
|
-
t1 = $[
|
|
150
|
+
t1 = $[1];
|
|
155
151
|
}
|
|
156
|
-
const
|
|
152
|
+
const targets = continueTargets(choice.accounts, limits, info.provider, info.account).filter(t1);
|
|
157
153
|
let t2;
|
|
154
|
+
if ($[2] !== choice.accounts || $[3] !== info.account || $[4] !== info.provider || $[5] !== limits) {
|
|
155
|
+
t2 = limits !== null && hasUnreadAccount(choice.accounts, limits, info.provider, info.account);
|
|
156
|
+
$[2] = choice.accounts;
|
|
157
|
+
$[3] = info.account;
|
|
158
|
+
$[4] = info.provider;
|
|
159
|
+
$[5] = limits;
|
|
160
|
+
$[6] = t2;
|
|
161
|
+
} else {
|
|
162
|
+
t2 = $[6];
|
|
163
|
+
}
|
|
164
|
+
const unread = t2;
|
|
158
165
|
let t3;
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
let t4;
|
|
167
|
+
if ($[7] !== scope || $[8] !== unread) {
|
|
168
|
+
t3 = () => {
|
|
161
169
|
if (unread) {
|
|
162
170
|
readUnreadAccounts(scope);
|
|
163
171
|
}
|
|
164
172
|
};
|
|
165
|
-
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
} else {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
useEffect(
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
173
|
+
t4 = [scope, unread];
|
|
174
|
+
$[7] = scope;
|
|
175
|
+
$[8] = unread;
|
|
176
|
+
$[9] = t3;
|
|
177
|
+
$[10] = t4;
|
|
178
|
+
} else {
|
|
179
|
+
t3 = $[9];
|
|
180
|
+
t4 = $[10];
|
|
181
|
+
}
|
|
182
|
+
useEffect(t3, t4);
|
|
183
|
+
const target_0 = targets[0];
|
|
184
|
+
if (target_0 === undefined) {
|
|
177
185
|
return null;
|
|
178
186
|
}
|
|
179
|
-
let
|
|
180
|
-
if ($[
|
|
181
|
-
|
|
187
|
+
let t5;
|
|
188
|
+
if ($[11] !== actions || $[12] !== chatId || $[13] !== choice || $[14] !== host || $[15] !== t) {
|
|
189
|
+
t5 = entry_0 => {
|
|
182
190
|
setBusy(true);
|
|
183
|
-
actions.continueOn(chatId,
|
|
191
|
+
actions.continueOn(chatId, entry_0.id).catch(e => host.notify({
|
|
184
192
|
kind: "error",
|
|
185
193
|
title: t("limit.continueFailed", {
|
|
186
|
-
account: choice.nameOf(
|
|
194
|
+
account: choice.nameOf(entry_0)
|
|
187
195
|
}),
|
|
188
196
|
description: errorMessage(e)
|
|
189
197
|
})).finally(() => setBusy(false));
|
|
190
198
|
};
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
199
|
+
$[11] = actions;
|
|
200
|
+
$[12] = chatId;
|
|
201
|
+
$[13] = choice;
|
|
202
|
+
$[14] = host;
|
|
203
|
+
$[15] = t;
|
|
204
|
+
$[16] = t5;
|
|
197
205
|
} else {
|
|
198
|
-
|
|
206
|
+
t5 = $[16];
|
|
199
207
|
}
|
|
200
|
-
const go =
|
|
201
|
-
const name = choice.nameOf(
|
|
208
|
+
const go = t5;
|
|
209
|
+
const name = choice.nameOf(target_0);
|
|
202
210
|
const split = targets.length > 1;
|
|
203
211
|
const T0 = Tooltip;
|
|
204
|
-
const
|
|
212
|
+
const t6 = t("limit.continueOnTip", {
|
|
205
213
|
account: name
|
|
206
214
|
});
|
|
207
215
|
const T1 = Button;
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
let
|
|
212
|
-
if ($[
|
|
213
|
-
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
+
const t7 = "secondary";
|
|
217
|
+
const t8 = "sm";
|
|
218
|
+
const t9 = split && "rounded-r-none";
|
|
219
|
+
let t10;
|
|
220
|
+
if ($[17] !== t9) {
|
|
221
|
+
t10 = clsx("shrink-0 gap-1.5 whitespace-nowrap", t9);
|
|
222
|
+
$[17] = t9;
|
|
223
|
+
$[18] = t10;
|
|
216
224
|
} else {
|
|
217
|
-
|
|
225
|
+
t10 = $[18];
|
|
218
226
|
}
|
|
219
|
-
const
|
|
227
|
+
const t11 = t("limit.continueOnAria", {
|
|
220
228
|
account: name
|
|
221
229
|
});
|
|
222
|
-
let t11;
|
|
223
|
-
if ($[17] !== go || $[18] !== target) {
|
|
224
|
-
t11 = () => go(target);
|
|
225
|
-
$[17] = go;
|
|
226
|
-
$[18] = target;
|
|
227
|
-
$[19] = t11;
|
|
228
|
-
} else {
|
|
229
|
-
t11 = $[19];
|
|
230
|
-
}
|
|
231
230
|
let t12;
|
|
232
|
-
if ($[20] !==
|
|
233
|
-
t12 =
|
|
234
|
-
$[
|
|
231
|
+
if ($[19] !== go || $[20] !== target_0) {
|
|
232
|
+
t12 = () => go(target_0);
|
|
233
|
+
$[19] = go;
|
|
234
|
+
$[20] = target_0;
|
|
235
235
|
$[21] = t12;
|
|
236
236
|
} else {
|
|
237
237
|
t12 = $[21];
|
|
238
238
|
}
|
|
239
239
|
let t13;
|
|
240
|
-
if ($[22] !==
|
|
241
|
-
t13 =
|
|
242
|
-
|
|
243
|
-
className: "size-1.75"
|
|
244
|
-
});
|
|
245
|
-
$[22] = target.account.color;
|
|
240
|
+
if ($[22] !== t) {
|
|
241
|
+
t13 = t("limit.continueOn");
|
|
242
|
+
$[22] = t;
|
|
246
243
|
$[23] = t13;
|
|
247
244
|
} else {
|
|
248
245
|
t13 = $[23];
|
|
249
246
|
}
|
|
250
247
|
let t14;
|
|
251
|
-
if ($[24] !==
|
|
252
|
-
t14 = /*#__PURE__*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
className: t9,
|
|
256
|
-
disabled: busy,
|
|
257
|
-
"aria-label": t10,
|
|
258
|
-
onClick: t11,
|
|
259
|
-
children: [t12, t13, name]
|
|
248
|
+
if ($[24] !== target_0.account.color) {
|
|
249
|
+
t14 = /*#__PURE__*/_jsx(AccountDot, {
|
|
250
|
+
color: target_0.account.color,
|
|
251
|
+
className: "size-1.75"
|
|
260
252
|
});
|
|
261
|
-
$[24] =
|
|
262
|
-
$[25] =
|
|
263
|
-
$[26] = name;
|
|
264
|
-
$[27] = t10;
|
|
265
|
-
$[28] = t11;
|
|
266
|
-
$[29] = t12;
|
|
267
|
-
$[30] = t13;
|
|
268
|
-
$[31] = t9;
|
|
269
|
-
$[32] = t14;
|
|
253
|
+
$[24] = target_0.account.color;
|
|
254
|
+
$[25] = t14;
|
|
270
255
|
} else {
|
|
271
|
-
t14 = $[
|
|
256
|
+
t14 = $[25];
|
|
272
257
|
}
|
|
273
258
|
let t15;
|
|
274
|
-
if ($[
|
|
275
|
-
t15 = /*#__PURE__*/
|
|
276
|
-
|
|
277
|
-
|
|
259
|
+
if ($[26] !== T1 || $[27] !== busy || $[28] !== name || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t14) {
|
|
260
|
+
t15 = /*#__PURE__*/_jsxs(T1, {
|
|
261
|
+
variant: t7,
|
|
262
|
+
size: t8,
|
|
263
|
+
className: t10,
|
|
264
|
+
disabled: busy,
|
|
265
|
+
"aria-label": t11,
|
|
266
|
+
onClick: t12,
|
|
267
|
+
children: [t13, t14, name]
|
|
278
268
|
});
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
269
|
+
$[26] = T1;
|
|
270
|
+
$[27] = busy;
|
|
271
|
+
$[28] = name;
|
|
272
|
+
$[29] = t10;
|
|
273
|
+
$[30] = t11;
|
|
274
|
+
$[31] = t12;
|
|
275
|
+
$[32] = t13;
|
|
276
|
+
$[33] = t14;
|
|
277
|
+
$[34] = t15;
|
|
278
|
+
} else {
|
|
279
|
+
t15 = $[34];
|
|
280
|
+
}
|
|
281
|
+
let t16;
|
|
282
|
+
if ($[35] !== T0 || $[36] !== t15 || $[37] !== t6) {
|
|
283
|
+
t16 = /*#__PURE__*/_jsx(T0, {
|
|
284
|
+
label: t6,
|
|
285
|
+
children: t15
|
|
286
|
+
});
|
|
287
|
+
$[35] = T0;
|
|
282
288
|
$[36] = t15;
|
|
289
|
+
$[37] = t6;
|
|
290
|
+
$[38] = t16;
|
|
283
291
|
} else {
|
|
284
|
-
|
|
292
|
+
t16 = $[38];
|
|
285
293
|
}
|
|
286
|
-
const suggestion =
|
|
294
|
+
const suggestion = t16;
|
|
287
295
|
if (!split) {
|
|
288
296
|
return suggestion;
|
|
289
297
|
}
|
|
290
|
-
let
|
|
291
|
-
if ($[
|
|
292
|
-
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
298
|
+
let t17;
|
|
299
|
+
if ($[39] !== t) {
|
|
300
|
+
t17 = t("limit.chooseAccount");
|
|
301
|
+
$[39] = t;
|
|
302
|
+
$[40] = t17;
|
|
295
303
|
} else {
|
|
296
|
-
|
|
304
|
+
t17 = $[40];
|
|
297
305
|
}
|
|
298
|
-
let
|
|
299
|
-
if ($[
|
|
300
|
-
|
|
306
|
+
let t18;
|
|
307
|
+
if ($[41] !== busy) {
|
|
308
|
+
t18 = /*#__PURE__*/_jsx(Button, {
|
|
301
309
|
variant: "secondary",
|
|
302
310
|
size: "sm",
|
|
303
311
|
className: "-ml-px rounded-l-none border-l-0 px-1.5",
|
|
304
312
|
disabled: busy
|
|
305
313
|
});
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
314
|
+
$[41] = busy;
|
|
315
|
+
$[42] = t18;
|
|
308
316
|
} else {
|
|
309
|
-
|
|
317
|
+
t18 = $[42];
|
|
310
318
|
}
|
|
311
|
-
let
|
|
312
|
-
if ($[
|
|
313
|
-
|
|
319
|
+
let t19;
|
|
320
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
321
|
+
t19 = /*#__PURE__*/_jsx(Icon, {
|
|
314
322
|
icon: ChevronDown,
|
|
315
323
|
size: 14
|
|
316
324
|
});
|
|
317
|
-
$[41] = t18;
|
|
318
|
-
} else {
|
|
319
|
-
t18 = $[41];
|
|
320
|
-
}
|
|
321
|
-
let t19;
|
|
322
|
-
if ($[42] !== t17) {
|
|
323
|
-
t19 = /*#__PURE__*/_jsx(Menu.Trigger, {
|
|
324
|
-
render: t17,
|
|
325
|
-
children: t18
|
|
326
|
-
});
|
|
327
|
-
$[42] = t17;
|
|
328
325
|
$[43] = t19;
|
|
329
326
|
} else {
|
|
330
327
|
t19 = $[43];
|
|
331
328
|
}
|
|
332
329
|
let t20;
|
|
333
|
-
if ($[44] !==
|
|
334
|
-
t20 = /*#__PURE__*/_jsx(
|
|
335
|
-
|
|
336
|
-
name: true,
|
|
330
|
+
if ($[44] !== t18) {
|
|
331
|
+
t20 = /*#__PURE__*/_jsx(Menu.Trigger, {
|
|
332
|
+
render: t18,
|
|
337
333
|
children: t19
|
|
338
334
|
});
|
|
339
|
-
$[44] =
|
|
340
|
-
$[45] =
|
|
341
|
-
$[46] = t20;
|
|
335
|
+
$[44] = t18;
|
|
336
|
+
$[45] = t20;
|
|
342
337
|
} else {
|
|
343
|
-
t20 = $[
|
|
338
|
+
t20 = $[45];
|
|
344
339
|
}
|
|
345
340
|
let t21;
|
|
346
|
-
if ($[47] !==
|
|
347
|
-
t21 =
|
|
348
|
-
|
|
341
|
+
if ($[46] !== t17 || $[47] !== t20) {
|
|
342
|
+
t21 = /*#__PURE__*/_jsx(Tooltip, {
|
|
343
|
+
label: t17,
|
|
344
|
+
name: true,
|
|
345
|
+
children: t20
|
|
346
|
+
});
|
|
347
|
+
$[46] = t17;
|
|
348
|
+
$[47] = t20;
|
|
349
349
|
$[48] = t21;
|
|
350
350
|
} else {
|
|
351
351
|
t21 = $[48];
|
|
352
352
|
}
|
|
353
353
|
let t22;
|
|
354
|
-
if ($[49] !==
|
|
355
|
-
t22 =
|
|
356
|
-
|
|
357
|
-
});
|
|
358
|
-
$[49] = t21;
|
|
354
|
+
if ($[49] !== t) {
|
|
355
|
+
t22 = t("limit.continueOn");
|
|
356
|
+
$[49] = t;
|
|
359
357
|
$[50] = t22;
|
|
360
358
|
} else {
|
|
361
359
|
t22 = $[50];
|
|
362
360
|
}
|
|
363
361
|
let t23;
|
|
364
|
-
if ($[51] !==
|
|
365
|
-
t23 = /*#__PURE__*/_jsx(
|
|
362
|
+
if ($[51] !== t22) {
|
|
363
|
+
t23 = /*#__PURE__*/_jsx(Menu.GroupLabel, {
|
|
364
|
+
children: t22
|
|
365
|
+
});
|
|
366
|
+
$[51] = t22;
|
|
367
|
+
$[52] = t23;
|
|
368
|
+
} else {
|
|
369
|
+
t23 = $[52];
|
|
370
|
+
}
|
|
371
|
+
let t24;
|
|
372
|
+
if ($[53] !== choice || $[54] !== go || $[55] !== info || $[56] !== targets) {
|
|
373
|
+
t24 = /*#__PURE__*/_jsx(ContinueOnRows, {
|
|
366
374
|
targets: targets,
|
|
367
375
|
info: info,
|
|
368
376
|
choice: choice,
|
|
369
377
|
onPick: go
|
|
370
378
|
});
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
379
|
+
$[53] = choice;
|
|
380
|
+
$[54] = go;
|
|
381
|
+
$[55] = info;
|
|
382
|
+
$[56] = targets;
|
|
383
|
+
$[57] = t24;
|
|
376
384
|
} else {
|
|
377
|
-
|
|
385
|
+
t24 = $[57];
|
|
378
386
|
}
|
|
379
|
-
let
|
|
380
|
-
if ($[
|
|
381
|
-
|
|
387
|
+
let t25;
|
|
388
|
+
if ($[58] !== t23 || $[59] !== t24) {
|
|
389
|
+
t25 = /*#__PURE__*/_jsx(Menu.Popup, {
|
|
382
390
|
align: "end",
|
|
383
391
|
className: "min-w-64",
|
|
384
392
|
children: /*#__PURE__*/_jsxs(Menu.Group, {
|
|
385
|
-
children: [
|
|
393
|
+
children: [t23, t24]
|
|
386
394
|
})
|
|
387
395
|
});
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
396
|
+
$[58] = t23;
|
|
397
|
+
$[59] = t24;
|
|
398
|
+
$[60] = t25;
|
|
391
399
|
} else {
|
|
392
|
-
|
|
400
|
+
t25 = $[60];
|
|
393
401
|
}
|
|
394
|
-
let
|
|
395
|
-
if ($[
|
|
396
|
-
|
|
397
|
-
children: [
|
|
402
|
+
let t26;
|
|
403
|
+
if ($[61] !== t21 || $[62] !== t25) {
|
|
404
|
+
t26 = /*#__PURE__*/_jsxs(Menu.Root, {
|
|
405
|
+
children: [t21, t25]
|
|
398
406
|
});
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
407
|
+
$[61] = t21;
|
|
408
|
+
$[62] = t25;
|
|
409
|
+
$[63] = t26;
|
|
402
410
|
} else {
|
|
403
|
-
|
|
411
|
+
t26 = $[63];
|
|
404
412
|
}
|
|
405
|
-
let
|
|
406
|
-
if ($[
|
|
407
|
-
|
|
413
|
+
let t27;
|
|
414
|
+
if ($[64] !== suggestion || $[65] !== t26) {
|
|
415
|
+
t27 = /*#__PURE__*/_jsxs(ButtonGroup, {
|
|
408
416
|
className: "shrink-0",
|
|
409
|
-
children: [suggestion,
|
|
417
|
+
children: [suggestion, t26]
|
|
410
418
|
});
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
419
|
+
$[64] = suggestion;
|
|
420
|
+
$[65] = t26;
|
|
421
|
+
$[66] = t27;
|
|
414
422
|
} else {
|
|
415
|
-
|
|
423
|
+
t27 = $[66];
|
|
416
424
|
}
|
|
417
|
-
return
|
|
425
|
+
return t27;
|
|
418
426
|
}
|
|
419
427
|
/* Mounted only while the menu is open, so the clock of the session lines only ticks while someone reads them. */
|
|
420
428
|
function ContinueOnRows(t0) {
|
|
@@ -499,7 +507,7 @@ export function LimitDock(t0) {
|
|
|
499
507
|
} = useTranslation("agent-chat");
|
|
500
508
|
useFormatLocale();
|
|
501
509
|
const now = useNow(MINUTE_MS, info.limit !== undefined);
|
|
502
|
-
const choice = useAccountChoice(info.provider, info.account);
|
|
510
|
+
const choice = useAccountChoice(info.provider, info.account, chatId);
|
|
503
511
|
let t1;
|
|
504
512
|
if ($[0] !== info || $[1] !== now) {
|
|
505
513
|
t1 = limitView(info, now);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useLayoutEffect, useRef } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { Surface } from '@adecore/ui';
|
|
4
|
+
import { useChatHost } from '../../host.js';
|
|
4
5
|
import { ComposerInput } from './ComposerInput.js';
|
|
5
6
|
import { chipDecorations } from './composer/chips.js';
|
|
6
7
|
import { ComposerMenu } from './composer/ComposerMenu.js';
|
|
@@ -26,6 +27,7 @@ export function PromptEditor({
|
|
|
26
27
|
disabled = false,
|
|
27
28
|
className
|
|
28
29
|
}) {
|
|
30
|
+
const host = useChatHost();
|
|
29
31
|
const inputRef = useRef(null);
|
|
30
32
|
// A pick writes twice in one event (the text, then what it picked), and the second must build on the first.
|
|
31
33
|
const latest = useRef(value);
|
|
@@ -63,7 +65,8 @@ export function PromptEditor({
|
|
|
63
65
|
const extensions = chipDecorations({
|
|
64
66
|
mentions: value.mentions,
|
|
65
67
|
skills: value.skills,
|
|
66
|
-
references: menus.referenceChips
|
|
68
|
+
references: menus.referenceChips,
|
|
69
|
+
referenceIcon: host.ReferenceIcon
|
|
67
70
|
});
|
|
68
71
|
const onKeyDown = e => {
|
|
69
72
|
if (e.isComposing) {
|
|
@@ -9,7 +9,8 @@ interface TokenChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children
|
|
|
9
9
|
onOpen?: () => void;
|
|
10
10
|
}
|
|
11
11
|
export declare function TokenChip({ kind, value, sigil, icon, label, tone, onOpen, className, ...rest }: TokenChipProps): import("react").JSX.Element;
|
|
12
|
-
export declare function ReferenceChip({ id }: {
|
|
12
|
+
export declare function ReferenceChip({ id, lastName }: {
|
|
13
13
|
id: string;
|
|
14
|
+
lastName?: string;
|
|
14
15
|
}): import("react").JSX.Element;
|
|
15
16
|
export {};
|