@adecore/agents-react 0.46.3 → 0.47.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/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/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/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/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/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.d.ts +8 -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/nl/agent-chat.d.ts +9 -0
- package/dist/locales/nl/agent-chat.js +9 -0
- package/package.json +8 -8
- 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/ui/ChatActivity.tsx +52 -6
- package/src/chat/ui/Composer.tsx +19 -3
- package/src/chat/ui/PromptEditor.tsx +3 -1
- package/src/chat/ui/ReferenceChip.tsx +15 -5
- package/src/chat/ui/composer/ComposerMenu.tsx +4 -2
- package/src/chat/ui/composer/chips.ts +15 -9
- 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.ts +15 -1
- package/src/index.ts +1 -0
- package/src/locales/en/agent-chat.ts +9 -0
- package/src/locales/nl/agent-chat.ts +9 -0
package/dist/chat/ui/Composer.js
CHANGED
|
@@ -55,7 +55,7 @@ function sendLabelKey(busy, steerable, delivery) {
|
|
|
55
55
|
return delivery === 'steer' ? 'composer.steerButton' : 'composer.queueWithSteerButton';
|
|
56
56
|
}
|
|
57
57
|
export function Composer(t0) {
|
|
58
|
-
const $ = _c(
|
|
58
|
+
const $ = _c(248);
|
|
59
59
|
const {
|
|
60
60
|
chatId,
|
|
61
61
|
info,
|
|
@@ -63,11 +63,13 @@ export function Composer(t0) {
|
|
|
63
63
|
answerPromptsElsewhere,
|
|
64
64
|
disabled,
|
|
65
65
|
readOnly: t1,
|
|
66
|
+
workflowPill: t2,
|
|
66
67
|
providerFixed,
|
|
67
68
|
onSend,
|
|
68
69
|
onRetarget
|
|
69
70
|
} = t0;
|
|
70
71
|
const readOnly = t1 === undefined ? false : t1;
|
|
72
|
+
const workflowPill = t2 === undefined ? true : t2;
|
|
71
73
|
const {
|
|
72
74
|
t
|
|
73
75
|
} = useTranslation("agent-chat");
|
|
@@ -75,15 +77,15 @@ export function Composer(t0) {
|
|
|
75
77
|
const scope = useChatScope();
|
|
76
78
|
const sendDelivery = useHostSendDelivery();
|
|
77
79
|
const sendKey = useChatPreferences(_temp);
|
|
78
|
-
let
|
|
80
|
+
let t3;
|
|
79
81
|
if ($[0] !== info.provider) {
|
|
80
|
-
|
|
82
|
+
t3 = row => row.providers.find(entry => entry.kind === info.provider);
|
|
81
83
|
$[0] = info.provider;
|
|
82
|
-
$[1] =
|
|
84
|
+
$[1] = t3;
|
|
83
85
|
} else {
|
|
84
|
-
|
|
86
|
+
t3 = $[1];
|
|
85
87
|
}
|
|
86
|
-
const provider = useProviders(
|
|
88
|
+
const provider = useProviders(t3);
|
|
87
89
|
const capabilities = provider?.capabilities;
|
|
88
90
|
const steerable = canSteer(capabilities);
|
|
89
91
|
const writable = !disabled && !readOnly;
|
|
@@ -97,14 +99,14 @@ export function Composer(t0) {
|
|
|
97
99
|
} = box;
|
|
98
100
|
const notice = useNotice();
|
|
99
101
|
const history = usePromptHistory(chatId, box.setText);
|
|
100
|
-
const
|
|
101
|
-
let
|
|
102
|
-
if ($[2] !== box || $[3] !== capabilities || $[4] !== chatId || $[5] !== info || $[6] !==
|
|
103
|
-
|
|
102
|
+
const t4 = provider?.name;
|
|
103
|
+
let t5;
|
|
104
|
+
if ($[2] !== box || $[3] !== capabilities || $[4] !== chatId || $[5] !== info || $[6] !== t4) {
|
|
105
|
+
t5 = {
|
|
104
106
|
chatId,
|
|
105
107
|
info,
|
|
106
108
|
capabilities,
|
|
107
|
-
providerName:
|
|
109
|
+
providerName: t4,
|
|
108
110
|
draft: box,
|
|
109
111
|
inputRef
|
|
110
112
|
};
|
|
@@ -112,33 +114,33 @@ export function Composer(t0) {
|
|
|
112
114
|
$[3] = capabilities;
|
|
113
115
|
$[4] = chatId;
|
|
114
116
|
$[5] = info;
|
|
115
|
-
$[6] =
|
|
116
|
-
$[7] =
|
|
117
|
+
$[6] = t4;
|
|
118
|
+
$[7] = t5;
|
|
117
119
|
} else {
|
|
118
|
-
|
|
120
|
+
t5 = $[7];
|
|
119
121
|
}
|
|
120
|
-
const menus = useComposerMenus(
|
|
121
|
-
const
|
|
122
|
-
let
|
|
122
|
+
const menus = useComposerMenus(t5);
|
|
123
|
+
const t6 = provider?.name;
|
|
124
|
+
let t7;
|
|
123
125
|
if ($[8] !== menus.referables.chatsOnly || $[9] !== menus.referables.items) {
|
|
124
|
-
|
|
126
|
+
t7 = menus.referables.chatsOnly ? menus.referables.items.filter(_temp2) : menus.referables.items;
|
|
125
127
|
$[8] = menus.referables.chatsOnly;
|
|
126
128
|
$[9] = menus.referables.items;
|
|
127
|
-
$[10] =
|
|
129
|
+
$[10] = t7;
|
|
128
130
|
} else {
|
|
129
|
-
|
|
131
|
+
t7 = $[10];
|
|
130
132
|
}
|
|
131
|
-
let
|
|
132
|
-
if ($[11] !== box || $[12] !== capabilities || $[13] !== menus.referenceChips || $[14] !== menus.skillNames || $[15] !== notice.setNotice || $[16] !==
|
|
133
|
-
|
|
133
|
+
let t8;
|
|
134
|
+
if ($[11] !== box || $[12] !== capabilities || $[13] !== menus.referenceChips || $[14] !== menus.skillNames || $[15] !== notice.setNotice || $[16] !== t6 || $[17] !== t7 || $[18] !== writable) {
|
|
135
|
+
t8 = {
|
|
134
136
|
capabilities,
|
|
135
|
-
providerName:
|
|
137
|
+
providerName: t6,
|
|
136
138
|
writable,
|
|
137
139
|
draft: box,
|
|
138
140
|
inputRef,
|
|
139
141
|
setNotice: notice.setNotice,
|
|
140
142
|
skills: menus.skillNames,
|
|
141
|
-
referables:
|
|
143
|
+
referables: t7,
|
|
142
144
|
referenceChips: menus.referenceChips
|
|
143
145
|
};
|
|
144
146
|
$[11] = box;
|
|
@@ -146,17 +148,17 @@ export function Composer(t0) {
|
|
|
146
148
|
$[13] = menus.referenceChips;
|
|
147
149
|
$[14] = menus.skillNames;
|
|
148
150
|
$[15] = notice.setNotice;
|
|
149
|
-
$[16] =
|
|
150
|
-
$[17] =
|
|
151
|
+
$[16] = t6;
|
|
152
|
+
$[17] = t7;
|
|
151
153
|
$[18] = writable;
|
|
152
|
-
$[19] =
|
|
154
|
+
$[19] = t8;
|
|
153
155
|
} else {
|
|
154
|
-
|
|
156
|
+
t8 = $[19];
|
|
155
157
|
}
|
|
156
|
-
const files = useDraftFiles(
|
|
157
|
-
let
|
|
158
|
+
const files = useDraftFiles(t8);
|
|
159
|
+
let t9;
|
|
158
160
|
if ($[20] !== chatId || $[21] !== info || $[22] !== notice || $[23] !== onRetarget) {
|
|
159
|
-
|
|
161
|
+
t9 = {
|
|
160
162
|
chatId,
|
|
161
163
|
info,
|
|
162
164
|
notice,
|
|
@@ -166,26 +168,26 @@ export function Composer(t0) {
|
|
|
166
168
|
$[21] = info;
|
|
167
169
|
$[22] = notice;
|
|
168
170
|
$[23] = onRetarget;
|
|
169
|
-
$[24] =
|
|
171
|
+
$[24] = t9;
|
|
170
172
|
} else {
|
|
171
|
-
|
|
173
|
+
t9 = $[24];
|
|
172
174
|
}
|
|
173
|
-
const controls = useChatControls(
|
|
174
|
-
let
|
|
175
|
+
const controls = useChatControls(t9);
|
|
176
|
+
let t10;
|
|
175
177
|
if ($[25] !== info.selection || $[26] !== provider?.models) {
|
|
176
|
-
|
|
178
|
+
t10 = provider?.models.find(entry_0 => entry_0.slug === info.selection.model);
|
|
177
179
|
$[25] = info.selection;
|
|
178
180
|
$[26] = provider?.models;
|
|
179
|
-
$[27] =
|
|
181
|
+
$[27] = t10;
|
|
180
182
|
} else {
|
|
181
|
-
|
|
183
|
+
t10 = $[27];
|
|
182
184
|
}
|
|
183
|
-
let
|
|
184
|
-
if ($[28] !== chatId || $[29] !== controls || $[30] !== info || $[31] !== notice.setNotice || $[32] !==
|
|
185
|
-
|
|
185
|
+
let t11;
|
|
186
|
+
if ($[28] !== chatId || $[29] !== controls || $[30] !== info || $[31] !== notice.setNotice || $[32] !== t10 || $[33] !== writable) {
|
|
187
|
+
t11 = {
|
|
186
188
|
chatId,
|
|
187
189
|
info,
|
|
188
|
-
model:
|
|
190
|
+
model: t10,
|
|
189
191
|
writable,
|
|
190
192
|
controls,
|
|
191
193
|
setNotice: notice.setNotice
|
|
@@ -194,21 +196,21 @@ export function Composer(t0) {
|
|
|
194
196
|
$[29] = controls;
|
|
195
197
|
$[30] = info;
|
|
196
198
|
$[31] = notice.setNotice;
|
|
197
|
-
$[32] =
|
|
199
|
+
$[32] = t10;
|
|
198
200
|
$[33] = writable;
|
|
199
|
-
$[34] =
|
|
201
|
+
$[34] = t11;
|
|
200
202
|
} else {
|
|
201
|
-
|
|
203
|
+
t11 = $[34];
|
|
202
204
|
}
|
|
203
|
-
useEffortStepper(
|
|
205
|
+
useEffortStepper(t11);
|
|
204
206
|
const guard = promptGuard(withQuote(draft.quote, draft.text));
|
|
205
207
|
const continuable = useContinuableTurn(chatId, info);
|
|
206
208
|
const [sentFor, setSentFor] = useState(null);
|
|
207
209
|
const extraPrompts = useHostExtraPrompts(scope.id, chatId);
|
|
208
210
|
const sendActions = useHostComposerSendActions(scope.id, chatId);
|
|
209
|
-
let
|
|
211
|
+
let t12;
|
|
210
212
|
if ($[35] !== continuable || $[36] !== onSend) {
|
|
211
|
-
|
|
213
|
+
t12 = (text, extras) => {
|
|
212
214
|
setSentFor(continuable);
|
|
213
215
|
const sent = onSend(text, extras);
|
|
214
216
|
Promise.resolve(sent).then(taken => {
|
|
@@ -223,9 +225,9 @@ export function Composer(t0) {
|
|
|
223
225
|
};
|
|
224
226
|
$[35] = continuable;
|
|
225
227
|
$[36] = onSend;
|
|
226
|
-
$[37] =
|
|
228
|
+
$[37] = t12;
|
|
227
229
|
} else {
|
|
228
|
-
|
|
230
|
+
t12 = $[37];
|
|
229
231
|
}
|
|
230
232
|
const {
|
|
231
233
|
submit,
|
|
@@ -245,131 +247,133 @@ export function Composer(t0) {
|
|
|
245
247
|
hold,
|
|
246
248
|
inputRef,
|
|
247
249
|
setNotice: notice.setNotice,
|
|
248
|
-
onSend:
|
|
250
|
+
onSend: t12
|
|
249
251
|
});
|
|
250
|
-
let
|
|
252
|
+
let t13;
|
|
251
253
|
if ($[38] !== history) {
|
|
252
|
-
|
|
254
|
+
t13 = () => {
|
|
253
255
|
history.forget();
|
|
254
256
|
inputRef.current?.focus();
|
|
255
257
|
};
|
|
256
258
|
$[38] = history;
|
|
257
|
-
$[39] =
|
|
259
|
+
$[39] = t13;
|
|
258
260
|
} else {
|
|
259
|
-
|
|
261
|
+
t13 = $[39];
|
|
260
262
|
}
|
|
261
|
-
let
|
|
262
|
-
if ($[40] !== box || $[41] !== chatId || $[42] !== notice.setNotice || $[43] !==
|
|
263
|
-
|
|
263
|
+
let t14;
|
|
264
|
+
if ($[40] !== box || $[41] !== chatId || $[42] !== notice.setNotice || $[43] !== t13) {
|
|
265
|
+
t14 = {
|
|
264
266
|
chatId,
|
|
265
267
|
draft: box,
|
|
266
268
|
setNotice: notice.setNotice,
|
|
267
|
-
onTaken:
|
|
269
|
+
onTaken: t13
|
|
268
270
|
};
|
|
269
271
|
$[40] = box;
|
|
270
272
|
$[41] = chatId;
|
|
271
273
|
$[42] = notice.setNotice;
|
|
272
|
-
$[43] =
|
|
273
|
-
$[44] =
|
|
274
|
+
$[43] = t13;
|
|
275
|
+
$[44] = t14;
|
|
274
276
|
} else {
|
|
275
|
-
|
|
277
|
+
t14 = $[44];
|
|
276
278
|
}
|
|
277
279
|
const {
|
|
278
280
|
takingBack,
|
|
279
281
|
takeBack
|
|
280
|
-
} = useTakeBack(
|
|
282
|
+
} = useTakeBack(t14);
|
|
281
283
|
const pending = usePendingRequests(chatId);
|
|
282
284
|
const compactionOffer = useCompactionOffer(chatId, info, capabilities?.compaction);
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
if ($[45] !== chatId || $[46] !== disabled || $[47] !== menus.hasSkills || $[48] !== readOnly || $[49] !==
|
|
286
|
-
|
|
285
|
+
const t15 = capabilities?.mentions !== false;
|
|
286
|
+
let t16;
|
|
287
|
+
if ($[45] !== chatId || $[46] !== disabled || $[47] !== menus.hasSkills || $[48] !== readOnly || $[49] !== t15) {
|
|
288
|
+
t16 = {
|
|
287
289
|
chatId,
|
|
288
290
|
disabled,
|
|
289
291
|
readOnly,
|
|
290
|
-
mentionable:
|
|
292
|
+
mentionable: t15,
|
|
291
293
|
hasSkills: menus.hasSkills
|
|
292
294
|
};
|
|
293
295
|
$[45] = chatId;
|
|
294
296
|
$[46] = disabled;
|
|
295
297
|
$[47] = menus.hasSkills;
|
|
296
298
|
$[48] = readOnly;
|
|
297
|
-
$[49] =
|
|
298
|
-
$[50] =
|
|
299
|
+
$[49] = t15;
|
|
300
|
+
$[50] = t16;
|
|
299
301
|
} else {
|
|
300
|
-
|
|
302
|
+
t16 = $[50];
|
|
301
303
|
}
|
|
302
|
-
const placeholder = useHintedPlaceholder(
|
|
303
|
-
let
|
|
304
|
-
if ($[51] !== draft.mentions || $[52] !== draft.skills || $[53] !== menus.referenceChips) {
|
|
305
|
-
|
|
304
|
+
const placeholder = useHintedPlaceholder(t16);
|
|
305
|
+
let t17;
|
|
306
|
+
if ($[51] !== draft.mentions || $[52] !== draft.skills || $[53] !== host.ReferenceIcon || $[54] !== menus.referenceChips) {
|
|
307
|
+
t17 = chipDecorations({
|
|
306
308
|
mentions: draft.mentions,
|
|
307
309
|
skills: draft.skills,
|
|
308
|
-
references: menus.referenceChips
|
|
310
|
+
references: menus.referenceChips,
|
|
311
|
+
referenceIcon: host.ReferenceIcon
|
|
309
312
|
});
|
|
310
313
|
$[51] = draft.mentions;
|
|
311
314
|
$[52] = draft.skills;
|
|
312
|
-
$[53] =
|
|
313
|
-
$[54] =
|
|
314
|
-
|
|
315
|
-
t16 = $[54];
|
|
316
|
-
}
|
|
317
|
-
let t17;
|
|
318
|
-
if ($[55] !== t16) {
|
|
319
|
-
t17 = [t16, LEAVE_DROPS_TO_THE_CARD];
|
|
320
|
-
$[55] = t16;
|
|
321
|
-
$[56] = t17;
|
|
315
|
+
$[53] = host.ReferenceIcon;
|
|
316
|
+
$[54] = menus.referenceChips;
|
|
317
|
+
$[55] = t17;
|
|
322
318
|
} else {
|
|
323
|
-
t17 = $[
|
|
319
|
+
t17 = $[55];
|
|
324
320
|
}
|
|
325
|
-
const editorExtensions = t17;
|
|
326
321
|
let t18;
|
|
327
|
-
if ($[
|
|
328
|
-
t18 =
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
322
|
+
if ($[56] !== t17) {
|
|
323
|
+
t18 = [t17, LEAVE_DROPS_TO_THE_CARD];
|
|
324
|
+
$[56] = t17;
|
|
325
|
+
$[57] = t18;
|
|
331
326
|
} else {
|
|
332
|
-
t18 = $[
|
|
327
|
+
t18 = $[57];
|
|
333
328
|
}
|
|
334
|
-
const
|
|
329
|
+
const editorExtensions = t18;
|
|
335
330
|
let t19;
|
|
336
|
-
if ($[
|
|
337
|
-
t19 =
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
331
|
+
if ($[58] !== chatId) {
|
|
332
|
+
t19 = () => timelineAtEnd(chatId);
|
|
333
|
+
$[58] = chatId;
|
|
334
|
+
$[59] = t19;
|
|
340
335
|
} else {
|
|
341
|
-
t19 = $[
|
|
336
|
+
t19 = $[59];
|
|
342
337
|
}
|
|
343
|
-
const
|
|
338
|
+
const atEnd = useSyncExternalStore(subscribeTimelineEnd, t19, _temp3);
|
|
344
339
|
let t20;
|
|
345
|
-
if ($[
|
|
346
|
-
t20 =
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
340
|
+
if ($[60] !== info.queue) {
|
|
341
|
+
t20 = info.queue ?? [];
|
|
342
|
+
$[60] = info.queue;
|
|
343
|
+
$[61] = t20;
|
|
349
344
|
} else {
|
|
350
|
-
t20 = $[
|
|
345
|
+
t20 = $[61];
|
|
351
346
|
}
|
|
352
|
-
const
|
|
347
|
+
const queue = t20;
|
|
353
348
|
let t21;
|
|
349
|
+
if ($[62] !== draft) {
|
|
350
|
+
t21 = isEmptyDraft(draft);
|
|
351
|
+
$[62] = draft;
|
|
352
|
+
$[63] = t21;
|
|
353
|
+
} else {
|
|
354
|
+
t21 = $[63];
|
|
355
|
+
}
|
|
356
|
+
const empty = t21;
|
|
354
357
|
let t22;
|
|
355
|
-
|
|
356
|
-
|
|
358
|
+
let t23;
|
|
359
|
+
if ($[64] !== focused) {
|
|
360
|
+
t22 = () => {
|
|
357
361
|
if (focused) {
|
|
358
362
|
inputRef.current?.focus();
|
|
359
363
|
}
|
|
360
364
|
};
|
|
361
|
-
|
|
362
|
-
$[
|
|
363
|
-
$[64] = t21;
|
|
365
|
+
t23 = [focused];
|
|
366
|
+
$[64] = focused;
|
|
364
367
|
$[65] = t22;
|
|
368
|
+
$[66] = t23;
|
|
365
369
|
} else {
|
|
366
|
-
t21 = $[64];
|
|
367
370
|
t22 = $[65];
|
|
371
|
+
t23 = $[66];
|
|
368
372
|
}
|
|
369
|
-
useEffect(
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
373
|
+
useEffect(t22, t23);
|
|
374
|
+
let t24;
|
|
375
|
+
if ($[67] !== chatId || $[68] !== draft.text || $[69] !== files.noteKey || $[70] !== history || $[71] !== host || $[72] !== menus || $[73] !== sendKey || $[74] !== submit || $[75] !== toggleStash) {
|
|
376
|
+
t24 = composerKeyHandler({
|
|
373
377
|
chatId,
|
|
374
378
|
host,
|
|
375
379
|
sendKey,
|
|
@@ -380,40 +384,40 @@ export function Composer(t0) {
|
|
|
380
384
|
toggleStash,
|
|
381
385
|
submit
|
|
382
386
|
});
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
} else {
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
const onKeyDown =
|
|
387
|
+
$[67] = chatId;
|
|
388
|
+
$[68] = draft.text;
|
|
389
|
+
$[69] = files.noteKey;
|
|
390
|
+
$[70] = history;
|
|
391
|
+
$[71] = host;
|
|
392
|
+
$[72] = menus;
|
|
393
|
+
$[73] = sendKey;
|
|
394
|
+
$[74] = submit;
|
|
395
|
+
$[75] = toggleStash;
|
|
396
|
+
$[76] = t24;
|
|
397
|
+
} else {
|
|
398
|
+
t24 = $[76];
|
|
399
|
+
}
|
|
400
|
+
const onKeyDown = t24;
|
|
397
401
|
const pointSurface = _temp4;
|
|
398
|
-
let
|
|
399
|
-
if ($[
|
|
400
|
-
|
|
402
|
+
let t25;
|
|
403
|
+
if ($[77] !== writable) {
|
|
404
|
+
t25 = event_0 => {
|
|
401
405
|
if (!writable || event_0.button !== 0 || event_0.defaultPrevented || surfacePartOf(event_0.target, event_0.currentTarget) !== "surface") {
|
|
402
406
|
return;
|
|
403
407
|
}
|
|
404
408
|
event_0.preventDefault();
|
|
405
409
|
inputRef.current?.setCaret(Infinity);
|
|
406
410
|
};
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
411
|
+
$[77] = writable;
|
|
412
|
+
$[78] = t25;
|
|
409
413
|
} else {
|
|
410
|
-
|
|
414
|
+
t25 = $[78];
|
|
411
415
|
}
|
|
412
|
-
const pressSurface =
|
|
413
|
-
const
|
|
414
|
-
let
|
|
415
|
-
if ($[
|
|
416
|
-
|
|
416
|
+
const pressSurface = t25;
|
|
417
|
+
const t26 = "chat-composer-content pointer-events-none relative z-10 w-full";
|
|
418
|
+
let t27;
|
|
419
|
+
if ($[79] !== atEnd || $[80] !== chatId || $[81] !== readOnly || $[82] !== t) {
|
|
420
|
+
t27 = !atEnd && !readOnly && /*#__PURE__*/_jsx("div", {
|
|
417
421
|
className: "absolute inset-x-0 bottom-full mb-2 flex justify-center",
|
|
418
422
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
419
423
|
label: t("composer.jumpToEnd"),
|
|
@@ -430,470 +434,464 @@ export function Composer(t0) {
|
|
|
430
434
|
})
|
|
431
435
|
})
|
|
432
436
|
});
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
437
|
+
$[79] = atEnd;
|
|
438
|
+
$[80] = chatId;
|
|
439
|
+
$[81] = readOnly;
|
|
440
|
+
$[82] = t;
|
|
441
|
+
$[83] = t27;
|
|
438
442
|
} else {
|
|
439
|
-
|
|
443
|
+
t27 = $[83];
|
|
440
444
|
}
|
|
441
|
-
let
|
|
442
|
-
if ($[
|
|
443
|
-
|
|
444
|
-
chatId: chatId
|
|
445
|
+
let t28;
|
|
446
|
+
if ($[84] !== chatId || $[85] !== workflowPill) {
|
|
447
|
+
t28 = /*#__PURE__*/_jsx(ChatActivity, {
|
|
448
|
+
chatId: chatId,
|
|
449
|
+
workflows: workflowPill
|
|
445
450
|
});
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
451
|
+
$[84] = chatId;
|
|
452
|
+
$[85] = workflowPill;
|
|
453
|
+
$[86] = t28;
|
|
448
454
|
} else {
|
|
449
|
-
|
|
455
|
+
t28 = $[86];
|
|
450
456
|
}
|
|
451
|
-
const
|
|
452
|
-
let
|
|
453
|
-
if ($[
|
|
454
|
-
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
+
const t29 = files.dragging ? "border-accent bg-[color-mix(in_srgb,var(--accent-soft)_60%,var(--surface-raised))]" : "border-border bg-[color-mix(in_srgb,var(--surface-raised)_92%,transparent)]";
|
|
458
|
+
let t30;
|
|
459
|
+
if ($[87] !== t29) {
|
|
460
|
+
t30 = clsx("@container/composer pointer-events-auto flex flex-col overflow-hidden rounded-2xl border shadow-float backdrop-blur-[14px] focus-ring-within", t29);
|
|
461
|
+
$[87] = t29;
|
|
462
|
+
$[88] = t30;
|
|
457
463
|
} else {
|
|
458
|
-
|
|
464
|
+
t30 = $[88];
|
|
459
465
|
}
|
|
460
|
-
const
|
|
461
|
-
let
|
|
462
|
-
if ($[
|
|
463
|
-
|
|
466
|
+
const t31 = files.dropTarget;
|
|
467
|
+
let t32;
|
|
468
|
+
if ($[89] !== chatId || $[90] !== focused || $[91] !== host.ComposerHeaderSlot || $[92] !== scope.id || $[93] !== writable) {
|
|
469
|
+
t32 = host.ComposerHeaderSlot && /*#__PURE__*/_jsx(host.ComposerHeaderSlot, {
|
|
464
470
|
scopeId: scope.id,
|
|
465
471
|
chatId: chatId,
|
|
466
472
|
disabled: !writable,
|
|
467
473
|
focused: focused
|
|
468
474
|
});
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
+
$[89] = chatId;
|
|
476
|
+
$[90] = focused;
|
|
477
|
+
$[91] = host.ComposerHeaderSlot;
|
|
478
|
+
$[92] = scope.id;
|
|
479
|
+
$[93] = writable;
|
|
480
|
+
$[94] = t32;
|
|
475
481
|
} else {
|
|
476
|
-
|
|
482
|
+
t32 = $[94];
|
|
477
483
|
}
|
|
478
484
|
const T0 = PromptComposer;
|
|
479
|
-
const
|
|
480
|
-
const
|
|
481
|
-
let
|
|
482
|
-
if ($[
|
|
483
|
-
|
|
484
|
-
$[
|
|
485
|
+
const t33 = !empty;
|
|
486
|
+
const t34 = capabilities?.denyReason === true;
|
|
487
|
+
let t35;
|
|
488
|
+
if ($[95] === Symbol.for("react.memo_cache_sentinel")) {
|
|
489
|
+
t35 = () => inputRef.current?.focus();
|
|
490
|
+
$[95] = t35;
|
|
485
491
|
} else {
|
|
486
|
-
|
|
492
|
+
t35 = $[95];
|
|
487
493
|
}
|
|
488
|
-
const
|
|
489
|
-
let
|
|
490
|
-
if ($[
|
|
491
|
-
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
+
const t36 = writable && "data-[text-cursor]:cursor-text";
|
|
495
|
+
let t37;
|
|
496
|
+
if ($[96] !== t36) {
|
|
497
|
+
t37 = clsx(t36);
|
|
498
|
+
$[96] = t36;
|
|
499
|
+
$[97] = t37;
|
|
494
500
|
} else {
|
|
495
|
-
|
|
501
|
+
t37 = $[97];
|
|
496
502
|
}
|
|
497
|
-
let
|
|
498
|
-
if ($[
|
|
499
|
-
|
|
503
|
+
let t38;
|
|
504
|
+
if ($[98] !== chatId || $[99] !== info) {
|
|
505
|
+
t38 = /*#__PURE__*/_jsx(LimitDock, {
|
|
500
506
|
chatId: chatId,
|
|
501
507
|
info: info
|
|
502
508
|
});
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
509
|
+
$[98] = chatId;
|
|
510
|
+
$[99] = info;
|
|
511
|
+
$[100] = t38;
|
|
506
512
|
} else {
|
|
507
|
-
|
|
513
|
+
t38 = $[100];
|
|
508
514
|
}
|
|
509
|
-
const
|
|
510
|
-
let
|
|
511
|
-
if ($[
|
|
512
|
-
|
|
515
|
+
const t39 = capabilities?.goals;
|
|
516
|
+
let t40;
|
|
517
|
+
if ($[101] !== chatId || $[102] !== info || $[103] !== t39) {
|
|
518
|
+
t40 = /*#__PURE__*/_jsx(GoalDock, {
|
|
513
519
|
chatId: chatId,
|
|
514
520
|
info: info,
|
|
515
|
-
goals:
|
|
521
|
+
goals: t39
|
|
516
522
|
});
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
523
|
+
$[101] = chatId;
|
|
524
|
+
$[102] = info;
|
|
525
|
+
$[103] = t39;
|
|
526
|
+
$[104] = t40;
|
|
521
527
|
} else {
|
|
522
|
-
|
|
528
|
+
t40 = $[104];
|
|
523
529
|
}
|
|
524
|
-
let
|
|
525
|
-
if ($[
|
|
526
|
-
|
|
530
|
+
let t41;
|
|
531
|
+
if ($[105] !== chatId || $[106] !== compactionOffer || $[107] !== controls.compact || $[108] !== scope) {
|
|
532
|
+
t41 = compactionOffer && /*#__PURE__*/_jsx(ResumeCompactionDock, {
|
|
527
533
|
tokens: compactionOffer.tokens,
|
|
528
534
|
reason: compactionOffer.reason,
|
|
529
535
|
onCompact: controls.compact,
|
|
530
536
|
onDismiss: () => dismissResumeCompaction(scope, chatId, compactionOffer.turnId)
|
|
531
537
|
});
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
538
|
+
$[105] = chatId;
|
|
539
|
+
$[106] = compactionOffer;
|
|
540
|
+
$[107] = controls.compact;
|
|
541
|
+
$[108] = scope;
|
|
542
|
+
$[109] = t41;
|
|
537
543
|
} else {
|
|
538
|
-
|
|
544
|
+
t41 = $[109];
|
|
539
545
|
}
|
|
540
|
-
let
|
|
541
|
-
if ($[
|
|
542
|
-
|
|
546
|
+
let t42;
|
|
547
|
+
if ($[110] !== menus) {
|
|
548
|
+
t42 = /*#__PURE__*/_jsx(ComposerMenu, {
|
|
543
549
|
menus: menus
|
|
544
550
|
});
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
551
|
+
$[110] = menus;
|
|
552
|
+
$[111] = t42;
|
|
547
553
|
} else {
|
|
548
|
-
|
|
554
|
+
t42 = $[111];
|
|
549
555
|
}
|
|
550
|
-
let
|
|
551
|
-
if ($[
|
|
552
|
-
|
|
556
|
+
let t43;
|
|
557
|
+
if ($[112] !== chatId || $[113] !== info.queuePaused || $[114] !== queue || $[115] !== takeBack || $[116] !== takingBack) {
|
|
558
|
+
t43 = queue.length > 0 && /*#__PURE__*/_jsx(QueuedMessages, {
|
|
553
559
|
chatId: chatId,
|
|
554
560
|
queue: queue,
|
|
555
561
|
paused: info.queuePaused === true,
|
|
556
562
|
takingBack: takingBack !== null,
|
|
557
563
|
onEdit: message => void takeBack(message)
|
|
558
564
|
});
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
+
$[112] = chatId;
|
|
566
|
+
$[113] = info.queuePaused;
|
|
567
|
+
$[114] = queue;
|
|
568
|
+
$[115] = takeBack;
|
|
569
|
+
$[116] = takingBack;
|
|
570
|
+
$[117] = t43;
|
|
565
571
|
} else {
|
|
566
|
-
|
|
572
|
+
t43 = $[117];
|
|
567
573
|
}
|
|
568
|
-
let
|
|
569
|
-
if ($[
|
|
570
|
-
|
|
574
|
+
let t44;
|
|
575
|
+
if ($[118] !== box.removeQuote || $[119] !== chatId || $[120] !== draft.quote || $[121] !== draft.quoteSource || $[122] !== notice || $[123] !== t) {
|
|
576
|
+
t44 = draft.quote !== "" && /*#__PURE__*/_jsx(DraftQuote, {
|
|
571
577
|
chatId: chatId,
|
|
572
578
|
quote: draft.quote,
|
|
573
579
|
source: draft.quoteSource,
|
|
574
580
|
onRemove: box.removeQuote,
|
|
575
581
|
onSourceGone: () => notice.setNotice(t("rows.user.quoteGone"), "info")
|
|
576
582
|
});
|
|
577
|
-
$[
|
|
578
|
-
$[
|
|
579
|
-
$[
|
|
580
|
-
$[
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
} else {
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
let
|
|
588
|
-
if ($[
|
|
589
|
-
|
|
583
|
+
$[118] = box.removeQuote;
|
|
584
|
+
$[119] = chatId;
|
|
585
|
+
$[120] = draft.quote;
|
|
586
|
+
$[121] = draft.quoteSource;
|
|
587
|
+
$[122] = notice;
|
|
588
|
+
$[123] = t;
|
|
589
|
+
$[124] = t44;
|
|
590
|
+
} else {
|
|
591
|
+
t44 = $[124];
|
|
592
|
+
}
|
|
593
|
+
let t45;
|
|
594
|
+
if ($[125] !== box.removeAttachment || $[126] !== draft.attachments) {
|
|
595
|
+
t45 = draft.attachments.length > 0 && /*#__PURE__*/_jsx(DraftAttachments, {
|
|
590
596
|
attachments: draft.attachments,
|
|
591
597
|
onRemove: box.removeAttachment
|
|
592
598
|
});
|
|
593
|
-
$[
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
599
|
+
$[125] = box.removeAttachment;
|
|
600
|
+
$[126] = draft.attachments;
|
|
601
|
+
$[127] = t45;
|
|
596
602
|
} else {
|
|
597
|
-
|
|
603
|
+
t45 = $[127];
|
|
598
604
|
}
|
|
599
|
-
const
|
|
600
|
-
let
|
|
601
|
-
if ($[
|
|
602
|
-
|
|
605
|
+
const t46 = !writable;
|
|
606
|
+
let t47;
|
|
607
|
+
if ($[128] !== box || $[129] !== history || $[130] !== hold || $[131] !== menus) {
|
|
608
|
+
t47 = (value, selection, state) => {
|
|
603
609
|
hold.noteInput();
|
|
604
610
|
box.setText(value);
|
|
605
611
|
menus.setMenuIndex(0);
|
|
606
612
|
menus.trackTriggers(value, selection, state);
|
|
607
613
|
history.edited(value);
|
|
608
614
|
};
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
615
|
+
$[128] = box;
|
|
616
|
+
$[129] = history;
|
|
617
|
+
$[130] = hold;
|
|
618
|
+
$[131] = menus;
|
|
619
|
+
$[132] = t47;
|
|
614
620
|
} else {
|
|
615
|
-
|
|
621
|
+
t47 = $[132];
|
|
616
622
|
}
|
|
617
|
-
let
|
|
618
|
-
if ($[
|
|
619
|
-
|
|
623
|
+
let t48;
|
|
624
|
+
if ($[133] !== hold || $[134] !== menus) {
|
|
625
|
+
t48 = () => {
|
|
620
626
|
menus.close();
|
|
621
627
|
hold.release("blur");
|
|
622
628
|
};
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
629
|
+
$[133] = hold;
|
|
630
|
+
$[134] = menus;
|
|
631
|
+
$[135] = t48;
|
|
626
632
|
} else {
|
|
627
|
-
|
|
633
|
+
t48 = $[135];
|
|
628
634
|
}
|
|
629
|
-
let
|
|
630
|
-
if ($[
|
|
631
|
-
|
|
635
|
+
let t49;
|
|
636
|
+
if ($[136] !== dictationToolbar || $[137] !== draft.text || $[138] !== editorExtensions || $[139] !== files.onCopy || $[140] !== files.onPaste || $[141] !== focused || $[142] !== hold.setComposing || $[143] !== menus.inputAria || $[144] !== menus.trackTriggers || $[145] !== onKeyDown || $[146] !== placeholder || $[147] !== t46 || $[148] !== t47 || $[149] !== t48) {
|
|
637
|
+
t49 = /*#__PURE__*/_jsx(ComposerInput, {
|
|
632
638
|
ref: inputRef,
|
|
633
639
|
dictationToolbar: dictationToolbar,
|
|
634
640
|
className: "composer-input select-text text-sm leading-normal text-text",
|
|
635
641
|
value: draft.text,
|
|
636
642
|
placeholder: placeholder,
|
|
637
|
-
disabled:
|
|
643
|
+
disabled: t46,
|
|
638
644
|
tabbable: focused,
|
|
639
645
|
extensions: editorExtensions,
|
|
640
646
|
aria: menus.inputAria,
|
|
641
|
-
onChange:
|
|
647
|
+
onChange: t47,
|
|
642
648
|
onSelectionChange: menus.trackTriggers,
|
|
643
|
-
onBlur:
|
|
649
|
+
onBlur: t48,
|
|
644
650
|
onComposing: hold.setComposing,
|
|
645
651
|
onKeyDown: onKeyDown,
|
|
646
652
|
onPaste: files.onPaste,
|
|
647
653
|
onCopy: files.onCopy
|
|
648
654
|
});
|
|
649
|
-
$[
|
|
650
|
-
$[
|
|
651
|
-
$[
|
|
652
|
-
$[
|
|
653
|
-
$[
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
656
|
-
$[
|
|
657
|
-
$[
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
} else {
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
let
|
|
668
|
-
if ($[
|
|
669
|
-
|
|
655
|
+
$[136] = dictationToolbar;
|
|
656
|
+
$[137] = draft.text;
|
|
657
|
+
$[138] = editorExtensions;
|
|
658
|
+
$[139] = files.onCopy;
|
|
659
|
+
$[140] = files.onPaste;
|
|
660
|
+
$[141] = focused;
|
|
661
|
+
$[142] = hold.setComposing;
|
|
662
|
+
$[143] = menus.inputAria;
|
|
663
|
+
$[144] = menus.trackTriggers;
|
|
664
|
+
$[145] = onKeyDown;
|
|
665
|
+
$[146] = placeholder;
|
|
666
|
+
$[147] = t46;
|
|
667
|
+
$[148] = t47;
|
|
668
|
+
$[149] = t48;
|
|
669
|
+
$[150] = t49;
|
|
670
|
+
} else {
|
|
671
|
+
t49 = $[150];
|
|
672
|
+
}
|
|
673
|
+
let t50;
|
|
674
|
+
if ($[151] !== notice.notice || $[152] !== notice.tone) {
|
|
675
|
+
t50 = notice.notice && /*#__PURE__*/_jsx("div", {
|
|
670
676
|
className: clsx("px-5 pb-1 text-xs @max-md/composer:px-3.5", notice.tone === "error" ? "text-status-error" : "text-text-muted"),
|
|
671
677
|
role: notice.tone === "error" ? "alert" : "status",
|
|
672
678
|
children: notice.notice
|
|
673
679
|
});
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
676
|
-
$[
|
|
680
|
+
$[151] = notice.notice;
|
|
681
|
+
$[152] = notice.tone;
|
|
682
|
+
$[153] = t50;
|
|
677
683
|
} else {
|
|
678
|
-
|
|
684
|
+
t50 = $[153];
|
|
679
685
|
}
|
|
680
|
-
const
|
|
686
|
+
const t51 = guard.visible && /*#__PURE__*/_jsxs("div", {
|
|
681
687
|
className: clsx("px-5 pb-1 text-right text-xs tabular-nums @max-md/composer:px-3.5", guard.tooLong ? "text-status-error" : "text-text-faint"),
|
|
682
688
|
children: [formatNumber(guard.count), " / ", formatNumber(PROMPT_MAX_CHARS), guard.tooLong && ` ${t("composer.tooLong")}`]
|
|
683
689
|
});
|
|
684
690
|
const T1 = ComposerControls;
|
|
685
|
-
const
|
|
686
|
-
const
|
|
687
|
-
const
|
|
688
|
-
const
|
|
689
|
-
let t55;
|
|
690
|
-
if ($[152] !== draft.text || $[153] !== sendKey) {
|
|
691
|
-
t55 = sendShortcut(sendKey, draft.text.includes("\n"));
|
|
692
|
-
$[152] = draft.text;
|
|
693
|
-
$[153] = sendKey;
|
|
694
|
-
$[154] = t55;
|
|
695
|
-
} else {
|
|
696
|
-
t55 = $[154];
|
|
697
|
-
}
|
|
691
|
+
const t52 = capabilities?.attachments !== false;
|
|
692
|
+
const t53 = !busy || !empty;
|
|
693
|
+
const t54 = empty || !writable || guard.tooLong;
|
|
694
|
+
const t55 = t(sendLabelKey(busy, steerable, sendDelivery));
|
|
698
695
|
let t56;
|
|
699
|
-
if ($[155] !==
|
|
700
|
-
t56 =
|
|
701
|
-
$[
|
|
696
|
+
if ($[154] !== draft.text || $[155] !== sendKey) {
|
|
697
|
+
t56 = sendShortcut(sendKey, draft.text.includes("\n"));
|
|
698
|
+
$[154] = draft.text;
|
|
699
|
+
$[155] = sendKey;
|
|
702
700
|
$[156] = t56;
|
|
703
701
|
} else {
|
|
704
702
|
t56 = $[156];
|
|
705
703
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
$[157] = draft.quote;
|
|
712
|
-
$[158] = draft.text;
|
|
713
|
-
$[159] = t59;
|
|
704
|
+
let t57;
|
|
705
|
+
if ($[157] !== submit) {
|
|
706
|
+
t57 = alternate => submit(alternate ? "alternate" : "default");
|
|
707
|
+
$[157] = submit;
|
|
708
|
+
$[158] = t57;
|
|
714
709
|
} else {
|
|
715
|
-
|
|
710
|
+
t57 = $[158];
|
|
716
711
|
}
|
|
712
|
+
const t58 = continuable !== null && continuable !== sentFor && empty && writable && pending.length === 0 && extraPrompts.length === 0 ? continueTurn : null;
|
|
713
|
+
const t59 = scope.id;
|
|
717
714
|
let t60;
|
|
718
|
-
if ($[
|
|
719
|
-
t60 =
|
|
720
|
-
|
|
715
|
+
if ($[159] !== draft.quote || $[160] !== draft.text) {
|
|
716
|
+
t60 = withQuote(draft.quote, draft.text.trim());
|
|
717
|
+
$[159] = draft.quote;
|
|
718
|
+
$[160] = draft.text;
|
|
719
|
+
$[161] = t60;
|
|
720
|
+
} else {
|
|
721
|
+
t60 = $[161];
|
|
722
|
+
}
|
|
723
|
+
let t61;
|
|
724
|
+
if ($[162] !== chatId || $[163] !== info.provider || $[164] !== info.runtimeMode || $[165] !== info.selection || $[166] !== scope.id || $[167] !== t60) {
|
|
725
|
+
t61 = {
|
|
726
|
+
scopeId: t59,
|
|
721
727
|
chatId,
|
|
722
|
-
text:
|
|
728
|
+
text: t60,
|
|
723
729
|
provider: info.provider,
|
|
724
730
|
selection: info.selection,
|
|
725
731
|
runtimeMode: info.runtimeMode
|
|
726
732
|
};
|
|
727
|
-
$[
|
|
728
|
-
$[
|
|
729
|
-
$[
|
|
730
|
-
$[
|
|
731
|
-
$[
|
|
732
|
-
$[
|
|
733
|
-
$[
|
|
733
|
+
$[162] = chatId;
|
|
734
|
+
$[163] = info.provider;
|
|
735
|
+
$[164] = info.runtimeMode;
|
|
736
|
+
$[165] = info.selection;
|
|
737
|
+
$[166] = scope.id;
|
|
738
|
+
$[167] = t60;
|
|
739
|
+
$[168] = t61;
|
|
734
740
|
} else {
|
|
735
|
-
|
|
741
|
+
t61 = $[168];
|
|
736
742
|
}
|
|
737
|
-
let
|
|
738
|
-
if ($[
|
|
739
|
-
|
|
740
|
-
visible:
|
|
741
|
-
disabled:
|
|
742
|
-
label:
|
|
743
|
-
kbd:
|
|
744
|
-
onSend:
|
|
745
|
-
onContinue:
|
|
743
|
+
let t62;
|
|
744
|
+
if ($[169] !== sendActions || $[170] !== t53 || $[171] !== t54 || $[172] !== t55 || $[173] !== t56 || $[174] !== t57 || $[175] !== t58 || $[176] !== t61) {
|
|
745
|
+
t62 = {
|
|
746
|
+
visible: t53,
|
|
747
|
+
disabled: t54,
|
|
748
|
+
label: t55,
|
|
749
|
+
kbd: t56,
|
|
750
|
+
onSend: t57,
|
|
751
|
+
onContinue: t58,
|
|
746
752
|
actions: sendActions,
|
|
747
|
-
draft:
|
|
753
|
+
draft: t61
|
|
748
754
|
};
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
753
|
-
$[
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
757
|
-
$[
|
|
758
|
-
} else {
|
|
759
|
-
|
|
755
|
+
$[169] = sendActions;
|
|
756
|
+
$[170] = t53;
|
|
757
|
+
$[171] = t54;
|
|
758
|
+
$[172] = t55;
|
|
759
|
+
$[173] = t56;
|
|
760
|
+
$[174] = t57;
|
|
761
|
+
$[175] = t58;
|
|
762
|
+
$[176] = t61;
|
|
763
|
+
$[177] = t62;
|
|
764
|
+
} else {
|
|
765
|
+
t62 = $[177];
|
|
760
766
|
}
|
|
761
|
-
let
|
|
762
|
-
if ($[
|
|
763
|
-
|
|
767
|
+
let t63;
|
|
768
|
+
if ($[178] !== files) {
|
|
769
|
+
t63 = picked => {
|
|
764
770
|
files.addFiles(picked);
|
|
765
771
|
inputRef.current?.focus();
|
|
766
772
|
};
|
|
767
|
-
$[
|
|
768
|
-
$[
|
|
773
|
+
$[178] = files;
|
|
774
|
+
$[179] = t63;
|
|
769
775
|
} else {
|
|
770
|
-
|
|
776
|
+
t63 = $[179];
|
|
771
777
|
}
|
|
772
|
-
let
|
|
773
|
-
if ($[
|
|
774
|
-
|
|
778
|
+
let t64;
|
|
779
|
+
if ($[180] !== writable) {
|
|
780
|
+
t64 = added => {
|
|
775
781
|
if (writable) {
|
|
776
782
|
inputRef.current?.insert(added);
|
|
777
783
|
}
|
|
778
784
|
};
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
785
|
+
$[180] = writable;
|
|
786
|
+
$[181] = t64;
|
|
781
787
|
} else {
|
|
782
|
-
|
|
788
|
+
t64 = $[181];
|
|
783
789
|
}
|
|
784
|
-
let
|
|
785
|
-
if ($[
|
|
786
|
-
|
|
790
|
+
let t65;
|
|
791
|
+
if ($[182] !== T1 || $[183] !== chatId || $[184] !== controls || $[185] !== info || $[186] !== providerFixed || $[187] !== restoreStashed || $[188] !== setDictationToolbar || $[189] !== t52 || $[190] !== t62 || $[191] !== t63 || $[192] !== t64 || $[193] !== writable) {
|
|
792
|
+
t65 = /*#__PURE__*/_jsx(T1, {
|
|
787
793
|
chatId: chatId,
|
|
788
794
|
info: info,
|
|
789
795
|
providerFixed: providerFixed,
|
|
790
796
|
writable: writable,
|
|
791
|
-
attachable:
|
|
797
|
+
attachable: t52,
|
|
792
798
|
controls: controls,
|
|
793
|
-
send:
|
|
799
|
+
send: t62,
|
|
794
800
|
dictationToolbar: setDictationToolbar,
|
|
795
|
-
onFiles:
|
|
801
|
+
onFiles: t63,
|
|
796
802
|
onRestore: restoreStashed,
|
|
797
|
-
insert:
|
|
803
|
+
insert: t64
|
|
798
804
|
});
|
|
799
|
-
$[
|
|
800
|
-
$[
|
|
801
|
-
$[
|
|
802
|
-
$[
|
|
803
|
-
$[
|
|
804
|
-
$[
|
|
805
|
-
$[
|
|
806
|
-
$[
|
|
807
|
-
$[
|
|
808
|
-
$[
|
|
809
|
-
$[190] = t63;
|
|
810
|
-
$[191] = writable;
|
|
805
|
+
$[182] = T1;
|
|
806
|
+
$[183] = chatId;
|
|
807
|
+
$[184] = controls;
|
|
808
|
+
$[185] = info;
|
|
809
|
+
$[186] = providerFixed;
|
|
810
|
+
$[187] = restoreStashed;
|
|
811
|
+
$[188] = setDictationToolbar;
|
|
812
|
+
$[189] = t52;
|
|
813
|
+
$[190] = t62;
|
|
814
|
+
$[191] = t63;
|
|
811
815
|
$[192] = t64;
|
|
816
|
+
$[193] = writable;
|
|
817
|
+
$[194] = t65;
|
|
812
818
|
} else {
|
|
813
|
-
|
|
819
|
+
t65 = $[194];
|
|
814
820
|
}
|
|
815
|
-
let
|
|
816
|
-
if ($[
|
|
817
|
-
|
|
818
|
-
className:
|
|
821
|
+
let t66;
|
|
822
|
+
if ($[195] !== pointSurface || $[196] !== pressSurface || $[197] !== t37 || $[198] !== t38 || $[199] !== t40 || $[200] !== t41 || $[201] !== t42 || $[202] !== t43 || $[203] !== t44 || $[204] !== t45 || $[205] !== t49 || $[206] !== t50 || $[207] !== t51 || $[208] !== t65) {
|
|
823
|
+
t66 = /*#__PURE__*/_jsxs("div", {
|
|
824
|
+
className: t37,
|
|
819
825
|
onPointerOver: pointSurface,
|
|
820
826
|
onMouseDown: pressSurface,
|
|
821
|
-
children: [
|
|
827
|
+
children: [t38, t40, t41, t42, t43, t44, t45, t49, t50, t51, t65]
|
|
822
828
|
});
|
|
823
|
-
$[
|
|
824
|
-
$[
|
|
825
|
-
$[
|
|
826
|
-
$[
|
|
827
|
-
$[
|
|
828
|
-
$[
|
|
829
|
-
$[
|
|
830
|
-
$[
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
833
|
-
$[
|
|
834
|
-
$[
|
|
835
|
-
$[
|
|
836
|
-
$[
|
|
837
|
-
$[
|
|
838
|
-
} else {
|
|
839
|
-
|
|
829
|
+
$[195] = pointSurface;
|
|
830
|
+
$[196] = pressSurface;
|
|
831
|
+
$[197] = t37;
|
|
832
|
+
$[198] = t38;
|
|
833
|
+
$[199] = t40;
|
|
834
|
+
$[200] = t41;
|
|
835
|
+
$[201] = t42;
|
|
836
|
+
$[202] = t43;
|
|
837
|
+
$[203] = t44;
|
|
838
|
+
$[204] = t45;
|
|
839
|
+
$[205] = t49;
|
|
840
|
+
$[206] = t50;
|
|
841
|
+
$[207] = t51;
|
|
842
|
+
$[208] = t65;
|
|
843
|
+
$[209] = t66;
|
|
844
|
+
} else {
|
|
845
|
+
t66 = $[209];
|
|
840
846
|
}
|
|
841
|
-
let
|
|
842
|
-
if ($[
|
|
843
|
-
|
|
847
|
+
let t67;
|
|
848
|
+
if ($[210] !== T0 || $[211] !== answerPromptsElsewhere || $[212] !== chatId || $[213] !== disabled || $[214] !== focused || $[215] !== hold || $[216] !== pending || $[217] !== t33 || $[218] !== t34 || $[219] !== t35 || $[220] !== t66) {
|
|
849
|
+
t67 = /*#__PURE__*/_jsx(T0, {
|
|
844
850
|
chatId: chatId,
|
|
845
851
|
pending: pending,
|
|
846
852
|
focused: focused,
|
|
847
853
|
onShowElsewhere: answerPromptsElsewhere,
|
|
848
854
|
disabled: disabled,
|
|
849
|
-
hasDraft:
|
|
850
|
-
denyReason:
|
|
851
|
-
onAllAnswered:
|
|
855
|
+
hasDraft: t33,
|
|
856
|
+
denyReason: t34,
|
|
857
|
+
onAllAnswered: t35,
|
|
852
858
|
hold: hold,
|
|
853
|
-
children:
|
|
859
|
+
children: t66
|
|
854
860
|
});
|
|
855
|
-
$[
|
|
856
|
-
$[
|
|
857
|
-
$[
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
861
|
-
$[
|
|
862
|
-
$[
|
|
863
|
-
$[
|
|
864
|
-
$[
|
|
865
|
-
$[
|
|
866
|
-
$[
|
|
867
|
-
} else {
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
let
|
|
871
|
-
if ($[
|
|
872
|
-
|
|
873
|
-
className:
|
|
874
|
-
...
|
|
875
|
-
children: [
|
|
861
|
+
$[210] = T0;
|
|
862
|
+
$[211] = answerPromptsElsewhere;
|
|
863
|
+
$[212] = chatId;
|
|
864
|
+
$[213] = disabled;
|
|
865
|
+
$[214] = focused;
|
|
866
|
+
$[215] = hold;
|
|
867
|
+
$[216] = pending;
|
|
868
|
+
$[217] = t33;
|
|
869
|
+
$[218] = t34;
|
|
870
|
+
$[219] = t35;
|
|
871
|
+
$[220] = t66;
|
|
872
|
+
$[221] = t67;
|
|
873
|
+
} else {
|
|
874
|
+
t67 = $[221];
|
|
875
|
+
}
|
|
876
|
+
let t68;
|
|
877
|
+
if ($[222] !== files.dropTarget || $[223] !== t30 || $[224] !== t32 || $[225] !== t67) {
|
|
878
|
+
t68 = /*#__PURE__*/_jsxs("div", {
|
|
879
|
+
className: t30,
|
|
880
|
+
...t31,
|
|
881
|
+
children: [t32, t67]
|
|
876
882
|
});
|
|
877
|
-
$[
|
|
878
|
-
$[
|
|
879
|
-
$[
|
|
880
|
-
$[
|
|
881
|
-
$[
|
|
883
|
+
$[222] = files.dropTarget;
|
|
884
|
+
$[223] = t30;
|
|
885
|
+
$[224] = t32;
|
|
886
|
+
$[225] = t67;
|
|
887
|
+
$[226] = t68;
|
|
882
888
|
} else {
|
|
883
|
-
|
|
884
|
-
}
|
|
885
|
-
const t68 = controls.confirmClear;
|
|
886
|
-
let t69;
|
|
887
|
-
if ($[225] !== t) {
|
|
888
|
-
t69 = t("composer.clear.title");
|
|
889
|
-
$[225] = t;
|
|
890
|
-
$[226] = t69;
|
|
891
|
-
} else {
|
|
892
|
-
t69 = $[226];
|
|
889
|
+
t68 = $[226];
|
|
893
890
|
}
|
|
891
|
+
const t69 = controls.confirmClear;
|
|
894
892
|
let t70;
|
|
895
893
|
if ($[227] !== t) {
|
|
896
|
-
t70 = t("composer.clear.
|
|
894
|
+
t70 = t("composer.clear.title");
|
|
897
895
|
$[227] = t;
|
|
898
896
|
$[228] = t70;
|
|
899
897
|
} else {
|
|
@@ -901,7 +899,7 @@ export function Composer(t0) {
|
|
|
901
899
|
}
|
|
902
900
|
let t71;
|
|
903
901
|
if ($[229] !== t) {
|
|
904
|
-
t71 = t("composer.clear.
|
|
902
|
+
t71 = t("composer.clear.description");
|
|
905
903
|
$[229] = t;
|
|
906
904
|
$[230] = t71;
|
|
907
905
|
} else {
|
|
@@ -909,50 +907,58 @@ export function Composer(t0) {
|
|
|
909
907
|
}
|
|
910
908
|
let t72;
|
|
911
909
|
if ($[231] !== t) {
|
|
912
|
-
t72 = t("composer.
|
|
910
|
+
t72 = t("composer.clear.confirm");
|
|
913
911
|
$[231] = t;
|
|
914
912
|
$[232] = t72;
|
|
915
913
|
} else {
|
|
916
914
|
t72 = $[232];
|
|
917
915
|
}
|
|
918
916
|
let t73;
|
|
919
|
-
if ($[233] !==
|
|
920
|
-
t73 =
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
917
|
+
if ($[233] !== t) {
|
|
918
|
+
t73 = t("composer.notice.clearFailed");
|
|
919
|
+
$[233] = t;
|
|
920
|
+
$[234] = t73;
|
|
921
|
+
} else {
|
|
922
|
+
t73 = $[234];
|
|
923
|
+
}
|
|
924
|
+
let t74;
|
|
925
|
+
if ($[235] !== controls.cancelClear || $[236] !== controls.confirmClear || $[237] !== controls.forceClearThread || $[238] !== t70 || $[239] !== t71 || $[240] !== t72 || $[241] !== t73) {
|
|
926
|
+
t74 = /*#__PURE__*/_jsx(PromptDialog, {
|
|
927
|
+
open: t69,
|
|
928
|
+
title: t70,
|
|
929
|
+
description: t71,
|
|
930
|
+
confirmLabel: t72,
|
|
925
931
|
danger: true,
|
|
926
|
-
fallbackMessage:
|
|
932
|
+
fallbackMessage: t73,
|
|
927
933
|
onConfirm: controls.forceClearThread,
|
|
928
934
|
onOpenChange: controls.cancelClear
|
|
929
935
|
});
|
|
930
|
-
$[
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
933
|
-
$[
|
|
934
|
-
$[
|
|
935
|
-
$[
|
|
936
|
-
$[
|
|
937
|
-
$[
|
|
938
|
-
} else {
|
|
939
|
-
|
|
940
|
-
}
|
|
941
|
-
let
|
|
942
|
-
if ($[
|
|
943
|
-
|
|
944
|
-
className:
|
|
945
|
-
children: [
|
|
936
|
+
$[235] = controls.cancelClear;
|
|
937
|
+
$[236] = controls.confirmClear;
|
|
938
|
+
$[237] = controls.forceClearThread;
|
|
939
|
+
$[238] = t70;
|
|
940
|
+
$[239] = t71;
|
|
941
|
+
$[240] = t72;
|
|
942
|
+
$[241] = t73;
|
|
943
|
+
$[242] = t74;
|
|
944
|
+
} else {
|
|
945
|
+
t74 = $[242];
|
|
946
|
+
}
|
|
947
|
+
let t75;
|
|
948
|
+
if ($[243] !== t27 || $[244] !== t28 || $[245] !== t68 || $[246] !== t74) {
|
|
949
|
+
t75 = /*#__PURE__*/_jsxs("div", {
|
|
950
|
+
className: t26,
|
|
951
|
+
children: [t27, t28, t68, t74]
|
|
946
952
|
});
|
|
947
|
-
$[
|
|
948
|
-
$[
|
|
949
|
-
$[
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
953
|
+
$[243] = t27;
|
|
954
|
+
$[244] = t28;
|
|
955
|
+
$[245] = t68;
|
|
956
|
+
$[246] = t74;
|
|
957
|
+
$[247] = t75;
|
|
952
958
|
} else {
|
|
953
|
-
|
|
959
|
+
t75 = $[247];
|
|
954
960
|
}
|
|
955
|
-
return
|
|
961
|
+
return t75;
|
|
956
962
|
}
|
|
957
963
|
function _temp4(event) {
|
|
958
964
|
event.currentTarget.toggleAttribute("data-text-cursor", surfacePartOf(event.target, event.currentTarget) !== "action");
|