@vezlo/assistant-chat 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/lib/api/conversation.d.ts +1 -3
- package/lib/components/Widget.js +0 -4
- package/lib/types/index.d.ts +0 -3
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/index.js +0 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,8 +103,17 @@ npm publish # Publish to NPM
|
|
|
103
103
|
|
|
104
104
|
### App (Vercel)
|
|
105
105
|
|
|
106
|
-
####
|
|
107
|
-
[](https://vercel.com/marketplace/vezlo-assistant-chat)
|
|
108
|
+
|
|
109
|
+
The marketplace app deploys the frontend automatically, prompts you for the **Assistant Server URL** and optional **API key**, and ships both the chat UI and embeddable widget without any manual environment setup. After connecting your Vercel project you can immediately visit:
|
|
110
|
+
|
|
111
|
+
- Chat UI: `https://your-project.vercel.app/`
|
|
112
|
+
|
|
113
|
+
#### One-Click Deploy (GitHub Clone)
|
|
114
|
+
[](https://vercel.com/new/clone?repository-url=https://github.com/vezlo/assistant-chat&integration-ids=oac_ZKcos500xraYgL9hH2d3Bs3A)
|
|
115
|
+
|
|
116
|
+
This clones the repo into your GitHub account, spins up a new Vercel project using the default `main` branch, and links the same Vezlo integration so the Assistant Chat deployment can gather its Assistant Server URL and API key during setup.
|
|
108
117
|
|
|
109
118
|
#### Manual Vercel CLI Deployment
|
|
110
119
|
```bash
|
|
@@ -118,13 +127,6 @@ vercel
|
|
|
118
127
|
vercel env add VITE_ASSISTANT_SERVER_URL
|
|
119
128
|
vercel env add VITE_ASSISTANT_SERVER_API_KEY
|
|
120
129
|
|
|
121
|
-
# Optional environment variables
|
|
122
|
-
vercel env add VITE_DEFAULT_USER_UUID
|
|
123
|
-
vercel env add VITE_DEFAULT_COMPANY_UUID
|
|
124
|
-
vercel env add VITE_WIDGET_DEFAULT_THEME
|
|
125
|
-
vercel env add VITE_WIDGET_DEFAULT_POSITION
|
|
126
|
-
vercel env add VITE_WIDGET_DEFAULT_SIZE
|
|
127
|
-
|
|
128
130
|
# Deploy to production
|
|
129
131
|
vercel --prod
|
|
130
132
|
```
|
package/lib/components/Widget.js
CHANGED
|
@@ -62,12 +62,8 @@ export function Widget({ config, isPlayground = false, onOpen, onClose, onMessag
|
|
|
62
62
|
setIsCreatingConversation(true);
|
|
63
63
|
try {
|
|
64
64
|
// Create a new conversation
|
|
65
|
-
const userUuid = import.meta.env.VITE_DEFAULT_USER_UUID || 'user-' + generateId().substring(0, 8);
|
|
66
|
-
const companyUuid = import.meta.env.VITE_DEFAULT_COMPANY_UUID || 'company-' + generateId().substring(0, 8);
|
|
67
65
|
const conversation = await createConversation({
|
|
68
66
|
title: 'New Chat',
|
|
69
|
-
user_uuid: userUuid,
|
|
70
|
-
company_uuid: companyUuid,
|
|
71
67
|
}, config.apiUrl);
|
|
72
68
|
setConversationUuid(conversation.uuid);
|
|
73
69
|
console.log('[Widget] Conversation created:', conversation.uuid);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -46,9 +46,6 @@ export interface WidgetProps {
|
|
|
46
46
|
export interface EnvConfig {
|
|
47
47
|
VITE_ASSISTANT_SERVER_URL: string;
|
|
48
48
|
VITE_ASSISTANT_SERVER_API_KEY: string;
|
|
49
|
-
VITE_WIDGET_DEFAULT_THEME: 'light' | 'dark';
|
|
50
|
-
VITE_WIDGET_DEFAULT_POSITION: string;
|
|
51
|
-
VITE_WIDGET_DEFAULT_SIZE: string;
|
|
52
49
|
VITE_DEV_MODE: boolean;
|
|
53
50
|
VITE_DEBUG_MODE: boolean;
|
|
54
51
|
}
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -10,9 +10,6 @@ export declare function parseSize(sizeString: string): {
|
|
|
10
10
|
export declare function getEnvConfig(): {
|
|
11
11
|
VITE_ASSISTANT_SERVER_URL: any;
|
|
12
12
|
VITE_ASSISTANT_SERVER_API_KEY: any;
|
|
13
|
-
VITE_WIDGET_DEFAULT_THEME: "light" | "dark";
|
|
14
|
-
VITE_WIDGET_DEFAULT_POSITION: any;
|
|
15
|
-
VITE_WIDGET_DEFAULT_SIZE: any;
|
|
16
13
|
VITE_DEV_MODE: boolean;
|
|
17
14
|
VITE_DEBUG_MODE: boolean;
|
|
18
15
|
};
|
package/lib/utils/index.js
CHANGED
|
@@ -32,9 +32,6 @@ export function getEnvConfig() {
|
|
|
32
32
|
return {
|
|
33
33
|
VITE_ASSISTANT_SERVER_URL: import.meta.env.VITE_ASSISTANT_SERVER_URL || 'http://localhost:3000',
|
|
34
34
|
VITE_ASSISTANT_SERVER_API_KEY: import.meta.env.VITE_ASSISTANT_SERVER_API_KEY || '',
|
|
35
|
-
VITE_WIDGET_DEFAULT_THEME: import.meta.env.VITE_WIDGET_DEFAULT_THEME || 'light',
|
|
36
|
-
VITE_WIDGET_DEFAULT_POSITION: import.meta.env.VITE_WIDGET_DEFAULT_POSITION || 'bottom-right',
|
|
37
|
-
VITE_WIDGET_DEFAULT_SIZE: import.meta.env.VITE_WIDGET_DEFAULT_SIZE || '350x500',
|
|
38
35
|
VITE_DEV_MODE: import.meta.env.VITE_DEV_MODE === 'true',
|
|
39
36
|
VITE_DEBUG_MODE: import.meta.env.VITE_DEBUG_MODE === 'true'
|
|
40
37
|
};
|
package/package.json
CHANGED