@brainfish-ai/components 0.30.9 → 0.31.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/conversation.d.ts +46 -2
- package/dist/esm/ChatSearch.css +1 -1
- package/dist/esm/chunks/{ChatSearch.DvJtrQld.js → ChatSearch.CcpQJlxZ.js} +84 -87
- package/dist/esm/chunks/ChatSearch.CcpQJlxZ.js.map +1 -0
- package/dist/esm/chunks/Conversation.DpHoC6se.js +29 -0
- package/dist/esm/chunks/Conversation.DpHoC6se.js.map +1 -0
- package/dist/esm/chunks/{header-pane.CMHPm65L.js → header-pane.D7hpI7mt.js} +2 -2
- package/dist/esm/chunks/{header-pane.CMHPm65L.js.map → header-pane.D7hpI7mt.js.map} +1 -1
- package/dist/esm/chunks/ripple-status.C20jzXjF.js +6 -0
- package/dist/esm/chunks/ripple-status.C20jzXjF.js.map +1 -0
- package/dist/esm/chunks/{sidebar.cdQIaDi5.js → sidebar.DNJ1Iufi.js} +15 -15
- package/dist/esm/chunks/sidebar.DNJ1Iufi.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/layouts/full-layout.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/esm/ripple-status.css +1 -0
- package/dist/index.d.ts +73 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/ChatSearch.DvJtrQld.js.map +0 -1
- package/dist/esm/chunks/Conversation.CCfPtVz8.js +0 -29
- package/dist/esm/chunks/Conversation.CCfPtVz8.js.map +0 -1
- package/dist/esm/chunks/ConversationStatus.BhdnM1uS.js +0 -2
- package/dist/esm/chunks/ConversationStatus.BhdnM1uS.js.map +0 -1
- package/dist/esm/chunks/sidebar.cdQIaDi5.js.map +0 -1
package/dist/conversation.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
1
2
|
import { ConversationActionsProps } from './ConversationActions';
|
|
2
3
|
import { ConversationInputProps } from './ConversationInput';
|
|
3
4
|
import { ConversationMessagesProps } from './ConversationMessages';
|
|
@@ -5,6 +6,9 @@ import { ConversationStatusProps } from './ConversationStatus';
|
|
|
5
6
|
import { ConversationSuggestionsProps } from './ConversationSuggestions';
|
|
6
7
|
import { default as default_2 } from 'react';
|
|
7
8
|
import { ReactNode } from 'react';
|
|
9
|
+
import { VariantProps } from 'class-variance-authority';
|
|
10
|
+
|
|
11
|
+
export declare type ActivityBlock = ThinkingBlock | ToolUseBlock | ToolResultBlock;
|
|
8
12
|
|
|
9
13
|
export declare type Article = {
|
|
10
14
|
id: string;
|
|
@@ -53,7 +57,7 @@ declare type Collection = {
|
|
|
53
57
|
url: string;
|
|
54
58
|
};
|
|
55
59
|
|
|
56
|
-
export declare type ContentBlock = TextBlock | AttachmentBlock;
|
|
60
|
+
export declare type ContentBlock = TextBlock | AttachmentBlock | ActivityBlock;
|
|
57
61
|
|
|
58
62
|
declare type ContextPill = {
|
|
59
63
|
id: string;
|
|
@@ -175,7 +179,7 @@ export declare const ConversationStatus: ({ className, children, variant, }: Con
|
|
|
175
179
|
declare interface ConversationStatusProps_2 {
|
|
176
180
|
className?: string;
|
|
177
181
|
children?: default_2.ReactNode;
|
|
178
|
-
variant?:
|
|
182
|
+
variant?: SweepTextVariant;
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
export declare const ConversationSuggestions: ({ items, className }: ConversationSuggestionsProps_2) => default_2.JSX.Element | null;
|
|
@@ -218,6 +222,21 @@ export declare type FileAttachmentBlock = {
|
|
|
218
222
|
url?: string;
|
|
219
223
|
};
|
|
220
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Derive the live status label from a message's latest content block, or `null`
|
|
227
|
+
* when no status should be shown.
|
|
228
|
+
*
|
|
229
|
+
* The status reflects only the most recent activity ("latest only"): a tool
|
|
230
|
+
* call shows its mapped label, thinking shows "Thinking", and a tool result
|
|
231
|
+
* keeps the originating tool's label so it doesn't flicker to generic between
|
|
232
|
+
* the result arriving and the next block.
|
|
233
|
+
*
|
|
234
|
+
* It is shown before the first answer text and while tools/thinking are in
|
|
235
|
+
* flight, but hidden once answer text is actively streaming — returning `null`
|
|
236
|
+
* when the latest block is a text block that already has content.
|
|
237
|
+
*/
|
|
238
|
+
export declare function getConversationStatusLabel(message: Message): string | null;
|
|
239
|
+
|
|
221
240
|
export declare type Message = {
|
|
222
241
|
id: string;
|
|
223
242
|
role: MessageRole;
|
|
@@ -256,12 +275,37 @@ export declare type Suggestion = {
|
|
|
256
275
|
icon?: string;
|
|
257
276
|
};
|
|
258
277
|
|
|
278
|
+
declare type SweepTextVariant = NonNullable<VariantProps<typeof sweepTextVariants>['variant']>;
|
|
279
|
+
|
|
280
|
+
declare const sweepTextVariants: (props?: ({
|
|
281
|
+
variant?: "dark" | "yellowfin" | "dark-subtle" | null | undefined;
|
|
282
|
+
} & ClassProp) | undefined) => string;
|
|
283
|
+
|
|
259
284
|
export declare type TextBlock = {
|
|
260
285
|
type: 'text';
|
|
261
286
|
text: string;
|
|
262
287
|
citations?: Citation[];
|
|
263
288
|
};
|
|
264
289
|
|
|
290
|
+
export declare type ThinkingBlock = {
|
|
291
|
+
type: 'thinking';
|
|
292
|
+
thinking: string;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export declare type ToolResultBlock = {
|
|
296
|
+
type: 'tool_result';
|
|
297
|
+
toolUseId: string;
|
|
298
|
+
content: string;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
/** A tool invocation. `input` holds the raw (possibly partial) JSON arguments string. */
|
|
302
|
+
export declare type ToolUseBlock = {
|
|
303
|
+
type: 'tool_use';
|
|
304
|
+
id: string;
|
|
305
|
+
name: string;
|
|
306
|
+
input: string;
|
|
307
|
+
};
|
|
308
|
+
|
|
265
309
|
export declare function useConversation(): ConversationContextValue;
|
|
266
310
|
|
|
267
311
|
export { }
|
package/dist/esm/ChatSearch.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._followUpSearchBar_x7ads_1{box-shadow:0 -2px 4px #1212170d;background-color:var(--bfc-card)}
|