@cabbage0320/agent-plugin 1.0.0 → 1.0.1
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/hooks/useSpeechRecognition.d.ts +12 -0
- package/dist/index.d.ts +49 -0
- package/dist/lib/utils.d.ts +8 -0
- package/dist/widget/AskUserCard.d.ts +14 -0
- package/dist/widget/ChatHeader.d.ts +5 -0
- package/dist/widget/ChatInput.d.ts +18 -0
- package/dist/widget/ConfirmCloseOverlay.d.ts +8 -0
- package/dist/widget/Launcher.d.ts +7 -0
- package/dist/widget/MessageItem.d.ts +30 -0
- package/dist/widget/MessageList.d.ts +34 -0
- package/dist/widget/ReasoningPanel.d.ts +10 -0
- package/dist/widget/RetryOverlay.d.ts +7 -0
- package/dist/widget/ToolCallBlock.d.ts +11 -0
- package/dist/widget/TypingDots.d.ts +2 -0
- package/dist/widget/constants.d.ts +22 -0
- package/dist/widget/index.d.ts +7 -0
- package/dist/widget/markdown.d.ts +13 -0
- package/dist/widget/types.d.ts +65 -0
- package/dist/widget/utils.d.ts +33 -0
- package/package.json +3 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UseSpeechRecognitionOptions {
|
|
2
|
+
lang?: string;
|
|
3
|
+
onTranscript?: (text: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface UseSpeechRecognitionReturn {
|
|
6
|
+
isSupported: boolean;
|
|
7
|
+
isListening: boolean;
|
|
8
|
+
start: (currentText: string) => void;
|
|
9
|
+
stop: () => void;
|
|
10
|
+
abortQuietly: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function useSpeechRecognition({ lang, onTranscript, }?: UseSpeechRecognitionOptions): UseSpeechRecognitionReturn;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { AiChatWidgetProps } from "./widget";
|
|
2
|
+
export interface ChatOptions {
|
|
3
|
+
/** Base URL of the server hosting the API (e.g. "https://api.example.com"). */
|
|
4
|
+
serverUrl: string;
|
|
5
|
+
/** Agent UUID to scope the conversation to. */
|
|
6
|
+
agentId: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional container selector or element. If omitted, a dedicated div is
|
|
9
|
+
* appended to <body>. The widget always renders inside a Shadow DOM rooted
|
|
10
|
+
* at this element, so host-page styles never affect it.
|
|
11
|
+
*/
|
|
12
|
+
container?: string | HTMLElement;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Mount the AI chat widget onto the page. Safe to call multiple times — a
|
|
16
|
+
* second call will unmount the previous instance first.
|
|
17
|
+
*
|
|
18
|
+
* Returns a Promise that resolves once the widget is mounted. The Promise
|
|
19
|
+
* is also resolved (without mounting) if a subsequent `destroy()` cancels
|
|
20
|
+
* the pending mount.
|
|
21
|
+
*
|
|
22
|
+
* The widget is rendered inside a **Shadow DOM** so that:
|
|
23
|
+
* - Host-page CSS (resets, frameworks, etc.) cannot leak in.
|
|
24
|
+
* - Widget CSS cannot leak out.
|
|
25
|
+
* - No `<link>` tag is required — styles are inlined into the JS bundle.
|
|
26
|
+
*
|
|
27
|
+
* This function is SSR-safe to import: it only touches browser APIs when
|
|
28
|
+
* actually invoked (which should happen inside a `useEffect` or other
|
|
29
|
+
* client-only context).
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Via script tag (UMD build) — no separate CSS needed:
|
|
33
|
+
* <script src="agent-plugin.umd.js"></script>
|
|
34
|
+
* <script>AgentPlugin.init({ serverUrl: "https://api.example.com", agentId: "abc-123" })</script>
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Via ES module import (Next.js / React):
|
|
38
|
+
* import { init } from "agent-plugin";
|
|
39
|
+
* useEffect(() => { init({ serverUrl: "...", agentId: "..." }); }, []);
|
|
40
|
+
*/
|
|
41
|
+
export declare function init(options: ChatOptions): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Unmount the widget and remove the injected host element (including its
|
|
44
|
+
* shadow root). Useful for SPA route changes or when the widget is no longer
|
|
45
|
+
* needed. Also cancels any pending `init()` whose dynamic imports haven't
|
|
46
|
+
* resolved yet.
|
|
47
|
+
*/
|
|
48
|
+
export declare function destroy(): void;
|
|
49
|
+
export type { AiChatWidgetProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple class name combiner — joins truthy string values with spaces.
|
|
3
|
+
* No external dependencies (replaces the previous clsx + tailwind-merge combo,
|
|
4
|
+
* which is unnecessary now that the widget uses hand-written semantic CSS
|
|
5
|
+
* instead of Tailwind utility classes).
|
|
6
|
+
*/
|
|
7
|
+
export type ClassValue = string | false | null | undefined;
|
|
8
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AskUserInput, AskUserOutput } from "./types";
|
|
2
|
+
export interface AskUserCardProps {
|
|
3
|
+
toolCallId: string;
|
|
4
|
+
state: string;
|
|
5
|
+
input?: AskUserInput;
|
|
6
|
+
output?: AskUserOutput;
|
|
7
|
+
errorText?: string;
|
|
8
|
+
interactive: boolean;
|
|
9
|
+
onSubmit: (toolCallId: string, output: AskUserOutput) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Interactive card for the local `ask_user` tool.
|
|
13
|
+
*/
|
|
14
|
+
export declare function AskUserCard({ toolCallId, state, input, output, errorText, interactive, onSubmit, }: AskUserCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A selectable skill shown in the @ mention picker. */
|
|
2
|
+
export interface ChatInputSkill {
|
|
3
|
+
uuid: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string | null;
|
|
6
|
+
}
|
|
7
|
+
/** Composer at the bottom of the chat panel. */
|
|
8
|
+
export declare function ChatInput({ value, onChange, onSend, onStop, isBusy, skills, activeSkillIds, onAddSkill, onRemoveSkill, }: {
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (v: string) => void;
|
|
11
|
+
onSend: () => void;
|
|
12
|
+
onStop: () => void;
|
|
13
|
+
isBusy: boolean;
|
|
14
|
+
skills: ChatInputSkill[];
|
|
15
|
+
activeSkillIds: string[];
|
|
16
|
+
onAddSkill: (skill: ChatInputSkill) => void;
|
|
17
|
+
onRemoveSkill: (uuid: string) => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Modal asking what to do when closing while a reply is still streaming. */
|
|
2
|
+
export declare function ConfirmCloseOverlay({ onBackgroundClose, onStopAndClose, onCancel, }: {
|
|
3
|
+
/** Keep the stream running in the background and close the panel. */
|
|
4
|
+
onBackgroundClose: () => void;
|
|
5
|
+
/** Stop the stream and close the panel. */
|
|
6
|
+
onStopAndClose: () => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Collapsed, edge-docked launcher button (with an optional first-visit hint). */
|
|
2
|
+
export declare function Launcher({ onOpen, showHint, backgroundRunning, }: {
|
|
3
|
+
onOpen: () => void;
|
|
4
|
+
showHint: boolean;
|
|
5
|
+
/** Whether a background stream is still running after the panel was closed. */
|
|
6
|
+
backgroundRunning: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { UIMessage } from "ai";
|
|
2
|
+
import type { AskUserOutput } from "./types";
|
|
3
|
+
export interface MessageItemProps {
|
|
4
|
+
message: UIMessage;
|
|
5
|
+
isLast: boolean;
|
|
6
|
+
isBusy: boolean;
|
|
7
|
+
copied: boolean;
|
|
8
|
+
onCopy: (message: UIMessage) => void;
|
|
9
|
+
onRetry: (message: UIMessage) => void;
|
|
10
|
+
/** Begin inline editing of a user message. */
|
|
11
|
+
onEdit: (message: UIMessage) => void;
|
|
12
|
+
/** Submit the edited text; the parent truncates + re-sends. */
|
|
13
|
+
onEditSubmit: (message: UIMessage, newText: string) => void;
|
|
14
|
+
/** Cancel editing. */
|
|
15
|
+
onEditCancel: () => void;
|
|
16
|
+
/** Id of the message currently being edited (null = none). */
|
|
17
|
+
editingId: string | null;
|
|
18
|
+
disableRetry: boolean;
|
|
19
|
+
onAskUserSubmit: (toolCallId: string, output: AskUserOutput) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders a single chat message.
|
|
23
|
+
*
|
|
24
|
+
* User messages are plain bubbles. Assistant messages walk their parts in
|
|
25
|
+
* document order (see `getMessageBlocks`) so each reasoning segment, tool call
|
|
26
|
+
* and answer keeps its own block. Tool calls that are the local `ask_user`
|
|
27
|
+
* tool are rendered interactively via `AskUserCard`; every other tool gets the
|
|
28
|
+
* compact `ToolCallBlock` status line.
|
|
29
|
+
*/
|
|
30
|
+
export declare function MessageItem({ message, isLast, isBusy, copied, onCopy, onRetry, onEdit, onEditSubmit, onEditCancel, editingId, disableRetry, onAskUserSubmit, }: MessageItemProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { UIMessage } from "ai";
|
|
3
|
+
import type { AskUserOutput } from "./types";
|
|
4
|
+
export interface MessageListProps {
|
|
5
|
+
/** Visible (non-empty) messages to render. */
|
|
6
|
+
messages: UIMessage[];
|
|
7
|
+
/** The last message in the thread (used for truncation/hint logic). */
|
|
8
|
+
lastMessage: UIMessage | undefined;
|
|
9
|
+
isBusy: boolean;
|
|
10
|
+
showThinking: boolean;
|
|
11
|
+
error: Error | undefined;
|
|
12
|
+
copiedId: string | null;
|
|
13
|
+
/** Id of the message currently being edited (null = none). */
|
|
14
|
+
editingId: string | null;
|
|
15
|
+
scrollRef: RefObject<HTMLDivElement | null>;
|
|
16
|
+
onScroll: () => void;
|
|
17
|
+
onCopy: (message: UIMessage) => void;
|
|
18
|
+
onRetry: (message: UIMessage) => void;
|
|
19
|
+
onEdit: (message: UIMessage) => void;
|
|
20
|
+
onEditSubmit: (message: UIMessage, newText: string) => void;
|
|
21
|
+
onEditCancel: () => void;
|
|
22
|
+
onAskUserSubmit: (toolCallId: string, output: AskUserOutput) => void;
|
|
23
|
+
onContinue: () => void;
|
|
24
|
+
/** Greeting text (markdown) shown as the first assistant bubble. Falls back
|
|
25
|
+
* to a default when the agent has none configured. */
|
|
26
|
+
greeting: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Scrollable message area: greeting bubble, the message thread, the
|
|
30
|
+
* "cut-off by tool limit" continuation hint, the typing indicator and the
|
|
31
|
+
* error banner. Auto-scroll behaviour is driven by the parent via `scrollRef`
|
|
32
|
+
* + `onScroll` so the stickiness state stays co-located with the send logic.
|
|
33
|
+
*/
|
|
34
|
+
export declare function MessageList({ messages, lastMessage, isBusy, showThinking, error, copiedId, editingId, scrollRef, onScroll, onCopy, onRetry, onEdit, onEditSubmit, onEditCancel, onAskUserSubmit, onContinue, greeting, }: MessageListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collapsible "thinking" panel for an assistant message's reasoning stream.
|
|
3
|
+
* Compact by design: a single toggle row; expands to show the reasoning text.
|
|
4
|
+
* Auto-expands while actively streaming (no text yet), collapses once the
|
|
5
|
+
* answer has arrived.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ReasoningPanel({ text, streaming, }: {
|
|
8
|
+
text: string;
|
|
9
|
+
streaming: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UIMessage } from "ai";
|
|
2
|
+
/** Confirmation modal before retrying (re-sending) a user message. */
|
|
3
|
+
export declare function RetryOverlay({ target, onConfirm, onCancel, }: {
|
|
4
|
+
target: UIMessage | null;
|
|
5
|
+
onConfirm: () => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolInvocation } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Compact "called tool X" status line for a (non-interactive) tool invocation.
|
|
4
|
+
* Shows the tool name, a spinner while running, and a human-readable state.
|
|
5
|
+
*
|
|
6
|
+
* The interactive `ask_user` tool is rendered separately by `AskUserCard`;
|
|
7
|
+
* this component is for everything else (server-side / MCP tools).
|
|
8
|
+
*/
|
|
9
|
+
export declare function ToolCallBlock({ tool }: {
|
|
10
|
+
tool: ToolInvocation;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for the AI chat widget.
|
|
3
|
+
*
|
|
4
|
+
* Kept in a dedicated module so every sub-component references the same storage
|
|
5
|
+
* keys / greeting text without re-declaring them (which previously led to
|
|
6
|
+
* subtle drift across the single-file implementation).
|
|
7
|
+
*/
|
|
8
|
+
/** localStorage key for the stable per-browser guest id. */
|
|
9
|
+
export declare const GUEST_ID_KEY = "ai_chat_guest_id";
|
|
10
|
+
/** localStorage key for the current conversation id. */
|
|
11
|
+
export declare const CONVERSATION_ID_KEY = "ai_chat_conversation_id";
|
|
12
|
+
/** Persisted open/closed state of the panel, so it survives a page refresh. */
|
|
13
|
+
export declare const PANEL_OPEN_KEY = "ai_chat_panel_open";
|
|
14
|
+
/** First-visit hint bubble on the launcher button. */
|
|
15
|
+
export declare const LAUNCHER_HINT_DISMISSED_KEY = "ai_chat_launcher_hint_dismissed";
|
|
16
|
+
/**
|
|
17
|
+
* Initial greeting shown as an assistant bubble before any real messages exist.
|
|
18
|
+
* Purely presentational — never sent to the server or stored in history.
|
|
19
|
+
*/
|
|
20
|
+
export declare const GREETING = "\u4F60\u597D\uFF0C\u6211\u662F\u672C\u7AD9\u7684 AI \u52A9\u624B\uFF0C\u6709\u4EC0\u4E48\u53EF\u4EE5\u5E2E\u4F60\u7684\u5417\uFF1F";
|
|
21
|
+
/** Name of the local, always-available "ask the user" tool. */
|
|
22
|
+
export declare const ASK_USER_TOOL = "ask_user";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface AiChatWidgetProps {
|
|
2
|
+
/** Base URL of the server hosting the API (no trailing slash). */
|
|
3
|
+
serverUrl: string;
|
|
4
|
+
/** Agent UUID to scope the conversation to. */
|
|
5
|
+
agentId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function AiChatWidget({ serverUrl, agentId }: AiChatWidgetProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Custom markdown renderers. All links open in a new tab (safely) and get a
|
|
4
|
+
* trailing external-link icon so it's clear they navigate away.
|
|
5
|
+
*/
|
|
6
|
+
export declare const markdownComponents: {
|
|
7
|
+
a: ({ children, node: _node, ...props }: ComponentPropsWithoutRef<"a"> & {
|
|
8
|
+
node?: unknown;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
|
+
table: ({ children, node: _node, ...props }: ComponentPropsWithoutRef<"table"> & {
|
|
11
|
+
node?: unknown;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
13
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tool invocation surfaced from a UIMessage's parts, for inline display.
|
|
3
|
+
*
|
|
4
|
+
* Carries the full part payload (input/output/error) so specialized renderers
|
|
5
|
+
* — such as the `ask_user` card — can build an interactive UI straight from the
|
|
6
|
+
* block data instead of re-walking the message parts.
|
|
7
|
+
*/
|
|
8
|
+
export interface ToolInvocation {
|
|
9
|
+
key: string;
|
|
10
|
+
/** Stable id used to report a result back via `addToolOutput`. */
|
|
11
|
+
toolCallId: string;
|
|
12
|
+
toolName: string;
|
|
13
|
+
/** "input-streaming" | "input-available" | "output-available" | "output-error" */
|
|
14
|
+
state: string;
|
|
15
|
+
/** Raw tool input (args the model supplied). */
|
|
16
|
+
input?: unknown;
|
|
17
|
+
/** Raw tool output (result, once available). */
|
|
18
|
+
output?: unknown;
|
|
19
|
+
/** Error text when `state === "output-error"`. */
|
|
20
|
+
errorText?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* An assistant message can interleave several kinds of parts across steps:
|
|
24
|
+
* reasoning -> tool call -> reasoning -> answer text. Walk them in document
|
|
25
|
+
* order and collapse only *consecutive* runs into a single block, so each
|
|
26
|
+
* distinct thinking segment renders as its own panel (rather than all
|
|
27
|
+
* reasoning being merged into one block at the top).
|
|
28
|
+
*/
|
|
29
|
+
export type MessageBlock = {
|
|
30
|
+
kind: "reasoning";
|
|
31
|
+
key: string;
|
|
32
|
+
text: string;
|
|
33
|
+
trailing: boolean;
|
|
34
|
+
} | {
|
|
35
|
+
kind: "tool";
|
|
36
|
+
key: string;
|
|
37
|
+
tool: ToolInvocation;
|
|
38
|
+
} | {
|
|
39
|
+
kind: "text";
|
|
40
|
+
key: string;
|
|
41
|
+
text: string;
|
|
42
|
+
};
|
|
43
|
+
export type AskUserQuestionType = "single" | "multiple" | "text" | "boolean";
|
|
44
|
+
/** Input the model provides when calling the `ask_user` tool. */
|
|
45
|
+
export interface AskUserInput {
|
|
46
|
+
/** The question to present to the user. */
|
|
47
|
+
question: string;
|
|
48
|
+
/** Kind of answer expected: single-choice, multiple-choice, free text, or yes/no. */
|
|
49
|
+
type: AskUserQuestionType;
|
|
50
|
+
/** Candidate options for `single`/`multiple` (ignored for `text` and `boolean`). */
|
|
51
|
+
options?: string[];
|
|
52
|
+
/** Optional extra context shown beneath the question. */
|
|
53
|
+
description?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Result reported back to the model.
|
|
57
|
+
*
|
|
58
|
+
* `selected` always holds the real answers the user gave (normalized to an
|
|
59
|
+
* array). When the user picked the client-side "其他" affordance, `otherText`
|
|
60
|
+
* carries their manual input and `selected` contains the literal `"其他"`.
|
|
61
|
+
*/
|
|
62
|
+
export interface AskUserOutput {
|
|
63
|
+
selected: string[];
|
|
64
|
+
otherText?: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { UIMessage } from "ai";
|
|
2
|
+
import type { MessageBlock, ToolInvocation } from "./types";
|
|
3
|
+
/** Stable per-browser guest id for anonymous conversation grouping. */
|
|
4
|
+
export declare function getGuestId(): string;
|
|
5
|
+
/** Read the persisted conversation id (or null) from localStorage. */
|
|
6
|
+
export declare function getConversationId(): string | null;
|
|
7
|
+
/** Extract concatenated text from a UIMessage's parts. */
|
|
8
|
+
export declare function renderText(message: UIMessage): string;
|
|
9
|
+
/** Extract concatenated reasoning ("thinking") text from a UIMessage's parts. */
|
|
10
|
+
export declare function renderReasoning(message: UIMessage): string;
|
|
11
|
+
/**
|
|
12
|
+
* Tool parts in AI SDK v7 are typed as `tool-<name>` (static tools) or
|
|
13
|
+
* `dynamic-tool` (e.g. MCP tools discovered at runtime). Pull them out so the
|
|
14
|
+
* UI can show a compact "called tool X" status line separate from chat bubbles.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getToolInvocations(message: UIMessage): ToolInvocation[];
|
|
17
|
+
export declare function getMessageBlocks(message: UIMessage): MessageBlock[];
|
|
18
|
+
/**
|
|
19
|
+
* Whether reasoning is the *trailing* part of the message — i.e. the model is
|
|
20
|
+
* currently emitting reasoning and hasn't yet moved on to a tool call or the
|
|
21
|
+
* final answer text. Used to keep the thinking panel expanded only while the
|
|
22
|
+
* reasoning is actively streaming, then auto-collapse once it ends.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isReasoningActive(message: UIMessage): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether an assistant message was cut off by the max-tool-steps limit: its
|
|
27
|
+
* final part is a *completed* tool call (output available/errored) with no
|
|
28
|
+
* answer text after it. Such a message never produced a reply, so the UI shows
|
|
29
|
+
* a "继续" affordance. Works for both live and restored messages.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isTruncatedByToolLimit(message: UIMessage): boolean;
|
|
32
|
+
/** Human-readable Chinese status for a tool invocation state. */
|
|
33
|
+
export declare function toolStatusLabel(state: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabbage0320/agent-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Embeddable AI chat widget SDK for any website.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/agent-plugin.umd.js",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "rollup -c",
|
|
13
|
+
"build": "rollup -c && tsc",
|
|
14
|
+
"build:types": "tsc",
|
|
14
15
|
"dev": "rollup -c -w"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|