@interopio/io-assist-react 1.0.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/README.internal.md +467 -0
- package/README.md +503 -0
- package/changelog.md +2 -0
- package/dist/IoAssist.d.ts +12 -0
- package/dist/actions/abortActiveStream.d.ts +2 -0
- package/dist/actions/deleteThread.d.ts +2 -0
- package/dist/actions/elicitation.d.ts +13 -0
- package/dist/actions/initIoAiWeb.d.ts +3 -0
- package/dist/actions/initIoConnect.d.ts +9 -0
- package/dist/actions/mcpAppEvents.d.ts +4 -0
- package/dist/actions/newConversation.d.ts +2 -0
- package/dist/actions/processResponseStream.d.ts +3 -0
- package/dist/actions/renameThread.d.ts +2 -0
- package/dist/actions/sampling.d.ts +5 -0
- package/dist/actions/selectThread.d.ts +2 -0
- package/dist/actions/sendUserMessage.d.ts +3 -0
- package/dist/actions/toggleFavoritePrompt.d.ts +7 -0
- package/dist/actions/toggleTool.d.ts +2 -0
- package/dist/components/chat/ActivePanelModal.d.ts +6 -0
- package/dist/components/chat/AiDisclaimer.d.ts +6 -0
- package/dist/components/chat/Chat.d.ts +2 -0
- package/dist/components/chat/ConfirmModal.d.ts +8 -0
- package/dist/components/chat/WelcomeHeading.d.ts +6 -0
- package/dist/components/header/Header.d.ts +2 -0
- package/dist/components/input-area/InputArea.d.ts +8 -0
- package/dist/components/messages/AssistantMessage.d.ts +10 -0
- package/dist/components/messages/McpAppResource.d.ts +11 -0
- package/dist/components/messages/MdFormatter.d.ts +6 -0
- package/dist/components/messages/MessageArea.d.ts +7 -0
- package/dist/components/messages/ToolMessage.d.ts +9 -0
- package/dist/components/messages/ToolTraceMessage.d.ts +9 -0
- package/dist/components/messages/UserMessage.d.ts +9 -0
- package/dist/components/messages/mdUtils.d.ts +1 -0
- package/dist/components/messages/prismTwilightTheme.d.ts +2 -0
- package/dist/components/prompt/FavoritePromptList.d.ts +2 -0
- package/dist/components/prompt/PromptListItem.d.ts +8 -0
- package/dist/components/prompt/PromptListPanel.d.ts +6 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +33 -0
- package/dist/components/shared/Icon.d.ts +8 -0
- package/dist/components/shared/IconButton.d.ts +11 -0
- package/dist/components/shared/Modal.d.ts +12 -0
- package/dist/components/shared/SearchInput.d.ts +8 -0
- package/dist/components/shared/ToggleInput.d.ts +8 -0
- package/dist/components/shared/Tooltip.d.ts +10 -0
- package/dist/components/shared/icons.d.ts +37 -0
- package/dist/components/threads/ThreadHistory.d.ts +6 -0
- package/dist/components/threads/ThreadHistoryListItem.d.ts +18 -0
- package/dist/components/threads/ThreadHistoryPanel.d.ts +7 -0
- package/dist/components/tool/ToolListItem.d.ts +8 -0
- package/dist/components/tool/ToolListPanel.d.ts +2 -0
- package/dist/components/working-context-panel/WorkingContextPanel.d.ts +2 -0
- package/dist/constants/modalActions.d.ts +11 -0
- package/dist/constants/uiStrings.d.ts +141 -0
- package/dist/context/IoAssistContext.d.ts +14 -0
- package/dist/files/inter-latin-wght-normal.woff2 +0 -0
- package/dist/hooks/useHoverMouseFollow.d.ts +27 -0
- package/dist/hooks/useIoAiWebApi.d.ts +19 -0
- package/dist/hooks/useIoAiWebBootstrap.d.ts +8 -0
- package/dist/hooks/useIoConnectApi.d.ts +12 -0
- package/dist/hooks/useIoConnectBootstrap.d.ts +10 -0
- package/dist/hooks/useIsMobileViewport.d.ts +1 -0
- package/dist/index.cjs +41 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3624 -0
- package/dist/index.js.map +1 -0
- package/dist/stores/agent.d.ts +15 -0
- package/dist/stores/app-lifecycle.d.ts +21 -0
- package/dist/stores/confirm-modal.d.ts +29 -0
- package/dist/stores/index.d.ts +32 -0
- package/dist/stores/mcp-apps.d.ts +13 -0
- package/dist/stores/message.d.ts +33 -0
- package/dist/stores/prompt.d.ts +16 -0
- package/dist/stores/response-stream.d.ts +31 -0
- package/dist/stores/thread.d.ts +17 -0
- package/dist/stores/tool.d.ts +15 -0
- package/dist/stores/working-context.d.ts +16 -0
- package/dist/styles.css +1 -0
- package/dist/types/agent.d.ts +8 -0
- package/dist/types/config.d.ts +40 -0
- package/dist/types/icon.d.ts +5 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/loading.d.ts +38 -0
- package/dist/types/message.d.ts +56 -0
- package/dist/types/panel.d.ts +6 -0
- package/dist/types/prompt.d.ts +17 -0
- package/dist/types/stream.d.ts +22 -0
- package/dist/types/thread.d.ts +15 -0
- package/dist/types/tool.d.ts +15 -0
- package/dist/utils/confirmModal.d.ts +5 -0
- package/dist/utils/ioModals.d.ts +21 -0
- package/dist/utils/logger.d.ts +34 -0
- package/dist/utils/mcpAppModal.d.ts +3 -0
- package/dist/utils/messageConverter.d.ts +3 -0
- package/dist/utils/messageUtils.d.ts +16 -0
- package/dist/utils/safeStringify.d.ts +1 -0
- package/dist/utils/streamUtils.d.ts +15 -0
- package/dist/utils/threadUtils.d.ts +16 -0
- package/package.json +65 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IoAiWeb } from '@interopio/ai-web';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
appInstance: IoAiWeb.McpApps.AppInstance;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Mounts the SDK-provided DOM element of an MCP App instance into a container div.
|
|
8
|
+
* The element is owned by the SDK — do not remove it on unmount, just detach.
|
|
9
|
+
*/
|
|
10
|
+
export declare const McpAppResource: React.FC<Props>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { UIToolMessage } from '../../types/message';
|
|
3
|
+
type Props = {
|
|
4
|
+
tool: UIToolMessage;
|
|
5
|
+
parentToolTraceId: string;
|
|
6
|
+
onToggle: (toolId: string, parentId: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ToolMessage: React.FC<Props>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ToolTraceState } from '../../types';
|
|
3
|
+
type ToolTraceProps = {
|
|
4
|
+
trace: ToolTraceState;
|
|
5
|
+
onToggle: (messageId: string) => void;
|
|
6
|
+
onToggleTool: (toolId: string, parentId: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ToolTraceMessage: React.FC<ToolTraceProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const textToJSONMarkdown: (content: unknown) => string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* When true, hold the bottom spacer expanded so newly-added content stays
|
|
7
|
+
* anchored near the top of the visible viewport as the assistant streams.
|
|
8
|
+
* When false, the spacer collapses by the overflow as content grows.
|
|
9
|
+
* Used for the *continuous* anchoring concern, NOT the one-shot snap.
|
|
10
|
+
*/
|
|
11
|
+
shouldExpandSpacer?: boolean;
|
|
12
|
+
/** Force-scroll to bottom when this flips true (e.g. after a thread fetch). */
|
|
13
|
+
isForceScrollToBottomEnabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Monotonically-increasing counter. Every time it changes, the component
|
|
16
|
+
* fires a one-shot "snap to top" (expand spacer + scrollToBottom). This
|
|
17
|
+
* is the imperative path used when the user sends a new message —
|
|
18
|
+
* deterministic, not derived from any other state.
|
|
19
|
+
*/
|
|
20
|
+
snapToTopTrigger?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Mirrors `libs/io-assist-ng/.../scroll-area.component.html/.ts`:
|
|
24
|
+
* - host is `flex flex-col flex-1 min-h-0 relative`
|
|
25
|
+
* - the inner scroller has `overflow-y-auto custom-scrollbar custom-scrollbar-no-gutter`
|
|
26
|
+
* - the scroll-to-bottom button is rendered on the host (NOT inside the
|
|
27
|
+
* scroller), so its `absolute bottom-5` sits at the viewport bottom rather
|
|
28
|
+
* than at `scrollHeight - 5px` (which is what we'd get if we placed it
|
|
29
|
+
* inside the scrollable element)
|
|
30
|
+
* - the spacer sits at the bottom of the scroller content
|
|
31
|
+
*/
|
|
32
|
+
export declare const ScrollArea: React.FC<Props>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type IconButtonVariant = 'default' | 'danger';
|
|
3
|
+
type IconButtonProps = {
|
|
4
|
+
size?: number;
|
|
5
|
+
containerSize?: number;
|
|
6
|
+
testId?: string;
|
|
7
|
+
variant?: IconButtonVariant;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>;
|
|
10
|
+
export declare const IconButton: React.FC<IconButtonProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ModalProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
showCloseIcon?: boolean;
|
|
7
|
+
footer?: React.ReactNode;
|
|
8
|
+
testId?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const Modal: React.FC<ModalProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
type Props = {
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
position?: TooltipPosition;
|
|
6
|
+
offset?: number;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const Tooltip: React.FC<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const ThreadHistoryIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const CloseIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const HomeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ChevronIcon: React.FC<{
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const ChevronRightIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ChevronUpIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ChevronDownIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const CircleFilledIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const CircleOutlineIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const CopyIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const CheckIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const ReloadIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const PencilIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const TrashIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const SearchIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
19
|
+
export declare const InfoIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
20
|
+
export declare const ArrowUpIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const PaperPlaneIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const StopIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const PromptIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const ToolIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const PromptPanelIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const ToolPanelIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const PromptDotIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const StarFilledIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const StarIcon: React.FC<{
|
|
30
|
+
filled: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const Spinner: React.FC<{
|
|
33
|
+
className?: string;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const SpinnerIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
36
|
+
export declare const IoAssistLogoDark: () => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const IoAssistLogoLight: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ThreadHistoryListItemProps = {
|
|
3
|
+
threadId: string;
|
|
4
|
+
title: string;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isEditing: boolean;
|
|
7
|
+
editValue: string;
|
|
8
|
+
hasNotification: boolean;
|
|
9
|
+
streamStatus?: string;
|
|
10
|
+
onSelect: (threadId: string) => void;
|
|
11
|
+
onStartEditing: (threadId: string, title: string, e: React.MouseEvent) => void;
|
|
12
|
+
onCommitEdit: (threadId: string) => void;
|
|
13
|
+
onEditChange: (value: string) => void;
|
|
14
|
+
onEditKeyDown: (e: React.KeyboardEvent, threadId: string) => void;
|
|
15
|
+
onDelete: (threadId: string, e: React.MouseEvent) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const ThreadHistoryListItem: React.FC<ThreadHistoryListItemProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ELICITATION_ACTION: {
|
|
2
|
+
readonly ACCEPT: "accept";
|
|
3
|
+
readonly DECLINE: "decline";
|
|
4
|
+
readonly CANCEL: "cancel";
|
|
5
|
+
};
|
|
6
|
+
export type ElicitationAction = (typeof ELICITATION_ACTION)[keyof typeof ELICITATION_ACTION];
|
|
7
|
+
export declare const SAMPLING_ACTION: {
|
|
8
|
+
readonly ACCEPT: "accept";
|
|
9
|
+
readonly DECLINE: "decline";
|
|
10
|
+
};
|
|
11
|
+
export type SamplingAction = (typeof SAMPLING_ACTION)[keyof typeof SAMPLING_ACTION];
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export declare const UI_STRINGS: {
|
|
2
|
+
GENERAL: {
|
|
3
|
+
WELCOME_MESSAGE: (user?: string) => string;
|
|
4
|
+
AI_CONTENT_INFO: string;
|
|
5
|
+
INITIALIZING_SERVICES: string;
|
|
6
|
+
CANNOT_CONNECT_TO_IO: string;
|
|
7
|
+
IO_INTEL_INIT_ERROR: string;
|
|
8
|
+
DOCUMENTATION_LINK: (url?: string) => string;
|
|
9
|
+
REFRESH: string;
|
|
10
|
+
EDIT: string;
|
|
11
|
+
DELETE: string;
|
|
12
|
+
SAVE: string;
|
|
13
|
+
CANCEL: string;
|
|
14
|
+
CONFIRM: string;
|
|
15
|
+
SUBMIT: string;
|
|
16
|
+
SEARCH: string;
|
|
17
|
+
LOADING: string;
|
|
18
|
+
COPY: string;
|
|
19
|
+
RELOAD: string;
|
|
20
|
+
NO_SEARCH_RESULTS: string;
|
|
21
|
+
};
|
|
22
|
+
INPUT_COMPONENT: {
|
|
23
|
+
DEFAULT_PLACEHOLDER: string;
|
|
24
|
+
INPUT_PLACEHOLDER: string;
|
|
25
|
+
AI_DISCLAIMER: string;
|
|
26
|
+
};
|
|
27
|
+
PANEL_COMPONENT: {
|
|
28
|
+
DEFAULT_TITLE: string;
|
|
29
|
+
CLOSE_BUTTON: string;
|
|
30
|
+
};
|
|
31
|
+
WORKING_CONTEXT_PANEL_COMPONENT: {
|
|
32
|
+
TITLE: string;
|
|
33
|
+
VIEW_WORKING_CONTEXT_BUTTON: string;
|
|
34
|
+
LOADING_CONTEXT: string;
|
|
35
|
+
CALLOUT_TEXT: string;
|
|
36
|
+
};
|
|
37
|
+
CHAT_COMPONENT: {
|
|
38
|
+
LOGOUT: string;
|
|
39
|
+
};
|
|
40
|
+
THREAD_HISTORY_COMPONENT: {
|
|
41
|
+
NO_THREADS: string;
|
|
42
|
+
LOADING_THREADS: string;
|
|
43
|
+
NEW_CONVERSATION: string;
|
|
44
|
+
DIVIDERS: {
|
|
45
|
+
JUST_NOW: string;
|
|
46
|
+
FIVE_MINS_AGO: string;
|
|
47
|
+
THIRTY_MINS_AGO: string;
|
|
48
|
+
ONE_HOUR_AGO: string;
|
|
49
|
+
TWO_HOURS_AGO: string;
|
|
50
|
+
SIX_HOURS_AGO: string;
|
|
51
|
+
TWELVE_HOURS_AGO: string;
|
|
52
|
+
TODAY: string;
|
|
53
|
+
YESTERDAY: string;
|
|
54
|
+
TWO_DAYS_AGO: string;
|
|
55
|
+
LAST_WEEK: string;
|
|
56
|
+
TWO_WEEKS_AGO: string;
|
|
57
|
+
ONE_MONTH_AGO: string;
|
|
58
|
+
THREE_MONTHS_AGO: string;
|
|
59
|
+
SIX_MONTHS_AGO: string;
|
|
60
|
+
MORE_THAN_YEAR_AGO: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
PROMPT_LIST_COMPONENT: {
|
|
64
|
+
AVAILABLE_PROMPTS: string;
|
|
65
|
+
FAVORITE_PROMPTS: string;
|
|
66
|
+
NO_PROMPTS: string;
|
|
67
|
+
NO_PROMPTS_CONFIGURED: string;
|
|
68
|
+
LOADING_PROMPTS: string;
|
|
69
|
+
NO_FAVORITE_PROMPTS: string;
|
|
70
|
+
NO_PROMPTS_SEE_MORE: string;
|
|
71
|
+
INPUT_TOOLTIP: string;
|
|
72
|
+
};
|
|
73
|
+
TOOL_LIST_COMPONENT: {
|
|
74
|
+
AVAILABLE_TOOLS: string;
|
|
75
|
+
NO_FILTERED_TOOLS: string;
|
|
76
|
+
NO_TOOLS: string;
|
|
77
|
+
NO_TOOLS_SEE_MORE: string;
|
|
78
|
+
LOADING_TOOLS: string;
|
|
79
|
+
INPUT_TOOLTIP: string;
|
|
80
|
+
ENABLE_BUTTON: string;
|
|
81
|
+
DISABLE_BUTTON: string;
|
|
82
|
+
};
|
|
83
|
+
TOOL_MESSAGE: {
|
|
84
|
+
TOOL_EXECUTION_SUCCESS: string;
|
|
85
|
+
TOOL_EXECUTION_PENDING: string;
|
|
86
|
+
};
|
|
87
|
+
TOOL_TRACE_MESSAGE: {
|
|
88
|
+
EXPAND_BUTTON_TEXT: string;
|
|
89
|
+
COLLAPSE_BUTTON_TEXT: string;
|
|
90
|
+
CLOSE_BUTTON_TEXT: string;
|
|
91
|
+
};
|
|
92
|
+
THREAD_HISTORY: {
|
|
93
|
+
NEW_CONVERSATION: string;
|
|
94
|
+
NO_CONVERSATIONS: string;
|
|
95
|
+
};
|
|
96
|
+
WORKING_CONTEXT_PANEL: {
|
|
97
|
+
TITLE: string;
|
|
98
|
+
DESCRIPTION: string;
|
|
99
|
+
EMPTY: string;
|
|
100
|
+
};
|
|
101
|
+
PROMPT_LIST_PANEL: {
|
|
102
|
+
TITLE: string;
|
|
103
|
+
SEARCH_PLACEHOLDER: string;
|
|
104
|
+
EMPTY: string;
|
|
105
|
+
};
|
|
106
|
+
TOOL_LIST_PANEL: {
|
|
107
|
+
TITLE: string;
|
|
108
|
+
SEARCH_PLACEHOLDER: string;
|
|
109
|
+
EMPTY: string;
|
|
110
|
+
NO_SEARCH_MATCH: string;
|
|
111
|
+
LOADING: string;
|
|
112
|
+
SERVER_LABEL: string;
|
|
113
|
+
};
|
|
114
|
+
WELCOME_SCREEN: {
|
|
115
|
+
TITLE: string;
|
|
116
|
+
SUBTITLE: string;
|
|
117
|
+
FAVORITE_PROMPTS_LABEL: string;
|
|
118
|
+
};
|
|
119
|
+
LOADING_STATE: {
|
|
120
|
+
LOADING: string;
|
|
121
|
+
ERROR: string;
|
|
122
|
+
RETRY: string;
|
|
123
|
+
};
|
|
124
|
+
SAMPLING_MODAL: {
|
|
125
|
+
TITLE: string;
|
|
126
|
+
HEADING: string;
|
|
127
|
+
TEXT: string;
|
|
128
|
+
};
|
|
129
|
+
ELICITATION_MODAL: {
|
|
130
|
+
TITLE: string;
|
|
131
|
+
HEADING: string;
|
|
132
|
+
FALLBACK_TEXT: string;
|
|
133
|
+
};
|
|
134
|
+
MCP_APP_REPLACE_MODAL: {
|
|
135
|
+
TITLE: string;
|
|
136
|
+
HEADING: string;
|
|
137
|
+
TEXT: (toolName: string) => string;
|
|
138
|
+
REPLACE_BUTTON: string;
|
|
139
|
+
NEW_INSTANCE_BUTTON: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { IoAssistStore } from '../stores';
|
|
3
|
+
import { IoAssistStaticConfig, IoAssistDynamicConfig } from '../types';
|
|
4
|
+
export declare const IoAssistConfigContext: React.Context<IoAssistStaticConfig | null>;
|
|
5
|
+
export declare const IoAssistDynamicConfigContext: React.Context<IoAssistDynamicConfig | null>;
|
|
6
|
+
export type IoAssistProviderProps = {
|
|
7
|
+
staticConfig: IoAssistStaticConfig;
|
|
8
|
+
dynamicConfig: IoAssistDynamicConfig;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const IoAssistProvider: React.FC<IoAssistProviderProps>;
|
|
12
|
+
export declare function useIoAssistStore<T>(selector: (store: IoAssistStore) => T): T;
|
|
13
|
+
export declare function useIoAssistConfig(): IoAssistStaticConfig;
|
|
14
|
+
export declare function useIoAssistDynamicConfig(): IoAssistDynamicConfig;
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
/**
|
|
3
|
+
* CSS `background` value for an always-visible gradient ring painted
|
|
4
|
+
* behind the hover ring. The hover ring fades in on top of it.
|
|
5
|
+
*/
|
|
6
|
+
staticGradient?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Hook that replicates the Angular `[animationEffect]="AnimationType.HOVER_MOUSE_FOLLOW"` behavior.
|
|
10
|
+
* Adds a gradient border glow that rotates to follow the mouse position on hover.
|
|
11
|
+
* Pass `staticGradient` to keep an at-rest gradient ring visible behind it.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const { ref, handlers } = useHoverMouseFollow();
|
|
16
|
+
* <button ref={ref} {...handlers}>Content</button>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function useHoverMouseFollow<T extends HTMLElement = HTMLElement>(options?: Options): {
|
|
20
|
+
ref: import('react').RefObject<T | null>;
|
|
21
|
+
handlers: {
|
|
22
|
+
onMouseEnter: () => void;
|
|
23
|
+
onMouseLeave: () => void;
|
|
24
|
+
onMouseMove: (event: React.MouseEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IoAiWeb } from '@interopio/ai-web';
|
|
2
|
+
export type UseIoAiWebApi = {
|
|
3
|
+
api: IoAiWeb.API | null;
|
|
4
|
+
isReady: boolean;
|
|
5
|
+
sendMessage: (text: string) => Promise<void>;
|
|
6
|
+
abortMessage: () => void;
|
|
7
|
+
newConversation: () => Promise<void>;
|
|
8
|
+
selectThread: (threadId: string) => Promise<void>;
|
|
9
|
+
renameThread: (threadId: string, title: string) => Promise<void>;
|
|
10
|
+
deleteThread: (threadId: string) => Promise<void>;
|
|
11
|
+
toggleTool: (name: string, enabled: boolean) => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Accessor hook for the IoAiWeb SDK instance with the most-used
|
|
15
|
+
* orchestrations baked in. Pairs with `useIoAiWebBootstrap()` which
|
|
16
|
+
* boots the SDK once at the app root.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export declare function useIoAiWebApi(): UseIoAiWebApi;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initialises IoAiWeb once io.Connect is ready.
|
|
3
|
+
* Triggers agent listing and prompt parsing after successful init.
|
|
4
|
+
*
|
|
5
|
+
* Thin React shell — the actual SDK adapter lives in
|
|
6
|
+
* `actions/initIoAiWeb.ts`. Mirrors ng's IoAiWebService pattern.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useIoAiWebBootstrap(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IOConnectBrowser } from '@interopio/browser';
|
|
2
|
+
export type UseIoConnectApi = {
|
|
3
|
+
api: IOConnectBrowser.API | null;
|
|
4
|
+
isReady: boolean;
|
|
5
|
+
toggleFavoritePrompt: (name: string) => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Accessor hook for the io.Connect SDK instance with persistence-aware
|
|
9
|
+
* orchestrations baked in. Pairs with `useIoConnect()` which boots the
|
|
10
|
+
* SDK once at the app root.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useIoConnectApi(): UseIoConnectApi;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages the io.Connect lifecycle:
|
|
3
|
+
* 1. Initialises IOBrowser or IODesktop from static config
|
|
4
|
+
* 2. Sets isIoConnectReady when connected
|
|
5
|
+
* 3. Subscribes to theme changes → applies dark/light class to <html>
|
|
6
|
+
*
|
|
7
|
+
* Thin React shell — the actual SDK adapter lives in
|
|
8
|
+
* `actions/initIoConnect.ts`. Mirrors ng's IoService pattern.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useIoConnectBootstrap(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsMobileViewport(): boolean;
|