@llmnative/react 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +646 -511
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/I18n.d.ts +10 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/widgets/chat/ChatActivity.d.ts +51 -0
- package/llms-full.txt +1487 -1471
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/types/src/I18n.d.ts
CHANGED
|
@@ -355,6 +355,16 @@ export interface I18nDict {
|
|
|
355
355
|
submit: string;
|
|
356
356
|
noAnswer: string;
|
|
357
357
|
answered: string;
|
|
358
|
+
/** CR-123 — ChatActivity: the work of an agent (`{count}` in activityCount, activityFailed, activityFiles). */
|
|
359
|
+
activityCount: string;
|
|
360
|
+
activityFailed: string;
|
|
361
|
+
activityCommands: string;
|
|
362
|
+
activityHide: string;
|
|
363
|
+
activityLog: string;
|
|
364
|
+
activitySteps: string;
|
|
365
|
+
activityFiles: string;
|
|
366
|
+
activityChanges: string;
|
|
367
|
+
activityEmpty: string;
|
|
358
368
|
};
|
|
359
369
|
/** CR-112 — the charts: empty state, totals, the scale of the heatmaps, the data table. */
|
|
360
370
|
charts: {
|
|
@@ -83,6 +83,8 @@ export { default as ChatReasoning } from './widgets/chat/ChatReasoning';
|
|
|
83
83
|
export type { ChatReasoningProps, ChatReasoningClassNames } from './widgets/chat/ChatReasoning';
|
|
84
84
|
export { default as ChatQuestions } from './widgets/chat/ChatQuestions';
|
|
85
85
|
export type { ChatQuestion, ChatQuestionOption, ChatQuestionAnswer, ChatQuestionsNumbering, ChatQuestionsProps, ChatQuestionsClassNames } from './widgets/chat/ChatQuestions';
|
|
86
|
+
export { default as ChatActivity } from './widgets/chat/ChatActivity';
|
|
87
|
+
export type { ChatActivityItem, ChatActivitySteps, ChatActivityProps, ChatActivityClassNames } from './widgets/chat/ChatActivity';
|
|
86
88
|
export { repairStreamingMarkdown } from '../libs/streamingMarkdown';
|
|
87
89
|
export { default as TabDynamic } from './widgets/TabDynamic';
|
|
88
90
|
export { default as Component } from './Component';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** One group of steps of an agent: what it did, how many times, what it touched; the lines under it on request. */
|
|
3
|
+
export interface ChatActivitySteps {
|
|
4
|
+
type: 'steps';
|
|
5
|
+
/** Icon name of the icon provider. Default `terminal`. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** What the agent did, in a few words ("Reads files", "Runs the tests"). */
|
|
8
|
+
label: string;
|
|
9
|
+
/** How many steps the group has: shown from 2 on. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** Short details next to the label: the queries, the files, the commands. The first four, the rest on hover. */
|
|
12
|
+
detail?: readonly string[];
|
|
13
|
+
/** How many steps of the group failed: a warning badge. */
|
|
14
|
+
failed?: number;
|
|
15
|
+
/** The lines under the group (its commands, their errors), shown in a block opened by its button. */
|
|
16
|
+
lines?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
/** An item of the work of an agent: a group of steps, its own words (Markdown), or how it ended. */
|
|
19
|
+
export type ChatActivityItem = ChatActivitySteps | {
|
|
20
|
+
type: 'text';
|
|
21
|
+
text: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'end';
|
|
24
|
+
ok: boolean;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
/** Classes for the parts of a `ChatActivity`, added to the defaults. */
|
|
28
|
+
export interface ChatActivityClassNames {
|
|
29
|
+
root?: string;
|
|
30
|
+
step?: string;
|
|
31
|
+
text?: string;
|
|
32
|
+
files?: string;
|
|
33
|
+
log?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ChatActivityProps {
|
|
36
|
+
items: readonly ChatActivityItem[];
|
|
37
|
+
/** The files the agent changed: listed at the end. */
|
|
38
|
+
files?: readonly string[];
|
|
39
|
+
/** Opens the changes of the files (a diff, a page of the repository): its button next to the list. */
|
|
40
|
+
onShowChanges?: () => void;
|
|
41
|
+
/** The whole raw log: with it, a switch to read it and back. */
|
|
42
|
+
log?: readonly string[];
|
|
43
|
+
className?: string;
|
|
44
|
+
classNames?: ChatActivityClassNames;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* CR-123 — The work of an agent in a chat, as AI assistants show it: what it did, grouped (an icon, a label, how many
|
|
48
|
+
* steps, the queries or the files), its commands on request, its own words in between, how it ended, the files it
|
|
49
|
+
* changed with their changes on request; the whole raw log one click away. The consumer maps its own log to the items.
|
|
50
|
+
*/
|
|
51
|
+
export default function ChatActivity({ items, files, onShowChanges, log, className, classNames }: ChatActivityProps): React.JSX.Element;
|