@useinsider/guido 3.2.0-beta.803b92e → 3.2.0-beta.8220f9d

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 (113) hide show
  1. package/README.md +1 -25
  2. package/dist/@types/config/schemas.js +2 -2
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +88 -78
  5. package/dist/components/organisms/chat/blueprint/BlueprintCard.vue.js +20 -0
  6. package/dist/components/organisms/chat/blueprint/BlueprintCard.vue2.js +20 -0
  7. package/dist/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue.js +23 -0
  8. package/dist/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue2.js +18 -0
  9. package/dist/components/organisms/chat/chatbox/ChatboxContainer.vue.js +18 -0
  10. package/dist/components/organisms/chat/chatbox/ChatboxContainer.vue2.js +16 -0
  11. package/dist/components/organisms/chat/chatbox/ChatboxPanel.vue.js +20 -0
  12. package/dist/components/organisms/chat/chatbox/ChatboxPanel.vue2.js +19 -0
  13. package/dist/components/organisms/chat/conversation/ChatConversation.vue.js +28 -0
  14. package/dist/components/organisms/chat/conversation/ChatConversation.vue2.js +20 -0
  15. package/dist/components/organisms/chat/conversation/ChatWelcome.vue.js +18 -0
  16. package/dist/components/organisms/chat/conversation/ChatWelcome.vue2.js +11 -0
  17. package/dist/components/organisms/chat/conversation/QuickActionChips.vue.js +22 -0
  18. package/dist/components/organisms/chat/conversation/QuickActionChips.vue2.js +42 -0
  19. package/dist/components/organisms/chat/input/ChatInput.vue.js +29 -0
  20. package/dist/components/organisms/chat/input/ChatInput.vue2.js +39 -0
  21. package/dist/components/organisms/chat/input/GuidoAgentSelector.vue.js +22 -0
  22. package/dist/components/organisms/chat/input/GuidoAgentSelector.vue2.js +29 -0
  23. package/dist/components/organisms/chat/messages/AiMessage.vue.js +26 -0
  24. package/dist/components/organisms/chat/messages/AiMessage.vue2.js +41 -0
  25. package/dist/components/organisms/chat/messages/AiMessageActions.vue.js +18 -0
  26. package/dist/components/organisms/chat/messages/AiMessageActions.vue2.js +27 -0
  27. package/dist/components/organisms/chat/messages/ChatLoading.vue.js +18 -0
  28. package/dist/components/organisms/chat/messages/ChatLoading.vue2.js +30 -0
  29. package/dist/components/organisms/chat/messages/ChatMessages.vue.js +26 -0
  30. package/dist/components/organisms/chat/messages/ChatMessages.vue2.js +67 -0
  31. package/dist/components/organisms/chat/messages/UserMessage.vue.js +18 -0
  32. package/dist/components/organisms/chat/messages/UserMessage.vue2.js +26 -0
  33. package/dist/components/organisms/header/RightSlot.vue.js +8 -8
  34. package/dist/components/organisms/header/RightSlot.vue2.js +8 -9
  35. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  36. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  37. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  38. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  39. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  40. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  41. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  42. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  43. package/dist/composables/useChatState.js +130 -0
  44. package/dist/composables/useChatStreaming.js +191 -0
  45. package/dist/composables/useConversationEvents.js +37 -0
  46. package/dist/composables/useEmailTemplateApplier.js +41 -0
  47. package/dist/composables/useRibbonOffset.js +21 -0
  48. package/dist/composables/useSave.js +15 -15
  49. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  50. package/dist/enums/onboarding.js +7 -2
  51. package/dist/enums/unsubscribe.js +34 -27
  52. package/dist/guido.css +1 -1
  53. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
  54. package/dist/node_modules/@vueuse/core/index.js +127 -0
  55. package/dist/node_modules/@vueuse/shared/index.js +68 -27
  56. package/dist/node_modules/dompurify/dist/purify.es.js +595 -0
  57. package/dist/node_modules/marked/lib/marked.esm.js +1152 -0
  58. package/dist/package.json.js +1 -1
  59. package/dist/services/chatService.js +163 -0
  60. package/dist/services/templateLibraryApi.js +5 -4
  61. package/dist/src/@types/chat.d.ts +138 -0
  62. package/dist/src/@types/config/schemas.d.ts +4 -4
  63. package/dist/src/components/Guido.vue.d.ts +5 -1
  64. package/dist/src/components/organisms/chat/blueprint/BlueprintCard.vue.d.ts +38 -0
  65. package/dist/src/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue.d.ts +35 -0
  66. package/dist/src/components/organisms/chat/chatbox/ChatboxContainer.vue.d.ts +4 -0
  67. package/dist/src/components/organisms/chat/chatbox/ChatboxPanel.vue.d.ts +4 -0
  68. package/dist/src/components/organisms/chat/conversation/ChatConversation.vue.d.ts +31 -0
  69. package/dist/src/components/organisms/chat/conversation/QuickActionChips.vue.d.ts +30 -0
  70. package/dist/src/components/organisms/chat/input/ChatInput.vue.d.ts +37 -0
  71. package/dist/src/components/organisms/chat/messages/AiMessage.vue.d.ts +33 -0
  72. package/dist/src/components/organisms/chat/messages/AiMessageActions.vue.d.ts +18 -0
  73. package/dist/src/components/organisms/chat/messages/ChatLoading.vue.d.ts +32 -0
  74. package/dist/src/components/organisms/chat/messages/ChatMessages.vue.d.ts +37 -0
  75. package/dist/src/components/organisms/chat/messages/UserMessage.vue.d.ts +35 -0
  76. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  77. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  78. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  79. package/dist/src/composables/useChatState.d.ts +26 -0
  80. package/dist/src/composables/useChatStreaming.d.ts +26 -0
  81. package/dist/src/composables/useConfig.d.ts +2 -2
  82. package/dist/src/composables/useConversationEvents.d.ts +19 -0
  83. package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
  84. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  85. package/dist/src/composables/useSave.d.ts +1 -1
  86. package/dist/src/enums/onboarding.d.ts +6 -0
  87. package/dist/src/enums/unsubscribe.d.ts +5 -0
  88. package/dist/src/services/chatService.d.ts +16 -0
  89. package/dist/src/stores/chat.d.ts +323 -0
  90. package/dist/src/stores/config.d.ts +18 -18
  91. package/dist/src/stores/editor.d.ts +23 -0
  92. package/dist/src/stores/onboarding.d.ts +4 -0
  93. package/dist/src/utils/generateId.d.ts +1 -0
  94. package/dist/src/utils/markdown.d.ts +1 -0
  95. package/dist/stores/chat.js +26 -0
  96. package/dist/stores/editor.js +1 -0
  97. package/dist/stores/onboarding.js +4 -0
  98. package/dist/utils/generateId.js +7 -0
  99. package/dist/utils/markdown.js +21 -0
  100. package/dist/utils/pairProductVariables.js +89 -88
  101. package/package.json +6 -3
  102. package/dist/components/organisms/AutoSaveController.vue.js +0 -17
  103. package/dist/components/organisms/AutoSaveController.vue2.js +0 -13
  104. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  105. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  106. package/dist/composables/useAutoSave.js +0 -68
  107. package/dist/src/composables/useAutoSave.d.ts +0 -3
  108. package/dist/src/stores/autosave.d.ts +0 -6
  109. package/dist/src/utils/timeUtil.d.ts +0 -8
  110. package/dist/stores/autosave.js +0 -11
  111. package/dist/utils/timeUtil.js +0 -19
  112. /package/dist/src/components/organisms/{AutoSaveController.vue.d.ts → chat/conversation/ChatWelcome.vue.d.ts} +0 -0
  113. /package/dist/src/components/organisms/{header/AutoSaveToggle.vue.d.ts → chat/input/GuidoAgentSelector.vue.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.60.0" } }, s = {
1
+ const o = { stripo: { version: "2.62.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -0,0 +1,163 @@
1
+ var S = Object.defineProperty;
2
+ var A = (r, e, t) => e in r ? S(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var u = (r, e, t) => A(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { getCsrfToken as E } from "../utils/genericUtil.js";
5
+ const p = "/cortex-api/proxy/v1", y = "email-template-agent", h = [250, 500, 1e3], b = {
6
+ chatStream: (r) => `${p}/chat/stream/${r}`,
7
+ visibleAgents: `${p}/agents/visible`
8
+ }, g = () => {
9
+ const r = {
10
+ "Content-Type": "application/json"
11
+ };
12
+ if (typeof document < "u") {
13
+ const e = E();
14
+ e && (r["X-CSRF-TOKEN"] = e);
15
+ }
16
+ return r;
17
+ }, C = (r, e) => new Promise((t, o) => {
18
+ if (e != null && e.aborted) {
19
+ o(new DOMException("Aborted", "AbortError"));
20
+ return;
21
+ }
22
+ let a = null;
23
+ const s = () => {
24
+ a && clearTimeout(a), o(new DOMException("Aborted", "AbortError"));
25
+ };
26
+ a = setTimeout(() => {
27
+ e == null || e.removeEventListener("abort", s), t();
28
+ }, r), e == null || e.addEventListener("abort", s, { once: !0 });
29
+ }), w = (r) => {
30
+ if (!r || typeof r != "string")
31
+ return "Something went wrong. Please try again in a moment.";
32
+ const e = r.trim();
33
+ if (/<(!doctype|html|head|body|script|link|div|span|p|img|style)\b/i.test(e))
34
+ return "Unexpected server error. Please try again in a moment.";
35
+ if (e.startsWith("{"))
36
+ try {
37
+ const t = JSON.parse(e), o = t.statusCode ?? t.status;
38
+ return o === 401 || o === 403 ? "Authentication failed. Please refresh the page and try again." : o === 429 ? "Too many requests. Please wait a moment and try again." : o === 503 || o === 502 ? "AI service is temporarily unavailable. Please try again later." : typeof t.message == "string" && t.message.length < 200 ? t.message : "Something went wrong. Please try again in a moment.";
39
+ } catch {
40
+ }
41
+ return e;
42
+ }, v = async (r, e) => {
43
+ if (!r.body) {
44
+ e({ type: "error", message: "Empty response from server" });
45
+ return;
46
+ }
47
+ const t = r.body.getReader(), o = new TextDecoder();
48
+ let a = "";
49
+ try {
50
+ let s = !1;
51
+ for (; !s; ) {
52
+ const i = await t.read();
53
+ if ({ done: s } = i, s) {
54
+ if (a.trim())
55
+ try {
56
+ e(JSON.parse(a.trim()));
57
+ } catch (c) {
58
+ console.warn("[chat] dropped malformed final NDJSON line", c);
59
+ }
60
+ break;
61
+ }
62
+ a += o.decode(i.value, { stream: !0 });
63
+ const l = a.split(`
64
+ `);
65
+ a = l.pop() ?? "", l.forEach((c) => {
66
+ const n = c.trim();
67
+ if (n)
68
+ try {
69
+ e(JSON.parse(n));
70
+ } catch (d) {
71
+ console.warn("[chat] dropped malformed NDJSON line", d);
72
+ }
73
+ });
74
+ }
75
+ } finally {
76
+ t.releaseLock();
77
+ }
78
+ };
79
+ class O {
80
+ constructor() {
81
+ u(this, "conversationId", null);
82
+ u(this, "selectedAgent", null);
83
+ u(this, "abortController", null);
84
+ }
85
+ get activeAgent() {
86
+ return this.selectedAgent ?? y;
87
+ }
88
+ get defaultAgent() {
89
+ return y;
90
+ }
91
+ clearSelectedAgent() {
92
+ this.selectedAgent = null;
93
+ }
94
+ async fetchVisibleAgents() {
95
+ const e = g();
96
+ try {
97
+ const t = await fetch(b.visibleAgents, { headers: e, credentials: "include" });
98
+ return t.ok ? await t.json() : [];
99
+ } catch {
100
+ return [];
101
+ }
102
+ }
103
+ async sendMessageStream(e, t, { conversationId: o = null, gate: a, clientState: s, onEvent: i }) {
104
+ const l = b.chatStream(e), c = g(), n = { message: t };
105
+ (o ?? this.conversationId) && (n.conversationId = o ?? this.conversationId), a && (n.gate = a), s && (n.clientState = s), this.abortController = new AbortController();
106
+ let d = !1;
107
+ try {
108
+ const m = await this.openStreamWithRetry(l, c, n, i);
109
+ d = !0, await v(m, (f) => {
110
+ f.type === "done" && f.conversationId && (this.conversationId = f.conversationId), i(f);
111
+ });
112
+ } catch (m) {
113
+ if (m instanceof DOMException && m.name === "AbortError") {
114
+ i({ type: "cancelled", message: "Request cancelled by user" });
115
+ return;
116
+ }
117
+ const f = m instanceof Error ? m.message : "Failed to send message";
118
+ if (d) {
119
+ i({ type: "error", message: "Connection lost mid-response. Please retry." });
120
+ return;
121
+ }
122
+ i({ type: "error", message: w(f) });
123
+ } finally {
124
+ this.abortController = null;
125
+ }
126
+ }
127
+ async openStreamWithRetry(e, t, o, a) {
128
+ var i, l;
129
+ let s;
130
+ for (let c = 0; c <= h.length; c++)
131
+ try {
132
+ const n = await fetch(e, {
133
+ method: "POST",
134
+ headers: t,
135
+ body: JSON.stringify(o),
136
+ credentials: "include",
137
+ signal: (i = this.abortController) == null ? void 0 : i.signal
138
+ });
139
+ if (!n.ok) {
140
+ const d = await n.text();
141
+ throw new Error(w(d || `HTTP error ${n.status}`));
142
+ }
143
+ return n;
144
+ } catch (n) {
145
+ if (n instanceof DOMException && n.name === "AbortError")
146
+ throw n;
147
+ if (s = n, c >= h.length)
148
+ break;
149
+ a({ type: "status", message: `Reconnecting… (attempt ${c + 1})` }), await C(h[c], (l = this.abortController) == null ? void 0 : l.signal);
150
+ }
151
+ throw s instanceof Error ? s : new Error("Failed to open stream");
152
+ }
153
+ cancelStream() {
154
+ return this.abortController ? (this.abortController.abort(), this.abortController = null, !0) : !1;
155
+ }
156
+ newConversation() {
157
+ this.conversationId = null;
158
+ }
159
+ }
160
+ const I = new O();
161
+ export {
162
+ I as chatService
163
+ };
@@ -1,7 +1,7 @@
1
1
  import { useConfig as w } from "../composables/useConfig.js";
2
2
  import { useHttp as b } from "../composables/useHttp.js";
3
- import { useToaster as h } from "../composables/useToaster.js";
4
- import { useTranslations as C } from "../composables/useTranslations.js";
3
+ import { useToaster as C } from "../composables/useToaster.js";
4
+ import { useTranslations as h } from "../composables/useTranslations.js";
5
5
  import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
6
6
  import { EditorType as v } from "../enums/defaults.js";
7
7
  import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
@@ -9,7 +9,7 @@ import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
9
9
  import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
10
10
  import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
11
11
  const $ = () => {
12
- const { get: n, post: m } = b(), { handleError: o, showToaster: l } = h(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = C();
12
+ const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
13
13
  return {
14
14
  getCategories: async () => {
15
15
  try {
@@ -62,7 +62,8 @@ const $ = () => {
62
62
  stripoConfig: r({
63
63
  editor: "stripo",
64
64
  html: a.rawHtml,
65
- css: a.css
65
+ css: a.css,
66
+ dynamicContentList: a.dynamicContentList
66
67
  })
67
68
  }, { data: { type: T } } = await m(
68
69
  "/newsletter/template-library/create-template",
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Chat types — trimmed port of cortex-fe/src/features/chat/types.ts.
3
+ *
4
+ * Drops cortex-only domains that Guido does not surface:
5
+ * - widget_render / WidgetPayload (no analytics widgets in either v1 agent)
6
+ * - ask_user / action_request (no gates)
7
+ * - campaign_draft / segment_draft blueprint variants and their form schemas
8
+ * - PanelSection (Guido has only one panel — the chat)
9
+ * - expand / minify ViewModes (Guido panel is shrink-or-closed)
10
+ */
11
+ export type ViewMode = 'shrink' | 'closed';
12
+ export type StreamEventType = 'text' | 'status' | 'agent_start' | 'agent_end' | 'agent_handoff' | 'agent_result' | 'tool_call' | 'blueprint_create' | 'blueprint_update' | 'done' | 'error' | 'cancelled';
13
+ /**
14
+ * In Guido, blueprintType is `'email_template'` for the email-template-agent.
15
+ * Other types are not produced by liquid-agent (text only). Keep this string
16
+ * loose so future agents (e.g. brand_kit) plug in without a type bump.
17
+ */
18
+ export interface Blueprint {
19
+ id: string;
20
+ type: string;
21
+ title: string;
22
+ data: Record<string, unknown>;
23
+ version: number;
24
+ status: 'draft' | 'converted' | 'archived';
25
+ lastSavedAt?: number;
26
+ }
27
+ /**
28
+ * Kept even though Guido v1 has no gates — `chatService.sendMessageStream`
29
+ * accepts a `gate` field in its options and the type is part of that contract.
30
+ * Removing it would force a divergent service signature from cortex-fe.
31
+ */
32
+ export interface GateResponse {
33
+ toolCallId: string;
34
+ action: 'approve' | 'reject' | 'modify';
35
+ data?: Record<string, unknown>;
36
+ remember?: boolean;
37
+ }
38
+ export interface MessageSegment {
39
+ _id: string;
40
+ type: 'text' | 'tool' | 'error' | 'blueprint';
41
+ content?: string;
42
+ toolCallId?: string;
43
+ name?: string;
44
+ title?: string;
45
+ isRunning?: boolean;
46
+ error?: boolean;
47
+ startedAt?: number;
48
+ endedAt?: number;
49
+ ownerAgentId?: string | null;
50
+ blueprintId?: string;
51
+ blueprintType?: string;
52
+ blueprintData?: Record<string, unknown>;
53
+ version?: number;
54
+ status?: string;
55
+ }
56
+ export interface StreamEvent {
57
+ type: StreamEventType;
58
+ id?: string;
59
+ content?: string;
60
+ data?: unknown;
61
+ message?: string;
62
+ conversationId?: string;
63
+ toolCallId?: string;
64
+ name?: string;
65
+ success?: boolean;
66
+ parentId?: string;
67
+ fromAgent?: string;
68
+ toAgent?: string;
69
+ depth?: number;
70
+ objective?: string;
71
+ summary?: string;
72
+ blueprintId?: string;
73
+ blueprintType?: string;
74
+ title?: string;
75
+ version?: number;
76
+ status?: string;
77
+ }
78
+ export interface AgentFlowEntry {
79
+ id: string;
80
+ name: string;
81
+ success?: boolean;
82
+ startedAt?: number;
83
+ endedAt?: number;
84
+ parentId?: string | null;
85
+ description?: string;
86
+ }
87
+ export interface ToolCall {
88
+ id: string;
89
+ toolName: string;
90
+ status: 'pending' | 'running' | 'completed' | 'error';
91
+ input?: Record<string, unknown>;
92
+ output?: unknown;
93
+ }
94
+ export interface Message {
95
+ id: string;
96
+ role: 'user' | 'assistant';
97
+ content: string;
98
+ timestamp: number;
99
+ toolCalls?: ToolCall[];
100
+ isStreaming?: boolean;
101
+ segments?: MessageSegment[];
102
+ isError?: boolean;
103
+ isCancelled?: boolean;
104
+ traceId?: string | null;
105
+ currentStatus?: string;
106
+ agentFlow?: AgentFlowEntry[];
107
+ /** Which agent answered. Used to gate per-agent UI (e.g. Copy on liquid). */
108
+ agentName?: string;
109
+ }
110
+ export interface ChatState {
111
+ messages: Message[];
112
+ isLoading: boolean;
113
+ activeConversationId: string | null;
114
+ viewMode: ViewMode;
115
+ draft: string;
116
+ }
117
+ export type StreamEventCallback = (event: Record<string, unknown>) => void;
118
+ export interface ChatStreamOptions {
119
+ conversationId?: string | null;
120
+ gate?: GateResponse;
121
+ clientState?: Record<string, unknown>;
122
+ onEvent: StreamEventCallback;
123
+ }
124
+ export interface VisibleAgent {
125
+ name: string;
126
+ displayName: string | null;
127
+ displayIcon: string | null;
128
+ description: string | null;
129
+ stage: 'alpha' | 'beta' | 'prod';
130
+ }
131
+ /** Editor html/css snapshot sent to Neo as clientState.template. */
132
+ export interface ChatClientStateTemplate {
133
+ html: string;
134
+ css: string;
135
+ }
136
+ export interface ChatClientState {
137
+ template?: ChatClientStateTemplate;
138
+ }
@@ -178,8 +178,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
178
178
  readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
179
179
  /** Enable Liquid template syntax */
180
180
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
181
- /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
182
- readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
181
+ /** Enable AI assistant chat panel (cortex-style chatbot) */
182
+ readonly aiAssistant: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
183
183
  }, undefined>;
184
184
  /**
185
185
  * Default block types available in Stripo
@@ -503,8 +503,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
503
503
  readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
504
504
  /** Enable Liquid template syntax */
505
505
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
506
- /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
507
- readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
506
+ /** Enable AI assistant chat panel (cortex-style chatbot) */
507
+ readonly aiAssistant: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
508
508
  }, undefined>, {}>;
509
509
  /** Block configuration */
510
510
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -11,7 +11,9 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
11
11
  close: () => void;
12
12
  };
13
13
  hasChanges: import("vue").ComputedRef<boolean>;
14
- saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
14
+ saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata"> | undefined> | undefined;
15
+ openChatPanel: () => void;
16
+ closeChatPanel: () => void;
15
17
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
16
18
  "dynamic-content:open": (detail: {
17
19
  text: string;
@@ -29,6 +31,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
29
31
  ready: () => void;
30
32
  "onboarding:finished": () => void;
31
33
  "test-email:click": () => void;
34
+ "chat:open": () => void;
35
+ "chat:close": () => void;
32
36
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
33
37
  export default _default;
34
38
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Generic blueprint segment fallback. Used when a non-email_template blueprint
3
+ * arrives — neither v1 agent emits these, so this is forward-compat only.
4
+ */
5
+ type __VLS_Props = {
6
+ title?: string;
7
+ version?: number;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
10
+ title: string;
11
+ version: number;
12
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
13
+ click: () => void;
14
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
15
+ title: string;
16
+ version: number;
17
+ }>>>, {
18
+ title: string;
19
+ version: number;
20
+ }>;
21
+ export default _default;
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
24
+ default: D[K];
25
+ }> : P[K];
26
+ };
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToOption<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: import('vue').PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_PrettifyLocal<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
@@ -0,0 +1,35 @@
1
+ type ApplyStatus = 'pending' | 'applying' | 'applied' | 'failed';
2
+ type __VLS_Props = {
3
+ version?: number;
4
+ status?: ApplyStatus;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
7
+ version: number;
8
+ status: string;
9
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
10
+ apply: () => void;
11
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
12
+ version: number;
13
+ status: string;
14
+ }>>>, {
15
+ status: ApplyStatus;
16
+ version: number;
17
+ }>;
18
+ export default _default;
19
+ type __VLS_WithDefaults<P, D> = {
20
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
21
+ default: D[K];
22
+ }> : P[K];
23
+ };
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToOption<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
33
+ type __VLS_PrettifyLocal<T> = {
34
+ [K in keyof T]: T[K];
35
+ } & {};
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
+ close: () => void;
3
+ }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
+ close: () => void;
3
+ }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import type { Message } from '@@/Types/chat';
2
+ type __VLS_Props = {
3
+ messages: Message[];
4
+ isLoading?: boolean;
5
+ };
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ header?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
11
+ send: (message: string) => void;
12
+ stop: () => void;
13
+ retry: () => void;
14
+ "copy-message": (id: string) => void;
15
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
16
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToOption<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $scopedSlots: S;
30
+ };
31
+ };
@@ -0,0 +1,30 @@
1
+ type __VLS_Props = {
2
+ compact?: boolean;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
5
+ compact: boolean;
6
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
7
+ "chip-click": (prompt: string) => void;
8
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
9
+ compact: boolean;
10
+ }>>>, {
11
+ compact: boolean;
12
+ }>;
13
+ export default _default;
14
+ type __VLS_WithDefaults<P, D> = {
15
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
16
+ default: D[K];
17
+ }> : P[K];
18
+ };
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToOption<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ type __VLS_PrettifyLocal<T> = {
29
+ [K in keyof T]: T[K];
30
+ } & {};
@@ -0,0 +1,37 @@
1
+ type __VLS_Props = {
2
+ isLoading?: boolean;
3
+ disabled?: boolean;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
6
+ isLoading: boolean;
7
+ disabled: boolean;
8
+ }>, {
9
+ focus: () => void | undefined;
10
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
11
+ send: (message: string) => void;
12
+ stop: () => void;
13
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
14
+ isLoading: boolean;
15
+ disabled: boolean;
16
+ }>>>, {
17
+ isLoading: boolean;
18
+ disabled: boolean;
19
+ }>;
20
+ export default _default;
21
+ type __VLS_WithDefaults<P, D> = {
22
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
23
+ default: D[K];
24
+ }> : P[K];
25
+ };
26
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
+ type __VLS_TypePropsToOption<T> = {
28
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
29
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
+ } : {
31
+ type: import('vue').PropType<T[K]>;
32
+ required: true;
33
+ };
34
+ };
35
+ type __VLS_PrettifyLocal<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
@@ -0,0 +1,33 @@
1
+ import type { Message } from '@@/Types/chat';
2
+ type __VLS_Props = {
3
+ message: Message;
4
+ showFeedback?: boolean;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
7
+ showFeedback: boolean;
8
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
9
+ copy: () => void;
10
+ retry: () => void;
11
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
12
+ showFeedback: boolean;
13
+ }>>>, {
14
+ showFeedback: boolean;
15
+ }>;
16
+ export default _default;
17
+ type __VLS_WithDefaults<P, D> = {
18
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
19
+ default: D[K];
20
+ }> : P[K];
21
+ };
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToOption<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: import('vue').PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
31
+ type __VLS_PrettifyLocal<T> = {
32
+ [K in keyof T]: T[K];
33
+ } & {};
@@ -0,0 +1,18 @@
1
+ import type { Message } from '@@/Types/chat';
2
+ type __VLS_Props = {
3
+ message: Message;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
6
+ copy: () => void;
7
+ retry: () => void;
8
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToOption<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: import('vue').PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -0,0 +1,32 @@
1
+ type __VLS_Props = {
2
+ text?: string;
3
+ cycling?: boolean;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
6
+ text: string;
7
+ cycling: boolean;
8
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
9
+ text: string;
10
+ cycling: boolean;
11
+ }>>>, {
12
+ text: string;
13
+ cycling: boolean;
14
+ }>;
15
+ export default _default;
16
+ type __VLS_WithDefaults<P, D> = {
17
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
18
+ default: D[K];
19
+ }> : P[K];
20
+ };
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToOption<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_PrettifyLocal<T> = {
31
+ [K in keyof T]: T[K];
32
+ } & {};