wecool-chat 0.7.1 → 0.8.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/CHANGELOG.md +19 -3
- package/README.ja.md +4 -12
- package/README.md +4 -12
- package/dist/browser-Cgo1GySj.js +1358 -0
- package/dist/core/client.d.ts +20 -1
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/consume-stream.d.ts +5 -0
- package/dist/core/consume-stream.d.ts.map +1 -1
- package/dist/core/debug-logger.d.ts +26 -0
- package/dist/core/debug-logger.d.ts.map +1 -0
- package/dist/core/i18n/messages.d.ts +21 -0
- package/dist/core/i18n/messages.d.ts.map +1 -1
- package/dist/core/run-conversation.d.ts +12 -0
- package/dist/core/run-conversation.d.ts.map +1 -1
- package/dist/core/tool-runner.d.ts +7 -1
- package/dist/core/tool-runner.d.ts.map +1 -1
- package/dist/core/types.d.ts +67 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/define-DZ0itsfG.js +4 -0
- package/dist/index.css +3 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13558 -18625
- package/dist/messages-B7Kpa6yx.js +117 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +2 -2
- package/dist/plugins/qrcode/tool.d.ts +9 -6
- package/dist/plugins/qrcode/tool.d.ts.map +1 -1
- package/dist/plugins/qrcode.d.ts +1 -1
- package/dist/plugins/qrcode.js +102 -91
- package/dist/ui/components/ChatFooter.d.ts +2 -2
- package/dist/ui/components/ChatFooter.d.ts.map +1 -1
- package/dist/ui/components/ChatHeader.d.ts +10 -1
- package/dist/ui/components/ChatHeader.d.ts.map +1 -1
- package/dist/ui/components/ChatHeaderMenu.d.ts +1 -1
- package/dist/ui/components/ChatHeaderMenu.d.ts.map +1 -1
- package/dist/ui/components/ChatPanel.d.ts +10 -3
- package/dist/ui/components/ChatPanel.d.ts.map +1 -1
- package/dist/ui/components/ChatWidget.d.ts +1 -1
- package/dist/ui/components/ChatWidget.d.ts.map +1 -1
- package/dist/ui/components/ConversationSelect.d.ts +15 -0
- package/dist/ui/components/ConversationSelect.d.ts.map +1 -0
- package/dist/ui/components/CopyIndicator.d.ts +1 -1
- package/dist/ui/components/CopyIndicator.d.ts.map +1 -1
- package/dist/ui/components/FloatButton.d.ts +1 -1
- package/dist/ui/components/FloatButton.d.ts.map +1 -1
- package/dist/ui/components/MessageActionsPopover.d.ts +1 -1
- package/dist/ui/components/MessageActionsPopover.d.ts.map +1 -1
- package/dist/ui/components/MessageAttachments.d.ts +1 -1
- package/dist/ui/components/MessageAttachments.d.ts.map +1 -1
- package/dist/ui/components/MessageBubble.d.ts +1 -1
- package/dist/ui/components/MessageBubble.d.ts.map +1 -1
- package/dist/ui/components/MessageCopyButton.d.ts +1 -1
- package/dist/ui/components/MessageCopyButton.d.ts.map +1 -1
- package/dist/ui/components/MessageEditor.d.ts +1 -1
- package/dist/ui/components/MessageEditor.d.ts.map +1 -1
- package/dist/ui/components/MessageList.d.ts +1 -1
- package/dist/ui/components/MessageList.d.ts.map +1 -1
- package/dist/ui/components/MessagePopoverButton.d.ts +1 -1
- package/dist/ui/components/MessagePopoverButton.d.ts.map +1 -1
- package/dist/ui/components/MessageRow.d.ts +1 -1
- package/dist/ui/components/MessageRow.d.ts.map +1 -1
- package/dist/ui/components/MessageRowActions.d.ts +1 -1
- package/dist/ui/components/MessageRowActions.d.ts.map +1 -1
- package/dist/ui/components/markdown/CodeBlock.d.ts +1 -1
- package/dist/ui/components/markdown/CodeBlock.d.ts.map +1 -1
- package/dist/ui/components/markdown/MarkdownMessage.d.ts +1 -1
- package/dist/ui/components/markdown/MarkdownMessage.d.ts.map +1 -1
- package/dist/ui/components/markdown/trim-autolink-cjk.d.ts +21 -0
- package/dist/ui/components/markdown/trim-autolink-cjk.d.ts.map +1 -0
- package/dist/ui/hooks/use-send-message.d.ts +14 -0
- package/dist/ui/hooks/use-send-message.d.ts.map +1 -1
- package/dist/ui/hooks/useChatStream.d.ts +21 -0
- package/dist/ui/hooks/useChatStream.d.ts.map +1 -1
- package/dist/ui/hooks/useConversationList.d.ts +29 -0
- package/dist/ui/hooks/useConversationList.d.ts.map +1 -0
- package/dist/ui/types.d.ts +6 -0
- package/dist/ui/types.d.ts.map +1 -1
- package/package.json +26 -26
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/browser-beO7dF90.js +0 -1538
package/dist/core/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolDefinition, Message, ChatEvent } from './types';
|
|
1
|
+
import { ToolDefinition, Message, ChatEvent, ConversationSummary, ConversationDetail } from './types';
|
|
2
2
|
type ChatParams = {
|
|
3
3
|
message?: string;
|
|
4
4
|
tools: ToolDefinition[];
|
|
@@ -17,6 +17,19 @@ type ChatParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
additionalSystemPrompt?: string;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* server `/api/chat` の 4xx エラーレスポンスを構造化して持つ Error。
|
|
22
|
+
*
|
|
23
|
+
* server は `{ code: "MESSAGE_TOO_LONG" | ..., message: string }` 形式を返す。
|
|
24
|
+
* client 側はこの `code` を i18n マップで引いて assistant エラーメッセージを表示する。
|
|
25
|
+
* `code` が無い (旧形式 / 想定外) 場合は `undefined` のままにして、呼び出し側で
|
|
26
|
+
* generic error 文言にフォールバックする。
|
|
27
|
+
*/
|
|
28
|
+
export declare class ChatApiError extends Error {
|
|
29
|
+
readonly status: number;
|
|
30
|
+
readonly code: string | undefined;
|
|
31
|
+
constructor(status: number, code: string | undefined, message: string);
|
|
32
|
+
}
|
|
20
33
|
/**
|
|
21
34
|
* API client for communicating with the chat backend via SSE
|
|
22
35
|
*/
|
|
@@ -27,6 +40,12 @@ export declare class ChatClient {
|
|
|
27
40
|
constructor(endpoint: string, apiKey?: string);
|
|
28
41
|
getConversationId(): string;
|
|
29
42
|
resetConversation(): void;
|
|
43
|
+
/** conversationId を指定の sessionId で上書きする(会話復元時に使用) */
|
|
44
|
+
setConversationId(sessionId: string): void;
|
|
45
|
+
/** GET /api/conversations を呼んで会話一覧を返す */
|
|
46
|
+
listConversations(): Promise<ConversationSummary[]>;
|
|
47
|
+
/** GET /api/conversations/:sessionId を呼んでメッセージ一覧を変換して返す */
|
|
48
|
+
getConversation(sessionId: string): Promise<ConversationDetail>;
|
|
30
49
|
/**
|
|
31
50
|
* Send a chat message or tool results and receive SSE events.
|
|
32
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAYF;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;gBACtB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM;CAMtE;AAmCD;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,cAAc,CAAuB;gBAEjC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAM7C,iBAAiB,IAAI,MAAM;IAO3B,iBAAiB,IAAI,IAAI;IAIzB,qDAAqD;IACrD,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI1C,yCAAyC;IACnC,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAUzD,2DAA2D;IACrD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA4BrE;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC;IAoBhF,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,SAAS;CAgClB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAO1D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAO/D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQ3D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,OAAO,EACf,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACnC,OAAO,CAcT"}
|
|
@@ -12,6 +12,11 @@ export type StreamRoundResult = {
|
|
|
12
12
|
emptyPlaceholderId: string | null;
|
|
13
13
|
/** 本ラウンドで生成した assistant placeholder の ID。後段で削除したい場合に使う */
|
|
14
14
|
placeholderId: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* server `maxTurns` 上限到達を SSE で受け取った場合の true。run-conversation は
|
|
17
|
+
* これを見てループを即終了し、`maxTurnsReachedMessage` を assistant エラーとして表示する。
|
|
18
|
+
*/
|
|
19
|
+
maxTurnsReached: boolean;
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* React 非依存の setState 互換型。`useState<Message[]>` の setter 関数はそのまま代入可能。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consume-stream.d.ts","sourceRoot":"","sources":["../../src/core/consume-stream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,kDAAkD;IAClD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,0DAA0D;IAC1D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"consume-stream.d.ts","sourceRoot":"","sources":["../../src/core/consume-stream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,kDAAkD;IAClD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,0DAA0D;IAC1D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC;AA0H1F;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,cAAc,CAAC,SAAS,CAAC,EACjC,aAAa,WAAW,EACxB,UAAU,MAAM,EAChB,oBAAoB,WAAW,KAC9B,OAAO,CAAC,iBAAiB,CA6B3B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 開発者向け debug ログの出力インターフェース。
|
|
3
|
+
*
|
|
4
|
+
* `ChatConfig.debug: true` のときだけ内部イベント(初期化・送信・完了・エラー・cancel 等)を
|
|
5
|
+
* `console.info` に流す。秘匿値(apiKey / endpoint / メッセージ本文)は載せない前提で、
|
|
6
|
+
* event 名と非機微な要約 detail のみを受け取る。
|
|
7
|
+
*/
|
|
8
|
+
export type DebugLogger = {
|
|
9
|
+
/**
|
|
10
|
+
* 内部イベントを 1 件記録する。
|
|
11
|
+
* @param event - イベント名(`initialized` / `send` / `done` / `error` / `cancel` / `unmounted` 等)
|
|
12
|
+
* @param detail - 非機微な要約(件数・length・locale 等)。秘匿値は渡さない
|
|
13
|
+
*/
|
|
14
|
+
log: (event: string, detail?: unknown) => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* debug モードの有効/無効に応じた `DebugLogger` を生成する。
|
|
18
|
+
*
|
|
19
|
+
* falsy(`false` / `undefined`)なら共有 no-op を返す。有効時は `[wecool-chat:debug]` prefix 付きで
|
|
20
|
+
* `console.info` に出力する。Edge / SSR など `console` が無い環境では出力をスキップする。
|
|
21
|
+
*
|
|
22
|
+
* @param enabled - `ChatConfig.debug`。true のときだけ出力する
|
|
23
|
+
* @returns debug logger(無効時は共有 no-op)
|
|
24
|
+
*/
|
|
25
|
+
export declare const createDebugLogger: (enabled: boolean | undefined) => DebugLogger;
|
|
26
|
+
//# sourceMappingURL=debug-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-logger.d.ts","sourceRoot":"","sources":["../../src/core/debug-logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAWF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,GAAG,SAAS,KAAG,WAahE,CAAC"}
|
|
@@ -41,6 +41,27 @@ export type Messages = {
|
|
|
41
41
|
dragHandleLabel: string;
|
|
42
42
|
resetPositionButton: string;
|
|
43
43
|
settingsMenuToggle: string;
|
|
44
|
+
newConversationOption: string;
|
|
45
|
+
conversationSelectLabel: string;
|
|
46
|
+
/** tool が `stop` シグナルを返したが `userMessage` 未指定の場合のフォールバック文言 */
|
|
47
|
+
stopFallbackUserMessage: string;
|
|
48
|
+
/**
|
|
49
|
+
* LLM ループが上限に達したときの assistant メッセージ。
|
|
50
|
+
* 何度も同じツールを再試行している場合などに表示される。
|
|
51
|
+
*/
|
|
52
|
+
maxTurnsReached: string;
|
|
53
|
+
/** backend が message を 10000 字超で 400 拒否したときの文言 */
|
|
54
|
+
errorMessageTooLong: string;
|
|
55
|
+
/** zod 検証で形式エラーが返ったときの文言 */
|
|
56
|
+
errorInvalidRequest: string;
|
|
57
|
+
/** 分次レート制限 (RATE_LIMIT_EXCEEDED) の 429 文言。時間を置けば回復する */
|
|
58
|
+
errorRateLimit: string;
|
|
59
|
+
/** 日次上限 (DAILY_LIMIT_EXCEEDED) の 429 文言。当日中は回復しない */
|
|
60
|
+
errorDailyLimit: string;
|
|
61
|
+
/** 月次上限 (MONTHLY_LIMIT_EXCEEDED) の 429 文言。当月中は回復しない */
|
|
62
|
+
errorMonthlyLimit: string;
|
|
63
|
+
/** qrcode plugin: text が `maxTextLength` を超えたときの停止文言。`{max}` を実値で置換する */
|
|
64
|
+
qrcodeStopTextTooLong: string;
|
|
44
65
|
};
|
|
45
66
|
/**
|
|
46
67
|
* 指定 locale のメッセージ集を取得する。未指定 / 未対応 locale は ja を返す。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/core/i18n/messages.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjC;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,E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M,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,6DAA6D;IAC7D,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,yEAAyE;IACzE,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAiGF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,KAAG,QAG7C,CAAC"}
|
|
@@ -32,6 +32,18 @@ export type RunConversationParams = {
|
|
|
32
32
|
* tool 実行が完了した直後(次の LLM ラウンドに入る直前)に呼ばれる。
|
|
33
33
|
*/
|
|
34
34
|
onToolEnd?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* LLM ループが `MAX_TOOL_ITERATIONS` 上限に達した場合に assistant メッセージとして
|
|
37
|
+
* 表示する i18n 文言。`runConversation` は React 文脈外で `useMessages()` が使えないため、
|
|
38
|
+
* ホスト hook 側で `getMessages(locale)` から取得した値を渡す。
|
|
39
|
+
* 未指定なら graceful 終了 (throw しないが UI 表示もしない、後方互換)。
|
|
40
|
+
*/
|
|
41
|
+
maxTurnsReachedMessage?: string;
|
|
42
|
+
/**
|
|
43
|
+
* tool が `stop` シグナルを `userMessage` 未指定で返したときに使う fallback 文言 (i18n 済み)。
|
|
44
|
+
* 既存の error 表示経路で表示される。未指定なら何も表示しない。
|
|
45
|
+
*/
|
|
46
|
+
stopFallbackUserMessage?: string;
|
|
35
47
|
};
|
|
36
48
|
/**
|
|
37
49
|
* チャットの全ラウンドを回す。`MAX_TOOL_ITERATIONS` を超えたら例外で打ち切る。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-conversation.d.ts","sourceRoot":"","sources":["../../src/core/run-conversation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"run-conversation.d.ts","sourceRoot":"","sources":["../../src/core/run-conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AASxB,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,UAAU,CAAC;IACnB,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9E,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,WAAW,CAAC;IAChC,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,8DAA8D;IAC9D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAqKF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAAU,QAAQ,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAqDjF,CAAC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { Tool, ToolAttachment, ToolUseEvent } from './types';
|
|
1
|
+
import { Tool, ToolAttachment, ToolStopSignal, ToolUseEvent } from './types';
|
|
2
2
|
export type ToolExecution = {
|
|
3
3
|
event: ToolUseEvent;
|
|
4
4
|
/** LLM 履歴・バックエンドに送る結果 */
|
|
5
5
|
result: unknown;
|
|
6
6
|
/** UI でだけ描画する添付物。LLM 履歴にもバックエンドにも送らない */
|
|
7
7
|
attachments?: ToolAttachment[];
|
|
8
|
+
/**
|
|
9
|
+
* 即終了 + ユーザー通知を要求する signal。tool が `{ stop: {...} }` を返した場合のみ立つ。
|
|
10
|
+
* `stop` が立つ場合、`result` には `{ stopped: true, reason }` 形式のメタが入り、LLM 履歴の
|
|
11
|
+
* tool ロールメッセージ content が空にならないことを保証する。
|
|
12
|
+
*/
|
|
13
|
+
stop?: ToolStopSignal;
|
|
8
14
|
};
|
|
9
15
|
export type ToolRunnerCallbacks = {
|
|
10
16
|
onToolExecute?: (toolName: string, args: unknown) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-runner.d.ts","sourceRoot":"","sources":["../../src/core/tool-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-runner.d.ts","sourceRoot":"","sources":["../../src/core/tool-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGlF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,yBAAyB;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D,CAAC;AA0FF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,YAAY,EACnB,UAAU,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,EAC5C,SAAS,mBAAmB,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,KAC1E,OAAO,CAAC,aAAa,CAmCvB,CAAC"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -48,16 +48,49 @@ export type ToolAttachment = {
|
|
|
48
48
|
filename?: string;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* tool handler が「ここで打ち切ってユーザーに直接通知してほしい」と宣言するための分類。
|
|
52
52
|
*
|
|
53
|
-
* - `
|
|
53
|
+
* - `user_error`: ユーザー入力に起因し、再試行しても結果が変わらない (例: 長さ超過、不正な引数で固定的に失敗するもの)
|
|
54
|
+
* - `policy`: ポリシー違反でこれ以上処理しない (例: 法的・利用規約上拒否すべき入力)
|
|
55
|
+
* - `rate`: レート制限・クォータ超過で当面の継続が無理
|
|
56
|
+
* - `other`: 上記以外の打ち切り
|
|
57
|
+
*/
|
|
58
|
+
export type ToolStopCategory = "user_error" | "policy" | "rate" | "other";
|
|
59
|
+
/**
|
|
60
|
+
* tool handler が ChatWidget に「即終了 + ユーザーへの直接通知」を要求するためのシグナル。
|
|
61
|
+
*
|
|
62
|
+
* `forLLM` (LLM 履歴に積む結果) や `attachments` (UI 添付物) と排他で使う。
|
|
63
|
+
* `stop` を返したターンは LLM ループが即終了し、`userMessage` が専用 bubble で表示される。
|
|
64
|
+
*
|
|
65
|
+
* Why: LLM に同じエラーを延々と再試行させても意味がないケース (例: `text_too_long`) を
|
|
66
|
+
* tool 側が宣言できるようにする。中央でエラー種別を分岐するのではなく、tool 実装が
|
|
67
|
+
* 「これは再試行しても無駄」と判断したら `stop` を返す、という責務配置を取る。
|
|
68
|
+
*/
|
|
69
|
+
export type ToolStopSignal = {
|
|
70
|
+
/** 集計用の自由文字列 (例: `"text_too_long"`)。telemetry / log の集計キーになる */
|
|
71
|
+
reason: string;
|
|
72
|
+
/** 大まかな分類。UI 側のアイコン / 色分けや集計に利用する */
|
|
73
|
+
category: ToolStopCategory;
|
|
74
|
+
/**
|
|
75
|
+
* ユーザーに直接見せる文言。i18n 済みの完成形を tool 側で組み立てる。
|
|
76
|
+
* 未指定なら ChatWidget 側の汎用 fallback 文言を表示。
|
|
77
|
+
* 長さ上限 2000 文字、制御文字はサニタイズされる。
|
|
78
|
+
*/
|
|
79
|
+
userMessage?: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Tool handler が結果を 3 経路に分けて返すための封筒。
|
|
83
|
+
*
|
|
84
|
+
* - `forLLM`: LLM 履歴・バックエンドへ送られる結果
|
|
54
85
|
* - `attachments`: ChatWidget が UI として描画するだけで LLM 履歴にもバックエンドにも送らない
|
|
86
|
+
* - `stop`: 即終了 + ユーザーに直接通知。`forLLM` / `attachments` とは排他
|
|
55
87
|
*
|
|
56
88
|
* handler が plain な値を return した場合は従来動作 (全て LLM 履歴行き) を維持する。
|
|
57
89
|
*/
|
|
58
90
|
export type ToolHandlerEnvelope = {
|
|
59
|
-
forLLM
|
|
91
|
+
forLLM?: unknown;
|
|
60
92
|
attachments?: ToolAttachment[];
|
|
93
|
+
stop?: ToolStopSignal;
|
|
61
94
|
};
|
|
62
95
|
/**
|
|
63
96
|
* Tool definition that can be executed by the LLM
|
|
@@ -92,6 +125,14 @@ export type ChatConfig = {
|
|
|
92
125
|
tools: Tool[];
|
|
93
126
|
/** UI language */
|
|
94
127
|
locale?: "ja" | "en";
|
|
128
|
+
/**
|
|
129
|
+
* 開発者向け debug モード。`true` にすると初期化・送信・完了などの内部イベントを
|
|
130
|
+
* `console` に出力する(トラブルシューティング用)。既定は `false`。
|
|
131
|
+
*
|
|
132
|
+
* 秘匿値(apiKey / endpoint / メッセージ本文)は出力しない。件数や length 等の
|
|
133
|
+
* 非機微な要約のみを出す。本番埋め込み時はコンソールを汚さないよう既定 off のままにする。
|
|
134
|
+
*/
|
|
135
|
+
debug?: boolean;
|
|
95
136
|
/** Callback when a tool is about to be executed */
|
|
96
137
|
onToolExecute?: (toolName: string, args: unknown) => void;
|
|
97
138
|
/** Callback when a tool execution completes */
|
|
@@ -296,7 +337,11 @@ export type ToolCall = {
|
|
|
296
337
|
arguments: Record<string, unknown>;
|
|
297
338
|
};
|
|
298
339
|
/**
|
|
299
|
-
* SSE event received from the server
|
|
340
|
+
* SSE event received from the server.
|
|
341
|
+
*
|
|
342
|
+
* - `max_turns`: server `maxTurns` 上限に達したことを通知する。クライアントは
|
|
343
|
+
* これを受けて assistant エラーメッセージとして表示し、ループを終了する。
|
|
344
|
+
* `{ type: "done" }` の前に送られる。
|
|
300
345
|
*/
|
|
301
346
|
export type ChatEvent = {
|
|
302
347
|
type: "thinking";
|
|
@@ -315,6 +360,9 @@ export type ChatEvent = {
|
|
|
315
360
|
} | {
|
|
316
361
|
type: "error";
|
|
317
362
|
message: string;
|
|
363
|
+
} | {
|
|
364
|
+
type: "max_turns";
|
|
365
|
+
turn: number;
|
|
318
366
|
} | {
|
|
319
367
|
type: "done";
|
|
320
368
|
conversationId: string;
|
|
@@ -325,4 +373,19 @@ export type ChatEvent = {
|
|
|
325
373
|
export type ToolUseEvent = Extract<ChatEvent, {
|
|
326
374
|
type: "tool_use";
|
|
327
375
|
}>;
|
|
376
|
+
/**
|
|
377
|
+
* 会話一覧の各エントリ。最初のユーザー発話の先頭50文字をタイトルとして持つ。
|
|
378
|
+
*/
|
|
379
|
+
export type ConversationSummary = {
|
|
380
|
+
sessionId: string;
|
|
381
|
+
title: string;
|
|
382
|
+
createdAt: string;
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* 会話詳細。セッション ID と復元済みのメッセージ配列を持つ。
|
|
386
|
+
*/
|
|
387
|
+
export type ConversationDetail = {
|
|
388
|
+
sessionId: string;
|
|
389
|
+
messages: Message[];
|
|
390
|
+
};
|
|
328
391
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAChB,MAAM,EACN;QACE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;QAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,KAAK,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,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IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary:#2563eb;--color-primary-hover:#1d4ed8}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.block{display:block}.hidden{display:none}.inline{display:inline}.table{display:table}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\[wecool-chat\:\<plugin-id\>\]{wecool-chat:<plugin-id>}.\[wecool-chat\:acme\/plugin\]{wecool-chat:acme/plugin}.\[wecool-chat\:scope\]{wecool-chat:scope}}:host{z-index:2147483647;touch-action:auto;--wecool-color-bg:#fff;--wecool-color-bg-secondary:#fafafa;--wecool-color-bg-muted:#f4f4f5;--wecool-color-bg-strong:#18181b;--wecool-color-text:#18181b;--wecool-color-text-on-strong:#fafafa;--wecool-color-text-muted:#71717a;--wecool-color-border:#e4e4e7;--wecool-color-border-strong:#d4d4d8;--wecool-color-error-bg:#fef2f2;--wecool-color-error-text:#dc2626;--wecool-color-link:var(--color-primary,#2563eb);--wecool-color-link-hover:var(--color-primary-hover,#1d4ed8);font-size:max(16px,1rem);line-height:1.5;position:relative}@media(prefers-color-scheme:dark){:host{--wecool-color-bg:#18181b;--wecool-color-bg-secondary:#27272a;--wecool-color-bg-muted:#3f3f46;--wecool-color-bg-strong:#fafafa;--wecool-color-text:#fafafa;--wecool-color-text-on-strong:#18181b;--wecool-color-text-muted:#a1a1aa;--wecool-color-border:#3f3f46;--wecool-color-border-strong:#52525b;--wecool-color-error-bg:#450a0a;--wecool-color-error-text:#fca5a5}}:host([data-wecool-theme=light]),.wecool-float-container[data-wecool-theme=light],.wecool-embed-root[data-wecool-theme=light]{--wecool-color-bg:#fff;--wecool-color-bg-secondary:#fafafa;--wecool-color-bg-muted:#f4f4f5;--wecool-color-bg-strong:#18181b;--wecool-color-text:#18181b;--wecool-color-text-on-strong:#fafafa;--wecool-color-text-muted:#71717a;--wecool-color-border:#e4e4e7;--wecool-color-border-strong:#d4d4d8;--wecool-color-error-bg:#fef2f2;--wecool-color-error-text:#dc2626}:host([data-wecool-theme=dark]),.wecool-float-container[data-wecool-theme=dark],.wecool-embed-root[data-wecool-theme=dark]{--wecool-color-bg:#18181b;--wecool-color-bg-secondary:#27272a;--wecool-color-bg-muted:#3f3f46;--wecool-color-bg-strong:#fafafa;--wecool-color-text:#fafafa;--wecool-color-text-on-strong:#18181b;--wecool-color-text-muted:#a1a1aa;--wecool-color-border:#3f3f46;--wecool-color-border-strong:#52525b;--wecool-color-error-bg:#450a0a;--wecool-color-error-text:#fca5a5}.wecool-float-container,.wecool-embed-root{color:var(--wecool-color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.wecool-float-container :focus-visible,.wecool-embed-root :focus-visible{outline:2px solid var(--color-primary,#2563eb);outline-offset:2px}.wecool-float-container :focus:not(:focus-visible),.wecool-embed-root :focus:not(:focus-visible){outline:none}@keyframes wecool-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.wecool-float-container{display:contents}.wecool-float-container--bottom-right .wecool-float-button{bottom:1.5rem;right:1.5rem}.wecool-float-container--bottom-left .wecool-float-button{bottom:1.5rem;left:1.5rem}.wecool-float-container--top-right .wecool-float-button{top:1.5rem;right:1.5rem}.wecool-float-container--top-left .wecool-float-button{top:1.5rem;left:1.5rem}.wecool-float-panel{border-radius:12px;max-width:23.75rem;max-height:min(32.5rem,100dvh - 1.25rem);position:fixed;overflow:hidden;box-shadow:0 8px 32px #0000001f;container:wecool-chat/inline-size}.wecool-float-panel--bottom-right,.wecool-float-panel--bottom-left,.wecool-float-panel--top-right,.wecool-float-panel--top-left{inset:.625rem}.wecool-float-panel--bottom-right{margin-top:auto;margin-left:auto}.wecool-float-panel--bottom-left{margin-top:auto;margin-right:auto}.wecool-float-panel--top-right{margin-bottom:auto;margin-left:auto}.wecool-float-panel--top-left{margin-bottom:auto;margin-right:auto}.wecool-float-container:has(.wecool-float-panel) .wecool-float-button{display:none}.wecool-float-panel--dragged{width:min(23.75rem,100vw - 1.25rem);height:min(32.5rem,100dvh - 1.25rem);margin:0;inset:auto}.wecool-float-panel[data-dragging=true]{-webkit-user-select:none;user-select:none}.wecool-embed-root{height:100%;container:wecool-chat/inline-size}.wecool-float-button{background-color:var(--wecool-color-bg-strong);width:3.25rem;height:3.25rem;color:var(--wecool-color-text-on-strong);cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;transition:transform .15s,box-shadow .15s;display:flex;position:fixed;box-shadow:0 4px 16px #00000029}.wecool-float-button:hover{transform:scale(1.05);box-shadow:0 6px 20px #0003}.wecool-panel{background-color:var(--wecool-color-bg);border:1px solid var(--wecool-color-border);border-radius:12px;flex-direction:column;height:100%;display:flex;overflow:hidden}.wecool-embed-root--sidebar-left .wecool-panel,.wecool-embed-root--sidebar-right .wecool-panel,.wecool-embed-root--header-banner .wecool-panel,.wecool-embed-root--footer-fixed .wecool-panel{border:none;border-radius:0;width:100%;height:100%}.wecool-embed-root--input-only{box-sizing:border-box;width:100%;height:100%}.wecool-header{border-bottom:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);justify-content:space-between;align-items:center;height:2.75rem;padding:0 .75rem;display:flex}.wecool-header--draggable{cursor:move;touch-action:none;-webkit-user-select:none;user-select:none}.wecool-header--spacer{border-bottom:none;height:.5rem}.wecool-header__close,.wecool-header__menu-toggle{min-width:2.75rem;min-height:2.75rem;color:var(--wecool-color-text-muted);cursor:pointer;background-color:#0000;border:none;border-radius:6px;justify-content:center;align-items:center;padding:.5rem;transition:all .15s;display:flex}.wecool-header__close:hover,.wecool-header__menu-toggle:hover{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-header__menu{position:relative}.wecool-header__menu-popover{border:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);z-index:1;border-radius:8px;min-width:12rem;margin-top:.25rem;padding:.25rem;position:absolute;top:100%;right:0;box-shadow:0 8px 24px #0000001f}.wecool-header__menu-item{width:100%;min-height:2.25rem;color:var(--wecool-color-text);cursor:pointer;text-align:start;font-size:inherit;background-color:#0000;border:none;border-radius:6px;align-items:center;gap:.5rem;padding:.375rem .75rem;display:flex}.wecool-header__menu-item:hover:not(:disabled){background-color:var(--wecool-color-bg-muted)}.wecool-header__menu-item:disabled{color:var(--wecool-color-text-muted);cursor:not-allowed}.wecool-footer{border-top:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);align-items:center;gap:.5rem;padding:.75rem;display:flex}.wecool-footer__input{min-height:2.625rem;max-height:4.125rem;color:var(--wecool-color-text);background-color:var(--wecool-color-bg-secondary);border:1px solid var(--wecool-color-border);resize:none;border-radius:8px;outline:none;flex:1;padding:.5rem .875rem;font-family:inherit;line-height:1.5rem;transition:border-color .15s;overflow-y:auto}.wecool-footer__input:focus-visible{border-color:var(--wecool-color-bg-strong)}.wecool-footer__button{cursor:pointer;border:none;border-radius:8px;justify-content:center;align-items:center;width:2.75rem;min-width:2.75rem;height:2.75rem;min-height:2.75rem;transition:all .15s;display:flex}.wecool-footer__button--send{background-color:var(--wecool-color-bg-strong);color:var(--wecool-color-text-on-strong)}.wecool-footer__button--send:disabled{opacity:.3;cursor:not-allowed}.wecool-footer__button--stop{background-color:var(--wecool-color-error-text);color:#fff}.wecool-footer__button--clear{color:var(--wecool-color-text-muted);background-color:#0000}.wecool-footer__button--clear:hover{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-message-list{background-color:var(--wecool-color-bg);flex-direction:column;flex:1;gap:.75rem;padding:1rem;display:flex;overflow-y:auto}.wecool-message-list__empty{color:var(--wecool-color-text-muted);flex:1;justify-content:center;align-items:center;font-size:.875rem;display:flex}.wecool-message-list__items{flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none;display:flex}.wecool-message-row{flex-direction:column;max-width:85%;display:flex;position:relative}.wecool-message-row[data-message-role=user]{align-self:flex-end}.wecool-message-row[data-message-role=assistant]{align-self:flex-start}.wecool-message-row__time{font-variant-numeric:tabular-nums;color:var(--wecool-color-text-muted);margin-top:.25rem;font-size:.75rem}.wecool-message-row[data-message-role=user] .wecool-message-row__time{align-self:flex-end}.wecool-message-row[data-message-role=assistant] .wecool-message-row__time{align-self:flex-start}.wecool-message-bubble{word-break:break-word;cursor:text;padding:.625rem .875rem;font-size:.875rem;line-height:1.5;position:relative}.wecool-message-bubble--user{white-space:pre-wrap;background-color:var(--wecool-color-bg-strong);color:var(--wecool-color-text-on-strong);border-radius:12px}.wecool-message-bubble--assistant{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text);border-radius:12px}.wecool-message-bubble--error{background-color:var(--wecool-color-error-bg);color:var(--wecool-color-error-text);border-radius:12px}.wecool-message-bubble--editing.wecool-message-bubble--user{background-color:var(--wecool-color-bg);color:var(--wecool-color-text);border:1px solid var(--wecool-color-border);padding:.375rem}.wecool-message-editor{align-items:center;gap:.375rem;display:flex}.wecool-message-editor__input{height:2rem;color:var(--wecool-color-text);background-color:var(--wecool-color-bg-secondary);border:1px solid var(--wecool-color-border);border-radius:6px;outline:none;flex:1;padding:0 .625rem;transition:border-color .15s}.wecool-message-editor__input:focus-visible{border-color:var(--wecool-color-bg-strong)}.wecool-message-editor__button{cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;width:2rem;min-width:1.5rem;height:2rem;min-height:1.5rem;transition:all .15s;display:flex}.wecool-message-editor__button--send{background-color:var(--wecool-color-bg-strong);color:var(--wecool-color-text-on-strong)}.wecool-message-editor__button--send:disabled{opacity:.3;cursor:not-allowed}.wecool-message-bubble__menu{background-color:var(--wecool-color-bg-muted);border:1px solid var(--wecool-color-border);width:1.5rem;min-width:1.5rem;height:1.5rem;min-height:1.5rem;color:var(--wecool-color-text-muted);cursor:pointer;border-radius:50%;justify-content:center;align-items:center;transition:color .12s,background-color .12s;display:inline-flex;position:absolute;bottom:-.4375rem;right:-.4375rem}.wecool-message-bubble__menu:hover{background-color:var(--wecool-color-border);color:var(--wecool-color-text)}.wecool-message-popover{z-index:10;background:var(--wecool-color-bg);border:1px solid var(--wecool-color-border);border-radius:8px;flex-direction:column;gap:.125rem;min-width:8.75rem;padding:.25rem;animation:.12s ease-out wecool-popover-appear;display:flex;position:absolute;right:0;box-shadow:0 8px 24px #0000001f}.wecool-message-popover button{cursor:pointer;min-height:1.5rem;color:var(--wecool-color-text);text-align:left;background:0 0;border:none;border-radius:4px;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;font-size:.875rem;display:flex}.wecool-message-popover button:hover{background-color:var(--wecool-color-bg-muted)}@keyframes wecool-popover-appear{0%{opacity:0;transform:translateY(.25rem)}to{opacity:1;transform:translateY(0)}}.wecool-loading{background-color:var(--wecool-color-bg-muted);border-radius:12px;align-self:flex-start;align-items:center;gap:.375rem;max-width:85%;padding:.625rem .875rem;display:flex}.wecool-loading-dot{background-color:var(--wecool-color-text-muted);border-radius:50%;width:.375rem;height:.375rem;animation:1.4s ease-in-out infinite both wecool-bounce}.wecool-loading-dot:first-child{animation-delay:-.32s}.wecool-loading-dot:nth-child(2){animation-delay:-.16s}.wecool-sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wecool-icon--xs{width:.875em;height:.875em}.wecool-icon--sm{width:1em;height:1em}.wecool-icon--md{width:1.125em;height:1.125em}.wecool-icon--lg{width:1.375em;height:1.375em}@container wecool-chat (max-width:30em){.wecool-message-list{padding:.5rem}.wecool-message-row{max-width:92%}}@container wecool-chat (max-width:20em){.wecool-message-bubble{padding:.5em .625em}.wecool-header__label{display:none}}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.wecool-loading-dot{transform:scale(1);animation:none!important}.wecool-float-button:hover{transform:none!important}}@media(forced-colors:active){.wecool-float-button,.wecool-footer__button,.wecool-header__close,.wecool-message-editor__button,.wecool-message-popover button,.wecool-message-bubble__menu{color:buttontext;background-color:buttonface;border:1px solid buttontext}.wecool-message-bubble--user,.wecool-message-bubble--assistant,.wecool-message-bubble--error,.wecool-loading{border:1px solid canvastext}.wecool-float-container :focus-visible,.wecool-embed-root :focus-visible{outline-offset:2px;outline:2px solid highlight}}.wecool-layout{display:block}.wecool-layout--sidebar-left{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-right:1px solid var(--wecool-color-border,#e5e5e5);width:min(22.5rem,100vw - 1.25rem);position:fixed;top:0;bottom:0;left:0;overflow:hidden;box-shadow:.25rem 0 .75rem #00000014}.wecool-layout--sidebar-right{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-left:1px solid var(--wecool-color-border,#e5e5e5);width:min(22.5rem,100vw - 1.25rem);position:fixed;top:0;bottom:0;right:0;overflow:hidden;box-shadow:-.25rem 0 .75rem #00000014}.wecool-layout--header-banner{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-bottom:1px solid var(--wecool-color-border,#e5e5e5);height:5rem;position:fixed;top:0;left:0;right:0;overflow:hidden;box-shadow:0 .25rem .75rem #00000014}.wecool-layout--header-banner.wecool-layout--transparent{-webkit-backdrop-filter:blur(.5rem);background:#ffffffd9}.wecool-layout--footer-fixed{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-top:1px solid var(--wecool-color-border,#e5e5e5);max-height:50dvh;position:fixed;bottom:0;left:0;right:0;overflow:hidden;box-shadow:0 -.25rem .75rem #00000014}@media(prefers-color-scheme:dark){.wecool-layout--header-banner.wecool-layout--transparent{background:#18181bd9}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}.wecool-markdown{font-size:.875rem;line-height:1.6;color:var(--wecool-color-text, #18181b)}.wecool-markdown>*:first-child{margin-top:0}.wecool-markdown>*:last-child{margin-bottom:0}.wecool-markdown p{margin:.5em 0;word-break:break-word}.wecool-markdown h1,.wecool-markdown h2,.wecool-markdown h3{margin:.8em 0 .4em;font-weight:600;line-height:1.3}.wecool-markdown h1{font-size:1.4em}.wecool-markdown h2{font-size:1.2em}.wecool-markdown h3{font-size:1.05em}.wecool-markdown h4,.wecool-markdown h5,.wecool-markdown h6{margin:.6em 0 .3em;font-size:1em;font-weight:600}.wecool-markdown ul,.wecool-markdown ol{margin:.5em 0;padding-left:1.5em}.wecool-markdown li{margin:.2em 0}.wecool-markdown li>ul,.wecool-markdown li>ol{margin:.2em 0}.wecool-markdown blockquote{margin:.5em 0;padding:.2em .8em;border-left:3px solid var(--wecool-color-border-strong, #d4d4d8);color:var(--wecool-color-text-muted, #71717a)}.wecool-markdown a{color:var(--wecool-color-link, #2563eb);text-decoration:underline}.wecool-markdown a:hover{color:var(--wecool-color-link-hover, #1d4ed8)}.wecool-markdown code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.9em}.wecool-markdown :not(pre)>code{background-color:var(--wecool-color-border, #e4e4e7);padding:.0625rem .25rem;border-radius:4px}.wecool-markdown table{display:block;width:100%;overflow-x:auto;border-collapse:collapse;margin:.5em 0}.wecool-markdown th,.wecool-markdown td{border:1px solid var(--wecool-color-border-strong, #d4d4d8);padding:.375rem .625rem;text-align:left}.wecool-markdown th{background-color:var(--wecool-color-border, #e4e4e7);font-weight:600}.wecool-markdown hr{border:none;border-top:1px solid var(--wecool-color-border-strong, #d4d4d8);margin:1em 0}.wecool-code-block{margin:.5em 0;border-radius:8px;overflow:hidden;background-color:var(--wecool-color-bg-secondary, #fafafa);border:1px solid var(--wecool-color-border, #e4e4e7)}.wecool-code-block__header{display:flex;align-items:center;justify-content:space-between;padding:.25rem .625rem;background-color:var(--wecool-color-border, #e4e4e7);font-size:.75rem;color:var(--wecool-color-text-muted, #71717a)}.wecool-code-block__language{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;text-transform:lowercase}.wecool-code-block__copy{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .375rem;min-width:1.5rem;min-height:1.5rem;background:transparent;border:none;cursor:pointer;color:var(--wecool-color-text-muted, #71717a);font-size:.75rem;border-radius:4px}.wecool-code-block__copy:hover{background-color:var(--wecool-color-border-strong, #d4d4d8);color:var(--wecool-color-text, #18181b)}.wecool-code-block pre{margin:0;padding:.625rem .75rem;overflow-x:auto;background-color:transparent}.wecool-code-block pre code{font-size:.85em;line-height:1.5;background:transparent;padding:0}.wecool-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.wecool-message-attachments{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem}.wecool-message-attachment{margin:0;display:flex;flex-direction:column;gap:.375rem}.wecool-message-attachment__image{display:block;max-width:100%;height:auto;border-radius:.5rem;background-color:var(--wecool-color-bg, #ffffff)}.wecool-message-attachment__download{display:inline-flex;align-items:center;gap:.25rem;align-self:flex-start;padding:.375rem .625rem;min-width:1.5rem;min-height:1.5rem;background-color:var(--wecool-color-bg-secondary, #fafafa);border:1px solid var(--wecool-color-border, #e4e4e7);border-radius:.25rem;color:var(--wecool-color-text, #18181b);font-size:.8125rem;cursor:pointer}.wecool-message-attachment__download:hover{background-color:var(--wecool-color-bg-muted, #f4f4f5)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
|
|
1
|
+
/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary:#2563eb;--color-primary-hover:#1d4ed8}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.hidden{display:none}.inline{display:inline}.table{display:table}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\[wecool-chat\:\<plugin-id\>\]{wecool-chat:<plugin-id>}.\[wecool-chat\:acme\/plugin\]{wecool-chat:acme/plugin}.\[wecool-chat\:debug\]{wecool-chat:debug}.\[wecool-chat\:scope\]{wecool-chat:scope}}:host{z-index:2147483647;touch-action:auto;--wecool-color-bg:#fff;--wecool-color-bg-secondary:#fafafa;--wecool-color-bg-muted:#f4f4f5;--wecool-color-bg-strong:#18181b;--wecool-color-text:#18181b;--wecool-color-text-on-strong:#fafafa;--wecool-color-text-muted:#71717a;--wecool-color-border:#e4e4e7;--wecool-color-border-strong:#d4d4d8;--wecool-color-error-bg:#fef2f2;--wecool-color-error-text:#dc2626;--wecool-color-link:var(--color-primary,#2563eb);--wecool-color-link-hover:var(--color-primary-hover,#1d4ed8);font-size:max(16px,1rem);line-height:1.5;position:relative}@media (prefers-color-scheme:dark){:host{--wecool-color-bg:#18181b;--wecool-color-bg-secondary:#27272a;--wecool-color-bg-muted:#3f3f46;--wecool-color-bg-strong:#fafafa;--wecool-color-text:#fafafa;--wecool-color-text-on-strong:#18181b;--wecool-color-text-muted:#a1a1aa;--wecool-color-border:#3f3f46;--wecool-color-border-strong:#52525b;--wecool-color-error-bg:#450a0a;--wecool-color-error-text:#fca5a5}}:host([data-wecool-theme=light]),.wecool-float-container[data-wecool-theme=light],.wecool-embed-root[data-wecool-theme=light]{--wecool-color-bg:#fff;--wecool-color-bg-secondary:#fafafa;--wecool-color-bg-muted:#f4f4f5;--wecool-color-bg-strong:#18181b;--wecool-color-text:#18181b;--wecool-color-text-on-strong:#fafafa;--wecool-color-text-muted:#71717a;--wecool-color-border:#e4e4e7;--wecool-color-border-strong:#d4d4d8;--wecool-color-error-bg:#fef2f2;--wecool-color-error-text:#dc2626}:host([data-wecool-theme=dark]),.wecool-float-container[data-wecool-theme=dark],.wecool-embed-root[data-wecool-theme=dark]{--wecool-color-bg:#18181b;--wecool-color-bg-secondary:#27272a;--wecool-color-bg-muted:#3f3f46;--wecool-color-bg-strong:#fafafa;--wecool-color-text:#fafafa;--wecool-color-text-on-strong:#18181b;--wecool-color-text-muted:#a1a1aa;--wecool-color-border:#3f3f46;--wecool-color-border-strong:#52525b;--wecool-color-error-bg:#450a0a;--wecool-color-error-text:#fca5a5}.wecool-float-container,.wecool-embed-root{color:var(--wecool-color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.wecool-float-container :focus-visible,.wecool-embed-root :focus-visible{outline:2px solid var(--color-primary,#2563eb);outline-offset:2px}.wecool-float-container :focus:not(:focus-visible),.wecool-embed-root :focus:not(:focus-visible){outline:none}@keyframes wecool-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.wecool-float-container{display:contents}.wecool-float-container--bottom-right .wecool-float-button{bottom:1.5rem;right:1.5rem}.wecool-float-container--bottom-left .wecool-float-button{bottom:1.5rem;left:1.5rem}.wecool-float-container--top-right .wecool-float-button{top:1.5rem;right:1.5rem}.wecool-float-container--top-left .wecool-float-button{top:1.5rem;left:1.5rem}.wecool-float-panel{border-radius:12px;max-width:23.75rem;max-height:min(32.5rem,100dvh - 1.25rem);position:fixed;overflow:hidden;box-shadow:0 8px 32px #0000001f;container:wecool-chat/inline-size}.wecool-float-panel--bottom-right,.wecool-float-panel--bottom-left,.wecool-float-panel--top-right,.wecool-float-panel--top-left{inset:.625rem}.wecool-float-panel--bottom-right{margin-top:auto;margin-left:auto}.wecool-float-panel--bottom-left{margin-top:auto;margin-right:auto}.wecool-float-panel--top-right{margin-bottom:auto;margin-left:auto}.wecool-float-panel--top-left{margin-bottom:auto;margin-right:auto}.wecool-float-container:has(.wecool-float-panel) .wecool-float-button{display:none}.wecool-float-panel--dragged{width:min(23.75rem,100vw - 1.25rem);height:min(32.5rem,100dvh - 1.25rem);margin:0;inset:auto}.wecool-float-panel[data-dragging=true]{-webkit-user-select:none;user-select:none}.wecool-embed-root{height:100%;container:wecool-chat/inline-size}.wecool-float-button{background-color:var(--wecool-color-bg-strong);width:3.25rem;height:3.25rem;color:var(--wecool-color-text-on-strong);cursor:pointer;border:none;border-radius:50%;justify-content:center;align-items:center;transition:transform .15s,box-shadow .15s;display:flex;position:fixed;box-shadow:0 4px 16px #00000029}.wecool-float-button:hover{transform:scale(1.05);box-shadow:0 6px 20px #0003}.wecool-panel{background-color:var(--wecool-color-bg);border:1px solid var(--wecool-color-border);border-radius:12px;flex-direction:column;height:100%;display:flex;overflow:hidden}.wecool-embed-root--sidebar-left .wecool-panel,.wecool-embed-root--sidebar-right .wecool-panel,.wecool-embed-root--header-banner .wecool-panel,.wecool-embed-root--footer-fixed .wecool-panel{border:none;border-radius:0;width:100%;height:100%}.wecool-embed-root--input-only{box-sizing:border-box;width:100%;height:100%}.wecool-header{border-bottom:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);justify-content:space-between;align-items:center;padding:.1875rem .75rem;display:flex}.wecool-header--draggable{cursor:move;touch-action:none;-webkit-user-select:none;user-select:none}.wecool-header--spacer{border-bottom:none;height:.5rem}.wecool-header__close,.wecool-header__menu-toggle{min-width:2.75rem;min-height:2.75rem;color:var(--wecool-color-text-muted);cursor:pointer;background-color:#0000;border:none;border-radius:6px;justify-content:center;align-items:center;padding:.5rem;transition:all .15s;display:flex}.wecool-header__close:hover,.wecool-header__menu-toggle:hover{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-header__menu{position:relative}.wecool-header__menu-popover{border:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);z-index:1;border-radius:8px;min-width:12rem;margin-top:.25rem;padding:.25rem;position:absolute;top:100%;right:0;box-shadow:0 8px 24px #0000001f}.wecool-header__menu-item{width:100%;min-height:2.25rem;color:var(--wecool-color-text);cursor:pointer;text-align:start;font-size:inherit;background-color:#0000;border:none;border-radius:6px;align-items:center;gap:.5rem;padding:.375rem .75rem;display:flex}.wecool-header__menu-item:hover:not(:disabled){background-color:var(--wecool-color-bg-muted)}.wecool-header__menu-item:disabled{color:var(--wecool-color-text-muted);cursor:not-allowed}.wecool-conversation-select{min-width:0;height:2.25rem;color:var(--wecool-color-text);background-color:var(--wecool-color-bg-secondary);border:1px solid var(--wecool-color-border);font-family:inherit;font-size:inherit;cursor:pointer;border-radius:8px;outline:none;flex:1;padding:0 .625rem;transition:border-color .15s}.wecool-conversation-select:focus-visible{border-color:var(--wecool-color-bg-strong)}.wecool-conversation-select:disabled{cursor:not-allowed;opacity:.5}.wecool-footer{border-top:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);align-items:center;gap:.5rem;padding:.75rem;display:flex}.wecool-footer__input{min-height:2.625rem;max-height:4.125rem;color:var(--wecool-color-text);background-color:var(--wecool-color-bg-secondary);border:1px solid var(--wecool-color-border);resize:none;border-radius:8px;outline:none;flex:1;padding:.5rem .875rem;font-family:inherit;line-height:1.5rem;transition:border-color .15s;overflow-y:auto}.wecool-footer__input:focus-visible{border-color:var(--wecool-color-bg-strong)}.wecool-footer__button{cursor:pointer;border:none;border-radius:8px;justify-content:center;align-items:center;width:2.75rem;min-width:2.75rem;height:2.75rem;min-height:2.75rem;transition:all .15s;display:flex}.wecool-footer__button--send{background-color:var(--wecool-color-bg-strong);color:var(--wecool-color-text-on-strong)}.wecool-footer__button--send:disabled{opacity:.3;cursor:not-allowed}.wecool-footer__button--stop{background-color:var(--wecool-color-error-text);color:#fff}.wecool-footer__button--clear{color:var(--wecool-color-text-muted);background-color:#0000}.wecool-footer__button--clear:hover{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-message-list{background-color:var(--wecool-color-bg);flex-direction:column;flex:1;gap:.75rem;padding:1rem;display:flex;overflow-y:auto}.wecool-message-list__empty{color:var(--wecool-color-text-muted);flex:1;justify-content:center;align-items:center;font-size:.875rem;display:flex}.wecool-message-list__items{flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none;display:flex}.wecool-message-row{flex-direction:column;max-width:85%;display:flex;position:relative}.wecool-message-row[data-message-role=user]{align-self:flex-end}.wecool-message-row[data-message-role=assistant]{align-self:flex-start}.wecool-message-row__time{font-variant-numeric:tabular-nums;color:var(--wecool-color-text-muted);margin-top:.25rem;font-size:.75rem}.wecool-message-row[data-message-role=user] .wecool-message-row__time{align-self:flex-end}.wecool-message-row[data-message-role=assistant] .wecool-message-row__time{align-self:flex-start}.wecool-message-bubble{word-break:break-word;cursor:text;padding:.625rem .875rem;font-size:.875rem;line-height:1.5;position:relative}.wecool-message-bubble--user{white-space:pre-wrap;background-color:var(--wecool-color-bg-strong);color:var(--wecool-color-text-on-strong);border-radius:12px}.wecool-message-bubble--assistant{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text);border-radius:12px}.wecool-message-bubble--error{background-color:var(--wecool-color-error-bg);color:var(--wecool-color-error-text);border-radius:12px}.wecool-message-bubble--editing.wecool-message-bubble--user{background-color:var(--wecool-color-bg);color:var(--wecool-color-text);border:1px solid var(--wecool-color-border);padding:.375rem}.wecool-message-editor{align-items:center;gap:.375rem;display:flex}.wecool-message-editor__input{height:2rem;color:var(--wecool-color-text);background-color:var(--wecool-color-bg-secondary);border:1px solid var(--wecool-color-border);border-radius:6px;outline:none;flex:1;padding:0 .625rem;transition:border-color .15s}.wecool-message-editor__input:focus-visible{border-color:var(--wecool-color-bg-strong)}.wecool-message-editor__button{cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;width:2rem;min-width:1.5rem;height:2rem;min-height:1.5rem;transition:all .15s;display:flex}.wecool-message-editor__button--send{background-color:var(--wecool-color-bg-strong);color:var(--wecool-color-text-on-strong)}.wecool-message-editor__button--send:disabled{opacity:.3;cursor:not-allowed}.wecool-message-bubble__menu{background-color:var(--wecool-color-bg-muted);border:1px solid var(--wecool-color-border);width:1.5rem;min-width:1.5rem;height:1.5rem;min-height:1.5rem;color:var(--wecool-color-text-muted);cursor:pointer;border-radius:50%;justify-content:center;align-items:center;transition:color .12s,background-color .12s;display:inline-flex;position:absolute;bottom:-.4375rem;right:-.4375rem}.wecool-message-bubble__menu:hover{background-color:var(--wecool-color-border);color:var(--wecool-color-text)}.wecool-message-popover{z-index:10;background:var(--wecool-color-bg);border:1px solid var(--wecool-color-border);border-radius:8px;flex-direction:column;gap:.125rem;min-width:8.75rem;padding:.25rem;animation:.12s ease-out wecool-popover-appear;display:flex;position:absolute;right:0;box-shadow:0 8px 24px #0000001f}.wecool-message-popover button{cursor:pointer;min-height:1.5rem;color:var(--wecool-color-text);text-align:left;background:0 0;border:none;border-radius:4px;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;font-size:.875rem;display:flex}.wecool-message-popover button:hover{background-color:var(--wecool-color-bg-muted)}@keyframes wecool-popover-appear{0%{opacity:0;transform:translateY(.25rem)}to{opacity:1;transform:translateY(0)}}.wecool-loading{background-color:var(--wecool-color-bg-muted);border-radius:12px;align-self:flex-start;align-items:center;gap:.375rem;max-width:85%;padding:.625rem .875rem;display:flex}.wecool-loading-dot{background-color:var(--wecool-color-text-muted);border-radius:50%;width:.375rem;height:.375rem;animation:1.4s ease-in-out infinite both wecool-bounce}.wecool-loading-dot:first-child{animation-delay:-.32s}.wecool-loading-dot:nth-child(2){animation-delay:-.16s}.wecool-icon--xs{width:.875em;height:.875em}.wecool-icon--sm{width:1em;height:1em}.wecool-icon--md{width:1.125em;height:1.125em}.wecool-icon--lg{width:1.375em;height:1.375em}@container wecool-chat (width<=30em){.wecool-message-list{padding:.5rem}.wecool-message-row{max-width:92%}}@container wecool-chat (width<=20em){.wecool-message-bubble{padding:.5em .625em}.wecool-header__label{display:none}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.wecool-loading-dot{transform:scale(1);animation:none!important}.wecool-float-button:hover{transform:none!important}}@media (forced-colors:active){.wecool-float-button,.wecool-footer__button,.wecool-header__close,.wecool-message-editor__button,.wecool-message-popover button,.wecool-message-bubble__menu{color:buttontext;background-color:buttonface;border:1px solid buttontext}.wecool-message-bubble--user,.wecool-message-bubble--assistant,.wecool-message-bubble--error,.wecool-loading{border:1px solid canvastext}.wecool-float-container :focus-visible,.wecool-embed-root :focus-visible{outline-offset:2px;outline:2px solid highlight}}.wecool-layout{display:block}.wecool-layout--sidebar-left{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-right:1px solid var(--wecool-color-border,#e5e5e5);width:min(22.5rem,100vw - 1.25rem);position:fixed;top:0;bottom:0;left:0;overflow:hidden;box-shadow:.25rem 0 .75rem #00000014}.wecool-layout--sidebar-right{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-left:1px solid var(--wecool-color-border,#e5e5e5);width:min(22.5rem,100vw - 1.25rem);position:fixed;top:0;bottom:0;right:0;overflow:hidden;box-shadow:-.25rem 0 .75rem #00000014}.wecool-layout--header-banner{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-bottom:1px solid var(--wecool-color-border,#e5e5e5);height:5rem;position:fixed;top:0;left:0;right:0;overflow:hidden;box-shadow:0 .25rem .75rem #00000014}.wecool-layout--header-banner.wecool-layout--transparent{-webkit-backdrop-filter:blur(.5rem);background:#ffffffd9}.wecool-layout--footer-fixed{z-index:2147483640;background:var(--wecool-color-bg,#fff);border-top:1px solid var(--wecool-color-border,#e5e5e5);max-height:50dvh;position:fixed;bottom:0;left:0;right:0;overflow:hidden;box-shadow:0 -.25rem .75rem #00000014}@media (prefers-color-scheme:dark){.wecool-layout--header-banner.wecool-layout--transparent{background:#18181bd9}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}.wecool-markdown{color:var(--wecool-color-text,#18181b);font-size:.875rem;line-height:1.6}.wecool-markdown>:first-child{margin-top:0}.wecool-markdown>:last-child{margin-bottom:0}.wecool-markdown p{word-break:break-word;margin:.5em 0}.wecool-markdown h1,.wecool-markdown h2,.wecool-markdown h3{margin:.8em 0 .4em;font-weight:600;line-height:1.3}.wecool-markdown h1{font-size:1.4em}.wecool-markdown h2{font-size:1.2em}.wecool-markdown h3{font-size:1.05em}.wecool-markdown h4,.wecool-markdown h5,.wecool-markdown h6{margin:.6em 0 .3em;font-size:1em;font-weight:600}.wecool-markdown ul,.wecool-markdown ol{margin:.5em 0;padding-left:1.5em}.wecool-markdown li,.wecool-markdown li>ul,.wecool-markdown li>ol{margin:.2em 0}.wecool-markdown blockquote{border-left:3px solid var(--wecool-color-border-strong,#d4d4d8);color:var(--wecool-color-text-muted,#71717a);margin:.5em 0;padding:.2em .8em}.wecool-markdown a{color:var(--wecool-color-link,#2563eb);text-decoration:underline}.wecool-markdown a:hover{color:var(--wecool-color-link-hover,#1d4ed8)}.wecool-markdown code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.9em}.wecool-markdown :not(pre)>code{background-color:var(--wecool-color-border,#e4e4e7);border-radius:4px;padding:.0625rem .25rem}.wecool-markdown table{border-collapse:collapse;width:100%;margin:.5em 0;display:block;overflow-x:auto}.wecool-markdown th,.wecool-markdown td{border:1px solid var(--wecool-color-border-strong,#d4d4d8);text-align:left;padding:.375rem .625rem}.wecool-markdown th{background-color:var(--wecool-color-border,#e4e4e7);font-weight:600}.wecool-markdown hr{border:none;border-top:1px solid var(--wecool-color-border-strong,#d4d4d8);margin:1em 0}.wecool-code-block{background-color:var(--wecool-color-bg-secondary,#fafafa);border:1px solid var(--wecool-color-border,#e4e4e7);border-radius:8px;margin:.5em 0;overflow:hidden}.wecool-code-block__header{background-color:var(--wecool-color-border,#e4e4e7);color:var(--wecool-color-text-muted,#71717a);justify-content:space-between;align-items:center;padding:.25rem .625rem;font-size:.75rem;display:flex}.wecool-code-block__language{text-transform:lowercase;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.wecool-code-block__copy{cursor:pointer;min-width:1.5rem;min-height:1.5rem;color:var(--wecool-color-text-muted,#71717a);background:0 0;border:none;border-radius:4px;align-items:center;gap:.25rem;padding:.125rem .375rem;font-size:.75rem;display:inline-flex}.wecool-code-block__copy:hover{background-color:var(--wecool-color-border-strong,#d4d4d8);color:var(--wecool-color-text,#18181b)}.wecool-code-block pre{background-color:#0000;margin:0;padding:.625rem .75rem;overflow-x:auto}.wecool-code-block pre code{background:0 0;padding:0;font-size:.85em;line-height:1.5}.wecool-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wecool-message-attachments{flex-direction:column;gap:.5rem;margin-top:.5rem;display:flex}.wecool-message-attachment{flex-direction:column;gap:.375rem;margin:0;display:flex}.wecool-message-attachment__image{background-color:var(--wecool-color-bg,#fff);border-radius:.5rem;max-width:100%;height:auto;display:block}.wecool-message-attachment__download{background-color:var(--wecool-color-bg-secondary,#fafafa);border:1px solid var(--wecool-color-border,#e4e4e7);min-width:1.5rem;min-height:1.5rem;color:var(--wecool-color-text,#18181b);cursor:pointer;border-radius:.25rem;align-self:flex-start;align-items:center;gap:.25rem;padding:.375rem .625rem;font-size:.8125rem;display:inline-flex}.wecool-message-attachment__download:hover{background-color:var(--wecool-color-bg-muted,#f4f4f5)}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
|
|
3
|
+
/*$vite$:1*/
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { WecoolChatControls } from './ui/types';
|
|
|
12
12
|
*/
|
|
13
13
|
export type WecoolChatController = (() => void) & WecoolChatControls;
|
|
14
14
|
export type { Tool, ToolDefinition, ToolParameters, ToolHandlerContext, ChatConfig, ChatState, AssistantToolCall, Message, ToolCall, ChatEvent, } from './core/types';
|
|
15
|
+
export type { DebugLogger } from './core/debug-logger';
|
|
15
16
|
export type { ChatPlugin, PluginApiVersion, PluginContext, PluginId, PluginLogger, PluginTool, PluginToolInvocation, } from './plugin/types';
|
|
16
17
|
export { definePlugin } from './plugin/define';
|
|
17
18
|
export type { ChatWidgetProps, WecoolChatControls } from './ui/types';
|
|
@@ -21,6 +22,7 @@ export { ChatHeader } from './ui/components/ChatHeader';
|
|
|
21
22
|
export { ChatFooter } from './ui/components/ChatFooter';
|
|
22
23
|
export { MessageList } from './ui/components/MessageList';
|
|
23
24
|
export { FloatButton } from './ui/components/FloatButton';
|
|
25
|
+
export { MarkdownMessage } from './ui/components/markdown/MarkdownMessage';
|
|
24
26
|
export { ChatClient, createMessageId, createUserMessage, createAssistantMessage, createToolMessage, } from './core/client';
|
|
25
27
|
export { getCurrentPageInfo, mergeBuiltinTools } from './ui/builtin-tools';
|
|
26
28
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,0BAA0B,CAAC;AAClC,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,0BAA0B,CAAC;AAClC,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,kBAAkB,CAAC;AA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