@agentiffai/design 1.3.18 → 1.3.20
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/{Window-pJb3Z5_P.d.cts → Window-DyRP81dS.d.cts} +42 -3
- package/dist/{Window-pJb3Z5_P.d.ts → Window-DyRP81dS.d.ts} +42 -3
- package/dist/copilotkit/index.cjs +424 -179
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +4 -30
- package/dist/copilotkit/index.d.ts +4 -30
- package/dist/copilotkit/index.js +351 -109
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +2025 -1821
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1900 -1699
- package/dist/index.js.map +1 -1
- package/dist/layout/index.cjs +18 -2
- package/dist/layout/index.cjs.map +1 -1
- package/dist/layout/index.d.cts +8 -0
- package/dist/layout/index.d.ts +8 -0
- package/dist/layout/index.js +18 -2
- package/dist/layout/index.js.map +1 -1
- package/dist/workflow/index.cjs +6 -1
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.d.cts +2 -0
- package/dist/workflow/index.d.ts +2 -0
- package/dist/workflow/index.js +6 -1
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,50 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AssistantMessageProps as AssistantMessageProps$1 } from '@copilotkit/react-ui';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ReactNode } from 'react';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import { AriaButtonProps } from '@react-aria/button';
|
|
5
6
|
import { AriaTextFieldProps } from '@react-aria/textfield';
|
|
6
7
|
import { AriaButtonProps as AriaButtonProps$1 } from '@react-types/button';
|
|
7
8
|
import * as styled_components from 'styled-components';
|
|
8
9
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Adapter component that bridges custom AssistantMessage with CopilotKit's expected interface
|
|
13
|
+
*
|
|
14
|
+
* This adapter:
|
|
15
|
+
* 1. Converts CopilotKit's AssistantMessageProps to our custom component props
|
|
16
|
+
* 2. Handles loading states by showing AssistantThinking component
|
|
17
|
+
* 3. Extracts message content and renders with our styled component
|
|
18
|
+
* 4. Renders generativeUI (tool call renders) when present
|
|
19
|
+
* 5. Detects errors and provides "Report Issue" action button
|
|
20
|
+
* 6. Shows tool call indicators from content markers or the global registry
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Register a tool call name in the global registry.
|
|
25
|
+
* Call this from the mobile client when a tool call is detected.
|
|
26
|
+
*/
|
|
27
|
+
declare function registerToolCall(name: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Clear all registered tool calls (e.g., when conversation resets).
|
|
30
|
+
*/
|
|
31
|
+
declare function clearToolCalls(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Error category types matching the mobile client's error system
|
|
34
|
+
*/
|
|
35
|
+
type ErrorCategory = 'Network' | 'Auth' | 'OAuth' | 'Workflow' | 'Unknown';
|
|
36
|
+
/**
|
|
37
|
+
* Callback for reporting issues from chat
|
|
38
|
+
*/
|
|
39
|
+
interface ReportIssueCallback {
|
|
40
|
+
(context: {
|
|
41
|
+
errorCategory?: ErrorCategory;
|
|
42
|
+
correlationId?: string;
|
|
43
|
+
chatSnippet?: string;
|
|
44
|
+
}): void;
|
|
45
|
+
}
|
|
46
|
+
declare const AssistantMessageAdapter: React__default.NamedExoticComponent<AssistantMessageProps$1>;
|
|
47
|
+
|
|
10
48
|
type ActionVariant = 'primary' | 'secondary' | 'icon';
|
|
11
49
|
type ActionsLayout = 'horizontal' | 'vertical';
|
|
12
50
|
interface Action {
|
|
@@ -414,6 +452,7 @@ declare const StreamErrorMessage: React__default.FC<StreamErrorMessageProps>;
|
|
|
414
452
|
* @see specs/015-restyle-ai-chat/spec.md:FR-031, FR-042
|
|
415
453
|
* @see UI_COMPONENTS_SSE.md:548-595
|
|
416
454
|
*/
|
|
455
|
+
|
|
417
456
|
interface StreamingTextProps {
|
|
418
457
|
/** The text content to display */
|
|
419
458
|
content: string;
|
|
@@ -430,7 +469,7 @@ interface StreamingTextProps {
|
|
|
430
469
|
/** Additional CSS class name */
|
|
431
470
|
className?: string;
|
|
432
471
|
}
|
|
433
|
-
declare const StreamingText:
|
|
472
|
+
declare const StreamingText: React__default.NamedExoticComponent<StreamingTextProps>;
|
|
434
473
|
|
|
435
474
|
/**
|
|
436
475
|
* StreamStatusIndicator Component
|
|
@@ -550,4 +589,4 @@ interface WindowProps {
|
|
|
550
589
|
*/
|
|
551
590
|
declare const Window: React__default.FC<WindowProps>;
|
|
552
591
|
|
|
553
|
-
export { type Action as A, type ButtonProps as B,
|
|
592
|
+
export { type Action as A, type ButtonProps as B, type ResponseProps as C, Response as D, type ErrorCategory as E, type FooterProps as F, StreamErrorMessage as G, type HeaderProps as H, type InputProps as I, type StreamingTextProps as J, StreamingText as K, type StreamStatusIndicatorProps as L, type Message as M, StreamStatusIndicator as N, type SuggestionsProps as O, Suggestions as P, Window as Q, type ReportIssueCallback as R, type StreamErrorMessageProps as S, type UserMessageProps as U, type WindowProps as W, type ActionsLayout as a, type ActionsProps as b, type ActionVariant as c, Actions as d, type AgentStateProps as e, AgentState as f, AssistantMessageAdapter as g, clearToolCalls as h, type ButtonSize as i, type ButtonVariant as j, Button as k, Footer as l, Header as m, Input as n, type AssistantMessageProps as o, type FileAttachmentProps as p, type MessagesListProps as q, registerToolCall as r, type MessagesProps as s, AssistantMessage as t, FileAttachment as u, Messages as v, MessagesList as w, MessagesListContainer as x, MessagesListContent as y, UserMessage as z };
|
|
@@ -1,12 +1,50 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AssistantMessageProps as AssistantMessageProps$1 } from '@copilotkit/react-ui';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ReactNode } from 'react';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import { AriaButtonProps } from '@react-aria/button';
|
|
5
6
|
import { AriaTextFieldProps } from '@react-aria/textfield';
|
|
6
7
|
import { AriaButtonProps as AriaButtonProps$1 } from '@react-types/button';
|
|
7
8
|
import * as styled_components from 'styled-components';
|
|
8
9
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Adapter component that bridges custom AssistantMessage with CopilotKit's expected interface
|
|
13
|
+
*
|
|
14
|
+
* This adapter:
|
|
15
|
+
* 1. Converts CopilotKit's AssistantMessageProps to our custom component props
|
|
16
|
+
* 2. Handles loading states by showing AssistantThinking component
|
|
17
|
+
* 3. Extracts message content and renders with our styled component
|
|
18
|
+
* 4. Renders generativeUI (tool call renders) when present
|
|
19
|
+
* 5. Detects errors and provides "Report Issue" action button
|
|
20
|
+
* 6. Shows tool call indicators from content markers or the global registry
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Register a tool call name in the global registry.
|
|
25
|
+
* Call this from the mobile client when a tool call is detected.
|
|
26
|
+
*/
|
|
27
|
+
declare function registerToolCall(name: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Clear all registered tool calls (e.g., when conversation resets).
|
|
30
|
+
*/
|
|
31
|
+
declare function clearToolCalls(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Error category types matching the mobile client's error system
|
|
34
|
+
*/
|
|
35
|
+
type ErrorCategory = 'Network' | 'Auth' | 'OAuth' | 'Workflow' | 'Unknown';
|
|
36
|
+
/**
|
|
37
|
+
* Callback for reporting issues from chat
|
|
38
|
+
*/
|
|
39
|
+
interface ReportIssueCallback {
|
|
40
|
+
(context: {
|
|
41
|
+
errorCategory?: ErrorCategory;
|
|
42
|
+
correlationId?: string;
|
|
43
|
+
chatSnippet?: string;
|
|
44
|
+
}): void;
|
|
45
|
+
}
|
|
46
|
+
declare const AssistantMessageAdapter: React__default.NamedExoticComponent<AssistantMessageProps$1>;
|
|
47
|
+
|
|
10
48
|
type ActionVariant = 'primary' | 'secondary' | 'icon';
|
|
11
49
|
type ActionsLayout = 'horizontal' | 'vertical';
|
|
12
50
|
interface Action {
|
|
@@ -414,6 +452,7 @@ declare const StreamErrorMessage: React__default.FC<StreamErrorMessageProps>;
|
|
|
414
452
|
* @see specs/015-restyle-ai-chat/spec.md:FR-031, FR-042
|
|
415
453
|
* @see UI_COMPONENTS_SSE.md:548-595
|
|
416
454
|
*/
|
|
455
|
+
|
|
417
456
|
interface StreamingTextProps {
|
|
418
457
|
/** The text content to display */
|
|
419
458
|
content: string;
|
|
@@ -430,7 +469,7 @@ interface StreamingTextProps {
|
|
|
430
469
|
/** Additional CSS class name */
|
|
431
470
|
className?: string;
|
|
432
471
|
}
|
|
433
|
-
declare const StreamingText:
|
|
472
|
+
declare const StreamingText: React__default.NamedExoticComponent<StreamingTextProps>;
|
|
434
473
|
|
|
435
474
|
/**
|
|
436
475
|
* StreamStatusIndicator Component
|
|
@@ -550,4 +589,4 @@ interface WindowProps {
|
|
|
550
589
|
*/
|
|
551
590
|
declare const Window: React__default.FC<WindowProps>;
|
|
552
591
|
|
|
553
|
-
export { type Action as A, type ButtonProps as B,
|
|
592
|
+
export { type Action as A, type ButtonProps as B, type ResponseProps as C, Response as D, type ErrorCategory as E, type FooterProps as F, StreamErrorMessage as G, type HeaderProps as H, type InputProps as I, type StreamingTextProps as J, StreamingText as K, type StreamStatusIndicatorProps as L, type Message as M, StreamStatusIndicator as N, type SuggestionsProps as O, Suggestions as P, Window as Q, type ReportIssueCallback as R, type StreamErrorMessageProps as S, type UserMessageProps as U, type WindowProps as W, type ActionsLayout as a, type ActionsProps as b, type ActionVariant as c, Actions as d, type AgentStateProps as e, AgentState as f, AssistantMessageAdapter as g, clearToolCalls as h, type ButtonSize as i, type ButtonVariant as j, Button as k, Footer as l, Header as m, Input as n, type AssistantMessageProps as o, type FileAttachmentProps as p, type MessagesListProps as q, registerToolCall as r, type MessagesProps as s, AssistantMessage as t, FileAttachment as u, Messages as v, MessagesList as w, MessagesListContainer as x, MessagesListContent as y, UserMessage as z };
|