@meistrari/chat-nuxt 1.2.2 → 1.3.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 (82) hide show
  1. package/README.md +71 -48
  2. package/dist/module.d.mts +24 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +37 -19
  5. package/dist/runtime/components/MeistrariChatEmbed.d.vue.ts +3 -1
  6. package/dist/runtime/components/MeistrariChatEmbed.vue +5 -3
  7. package/dist/runtime/components/MeistrariChatEmbed.vue.d.ts +3 -1
  8. package/dist/runtime/components/chat/thinking-indicator.vue +28 -17
  9. package/dist/runtime/composables/useEmbedConfig.d.ts +5 -0
  10. package/dist/runtime/composables/useEmbedConfig.js +11 -3
  11. package/dist/runtime/embed/components/ChatConfigurationModal.vue +8 -6
  12. package/dist/runtime/embed/components/ChatEmbed.d.vue.ts +3 -1
  13. package/dist/runtime/embed/components/ChatEmbed.vue +13 -12
  14. package/dist/runtime/embed/components/ChatEmbed.vue.d.ts +3 -1
  15. package/dist/runtime/embed/components/ChatEmbedInner.vue +5 -1
  16. package/dist/runtime/plugins/markstream.d.ts +2 -0
  17. package/dist/runtime/plugins/markstream.js +5 -0
  18. package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.js +7 -4
  19. package/dist/runtime/server/api/conversations/[id]/messages/index.post.js +7 -4
  20. package/dist/runtime/server/api/conversations/[id]/usage.get.js +1 -1
  21. package/dist/runtime/server/api/conversations/generate-title.post.js +18 -5
  22. package/dist/runtime/server/api/workspace/usage.get.js +1 -1
  23. package/dist/runtime/server/db/index.d.ts +20 -3
  24. package/dist/runtime/server/db/index.js +87 -10
  25. package/dist/runtime/server/db/schema/_schema.d.ts +2 -0
  26. package/dist/runtime/server/db/schema/_schema.js +3 -0
  27. package/dist/runtime/server/db/schema/conversation-usage.d.ts +1 -1
  28. package/dist/runtime/server/db/schema/conversation-usage.js +3 -2
  29. package/dist/runtime/server/db/schema/conversations.d.ts +1 -1
  30. package/dist/runtime/server/db/schema/conversations.js +3 -2
  31. package/dist/runtime/server/db/schema/external-skills.d.ts +1 -1
  32. package/dist/runtime/server/db/schema/external-skills.js +3 -2
  33. package/dist/runtime/server/db/schema/index.d.ts +1 -0
  34. package/dist/runtime/server/db/schema/index.js +1 -0
  35. package/dist/runtime/server/db/schema/messages.d.ts +1 -1
  36. package/dist/runtime/server/db/schema/messages.js +3 -2
  37. package/dist/runtime/server/db/schema/workspace-settings.d.ts +1 -1
  38. package/dist/runtime/server/db/schema/workspace-settings.js +3 -2
  39. package/dist/runtime/server/plugins/init-db.d.ts +2 -0
  40. package/dist/runtime/server/plugins/init-db.js +11 -0
  41. package/dist/runtime/server/utils/billing.d.ts +26 -4
  42. package/dist/runtime/server/utils/billing.js +52 -13
  43. package/dist/runtime/server/utils/chat-workspace-settings.js +1 -1
  44. package/dist/runtime/utils/chat-loading-messages.d.ts +12 -0
  45. package/dist/runtime/utils/chat-loading-messages.js +40 -0
  46. package/dist/runtime/utils/features.d.ts +6 -0
  47. package/dist/runtime/utils/features.js +15 -0
  48. package/dist/types.d.mts +1 -1
  49. package/drizzle/0000_material_hiroim.sql +28 -0
  50. package/drizzle/0001_famous_scalphunter.sql +1 -0
  51. package/drizzle/0002_gorgeous_big_bertha.sql +1 -0
  52. package/drizzle/0003_massive_forge.sql +2 -0
  53. package/drizzle/0004_absent_black_tom.sql +2 -0
  54. package/drizzle/0005_first_kid_colt.sql +1 -0
  55. package/drizzle/0006_sloppy_mauler.sql +13 -0
  56. package/drizzle/0007_grey_rhino.sql +1 -0
  57. package/drizzle/0008_chilly_blue_blade.sql +27 -0
  58. package/drizzle/0009_cultured_maddog.sql +16 -0
  59. package/drizzle/0010_small_barracuda.sql +1 -0
  60. package/drizzle/0011_fat_lady_mastermind.sql +6 -0
  61. package/drizzle/0012_puzzling_rick_jones.sql +1 -0
  62. package/drizzle/0013_blue_gwen_stacy.sql +11 -0
  63. package/drizzle/meta/0000_snapshot.json +239 -0
  64. package/drizzle/meta/0001_snapshot.json +245 -0
  65. package/drizzle/meta/0002_snapshot.json +251 -0
  66. package/drizzle/meta/0003_snapshot.json +263 -0
  67. package/drizzle/meta/0004_snapshot.json +275 -0
  68. package/drizzle/meta/0005_snapshot.json +281 -0
  69. package/drizzle/meta/0006_snapshot.json +320 -0
  70. package/drizzle/meta/0007_snapshot.json +326 -0
  71. package/drizzle/meta/0008_snapshot.json +539 -0
  72. package/drizzle/meta/0009_snapshot.json +646 -0
  73. package/drizzle/meta/0010_snapshot.json +653 -0
  74. package/drizzle/meta/0011_snapshot.json +689 -0
  75. package/drizzle/meta/0012_snapshot.json +695 -0
  76. package/drizzle/meta/0013_snapshot.json +699 -0
  77. package/drizzle/meta/_journal.json +104 -0
  78. package/package.json +5 -3
  79. package/dist/runtime/server/tasks/send-daily-usage-report.d.ts +0 -2
  80. package/dist/runtime/server/tasks/send-daily-usage-report.js +0 -74
  81. package/dist/runtime/server/utils/auth-api.d.ts +0 -1
  82. package/dist/runtime/server/utils/auth-api.js +0 -27
@@ -0,0 +1,245 @@
1
+ {
2
+ "id": "ada3110a-308c-43e7-a6c9-ec6d384b0a08",
3
+ "prevId": "b7059fdb-e53b-4013-877d-b18a443fe19c",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.conversations": {
8
+ "name": "conversations",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "workspace_id": {
19
+ "name": "workspace_id",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "user_id": {
25
+ "name": "user_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "title": {
31
+ "name": "title",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true,
35
+ "default": "'Nova conversa'"
36
+ },
37
+ "thread_session_id": {
38
+ "name": "thread_session_id",
39
+ "type": "text",
40
+ "primaryKey": false,
41
+ "notNull": false
42
+ },
43
+ "canvas_tools": {
44
+ "name": "canvas_tools",
45
+ "type": "jsonb",
46
+ "primaryKey": false,
47
+ "notNull": false
48
+ },
49
+ "created_at": {
50
+ "name": "created_at",
51
+ "type": "timestamp with time zone",
52
+ "primaryKey": false,
53
+ "notNull": true,
54
+ "default": "now()"
55
+ },
56
+ "updated_at": {
57
+ "name": "updated_at",
58
+ "type": "timestamp with time zone",
59
+ "primaryKey": false,
60
+ "notNull": true,
61
+ "default": "now()"
62
+ }
63
+ },
64
+ "indexes": {
65
+ "idx_conversations_workspace": {
66
+ "name": "idx_conversations_workspace",
67
+ "columns": [
68
+ {
69
+ "expression": "workspace_id",
70
+ "isExpression": false,
71
+ "asc": true,
72
+ "nulls": "last"
73
+ }
74
+ ],
75
+ "isUnique": false,
76
+ "concurrently": false,
77
+ "method": "btree",
78
+ "with": {}
79
+ },
80
+ "idx_conversations_user": {
81
+ "name": "idx_conversations_user",
82
+ "columns": [
83
+ {
84
+ "expression": "user_id",
85
+ "isExpression": false,
86
+ "asc": true,
87
+ "nulls": "last"
88
+ }
89
+ ],
90
+ "isUnique": false,
91
+ "concurrently": false,
92
+ "method": "btree",
93
+ "with": {}
94
+ },
95
+ "idx_conversations_updated": {
96
+ "name": "idx_conversations_updated",
97
+ "columns": [
98
+ {
99
+ "expression": "updated_at",
100
+ "isExpression": false,
101
+ "asc": true,
102
+ "nulls": "last"
103
+ }
104
+ ],
105
+ "isUnique": false,
106
+ "concurrently": false,
107
+ "method": "btree",
108
+ "with": {}
109
+ }
110
+ },
111
+ "foreignKeys": {},
112
+ "compositePrimaryKeys": {},
113
+ "uniqueConstraints": {},
114
+ "policies": {},
115
+ "checkConstraints": {},
116
+ "isRLSEnabled": false
117
+ },
118
+ "public.messages": {
119
+ "name": "messages",
120
+ "schema": "",
121
+ "columns": {
122
+ "id": {
123
+ "name": "id",
124
+ "type": "uuid",
125
+ "primaryKey": true,
126
+ "notNull": true,
127
+ "default": "gen_random_uuid()"
128
+ },
129
+ "conversation_id": {
130
+ "name": "conversation_id",
131
+ "type": "uuid",
132
+ "primaryKey": false,
133
+ "notNull": true
134
+ },
135
+ "role": {
136
+ "name": "role",
137
+ "type": "text",
138
+ "primaryKey": false,
139
+ "notNull": true
140
+ },
141
+ "content": {
142
+ "name": "content",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "status": {
148
+ "name": "status",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false,
152
+ "default": "'completed'"
153
+ },
154
+ "reasoning_data": {
155
+ "name": "reasoning_data",
156
+ "type": "jsonb",
157
+ "primaryKey": false,
158
+ "notNull": false
159
+ },
160
+ "files": {
161
+ "name": "files",
162
+ "type": "jsonb",
163
+ "primaryKey": false,
164
+ "notNull": false
165
+ },
166
+ "external_uuid": {
167
+ "name": "external_uuid",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": false
171
+ },
172
+ "created_at": {
173
+ "name": "created_at",
174
+ "type": "timestamp with time zone",
175
+ "primaryKey": false,
176
+ "notNull": true,
177
+ "default": "now()"
178
+ }
179
+ },
180
+ "indexes": {
181
+ "idx_messages_conversation": {
182
+ "name": "idx_messages_conversation",
183
+ "columns": [
184
+ {
185
+ "expression": "conversation_id",
186
+ "isExpression": false,
187
+ "asc": true,
188
+ "nulls": "last"
189
+ }
190
+ ],
191
+ "isUnique": false,
192
+ "concurrently": false,
193
+ "method": "btree",
194
+ "with": {}
195
+ },
196
+ "idx_messages_created": {
197
+ "name": "idx_messages_created",
198
+ "columns": [
199
+ {
200
+ "expression": "created_at",
201
+ "isExpression": false,
202
+ "asc": true,
203
+ "nulls": "last"
204
+ }
205
+ ],
206
+ "isUnique": false,
207
+ "concurrently": false,
208
+ "method": "btree",
209
+ "with": {}
210
+ }
211
+ },
212
+ "foreignKeys": {
213
+ "messages_conversation_id_conversations_id_fk": {
214
+ "name": "messages_conversation_id_conversations_id_fk",
215
+ "tableFrom": "messages",
216
+ "tableTo": "conversations",
217
+ "columnsFrom": [
218
+ "conversation_id"
219
+ ],
220
+ "columnsTo": [
221
+ "id"
222
+ ],
223
+ "onDelete": "cascade",
224
+ "onUpdate": "no action"
225
+ }
226
+ },
227
+ "compositePrimaryKeys": {},
228
+ "uniqueConstraints": {},
229
+ "policies": {},
230
+ "checkConstraints": {},
231
+ "isRLSEnabled": false
232
+ }
233
+ },
234
+ "enums": {},
235
+ "schemas": {},
236
+ "sequences": {},
237
+ "roles": {},
238
+ "policies": {},
239
+ "views": {},
240
+ "_meta": {
241
+ "columns": {},
242
+ "schemas": {},
243
+ "tables": {}
244
+ }
245
+ }
@@ -0,0 +1,251 @@
1
+ {
2
+ "id": "9f3fb859-2130-4245-83a2-f04d02ba393e",
3
+ "prevId": "ada3110a-308c-43e7-a6c9-ec6d384b0a08",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.conversations": {
8
+ "name": "conversations",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "workspace_id": {
19
+ "name": "workspace_id",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "user_id": {
25
+ "name": "user_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "title": {
31
+ "name": "title",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true,
35
+ "default": "'Nova conversa'"
36
+ },
37
+ "thread_session_id": {
38
+ "name": "thread_session_id",
39
+ "type": "text",
40
+ "primaryKey": false,
41
+ "notNull": false
42
+ },
43
+ "canvas_tools": {
44
+ "name": "canvas_tools",
45
+ "type": "jsonb",
46
+ "primaryKey": false,
47
+ "notNull": false
48
+ },
49
+ "created_at": {
50
+ "name": "created_at",
51
+ "type": "timestamp with time zone",
52
+ "primaryKey": false,
53
+ "notNull": true,
54
+ "default": "now()"
55
+ },
56
+ "updated_at": {
57
+ "name": "updated_at",
58
+ "type": "timestamp with time zone",
59
+ "primaryKey": false,
60
+ "notNull": true,
61
+ "default": "now()"
62
+ }
63
+ },
64
+ "indexes": {
65
+ "idx_conversations_workspace": {
66
+ "name": "idx_conversations_workspace",
67
+ "columns": [
68
+ {
69
+ "expression": "workspace_id",
70
+ "isExpression": false,
71
+ "asc": true,
72
+ "nulls": "last"
73
+ }
74
+ ],
75
+ "isUnique": false,
76
+ "concurrently": false,
77
+ "method": "btree",
78
+ "with": {}
79
+ },
80
+ "idx_conversations_user": {
81
+ "name": "idx_conversations_user",
82
+ "columns": [
83
+ {
84
+ "expression": "user_id",
85
+ "isExpression": false,
86
+ "asc": true,
87
+ "nulls": "last"
88
+ }
89
+ ],
90
+ "isUnique": false,
91
+ "concurrently": false,
92
+ "method": "btree",
93
+ "with": {}
94
+ },
95
+ "idx_conversations_updated": {
96
+ "name": "idx_conversations_updated",
97
+ "columns": [
98
+ {
99
+ "expression": "updated_at",
100
+ "isExpression": false,
101
+ "asc": true,
102
+ "nulls": "last"
103
+ }
104
+ ],
105
+ "isUnique": false,
106
+ "concurrently": false,
107
+ "method": "btree",
108
+ "with": {}
109
+ }
110
+ },
111
+ "foreignKeys": {},
112
+ "compositePrimaryKeys": {},
113
+ "uniqueConstraints": {},
114
+ "policies": {},
115
+ "checkConstraints": {},
116
+ "isRLSEnabled": false
117
+ },
118
+ "public.messages": {
119
+ "name": "messages",
120
+ "schema": "",
121
+ "columns": {
122
+ "id": {
123
+ "name": "id",
124
+ "type": "uuid",
125
+ "primaryKey": true,
126
+ "notNull": true,
127
+ "default": "gen_random_uuid()"
128
+ },
129
+ "conversation_id": {
130
+ "name": "conversation_id",
131
+ "type": "uuid",
132
+ "primaryKey": false,
133
+ "notNull": true
134
+ },
135
+ "role": {
136
+ "name": "role",
137
+ "type": "text",
138
+ "primaryKey": false,
139
+ "notNull": true
140
+ },
141
+ "content": {
142
+ "name": "content",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "status": {
148
+ "name": "status",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false,
152
+ "default": "'completed'"
153
+ },
154
+ "reasoning_data": {
155
+ "name": "reasoning_data",
156
+ "type": "jsonb",
157
+ "primaryKey": false,
158
+ "notNull": false
159
+ },
160
+ "files": {
161
+ "name": "files",
162
+ "type": "jsonb",
163
+ "primaryKey": false,
164
+ "notNull": false
165
+ },
166
+ "external_uuid": {
167
+ "name": "external_uuid",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": false
171
+ },
172
+ "ttft": {
173
+ "name": "ttft",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": false
177
+ },
178
+ "created_at": {
179
+ "name": "created_at",
180
+ "type": "timestamp with time zone",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "default": "now()"
184
+ }
185
+ },
186
+ "indexes": {
187
+ "idx_messages_conversation": {
188
+ "name": "idx_messages_conversation",
189
+ "columns": [
190
+ {
191
+ "expression": "conversation_id",
192
+ "isExpression": false,
193
+ "asc": true,
194
+ "nulls": "last"
195
+ }
196
+ ],
197
+ "isUnique": false,
198
+ "concurrently": false,
199
+ "method": "btree",
200
+ "with": {}
201
+ },
202
+ "idx_messages_created": {
203
+ "name": "idx_messages_created",
204
+ "columns": [
205
+ {
206
+ "expression": "created_at",
207
+ "isExpression": false,
208
+ "asc": true,
209
+ "nulls": "last"
210
+ }
211
+ ],
212
+ "isUnique": false,
213
+ "concurrently": false,
214
+ "method": "btree",
215
+ "with": {}
216
+ }
217
+ },
218
+ "foreignKeys": {
219
+ "messages_conversation_id_conversations_id_fk": {
220
+ "name": "messages_conversation_id_conversations_id_fk",
221
+ "tableFrom": "messages",
222
+ "tableTo": "conversations",
223
+ "columnsFrom": [
224
+ "conversation_id"
225
+ ],
226
+ "columnsTo": [
227
+ "id"
228
+ ],
229
+ "onDelete": "cascade",
230
+ "onUpdate": "no action"
231
+ }
232
+ },
233
+ "compositePrimaryKeys": {},
234
+ "uniqueConstraints": {},
235
+ "policies": {},
236
+ "checkConstraints": {},
237
+ "isRLSEnabled": false
238
+ }
239
+ },
240
+ "enums": {},
241
+ "schemas": {},
242
+ "sequences": {},
243
+ "roles": {},
244
+ "policies": {},
245
+ "views": {},
246
+ "_meta": {
247
+ "columns": {},
248
+ "schemas": {},
249
+ "tables": {}
250
+ }
251
+ }