@meistrari/chat-nuxt 1.1.2 → 1.2.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 (151) hide show
  1. package/README.md +95 -11
  2. package/dist/module.d.mts +5 -0
  3. package/dist/module.json +2 -2
  4. package/dist/module.mjs +96 -23
  5. package/dist/runtime/components/chat/conversation-list.d.vue.ts +1 -0
  6. package/dist/runtime/components/chat/conversation-list.vue +22 -2
  7. package/dist/runtime/components/chat/conversation-list.vue.d.ts +1 -0
  8. package/dist/runtime/components/chat/message-list.d.vue.ts +1 -0
  9. package/dist/runtime/components/chat/message-list.vue +23 -2
  10. package/dist/runtime/components/chat/message-list.vue.d.ts +1 -0
  11. package/dist/runtime/composables/useChat.d.ts +2 -1
  12. package/dist/runtime/composables/useChat.js +32 -3
  13. package/dist/runtime/composables/useChatApi.js +2 -1
  14. package/dist/runtime/composables/useConversations.d.ts +3 -2
  15. package/dist/runtime/composables/useConversations.js +99 -11
  16. package/dist/runtime/composables/useEmbedConfig.d.ts +11 -6
  17. package/dist/runtime/composables/useEmbedConfig.js +35 -7
  18. package/dist/runtime/composables/useIDB.js +4 -0
  19. package/dist/runtime/composables/usePdf.d.ts +840 -1
  20. package/dist/runtime/composables/usePdf.js +21 -3
  21. package/dist/runtime/composables/useWorkspaceContextFiles.d.ts +3 -3
  22. package/dist/runtime/composables/useWorkspaceContextFiles.js +19 -10
  23. package/dist/runtime/composables/useWorkspaceCredentials.d.ts +3 -3
  24. package/dist/runtime/composables/useWorkspaceExternalSkills.d.ts +1 -1
  25. package/dist/runtime/composables/useWorkspaceExternalSkills.js +5 -6
  26. package/dist/runtime/composables/useWorkspacePersonalization.d.ts +1 -1
  27. package/dist/runtime/composables/useWorkspacePersonalization.js +4 -5
  28. package/dist/runtime/composables/useWorkspaceSettings.js +12 -9
  29. package/dist/runtime/embed/components/ChatConfigurationModal.d.vue.ts +25 -0
  30. package/dist/runtime/embed/components/ChatConfigurationModal.vue +373 -0
  31. package/dist/runtime/embed/components/ChatConfigurationModal.vue.d.ts +25 -0
  32. package/dist/runtime/embed/components/ChatEmbed.vue +12 -1
  33. package/dist/runtime/embed/components/ChatEmbedInner.vue +31 -16
  34. package/dist/runtime/embed/components/configuration/ChatConfigurationContextFilesTab.d.vue.ts +22 -0
  35. package/dist/runtime/embed/components/configuration/ChatConfigurationContextFilesTab.vue +133 -0
  36. package/dist/runtime/embed/components/configuration/ChatConfigurationContextFilesTab.vue.d.ts +22 -0
  37. package/dist/runtime/embed/components/configuration/ChatConfigurationCredentialsTab.d.vue.ts +10 -0
  38. package/dist/runtime/embed/components/configuration/ChatConfigurationCredentialsTab.vue +220 -0
  39. package/dist/runtime/embed/components/configuration/ChatConfigurationCredentialsTab.vue.d.ts +10 -0
  40. package/dist/runtime/embed/components/configuration/ChatConfigurationExternalSkillsTab.d.vue.ts +32 -0
  41. package/dist/runtime/embed/components/configuration/ChatConfigurationExternalSkillsTab.vue +222 -0
  42. package/dist/runtime/embed/components/configuration/ChatConfigurationExternalSkillsTab.vue.d.ts +32 -0
  43. package/dist/runtime/embed/components/configuration/ChatConfigurationKnowledgeSourcesTab.d.vue.ts +18 -0
  44. package/dist/runtime/embed/components/configuration/ChatConfigurationKnowledgeSourcesTab.vue +142 -0
  45. package/dist/runtime/embed/components/configuration/ChatConfigurationKnowledgeSourcesTab.vue.d.ts +18 -0
  46. package/dist/runtime/embed/components/configuration/ChatConfigurationPersonalizationTab.d.vue.ts +10 -0
  47. package/dist/runtime/embed/components/configuration/ChatConfigurationPersonalizationTab.vue +37 -0
  48. package/dist/runtime/embed/components/configuration/ChatConfigurationPersonalizationTab.vue.d.ts +10 -0
  49. package/dist/runtime/embed/components/configuration/ChatConfigurationTelaToolsTab.d.vue.ts +20 -0
  50. package/dist/runtime/embed/components/configuration/ChatConfigurationTelaToolsTab.vue +146 -0
  51. package/dist/runtime/embed/components/configuration/ChatConfigurationTelaToolsTab.vue.d.ts +20 -0
  52. package/dist/runtime/server/api/admin/trigger-usage-report.post.d.ts +4 -1
  53. package/dist/runtime/server/api/admin/trigger-usage-report.post.js +2 -0
  54. package/dist/runtime/server/api/chat/workspace/settings.get.d.ts +1 -1
  55. package/dist/runtime/server/api/chat/workspace/settings.get.js +1 -0
  56. package/dist/runtime/server/api/conversations/[id]/cancel.post.d.ts +4 -1
  57. package/dist/runtime/server/api/conversations/[id]/cancel.post.js +1 -0
  58. package/dist/runtime/server/api/conversations/[id]/clear.post.d.ts +1 -1
  59. package/dist/runtime/server/api/conversations/[id]/clear.post.js +1 -0
  60. package/dist/runtime/server/api/conversations/[id]/duplicate.post.d.ts +1 -1
  61. package/dist/runtime/server/api/conversations/[id]/duplicate.post.js +46 -12
  62. package/dist/runtime/server/api/conversations/[id]/files.get.d.ts +1 -1
  63. package/dist/runtime/server/api/conversations/[id]/files.get.js +2 -0
  64. package/dist/runtime/server/api/conversations/[id]/index.delete.d.ts +3 -1
  65. package/dist/runtime/server/api/conversations/[id]/index.delete.js +1 -0
  66. package/dist/runtime/server/api/conversations/[id]/index.get.d.ts +1 -1
  67. package/dist/runtime/server/api/conversations/[id]/index.get.js +1 -0
  68. package/dist/runtime/server/api/conversations/[id]/index.patch.d.ts +1 -1
  69. package/dist/runtime/server/api/conversations/[id]/index.patch.js +1 -0
  70. package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.d.ts +1 -1
  71. package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.js +2 -0
  72. package/dist/runtime/server/api/conversations/[id]/messages/index.get.d.ts +14 -1
  73. package/dist/runtime/server/api/conversations/[id]/messages/index.get.js +2 -0
  74. package/dist/runtime/server/api/conversations/[id]/messages/index.post.d.ts +4 -1
  75. package/dist/runtime/server/api/conversations/[id]/messages/index.post.js +2 -0
  76. package/dist/runtime/server/api/conversations/[id]/usage.get.d.ts +1 -1
  77. package/dist/runtime/server/api/conversations/[id]/usage.get.js +1 -0
  78. package/dist/runtime/server/api/conversations/generate-title.post.d.ts +3 -1
  79. package/dist/runtime/server/api/conversations/generate-title.post.js +2 -0
  80. package/dist/runtime/server/api/conversations/index.get.d.ts +1 -1
  81. package/dist/runtime/server/api/conversations/index.get.js +1 -0
  82. package/dist/runtime/server/api/conversations/index.post.d.ts +1 -1
  83. package/dist/runtime/server/api/conversations/index.post.js +1 -0
  84. package/dist/runtime/server/api/external-skills/discover.post.d.ts +1 -1
  85. package/dist/runtime/server/api/external-skills/discover.post.js +2 -0
  86. package/dist/runtime/server/api/github/disconnect.post.d.ts +3 -1
  87. package/dist/runtime/server/api/github/disconnect.post.js +2 -0
  88. package/dist/runtime/server/api/github/status.get.d.ts +1 -1
  89. package/dist/runtime/server/api/github/status.get.js +2 -0
  90. package/dist/runtime/server/api/tela/canvas.get.d.ts +1 -1
  91. package/dist/runtime/server/api/tela/canvas.get.js +1 -0
  92. package/dist/runtime/server/api/tela/projects.get.d.ts +1 -1
  93. package/dist/runtime/server/api/tela/projects.get.js +1 -0
  94. package/dist/runtime/server/api/tela/workspaces.get.d.ts +1 -1
  95. package/dist/runtime/server/api/tela/workspaces.get.js +1 -0
  96. package/dist/runtime/server/api/tela/workstations.get.d.ts +1 -1
  97. package/dist/runtime/server/api/tela/workstations.get.js +1 -0
  98. package/dist/runtime/server/api/vault/permalink-metadata.post.d.ts +5 -1
  99. package/dist/runtime/server/api/vault/permalink-metadata.post.js +2 -0
  100. package/dist/runtime/server/api/vault/resolve.post.d.ts +9 -1
  101. package/dist/runtime/server/api/vault/resolve.post.js +2 -0
  102. package/dist/runtime/server/api/vault/upload.post.d.ts +6 -1
  103. package/dist/runtime/server/api/vault/upload.post.js +2 -0
  104. package/dist/runtime/server/api/workspace/credentials/[id].delete.d.ts +3 -1
  105. package/dist/runtime/server/api/workspace/credentials/[id].delete.js +1 -0
  106. package/dist/runtime/server/api/workspace/credentials/[id].put.d.ts +1 -1
  107. package/dist/runtime/server/api/workspace/credentials/[id].put.js +1 -0
  108. package/dist/runtime/server/api/workspace/credentials/index.get.d.ts +1 -1
  109. package/dist/runtime/server/api/workspace/credentials/index.get.js +1 -0
  110. package/dist/runtime/server/api/workspace/credentials/index.post.d.ts +1 -1
  111. package/dist/runtime/server/api/workspace/credentials/index.post.js +1 -0
  112. package/dist/runtime/server/api/workspace/settings.get.d.ts +1 -1
  113. package/dist/runtime/server/api/workspace/settings.get.js +1 -0
  114. package/dist/runtime/server/api/workspace/settings.patch.d.ts +1 -1
  115. package/dist/runtime/server/api/workspace/settings.patch.js +1 -0
  116. package/dist/runtime/server/api/workspace/usage.get.d.ts +1 -1
  117. package/dist/runtime/server/api/workspace/usage.get.js +1 -0
  118. package/dist/runtime/server/db/index.js +1 -0
  119. package/dist/runtime/server/middleware/domain-validation.d.ts +1 -1
  120. package/dist/runtime/server/middleware/domain-validation.js +2 -0
  121. package/dist/runtime/server/middleware/request-logger.d.ts +1 -1
  122. package/dist/runtime/server/middleware/request-logger.js +1 -0
  123. package/dist/runtime/server/tasks/send-daily-usage-report.d.ts +1 -1
  124. package/dist/runtime/server/tasks/send-daily-usage-report.js +1 -0
  125. package/dist/runtime/server/utils/agent-api.d.ts +1 -1
  126. package/dist/runtime/server/utils/agent-api.js +2 -0
  127. package/dist/runtime/server/utils/auth-api.js +2 -0
  128. package/dist/runtime/server/utils/auth.d.ts +1 -1
  129. package/dist/runtime/server/utils/auth.js +1 -0
  130. package/dist/runtime/server/utils/tela-api.d.ts +1 -1
  131. package/dist/runtime/server/utils/tela-api.js +2 -0
  132. package/dist/runtime/server/utils/workspace.js +1 -0
  133. package/dist/runtime/types/chat.d.ts +2 -1
  134. package/dist/runtime/types/workspace-settings.d.ts +3 -0
  135. package/dist/runtime/types/workspace-settings.js +0 -0
  136. package/dist/runtime/utils/conversation-list-skeleton.d.ts +31 -0
  137. package/dist/runtime/utils/conversation-list-skeleton.js +12 -0
  138. package/dist/runtime/utils/file.js +42 -42
  139. package/dist/types.d.mts +2 -0
  140. package/package.json +24 -12
  141. package/dist/runtime/composables/PageNavigation.d.ts +0 -13
  142. package/dist/runtime/composables/PageNavigation.js +0 -18
  143. /package/dist/runtime/components/{TelaChat.d.vue.ts → MeistrariChatEmbed.d.vue.ts} +0 -0
  144. /package/dist/runtime/components/{TelaChat.vue → MeistrariChatEmbed.vue} +0 -0
  145. /package/dist/runtime/components/{TelaChat.vue.d.ts → MeistrariChatEmbed.vue.d.ts} +0 -0
  146. /package/dist/runtime/components/{pdf-preview.d.vue.ts → pdf-preview.client.d.vue.ts} +0 -0
  147. /package/dist/runtime/components/{pdf-preview.vue → pdf-preview.client.vue} +0 -0
  148. /package/dist/runtime/components/{pdf-preview.vue.d.ts → pdf-preview.client.vue.d.ts} +0 -0
  149. /package/dist/runtime/components/{pdf-viewer.d.vue.ts → pdf-viewer.client.d.vue.ts} +0 -0
  150. /package/dist/runtime/components/{pdf-viewer.vue → pdf-viewer.client.vue} +0 -0
  151. /package/dist/runtime/components/{pdf-viewer.vue.d.ts → pdf-viewer.client.vue.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { eq, and, lt, desc, isNull } from "drizzle-orm";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { useDb, schema } from "#chat-runtime/server/db";
@@ -1,2 +1,15 @@
1
- declare const _default: any;
1
+ type MessageFile = {
2
+ url: string;
3
+ name: string;
4
+ mimeType?: string;
5
+ source: 'user' | 'assistant';
6
+ size?: number;
7
+ };
8
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
9
+ messages: any;
10
+ newFiles: MessageFile[];
11
+ } | {
12
+ messages: any;
13
+ newFiles?: undefined;
14
+ }>>;
2
15
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getQuery, getRouterParam } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { and, asc, eq, gt, isNotNull } from "drizzle-orm";
2
4
  import { APIKeyAuthStrategy, VaultFile } from "@meistrari/vault-sdk";
3
5
  import { schema, useDb } from "#chat-runtime/server/db";
@@ -1,2 +1,5 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ userMessage: any;
3
+ assistantMessage: any;
4
+ }>>;
2
5
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, getRouterParam, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { eq, and, isNull } from "drizzle-orm";
2
4
  import { useDb, schema } from "#chat-runtime/server/db";
3
5
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -4,5 +4,5 @@ export interface ConversationUsageResponse {
4
4
  usage: ConversationUsage | null;
5
5
  billing: BillingConfig;
6
6
  }
7
- declare const _default: any;
7
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<ConversationUsageResponse>>;
8
8
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { eq, and } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ title: string;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { createTelaClient } from "@meistrari/tela-sdk-js";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { desc, eq } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRequestHeader, readBody } from "h3";
1
2
  import { useDb, schema } from "#chat-runtime/server/db";
2
3
  import { resolveChatContext } from "#chat-runtime/server/utils/chat-context";
3
4
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<DiscoveredSkill>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
2
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
5
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
2
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
5
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { defineEventHandler } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
2
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
5
  import { logger } from "#chat-runtime/server/utils/logger";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler, getQuery } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<TelaWorkstation[]>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  import { requireUser } from "#chat-runtime/server/utils/auth";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,2 +1,6 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ mimeType: string | undefined;
3
+ fileSize: number | undefined;
4
+ originalFileName: string | undefined;
5
+ }>>;
2
6
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  import { isAllowedPermalinkUrl, isAllowedRedirectUrl } from "#chat-runtime/server/utils/vault";
3
5
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,10 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ url: string;
3
+ originalFileName?: undefined;
4
+ mimeType?: undefined;
5
+ } | {
6
+ url: string;
7
+ originalFileName: any;
8
+ mimeType: any;
9
+ }>>;
2
10
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { APIKeyAuthStrategy, VaultFile } from "@meistrari/vault-sdk";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
@@ -1,2 +1,7 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ vaultReference: string;
3
+ url: string;
4
+ mimeType: any;
5
+ size: number;
6
+ }>>;
2
7
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler, readFormData } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { APIKeyAuthStrategy, VaultFile } from "@meistrari/vault-sdk";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  import { getAgentDataToken } from "#chat-runtime/server/utils/agent-api";
@@ -1,2 +1,4 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
+ success: boolean;
3
+ }>>;
2
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, getRouterParam, readBody } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
1
2
  import { requireUser } from "#chat-runtime/server/utils/auth";
2
3
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
3
4
  export default defineEventHandler(async (event) => {
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler } from "h3";
1
2
  import { eq } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { createError, defineEventHandler, readBody } from "h3";
1
2
  import { eq, and, inArray } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -44,5 +44,5 @@ export interface WorkspaceUsageResponse {
44
44
  hasMore: boolean;
45
45
  billing: BillingConfig;
46
46
  }
47
- declare const _default: any;
47
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<WorkspaceUsageResponse>>;
48
48
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler, getQuery } from "h3";
1
2
  import { and, eq, gte, lte, sql, desc } from "drizzle-orm";
2
3
  import { useDb, schema } from "#chat-runtime/server/db";
3
4
  import { requireUser } from "#chat-runtime/server/utils/auth";
@@ -1,3 +1,4 @@
1
+ import { useRuntimeConfig } from "nitropack/runtime";
1
2
  import postgres from "postgres";
2
3
  import { drizzle } from "drizzle-orm/postgres-js";
3
4
  import * as schema from "./schema/index.js";
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<void>>;
2
2
  export default _default;
@@ -1,3 +1,5 @@
1
+ import { createError, defineEventHandler } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  export default defineEventHandler(async (event) => {
3
5
  const config = useRuntimeConfig(event);
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, void>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineEventHandler, getMethod, getRequestURL } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  export default defineEventHandler((event) => {
3
4
  const path = getRequestURL(event).pathname;
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("nitropack").Task<string>;
2
2
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { defineTask, useRuntimeConfig } from "nitropack/runtime";
1
2
  import { and, gte, lte, sql } from "drizzle-orm";
2
3
  import { useDb, schema } from "../db/index.js";
3
4
  import { sendSlackMessage, formatUsageReport } from "../utils/slack.js";
@@ -1,4 +1,4 @@
1
- import type { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  import type { AgentApiChatPayload, AgentApiSession, ContinueSessionPayload, ReasoningItem } from '#chat-runtime/types/agent';
3
3
  export declare function getAgentDataToken(event: H3Event): string;
4
4
  export declare function createChatAgentSession(token: string, payload: AgentApiChatPayload): Promise<{
@@ -1,3 +1,5 @@
1
+ import { createError } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { agentApiQueryResponseSchema, agentApiSessionSchema } from "#chat-runtime/types/agent";
2
4
  import { logger } from "#chat-runtime/server/utils/logger";
3
5
  const getConfig = () => useRuntimeConfig();
@@ -1,3 +1,5 @@
1
+ import { createError } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  export async function authApiFetch(path, options) {
3
5
  const config = useRuntimeConfig();
@@ -1,4 +1,4 @@
1
- import type { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  export type SessionUser = {
3
3
  id: string;
4
4
  name: string;
@@ -1,3 +1,4 @@
1
+ import { createError } from "h3";
1
2
  import { logger } from "#chat-runtime/server/utils/logger";
2
3
  export function requireUser(event) {
3
4
  const { user, workspace } = event.context.auth ?? {};
@@ -1,2 +1,2 @@
1
- import type { H3Event } from 'h3';
1
+ import { type H3Event } from 'h3';
2
2
  export declare function telaFetch<T>(event: H3Event, path: string, options?: RequestInit): Promise<T>;
@@ -1,3 +1,5 @@
1
+ import { createError } from "h3";
2
+ import { useRuntimeConfig } from "nitropack/runtime";
1
3
  import { logger } from "#chat-runtime/server/utils/logger";
2
4
  export async function telaFetch(event, path, options) {
3
5
  const config = useRuntimeConfig();
@@ -1,3 +1,4 @@
1
+ import { useRuntimeConfig } from "nitropack/runtime";
1
2
  import { eq } from "drizzle-orm";
2
3
  import { schema } from "#chat-runtime/server/db";
3
4
  import { telaFetch } from "#chat-runtime/server/utils/tela-api";
@@ -1,6 +1,7 @@
1
1
  import type { InferSelectModel } from 'drizzle-orm';
2
- import type { conversations, messages, ContextFile as SchemaContextFile, MessageFile as SchemaMessageFile } from '#chat-runtime/server/db/schema';
2
+ import type { conversations, messages, ContextFile as SchemaContextFile, ExternalSkill as SchemaExternalSkill, MessageFile as SchemaMessageFile } from '#chat-runtime/server/db/schema';
3
3
  export type ContextFile = SchemaContextFile;
4
+ export type ExternalSkill = SchemaExternalSkill;
4
5
  export type MessageFile = SchemaMessageFile;
5
6
  export type Conversation = InferSelectModel<typeof conversations>;
6
7
  export type Message = InferSelectModel<typeof messages>;
@@ -0,0 +1,3 @@
1
+ import type { ChatConfigurationSavePayload, ChatConfigurationTab } from '../embed/components/ChatConfigurationModal.vue.js';
2
+ import type { WorkspaceSettings, WorkspaceSettingsUpdate } from '../composables/useWorkspaceSettings.js';
3
+ export type { ChatConfigurationSavePayload, ChatConfigurationTab, WorkspaceSettings, WorkspaceSettingsUpdate, };
File without changes
@@ -0,0 +1,31 @@
1
+ export declare const conversationListSkeletonRows: readonly [{
2
+ readonly id: "row-1";
3
+ readonly width: "72%";
4
+ }, {
5
+ readonly id: "row-2";
6
+ readonly width: "54%";
7
+ }, {
8
+ readonly id: "row-3";
9
+ readonly width: "64%";
10
+ }, {
11
+ readonly id: "row-4";
12
+ readonly width: "46%";
13
+ }, {
14
+ readonly id: "row-5";
15
+ readonly width: "78%";
16
+ }, {
17
+ readonly id: "row-6";
18
+ readonly width: "58%";
19
+ }, {
20
+ readonly id: "row-7";
21
+ readonly width: "69%";
22
+ }, {
23
+ readonly id: "row-8";
24
+ readonly width: "51%";
25
+ }, {
26
+ readonly id: "row-9";
27
+ readonly width: "74%";
28
+ }, {
29
+ readonly id: "row-10";
30
+ readonly width: "62%";
31
+ }];
@@ -0,0 +1,12 @@
1
+ export const conversationListSkeletonRows = [
2
+ { id: "row-1", width: "72%" },
3
+ { id: "row-2", width: "54%" },
4
+ { id: "row-3", width: "64%" },
5
+ { id: "row-4", width: "46%" },
6
+ { id: "row-5", width: "78%" },
7
+ { id: "row-6", width: "58%" },
8
+ { id: "row-7", width: "69%" },
9
+ { id: "row-8", width: "51%" },
10
+ { id: "row-9", width: "74%" },
11
+ { id: "row-10", width: "62%" }
12
+ ];
@@ -65,53 +65,53 @@ const MIME_TO_EXTENSION = (() => {
65
65
  return map;
66
66
  })();
67
67
  const FILE_ICONS = {
68
- "application/pdf": "/files/pdf.svg",
69
- "application/msword": "/files/doc.svg",
70
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "/files/doc.svg",
71
- "application/vnd.ms-excel": "/files/sheet.svg",
72
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "/files/sheet.svg",
73
- "application/vnd.ms-powerpoint": "/files/presentation.svg",
74
- "application/vnd.openxmlformats-officedocument.presentationml.presentation": "/files/presentation.svg",
75
- "text/csv": "/files/sheet.svg",
76
- "text/plain": "/files/generic.svg",
77
- "text/markdown": "/files/markdown.svg",
78
- "application/json": "/files/json.svg",
79
- "application/xml": "/files/generic.svg",
80
- "application/zip": "/files/archive.svg",
81
- "application/x-rar-compressed": "/files/archive.svg",
82
- "application/x-tar": "/files/archive.svg",
83
- "application/gzip": "/files/archive.svg",
84
- "image/jpeg": "/files/image.svg",
85
- "image/png": "/files/image.svg",
86
- "image/gif": "/files/image.svg",
87
- "image/webp": "/files/image.svg",
88
- "image/svg+xml": "/files/image.svg",
89
- "video/mp4": "/files/video.svg",
90
- "video/webm": "/files/video.svg",
91
- "audio/mpeg": "/files/audio.svg",
92
- "audio/wav": "/files/audio.svg",
93
- "audio/ogg": "/files/audio.svg",
94
- "text/x-python": "/files/python.svg",
95
- "text/javascript": "/files/javascript.svg",
96
- "text/typescript": "/files/typescript.svg",
97
- "text/html": "/files/html.svg",
98
- "text/css": "/files/css.svg",
99
- "text/sql": "/files/sql.svg",
100
- "text/yaml": "/files/yaml.svg",
101
- "text/x-go": "/files/go.svg",
102
- "text/x-rust": "/files/rust.svg",
103
- "text/x-ruby": "/files/ruby.svg",
104
- "text/x-java": "/files/java.svg",
105
- "text/x-shellscript": "/files/shell.svg",
106
- "text/x-c": "/files/c.svg",
107
- "text/x-cpp": "/files/cpp.svg",
108
- "unknown": "/files/generic.svg"
68
+ "application/pdf": "/chat-files/pdf.svg",
69
+ "application/msword": "/chat-files/doc.svg",
70
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "/chat-files/doc.svg",
71
+ "application/vnd.ms-excel": "/chat-files/sheet.svg",
72
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "/chat-files/sheet.svg",
73
+ "application/vnd.ms-powerpoint": "/chat-files/presentation.svg",
74
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "/chat-files/presentation.svg",
75
+ "text/csv": "/chat-files/sheet.svg",
76
+ "text/plain": "/chat-files/generic.svg",
77
+ "text/markdown": "/chat-files/markdown.svg",
78
+ "application/json": "/chat-files/json.svg",
79
+ "application/xml": "/chat-files/generic.svg",
80
+ "application/zip": "/chat-files/archive.svg",
81
+ "application/x-rar-compressed": "/chat-files/archive.svg",
82
+ "application/x-tar": "/chat-files/archive.svg",
83
+ "application/gzip": "/chat-files/archive.svg",
84
+ "image/jpeg": "/chat-files/image.svg",
85
+ "image/png": "/chat-files/image.svg",
86
+ "image/gif": "/chat-files/image.svg",
87
+ "image/webp": "/chat-files/image.svg",
88
+ "image/svg+xml": "/chat-files/image.svg",
89
+ "video/mp4": "/chat-files/video.svg",
90
+ "video/webm": "/chat-files/video.svg",
91
+ "audio/mpeg": "/chat-files/audio.svg",
92
+ "audio/wav": "/chat-files/audio.svg",
93
+ "audio/ogg": "/chat-files/audio.svg",
94
+ "text/x-python": "/chat-files/python.svg",
95
+ "text/javascript": "/chat-files/javascript.svg",
96
+ "text/typescript": "/chat-files/typescript.svg",
97
+ "text/html": "/chat-files/html.svg",
98
+ "text/css": "/chat-files/css.svg",
99
+ "text/sql": "/chat-files/sql.svg",
100
+ "text/yaml": "/chat-files/yaml.svg",
101
+ "text/x-go": "/chat-files/go.svg",
102
+ "text/x-rust": "/chat-files/rust.svg",
103
+ "text/x-ruby": "/chat-files/ruby.svg",
104
+ "text/x-java": "/chat-files/java.svg",
105
+ "text/x-shellscript": "/chat-files/shell.svg",
106
+ "text/x-c": "/chat-files/c.svg",
107
+ "text/x-cpp": "/chat-files/cpp.svg",
108
+ "unknown": "/chat-files/generic.svg"
109
109
  };
110
110
  function normalizeMimeType(mimeType) {
111
111
  return mimeType.split(";")[0]?.trim() ?? mimeType;
112
112
  }
113
113
  function getFileIcon(mimeType) {
114
- return FILE_ICONS[mimeType] ?? "/files/generic.svg";
114
+ return FILE_ICONS[mimeType] ?? "/chat-files/generic.svg";
115
115
  }
116
116
  function getFileTypeLabel(mimeType) {
117
117
  if (mimeType.includes("pdf"))
package/dist/types.d.mts CHANGED
@@ -5,3 +5,5 @@ import type { default as Module } from './module.mjs'
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
7
  export { default } from './module.mjs'
8
+
9
+ export { type ChatNuxtModuleOptions } from './module.mjs'