wecool-chat 0.8.0 → 0.10.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.
Files changed (227) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.ja.md +234 -20
  3. package/README.md +419 -21
  4. package/dist/CopyIndicator-RR3hSsBA.js +51 -0
  5. package/dist/MarkdownBody-EIz0jnQy.js +14910 -0
  6. package/dist/VoiceControls-A7N4uPTo.js +146 -0
  7. package/dist/VoiceRuntime-DrYjNkZK.js +459 -0
  8. package/dist/abort-BjeyCmGn.js +6 -0
  9. package/dist/blank-line-CUDmZ-mX.js +143 -0
  10. package/dist/{browser-Cgo1GySj.js → browser-M7mS-hAN.js} +5 -5
  11. package/dist/clsx-Cf23UI1w.js +16 -0
  12. package/dist/core/client.d.ts +37 -4
  13. package/dist/core/client.d.ts.map +1 -1
  14. package/dist/core/consume-stream.d.ts.map +1 -1
  15. package/dist/core/error-reporter.d.ts +59 -0
  16. package/dist/core/error-reporter.d.ts.map +1 -0
  17. package/dist/core/global-error-capture.d.ts +10 -0
  18. package/dist/core/global-error-capture.d.ts.map +1 -0
  19. package/dist/core/i18n/messages.d.ts +139 -1
  20. package/dist/core/i18n/messages.d.ts.map +1 -1
  21. package/dist/core/sanitize-user-message.d.ts +11 -0
  22. package/dist/core/sanitize-user-message.d.ts.map +1 -0
  23. package/dist/core/stream-state.d.ts.map +1 -1
  24. package/dist/core/tool-confirmation.d.ts +35 -0
  25. package/dist/core/tool-confirmation.d.ts.map +1 -0
  26. package/dist/core/tool-runner.d.ts +8 -0
  27. package/dist/core/tool-runner.d.ts.map +1 -1
  28. package/dist/core/types.d.ts +123 -0
  29. package/dist/core/types.d.ts.map +1 -1
  30. package/dist/core/widget-origin.d.ts +33 -0
  31. package/dist/core/widget-origin.d.ts.map +1 -0
  32. package/dist/createLucideIcon-C7wGkK-Q.js +43 -0
  33. package/dist/default-sNAxTmdF.js +8 -0
  34. package/dist/index.css +2 -2
  35. package/dist/index.d.ts +3 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +7548 -26290
  38. package/dist/jsx-runtime-Cyy0mp0f.js +328 -0
  39. package/dist/lib-DG_DjiCr.js +15 -0
  40. package/dist/loader.d.ts +12 -0
  41. package/dist/loader.d.ts.map +1 -0
  42. package/dist/messages-FvtWi3lI.js +247 -0
  43. package/dist/observe/__tests__/format.test.d.ts +2 -0
  44. package/dist/observe/__tests__/format.test.d.ts.map +1 -0
  45. package/dist/observe/__tests__/http.test.d.ts +2 -0
  46. package/dist/observe/__tests__/http.test.d.ts.map +1 -0
  47. package/dist/observe/__tests__/index.test.d.ts +2 -0
  48. package/dist/observe/__tests__/index.test.d.ts.map +1 -0
  49. package/dist/observe/__tests__/js-error.test.d.ts +2 -0
  50. package/dist/observe/__tests__/js-error.test.d.ts.map +1 -0
  51. package/dist/observe/__tests__/redact.test.d.ts +2 -0
  52. package/dist/observe/__tests__/redact.test.d.ts.map +1 -0
  53. package/dist/observe/__tests__/ring-buffer.test.d.ts +2 -0
  54. package/dist/observe/__tests__/ring-buffer.test.d.ts.map +1 -0
  55. package/dist/observe/format.d.ts +10 -0
  56. package/dist/observe/format.d.ts.map +1 -0
  57. package/dist/observe/index.d.ts +33 -0
  58. package/dist/observe/index.d.ts.map +1 -0
  59. package/dist/observe/observers/http.d.ts +24 -0
  60. package/dist/observe/observers/http.d.ts.map +1 -0
  61. package/dist/observe/observers/js-error.d.ts +22 -0
  62. package/dist/observe/observers/js-error.d.ts.map +1 -0
  63. package/dist/observe/redact.d.ts +27 -0
  64. package/dist/observe/redact.d.ts.map +1 -0
  65. package/dist/observe/ring-buffer.d.ts +20 -0
  66. package/dist/observe/ring-buffer.d.ts.map +1 -0
  67. package/dist/observe/types.d.ts +25 -0
  68. package/dist/observe/types.d.ts.map +1 -0
  69. package/dist/plugin/registry.d.ts.map +1 -1
  70. package/dist/plugin/types.d.ts +19 -1
  71. package/dist/plugin/types.d.ts.map +1 -1
  72. package/dist/plugins/page-reader/__tests__/get-meta.test.d.ts +2 -0
  73. package/dist/plugins/page-reader/__tests__/get-meta.test.d.ts.map +1 -0
  74. package/dist/plugins/page-reader/__tests__/index.test.d.ts +2 -0
  75. package/dist/plugins/page-reader/__tests__/index.test.d.ts.map +1 -0
  76. package/dist/plugins/page-reader/__tests__/read-content.test.d.ts +2 -0
  77. package/dist/plugins/page-reader/__tests__/read-content.test.d.ts.map +1 -0
  78. package/dist/plugins/page-reader/__tests__/scroll.test.d.ts +2 -0
  79. package/dist/plugins/page-reader/__tests__/scroll.test.d.ts.map +1 -0
  80. package/dist/plugins/page-reader/index.d.ts +18 -0
  81. package/dist/plugins/page-reader/index.d.ts.map +1 -0
  82. package/dist/plugins/page-reader/tools/get-meta.d.ts +29 -0
  83. package/dist/plugins/page-reader/tools/get-meta.d.ts.map +1 -0
  84. package/dist/plugins/page-reader/tools/read-content.d.ts +34 -0
  85. package/dist/plugins/page-reader/tools/read-content.d.ts.map +1 -0
  86. package/dist/plugins/page-reader/tools/scroll.d.ts +29 -0
  87. package/dist/plugins/page-reader/tools/scroll.d.ts.map +1 -0
  88. package/dist/plugins/page-reader.d.ts +2 -0
  89. package/dist/plugins/page-reader.js +230 -0
  90. package/dist/plugins/qrcode/tool.d.ts.map +1 -1
  91. package/dist/plugins/qrcode.js +52 -42
  92. package/dist/plugins/shared/abort.d.ts +7 -0
  93. package/dist/plugins/shared/abort.d.ts.map +1 -0
  94. package/dist/remark-gfm-Bzy1u34W.js +1962 -0
  95. package/dist/remark-parse-BnwSmQr-.js +2486 -0
  96. package/dist/stable-prefix-BHsGj4tL.js +21 -0
  97. package/dist/ui/builtin-tools/get-current-page-info.d.ts.map +1 -1
  98. package/dist/ui/builtin-tools/index.d.ts +1 -1
  99. package/dist/ui/builtin-tools/index.d.ts.map +1 -1
  100. package/dist/ui/builtin-tools/merge-builtin-tools.d.ts +9 -0
  101. package/dist/ui/builtin-tools/merge-builtin-tools.d.ts.map +1 -1
  102. package/dist/ui/commands/builtin-commands.d.ts +46 -0
  103. package/dist/ui/commands/builtin-commands.d.ts.map +1 -0
  104. package/dist/ui/components/ChatErrorBoundary.d.ts +30 -0
  105. package/dist/ui/components/ChatErrorBoundary.d.ts.map +1 -0
  106. package/dist/ui/components/ChatFooter.d.ts +32 -2
  107. package/dist/ui/components/ChatFooter.d.ts.map +1 -1
  108. package/dist/ui/components/ChatHeader.d.ts +13 -2
  109. package/dist/ui/components/ChatHeader.d.ts.map +1 -1
  110. package/dist/ui/components/ChatHeaderMenu.d.ts +28 -2
  111. package/dist/ui/components/ChatHeaderMenu.d.ts.map +1 -1
  112. package/dist/ui/components/ChatPanel.d.ts +38 -4
  113. package/dist/ui/components/ChatPanel.d.ts.map +1 -1
  114. package/dist/ui/components/ChatWidget.d.ts +1 -1
  115. package/dist/ui/components/ChatWidget.d.ts.map +1 -1
  116. package/dist/ui/components/CommandConfirmationCard.d.ts +28 -0
  117. package/dist/ui/components/CommandConfirmationCard.d.ts.map +1 -0
  118. package/dist/ui/components/CommandOverlays.d.ts +40 -0
  119. package/dist/ui/components/CommandOverlays.d.ts.map +1 -0
  120. package/dist/ui/components/CommandPalette.d.ts +25 -0
  121. package/dist/ui/components/CommandPalette.d.ts.map +1 -0
  122. package/dist/ui/components/FooterActions.d.ts +18 -0
  123. package/dist/ui/components/FooterActions.d.ts.map +1 -0
  124. package/dist/ui/components/HelpDialogContent.d.ts +7 -0
  125. package/dist/ui/components/HelpDialogContent.d.ts.map +1 -0
  126. package/dist/ui/components/MessageList.d.ts +12 -1
  127. package/dist/ui/components/MessageList.d.ts.map +1 -1
  128. package/dist/ui/components/MessageRow.d.ts +7 -1
  129. package/dist/ui/components/MessageRow.d.ts.map +1 -1
  130. package/dist/ui/components/MessageRowActions.d.ts +9 -3
  131. package/dist/ui/components/MessageRowActions.d.ts.map +1 -1
  132. package/dist/ui/components/MicButton.d.ts +11 -0
  133. package/dist/ui/components/MicButton.d.ts.map +1 -0
  134. package/dist/ui/components/ResizeHandles.d.ts +15 -0
  135. package/dist/ui/components/ResizeHandles.d.ts.map +1 -0
  136. package/dist/ui/components/ToolConfirmationCard.d.ts +22 -0
  137. package/dist/ui/components/ToolConfirmationCard.d.ts.map +1 -0
  138. package/dist/ui/components/ToolConfirmationRecord.d.ts +16 -0
  139. package/dist/ui/components/ToolConfirmationRecord.d.ts.map +1 -0
  140. package/dist/ui/components/ToolsDialogContent.d.ts +20 -0
  141. package/dist/ui/components/ToolsDialogContent.d.ts.map +1 -0
  142. package/dist/ui/components/VoiceControls.d.ts +22 -0
  143. package/dist/ui/components/VoiceControls.d.ts.map +1 -0
  144. package/dist/ui/components/VoiceLoopStatusBar.d.ts +17 -0
  145. package/dist/ui/components/VoiceLoopStatusBar.d.ts.map +1 -0
  146. package/dist/ui/components/VoiceLoopToggle.d.ts +15 -0
  147. package/dist/ui/components/VoiceLoopToggle.d.ts.map +1 -0
  148. package/dist/ui/components/VoiceRuntime.d.ts +16 -0
  149. package/dist/ui/components/VoiceRuntime.d.ts.map +1 -0
  150. package/dist/ui/components/WidgetDialog.d.ts +22 -0
  151. package/dist/ui/components/WidgetDialog.d.ts.map +1 -0
  152. package/dist/ui/components/lazy-voice.d.ts +19 -0
  153. package/dist/ui/components/lazy-voice.d.ts.map +1 -0
  154. package/dist/ui/components/markdown/MarkdownBody.d.ts +28 -0
  155. package/dist/ui/components/markdown/MarkdownBody.d.ts.map +1 -0
  156. package/dist/ui/components/markdown/MarkdownMessage.d.ts +12 -13
  157. package/dist/ui/components/markdown/MarkdownMessage.d.ts.map +1 -1
  158. package/dist/ui/hooks/conversationPersistence.d.ts +21 -0
  159. package/dist/ui/hooks/conversationPersistence.d.ts.map +1 -0
  160. package/dist/ui/hooks/resize-geometry.d.ts +42 -0
  161. package/dist/ui/hooks/resize-geometry.d.ts.map +1 -0
  162. package/dist/ui/hooks/use-command-execution.d.ts +60 -0
  163. package/dist/ui/hooks/use-command-execution.d.ts.map +1 -0
  164. package/dist/ui/hooks/use-command-palette.d.ts +45 -0
  165. package/dist/ui/hooks/use-command-palette.d.ts.map +1 -0
  166. package/dist/ui/hooks/use-fullscreen.d.ts +21 -0
  167. package/dist/ui/hooks/use-fullscreen.d.ts.map +1 -0
  168. package/dist/ui/hooks/use-global-error-capture.d.ts +16 -0
  169. package/dist/ui/hooks/use-global-error-capture.d.ts.map +1 -0
  170. package/dist/ui/hooks/use-locale-preference.d.ts +14 -0
  171. package/dist/ui/hooks/use-locale-preference.d.ts.map +1 -0
  172. package/dist/ui/hooks/use-menu-keyboard.d.ts +7 -1
  173. package/dist/ui/hooks/use-menu-keyboard.d.ts.map +1 -1
  174. package/dist/ui/hooks/use-message-history.d.ts +14 -0
  175. package/dist/ui/hooks/use-message-history.d.ts.map +1 -1
  176. package/dist/ui/hooks/use-mic-button.d.ts +29 -0
  177. package/dist/ui/hooks/use-mic-button.d.ts.map +1 -0
  178. package/dist/ui/hooks/use-send-message.d.ts +6 -0
  179. package/dist/ui/hooks/use-send-message.d.ts.map +1 -1
  180. package/dist/ui/hooks/use-speak-message.d.ts +26 -0
  181. package/dist/ui/hooks/use-speak-message.d.ts.map +1 -0
  182. package/dist/ui/hooks/use-tool-confirmation.d.ts +22 -0
  183. package/dist/ui/hooks/use-tool-confirmation.d.ts.map +1 -0
  184. package/dist/ui/hooks/use-tool-runner.d.ts +17 -2
  185. package/dist/ui/hooks/use-tool-runner.d.ts.map +1 -1
  186. package/dist/ui/hooks/use-visitor-id.d.ts +22 -0
  187. package/dist/ui/hooks/use-visitor-id.d.ts.map +1 -0
  188. package/dist/ui/hooks/use-voice-input.d.ts +38 -0
  189. package/dist/ui/hooks/use-voice-input.d.ts.map +1 -0
  190. package/dist/ui/hooks/use-voice-loop-speech.d.ts +38 -0
  191. package/dist/ui/hooks/use-voice-loop-speech.d.ts.map +1 -0
  192. package/dist/ui/hooks/use-voice-loop.d.ts +12 -0
  193. package/dist/ui/hooks/use-voice-loop.d.ts.map +1 -0
  194. package/dist/ui/hooks/use-voice-runtime-snapshot.d.ts +19 -0
  195. package/dist/ui/hooks/use-voice-runtime-snapshot.d.ts.map +1 -0
  196. package/dist/ui/hooks/use-voice-runtime.d.ts +29 -0
  197. package/dist/ui/hooks/use-voice-runtime.d.ts.map +1 -0
  198. package/dist/ui/hooks/useChatStream.d.ts +19 -0
  199. package/dist/ui/hooks/useChatStream.d.ts.map +1 -1
  200. package/dist/ui/hooks/useConversationList.d.ts +12 -1
  201. package/dist/ui/hooks/useConversationList.d.ts.map +1 -1
  202. package/dist/ui/hooks/useDraggablePanel.d.ts +2 -0
  203. package/dist/ui/hooks/useDraggablePanel.d.ts.map +1 -1
  204. package/dist/ui/hooks/useResizablePanel.d.ts +48 -0
  205. package/dist/ui/hooks/useResizablePanel.d.ts.map +1 -0
  206. package/dist/ui/utils/speech-text.d.ts +29 -0
  207. package/dist/ui/utils/speech-text.d.ts.map +1 -0
  208. package/dist/ui/utils/voice-locale.d.ts +3 -0
  209. package/dist/ui/utils/voice-locale.d.ts.map +1 -0
  210. package/dist/ui/utils/voice-loop-cue.d.ts +23 -0
  211. package/dist/ui/utils/voice-loop-cue.d.ts.map +1 -0
  212. package/dist/ui/utils/voice-loop-status.d.ts +17 -0
  213. package/dist/ui/utils/voice-loop-status.d.ts.map +1 -0
  214. package/dist/ui/utils/voice-loop-types.d.ts +40 -0
  215. package/dist/ui/utils/voice-loop-types.d.ts.map +1 -0
  216. package/dist/ui/utils/voice-runtime.d.ts +38 -0
  217. package/dist/ui/utils/voice-runtime.d.ts.map +1 -0
  218. package/dist/ui/utils/voice-support.d.ts +9 -0
  219. package/dist/ui/utils/voice-support.d.ts.map +1 -0
  220. package/dist/unified-DctkAd9P.js +518 -0
  221. package/dist/use-voice-input-LtJJz-zQ.js +102 -0
  222. package/dist/version.d.ts +17 -0
  223. package/dist/version.d.ts.map +1 -0
  224. package/dist/voice-runtime-F5NxN_0m.js +11 -0
  225. package/dist/voice-support-BeOiOzcn.js +9 -0
  226. package/package.json +41 -23
  227. package/dist/messages-B7Kpa6yx.js +0 -117
@@ -1,4 +1,15 @@
1
1
  import { ChatPlugin } from '../plugin/types';
2
+ import { ObserveConfig } from '../observe';
3
+ import { Locale } from './i18n/messages';
4
+ /**
5
+ * UI 表示専用の多言語テキスト。単一文字列、または locale ごとの文字列マップ。
6
+ *
7
+ * `/tools` 一覧などウィジェット UI にだけ表示され、**LLM には送信されない**
8
+ * (`toToolDefinition` が name / description / parameters のみを抽出するため構造的に strip される)。
9
+ * 日本語をプロトコル文字列に混ぜると応答言語バイアス(issue #230 実測)が再発するため、
10
+ * 表示メタデータは description(英語規範)とは別経路のこの型で持つ。
11
+ */
12
+ export type LocalizedText = string | Partial<Record<Locale, string>>;
2
13
  /**
3
14
  * JSON Schema for tool parameters
4
15
  */
@@ -104,6 +115,36 @@ export type Tool = {
104
115
  parameters: ToolParameters;
105
116
  /** Function to execute when the LLM calls this tool. ctx は optional で既存実装と互換 */
106
117
  handler: (args: Record<string, unknown>, ctx?: ToolHandlerContext) => unknown | Promise<unknown>;
118
+ /**
119
+ * true にすると、LLM がこのツールを呼んだとき handler 実行前にチャット内へ
120
+ * 承認 UI(実行する / キャンセル)を表示し、ユーザーが承認するまで実行しない。
121
+ * キャンセル時は handler を呼ばず「ユーザーが拒否した」旨の結果を LLM に返す。
122
+ *
123
+ * Why: フォーム消去・送信・決済のような破壊的操作を LLM の誤解釈で暴発させないための
124
+ * ガード。`onToolExecute` は通知のみで拒否できず、`ToolStopSignal` は handler 実行後の
125
+ * 打ち切り用のため、「実行前に防ぐ」経路はこのフィールドが唯一の手段になる。
126
+ * 未指定 / false は従来どおり即実行(後方互換)。
127
+ */
128
+ requiresConfirmation?: boolean;
129
+ /**
130
+ * 承認 UI に表示する確認文言。`requiresConfirmation: true` のときのみ使われる。
131
+ * ツール名は開発者向け語彙で訪問者に伝わらないため、ホストがサイトの表示言語で
132
+ * 完成形の文(例: 「フォームの内容をすべて消去します。よろしいですか?」)を渡すこと。
133
+ * 未指定時はウィジェットの汎用文言 + ツール名で表示される。
134
+ * `ToolStopSignal.userMessage` と同じサニタイズ(制御文字除去・2000 文字上限)を通る。
135
+ */
136
+ confirmationMessage?: string;
137
+ /**
138
+ * `/tools`(コマンドパレット経由のツール一覧)に表示する訪問者向けの表示名。
139
+ * UI 表示専用で **LLM には送信されない**。単一文字列か locale 別(`{ ja, en }`)で渡す。
140
+ * 未指定なら英語 description をそのまま劣化表示する。
141
+ */
142
+ displayName?: LocalizedText;
143
+ /**
144
+ * `/tools` 一覧に出す質問例。クリックで入力欄に挿入される(自動送信はしない)。
145
+ * UI 表示専用で **LLM には送信されない**。各要素は単一文字列か locale 別で渡す。
146
+ */
147
+ exampleQueries?: LocalizedText[];
107
148
  };
108
149
  /**
109
150
  * Tool definition sent to the API (without handler)
@@ -145,6 +186,17 @@ export type ChatConfig = {
145
186
  className?: string;
146
187
  /** Placeholder text for the input field */
147
188
  placeholder?: string;
189
+ /**
190
+ * 継続音声モードを開始したときに読み上げる合図。
191
+ *
192
+ * 文字列なら全 locale 共通、オブジェクトなら locale ごとに使い分ける。
193
+ * 未指定なら組み込みの既定文言(ja: 「どうぞ」/ en: "Go ahead")を読む。
194
+ *
195
+ * 空文字を渡すと音は出さないが、**読み上げの呼び出し自体は省かない**。iOS は
196
+ * 利用者操作の中で一度も読み上げを呼んでいないページの読み上げを無視するため、
197
+ * 呼び出しを省くとモード中の読み上げが全て無音になる(issue #262 の実機検証)。
198
+ */
199
+ voiceLoopStartCue?: string | Partial<Record<Locale, string>>;
148
200
  /**
149
201
  * Color theme.
150
202
  * - `"auto"` (default behavior when explicitly set): follow OS `prefers-color-scheme`.
@@ -231,6 +283,19 @@ export type ChatConfig = {
231
283
  * @since 0.9.0
232
284
  */
233
285
  additionalSystemPrompt?: string;
286
+ /**
287
+ * 会話の継続スコープ。省略時は現行どおり保存しない(ページ遷移・リロードで新しい会話になる)。
288
+ *
289
+ * - `"tab"`: conversationId を sessionStorage に保存し、同一タブ内のページ遷移・リロード後に
290
+ * 同じ会話を自動復元して継続する。タブを閉じれば消え、別タブは別会話(安全側)。
291
+ *
292
+ * Why: ページ遷移を伴う tool(ナビゲーション等)を持つサイトでは、遷移のたびに
293
+ * 会話が消えると「案内された直後に文脈を失う」体験になる。復元 API(/api/v1/conversations)は
294
+ * 既存のため、これはその自動配線を opt-in で提供するもの。
295
+ *
296
+ * @since 0.9.0
297
+ */
298
+ persistConversation?: "tab";
234
299
  /**
235
300
  * チャットのライフサイクル状態 (LLM ストリーミング中 / ツール実行中) が変化したときに呼ばれる。
236
301
  *
@@ -256,6 +321,51 @@ export type ChatConfig = {
256
321
  * @since 0.9.0
257
322
  */
258
323
  augmentUserMessage?: (text: string) => string;
324
+ /**
325
+ * ウィジェット内部で起きたエラー(警告以上)を API のエラー収集エンドポイントへ
326
+ * 送信するか。既定は `true`(有効)。
327
+ *
328
+ * 送信内容: エラー情報(message / stack / code)+ 発生環境(version / URL / userAgent /
329
+ * network 等)+ 相関用の requestId / sessionId。**メッセージ本文・API キー生値・
330
+ * 埋め込み先の行動履歴は一切含めない**(PII 非含有)。API キーはマスク済みのみ載せる。
331
+ *
332
+ * 送信は自ドメインの API(`endpoint`)に対してのみ・エラー発生時のみ・失敗時は破棄
333
+ * (再送・端末保存なし)。埋め込み先サイト起源のエラーは送らない。
334
+ *
335
+ * `false` を指定すると送信を完全に停止する。
336
+ *
337
+ * @since 0.8.0
338
+ */
339
+ errorReporting?: boolean;
340
+ /**
341
+ * ホストページで起きた不具合の兆候(HTTP の 4xx/5xx・JS エラー)を観測し、チャット送信時に
342
+ * 「現在のページ状況」として LLM への送信本文へ自動付与するか。既定は **有効**(ON)。
343
+ *
344
+ * 訪問者のチャット画面には素の発話だけが表示され、背景情報は AI にのみ渡る。記録するのは
345
+ * 通信/エラーの事実だけで、フォーム入力値は一切記録しない。URL クエリ・エラー文言は
346
+ * 秘匿パターン(token / email 等)を redact してから渡す。観測データは自ドメインへ送らず、
347
+ * チャット送信時に LLM へ一度渡るのみ。
348
+ *
349
+ * - `false`: 完全無効(fetch/console へのパッチも当てない)
350
+ * - `{ http?: false }` / `{ errors?: false }`: チャネル単位で無効化
351
+ *
352
+ * GDPR / ePrivacy 等で訪問者同意が要る地域では、同意基盤(Cookie バナー等)に連動させて
353
+ * 同意が取れるまで観測を止めること(詳細は README)。
354
+ *
355
+ * @since 0.10.0
356
+ */
357
+ observe?: ObserveConfig;
358
+ /**
359
+ * マイクによる音声入力・メッセージの読み上げボタンを有効化するか。既定は `false`。
360
+ *
361
+ * 有効にすると、入力欄にマイクボタン(単発の音声認識。ブラウザ非対応時は非表示)、
362
+ * assistant メッセージの操作メニューに読み上げボタン(ブラウザ非対応時は非表示)が追加される。
363
+ * どちらも利用者のボタン押下が起点で、LLM の tool 呼び出しは経由しない
364
+ * (issue #261。旧 voice プラグインの tool 方式は撤去した)。
365
+ *
366
+ * @since 0.10.0
367
+ */
368
+ voice?: boolean;
259
369
  };
260
370
  /**
261
371
  * チャットのライフサイクル状態。`onStateChange` callback に渡される。
@@ -318,6 +428,18 @@ export type Message = {
318
428
  * `tool` ロールのメッセージにのみ立つ。
319
429
  */
320
430
  attachments?: ToolAttachment[];
431
+ /**
432
+ * 実行前確認 (`requiresConfirmation`) の決着記録。`tool` ロールにのみ立つ。
433
+ *
434
+ * ChatWidget はこれを「承認 / キャンセルの履歴行」として改変不能な形でチャットに描画する。
435
+ * 破壊的操作の informed consent の証跡を会話上に残すため。`buildBody` の送信ホワイトリスト
436
+ * に含めないため LLM・バックエンドには送られない (UI 表示専用)。
437
+ * `message` はサニタイズ済み確認文言。未指定なら描画側が汎用文言 + ツール名で補う。
438
+ */
439
+ confirmation?: {
440
+ approved: boolean;
441
+ message?: string;
442
+ };
321
443
  /** assistant ロールにのみ立つ。エラー由来の行であることを示す */
322
444
  isError?: boolean;
323
445
  /**
@@ -360,6 +482,7 @@ export type ChatEvent = {
360
482
  } | {
361
483
  type: "error";
362
484
  message: string;
485
+ code?: string;
363
486
  } | {
364
487
  type: "max_turns";
365
488
  turn: number;
@@ -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C;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * ウィジェット(packages/chat のバンドル)起源のエラーかどうかを判定するユーティリティ。
3
+ *
4
+ * Why: エラー収集は自分(widget)が起こしたエラーだけを送る。埋め込み先サイトの
5
+ * 別スクリプトの失敗を送ると、他人のエラーを勝手に収集することになりプライバシー侵害
6
+ * かつノイズになる(design.md リスク項)。判定は「スタック」と「イベント発生元
7
+ * (ErrorEvent.filename)」の両方を見て、どちらかが widget バンドル由来なら widget 起源
8
+ * とみなす。**判定不能なら送らない側に倒す**。
9
+ */
10
+ /** isWidgetOriginError が受け取る判定材料。 */
11
+ export type WidgetOriginParams = {
12
+ /** Error.stack(あれば)。 */
13
+ stack?: string;
14
+ /** ErrorEvent.filename(グローバル error イベント時にあれば)。 */
15
+ filename?: string;
16
+ };
17
+ /**
18
+ * bundleUrl を注入して起源判定関数を作る factory。
19
+ * 実運用では下の `isWidgetOriginError`(import.meta.url 解決済み)を使い、
20
+ * テストでは任意の bundleUrl を注入して判定境界を検証する。
21
+ *
22
+ * @param bundleUrl - widget バンドルの URL(解決不能なら null)
23
+ * @returns エラーが widget 起源かを判定する関数。どちらかの材料がバンドル由来なら true、
24
+ * 判定材料が無い / バンドルを指さない / bundleUrl が判定不能なら false(送らない側)
25
+ */
26
+ export declare const createWidgetOriginChecker: (bundleUrl: string | null) => ((params: WidgetOriginParams) => boolean);
27
+ /**
28
+ * エラーが widget 起源かを、スタックとイベント発生元の両情報から判定する。
29
+ * どちらかがバンドル由来なら widget 起源。両方とも判定材料が無い / バンドルを指さない
30
+ * 場合は **false(送らない側に倒す)**。
31
+ */
32
+ export declare const isWidgetOriginError: (params: WidgetOriginParams) => boolean;
33
+ //# sourceMappingURL=widget-origin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-origin.d.ts","sourceRoot":"","sources":["../../src/core/widget-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2BH,qCAAqC;AACrC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,WAAW,MAAM,GAAG,IAAI,KACvB,CAAC,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAY1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,WAnBnB,kBAAkB,KAAK,OAmB4C,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { a as g } from "./messages-FvtWi3lI.js";
2
+ import { i as A } from "./jsx-runtime-Cyy0mp0f.js";
3
+ var a = /* @__PURE__ */ g(A(), 1), m = (...t) => t.filter((e, r, o) => !!e && e.trim() !== "" && o.indexOf(e) === r).join(" ").trim(), b = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), L = (t) => t.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, r, o) => o ? o.toUpperCase() : r.toLowerCase()), d = (t) => {
4
+ const e = L(t);
5
+ return e.charAt(0).toUpperCase() + e.slice(1);
6
+ }, c = {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: 24,
9
+ height: 24,
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ strokeWidth: 2,
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round"
16
+ }, W = (t) => {
17
+ for (const e in t) if (e.startsWith("aria-") || e === "role" || e === "title") return !0;
18
+ return !1;
19
+ }, S = (0, a.createContext)({}), _ = () => (0, a.useContext)(S), y = (0, a.forwardRef)(({ color: t, size: e, strokeWidth: r, absoluteStrokeWidth: o, className: i = "", children: s, iconNode: C, ...l }, h) => {
20
+ const { size: n = 24, strokeWidth: u = 2, absoluteStrokeWidth: p = !1, color: f = "currentColor", className: v = "" } = _() ?? {}, w = o ?? p ? Number(r ?? u) * 24 / Number(e ?? n) : r ?? u;
21
+ return (0, a.createElement)("svg", {
22
+ ref: h,
23
+ ...c,
24
+ width: e ?? n ?? c.width,
25
+ height: e ?? n ?? c.height,
26
+ stroke: t ?? f,
27
+ strokeWidth: w,
28
+ className: m("lucide", v, i),
29
+ ...!s && !W(l) && { "aria-hidden": "true" },
30
+ ...l
31
+ }, [...C.map(([x, k]) => (0, a.createElement)(x, k)), ...Array.isArray(s) ? s : [s]]);
32
+ }), j = (t, e) => {
33
+ const r = (0, a.forwardRef)(({ className: o, ...i }, s) => (0, a.createElement)(y, {
34
+ ref: s,
35
+ iconNode: e,
36
+ className: m(`lucide-${b(d(t))}`, `lucide-${t}`, o),
37
+ ...i
38
+ }));
39
+ return r.displayName = d(t), r;
40
+ };
41
+ export {
42
+ j as t
43
+ };
@@ -0,0 +1,8 @@
1
+ function n() {
2
+ }
3
+ function a() {
4
+ }
5
+ export {
6
+ a as n,
7
+ n as t
8
+ };
package/dist/index.css CHANGED
@@ -1,3 +1,3 @@
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}
1
+ /*! tailwindcss v4.3.3 | 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;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, 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)}}@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,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, 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:where(:not(iframe)){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}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.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}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\[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-primary:#2563eb;--wecool-color-primary-hover:#1d4ed8;--wecool-color-link:var(--wecool-color-primary,#2563eb);--wecool-color-link-hover:var(--wecool-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(--wecool-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--resized{max-width:none;max-height:calc(100dvh - 1.25rem)}.wecool-float-panel--fullscreen{border-radius:0;width:auto;max-width:none;height:100dvh;max-height:none;margin:0;inset:0}.wecool-float-panel[data-dragging=true],.wecool-float-panel[data-resizing=true]{-webkit-user-select:none;user-select:none}.wecool-resize-handle{touch-action:none;z-index:1;background-color:#0000;border:none;padding:0;position:absolute}.wecool-resize-handle:hover,.wecool-resize-handle:focus-visible{background-color:var(--wecool-color-border-strong);opacity:.6}.wecool-resize-handle--n,.wecool-resize-handle--s{cursor:ns-resize;height:.5rem;left:.75rem;right:.75rem}.wecool-resize-handle--n{top:0}.wecool-resize-handle--s{bottom:0}.wecool-resize-handle--e,.wecool-resize-handle--w{cursor:ew-resize;width:.5rem;top:.75rem;bottom:.75rem}.wecool-resize-handle--e{right:0}.wecool-resize-handle--w{left:0}.wecool-resize-handle--nw,.wecool-resize-handle--ne,.wecool-resize-handle--sw,.wecool-resize-handle--se{width:.75rem;height:.75rem}.wecool-resize-handle--nw{cursor:nwse-resize;top:0;left:0}.wecool-resize-handle--ne{cursor:nesw-resize;top:0;right:0}.wecool-resize-handle--sw{cursor:nesw-resize;bottom:0;left:0}.wecool-resize-handle--se{cursor:nwse-resize;bottom:0;right:0}@media (pointer:coarse){.wecool-resize-handle{display:none}}@media (forced-colors:active){.wecool-resize-handle:hover,.wecool-resize-handle:focus-visible{background-color:#0000;border:1px solid highlight}}.wecool-embed-root{height:100%;position:relative;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:.25rem;padding:.5rem;display:flex;position:relative}.wecool-footer__combobox{flex:1;min-width:0;display:flex}.wecool-footer__input{width:100%;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--new{color:var(--wecool-color-text-muted);background-color:#0000}.wecool-footer__button--new:hover{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-footer__button--mic{color:var(--wecool-color-text-muted);background-color:#0000}.wecool-footer__button--mic:hover:not(:disabled):not(.wecool-footer__button--mic-listening){background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-footer__button--mic:disabled{opacity:.3;cursor:not-allowed}.wecool-footer__button--mic-listening{background-color:var(--wecool-color-error-text);color:#fff;animation:1.5s ease-in-out infinite wecool-mic-pulse}@keyframes wecool-mic-pulse{0%,to{opacity:1}50%{opacity:.6}}.wecool-footer__button--voice-loop{color:var(--wecool-color-text-muted);background-color:#0000}.wecool-footer__button--voice-loop:hover:not(:disabled):not(.wecool-footer__button--voice-loop-on){background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-footer__button--voice-loop-on{background-color:var(--wecool-color-primary);color:#fff}.wecool-voice-loop-bar{border-top:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text);align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;display:flex}.wecool-voice-loop-bar--ended{color:var(--wecool-color-error-text)}.wecool-voice-loop-bar__text{flex:1;min-width:0}.wecool-voice-loop-bar__indicator{background-color:var(--wecool-color-text-muted);border-radius:50%;flex-shrink:0;width:.5rem;height:.5rem}.wecool-voice-loop-bar__indicator[data-wecool-voice-loop-status=listening]{background-color:var(--wecool-color-error-text);animation:1.5s ease-in-out infinite wecool-mic-pulse}.wecool-voice-loop-bar__indicator[data-wecool-voice-loop-status=speaking]{background-color:var(--wecool-color-primary);animation:1.5s ease-in-out infinite wecool-mic-pulse}.wecool-voice-loop-bar__stop{border:1px solid var(--wecool-color-border);background-color:var(--wecool-color-bg);min-width:2.75rem;min-height:2.75rem;color:var(--wecool-color-text);cursor:pointer;border-radius:.375rem;padding:0 .75rem;font-size:.8125rem}.wecool-voice-loop-bar__stop:hover{background-color:var(--wecool-color-bg-muted)}@media (forced-colors:active){.wecool-voice-loop-bar{border-top:1px solid canvastext}.wecool-voice-loop-bar__stop{color:buttontext;background-color:buttonface;border:1px solid buttontext}.wecool-voice-loop-bar__indicator{background-color:canvastext}.wecool-footer__button--voice-loop-on{color:highlighttext;background-color:highlight;border:1px solid buttontext}}.wecool-footer__mic-error{color:var(--wecool-color-error-text);white-space:nowrap;align-self:center;font-size:.75rem}.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}}.wecool-tool-confirmation{color:var(--wecool-color-text);background-color:var(--wecool-color-bg-secondary);border:1px solid var(--wecool-color-border);border-radius:12px;flex-direction:column;gap:.625rem;margin-top:.5rem;padding:.75rem .875rem;font-size:.875rem;line-height:1.5;display:flex}.wecool-tool-confirmation__text{word-break:break-word;align-items:flex-start;gap:.5rem;margin:0;display:flex}.wecool-tool-confirmation__icon{color:var(--wecool-color-text-muted);flex-shrink:0}.wecool-tool-confirmation__tool-name{font-family:ui-monospace,monospace;font-size:.8125rem}.wecool-tool-confirmation__actions{justify-content:flex-end;gap:.5rem;display:flex}.wecool-tool-confirmation__button{cursor:pointer;border-radius:8px;min-width:4rem;min-height:2rem;padding:.25em .875em;font-size:.875rem;transition:all .15s}.wecool-tool-confirmation__button--cancel{color:var(--wecool-color-text);border:1px solid var(--wecool-color-border-strong);background-color:#0000}.wecool-tool-confirmation__button--cancel:hover{background-color:var(--wecool-color-bg-muted)}.wecool-tool-confirmation__button--approve{color:var(--wecool-color-text-on-strong);background-color:var(--wecool-color-bg-strong);border:1px solid var(--wecool-color-bg-strong)}.wecool-tool-confirmation__button--approve:hover{opacity:.85}.wecool-tool-confirmation--record{color:var(--wecool-color-text-muted);border:1px solid var(--wecool-color-border);background-color:#0000;gap:.375rem;padding:.625rem .875rem}.wecool-tool-confirmation--record .wecool-tool-confirmation__text{font-size:.8125rem}.wecool-tool-confirmation__outcome{align-items:center;gap:.375rem;margin:0;font-size:.8125rem;font-weight:600;display:flex}.wecool-tool-confirmation__outcome--approved{color:var(--wecool-color-text)}.wecool-tool-confirmation__outcome--declined{color:var(--wecool-color-text-muted)}.wecool-command-palette{background-color:var(--wecool-color-bg);border:1px solid var(--wecool-color-border);z-index:5;border-radius:12px;max-height:min(15rem,45dvh);margin:0;padding:.25rem;list-style:none;position:absolute;bottom:calc(100% - .25rem);left:.5rem;right:.5rem;overflow-y:auto;box-shadow:0 8px 24px #0000001f}.wecool-command-palette__option{cursor:pointer;border-radius:8px;align-items:baseline;gap:.5rem;min-height:1.5rem;padding:.5rem .625rem;display:flex}.wecool-command-palette__option--active{background-color:var(--wecool-color-bg-muted)}.wecool-command-palette__command{color:var(--wecool-color-text);flex-shrink:0;font-family:ui-monospace,monospace;font-size:.875rem}.wecool-command-palette__description{color:var(--wecool-color-text-muted);font-size:.8125rem}.wecool-command-dialog{z-index:20;background-color:var(--wecool-color-bg);border-radius:inherit;flex-direction:column;display:flex;position:absolute;inset:0}.wecool-embed-root--input-only .wecool-command-dialog{border:1px solid var(--wecool-color-border);border-radius:12px;max-height:min(24rem,70dvh);inset:auto 0 calc(100% + .5rem);overflow:hidden;box-shadow:0 8px 24px #00000029}.wecool-command-overlay{z-index:20;background-color:#0006;justify-content:center;align-items:center;padding:1rem;display:flex;position:absolute;inset:0}.wecool-command-dialog__header{border-bottom:1px solid var(--wecool-color-border);justify-content:space-between;align-items:center;gap:.5rem;padding:.875rem 1rem;display:flex}.wecool-command-dialog__title{color:var(--wecool-color-text);margin:0;font-size:1rem;font-weight:600}.wecool-command-dialog__subtitle{color:var(--wecool-color-text-muted);border-bottom:1px solid var(--wecool-color-border);margin:0;padding:.625rem 1rem;font-size:.8125rem}.wecool-command-dialog__close{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-command-dialog__close:hover{background-color:var(--wecool-color-bg-muted);color:var(--wecool-color-text)}.wecool-command-dialog__body{flex:1;min-height:0;padding:.875rem 1rem;overflow-y:auto}.wecool-tools-dialog__list,.wecool-tools-dialog__examples{margin:0;padding:0;list-style:none}.wecool-tools-dialog__item{border-bottom:1px solid var(--wecool-color-border);padding:.625rem 0}.wecool-tools-dialog__item:last-child{border-bottom:none}.wecool-tools-dialog__name{color:var(--wecool-color-text);margin:0 0 .375rem;font-size:.9375rem;font-weight:600}.wecool-tools-dialog__name--fallback{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;font-weight:400;display:-webkit-box;overflow:hidden}.wecool-tools-dialog__examples{flex-direction:column;gap:.25rem;display:flex}.wecool-tools-dialog__example{text-align:left;width:100%;min-height:1.5rem;color:var(--wecool-color-text);background-color:var(--wecool-color-bg-muted);border:1px solid var(--wecool-color-border);cursor:pointer;border-radius:8px;align-items:center;gap:.5rem;padding:.5rem .625rem;font-size:.8125rem;transition:background-color .15s,border-color .15s;display:flex}.wecool-tools-dialog__example-text{flex:1;min-width:0}.wecool-tools-dialog__example-icon{color:var(--wecool-color-text-muted);flex-shrink:0}.wecool-tools-dialog__example:hover,.wecool-tools-dialog__example:focus-visible{background-color:var(--wecool-color-bg-strong-muted,var(--wecool-color-border));border-color:var(--wecool-color-border-strong)}.wecool-tools-dialog__example:hover .wecool-tools-dialog__example-icon,.wecool-tools-dialog__example:focus-visible .wecool-tools-dialog__example-icon{color:var(--wecool-color-text)}.wecool-tools-dialog__empty{color:var(--wecool-color-text-muted);margin:0;font-size:.875rem}.wecool-help-dialog__list{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.wecool-help-dialog__item{flex-direction:column;gap:.125rem;display:flex}.wecool-help-dialog__command{color:var(--wecool-color-text);font-family:ui-monospace,monospace;font-size:.875rem}.wecool-help-dialog__description{color:var(--wecool-color-text-muted);font-size:.8125rem}.wecool-command-confirmation{background-color:var(--wecool-color-bg);width:100%;max-width:22rem;margin-top:0;box-shadow:0 12px 32px #0000002e}@media (forced-colors:active){.wecool-float-button,.wecool-footer__button,.wecool-header__close,.wecool-message-editor__button,.wecool-message-popover button,.wecool-tool-confirmation__button,.wecool-command-dialog__close,.wecool-tools-dialog__example,.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-tool-confirmation,.wecool-command-dialog,.wecool-command-palette,.wecool-loading{border:1px solid canvastext}.wecool-command-palette__option--active{color:highlighttext;background-color:highlight}.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}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}.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
3
  /*$vite$:1*/
package/dist/index.d.ts CHANGED
@@ -11,8 +11,10 @@ import { WecoolChatControls } from './ui/types';
11
11
  * no-op のため、利用者は ref パターンや requestAnimationFrame で初期化完了を待つこと。
12
12
  */
13
13
  export type WecoolChatController = (() => void) & WecoolChatControls;
14
- export type { Tool, ToolDefinition, ToolParameters, ToolHandlerContext, ChatConfig, ChatState, AssistantToolCall, Message, ToolCall, ChatEvent, } from './core/types';
14
+ export type { Tool, ToolDefinition, ToolParameters, ToolHandlerContext, LocalizedText, ChatConfig, ChatState, AssistantToolCall, Message, ToolCall, ChatEvent, } from './core/types';
15
+ export type { PendingToolConfirmation } from './core/tool-confirmation';
15
16
  export type { DebugLogger } from './core/debug-logger';
17
+ export type { ObserveConfig, ObservedEvent } from './observe';
16
18
  export type { ChatPlugin, PluginApiVersion, PluginContext, PluginId, PluginLogger, PluginTool, PluginToolInvocation, } from './plugin/types';
17
19
  export { definePlugin } from './plugin/define';
18
20
  export type { ChatWidgetProps, WecoolChatControls } from './ui/types';
@@ -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;AAE/C,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,kBAAkB,CAAC;AAGrE,YAAY,EACV,IAAI,EACJ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,QAAQ,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