@meistrari/chat-nuxt 3.3.2 → 3.5.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.
- package/dist/module.d.mts +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -0
- package/dist/runtime/conversations/composables/conversations.d.ts +3 -2
- package/dist/runtime/conversations/composables/conversations.js +35 -3
- package/dist/runtime/embed/components/chat-embed-inner.vue +61 -8
- package/dist/runtime/embed/components/chat-embed.d.vue.ts +3 -0
- package/dist/runtime/embed/components/chat-embed.vue +5 -1
- package/dist/runtime/embed/components/chat-embed.vue.d.ts +3 -0
- package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +7 -1
- package/dist/runtime/embed/components/meistrari-chat-embed.vue +3 -1
- package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +7 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +12 -3
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +6 -0
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +12 -3
- package/dist/runtime/embed/composables/tela-agent-metadata.d.ts +2 -2
- package/dist/runtime/messages/components/chat-message-input.d.vue.ts +13 -4
- package/dist/runtime/messages/components/chat-message-input.vue +33 -0
- package/dist/runtime/messages/components/chat-message-input.vue.d.ts +13 -4
- package/dist/runtime/messages/components/chat-model-selector.d.vue.ts +14 -0
- package/dist/runtime/messages/components/chat-model-selector.vue +56 -0
- package/dist/runtime/messages/components/chat-model-selector.vue.d.ts +14 -0
- package/dist/runtime/messages/composables/chat-message-terminal.d.ts +17 -0
- package/dist/runtime/messages/composables/chat-message-terminal.js +42 -0
- package/dist/runtime/messages/composables/chat.d.ts +5 -0
- package/dist/runtime/messages/composables/chat.js +31 -4
- package/dist/runtime/messages/composables/mention-autocomplete.js +8 -2
- package/dist/runtime/shared/components/icons/anthropic.vue +1 -1
- package/dist/runtime/shared/components/icons/gemini.d.vue.ts +3 -0
- package/dist/runtime/shared/components/icons/gemini.vue +3 -0
- package/dist/runtime/shared/components/icons/gemini.vue.d.ts +3 -0
- package/dist/runtime/shared/components/icons/openai.d.vue.ts +3 -0
- package/dist/runtime/shared/components/icons/openai.vue +3 -0
- package/dist/runtime/shared/components/icons/openai.vue.d.ts +3 -0
- package/dist/runtime/types/embed.d.ts +3 -0
- package/dist/runtime/types/embed.js +1 -0
- package/dist/runtime/types/schemas/chat/conversations.d.ts +37 -1
- package/dist/runtime/types/schemas/chat/conversations.js +10 -1
- package/dist/runtime/types/schemas/chat/files.d.ts +3 -3
- package/dist/runtime/types/schemas/chat/messages.d.ts +31 -0
- package/dist/runtime/types/schemas/chat/messages.js +24 -0
- package/dist/runtime/types/schemas/chat/models.d.ts +4 -6
- package/dist/runtime/types/schemas/chat/models.js +3 -5
- package/dist/runtime/types/schemas/chat/ui.d.ts +50 -17
- package/dist/runtime/types/schemas/chat/ui.js +8 -5
- package/dist/runtime/types/schemas/chat/usage.d.ts +1 -1
- package/dist/runtime/types/schemas/chat/workspace-agent.d.ts +14 -0
- package/dist/runtime/types/schemas/chat/workspace-agent.js +7 -0
- package/dist/runtime/types/schemas/integrations/agent-api.d.ts +1 -1
- package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +68 -6
- package/dist/runtime/types/schemas/integrations/tela-agent-api.js +18 -0
- package/dist/runtime/workspace/composables/workspace-agent-summary.d.ts +6 -0
- package/dist/runtime/workspace/composables/workspace-agent-summary.js +54 -0
- package/dist/types.d.mts +3 -1
- package/package.json +1 -1
|
@@ -2,6 +2,30 @@ import { z } from 'zod';
|
|
|
2
2
|
import { telaAgentExecutionInputSchema } from '../integrations/tela-agent-api';
|
|
3
3
|
import { messageSchema } from './conversations';
|
|
4
4
|
import { fileUploadInputSchema, messageFileSchema } from './files';
|
|
5
|
+
import { messageRoleSchema, messageStatusSchema } from './primitives';
|
|
6
|
+
export const messageOverviewResponseSchema = z.strictObject({
|
|
7
|
+
conversation: z.strictObject({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
userId: z.string(),
|
|
10
|
+
model: z.string().nullable(),
|
|
11
|
+
}),
|
|
12
|
+
message: z.strictObject({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
conversationId: z.string(),
|
|
15
|
+
role: messageRoleSchema,
|
|
16
|
+
status: messageStatusSchema.nullable(),
|
|
17
|
+
content: z.string(),
|
|
18
|
+
agentSessionId: z.string().nullable(),
|
|
19
|
+
agentSessionCursor: z.number().int().nullable(),
|
|
20
|
+
createdAt: z.date(),
|
|
21
|
+
updatedAt: z.date().nullable(),
|
|
22
|
+
}),
|
|
23
|
+
previousUserMessage: z.strictObject({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
content: z.string(),
|
|
26
|
+
createdAt: z.date(),
|
|
27
|
+
}).nullable(),
|
|
28
|
+
});
|
|
5
29
|
export const sendMessageBodySchema = z.strictObject({
|
|
6
30
|
content: z.string(),
|
|
7
31
|
files: z.array(fileUploadInputSchema).optional(),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const chatModelIds: readonly ["claude-
|
|
2
|
+
export declare const chatModelIds: readonly ["claude-opus-4-8", "claude-sonnet-5", "claude-haiku-4-5"];
|
|
3
3
|
export declare const chatModelSchema: z.ZodEnum<{
|
|
4
|
-
"claude-
|
|
5
|
-
"claude-sonnet-
|
|
4
|
+
"claude-opus-4-8": "claude-opus-4-8";
|
|
5
|
+
"claude-sonnet-5": "claude-sonnet-5";
|
|
6
6
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
7
|
-
"claude-opus-4-5": "claude-opus-4-5";
|
|
8
|
-
"claude-opus-4-6": "claude-opus-4-6";
|
|
9
7
|
}>;
|
|
10
8
|
export type ChatModel = z.infer<typeof chatModelSchema>;
|
|
11
|
-
export declare const defaultChatModel = "claude-
|
|
9
|
+
export declare const defaultChatModel = "claude-opus-4-8";
|
|
12
10
|
export declare function isValidChatModel(value: unknown): value is ChatModel;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const chatModelIds = [
|
|
3
|
-
'claude-
|
|
4
|
-
'claude-sonnet-
|
|
3
|
+
'claude-opus-4-8',
|
|
4
|
+
'claude-sonnet-5',
|
|
5
5
|
'claude-haiku-4-5',
|
|
6
|
-
'claude-opus-4-5',
|
|
7
|
-
'claude-opus-4-6',
|
|
8
6
|
];
|
|
9
7
|
export const chatModelSchema = z.enum(chatModelIds);
|
|
10
|
-
export const defaultChatModel = 'claude-
|
|
8
|
+
export const defaultChatModel = 'claude-opus-4-8';
|
|
11
9
|
export function isValidChatModel(value) {
|
|
12
10
|
return typeof value === 'string' && chatModelIds.includes(value);
|
|
13
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { ChatModel } from './models';
|
|
2
3
|
export declare const conversationCreatorFilterOptions: readonly [{
|
|
3
4
|
readonly label: "Todas";
|
|
4
5
|
readonly value: "all";
|
|
@@ -6,31 +7,53 @@ export declare const conversationCreatorFilterOptions: readonly [{
|
|
|
6
7
|
readonly label: "Minhas";
|
|
7
8
|
readonly value: "mine";
|
|
8
9
|
}];
|
|
10
|
+
export type ChatModelProvider = 'Anthropic' | 'OpenAI' | 'Google';
|
|
11
|
+
export type ChatModelOption = {
|
|
12
|
+
value: ChatModel;
|
|
13
|
+
label: string;
|
|
14
|
+
description: string;
|
|
15
|
+
provider: ChatModelProvider;
|
|
16
|
+
cost: number;
|
|
17
|
+
maxInputTokens: number;
|
|
18
|
+
maxOutputTokens: number;
|
|
19
|
+
isMultiModal: boolean;
|
|
20
|
+
tabs: readonly string[];
|
|
21
|
+
};
|
|
9
22
|
export declare const chatModelOptions: readonly [{
|
|
10
|
-
readonly value: "claude-
|
|
11
|
-
readonly label: "
|
|
12
|
-
readonly description: "
|
|
23
|
+
readonly value: "claude-opus-4-8";
|
|
24
|
+
readonly label: "Claude 4.8 Opus";
|
|
25
|
+
readonly description: "Agente de ponta para tarefas complexas";
|
|
26
|
+
readonly provider: "Anthropic";
|
|
27
|
+
readonly cost: 4;
|
|
28
|
+
readonly maxInputTokens: 1000000;
|
|
29
|
+
readonly maxOutputTokens: 128000;
|
|
30
|
+
readonly isMultiModal: true;
|
|
31
|
+
readonly tabs: readonly ["all", "advanced", "multimodal"];
|
|
13
32
|
}, {
|
|
14
|
-
readonly value: "claude-sonnet-
|
|
15
|
-
readonly label: "Sonnet
|
|
16
|
-
readonly description: "
|
|
33
|
+
readonly value: "claude-sonnet-5";
|
|
34
|
+
readonly label: "Claude Sonnet 5";
|
|
35
|
+
readonly description: "Agente rápido e inteligente de nova geração";
|
|
36
|
+
readonly provider: "Anthropic";
|
|
37
|
+
readonly cost: 4;
|
|
38
|
+
readonly maxInputTokens: 1000000;
|
|
39
|
+
readonly maxOutputTokens: 64000;
|
|
40
|
+
readonly isMultiModal: true;
|
|
41
|
+
readonly tabs: readonly ["all", "advanced", "multimodal"];
|
|
17
42
|
}, {
|
|
18
43
|
readonly value: "claude-haiku-4-5";
|
|
19
|
-
readonly label: "
|
|
20
|
-
readonly description: "
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
|
|
26
|
-
readonly
|
|
27
|
-
readonly label: "Opus 4.6";
|
|
28
|
-
readonly description: "Top-tier agent with extended thinking";
|
|
44
|
+
readonly label: "Claude 4.5 Haiku";
|
|
45
|
+
readonly description: "Agente rápido e eficiente para tarefas simples";
|
|
46
|
+
readonly provider: "Anthropic";
|
|
47
|
+
readonly cost: 3;
|
|
48
|
+
readonly maxInputTokens: 200000;
|
|
49
|
+
readonly maxOutputTokens: 64000;
|
|
50
|
+
readonly isMultiModal: true;
|
|
51
|
+
readonly tabs: readonly ["all", "cheap", "multimodal"];
|
|
29
52
|
}];
|
|
30
53
|
export declare const topbarTabs: readonly ["chat", "files", "usage"];
|
|
31
54
|
export declare const topbarTabSchema: z.ZodEnum<{
|
|
32
|
-
files: "files";
|
|
33
55
|
usage: "usage";
|
|
56
|
+
files: "files";
|
|
34
57
|
chat: "chat";
|
|
35
58
|
}>;
|
|
36
59
|
export type TopbarTab = z.infer<typeof topbarTabSchema>;
|
|
@@ -55,6 +78,12 @@ export declare const mentionItemVariableSchema: z.ZodObject<{
|
|
|
55
78
|
text: "text";
|
|
56
79
|
}>;
|
|
57
80
|
}, z.core.$strip>;
|
|
81
|
+
export declare const mentionItemIdKinds: readonly ["url", "path"];
|
|
82
|
+
export declare const mentionItemIdKindSchema: z.ZodEnum<{
|
|
83
|
+
path: "path";
|
|
84
|
+
url: "url";
|
|
85
|
+
}>;
|
|
86
|
+
export type MentionItemIdKind = z.infer<typeof mentionItemIdKindSchema>;
|
|
58
87
|
export declare const mentionItemSchema: z.ZodObject<{
|
|
59
88
|
id: z.ZodString;
|
|
60
89
|
label: z.ZodString;
|
|
@@ -65,6 +94,10 @@ export declare const mentionItemSchema: z.ZodObject<{
|
|
|
65
94
|
skill: "skill";
|
|
66
95
|
canvas: "canvas";
|
|
67
96
|
}>;
|
|
97
|
+
idKind: z.ZodOptional<z.ZodEnum<{
|
|
98
|
+
path: "path";
|
|
99
|
+
url: "url";
|
|
100
|
+
}>>;
|
|
68
101
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
69
102
|
name: z.ZodString;
|
|
70
103
|
description: z.ZodString;
|
|
@@ -3,12 +3,12 @@ export const conversationCreatorFilterOptions = [
|
|
|
3
3
|
{ label: 'Todas', value: 'all' },
|
|
4
4
|
{ label: 'Minhas', value: 'mine' },
|
|
5
5
|
];
|
|
6
|
+
// Metadata follows the agent model catalog on the Tela platform
|
|
7
|
+
// (packages/application/composables/model.ts), curated to the models this app offers.
|
|
6
8
|
export const chatModelOptions = [
|
|
7
|
-
{ value: 'claude-
|
|
8
|
-
{ value: 'claude-sonnet-
|
|
9
|
-
{ value: 'claude-haiku-4-5', label: '
|
|
10
|
-
{ value: 'claude-opus-4-5', label: 'Opus 4.5', description: 'Most powerful agent for complex tasks' },
|
|
11
|
-
{ value: 'claude-opus-4-6', label: 'Opus 4.6', description: 'Top-tier agent with extended thinking' },
|
|
9
|
+
{ value: 'claude-opus-4-8', label: 'Claude 4.8 Opus', description: 'Agente de ponta para tarefas complexas', provider: 'Anthropic', cost: 4, maxInputTokens: 1_000_000, maxOutputTokens: 128_000, isMultiModal: true, tabs: ['all', 'advanced', 'multimodal'] },
|
|
10
|
+
{ value: 'claude-sonnet-5', label: 'Claude Sonnet 5', description: 'Agente rápido e inteligente de nova geração', provider: 'Anthropic', cost: 4, maxInputTokens: 1_000_000, maxOutputTokens: 64_000, isMultiModal: true, tabs: ['all', 'advanced', 'multimodal'] },
|
|
11
|
+
{ value: 'claude-haiku-4-5', label: 'Claude 4.5 Haiku', description: 'Agente rápido e eficiente para tarefas simples', provider: 'Anthropic', cost: 3, maxInputTokens: 200_000, maxOutputTokens: 64_000, isMultiModal: true, tabs: ['all', 'cheap', 'multimodal'] },
|
|
12
12
|
];
|
|
13
13
|
export const topbarTabs = ['chat', 'files', 'usage'];
|
|
14
14
|
export const topbarTabSchema = z.enum(topbarTabs);
|
|
@@ -21,11 +21,14 @@ export const mentionItemVariableSchema = z.object({
|
|
|
21
21
|
description: z.string(),
|
|
22
22
|
type: mentionItemVariableTypeSchema,
|
|
23
23
|
});
|
|
24
|
+
export const mentionItemIdKinds = ['url', 'path'];
|
|
25
|
+
export const mentionItemIdKindSchema = z.enum(mentionItemIdKinds);
|
|
24
26
|
export const mentionItemSchema = z.object({
|
|
25
27
|
id: z.string(),
|
|
26
28
|
label: z.string(),
|
|
27
29
|
description: z.string().optional(),
|
|
28
30
|
icon: z.string(),
|
|
29
31
|
category: mentionItemCategorySchema,
|
|
32
|
+
idKind: mentionItemIdKindSchema.optional(),
|
|
30
33
|
variables: z.record(z.string(), mentionItemVariableSchema).optional(),
|
|
31
34
|
});
|
|
@@ -87,10 +87,10 @@ export type ConversationUsageResponse = z.infer<typeof conversationUsageResponse
|
|
|
87
87
|
export declare const workspaceUsageGroupByValues: readonly ["day", "week", "month", "user", "conversation"];
|
|
88
88
|
export declare const workspaceUsageGroupBySchema: z.ZodEnum<{
|
|
89
89
|
user: "user";
|
|
90
|
+
conversation: "conversation";
|
|
90
91
|
day: "day";
|
|
91
92
|
week: "week";
|
|
92
93
|
month: "month";
|
|
93
|
-
conversation: "conversation";
|
|
94
94
|
}>;
|
|
95
95
|
export type WorkspaceUsageGroupBy = z.infer<typeof workspaceUsageGroupBySchema>;
|
|
96
96
|
export declare const workspaceUsageRecordSchema: z.ZodObject<{
|
|
@@ -31,3 +31,17 @@ export declare const workspaceAgentStatusResponseSchema: z.ZodObject<{
|
|
|
31
31
|
}>>;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
export type WorkspaceAgentStatusResponse = z.infer<typeof workspaceAgentStatusResponseSchema>;
|
|
34
|
+
export declare const workspaceAgentSummaryResponseSchema: z.ZodObject<{
|
|
35
|
+
workspaceId: z.ZodString;
|
|
36
|
+
telaAgentId: z.ZodNullable<z.ZodString>;
|
|
37
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
description: z.ZodString;
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
contextFiles: z.ZodArray<z.ZodObject<{
|
|
43
|
+
path: z.ZodString;
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type WorkspaceAgentSummaryResponse = z.infer<typeof workspaceAgentSummaryResponseSchema>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { telaAgentContextFileSchema, telaAgentSkillSchema } from '../integrations/tela-agent-api';
|
|
2
3
|
export const workspaceAgentModes = ['default', 'custom', 'setup_required'];
|
|
3
4
|
export const workspaceAgentModeSchema = z.enum(workspaceAgentModes);
|
|
4
5
|
export const workspaceAgentCustomizations = ['system_message', 'context_files', 'canvas_tools', 'external_skills'];
|
|
@@ -10,3 +11,9 @@ export const workspaceAgentStatusResponseSchema = z.object({
|
|
|
10
11
|
telaAgentUrl: z.string().nullable(),
|
|
11
12
|
pendingCustomizations: z.array(workspaceAgentCustomizationSchema),
|
|
12
13
|
});
|
|
14
|
+
export const workspaceAgentSummaryResponseSchema = z.object({
|
|
15
|
+
workspaceId: z.string().min(1),
|
|
16
|
+
telaAgentId: z.string().nullable(),
|
|
17
|
+
skills: z.array(telaAgentSkillSchema),
|
|
18
|
+
contextFiles: z.array(telaAgentContextFileSchema),
|
|
19
|
+
});
|
|
@@ -186,9 +186,9 @@ export type AgentApiSession = z.infer<typeof agentApiSessionSchema>;
|
|
|
186
186
|
export declare const agentSessionStatuses: readonly ["pending", "running", "completed", "failed"];
|
|
187
187
|
export declare const agentSessionStatusSchema: z.ZodEnum<{
|
|
188
188
|
pending: "pending";
|
|
189
|
+
running: "running";
|
|
189
190
|
completed: "completed";
|
|
190
191
|
failed: "failed";
|
|
191
|
-
running: "running";
|
|
192
192
|
}>;
|
|
193
193
|
export type AgentSessionStatus = z.infer<typeof agentSessionStatusSchema>;
|
|
194
194
|
export type AgentApiChatPayload = {
|
|
@@ -58,6 +58,17 @@ export declare const telaAgentRunPayloadSchema: z.ZodObject<{
|
|
|
58
58
|
}, z.core.$strip>>>;
|
|
59
59
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
60
60
|
export type TelaAgentRunPayload = z.infer<typeof telaAgentRunPayloadSchema>;
|
|
61
|
+
export declare const telaAgentSkillSchema: z.ZodObject<{
|
|
62
|
+
name: z.ZodString;
|
|
63
|
+
description: z.ZodString;
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type TelaAgentSkill = z.infer<typeof telaAgentSkillSchema>;
|
|
67
|
+
export declare const telaAgentContextFileSchema: z.ZodObject<{
|
|
68
|
+
path: z.ZodString;
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type TelaAgentContextFile = z.infer<typeof telaAgentContextFileSchema>;
|
|
61
72
|
export declare const telaAgentSchema: z.ZodObject<{
|
|
62
73
|
id: z.ZodString;
|
|
63
74
|
organizationName: z.ZodOptional<z.ZodString>;
|
|
@@ -89,8 +100,41 @@ export declare const telaAgentSchema: z.ZodObject<{
|
|
|
89
100
|
description?: string | null | undefined;
|
|
90
101
|
}[] | null | undefined>>;
|
|
91
102
|
isMultiturn: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
103
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
description: z.ZodString;
|
|
106
|
+
path: z.ZodString;
|
|
107
|
+
}, z.core.$strip>>>;
|
|
108
|
+
contextFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
109
|
+
path: z.ZodString;
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
}, z.core.$strip>>>;
|
|
92
112
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
93
113
|
export type TelaAgent = z.infer<typeof telaAgentSchema>;
|
|
114
|
+
export declare const telaAgentSummarySchema: z.ZodObject<{
|
|
115
|
+
id: z.ZodString;
|
|
116
|
+
inputSchema: z.ZodArray<z.ZodObject<{
|
|
117
|
+
id: z.ZodOptional<z.ZodString>;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
type: z.ZodEnum<{
|
|
120
|
+
file: "file";
|
|
121
|
+
text: "text";
|
|
122
|
+
}>;
|
|
123
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
126
|
+
isMultiturn: z.ZodNullable<z.ZodBoolean>;
|
|
127
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
description: z.ZodString;
|
|
130
|
+
path: z.ZodString;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
contextFiles: z.ZodArray<z.ZodObject<{
|
|
133
|
+
path: z.ZodString;
|
|
134
|
+
name: z.ZodString;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
export type TelaAgentSummary = z.infer<typeof telaAgentSummarySchema>;
|
|
94
138
|
export declare const telaAgentRunResponseSchema: z.ZodObject<{
|
|
95
139
|
sessionId: z.ZodString;
|
|
96
140
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
@@ -98,9 +142,9 @@ export type TelaAgentRunResponse = z.infer<typeof telaAgentRunResponseSchema>;
|
|
|
98
142
|
export declare const telaAgentSessionStatuses: readonly ["pending", "running", "completed", "failed", "waiting_messages", "cancelled"];
|
|
99
143
|
export declare const telaAgentSessionStatusSchema: z.ZodEnum<{
|
|
100
144
|
pending: "pending";
|
|
145
|
+
running: "running";
|
|
101
146
|
completed: "completed";
|
|
102
147
|
failed: "failed";
|
|
103
|
-
running: "running";
|
|
104
148
|
waiting_messages: "waiting_messages";
|
|
105
149
|
cancelled: "cancelled";
|
|
106
150
|
}>;
|
|
@@ -145,9 +189,9 @@ export declare const telaAgentSessionSchema: z.ZodObject<{
|
|
|
145
189
|
sessionId: z.ZodString;
|
|
146
190
|
status: z.ZodEnum<{
|
|
147
191
|
pending: "pending";
|
|
192
|
+
running: "running";
|
|
148
193
|
completed: "completed";
|
|
149
194
|
failed: "failed";
|
|
150
|
-
running: "running";
|
|
151
195
|
waiting_messages: "waiting_messages";
|
|
152
196
|
cancelled: "cancelled";
|
|
153
197
|
}>;
|
|
@@ -187,8 +231,8 @@ export declare const telaAgentV4SessionStatusEventSchema: z.ZodObject<{
|
|
|
187
231
|
sessionId: z.ZodString;
|
|
188
232
|
status: z.ZodEnum<{
|
|
189
233
|
pending: "pending";
|
|
190
|
-
failed: "failed";
|
|
191
234
|
running: "running";
|
|
235
|
+
failed: "failed";
|
|
192
236
|
cancelled: "cancelled";
|
|
193
237
|
}>;
|
|
194
238
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -200,9 +244,9 @@ export declare const telaAgentV4SessionStepsEventSchema: z.ZodObject<{
|
|
|
200
244
|
sessionId: z.ZodString;
|
|
201
245
|
status: z.ZodEnum<{
|
|
202
246
|
pending: "pending";
|
|
247
|
+
running: "running";
|
|
203
248
|
completed: "completed";
|
|
204
249
|
failed: "failed";
|
|
205
|
-
running: "running";
|
|
206
250
|
waiting_messages: "waiting_messages";
|
|
207
251
|
cancelled: "cancelled";
|
|
208
252
|
}>;
|
|
@@ -256,8 +300,8 @@ export declare const telaAgentV4SessionStreamEventSchema: z.ZodDiscriminatedUnio
|
|
|
256
300
|
sessionId: z.ZodString;
|
|
257
301
|
status: z.ZodEnum<{
|
|
258
302
|
pending: "pending";
|
|
259
|
-
failed: "failed";
|
|
260
303
|
running: "running";
|
|
304
|
+
failed: "failed";
|
|
261
305
|
cancelled: "cancelled";
|
|
262
306
|
}>;
|
|
263
307
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -268,9 +312,9 @@ export declare const telaAgentV4SessionStreamEventSchema: z.ZodDiscriminatedUnio
|
|
|
268
312
|
sessionId: z.ZodString;
|
|
269
313
|
status: z.ZodEnum<{
|
|
270
314
|
pending: "pending";
|
|
315
|
+
running: "running";
|
|
271
316
|
completed: "completed";
|
|
272
317
|
failed: "failed";
|
|
273
|
-
running: "running";
|
|
274
318
|
waiting_messages: "waiting_messages";
|
|
275
319
|
cancelled: "cancelled";
|
|
276
320
|
}>;
|
|
@@ -355,6 +399,15 @@ export declare const telaAgentApiResponseSchema: z.ZodObject<{
|
|
|
355
399
|
description?: string | null | undefined;
|
|
356
400
|
}[] | null | undefined>>;
|
|
357
401
|
isMultiturn: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
402
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
403
|
+
name: z.ZodString;
|
|
404
|
+
description: z.ZodString;
|
|
405
|
+
path: z.ZodString;
|
|
406
|
+
}, z.core.$strip>>>;
|
|
407
|
+
contextFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
408
|
+
path: z.ZodString;
|
|
409
|
+
name: z.ZodString;
|
|
410
|
+
}, z.core.$strip>>>;
|
|
358
411
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
359
412
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
360
413
|
export declare const telaAgentResolveApiResponseSchema: z.ZodObject<{
|
|
@@ -389,6 +442,15 @@ export declare const telaAgentResolveApiResponseSchema: z.ZodObject<{
|
|
|
389
442
|
description?: string | null | undefined;
|
|
390
443
|
}[] | null | undefined>>;
|
|
391
444
|
isMultiturn: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
445
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
446
|
+
name: z.ZodString;
|
|
447
|
+
description: z.ZodString;
|
|
448
|
+
path: z.ZodString;
|
|
449
|
+
}, z.core.$strip>>>;
|
|
450
|
+
contextFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
451
|
+
path: z.ZodString;
|
|
452
|
+
name: z.ZodString;
|
|
453
|
+
}, z.core.$strip>>>;
|
|
392
454
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
393
455
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
394
456
|
export declare const telaAgentEndSessionApiResponseSchema: z.ZodObject<{
|
|
@@ -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,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 {
|
|
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
|
|