@adecore/agents-react 0.54.11 → 0.54.13

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.
@@ -5,10 +5,9 @@ import clsx from 'clsx';
5
5
  import { LoaderCircle } from 'lucide-react';
6
6
  import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from 'react';
7
7
  import { useTranslation } from 'react-i18next';
8
- import { AgentIcon } from '../../agents/AgentIcon.js';
9
8
  import { useModelName } from '../../agents/model-name.js';
10
9
  import { useChatHost } from '../../host.js';
11
- import { useHostContextSources, useHostHidesFolder, useHostHidesToolCalls, useHostThreadCards, useHostTimelineFind, useHostWelcome } from '../../host-hooks.js';
10
+ import { useHostContextSources, useHostHidesToolCalls, useHostThreadCards, useHostTimelineFind, useHostWelcome } from '../../host-hooks.js';
12
11
  import { useChatScope } from '../../scope.js';
13
12
  import { useChatRow, useChats } from '../../state/chats.js';
14
13
  import { useForkedTurns } from '../forks.js';
@@ -24,6 +23,7 @@ import { openFromMain, useSubagentTrail } from '../subagent-view.js';
24
23
  import { useTimelineFlash } from '../timeline-flash.js';
25
24
  import { registerItemJumper, registerMessageStepper, registerTimeline, registerTurnJumper, setTimelineAtEnd, wantsEarlier } from '../timeline-scroll.js';
26
25
  import { BookmarkMarker } from './BookmarkMarker.js';
26
+ import { ChatEmptyScene } from './ChatEmptyScene.js';
27
27
  import { FileLinkContext } from './file-links.js';
28
28
  import { FindRevealContext } from './find-reveal.js';
29
29
  import { MessageActions } from './MessageActions.js';
@@ -77,12 +77,9 @@ function scrollsWithin(target, boundary, deltaX, deltaY) {
77
77
  }
78
78
  return false;
79
79
  }
80
- /*
81
- * A thread before its first message: which model answers, what the lines into this node let it read,
82
- * and the folder it works in, so a first question can lean on all three.
83
- */
80
+ /* A thread before its first message: which model answers, and what the lines into this node let it read. */
84
81
  function EmptyThread(t0) {
85
- const $ = _c(24);
82
+ const $ = _c(23);
86
83
  const {
87
84
  chatId
88
85
  } = t0;
@@ -95,11 +92,10 @@ function EmptyThread(t0) {
95
92
  const info = useChatRow(chatId, _temp);
96
93
  const model = useModelName(info?.provider, info?.selection.model ?? "");
97
94
  const sources = useHostContextSources(chatId);
98
- const hidesFolder = useHostHidesFolder(chatId);
99
95
  let t1;
100
96
  if ($[0] !== info) {
101
- t1 = info ? /*#__PURE__*/_jsx(AgentIcon, {
102
- kind: info.provider
97
+ t1 = info ? /*#__PURE__*/_jsx(ChatEmptyScene, {
98
+ provider: info.provider
103
99
  }) : undefined;
104
100
  $[0] = info;
105
101
  $[1] = t1;
@@ -110,7 +106,7 @@ function EmptyThread(t0) {
110
106
  if ($[2] !== info || $[3] !== model || $[4] !== t) {
111
107
  t2 = info ? t("timeline.empty.ready", {
112
108
  model
113
- }) : t("timeline.empty.ask");
109
+ }) : undefined;
114
110
  $[2] = info;
115
111
  $[3] = model;
116
112
  $[4] = t;
@@ -119,78 +115,70 @@ function EmptyThread(t0) {
119
115
  t2 = $[5];
120
116
  }
121
117
  let t3;
122
- if ($[6] !== t1 || $[7] !== t2) {
123
- t3 = /*#__PURE__*/_jsx(EmptyState, {
124
- icon: t1,
125
- className: "p-0",
126
- children: t2
127
- });
128
- $[6] = t1;
129
- $[7] = t2;
118
+ if ($[6] !== info || $[7] !== t) {
119
+ t3 = info ? t("timeline.empty.task") : t("timeline.empty.ask");
120
+ $[6] = info;
121
+ $[7] = t;
130
122
  $[8] = t3;
131
123
  } else {
132
124
  t3 = $[8];
133
125
  }
134
126
  let t4;
135
- if ($[9] !== chatId || $[10] !== renderEmptyThread) {
136
- t4 = renderEmptyThread?.(chatId);
137
- $[9] = chatId;
138
- $[10] = renderEmptyThread;
139
- $[11] = t4;
127
+ if ($[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
128
+ t4 = /*#__PURE__*/_jsx(EmptyState, {
129
+ scene: t1,
130
+ title: t2,
131
+ className: "p-0",
132
+ children: t3
133
+ });
134
+ $[9] = t1;
135
+ $[10] = t2;
136
+ $[11] = t3;
137
+ $[12] = t4;
140
138
  } else {
141
- t4 = $[11];
139
+ t4 = $[12];
142
140
  }
143
141
  let t5;
144
- if ($[12] !== sources || $[13] !== t) {
145
- t5 = sources.length > 0 && /*#__PURE__*/_jsxs("div", {
146
- className: "flex max-w-full flex-col items-center gap-1",
147
- children: [/*#__PURE__*/_jsx(SectionLabel, {
148
- children: t("timeline.empty.canRead")
149
- }), /*#__PURE__*/_jsx("span", {
150
- className: "max-w-full text-xs text-text-muted",
151
- children: sources.map(_temp2).join(", ")
152
- })]
153
- });
154
- $[12] = sources;
155
- $[13] = t;
156
- $[14] = t5;
142
+ if ($[13] !== chatId || $[14] !== renderEmptyThread) {
143
+ t5 = renderEmptyThread?.(chatId);
144
+ $[13] = chatId;
145
+ $[14] = renderEmptyThread;
146
+ $[15] = t5;
157
147
  } else {
158
- t5 = $[14];
148
+ t5 = $[15];
159
149
  }
160
150
  let t6;
161
- if ($[15] !== hidesFolder || $[16] !== info || $[17] !== t) {
162
- t6 = info?.cwd && !hidesFolder && /*#__PURE__*/_jsxs("div", {
151
+ if ($[16] !== sources || $[17] !== t) {
152
+ t6 = sources.length > 0 && /*#__PURE__*/_jsxs("div", {
163
153
  className: "flex max-w-full flex-col items-center gap-1",
164
154
  children: [/*#__PURE__*/_jsx(SectionLabel, {
165
- children: t("timeline.empty.worksIn")
155
+ children: t("timeline.empty.canRead")
166
156
  }), /*#__PURE__*/_jsx("span", {
167
- className: "max-w-full font-mono text-xs break-all text-text-muted",
168
- children: info.cwd
157
+ className: "max-w-full text-xs text-text-muted",
158
+ children: sources.map(_temp2).join(", ")
169
159
  })]
170
160
  });
171
- $[15] = hidesFolder;
172
- $[16] = info;
161
+ $[16] = sources;
173
162
  $[17] = t;
174
163
  $[18] = t6;
175
164
  } else {
176
165
  t6 = $[18];
177
166
  }
178
167
  let t7;
179
- if ($[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6) {
168
+ if ($[19] !== t4 || $[20] !== t5 || $[21] !== t6) {
180
169
  t7 = /*#__PURE__*/_jsx("div", {
181
170
  className: "flex grow items-center justify-center",
182
171
  children: /*#__PURE__*/_jsxs("div", {
183
172
  className: "flex max-w-sm flex-col items-center gap-3 px-6 py-8 text-center",
184
- children: [t3, t4, t5, t6]
173
+ children: [t4, t5, t6]
185
174
  })
186
175
  });
187
- $[19] = t3;
188
- $[20] = t4;
189
- $[21] = t5;
190
- $[22] = t6;
191
- $[23] = t7;
176
+ $[19] = t4;
177
+ $[20] = t5;
178
+ $[21] = t6;
179
+ $[22] = t7;
192
180
  } else {
193
- t7 = $[23];
181
+ t7 = $[22];
194
182
  }
195
183
  return t7;
196
184
  }
@@ -1,9 +1,18 @@
1
- interface PlaceholderInput {
1
+ import type { TFunction } from 'i18next';
2
+ interface PlaceholderHint {
3
+ key: string;
4
+ label: string;
5
+ }
6
+ interface HintConditions {
7
+ mentionable: boolean;
8
+ referable: boolean;
9
+ hasSkills: boolean;
10
+ }
11
+ export declare function placeholderHints(t: TFunction<'agent-chat'>, { mentionable, referable, hasSkills }: HintConditions): PlaceholderHint[];
12
+ interface PlaceholderInput extends HintConditions {
2
13
  chatId: string;
3
14
  disabled: boolean;
4
15
  readOnly: boolean;
5
- mentionable: boolean;
6
- hasSkills: boolean;
7
16
  }
8
- export declare function useHintedPlaceholder({ chatId, disabled, readOnly, mentionable, hasSkills }: PlaceholderInput): string | HTMLElement;
17
+ export declare function useHintedPlaceholder({ chatId, disabled, readOnly, mentionable, referable, hasSkills }: PlaceholderInput): string | HTMLElement;
9
18
  export {};
@@ -3,6 +3,26 @@ import { useMemo } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useHostComposerPlaceholder } from '../../../host-hooks.js';
5
5
  import { useChatScope } from '../../../scope.js';
6
+ /* The keys that open a picker in this chat, in the order a person reads them. */
7
+ export function placeholderHints(t, {
8
+ mentionable,
9
+ referable,
10
+ hasSkills
11
+ }) {
12
+ return [{
13
+ key: '/',
14
+ label: t('composer.placeholder.commands')
15
+ }, ...(mentionable ? [{
16
+ key: '@',
17
+ label: t('composer.placeholder.files')
18
+ }] : []), ...(referable ? [{
19
+ key: '#',
20
+ label: t('composer.placeholder.references')
21
+ }] : []), ...(hasSkills ? [{
22
+ key: '$',
23
+ label: t('composer.placeholder.skills')
24
+ }] : [])];
25
+ }
6
26
  /* The empty box names its sigils as key caps, so they read as keys to press rather than as punctuation. */
7
27
  function hintedPlaceholder(lead, joiner, hints) {
8
28
  const root = document.createElement('span');
@@ -11,21 +31,25 @@ function hintedPlaceholder(lead, joiner, hints) {
11
31
  extra.className = 'composer-hints-extra';
12
32
  extra.append(joiner);
13
33
  for (const hint of hints) {
34
+ const pair = document.createElement('span');
35
+ pair.className = hint.key === '#' ? 'composer-hint composer-hint-references' : 'composer-hint';
14
36
  const cap = document.createElement('kbd');
15
37
  cap.textContent = hint.key;
16
- extra.append(cap, hint.label);
38
+ pair.append(cap, hint.label);
39
+ extra.append(pair);
17
40
  }
18
41
  root.append(lead, extra);
19
42
  return root;
20
43
  }
21
44
  /* What the empty box says: why nothing can be written, or the host's words and the keys that open a picker. */
22
45
  export function useHintedPlaceholder(t0) {
23
- const $ = _c(9);
46
+ const $ = _c(10);
24
47
  const {
25
48
  chatId,
26
49
  disabled,
27
50
  readOnly,
28
51
  mentionable,
52
+ referable,
29
53
  hasSkills
30
54
  } = t0;
31
55
  const {
@@ -60,24 +84,20 @@ export function useHintedPlaceholder(t0) {
60
84
  break bb0;
61
85
  }
62
86
  let t2;
63
- if ($[4] !== hasSkills || $[5] !== lead || $[6] !== mentionable || $[7] !== t) {
64
- t2 = hintedPlaceholder(lead ?? t("composer.placeholder.lead"), t("composer.placeholder.joiner"), [{
65
- key: "/",
66
- label: t("composer.placeholder.commands")
67
- }, ...(mentionable ? [{
68
- key: "@",
69
- label: t("composer.placeholder.files")
70
- }] : []), ...(hasSkills ? [{
71
- key: "$",
72
- label: t("composer.placeholder.skills")
73
- }] : [])]);
87
+ if ($[4] !== hasSkills || $[5] !== lead || $[6] !== mentionable || $[7] !== referable || $[8] !== t) {
88
+ t2 = hintedPlaceholder(lead ?? t("composer.placeholder.lead"), t("composer.placeholder.joiner"), placeholderHints(t, {
89
+ mentionable,
90
+ referable,
91
+ hasSkills
92
+ }));
74
93
  $[4] = hasSkills;
75
94
  $[5] = lead;
76
95
  $[6] = mentionable;
77
- $[7] = t;
78
- $[8] = t2;
96
+ $[7] = referable;
97
+ $[8] = t;
98
+ $[9] = t2;
79
99
  } else {
80
- t2 = $[8];
100
+ t2 = $[9];
81
101
  }
82
102
  t1 = t2;
83
103
  }
@@ -37,6 +37,7 @@ export declare function usePromptMenus<D extends PromptDraft>({ draft: { draft,
37
37
  inputAria: Record<string, string>;
38
38
  menuOpen: boolean;
39
39
  hasSkills: boolean;
40
+ offersViews: boolean;
40
41
  skillNames: string[];
41
42
  commandQuery: string | null;
42
43
  commands: ComposerCommand[];
@@ -24,7 +24,7 @@ function sameQuery(left, right) {
24
24
  * follow that one.
25
25
  */
26
26
  export function usePromptMenus(t0) {
27
- const $ = _c(95);
27
+ const $ = _c(96);
28
28
  const {
29
29
  draft: t1,
30
30
  inputRef,
@@ -425,23 +425,25 @@ export function usePromptMenus(t0) {
425
425
  }
426
426
  const moveInMenu = t19;
427
427
  const t20 = skills.length > 0;
428
- let t21;
428
+ const t21 = offersReferences && !referables.chatsOnly;
429
+ let t22;
429
430
  if ($[65] !== skills) {
430
- t21 = skills.map(_temp4);
431
+ t22 = skills.map(_temp4);
431
432
  $[65] = skills;
432
- $[66] = t21;
433
+ $[66] = t22;
433
434
  } else {
434
- t21 = $[66];
435
+ t22 = $[66];
435
436
  }
436
- let t22;
437
- if ($[67] !== activeIndex || $[68] !== chooseMention || $[69] !== chooseMentionAt || $[70] !== chooseReference || $[71] !== chooseReferenceAt || $[72] !== chooseSkill || $[73] !== commandMenuOpen || $[74] !== commandQuery || $[75] !== commands || $[76] !== completeCommand || $[77] !== files_0 || $[78] !== inputAria || $[79] !== listId || $[80] !== mention || $[81] !== mentionCount || $[82] !== mentionMenuOpen || $[83] !== menuOpen || $[84] !== pickCommand || $[85] !== referables || $[86] !== referenceChips || $[87] !== referenceMatches || $[88] !== referenceMenuOpen || $[89] !== skillMatches || $[90] !== skillMenuOpen || $[91] !== t20 || $[92] !== t21 || $[93] !== trackTriggers) {
438
- t22 = {
437
+ let t23;
438
+ if ($[67] !== activeIndex || $[68] !== chooseMention || $[69] !== chooseMentionAt || $[70] !== chooseReference || $[71] !== chooseReferenceAt || $[72] !== chooseSkill || $[73] !== commandMenuOpen || $[74] !== commandQuery || $[75] !== commands || $[76] !== completeCommand || $[77] !== files_0 || $[78] !== inputAria || $[79] !== listId || $[80] !== mention || $[81] !== mentionCount || $[82] !== mentionMenuOpen || $[83] !== menuOpen || $[84] !== pickCommand || $[85] !== referables || $[86] !== referenceChips || $[87] !== referenceMatches || $[88] !== referenceMenuOpen || $[89] !== skillMatches || $[90] !== skillMenuOpen || $[91] !== t20 || $[92] !== t21 || $[93] !== t22 || $[94] !== trackTriggers) {
439
+ t23 = {
439
440
  listId,
440
441
  activeIndex,
441
442
  inputAria,
442
443
  menuOpen,
443
444
  hasSkills: t20,
444
- skillNames: t21,
445
+ offersViews: t21,
446
+ skillNames: t22,
445
447
  commandQuery,
446
448
  commands,
447
449
  commandMenuOpen,
@@ -493,12 +495,13 @@ export function usePromptMenus(t0) {
493
495
  $[90] = skillMenuOpen;
494
496
  $[91] = t20;
495
497
  $[92] = t21;
496
- $[93] = trackTriggers;
497
- $[94] = t22;
498
+ $[93] = t22;
499
+ $[94] = trackTriggers;
500
+ $[95] = t23;
498
501
  } else {
499
- t22 = $[94];
502
+ t23 = $[95];
500
503
  }
501
- return t22;
504
+ return t23;
502
505
  }
503
506
  function _temp4(skill_2) {
504
507
  return skill_2.name;
@@ -255,9 +255,9 @@ declare const _default: {
255
255
  };
256
256
  empty: {
257
257
  ready: string;
258
+ task: string;
258
259
  ask: string;
259
260
  canRead: string;
260
- worksIn: string;
261
261
  };
262
262
  loading: string;
263
263
  loadingEarlier: string;
@@ -376,6 +376,7 @@ declare const _default: {
376
376
  joiner: string;
377
377
  commands: string;
378
378
  files: string;
379
+ references: string;
379
380
  skills: string;
380
381
  readOnly: string;
381
382
  };
@@ -254,10 +254,10 @@ export default {
254
254
  night: 'Still up?'
255
255
  },
256
256
  empty: {
257
- ready: '{{model}} is ready.',
257
+ ready: '{{model}} is ready',
258
+ task: 'Ask a question or give it a task.',
258
259
  ask: 'Ask anything.',
259
- canRead: 'It can read',
260
- worksIn: 'It works in'
260
+ canRead: 'It can read'
261
261
  },
262
262
  loading: 'Loading conversation',
263
263
  loadingEarlier: 'Loading earlier messages',
@@ -376,6 +376,7 @@ export default {
376
376
  joiner: ', or',
377
377
  commands: 'commands',
378
378
  files: 'files',
379
+ references: 'views',
379
380
  skills: 'skills',
380
381
  readOnly: 'Go back to the main agent to write'
381
382
  },
@@ -255,9 +255,9 @@ declare const _default: {
255
255
  };
256
256
  empty: {
257
257
  ready: string;
258
+ task: string;
258
259
  ask: string;
259
260
  canRead: string;
260
- worksIn: string;
261
261
  };
262
262
  loading: string;
263
263
  loadingEarlier: string;
@@ -376,6 +376,7 @@ declare const _default: {
376
376
  joiner: string;
377
377
  commands: string;
378
378
  files: string;
379
+ references: string;
379
380
  skills: string;
380
381
  readOnly: string;
381
382
  };
@@ -254,10 +254,10 @@ export default {
254
254
  night: 'Nog wakker?'
255
255
  },
256
256
  empty: {
257
- ready: '{{model}} staat klaar.',
257
+ ready: '{{model}} staat klaar',
258
+ task: 'Stel een vraag of geef een opdracht.',
258
259
  ask: 'Vraag maar raak.',
259
- canRead: 'Kan lezen',
260
- worksIn: 'Werkt in'
260
+ canRead: 'Kan lezen'
261
261
  },
262
262
  loading: 'Gesprek laden',
263
263
  loadingEarlier: 'Eerdere berichten laden',
@@ -376,6 +376,7 @@ export default {
376
376
  joiner: ', of',
377
377
  commands: "commando's",
378
378
  files: 'bestanden',
379
+ references: 'weergaven',
379
380
  skills: 'skills',
380
381
  readOnly: 'Ga terug naar de main agent om te schrijven'
381
382
  },
package/dist/theme.css CHANGED
@@ -293,7 +293,7 @@
293
293
  /* The same editor as a form field (`PromptEditor`): the field's inset, and room for a few lines before it scrolls. */
294
294
  .composer-input.prompt-editor .cm-editor { max-height: 240px; }
295
295
  .composer-input.prompt-editor .cm-editor .cm-scroller .cm-content { min-height: 80px; padding: 6px 10px; }
296
- .composer-hints, .composer-hints-extra { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
296
+ .composer-hints, .composer-hints-extra, .composer-hint { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
297
297
  /* The joiner starts with its own comma, so it sits against the lead without the gap. */
298
298
  .composer-hints-extra { margin-left: -8px; }
299
299
  .composer-hints kbd { padding: 0 6px; border-radius: 5px; background: var(--surface-active); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-code); line-height: var(--text-code--line-height); }
@@ -305,6 +305,10 @@
305
305
  @container composer (width < 36rem) {
306
306
  .composer-hints-extra { display: none; }
307
307
  }
308
+ /* The longest line, in Dutch on a 14px root, needs 38rem; until then `#` goes first and the rest stay. */
309
+ @container composer (width < 39rem) {
310
+ .composer-hint-references { display: none; }
311
+ }
308
312
  /* Markdown stays source while you type: the markers stay put and dim, and what they wrap takes its look. */
309
313
  .composer-input .cm-md-mark { color: var(--text-faint); }
310
314
  .composer-input .cm-md-strong, .composer-input .cm-md-heading { font-weight: 600; }
@@ -315,3 +319,18 @@
315
319
  .composer-input .cm-content .cm-line.cm-md-fence { padding: 0 8px; background: var(--surface-sunken); font-family: var(--font-mono); font-size: var(--text-code); }
316
320
  .composer-input .cm-content .cm-line.cm-md-fence-start { padding-top: 4px; border-top-left-radius: 6px; border-top-right-radius: 6px; }
317
321
  .composer-input .cm-content .cm-line.cm-md-fence-end { padding-bottom: 4px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
322
+
323
+ /* The empty thread's scene: a question that goes out, and the model typing before its answer stands. */
324
+ @keyframes chat-scene-send { 0%, 3% { transform: translateY(16px); opacity: 0; } 12%, 100% { transform: none; opacity: 1; } }
325
+ @keyframes chat-scene-typing { 0%, 18% { opacity: 0; } 20%, 32% { opacity: 1; } 34%, 100% { opacity: 0; } }
326
+ @keyframes chat-scene-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-3px); } }
327
+ .chat-scene-send { transform-box: view-box; }
328
+ .chat-scene-typing { opacity: 0; }
329
+ .chat-scene-bounce { transform-box: fill-box; }
330
+ @media (prefers-reduced-motion: no-preference) {
331
+ .chat-scene-send { animation: chat-scene-send 8s var(--scene-arrive) infinite; }
332
+ .chat-scene-typing { animation: chat-scene-typing 8s infinite; }
333
+ .chat-scene-bounce { animation: chat-scene-bounce 0.9s ease-in-out infinite; }
334
+ .chat-scene-bounce:nth-child(2) { animation-delay: 0.15s; }
335
+ .chat-scene-bounce:nth-child(3) { animation-delay: 0.3s; }
336
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agents-react",
3
- "version": "0.54.11",
3
+ "version": "0.54.13",
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.54.11",
76
- "@adecore/editor": "0.54.11",
77
- "@adecore/editor-react": "0.54.11",
78
- "@adecore/intelligent-ui": "0.54.11",
79
- "@adecore/merge": "0.54.11",
80
- "@adecore/utils": "0.54.11",
75
+ "@adecore/agent-contracts": "0.54.13",
76
+ "@adecore/editor": "0.54.13",
77
+ "@adecore/editor-react": "0.54.13",
78
+ "@adecore/intelligent-ui": "0.54.13",
79
+ "@adecore/merge": "0.54.13",
80
+ "@adecore/utils": "0.54.13",
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.54.11",
104
+ "@adecore/ui": "^0.54.13",
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.54.11",
111
+ "@adecore/ui": "0.54.13",
112
112
  "@types/bun": "^1.4.4",
113
113
  "@types/react": "^19.3.0",
114
114
  "@types/react-dom": "^19.3.0",
@@ -0,0 +1,31 @@
1
+ import { EmptyScene } from '@adecore/ui';
2
+ import { AgentIcon } from '../../agents/AgentIcon';
3
+
4
+ /* A question goes out and the model answers. Its mark is the one accent here, so the typing dots stay neutral. */
5
+ export function ChatEmptyScene({ provider }: { provider: string }) {
6
+ return (
7
+ <EmptyScene>
8
+ <g className="scene-loop">
9
+ <g className="chat-scene-send">
10
+ <g className="scene-lift">
11
+ <rect className="scene-shape" x="70" y="10" width="78" height="24" rx="12" />
12
+ </g>
13
+ <path className="scene-text" d="M82 22h52" />
14
+ </g>
15
+ <g className="scene-reveal-2">
16
+ <svg x="11" y="43" width="20" height="20" overflow="visible">
17
+ <AgentIcon kind={provider} size={20} />
18
+ </svg>
19
+ </g>
20
+ <g className="chat-scene-typing">
21
+ <circle className="scene-dot chat-scene-bounce" cx="42" cy="53" r="2.5" />
22
+ <circle className="scene-dot chat-scene-bounce" cx="52" cy="53" r="2.5" />
23
+ <circle className="scene-dot chat-scene-bounce" cx="62" cy="53" r="2.5" />
24
+ </g>
25
+ <path className="scene-text scene-type-5" pathLength={1} d="M40 53h98" />
26
+ <path className="scene-text scene-type-7" pathLength={1} d="M40 66h84" />
27
+ <path className="scene-text scene-type-9" pathLength={1} d="M40 79h56" />
28
+ </g>
29
+ </EmptyScene>
30
+ );
31
+ }
@@ -189,7 +189,14 @@ export function Composer({
189
189
 
190
190
  const pending = usePendingRequests(chatId);
191
191
  const compactionOffer = useCompactionOffer(chatId, info, capabilities?.compaction);
192
- const placeholder = useHintedPlaceholder({ chatId, disabled, readOnly, mentionable: capabilities?.mentions !== false, hasSkills: menus.hasSkills });
192
+ const placeholder = useHintedPlaceholder({
193
+ chatId,
194
+ disabled,
195
+ readOnly,
196
+ mentionable: capabilities?.mentions !== false,
197
+ referable: menus.offersViews,
198
+ hasSkills: menus.hasSkills
199
+ });
193
200
  const editorExtensions = [
194
201
  chipDecorations({ mentions: draft.mentions, skills: draft.skills, references: menus.referenceChips, referenceIcon: host.ReferenceIcon }),
195
202
  LEAVE_DROPS_TO_THE_CARD
@@ -17,10 +17,9 @@ import {
17
17
  type ReactNode
18
18
  } from 'react';
19
19
  import { useTranslation } from 'react-i18next';
20
- import { AgentIcon } from '../../agents/AgentIcon';
21
20
  import { useModelName } from '../../agents/model-name';
22
21
  import { useChatHost, type TimelineFindOptions } from '../../host';
23
- import { useHostContextSources, useHostHidesFolder, useHostHidesToolCalls, useHostThreadCards, useHostTimelineFind, useHostWelcome } from '../../host-hooks';
22
+ import { useHostContextSources, useHostHidesToolCalls, useHostThreadCards, useHostTimelineFind, useHostWelcome } from '../../host-hooks';
24
23
  import { useChatScope } from '../../scope';
25
24
  import { useChatRow, useChats } from '../../state/chats';
26
25
  import { useForkedTurns } from '../forks';
@@ -66,6 +65,7 @@ import {
66
65
  type TurnTarget
67
66
  } from '../timeline-scroll';
68
67
  import { BookmarkMarker } from './BookmarkMarker';
68
+ import { ChatEmptyScene } from './ChatEmptyScene';
69
69
  import { FileLinkContext } from './file-links';
70
70
  import { FindRevealContext } from './find-reveal';
71
71
  import { MessageActions } from './MessageActions';
@@ -122,23 +122,23 @@ function scrollsWithin(target: Element, boundary: Element, deltaX: number, delta
122
122
  return false;
123
123
  }
124
124
 
125
- /*
126
- * A thread before its first message: which model answers, what the lines into this node let it read,
127
- * and the folder it works in, so a first question can lean on all three.
128
- */
125
+ /* A thread before its first message: which model answers, and what the lines into this node let it read. */
129
126
  function EmptyThread({ chatId }: { chatId: string }) {
130
127
  const { renderEmptyThread } = useChatHost();
131
128
  const { t } = useTranslation('agent-chat');
132
129
  const info = useChatRow(chatId, (row) => row?.info ?? null);
133
130
  const model = useModelName(info?.provider, info?.selection.model ?? '');
134
131
  const sources = useHostContextSources(chatId);
135
- const hidesFolder = useHostHidesFolder(chatId);
136
132
 
137
133
  return (
138
134
  <div className="flex grow items-center justify-center">
139
135
  <div className="flex max-w-sm flex-col items-center gap-3 px-6 py-8 text-center">
140
- <EmptyState icon={info ? <AgentIcon kind={info.provider} /> : undefined} className="p-0">
141
- {info ? t('timeline.empty.ready', { model }) : t('timeline.empty.ask')}
136
+ <EmptyState
137
+ scene={info ? <ChatEmptyScene provider={info.provider} /> : undefined}
138
+ title={info ? t('timeline.empty.ready', { model }) : undefined}
139
+ className="p-0"
140
+ >
141
+ {info ? t('timeline.empty.task') : t('timeline.empty.ask')}
142
142
  </EmptyState>
143
143
  {renderEmptyThread?.(chatId)}
144
144
  {sources.length > 0 && (
@@ -147,12 +147,6 @@ function EmptyThread({ chatId }: { chatId: string }) {
147
147
  <span className="max-w-full text-xs text-text-muted">{sources.map((source) => source.title).join(', ')}</span>
148
148
  </div>
149
149
  )}
150
- {info?.cwd && !hidesFolder && (
151
- <div className="flex max-w-full flex-col items-center gap-1">
152
- <SectionLabel>{t('timeline.empty.worksIn')}</SectionLabel>
153
- <span className="max-w-full font-mono text-xs break-all text-text-muted">{info.cwd}</span>
154
- </div>
155
- )}
156
150
  </div>
157
151
  </div>
158
152
  );