@agentiffai/design 1.4.1 → 1.4.3
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-Dm_I5m8i.d.cts → Window-DTASLUB2.d.cts} +20 -2
- package/dist/{Window-Dm_I5m8i.d.ts → Window-DTASLUB2.d.ts} +20 -2
- package/dist/copilotkit/index.cjs +499 -464
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +98 -8
- package/dist/copilotkit/index.d.ts +98 -8
- package/dist/copilotkit/index.js +492 -455
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { R as ReportIssueCallback } from '../Window-
|
|
2
|
-
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-
|
|
3
|
-
import { RenderMessageProps, InputProps, UserMessageProps } from '@copilotkit/react-ui';
|
|
4
|
-
export { useChatContext } from '@copilotkit/react-ui';
|
|
5
|
-
import * as React$1 from 'react';
|
|
1
|
+
import { R as ReportIssueCallback } from '../Window-DTASLUB2.cjs';
|
|
2
|
+
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-DTASLUB2.cjs';
|
|
6
3
|
import React__default, { ReactNode } from 'react';
|
|
7
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
5
|
import '@react-aria/button';
|
|
@@ -18,6 +15,30 @@ import 'styled-components/dist/types';
|
|
|
18
15
|
* Displays tool calls using the AgentState component.
|
|
19
16
|
*/
|
|
20
17
|
|
|
18
|
+
interface Message$1 {
|
|
19
|
+
id?: string;
|
|
20
|
+
role?: string;
|
|
21
|
+
content?: string;
|
|
22
|
+
type?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
arguments?: Record<string, unknown> | string;
|
|
25
|
+
isActionExecutionMessage?: () => boolean;
|
|
26
|
+
}
|
|
27
|
+
interface RenderMessageProps {
|
|
28
|
+
message: Message$1;
|
|
29
|
+
inProgress: boolean;
|
|
30
|
+
index: number;
|
|
31
|
+
isCurrentMessage: boolean;
|
|
32
|
+
actionResult?: string;
|
|
33
|
+
AssistantMessage?: React__default.ComponentType<any>;
|
|
34
|
+
UserMessage?: React__default.ComponentType<any>;
|
|
35
|
+
ImageRenderer?: React__default.ComponentType<any>;
|
|
36
|
+
onRegenerate?: (messageId: string) => void;
|
|
37
|
+
onCopy?: (message: string) => void;
|
|
38
|
+
onThumbsUp?: (message: any) => void;
|
|
39
|
+
onThumbsDown?: (message: any) => void;
|
|
40
|
+
markdownTagRenderers?: Record<string, React__default.ComponentType<any>>;
|
|
41
|
+
}
|
|
21
42
|
/**
|
|
22
43
|
* ActionExecutionAdapter - Renders tool/action execution messages in chat
|
|
23
44
|
*
|
|
@@ -37,12 +58,52 @@ declare const ActionExecutionAdapter: React__default.FC<RenderMessageProps>;
|
|
|
37
58
|
* 3. Manages input state and submission
|
|
38
59
|
*/
|
|
39
60
|
|
|
61
|
+
interface Message {
|
|
62
|
+
id?: string;
|
|
63
|
+
role?: string;
|
|
64
|
+
content?: string;
|
|
65
|
+
}
|
|
66
|
+
interface CopilotInputProps {
|
|
67
|
+
inProgress: boolean;
|
|
68
|
+
onSend: (text: string) => Promise<Message>;
|
|
69
|
+
isVisible?: boolean;
|
|
70
|
+
onStop?: () => void;
|
|
71
|
+
onUpload?: () => void;
|
|
72
|
+
hideStopButton?: boolean;
|
|
73
|
+
}
|
|
40
74
|
/**
|
|
41
75
|
* Adapter that converts CopilotKit's InputProps to our custom component
|
|
42
76
|
*/
|
|
43
|
-
declare const InputAdapter: React__default.FC<
|
|
77
|
+
declare const InputAdapter: React__default.FC<CopilotInputProps>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Adapter component that bridges custom UserMessage with CopilotKit's expected interface
|
|
81
|
+
*
|
|
82
|
+
* This adapter:
|
|
83
|
+
* 1. Converts CopilotKit's UserMessageProps to our custom component props
|
|
84
|
+
* 2. Extracts message content from CopilotKit's message object
|
|
85
|
+
* 3. Handles image messages appropriately
|
|
86
|
+
*/
|
|
44
87
|
|
|
45
|
-
|
|
88
|
+
interface UserMessageData {
|
|
89
|
+
content?: string;
|
|
90
|
+
image?: {
|
|
91
|
+
format: string;
|
|
92
|
+
bytes: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
interface CopilotUserMessageProps {
|
|
96
|
+
message?: UserMessageData;
|
|
97
|
+
ImageRenderer: React__default.ComponentType<{
|
|
98
|
+
image: {
|
|
99
|
+
format: string;
|
|
100
|
+
bytes: string;
|
|
101
|
+
};
|
|
102
|
+
content?: string;
|
|
103
|
+
}>;
|
|
104
|
+
rawData?: any;
|
|
105
|
+
}
|
|
106
|
+
declare const UserMessageAdapter: React__default.NamedExoticComponent<CopilotUserMessageProps>;
|
|
46
107
|
|
|
47
108
|
/**
|
|
48
109
|
* Complete CopilotSidebar Integration Example
|
|
@@ -203,4 +264,33 @@ declare namespace CustomCopilotSidebar {
|
|
|
203
264
|
var displayName: string;
|
|
204
265
|
}
|
|
205
266
|
|
|
206
|
-
|
|
267
|
+
/**
|
|
268
|
+
* V2 Migration: useChatContext shim
|
|
269
|
+
*
|
|
270
|
+
* In CopilotKit V1, `useChatContext()` from `@copilotkit/react-ui` provided
|
|
271
|
+
* `{ open, setOpen, labels, icons }`. In V2, the CopilotSidebar manages its
|
|
272
|
+
* own state, but adapter components within the sidebar still need access to
|
|
273
|
+
* open/close state.
|
|
274
|
+
*
|
|
275
|
+
* This shim re-creates the V1 interface using React context so that the
|
|
276
|
+
* design system's adapter components (HeaderAdapter, ButtonAdapter) continue
|
|
277
|
+
* to work without changes.
|
|
278
|
+
*
|
|
279
|
+
* The consuming app should wrap the sidebar in `<ChatContextProvider>` or
|
|
280
|
+
* use the V2 CopilotSidebar which provides its own context.
|
|
281
|
+
*/
|
|
282
|
+
interface ChatContextValue {
|
|
283
|
+
open: boolean;
|
|
284
|
+
setOpen: (open: boolean) => void;
|
|
285
|
+
labels?: Record<string, string>;
|
|
286
|
+
icons?: Record<string, React.ReactNode>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* V2-compatible replacement for `useChatContext` from `@copilotkit/react-ui`.
|
|
290
|
+
*
|
|
291
|
+
* Falls back to trying the V1 import if the shim context is not provided,
|
|
292
|
+
* so this works in both V1 and V2 environments.
|
|
293
|
+
*/
|
|
294
|
+
declare function useChatContext(): ChatContextValue;
|
|
295
|
+
|
|
296
|
+
export { ActionExecutionAdapter, type CopilotErrorEvent, CustomCopilotSidebar, type CustomCopilotSidebarProps, InputAdapter, CustomCopilotSidebar$1 as IntegratedSidebar, type CustomCopilotSidebarProps$1 as IntegratedSidebarProps, ReportIssueCallback, UserMessageAdapter, useChatContext };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { R as ReportIssueCallback } from '../Window-
|
|
2
|
-
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-
|
|
3
|
-
import { RenderMessageProps, InputProps, UserMessageProps } from '@copilotkit/react-ui';
|
|
4
|
-
export { useChatContext } from '@copilotkit/react-ui';
|
|
5
|
-
import * as React$1 from 'react';
|
|
1
|
+
import { R as ReportIssueCallback } from '../Window-DTASLUB2.js';
|
|
2
|
+
export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, E as AdapterErrorCategory, f as AgentState, e as AgentStateProps, t as AssistantMessage, g as AssistantMessageAdapter, o as AssistantMessageProps, k as Button, B as ButtonProps, i as ButtonSize, j as ButtonVariant, u as FileAttachment, p as FileAttachmentProps, l as Footer, F as FooterProps, m as Header, H as HeaderProps, n as Input, I as InputProps, M as Message, v as Messages, w as MessagesList, x as MessagesListContainer, y as MessagesListContent, q as MessagesListProps, s as MessagesProps, D as Response, C as ResponseProps, G as StreamErrorMessage, S as StreamErrorMessageProps, N as StreamStatusIndicator, L as StreamStatusIndicatorProps, K as StreamingText, J as StreamingTextProps, P as Suggestions, O as SuggestionsProps, z as UserMessage, U as UserMessageProps, Q as Window, W as WindowProps, h as clearToolCalls, r as registerToolCall } from '../Window-DTASLUB2.js';
|
|
6
3
|
import React__default, { ReactNode } from 'react';
|
|
7
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
5
|
import '@react-aria/button';
|
|
@@ -18,6 +15,30 @@ import 'styled-components/dist/types';
|
|
|
18
15
|
* Displays tool calls using the AgentState component.
|
|
19
16
|
*/
|
|
20
17
|
|
|
18
|
+
interface Message$1 {
|
|
19
|
+
id?: string;
|
|
20
|
+
role?: string;
|
|
21
|
+
content?: string;
|
|
22
|
+
type?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
arguments?: Record<string, unknown> | string;
|
|
25
|
+
isActionExecutionMessage?: () => boolean;
|
|
26
|
+
}
|
|
27
|
+
interface RenderMessageProps {
|
|
28
|
+
message: Message$1;
|
|
29
|
+
inProgress: boolean;
|
|
30
|
+
index: number;
|
|
31
|
+
isCurrentMessage: boolean;
|
|
32
|
+
actionResult?: string;
|
|
33
|
+
AssistantMessage?: React__default.ComponentType<any>;
|
|
34
|
+
UserMessage?: React__default.ComponentType<any>;
|
|
35
|
+
ImageRenderer?: React__default.ComponentType<any>;
|
|
36
|
+
onRegenerate?: (messageId: string) => void;
|
|
37
|
+
onCopy?: (message: string) => void;
|
|
38
|
+
onThumbsUp?: (message: any) => void;
|
|
39
|
+
onThumbsDown?: (message: any) => void;
|
|
40
|
+
markdownTagRenderers?: Record<string, React__default.ComponentType<any>>;
|
|
41
|
+
}
|
|
21
42
|
/**
|
|
22
43
|
* ActionExecutionAdapter - Renders tool/action execution messages in chat
|
|
23
44
|
*
|
|
@@ -37,12 +58,52 @@ declare const ActionExecutionAdapter: React__default.FC<RenderMessageProps>;
|
|
|
37
58
|
* 3. Manages input state and submission
|
|
38
59
|
*/
|
|
39
60
|
|
|
61
|
+
interface Message {
|
|
62
|
+
id?: string;
|
|
63
|
+
role?: string;
|
|
64
|
+
content?: string;
|
|
65
|
+
}
|
|
66
|
+
interface CopilotInputProps {
|
|
67
|
+
inProgress: boolean;
|
|
68
|
+
onSend: (text: string) => Promise<Message>;
|
|
69
|
+
isVisible?: boolean;
|
|
70
|
+
onStop?: () => void;
|
|
71
|
+
onUpload?: () => void;
|
|
72
|
+
hideStopButton?: boolean;
|
|
73
|
+
}
|
|
40
74
|
/**
|
|
41
75
|
* Adapter that converts CopilotKit's InputProps to our custom component
|
|
42
76
|
*/
|
|
43
|
-
declare const InputAdapter: React__default.FC<
|
|
77
|
+
declare const InputAdapter: React__default.FC<CopilotInputProps>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Adapter component that bridges custom UserMessage with CopilotKit's expected interface
|
|
81
|
+
*
|
|
82
|
+
* This adapter:
|
|
83
|
+
* 1. Converts CopilotKit's UserMessageProps to our custom component props
|
|
84
|
+
* 2. Extracts message content from CopilotKit's message object
|
|
85
|
+
* 3. Handles image messages appropriately
|
|
86
|
+
*/
|
|
44
87
|
|
|
45
|
-
|
|
88
|
+
interface UserMessageData {
|
|
89
|
+
content?: string;
|
|
90
|
+
image?: {
|
|
91
|
+
format: string;
|
|
92
|
+
bytes: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
interface CopilotUserMessageProps {
|
|
96
|
+
message?: UserMessageData;
|
|
97
|
+
ImageRenderer: React__default.ComponentType<{
|
|
98
|
+
image: {
|
|
99
|
+
format: string;
|
|
100
|
+
bytes: string;
|
|
101
|
+
};
|
|
102
|
+
content?: string;
|
|
103
|
+
}>;
|
|
104
|
+
rawData?: any;
|
|
105
|
+
}
|
|
106
|
+
declare const UserMessageAdapter: React__default.NamedExoticComponent<CopilotUserMessageProps>;
|
|
46
107
|
|
|
47
108
|
/**
|
|
48
109
|
* Complete CopilotSidebar Integration Example
|
|
@@ -203,4 +264,33 @@ declare namespace CustomCopilotSidebar {
|
|
|
203
264
|
var displayName: string;
|
|
204
265
|
}
|
|
205
266
|
|
|
206
|
-
|
|
267
|
+
/**
|
|
268
|
+
* V2 Migration: useChatContext shim
|
|
269
|
+
*
|
|
270
|
+
* In CopilotKit V1, `useChatContext()` from `@copilotkit/react-ui` provided
|
|
271
|
+
* `{ open, setOpen, labels, icons }`. In V2, the CopilotSidebar manages its
|
|
272
|
+
* own state, but adapter components within the sidebar still need access to
|
|
273
|
+
* open/close state.
|
|
274
|
+
*
|
|
275
|
+
* This shim re-creates the V1 interface using React context so that the
|
|
276
|
+
* design system's adapter components (HeaderAdapter, ButtonAdapter) continue
|
|
277
|
+
* to work without changes.
|
|
278
|
+
*
|
|
279
|
+
* The consuming app should wrap the sidebar in `<ChatContextProvider>` or
|
|
280
|
+
* use the V2 CopilotSidebar which provides its own context.
|
|
281
|
+
*/
|
|
282
|
+
interface ChatContextValue {
|
|
283
|
+
open: boolean;
|
|
284
|
+
setOpen: (open: boolean) => void;
|
|
285
|
+
labels?: Record<string, string>;
|
|
286
|
+
icons?: Record<string, React.ReactNode>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* V2-compatible replacement for `useChatContext` from `@copilotkit/react-ui`.
|
|
290
|
+
*
|
|
291
|
+
* Falls back to trying the V1 import if the shim context is not provided,
|
|
292
|
+
* so this works in both V1 and V2 environments.
|
|
293
|
+
*/
|
|
294
|
+
declare function useChatContext(): ChatContextValue;
|
|
295
|
+
|
|
296
|
+
export { ActionExecutionAdapter, type CopilotErrorEvent, CustomCopilotSidebar, type CustomCopilotSidebarProps, InputAdapter, CustomCopilotSidebar$1 as IntegratedSidebar, type CustomCopilotSidebarProps$1 as IntegratedSidebarProps, ReportIssueCallback, UserMessageAdapter, useChatContext };
|