@makemore/agent-frontend 2.9.0 → 2.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.
- package/dist/chat-widget.cjs.js +51 -48
- package/dist/chat-widget.esm.js +49 -46
- package/dist/chat-widget.js +37 -34
- package/dist/react.cjs.js +27 -24
- package/dist/react.esm.js +39 -36
- package/package.json +1 -1
- package/src/components/ChatWidget.js +18 -15
- package/src/utils/config.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makemore/agent-frontend",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "A lightweight chat widget for AI agents. Use as an embeddable script tag or import directly into React/Preact projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/chat-widget.cjs.js",
|
|
@@ -243,21 +243,23 @@ export function ChatWidget({ config, onStateChange, markdownParser, apiRef }) {
|
|
|
243
243
|
/>
|
|
244
244
|
`}
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
246
|
+
${config.showHeader !== false && html`
|
|
247
|
+
<${Header}
|
|
248
|
+
config=${config}
|
|
249
|
+
debugMode=${debugMode}
|
|
250
|
+
isExpanded=${isExpanded}
|
|
251
|
+
isSpeaking=${isSpeaking}
|
|
252
|
+
messagesCount=${chat.messages.length}
|
|
253
|
+
isLoading=${chat.isLoading}
|
|
254
|
+
currentAgent=${currentAgent}
|
|
255
|
+
onClose=${() => setIsOpen(false)}
|
|
256
|
+
onToggleExpand=${() => setIsExpanded(!isExpanded)}
|
|
257
|
+
onToggleDebug=${() => setDebugMode(!debugMode)}
|
|
258
|
+
onToggleTTS=${() => setEnableTTS(!enableTTS)}
|
|
259
|
+
onClear=${chat.clearMessages}
|
|
260
|
+
onToggleSidebar=${handleToggleSidebar}
|
|
261
|
+
/>
|
|
262
|
+
`}
|
|
261
263
|
|
|
262
264
|
${config.showDevTools && html`
|
|
263
265
|
<${DevToolbar}
|
|
@@ -329,6 +331,7 @@ export function ChatWidget({ config, onStateChange, markdownParser, apiRef }) {
|
|
|
329
331
|
placeholder=${config.placeholder}
|
|
330
332
|
primaryColor=${config.primaryColor}
|
|
331
333
|
enableVoice=${config.enableVoice}
|
|
334
|
+
enableFiles=${config.showFileAttachment !== false}
|
|
332
335
|
/>
|
|
333
336
|
` : html`
|
|
334
337
|
<${TaskList}
|
package/src/utils/config.js
CHANGED
|
@@ -55,6 +55,9 @@ export const DEFAULT_CONFIG = {
|
|
|
55
55
|
theme: 'light',
|
|
56
56
|
|
|
57
57
|
// UI options
|
|
58
|
+
showHeader: true, // Show the header bar (title, action buttons). Set false for minimal chat.
|
|
59
|
+
showFileAttachment: true, // Show the file attachment button in the input area
|
|
60
|
+
showTasksTab: true, // Show the Chat/Tasks tab switcher
|
|
58
61
|
showConversationSidebar: true,
|
|
59
62
|
showClearButton: true,
|
|
60
63
|
showDebugButton: true,
|