@adecore/agents-react 0.21.2 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/model-requirement.d.ts +6 -0
- package/dist/agents/model-requirement.js +26 -0
- package/dist/chat/chat-client.d.ts +2 -1
- package/dist/chat/chat-client.js +2 -0
- package/dist/chat/drafts.d.ts +2 -1
- package/dist/chat/drafts.js +15 -5
- package/dist/chat/logic/picker-entries.d.ts +10 -0
- package/dist/chat/logic/picker-entries.js +19 -0
- package/dist/chat/logic/timeline.d.ts +5 -0
- package/dist/chat/logic/timeline.js +10 -1
- package/dist/chat/prompt-hold.d.ts +8 -0
- package/dist/chat/prompt-hold.js +16 -0
- package/dist/chat/quote.d.ts +4 -0
- package/dist/chat/quote.js +19 -0
- package/dist/chat/stash.d.ts +8 -2
- package/dist/chat/stash.js +21 -5
- package/dist/chat/subagent-list.d.ts +7 -1
- package/dist/chat/subagent-list.js +13 -1
- package/dist/chat/timeline-scroll.d.ts +6 -2
- package/dist/chat/timeline-scroll.js +12 -7
- package/dist/chat/ui/ChatActivity.js +22 -8
- package/dist/chat/ui/Composer.js +103 -19
- package/dist/chat/ui/ComposerInput.d.ts +3 -1
- package/dist/chat/ui/ComposerInput.js +13 -4
- package/dist/chat/ui/Pickers.js +26 -18
- package/dist/chat/ui/PromptComposer.d.ts +8 -1
- package/dist/chat/ui/PromptComposer.js +18 -6
- package/dist/chat/ui/QuoteButton.js +2 -2
- package/dist/chat/ui/SubagentControls.d.ts +4 -2
- package/dist/chat/ui/SubagentControls.js +12 -8
- package/dist/chat/ui/SubagentInfo.d.ts +1 -1
- package/dist/chat/ui/SubagentInfo.js +9 -15
- package/dist/chat/ui/SubagentStopButton.js +2 -1
- package/dist/chat/ui/Timeline.js +24 -3
- package/dist/chat/ui/composer/menu-aria.d.ts +10 -0
- package/dist/chat/ui/composer/menu-aria.js +18 -0
- package/dist/chat/ui/quote-selection.d.ts +5 -2
- package/dist/chat/ui/quote-selection.js +3 -2
- package/dist/chat/ui/rows/MessageRows.js +24 -5
- package/dist/chat/ui/rows/Rows.js +1 -1
- package/dist/chat/ui/rows/WorkRows.d.ts +3 -1
- package/dist/chat/ui/rows/WorkRows.js +4 -4
- package/dist/host.d.ts +1 -0
- package/dist/host.js +1 -0
- package/dist/locales/en/agent-chat.json +30 -7
- package/dist/locales/nl/agent-chat.json +30 -7
- package/dist/state/chats.d.ts +2 -1
- package/dist/state/chats.js +19 -1
- package/package.json +24 -4
- package/src/agents/model-requirement.ts +36 -0
- package/src/chat/chat-client.ts +5 -0
- package/src/chat/drafts.ts +27 -7
- package/src/chat/logic/picker-entries.ts +25 -0
- package/src/chat/logic/timeline.ts +17 -2
- package/src/chat/prompt-hold.ts +27 -0
- package/src/chat/quote.ts +20 -0
- package/src/chat/stash.ts +31 -5
- package/src/chat/subagent-list.ts +19 -5
- package/src/chat/timeline-scroll.ts +24 -10
- package/src/chat/ui/ChatActivity.tsx +35 -9
- package/src/chat/ui/Composer.tsx +197 -52
- package/src/chat/ui/ComposerInput.tsx +18 -3
- package/src/chat/ui/Pickers.tsx +51 -30
- package/src/chat/ui/PromptComposer.tsx +37 -8
- package/src/chat/ui/QuoteButton.tsx +3 -2
- package/src/chat/ui/SubagentControls.tsx +22 -19
- package/src/chat/ui/SubagentInfo.tsx +24 -42
- package/src/chat/ui/SubagentStopButton.tsx +2 -1
- package/src/chat/ui/Timeline.tsx +26 -4
- package/src/chat/ui/composer/menu-aria.ts +29 -0
- package/src/chat/ui/quote-selection.ts +6 -4
- package/src/chat/ui/rows/MessageRows.tsx +44 -5
- package/src/chat/ui/rows/Rows.tsx +3 -1
- package/src/chat/ui/rows/WorkRows.tsx +15 -1
- package/src/host.ts +3 -0
- package/src/locales/en/agent-chat.json +30 -7
- package/src/locales/nl/agent-chat.json +30 -7
- package/src/state/chats.ts +31 -2
|
@@ -91,7 +91,8 @@
|
|
|
91
91
|
"user": {
|
|
92
92
|
"heading": "You",
|
|
93
93
|
"showAll": "Show all",
|
|
94
|
-
"showLess": "Show less"
|
|
94
|
+
"showLess": "Show less",
|
|
95
|
+
"quoteGone": "The reply this quote came from is no longer in this chat."
|
|
95
96
|
},
|
|
96
97
|
"report": {
|
|
97
98
|
"heading": "Report"
|
|
@@ -107,7 +108,8 @@
|
|
|
107
108
|
"note": {
|
|
108
109
|
"hide": "Hide",
|
|
109
110
|
"show": "Show",
|
|
110
|
-
"openFork": "Open fork"
|
|
111
|
+
"openFork": "Open fork",
|
|
112
|
+
"openWaiting": "Open to answer"
|
|
111
113
|
},
|
|
112
114
|
"compaction": {
|
|
113
115
|
"plain": "Context compacted",
|
|
@@ -165,6 +167,9 @@
|
|
|
165
167
|
},
|
|
166
168
|
"changedFiles_one": "{{count}} changed file",
|
|
167
169
|
"changedFiles_other": "{{count}} changed files",
|
|
170
|
+
"folderChanges_one": "{{count}} change in the folder this turn",
|
|
171
|
+
"folderChanges_other": "{{count}} changes in the folder this turn",
|
|
172
|
+
"baseMoved": "The branch moved during this turn ({{from}} to {{to}}), so this includes what came in with it.",
|
|
168
173
|
"andMore": "and more, truncated",
|
|
169
174
|
"edits_one": "{{count}} edit",
|
|
170
175
|
"edits_other": "{{count}} edits",
|
|
@@ -249,6 +254,17 @@
|
|
|
249
254
|
},
|
|
250
255
|
"composer": {
|
|
251
256
|
"slotFailed": "This control failed to render",
|
|
257
|
+
"inputLabel": "Message",
|
|
258
|
+
"menu": {
|
|
259
|
+
"commands": "Commands",
|
|
260
|
+
"skills": "Skills",
|
|
261
|
+
"mentions": "Mentions"
|
|
262
|
+
},
|
|
263
|
+
"held": {
|
|
264
|
+
"question": "A question is waiting. It opens when you pause typing.",
|
|
265
|
+
"approval": "An approval is waiting. It opens when you pause typing.",
|
|
266
|
+
"show": "Show now"
|
|
267
|
+
},
|
|
252
268
|
"commands": {
|
|
253
269
|
"model": "Switch the model",
|
|
254
270
|
"compact": "Compact the context",
|
|
@@ -294,7 +310,8 @@
|
|
|
294
310
|
},
|
|
295
311
|
"quote": {
|
|
296
312
|
"add": "Quote",
|
|
297
|
-
"remove": "Remove quote"
|
|
313
|
+
"remove": "Remove quote",
|
|
314
|
+
"goToSource": "Go to the reply"
|
|
298
315
|
},
|
|
299
316
|
"removeAttachment": "Remove {{name}}",
|
|
300
317
|
"attach": "Attach files",
|
|
@@ -319,6 +336,9 @@
|
|
|
319
336
|
"monitors_one": "{{count}} monitor",
|
|
320
337
|
"monitors_other": "{{count}} monitors",
|
|
321
338
|
"pausedUntil": "paused until {{time}}",
|
|
339
|
+
"progress": "{{done}} of {{total}} sub-agents done",
|
|
340
|
+
"needsYou_one": "{{count}} needs you",
|
|
341
|
+
"needsYou_other": "{{count}} need you",
|
|
322
342
|
"took": {
|
|
323
343
|
"done": "done in {{duration}}",
|
|
324
344
|
"failed": "failed after {{duration}}",
|
|
@@ -332,8 +352,10 @@
|
|
|
332
352
|
"subagents": {
|
|
333
353
|
"stop": {
|
|
334
354
|
"task": "Stop this task",
|
|
355
|
+
"native": "Stop this sub-agent",
|
|
335
356
|
"mark": "Mark as stopped. The CLI cannot stop one sub-agent, so it may keep working until the chat's process ends."
|
|
336
357
|
},
|
|
358
|
+
"stale": "This sub-agent belongs to a process that has ended.",
|
|
337
359
|
"title": "Sub-agents",
|
|
338
360
|
"backToMain": "Back to the main agent",
|
|
339
361
|
"loading": "Loading the conversation…",
|
|
@@ -344,9 +366,7 @@
|
|
|
344
366
|
"stopFailed": "The sub-agent could not be stopped",
|
|
345
367
|
"info": {
|
|
346
368
|
"label": "About this sub-agent",
|
|
347
|
-
"tokens": "{{tokens}} tokens"
|
|
348
|
-
"showTask": "Show its task",
|
|
349
|
-
"hideTask": "Hide its task"
|
|
369
|
+
"tokens": "{{tokens}} tokens"
|
|
350
370
|
}
|
|
351
371
|
},
|
|
352
372
|
"modes": {
|
|
@@ -382,7 +402,10 @@
|
|
|
382
402
|
"noMatch": "No models match",
|
|
383
403
|
"legacyGroup_one": "Legacy models ({{count}})",
|
|
384
404
|
"legacyGroup_other": "Legacy models ({{count}})",
|
|
385
|
-
"legacy": "Legacy"
|
|
405
|
+
"legacy": "Legacy",
|
|
406
|
+
"requires": "Requires {{cli}} {{version}} or later on {{machine}}",
|
|
407
|
+
"requiresHere": "Requires {{cli}} {{version}} or later",
|
|
408
|
+
"providerSettings": "Provider settings"
|
|
386
409
|
},
|
|
387
410
|
"stash": {
|
|
388
411
|
"title": "Stashed prompts",
|
|
@@ -91,7 +91,8 @@
|
|
|
91
91
|
"user": {
|
|
92
92
|
"heading": "Jij",
|
|
93
93
|
"showAll": "Alles tonen",
|
|
94
|
-
"showLess": "Minder tonen"
|
|
94
|
+
"showLess": "Minder tonen",
|
|
95
|
+
"quoteGone": "Het antwoord waar dit citaat vandaan kwam, staat niet meer in deze chat."
|
|
95
96
|
},
|
|
96
97
|
"report": {
|
|
97
98
|
"heading": "Rapport"
|
|
@@ -107,7 +108,8 @@
|
|
|
107
108
|
"note": {
|
|
108
109
|
"hide": "Verbergen",
|
|
109
110
|
"show": "Tonen",
|
|
110
|
-
"openFork": "Fork openen"
|
|
111
|
+
"openFork": "Fork openen",
|
|
112
|
+
"openWaiting": "Openen om te antwoorden"
|
|
111
113
|
},
|
|
112
114
|
"compaction": {
|
|
113
115
|
"plain": "Context gecomprimeerd",
|
|
@@ -165,6 +167,9 @@
|
|
|
165
167
|
},
|
|
166
168
|
"changedFiles_one": "{{count}} gewijzigd bestand",
|
|
167
169
|
"changedFiles_other": "{{count}} gewijzigde bestanden",
|
|
170
|
+
"folderChanges_one": "{{count}} wijziging in de map tijdens deze beurt",
|
|
171
|
+
"folderChanges_other": "{{count}} wijzigingen in de map tijdens deze beurt",
|
|
172
|
+
"baseMoved": "De branch is tijdens deze beurt verplaatst ({{from}} naar {{to}}), dus dit omvat ook wat daarmee binnenkwam.",
|
|
168
173
|
"andMore": "en meer, afgekapt",
|
|
169
174
|
"edits_one": "{{count}} bewerking",
|
|
170
175
|
"edits_other": "{{count}} bewerkingen",
|
|
@@ -249,6 +254,17 @@
|
|
|
249
254
|
},
|
|
250
255
|
"composer": {
|
|
251
256
|
"slotFailed": "Dit onderdeel kon niet worden getekend",
|
|
257
|
+
"inputLabel": "Bericht",
|
|
258
|
+
"menu": {
|
|
259
|
+
"commands": "Commando's",
|
|
260
|
+
"skills": "Skills",
|
|
261
|
+
"mentions": "Vermeldingen"
|
|
262
|
+
},
|
|
263
|
+
"held": {
|
|
264
|
+
"question": "Er wacht een vraag. Die opent zodra je even stopt met typen.",
|
|
265
|
+
"approval": "Er wacht een goedkeuring. Die opent zodra je even stopt met typen.",
|
|
266
|
+
"show": "Nu tonen"
|
|
267
|
+
},
|
|
252
268
|
"commands": {
|
|
253
269
|
"model": "Wissel van model",
|
|
254
270
|
"compact": "Comprimeer de context",
|
|
@@ -294,7 +310,8 @@
|
|
|
294
310
|
},
|
|
295
311
|
"quote": {
|
|
296
312
|
"add": "Citeren",
|
|
297
|
-
"remove": "Citaat verwijderen"
|
|
313
|
+
"remove": "Citaat verwijderen",
|
|
314
|
+
"goToSource": "Naar het antwoord"
|
|
298
315
|
},
|
|
299
316
|
"removeAttachment": "{{name}} verwijderen",
|
|
300
317
|
"attach": "Bestanden toevoegen",
|
|
@@ -319,6 +336,9 @@
|
|
|
319
336
|
"monitors_one": "{{count}} monitor",
|
|
320
337
|
"monitors_other": "{{count}} monitors",
|
|
321
338
|
"pausedUntil": "gepauzeerd tot {{time}}",
|
|
339
|
+
"progress": "{{done}} van {{total}} sub-agents klaar",
|
|
340
|
+
"needsYou_one": "{{count}} vraagt aandacht",
|
|
341
|
+
"needsYou_other": "{{count}} vragen aandacht",
|
|
322
342
|
"took": {
|
|
323
343
|
"done": "klaar in {{duration}}",
|
|
324
344
|
"failed": "mislukt na {{duration}}",
|
|
@@ -332,8 +352,10 @@
|
|
|
332
352
|
"subagents": {
|
|
333
353
|
"stop": {
|
|
334
354
|
"task": "Deze taak stoppen",
|
|
355
|
+
"native": "Deze sub-agent stoppen",
|
|
335
356
|
"mark": "Markeren als gestopt. De CLI kan een losse sub-agent niet stoppen, dus die werkt mogelijk door tot het proces van de chat eindigt."
|
|
336
357
|
},
|
|
358
|
+
"stale": "Deze sub-agent hoort bij een proces dat al gestopt is.",
|
|
337
359
|
"title": "Sub-agents",
|
|
338
360
|
"backToMain": "Terug naar de main agent",
|
|
339
361
|
"loading": "Gesprek laden…",
|
|
@@ -344,9 +366,7 @@
|
|
|
344
366
|
"stopFailed": "De sub-agent kon niet worden gestopt",
|
|
345
367
|
"info": {
|
|
346
368
|
"label": "Over deze sub-agent",
|
|
347
|
-
"tokens": "{{tokens}} tokens"
|
|
348
|
-
"showTask": "Opdracht tonen",
|
|
349
|
-
"hideTask": "Opdracht verbergen"
|
|
369
|
+
"tokens": "{{tokens}} tokens"
|
|
350
370
|
}
|
|
351
371
|
},
|
|
352
372
|
"modes": {
|
|
@@ -382,7 +402,10 @@
|
|
|
382
402
|
"noMatch": "Geen modellen gevonden",
|
|
383
403
|
"legacyGroup_one": "Legacy-modellen ({{count}})",
|
|
384
404
|
"legacyGroup_other": "Legacy-modellen ({{count}})",
|
|
385
|
-
"legacy": "Legacy"
|
|
405
|
+
"legacy": "Legacy",
|
|
406
|
+
"requires": "Vereist {{cli}} {{version}} of nieuwer op {{machine}}",
|
|
407
|
+
"requiresHere": "Vereist {{cli}} {{version}} of nieuwer",
|
|
408
|
+
"providerSettings": "Providerinstellingen"
|
|
386
409
|
},
|
|
387
410
|
"stash": {
|
|
388
411
|
"title": "Stashed prompts",
|
package/src/state/chats.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
import { useContext, useMemo } from 'react';
|
|
1
2
|
import { create } from 'zustand';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
3
|
+
import type {
|
|
4
|
+
AgentKind,
|
|
5
|
+
ChatApprovalItem,
|
|
6
|
+
ChatBookmark,
|
|
7
|
+
ChatEvent,
|
|
8
|
+
ChatHistoryResult,
|
|
9
|
+
ChatInfo,
|
|
10
|
+
ChatItem,
|
|
11
|
+
ChatQuestionItem,
|
|
12
|
+
ChatVisual
|
|
13
|
+
} from '@adecore/agent-contracts';
|
|
14
|
+
import { ChatScopeContext, useChatScope } from '../scope';
|
|
4
15
|
|
|
5
16
|
export interface ChatState {
|
|
6
17
|
info: ChatInfo;
|
|
@@ -294,6 +305,24 @@ export function useChatRow<T>(chatId: string, select: (row: ChatState | undefine
|
|
|
294
305
|
return useChats((s) => select(s.byKey[keyOf(chatId)]));
|
|
295
306
|
}
|
|
296
307
|
|
|
308
|
+
/*
|
|
309
|
+
* The models the CLI of this provider reported running in the chats this client holds of the host.
|
|
310
|
+
* A model it ran is proof the CLI offers it, whatever the version says. Outside a scope there is none.
|
|
311
|
+
*/
|
|
312
|
+
export function useReportedModels(provider: AgentKind): ReadonlySet<string> {
|
|
313
|
+
const scope = useContext(ChatScopeContext);
|
|
314
|
+
const joined = useChats((s) => {
|
|
315
|
+
const names = new Set<string>();
|
|
316
|
+
for (const [key, state] of Object.entries(s.statusByKey)) {
|
|
317
|
+
if (scope?.owns(key) === true && state.info.provider === provider && state.info.model !== null) {
|
|
318
|
+
names.add(state.info.model);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return [...names].sort().join('\n');
|
|
322
|
+
});
|
|
323
|
+
return useMemo(() => new Set(joined === '' ? [] : joined.split('\n')), [joined]);
|
|
324
|
+
}
|
|
325
|
+
|
|
297
326
|
/* The item as the thread holds it now, for a row derived from the structure, which a delta leaves alone. */
|
|
298
327
|
export function useCurrentItem<T extends ChatItem>(chatId: string, derived: T): T {
|
|
299
328
|
return useChatRow(chatId, (row) => {
|