@agentskit/chat-solid 0.1.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/LICENSE +22 -0
- package/README.md +5 -0
- package/dist/index.cjs +863 -0
- package/dist/index.d.cts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +835 -0
- package/package.json +57 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentManifest, ChatDefinition, ChatSession, ChatThemeInput } from '@agentskit/chat';
|
|
2
|
+
export { ChatDefinition } from '@agentskit/chat';
|
|
3
|
+
import { ComponentRenderFrame, ComponentInteractionEvent, ComponentSelectionEvent } from '@agentskit/chat-protocol';
|
|
4
|
+
import { Message, ChatReturn, ToolCall } from '@agentskit/core';
|
|
5
|
+
import { JSX } from 'solid-js';
|
|
6
|
+
|
|
7
|
+
interface StandardComponentProps {
|
|
8
|
+
readonly frame: ComponentRenderFrame;
|
|
9
|
+
readonly manifest: ComponentManifest;
|
|
10
|
+
readonly onInteract: (event: ComponentInteractionEvent) => void;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const StandardComponent: (props: StandardComponentProps) => JSX.Element | null;
|
|
14
|
+
|
|
15
|
+
type ChatCssVariables = JSX.CSSProperties & {
|
|
16
|
+
readonly [key: `--ak-${string}`]: string | number;
|
|
17
|
+
};
|
|
18
|
+
declare const toChatCssVariables: (input?: ChatThemeInput) => ChatCssVariables;
|
|
19
|
+
interface ChoiceListProps {
|
|
20
|
+
readonly frame: unknown;
|
|
21
|
+
readonly manifest: ComponentManifest;
|
|
22
|
+
readonly onSelect: (event: ComponentSelectionEvent) => void;
|
|
23
|
+
readonly disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare function ChoiceList(props: ChoiceListProps): JSX.Element;
|
|
26
|
+
interface AgentChatProps {
|
|
27
|
+
readonly definition: ChatDefinition;
|
|
28
|
+
readonly placeholder?: string;
|
|
29
|
+
readonly onComponentSelect?: (event: ComponentSelectionEvent) => void;
|
|
30
|
+
readonly onComponentInteract?: (event: ComponentInteractionEvent) => void;
|
|
31
|
+
readonly actionConfirmationTtlMs?: number;
|
|
32
|
+
readonly session?: ChatSession;
|
|
33
|
+
readonly theme?: ChatThemeInput;
|
|
34
|
+
readonly container?: (children: JSX.Element) => JSX.Element;
|
|
35
|
+
readonly message?: (message: Message) => JSX.Element;
|
|
36
|
+
readonly input?: (chat: ChatReturn, disabled: boolean, placeholder?: string) => JSX.Element;
|
|
37
|
+
readonly thinking?: (visible: boolean) => JSX.Element;
|
|
38
|
+
readonly confirmation?: (toolCall: ToolCall, approve: (id: string) => void, deny: (id: string, reason?: string) => void) => JSX.Element;
|
|
39
|
+
readonly choiceList?: (props: ChoiceListProps) => JSX.Element;
|
|
40
|
+
readonly standardComponent?: (props: StandardComponentProps) => JSX.Element;
|
|
41
|
+
}
|
|
42
|
+
declare function AgentChat(props: AgentChatProps): JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { AgentChat, type AgentChatProps, type ChatCssVariables, ChoiceList, type ChoiceListProps, StandardComponent, type StandardComponentProps, toChatCssVariables };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentManifest, ChatDefinition, ChatSession, ChatThemeInput } from '@agentskit/chat';
|
|
2
|
+
export { ChatDefinition } from '@agentskit/chat';
|
|
3
|
+
import { ComponentRenderFrame, ComponentInteractionEvent, ComponentSelectionEvent } from '@agentskit/chat-protocol';
|
|
4
|
+
import { Message, ChatReturn, ToolCall } from '@agentskit/core';
|
|
5
|
+
import { JSX } from 'solid-js';
|
|
6
|
+
|
|
7
|
+
interface StandardComponentProps {
|
|
8
|
+
readonly frame: ComponentRenderFrame;
|
|
9
|
+
readonly manifest: ComponentManifest;
|
|
10
|
+
readonly onInteract: (event: ComponentInteractionEvent) => void;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const StandardComponent: (props: StandardComponentProps) => JSX.Element | null;
|
|
14
|
+
|
|
15
|
+
type ChatCssVariables = JSX.CSSProperties & {
|
|
16
|
+
readonly [key: `--ak-${string}`]: string | number;
|
|
17
|
+
};
|
|
18
|
+
declare const toChatCssVariables: (input?: ChatThemeInput) => ChatCssVariables;
|
|
19
|
+
interface ChoiceListProps {
|
|
20
|
+
readonly frame: unknown;
|
|
21
|
+
readonly manifest: ComponentManifest;
|
|
22
|
+
readonly onSelect: (event: ComponentSelectionEvent) => void;
|
|
23
|
+
readonly disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare function ChoiceList(props: ChoiceListProps): JSX.Element;
|
|
26
|
+
interface AgentChatProps {
|
|
27
|
+
readonly definition: ChatDefinition;
|
|
28
|
+
readonly placeholder?: string;
|
|
29
|
+
readonly onComponentSelect?: (event: ComponentSelectionEvent) => void;
|
|
30
|
+
readonly onComponentInteract?: (event: ComponentInteractionEvent) => void;
|
|
31
|
+
readonly actionConfirmationTtlMs?: number;
|
|
32
|
+
readonly session?: ChatSession;
|
|
33
|
+
readonly theme?: ChatThemeInput;
|
|
34
|
+
readonly container?: (children: JSX.Element) => JSX.Element;
|
|
35
|
+
readonly message?: (message: Message) => JSX.Element;
|
|
36
|
+
readonly input?: (chat: ChatReturn, disabled: boolean, placeholder?: string) => JSX.Element;
|
|
37
|
+
readonly thinking?: (visible: boolean) => JSX.Element;
|
|
38
|
+
readonly confirmation?: (toolCall: ToolCall, approve: (id: string) => void, deny: (id: string, reason?: string) => void) => JSX.Element;
|
|
39
|
+
readonly choiceList?: (props: ChoiceListProps) => JSX.Element;
|
|
40
|
+
readonly standardComponent?: (props: StandardComponentProps) => JSX.Element;
|
|
41
|
+
}
|
|
42
|
+
declare function AgentChat(props: AgentChatProps): JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { AgentChat, type AgentChatProps, type ChatCssVariables, ChoiceList, type ChoiceListProps, StandardComponent, type StandardComponentProps, toChatCssVariables };
|