@adecore/agents-react 0.66.4 → 0.66.6

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.
@@ -41,6 +41,13 @@ export function limitView(info, now) {
41
41
  })
42
42
  };
43
43
  }
44
+ if (limit.resetsAt !== undefined && limit.resetsAt <= now) {
45
+ return {
46
+ pill: i18next.t('agent-chat:limit.usage.pillReset'),
47
+ title,
48
+ detail: i18next.t('agent-chat:limit.usage.reset')
49
+ };
50
+ }
44
51
  if (limit.resetsAt !== undefined) {
45
52
  const resets = formatMoment(limit.resetsAt, now);
46
53
  return {
@@ -1,6 +1,7 @@
1
1
  /*
2
- * What a file dragged out of an app's own list of files carries: the paths, space separated, relative
3
- * to the folder. The composer takes it next to the image files it already accepts.
2
+ * What a file dragged out of an app's own list of files carries: the paths as a JSON array, relative
3
+ * to the folder, so a path with a space stays whole. The composer takes it next to the image files it
4
+ * already accepts.
4
5
  */
5
6
  export const MENTION_DRAG_TYPE = 'application/x-adecore-mention';
6
7
  export const LEGACY_MENTION_DRAG_TYPE = 'application/x-ruimte-mention';
@@ -8,12 +9,23 @@ const MENTION_DRAG_TYPES = [MENTION_DRAG_TYPE, LEGACY_MENTION_DRAG_TYPE];
8
9
  export function carriesMentions(types) {
9
10
  return MENTION_DRAG_TYPES.some(type => types.includes(type));
10
11
  }
11
- export function droppedMentions(data) {
12
- const text = data.getData(MENTION_DRAG_TYPE) || data.getData(LEGACY_MENTION_DRAG_TYPE);
12
+ /* A drag from a build before the JSON array spelled the paths space separated, which is still read. */
13
+ function pathList(text) {
14
+ try {
15
+ const parsed = JSON.parse(text);
16
+ if (Array.isArray(parsed)) {
17
+ return parsed.filter(path => typeof path === 'string' && path !== '');
18
+ }
19
+ } catch {
20
+ // Not JSON, so the older form.
21
+ }
13
22
  return text.trim() === '' ? [] : text.trim().split(/\s+/);
14
23
  }
24
+ export function droppedMentions(data) {
25
+ return pathList(data.getData(MENTION_DRAG_TYPE) || data.getData(LEGACY_MENTION_DRAG_TYPE));
26
+ }
15
27
  export function writeMentionDrag(data, paths, legacy = true) {
16
- const text = paths.join(' ');
28
+ const text = JSON.stringify(paths);
17
29
  data.setData(MENTION_DRAG_TYPE, text);
18
30
  if (legacy) {
19
31
  data.setData(LEGACY_MENTION_DRAG_TYPE, text);
@@ -127,7 +127,7 @@ function ResumeAtResetToggle(t0) {
127
127
  */
128
128
  function _temp() {}
129
129
  function ContinueOn(t0) {
130
- const $ = _c(67);
130
+ const $ = _c(71);
131
131
  const {
132
132
  chatId,
133
133
  info,
@@ -218,7 +218,7 @@ function ContinueOn(t0) {
218
218
  const t9 = split && "rounded-r-none";
219
219
  let t10;
220
220
  if ($[17] !== t9) {
221
- t10 = clsx("shrink-0 gap-1.5 whitespace-nowrap", t9);
221
+ t10 = clsx("min-w-0 gap-1.5 whitespace-nowrap", t9);
222
222
  $[17] = t9;
223
223
  $[18] = t10;
224
224
  } else {
@@ -245,184 +245,206 @@ function ContinueOn(t0) {
245
245
  t13 = $[23];
246
246
  }
247
247
  let t14;
248
- if ($[24] !== target_0.account.color) {
249
- t14 = /*#__PURE__*/_jsx(AccountDot, {
250
- color: target_0.account.color,
251
- className: "size-1.75"
248
+ if ($[24] !== t13) {
249
+ t14 = /*#__PURE__*/_jsx("span", {
250
+ className: "shrink-0",
251
+ children: t13
252
252
  });
253
- $[24] = target_0.account.color;
253
+ $[24] = t13;
254
254
  $[25] = t14;
255
255
  } else {
256
256
  t14 = $[25];
257
257
  }
258
258
  let t15;
259
- if ($[26] !== T1 || $[27] !== busy || $[28] !== name || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t14) {
260
- t15 = /*#__PURE__*/_jsxs(T1, {
259
+ if ($[26] !== target_0.account.color) {
260
+ t15 = /*#__PURE__*/_jsx(AccountDot, {
261
+ color: target_0.account.color,
262
+ className: "size-1.75 shrink-0"
263
+ });
264
+ $[26] = target_0.account.color;
265
+ $[27] = t15;
266
+ } else {
267
+ t15 = $[27];
268
+ }
269
+ let t16;
270
+ if ($[28] !== name) {
271
+ t16 = /*#__PURE__*/_jsx("span", {
272
+ className: "truncate",
273
+ children: name
274
+ });
275
+ $[28] = name;
276
+ $[29] = t16;
277
+ } else {
278
+ t16 = $[29];
279
+ }
280
+ let t17;
281
+ if ($[30] !== T1 || $[31] !== busy || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t14 || $[36] !== t15 || $[37] !== t16) {
282
+ t17 = /*#__PURE__*/_jsxs(T1, {
261
283
  variant: t7,
262
284
  size: t8,
263
285
  className: t10,
264
286
  disabled: busy,
265
287
  "aria-label": t11,
266
288
  onClick: t12,
267
- children: [t13, t14, name]
289
+ children: [t14, t15, t16]
268
290
  });
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;
291
+ $[30] = T1;
292
+ $[31] = busy;
293
+ $[32] = t10;
294
+ $[33] = t11;
295
+ $[34] = t12;
296
+ $[35] = t14;
297
+ $[36] = t15;
298
+ $[37] = t16;
299
+ $[38] = t17;
278
300
  } else {
279
- t15 = $[34];
301
+ t17 = $[38];
280
302
  }
281
- let t16;
282
- if ($[35] !== T0 || $[36] !== t15 || $[37] !== t6) {
283
- t16 = /*#__PURE__*/_jsx(T0, {
303
+ let t18;
304
+ if ($[39] !== T0 || $[40] !== t17 || $[41] !== t6) {
305
+ t18 = /*#__PURE__*/_jsx(T0, {
284
306
  label: t6,
285
- children: t15
307
+ children: t17
286
308
  });
287
- $[35] = T0;
288
- $[36] = t15;
289
- $[37] = t6;
290
- $[38] = t16;
309
+ $[39] = T0;
310
+ $[40] = t17;
311
+ $[41] = t6;
312
+ $[42] = t18;
291
313
  } else {
292
- t16 = $[38];
314
+ t18 = $[42];
293
315
  }
294
- const suggestion = t16;
316
+ const suggestion = t18;
295
317
  if (!split) {
296
318
  return suggestion;
297
319
  }
298
- let t17;
299
- if ($[39] !== t) {
300
- t17 = t("limit.chooseAccount");
301
- $[39] = t;
302
- $[40] = t17;
320
+ let t19;
321
+ if ($[43] !== t) {
322
+ t19 = t("limit.chooseAccount");
323
+ $[43] = t;
324
+ $[44] = t19;
303
325
  } else {
304
- t17 = $[40];
326
+ t19 = $[44];
305
327
  }
306
- let t18;
307
- if ($[41] !== busy) {
308
- t18 = /*#__PURE__*/_jsx(Button, {
328
+ let t20;
329
+ if ($[45] !== busy) {
330
+ t20 = /*#__PURE__*/_jsx(Button, {
309
331
  variant: "secondary",
310
332
  size: "sm",
311
333
  className: "-ml-px rounded-l-none border-l-0 px-1.5",
312
334
  disabled: busy
313
335
  });
314
- $[41] = busy;
315
- $[42] = t18;
336
+ $[45] = busy;
337
+ $[46] = t20;
316
338
  } else {
317
- t18 = $[42];
339
+ t20 = $[46];
318
340
  }
319
- let t19;
320
- if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
321
- t19 = /*#__PURE__*/_jsx(Icon, {
341
+ let t21;
342
+ if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
343
+ t21 = /*#__PURE__*/_jsx(Icon, {
322
344
  icon: ChevronDown,
323
345
  size: 14
324
346
  });
325
- $[43] = t19;
326
- } else {
327
- t19 = $[43];
328
- }
329
- let t20;
330
- if ($[44] !== t18) {
331
- t20 = /*#__PURE__*/_jsx(Menu.Trigger, {
332
- render: t18,
333
- children: t19
334
- });
335
- $[44] = t18;
336
- $[45] = t20;
337
- } else {
338
- t20 = $[45];
339
- }
340
- let t21;
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
- $[48] = t21;
347
+ $[47] = t21;
350
348
  } else {
351
- t21 = $[48];
349
+ t21 = $[47];
352
350
  }
353
351
  let t22;
354
- if ($[49] !== t) {
355
- t22 = t("limit.continueOn");
356
- $[49] = t;
357
- $[50] = t22;
352
+ if ($[48] !== t20) {
353
+ t22 = /*#__PURE__*/_jsx(Menu.Trigger, {
354
+ render: t20,
355
+ children: t21
356
+ });
357
+ $[48] = t20;
358
+ $[49] = t22;
358
359
  } else {
359
- t22 = $[50];
360
+ t22 = $[49];
360
361
  }
361
362
  let t23;
362
- if ($[51] !== t22) {
363
- t23 = /*#__PURE__*/_jsx(Menu.GroupLabel, {
363
+ if ($[50] !== t19 || $[51] !== t22) {
364
+ t23 = /*#__PURE__*/_jsx(Tooltip, {
365
+ label: t19,
366
+ name: true,
364
367
  children: t22
365
368
  });
369
+ $[50] = t19;
366
370
  $[51] = t22;
367
371
  $[52] = t23;
368
372
  } else {
369
373
  t23 = $[52];
370
374
  }
371
375
  let t24;
372
- if ($[53] !== choice || $[54] !== go || $[55] !== info || $[56] !== targets) {
373
- t24 = /*#__PURE__*/_jsx(ContinueOnRows, {
376
+ if ($[53] !== t) {
377
+ t24 = t("limit.continueOn");
378
+ $[53] = t;
379
+ $[54] = t24;
380
+ } else {
381
+ t24 = $[54];
382
+ }
383
+ let t25;
384
+ if ($[55] !== t24) {
385
+ t25 = /*#__PURE__*/_jsx(Menu.GroupLabel, {
386
+ children: t24
387
+ });
388
+ $[55] = t24;
389
+ $[56] = t25;
390
+ } else {
391
+ t25 = $[56];
392
+ }
393
+ let t26;
394
+ if ($[57] !== choice || $[58] !== go || $[59] !== info || $[60] !== targets) {
395
+ t26 = /*#__PURE__*/_jsx(ContinueOnRows, {
374
396
  targets: targets,
375
397
  info: info,
376
398
  choice: choice,
377
399
  onPick: go
378
400
  });
379
- $[53] = choice;
380
- $[54] = go;
381
- $[55] = info;
382
- $[56] = targets;
383
- $[57] = t24;
401
+ $[57] = choice;
402
+ $[58] = go;
403
+ $[59] = info;
404
+ $[60] = targets;
405
+ $[61] = t26;
384
406
  } else {
385
- t24 = $[57];
407
+ t26 = $[61];
386
408
  }
387
- let t25;
388
- if ($[58] !== t23 || $[59] !== t24) {
389
- t25 = /*#__PURE__*/_jsx(Menu.Popup, {
409
+ let t27;
410
+ if ($[62] !== t25 || $[63] !== t26) {
411
+ t27 = /*#__PURE__*/_jsx(Menu.Popup, {
390
412
  align: "end",
391
413
  className: "min-w-64",
392
414
  children: /*#__PURE__*/_jsxs(Menu.Group, {
393
- children: [t23, t24]
415
+ children: [t25, t26]
394
416
  })
395
417
  });
396
- $[58] = t23;
397
- $[59] = t24;
398
- $[60] = t25;
399
- } else {
400
- t25 = $[60];
401
- }
402
- let t26;
403
- if ($[61] !== t21 || $[62] !== t25) {
404
- t26 = /*#__PURE__*/_jsxs(Menu.Root, {
405
- children: [t21, t25]
406
- });
407
- $[61] = t21;
408
418
  $[62] = t25;
409
419
  $[63] = t26;
420
+ $[64] = t27;
410
421
  } else {
411
- t26 = $[63];
422
+ t27 = $[64];
412
423
  }
413
- let t27;
414
- if ($[64] !== suggestion || $[65] !== t26) {
415
- t27 = /*#__PURE__*/_jsxs(ButtonGroup, {
416
- className: "shrink-0",
417
- children: [suggestion, t26]
424
+ let t28;
425
+ if ($[65] !== t23 || $[66] !== t27) {
426
+ t28 = /*#__PURE__*/_jsxs(Menu.Root, {
427
+ children: [t23, t27]
418
428
  });
419
- $[64] = suggestion;
420
- $[65] = t26;
429
+ $[65] = t23;
421
430
  $[66] = t27;
431
+ $[67] = t28;
422
432
  } else {
423
- t27 = $[66];
433
+ t28 = $[67];
424
434
  }
425
- return t27;
435
+ let t29;
436
+ if ($[68] !== suggestion || $[69] !== t28) {
437
+ t29 = /*#__PURE__*/_jsxs(ButtonGroup, {
438
+ className: "min-w-0",
439
+ children: [suggestion, t28]
440
+ });
441
+ $[68] = suggestion;
442
+ $[69] = t28;
443
+ $[70] = t29;
444
+ } else {
445
+ t29 = $[70];
446
+ }
447
+ return t29;
426
448
  }
427
449
  /* Mounted only while the menu is open, so the clock of the session lines only ticks while someone reads them. */
428
450
  function ContinueOnRows(t0) {
@@ -497,7 +519,7 @@ function ContinueOnRows(t0) {
497
519
  }
498
520
  /* At the top of the composer while the last turn stopped on a limit: what stopped it, when it goes on, and the switch. */
499
521
  export function LimitDock(t0) {
500
- const $ = _c(29);
522
+ const $ = _c(31);
501
523
  const {
502
524
  chatId,
503
525
  info
@@ -567,8 +589,11 @@ export function LimitDock(t0) {
567
589
  let t6;
568
590
  if ($[10] !== t4 || $[11] !== t5) {
569
591
  t6 = /*#__PURE__*/_jsxs("span", {
570
- className: "flex min-w-0 grow flex-col",
571
- children: [t4, t5]
592
+ className: "flex min-w-40 grow basis-0 items-center gap-2",
593
+ children: [t3, /*#__PURE__*/_jsxs("span", {
594
+ className: "flex min-w-0 grow flex-col",
595
+ children: [t4, t5]
596
+ })]
572
597
  });
573
598
  $[10] = t4;
574
599
  $[11] = t5;
@@ -601,7 +626,7 @@ export function LimitDock(t0) {
601
626
  let t9;
602
627
  if ($[19] !== t8) {
603
628
  t9 = /*#__PURE__*/_jsx("span", {
604
- className: "shrink-0 text-xs text-text-muted",
629
+ className: "shrink-0 text-xs text-text-muted @max-lg/composer:hidden",
605
630
  children: t8
606
631
  });
607
632
  $[19] = t8;
@@ -622,20 +647,31 @@ export function LimitDock(t0) {
622
647
  t10 = $[23];
623
648
  }
624
649
  let t11;
625
- if ($[24] !== t10 || $[25] !== t6 || $[26] !== t7 || $[27] !== t9) {
626
- t11 = /*#__PURE__*/_jsxs("div", {
627
- className: "flex items-center gap-2 border-b border-border px-3.5 py-2.5",
628
- children: [t3, t6, t7, t9, t10]
650
+ if ($[24] !== t10 || $[25] !== t7 || $[26] !== t9) {
651
+ t11 = /*#__PURE__*/_jsxs("span", {
652
+ className: "ml-auto flex max-w-full min-w-0 items-center gap-2",
653
+ children: [t7, t9, t10]
629
654
  });
630
655
  $[24] = t10;
631
- $[25] = t6;
632
- $[26] = t7;
633
- $[27] = t9;
656
+ $[25] = t7;
657
+ $[26] = t9;
658
+ $[27] = t11;
659
+ } else {
660
+ t11 = $[27];
661
+ }
662
+ let t12;
663
+ if ($[28] !== t11 || $[29] !== t6) {
664
+ t12 = /*#__PURE__*/_jsxs("div", {
665
+ className: "flex items-center gap-2 border-b border-border px-3.5 py-2.5 @max-md/composer:flex-wrap",
666
+ children: [t6, t11]
667
+ });
634
668
  $[28] = t11;
669
+ $[29] = t6;
670
+ $[30] = t12;
635
671
  } else {
636
- t11 = $[28];
672
+ t12 = $[30];
637
673
  }
638
- return t11;
674
+ return t12;
639
675
  }
640
676
  /* The same state in a chat node's header, read from the status every client gets, so a node nobody opened says it too. */
641
677
  export function LimitPill(t0) {
@@ -83,8 +83,10 @@ declare const _default: {
83
83
  pill: string;
84
84
  pillUntil: string;
85
85
  pillResumes: string;
86
+ pillReset: string;
86
87
  title: string;
87
88
  resets: string;
89
+ reset: string;
88
90
  resumes: string;
89
91
  };
90
92
  overload: {
@@ -83,8 +83,10 @@ export default {
83
83
  pill: 'Limited',
84
84
  pillUntil: 'Limited until {{time}}',
85
85
  pillResumes: 'Resumes {{time}}',
86
+ pillReset: 'Limit reset',
86
87
  title: 'Stopped on a usage limit',
87
88
  resets: 'The limit resets at {{time}}.',
89
+ reset: 'The limit has reset. Send a message to go on.',
88
90
  resumes: 'Resumes at {{time}}.'
89
91
  },
90
92
  overload: {
@@ -83,8 +83,10 @@ declare const _default: {
83
83
  pill: string;
84
84
  pillUntil: string;
85
85
  pillResumes: string;
86
+ pillReset: string;
86
87
  title: string;
87
88
  resets: string;
89
+ reset: string;
88
90
  resumes: string;
89
91
  };
90
92
  overload: {
@@ -83,8 +83,10 @@ export default {
83
83
  pill: 'Limiet bereikt',
84
84
  pillUntil: 'Limiet tot {{time}}',
85
85
  pillResumes: 'Verder om {{time}}',
86
+ pillReset: 'Limiet gereset',
86
87
  title: 'Gestopt op een verbruikslimiet',
87
88
  resets: 'De limiet reset om {{time}}.',
89
+ reset: 'De limiet is gereset. Stuur een bericht om verder te gaan.',
88
90
  resumes: 'Gaat verder om {{time}}.'
89
91
  },
90
92
  overload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agents-react",
3
- "version": "0.66.4",
3
+ "version": "0.66.6",
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.66.4",
76
- "@adecore/editor": "0.66.4",
77
- "@adecore/editor-react": "0.66.4",
78
- "@adecore/intelligent-ui": "0.66.4",
79
- "@adecore/merge": "0.66.4",
80
- "@adecore/utils": "0.66.4",
75
+ "@adecore/agent-contracts": "0.66.6",
76
+ "@adecore/editor": "0.66.6",
77
+ "@adecore/editor-react": "0.66.6",
78
+ "@adecore/intelligent-ui": "0.66.6",
79
+ "@adecore/merge": "0.66.6",
80
+ "@adecore/utils": "0.66.6",
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.66.4",
104
+ "@adecore/ui": "^0.66.6",
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.66.4",
111
+ "@adecore/ui": "0.66.6",
112
112
  "@types/bun": "^1.4.4",
113
113
  "@types/react": "^19.3.0",
114
114
  "@types/react-dom": "^19.3.0",
@@ -46,6 +46,10 @@ export function limitView(info: Pick<ChatThreadInfo, 'limit' | 'resumeAt' | 'act
46
46
  };
47
47
  }
48
48
 
49
+ if (limit.resetsAt !== undefined && limit.resetsAt <= now) {
50
+ return { pill: i18next.t('agent-chat:limit.usage.pillReset'), title, detail: i18next.t('agent-chat:limit.usage.reset') };
51
+ }
52
+
49
53
  if (limit.resetsAt !== undefined) {
50
54
  const resets = formatMoment(limit.resetsAt, now);
51
55
 
@@ -1,6 +1,7 @@
1
1
  /*
2
- * What a file dragged out of an app's own list of files carries: the paths, space separated, relative
3
- * to the folder. The composer takes it next to the image files it already accepts.
2
+ * What a file dragged out of an app's own list of files carries: the paths as a JSON array, relative
3
+ * to the folder, so a path with a space stays whole. The composer takes it next to the image files it
4
+ * already accepts.
4
5
  */
5
6
  export const MENTION_DRAG_TYPE = 'application/x-adecore-mention';
6
7
  export const LEGACY_MENTION_DRAG_TYPE = 'application/x-ruimte-mention';
@@ -10,14 +11,27 @@ export function carriesMentions(types: readonly string[]): boolean {
10
11
  return MENTION_DRAG_TYPES.some((type) => types.includes(type));
11
12
  }
12
13
 
13
- export function droppedMentions(data: Pick<DataTransfer, 'getData'>): string[] {
14
- const text = data.getData(MENTION_DRAG_TYPE) || data.getData(LEGACY_MENTION_DRAG_TYPE);
14
+ /* A drag from a build before the JSON array spelled the paths space separated, which is still read. */
15
+ function pathList(text: string): string[] {
16
+ try {
17
+ const parsed: unknown = JSON.parse(text);
18
+
19
+ if (Array.isArray(parsed)) {
20
+ return parsed.filter((path): path is string => typeof path === 'string' && path !== '');
21
+ }
22
+ } catch {
23
+ // Not JSON, so the older form.
24
+ }
15
25
 
16
26
  return text.trim() === '' ? [] : text.trim().split(/\s+/);
17
27
  }
18
28
 
29
+ export function droppedMentions(data: Pick<DataTransfer, 'getData'>): string[] {
30
+ return pathList(data.getData(MENTION_DRAG_TYPE) || data.getData(LEGACY_MENTION_DRAG_TYPE));
31
+ }
32
+
19
33
  export function writeMentionDrag(data: Pick<DataTransfer, 'setData'>, paths: readonly string[], legacy = true): void {
20
- const text = paths.join(' ');
34
+ const text = JSON.stringify(paths);
21
35
  data.setData(MENTION_DRAG_TYPE, text);
22
36
 
23
37
  if (legacy) {
@@ -121,14 +121,14 @@ function ContinueOn({ chatId, info, choice }: { chatId: string; info: ChatThread
121
121
  <Button
122
122
  variant="secondary"
123
123
  size="sm"
124
- className={clsx('shrink-0 gap-1.5 whitespace-nowrap', split && 'rounded-r-none')}
124
+ className={clsx('min-w-0 gap-1.5 whitespace-nowrap', split && 'rounded-r-none')}
125
125
  disabled={busy}
126
126
  aria-label={t('limit.continueOnAria', { account: name })}
127
127
  onClick={() => go(target)}
128
128
  >
129
- {t('limit.continueOn')}
130
- <AccountDot color={target.account.color} className="size-1.75" />
131
- {name}
129
+ <span className="shrink-0">{t('limit.continueOn')}</span>
130
+ <AccountDot color={target.account.color} className="size-1.75 shrink-0" />
131
+ <span className="truncate">{name}</span>
132
132
  </Button>
133
133
  </Tooltip>
134
134
  );
@@ -138,7 +138,7 @@ function ContinueOn({ chatId, info, choice }: { chatId: string; info: ChatThread
138
138
  }
139
139
 
140
140
  return (
141
- <ButtonGroup className="shrink-0">
141
+ <ButtonGroup className="min-w-0">
142
142
  {suggestion}
143
143
  <Menu.Root>
144
144
  <Tooltip label={t('limit.chooseAccount')} name>
@@ -214,16 +214,24 @@ export function LimitDock({ chatId, info }: { chatId: string; info: ChatThreadIn
214
214
  const account = choice === null ? null : choice.current === null ? choice.currentId : choice.nameOf(choice.current);
215
215
  const detail = account === null ? view.detail : view.detail === null ? account : `${account} · ${view.detail}`;
216
216
 
217
+ /*
218
+ * The title keeps room to name the limit. Narrower, the account name truncates and the switch drops its
219
+ * words, which its tooltip and label still say; only a composer too narrow for even that wraps the actions.
220
+ */
217
221
  return (
218
- <div className="flex items-center gap-2 border-b border-border px-3.5 py-2.5">
219
- <Icon icon={Hourglass} size={16} className="shrink-0 text-text-faint" />
220
- <span className="flex min-w-0 grow flex-col">
221
- <span className="truncate text-sm text-text">{view.title}</span>
222
- {detail !== null && <span className="truncate text-xs tabular-nums text-text-faint">{detail}</span>}
222
+ <div className="flex items-center gap-2 border-b border-border px-3.5 py-2.5 @max-md/composer:flex-wrap">
223
+ <span className="flex min-w-40 grow basis-0 items-center gap-2">
224
+ <Icon icon={Hourglass} size={16} className="shrink-0 text-text-faint" />
225
+ <span className="flex min-w-0 grow flex-col">
226
+ <span className="truncate text-sm text-text">{view.title}</span>
227
+ {detail !== null && <span className="truncate text-xs tabular-nums text-text-faint">{detail}</span>}
228
+ </span>
229
+ </span>
230
+ <span className="ml-auto flex max-w-full min-w-0 items-center gap-2">
231
+ {choice !== null && info.limit?.kind === 'usage' && <ContinueOn chatId={chatId} info={info} choice={choice} />}
232
+ <span className="shrink-0 text-xs text-text-muted @max-lg/composer:hidden">{t('limit.toggle')}</span>
233
+ <ResumeAtResetToggle chatId={chatId} info={info} />
223
234
  </span>
224
- {choice !== null && info.limit?.kind === 'usage' && <ContinueOn chatId={chatId} info={info} choice={choice} />}
225
- <span className="shrink-0 text-xs text-text-muted">{t('limit.toggle')}</span>
226
- <ResumeAtResetToggle chatId={chatId} info={info} />
227
235
  </div>
228
236
  );
229
237
  }
@@ -83,8 +83,10 @@ export default {
83
83
  pill: 'Limited',
84
84
  pillUntil: 'Limited until {{time}}',
85
85
  pillResumes: 'Resumes {{time}}',
86
+ pillReset: 'Limit reset',
86
87
  title: 'Stopped on a usage limit',
87
88
  resets: 'The limit resets at {{time}}.',
89
+ reset: 'The limit has reset. Send a message to go on.',
88
90
  resumes: 'Resumes at {{time}}.'
89
91
  },
90
92
  overload: {
@@ -83,8 +83,10 @@ export default {
83
83
  pill: 'Limiet bereikt',
84
84
  pillUntil: 'Limiet tot {{time}}',
85
85
  pillResumes: 'Verder om {{time}}',
86
+ pillReset: 'Limiet gereset',
86
87
  title: 'Gestopt op een verbruikslimiet',
87
88
  resets: 'De limiet reset om {{time}}.',
89
+ reset: 'De limiet is gereset. Stuur een bericht om verder te gaan.',
88
90
  resumes: 'Gaat verder om {{time}}.'
89
91
  },
90
92
  overload: {