@meistrari/chat-nuxt 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +25 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +23 -2
  4. package/dist/runtime/components/MeistrariChatEmbed.vue +8 -1
  5. package/dist/runtime/components/chat/bash-widget.vue +3 -3
  6. package/dist/runtime/components/chat/doc-sdk-widget.vue +3 -3
  7. package/dist/runtime/components/chat/files-view.vue +3 -64
  8. package/dist/runtime/components/chat/generic-tool-widget.vue +3 -3
  9. package/dist/runtime/components/chat/grep-widget.vue +3 -3
  10. package/dist/runtime/components/chat/message-bubble.vue +1 -1
  11. package/dist/runtime/components/chat/message-input.d.vue.ts +2 -0
  12. package/dist/runtime/components/chat/message-input.vue +21 -5
  13. package/dist/runtime/components/chat/message-input.vue.d.ts +2 -0
  14. package/dist/runtime/components/chat/message-list.vue +1 -1
  15. package/dist/runtime/components/chat/mobile/files/file-preview.d.vue.ts +11 -0
  16. package/dist/runtime/components/chat/mobile/files/file-preview.vue +112 -0
  17. package/dist/runtime/components/chat/mobile/files/file-preview.vue.d.ts +11 -0
  18. package/dist/runtime/components/chat/mobile/files/files-view.d.vue.ts +10 -0
  19. package/dist/runtime/components/chat/mobile/files/files-view.vue +384 -0
  20. package/dist/runtime/components/chat/mobile/files/files-view.vue.d.ts +10 -0
  21. package/dist/runtime/components/chat/mobile/home/header.d.vue.ts +19 -0
  22. package/dist/runtime/components/chat/mobile/home/header.vue +55 -0
  23. package/dist/runtime/components/chat/mobile/home/header.vue.d.ts +19 -0
  24. package/dist/runtime/components/chat/mobile/home/recents.d.vue.ts +14 -0
  25. package/dist/runtime/components/chat/mobile/home/recents.vue +48 -0
  26. package/dist/runtime/components/chat/mobile/home/recents.vue.d.ts +14 -0
  27. package/dist/runtime/components/chat/mobile/home/suggestions.d.vue.ts +7 -0
  28. package/dist/runtime/components/chat/mobile/home/suggestions.vue +31 -0
  29. package/dist/runtime/components/chat/mobile/home/suggestions.vue.d.ts +7 -0
  30. package/dist/runtime/components/chat/mobile/primitives/bottom-sheet.d.vue.ts +21 -0
  31. package/dist/runtime/components/chat/mobile/primitives/bottom-sheet.vue +48 -0
  32. package/dist/runtime/components/chat/mobile/primitives/bottom-sheet.vue.d.ts +21 -0
  33. package/dist/runtime/components/chat/mobile/primitives/info-bubble.d.vue.ts +6 -0
  34. package/dist/runtime/components/chat/mobile/primitives/info-bubble.vue +50 -0
  35. package/dist/runtime/components/chat/mobile/primitives/info-bubble.vue.d.ts +6 -0
  36. package/dist/runtime/components/chat/mobile/shell/drawer.d.vue.ts +22 -0
  37. package/dist/runtime/components/chat/mobile/shell/drawer.vue +143 -0
  38. package/dist/runtime/components/chat/mobile/shell/drawer.vue.d.ts +22 -0
  39. package/dist/runtime/components/chat/mobile/shell/header.d.vue.ts +40 -0
  40. package/dist/runtime/components/chat/mobile/shell/header.vue +139 -0
  41. package/dist/runtime/components/chat/mobile/shell/header.vue.d.ts +40 -0
  42. package/dist/runtime/components/chat/mobile/shell/outdated-settings-sheet.d.vue.ts +14 -0
  43. package/dist/runtime/components/chat/mobile/shell/outdated-settings-sheet.vue +47 -0
  44. package/dist/runtime/components/chat/mobile/shell/outdated-settings-sheet.vue.d.ts +14 -0
  45. package/dist/runtime/components/chat/mobile/shell/shell.d.vue.ts +122 -0
  46. package/dist/runtime/components/chat/mobile/shell/shell.vue +283 -0
  47. package/dist/runtime/components/chat/mobile/shell/shell.vue.d.ts +122 -0
  48. package/dist/runtime/components/chat/mobile/shell/workspace-sheet.d.vue.ts +19 -0
  49. package/dist/runtime/components/chat/mobile/shell/workspace-sheet.vue +51 -0
  50. package/dist/runtime/components/chat/mobile/shell/workspace-sheet.vue.d.ts +19 -0
  51. package/dist/runtime/components/chat/mobile/usage/usage-view.d.vue.ts +8 -0
  52. package/dist/runtime/components/chat/mobile/usage/usage-view.vue +243 -0
  53. package/dist/runtime/components/chat/mobile/usage/usage-view.vue.d.ts +8 -0
  54. package/dist/runtime/components/chat/model-selector.vue +6 -0
  55. package/dist/runtime/components/chat/read-widget.vue +3 -3
  56. package/dist/runtime/components/chat/reasoning-step-item.vue +1 -1
  57. package/dist/runtime/components/chat/reasoning-steps.vue +1 -1
  58. package/dist/runtime/components/chat/reasoning-thought.vue +2 -3
  59. package/dist/runtime/components/chat/tela-skill-widget.vue +3 -3
  60. package/dist/runtime/components/chat/thinking-widget.vue +3 -3
  61. package/dist/runtime/components/chat/usage-view.vue +20 -101
  62. package/dist/runtime/components/chat/web-search-widget.vue +3 -3
  63. package/dist/runtime/components/chat/workstation-query-widget.vue +6 -6
  64. package/dist/runtime/components/chat/write-widget.vue +3 -3
  65. package/dist/runtime/composables/useChat.js +2 -1
  66. package/dist/runtime/composables/useChatApi.js +4 -0
  67. package/dist/runtime/composables/useConversationFileDownloads.d.ts +6 -0
  68. package/dist/runtime/composables/useConversationFileDownloads.js +50 -0
  69. package/dist/runtime/composables/useConversationUsage.d.ts +13 -0
  70. package/dist/runtime/composables/useConversationUsage.js +121 -0
  71. package/dist/runtime/composables/useConversations.js +3 -1
  72. package/dist/runtime/composables/useEmbedConfig.d.ts +4 -0
  73. package/dist/runtime/composables/useEmbedConfig.js +9 -0
  74. package/dist/runtime/composables/useMentionAutocomplete.d.ts +6 -0
  75. package/dist/runtime/composables/useMentionAutocomplete.js +71 -23
  76. package/dist/runtime/composables/useWorkspaceSwitchModal.d.ts +5 -0
  77. package/dist/runtime/composables/useWorkspaceSwitchModal.js +14 -0
  78. package/dist/runtime/embed/components/ChatConfigurationModal.vue +119 -13
  79. package/dist/runtime/embed/components/ChatEmbed.vue +9 -2
  80. package/dist/runtime/embed/components/ChatEmbedInner.d.vue.ts +2 -0
  81. package/dist/runtime/embed/components/ChatEmbedInner.vue +201 -11
  82. package/dist/runtime/embed/components/ChatEmbedInner.vue.d.ts +2 -0
  83. package/dist/runtime/embed/components/configuration/ChatConfigurationMobileShell.d.vue.ts +34 -0
  84. package/dist/runtime/embed/components/configuration/ChatConfigurationMobileShell.vue +95 -0
  85. package/dist/runtime/embed/components/configuration/ChatConfigurationMobileShell.vue.d.ts +34 -0
  86. package/dist/runtime/server/api/conversations/[id]/duplicate.post.js +1 -0
  87. package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.js +3 -1
  88. package/dist/runtime/server/api/conversations/[id]/messages/index.get.js +29 -5
  89. package/dist/runtime/server/api/conversations/index.post.js +1 -0
  90. package/dist/runtime/server/db/schema/conversations.d.ts +17 -0
  91. package/dist/runtime/server/db/schema/conversations.js +1 -0
  92. package/dist/runtime/server/utils/chat-context.d.ts +2 -0
  93. package/dist/runtime/server/utils/chat-context.js +15 -1
  94. package/dist/runtime/server/utils/conversation-message-sync.d.ts +8 -2
  95. package/dist/runtime/server/utils/conversation-message-sync.js +52 -6
  96. package/dist/runtime/server/utils/conversation-scope.js +2 -1
  97. package/dist/runtime/types/chat-auth.d.ts +9 -8
  98. package/dist/runtime/types/embed.d.ts +21 -0
  99. package/dist/runtime/utils/breakpoints.d.ts +1 -0
  100. package/dist/runtime/utils/breakpoints.js +1 -0
  101. package/dist/runtime/utils/tela-chat.d.ts +3 -1
  102. package/dist/runtime/utils/tela-chat.js +11 -2
  103. package/drizzle/0015_illegal_blindfold.sql +1 -0
  104. package/drizzle/meta/0015_snapshot.json +738 -0
  105. package/drizzle/meta/_journal.json +7 -0
  106. package/package.json +6 -1
@@ -0,0 +1,738 @@
1
+ {
2
+ "id": "4c144c5c-7df6-4aa0-9c2d-ac7d60864537",
3
+ "prevId": "00e3e29e-98c4-4e48-98f4-0af0913d882b",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "chat.conversation_usage": {
8
+ "name": "conversation_usage",
9
+ "schema": "chat",
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
+ "conversation_id": {
25
+ "name": "conversation_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "prompt_tokens": {
31
+ "name": "prompt_tokens",
32
+ "type": "integer",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "completion_tokens": {
37
+ "name": "completion_tokens",
38
+ "type": "integer",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "total_tokens": {
43
+ "name": "total_tokens",
44
+ "type": "integer",
45
+ "primaryKey": false,
46
+ "notNull": true
47
+ },
48
+ "prompt_cost": {
49
+ "name": "prompt_cost",
50
+ "type": "numeric(12, 8)",
51
+ "primaryKey": false,
52
+ "notNull": true
53
+ },
54
+ "completion_cost": {
55
+ "name": "completion_cost",
56
+ "type": "numeric(12, 8)",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "total_cost": {
61
+ "name": "total_cost",
62
+ "type": "numeric(12, 8)",
63
+ "primaryKey": false,
64
+ "notNull": true
65
+ },
66
+ "duration_ms": {
67
+ "name": "duration_ms",
68
+ "type": "integer",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "turns": {
73
+ "name": "turns",
74
+ "type": "integer",
75
+ "primaryKey": false,
76
+ "notNull": false
77
+ },
78
+ "user_id": {
79
+ "name": "user_id",
80
+ "type": "text",
81
+ "primaryKey": false,
82
+ "notNull": true
83
+ },
84
+ "user_email": {
85
+ "name": "user_email",
86
+ "type": "text",
87
+ "primaryKey": false,
88
+ "notNull": false
89
+ },
90
+ "model": {
91
+ "name": "model",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": false
95
+ },
96
+ "session_id": {
97
+ "name": "session_id",
98
+ "type": "text",
99
+ "primaryKey": false,
100
+ "notNull": false
101
+ },
102
+ "cache_read_input_tokens": {
103
+ "name": "cache_read_input_tokens",
104
+ "type": "integer",
105
+ "primaryKey": false,
106
+ "notNull": false
107
+ },
108
+ "cache_creation_input_tokens": {
109
+ "name": "cache_creation_input_tokens",
110
+ "type": "integer",
111
+ "primaryKey": false,
112
+ "notNull": false
113
+ },
114
+ "model_usage": {
115
+ "name": "model_usage",
116
+ "type": "jsonb",
117
+ "primaryKey": false,
118
+ "notNull": false
119
+ },
120
+ "duration_api_ms": {
121
+ "name": "duration_api_ms",
122
+ "type": "integer",
123
+ "primaryKey": false,
124
+ "notNull": false
125
+ },
126
+ "web_search_requests": {
127
+ "name": "web_search_requests",
128
+ "type": "integer",
129
+ "primaryKey": false,
130
+ "notNull": false
131
+ },
132
+ "web_fetch_requests": {
133
+ "name": "web_fetch_requests",
134
+ "type": "integer",
135
+ "primaryKey": false,
136
+ "notNull": false
137
+ },
138
+ "metadata": {
139
+ "name": "metadata",
140
+ "type": "jsonb",
141
+ "primaryKey": false,
142
+ "notNull": false
143
+ },
144
+ "created_at": {
145
+ "name": "created_at",
146
+ "type": "timestamp with time zone",
147
+ "primaryKey": false,
148
+ "notNull": true,
149
+ "default": "now()"
150
+ },
151
+ "updated_at": {
152
+ "name": "updated_at",
153
+ "type": "timestamp with time zone",
154
+ "primaryKey": false,
155
+ "notNull": true,
156
+ "default": "now()"
157
+ }
158
+ },
159
+ "indexes": {
160
+ "idx_usage_workspace": {
161
+ "name": "idx_usage_workspace",
162
+ "columns": [
163
+ {
164
+ "expression": "workspace_id",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ }
169
+ ],
170
+ "isUnique": false,
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ },
175
+ "idx_usage_workspace_created": {
176
+ "name": "idx_usage_workspace_created",
177
+ "columns": [
178
+ {
179
+ "expression": "workspace_id",
180
+ "isExpression": false,
181
+ "asc": true,
182
+ "nulls": "last"
183
+ },
184
+ {
185
+ "expression": "created_at",
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_usage_conversation": {
197
+ "name": "idx_usage_conversation",
198
+ "columns": [
199
+ {
200
+ "expression": "conversation_id",
201
+ "isExpression": false,
202
+ "asc": true,
203
+ "nulls": "last"
204
+ }
205
+ ],
206
+ "isUnique": false,
207
+ "concurrently": false,
208
+ "method": "btree",
209
+ "with": {}
210
+ },
211
+ "idx_usage_user": {
212
+ "name": "idx_usage_user",
213
+ "columns": [
214
+ {
215
+ "expression": "user_id",
216
+ "isExpression": false,
217
+ "asc": true,
218
+ "nulls": "last"
219
+ }
220
+ ],
221
+ "isUnique": false,
222
+ "concurrently": false,
223
+ "method": "btree",
224
+ "with": {}
225
+ }
226
+ },
227
+ "foreignKeys": {
228
+ "conversation_usage_conversation_id_conversations_id_fk": {
229
+ "name": "conversation_usage_conversation_id_conversations_id_fk",
230
+ "tableFrom": "conversation_usage",
231
+ "tableTo": "conversations",
232
+ "schemaTo": "chat",
233
+ "columnsFrom": [
234
+ "conversation_id"
235
+ ],
236
+ "columnsTo": [
237
+ "id"
238
+ ],
239
+ "onDelete": "cascade",
240
+ "onUpdate": "no action"
241
+ }
242
+ },
243
+ "compositePrimaryKeys": {},
244
+ "uniqueConstraints": {
245
+ "conversation_usage_conversation_id_unique": {
246
+ "name": "conversation_usage_conversation_id_unique",
247
+ "nullsNotDistinct": false,
248
+ "columns": [
249
+ "conversation_id"
250
+ ]
251
+ }
252
+ },
253
+ "policies": {},
254
+ "checkConstraints": {},
255
+ "isRLSEnabled": false
256
+ },
257
+ "chat.conversations": {
258
+ "name": "conversations",
259
+ "schema": "chat",
260
+ "columns": {
261
+ "id": {
262
+ "name": "id",
263
+ "type": "uuid",
264
+ "primaryKey": true,
265
+ "notNull": true,
266
+ "default": "gen_random_uuid()"
267
+ },
268
+ "workspace_id": {
269
+ "name": "workspace_id",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": true
273
+ },
274
+ "user_id": {
275
+ "name": "user_id",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": true
279
+ },
280
+ "title": {
281
+ "name": "title",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true,
285
+ "default": "'Nova conversa'"
286
+ },
287
+ "thread_session_id": {
288
+ "name": "thread_session_id",
289
+ "type": "text",
290
+ "primaryKey": false,
291
+ "notNull": false
292
+ },
293
+ "tela_agent_id": {
294
+ "name": "tela_agent_id",
295
+ "type": "text",
296
+ "primaryKey": false,
297
+ "notNull": false
298
+ },
299
+ "conversation_scope": {
300
+ "name": "conversation_scope",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": false
304
+ },
305
+ "model": {
306
+ "name": "model",
307
+ "type": "text",
308
+ "primaryKey": false,
309
+ "notNull": false,
310
+ "default": "'claude-sonnet-4-5'"
311
+ },
312
+ "applied_settings_at": {
313
+ "name": "applied_settings_at",
314
+ "type": "timestamp with time zone",
315
+ "primaryKey": false,
316
+ "notNull": false
317
+ },
318
+ "applied_settings_snapshot": {
319
+ "name": "applied_settings_snapshot",
320
+ "type": "jsonb",
321
+ "primaryKey": false,
322
+ "notNull": false
323
+ },
324
+ "created_by": {
325
+ "name": "created_by",
326
+ "type": "text",
327
+ "primaryKey": false,
328
+ "notNull": false
329
+ },
330
+ "created_at": {
331
+ "name": "created_at",
332
+ "type": "timestamp with time zone",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "default": "now()"
336
+ },
337
+ "updated_at": {
338
+ "name": "updated_at",
339
+ "type": "timestamp with time zone",
340
+ "primaryKey": false,
341
+ "notNull": true,
342
+ "default": "now()"
343
+ }
344
+ },
345
+ "indexes": {
346
+ "idx_conversations_workspace": {
347
+ "name": "idx_conversations_workspace",
348
+ "columns": [
349
+ {
350
+ "expression": "workspace_id",
351
+ "isExpression": false,
352
+ "asc": true,
353
+ "nulls": "last"
354
+ }
355
+ ],
356
+ "isUnique": false,
357
+ "concurrently": false,
358
+ "method": "btree",
359
+ "with": {}
360
+ },
361
+ "idx_conversations_user": {
362
+ "name": "idx_conversations_user",
363
+ "columns": [
364
+ {
365
+ "expression": "user_id",
366
+ "isExpression": false,
367
+ "asc": true,
368
+ "nulls": "last"
369
+ }
370
+ ],
371
+ "isUnique": false,
372
+ "concurrently": false,
373
+ "method": "btree",
374
+ "with": {}
375
+ },
376
+ "idx_conversations_updated": {
377
+ "name": "idx_conversations_updated",
378
+ "columns": [
379
+ {
380
+ "expression": "updated_at",
381
+ "isExpression": false,
382
+ "asc": true,
383
+ "nulls": "last"
384
+ }
385
+ ],
386
+ "isUnique": false,
387
+ "concurrently": false,
388
+ "method": "btree",
389
+ "with": {}
390
+ },
391
+ "idx_conversations_workspace_tela_agent_updated": {
392
+ "name": "idx_conversations_workspace_tela_agent_updated",
393
+ "columns": [
394
+ {
395
+ "expression": "workspace_id",
396
+ "isExpression": false,
397
+ "asc": true,
398
+ "nulls": "last"
399
+ },
400
+ {
401
+ "expression": "tela_agent_id",
402
+ "isExpression": false,
403
+ "asc": true,
404
+ "nulls": "last"
405
+ },
406
+ {
407
+ "expression": "updated_at",
408
+ "isExpression": false,
409
+ "asc": true,
410
+ "nulls": "last"
411
+ }
412
+ ],
413
+ "isUnique": false,
414
+ "concurrently": false,
415
+ "method": "btree",
416
+ "with": {}
417
+ }
418
+ },
419
+ "foreignKeys": {},
420
+ "compositePrimaryKeys": {},
421
+ "uniqueConstraints": {},
422
+ "policies": {},
423
+ "checkConstraints": {},
424
+ "isRLSEnabled": false
425
+ },
426
+ "chat.external_skills": {
427
+ "name": "external_skills",
428
+ "schema": "chat",
429
+ "columns": {
430
+ "id": {
431
+ "name": "id",
432
+ "type": "serial",
433
+ "primaryKey": true,
434
+ "notNull": true
435
+ },
436
+ "workspace_id": {
437
+ "name": "workspace_id",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": true
441
+ },
442
+ "ref": {
443
+ "name": "ref",
444
+ "type": "text",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "name": {
449
+ "name": "name",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": true
453
+ },
454
+ "description": {
455
+ "name": "description",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "default": "''"
460
+ },
461
+ "runtime": {
462
+ "name": "runtime",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "default": "'unknown'"
467
+ },
468
+ "allowed_tools": {
469
+ "name": "allowed_tools",
470
+ "type": "jsonb",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "default": "'[]'::jsonb"
474
+ },
475
+ "is_public": {
476
+ "name": "is_public",
477
+ "type": "boolean",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "default": true
481
+ },
482
+ "added_by_user_id": {
483
+ "name": "added_by_user_id",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true
487
+ },
488
+ "added_by_username": {
489
+ "name": "added_by_username",
490
+ "type": "text",
491
+ "primaryKey": false,
492
+ "notNull": true
493
+ },
494
+ "added_at": {
495
+ "name": "added_at",
496
+ "type": "timestamp with time zone",
497
+ "primaryKey": false,
498
+ "notNull": true,
499
+ "default": "now()"
500
+ },
501
+ "created_at": {
502
+ "name": "created_at",
503
+ "type": "timestamp with time zone",
504
+ "primaryKey": false,
505
+ "notNull": true,
506
+ "default": "now()"
507
+ },
508
+ "updated_at": {
509
+ "name": "updated_at",
510
+ "type": "timestamp with time zone",
511
+ "primaryKey": false,
512
+ "notNull": true,
513
+ "default": "now()"
514
+ }
515
+ },
516
+ "indexes": {},
517
+ "foreignKeys": {},
518
+ "compositePrimaryKeys": {},
519
+ "uniqueConstraints": {
520
+ "external_skills_workspace_ref_unique": {
521
+ "name": "external_skills_workspace_ref_unique",
522
+ "nullsNotDistinct": false,
523
+ "columns": [
524
+ "workspace_id",
525
+ "ref"
526
+ ]
527
+ }
528
+ },
529
+ "policies": {},
530
+ "checkConstraints": {},
531
+ "isRLSEnabled": false
532
+ },
533
+ "chat.messages": {
534
+ "name": "messages",
535
+ "schema": "chat",
536
+ "columns": {
537
+ "id": {
538
+ "name": "id",
539
+ "type": "uuid",
540
+ "primaryKey": true,
541
+ "notNull": true,
542
+ "default": "gen_random_uuid()"
543
+ },
544
+ "conversation_id": {
545
+ "name": "conversation_id",
546
+ "type": "uuid",
547
+ "primaryKey": false,
548
+ "notNull": true
549
+ },
550
+ "role": {
551
+ "name": "role",
552
+ "type": "text",
553
+ "primaryKey": false,
554
+ "notNull": true
555
+ },
556
+ "content": {
557
+ "name": "content",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true
561
+ },
562
+ "status": {
563
+ "name": "status",
564
+ "type": "text",
565
+ "primaryKey": false,
566
+ "notNull": false,
567
+ "default": "'completed'"
568
+ },
569
+ "reasoning_data": {
570
+ "name": "reasoning_data",
571
+ "type": "jsonb",
572
+ "primaryKey": false,
573
+ "notNull": false
574
+ },
575
+ "files": {
576
+ "name": "files",
577
+ "type": "jsonb",
578
+ "primaryKey": false,
579
+ "notNull": false
580
+ },
581
+ "external_uuid": {
582
+ "name": "external_uuid",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": false
586
+ },
587
+ "ttft": {
588
+ "name": "ttft",
589
+ "type": "text",
590
+ "primaryKey": false,
591
+ "notNull": false
592
+ },
593
+ "created_by": {
594
+ "name": "created_by",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": false
598
+ },
599
+ "created_at": {
600
+ "name": "created_at",
601
+ "type": "timestamp with time zone",
602
+ "primaryKey": false,
603
+ "notNull": true,
604
+ "default": "now()"
605
+ },
606
+ "updated_at": {
607
+ "name": "updated_at",
608
+ "type": "timestamp with time zone",
609
+ "primaryKey": false,
610
+ "notNull": false
611
+ }
612
+ },
613
+ "indexes": {
614
+ "idx_messages_conversation": {
615
+ "name": "idx_messages_conversation",
616
+ "columns": [
617
+ {
618
+ "expression": "conversation_id",
619
+ "isExpression": false,
620
+ "asc": true,
621
+ "nulls": "last"
622
+ }
623
+ ],
624
+ "isUnique": false,
625
+ "concurrently": false,
626
+ "method": "btree",
627
+ "with": {}
628
+ },
629
+ "idx_messages_created": {
630
+ "name": "idx_messages_created",
631
+ "columns": [
632
+ {
633
+ "expression": "created_at",
634
+ "isExpression": false,
635
+ "asc": true,
636
+ "nulls": "last"
637
+ }
638
+ ],
639
+ "isUnique": false,
640
+ "concurrently": false,
641
+ "method": "btree",
642
+ "with": {}
643
+ }
644
+ },
645
+ "foreignKeys": {
646
+ "messages_conversation_id_conversations_id_fk": {
647
+ "name": "messages_conversation_id_conversations_id_fk",
648
+ "tableFrom": "messages",
649
+ "tableTo": "conversations",
650
+ "schemaTo": "chat",
651
+ "columnsFrom": [
652
+ "conversation_id"
653
+ ],
654
+ "columnsTo": [
655
+ "id"
656
+ ],
657
+ "onDelete": "cascade",
658
+ "onUpdate": "no action"
659
+ }
660
+ },
661
+ "compositePrimaryKeys": {},
662
+ "uniqueConstraints": {},
663
+ "policies": {},
664
+ "checkConstraints": {},
665
+ "isRLSEnabled": false
666
+ },
667
+ "chat.workspace_settings": {
668
+ "name": "workspace_settings",
669
+ "schema": "chat",
670
+ "columns": {
671
+ "workspace_id": {
672
+ "name": "workspace_id",
673
+ "type": "text",
674
+ "primaryKey": true,
675
+ "notNull": true
676
+ },
677
+ "system_message": {
678
+ "name": "system_message",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": false
682
+ },
683
+ "context_files": {
684
+ "name": "context_files",
685
+ "type": "jsonb",
686
+ "primaryKey": false,
687
+ "notNull": false
688
+ },
689
+ "canvas_tools": {
690
+ "name": "canvas_tools",
691
+ "type": "jsonb",
692
+ "primaryKey": false,
693
+ "notNull": false
694
+ },
695
+ "knowledge_sources": {
696
+ "name": "knowledge_sources",
697
+ "type": "jsonb",
698
+ "primaryKey": false,
699
+ "notNull": false
700
+ },
701
+ "created_at": {
702
+ "name": "created_at",
703
+ "type": "timestamp with time zone",
704
+ "primaryKey": false,
705
+ "notNull": true,
706
+ "default": "now()"
707
+ },
708
+ "updated_at": {
709
+ "name": "updated_at",
710
+ "type": "timestamp with time zone",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "default": "now()"
714
+ }
715
+ },
716
+ "indexes": {},
717
+ "foreignKeys": {},
718
+ "compositePrimaryKeys": {},
719
+ "uniqueConstraints": {},
720
+ "policies": {},
721
+ "checkConstraints": {},
722
+ "isRLSEnabled": false
723
+ }
724
+ },
725
+ "enums": {},
726
+ "schemas": {
727
+ "chat": "chat"
728
+ },
729
+ "sequences": {},
730
+ "roles": {},
731
+ "policies": {},
732
+ "views": {},
733
+ "_meta": {
734
+ "columns": {},
735
+ "schemas": {},
736
+ "tables": {}
737
+ }
738
+ }