@meistrari/chat-nuxt 3.4.0 → 3.6.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 (52) hide show
  1. package/dist/module.d.mts +2 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -0
  4. package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +1 -0
  5. package/dist/runtime/conversations/components/chat-conversation-list.vue +3 -2
  6. package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +1 -0
  7. package/dist/runtime/conversations/composables/conversations.d.ts +2 -4
  8. package/dist/runtime/conversations/composables/conversations.js +5 -1
  9. package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +2 -0
  10. package/dist/runtime/embed/components/chat-embed-inner.vue +39 -9
  11. package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +2 -0
  12. package/dist/runtime/embed/components/chat-embed.d.vue.ts +3 -0
  13. package/dist/runtime/embed/components/chat-embed.vue +7 -1
  14. package/dist/runtime/embed/components/chat-embed.vue.d.ts +3 -0
  15. package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +7 -1
  16. package/dist/runtime/embed/components/meistrari-chat-embed.vue +6 -1
  17. package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +7 -1
  18. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +1 -0
  19. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue +2 -1
  20. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +1 -0
  21. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +4 -1
  22. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +6 -0
  23. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +4 -1
  24. package/dist/runtime/embed/composables/tela-agent-metadata.d.ts +2 -2
  25. package/dist/runtime/embed/types.d.ts +2 -0
  26. package/dist/runtime/messages/components/chat-message-input.d.vue.ts +3 -1
  27. package/dist/runtime/messages/components/chat-message-input.vue +27 -0
  28. package/dist/runtime/messages/components/chat-message-input.vue.d.ts +3 -1
  29. package/dist/runtime/messages/composables/chat-message-terminal.d.ts +17 -0
  30. package/dist/runtime/messages/composables/chat-message-terminal.js +42 -0
  31. package/dist/runtime/messages/composables/chat.d.ts +3 -0
  32. package/dist/runtime/messages/composables/chat.js +9 -4
  33. package/dist/runtime/messages/composables/mention-autocomplete.js +8 -2
  34. package/dist/runtime/types/embed.d.ts +3 -0
  35. package/dist/runtime/types/embed.js +1 -0
  36. package/dist/runtime/types/schemas/chat/conversations.d.ts +27 -0
  37. package/dist/runtime/types/schemas/chat/conversations.js +7 -0
  38. package/dist/runtime/types/schemas/chat/files.d.ts +3 -3
  39. package/dist/runtime/types/schemas/chat/messages.d.ts +31 -0
  40. package/dist/runtime/types/schemas/chat/messages.js +24 -0
  41. package/dist/runtime/types/schemas/chat/ui.d.ts +11 -1
  42. package/dist/runtime/types/schemas/chat/ui.js +3 -0
  43. package/dist/runtime/types/schemas/chat/usage.d.ts +1 -1
  44. package/dist/runtime/types/schemas/chat/workspace-agent.d.ts +14 -0
  45. package/dist/runtime/types/schemas/chat/workspace-agent.js +7 -0
  46. package/dist/runtime/types/schemas/integrations/agent-api.d.ts +1 -1
  47. package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +68 -6
  48. package/dist/runtime/types/schemas/integrations/tela-agent-api.js +18 -0
  49. package/dist/runtime/workspace/composables/workspace-agent-summary.d.ts +6 -0
  50. package/dist/runtime/workspace/composables/workspace-agent-summary.js +54 -0
  51. package/dist/types.d.mts +3 -1
  52. package/package.json +1 -1
@@ -32,6 +32,15 @@ export const telaAgentRunPayloadSchema = z.object({
32
32
  inputSchema: z.array(telaAgentExecutionInputSchema).optional(),
33
33
  attachments: z.array(telaAgentAttachmentSchema).optional(),
34
34
  }).catchall(z.unknown());
35
+ export const telaAgentSkillSchema = z.object({
36
+ name: z.string(),
37
+ description: z.string(),
38
+ path: z.string(),
39
+ });
40
+ export const telaAgentContextFileSchema = z.object({
41
+ path: z.string(),
42
+ name: z.string(),
43
+ });
35
44
  export const telaAgentSchema = z.object({
36
45
  id: z.string(),
37
46
  organizationName: z.string().optional(),
@@ -40,7 +49,16 @@ export const telaAgentSchema = z.object({
40
49
  allowedCredentials: z.array(z.string()).nullable().optional(),
41
50
  inputSchema: z.array(telaAgentInputVariableSchema).nullable().optional().transform(value => value ?? []),
42
51
  isMultiturn: z.boolean().nullable().optional(),
52
+ skills: z.array(telaAgentSkillSchema).optional(),
53
+ contextFiles: z.array(telaAgentContextFileSchema).optional(),
43
54
  }).catchall(z.unknown());
55
+ export const telaAgentSummarySchema = z.object({
56
+ id: z.string(),
57
+ inputSchema: z.array(telaAgentInputVariableSchema),
58
+ isMultiturn: z.boolean().nullable(),
59
+ skills: z.array(telaAgentSkillSchema),
60
+ contextFiles: z.array(telaAgentContextFileSchema),
61
+ });
44
62
  export const telaAgentRunResponseSchema = z.object({
45
63
  sessionId: z.string(),
46
64
  }).catchall(z.unknown());
@@ -0,0 +1,6 @@
1
+ import type { WorkspaceAgentSummaryResponse } from '../../types/schemas/chat/workspace-agent.js';
2
+ export declare function useWorkspaceAgentSummary(): {
3
+ summary: any;
4
+ loading: any;
5
+ fetchSummary: () => Promise<WorkspaceAgentSummaryResponse | null>;
6
+ };
@@ -0,0 +1,54 @@
1
+ import * as Sentry from "@sentry/nuxt";
2
+ import { workspaceAgentSummaryResponseSchema } from "../../types/schemas/chat/workspace-agent.js";
3
+ import { useChatAuth } from "#chat-auth";
4
+ import { useChatApi } from "../../shared/composables/chat-api.js";
5
+ import { useEmbedConfig } from "../../embed/composables/embed-config.js";
6
+ export function useWorkspaceAgentSummary() {
7
+ const chatApi = useChatApi();
8
+ const embedConfig = useEmbedConfig();
9
+ const { activeOrganization } = useChatAuth();
10
+ const workspaceScope = computed(() => embedConfig?.workspaceId.value.trim() || activeOrganization.value?.id?.trim() || "default");
11
+ const summaryBuckets = useState("workspace-agent-summary", () => ({}));
12
+ const loadingBuckets = useState("workspace-agent-summary-loading", () => ({}));
13
+ const summary = computed(() => summaryBuckets.value[workspaceScope.value] ?? null);
14
+ const loading = computed(() => loadingBuckets.value[workspaceScope.value] ?? false);
15
+ function requestArgs() {
16
+ if (embedConfig !== null)
17
+ return [chatApi.path("/workspace/agent/summary"), chatApi.withChatHeaders()];
18
+ return ["/api/workspace/agent/summary", void 0];
19
+ }
20
+ async function fetchSummary() {
21
+ const scope = workspaceScope.value;
22
+ const cached = summaryBuckets.value[scope];
23
+ if (cached)
24
+ return cached;
25
+ loadingBuckets.value = {
26
+ ...loadingBuckets.value,
27
+ [scope]: true
28
+ };
29
+ try {
30
+ const [path, options] = requestArgs();
31
+ const parsed = workspaceAgentSummaryResponseSchema.safeParse(await $fetch(path, options));
32
+ if (!parsed.success)
33
+ throw new Error("Invalid workspace agent summary response");
34
+ summaryBuckets.value = {
35
+ ...summaryBuckets.value,
36
+ [scope]: parsed.data
37
+ };
38
+ return parsed.data;
39
+ } catch (e) {
40
+ Sentry.captureException(e);
41
+ return null;
42
+ } finally {
43
+ loadingBuckets.value = {
44
+ ...loadingBuckets.value,
45
+ [scope]: false
46
+ };
47
+ }
48
+ }
49
+ return {
50
+ summary,
51
+ loading,
52
+ fetchSummary
53
+ };
54
+ }
package/dist/types.d.mts CHANGED
@@ -4,7 +4,9 @@ import type { default as Module } from './module.mjs'
4
4
 
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
- export { type ChatActionPayload, type ChatActor, type ChatEmbedSharedProps, type ChatFeatureConfig, type ChatSidebarConfig, type DefaultChatEmbedProps, type MeistrariChatEmbedProps, type MessageFeedbackConfig, type MessageFeedbackPayload, type MessageFeedbackRating, type TelaAgentChatEmbedProps, type TelaAgentExecutionInput } from '../dist/runtime/types/embed.js'
7
+ export { ChatMessageStatus } from '../dist/runtime/messages/composables/chat-message-terminal.js'
8
+
9
+ export { type ChatActionPayload, type ChatActor, type ChatEmbedSharedProps, type ChatFeatureConfig, type ChatMessageTerminalPayload, type ChatSidebarConfig, type DefaultChatEmbedProps, type MeistrariChatEmbedProps, type MessageFeedbackConfig, type MessageFeedbackPayload, type MessageFeedbackRating, type MessageOverviewResponse, type TelaAgentChatEmbedProps, type TelaAgentExecutionInput } from '../dist/runtime/types/embed.js'
8
10
 
9
11
  export { default } from './module.mjs'
10
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {