@feedmepos/mf-remy-panel 0.14.0 → 0.15.0-dev.2

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/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { C as o, A as p, b as m, i as n, c as u, r as C, u as l, a as A } from "./app-d511549f.js";
2
+ import { C as o, A as p, b as m, i as n, c as u, r as C, u as l, a as A } from "./app-03255a85.js";
3
3
  import "pinia";
4
4
  import "@feedmepos/mf-common";
5
5
  import "vue-router";
@@ -0,0 +1,19 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ model: string;
3
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:model": (value: string) => void;
5
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ model: string;
7
+ }>>> & Readonly<{
8
+ "onUpdate:model"?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
@@ -0,0 +1,84 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ show: boolean;
3
+ title: string;
4
+ subtitle?: string | undefined;
5
+ search: string;
6
+ searchPlaceholder?: string | undefined;
7
+ isLoading?: boolean | undefined;
8
+ loadingMessage?: string | undefined;
9
+ error?: string | null | undefined;
10
+ isEmpty?: boolean | undefined;
11
+ emptyMessage?: string | undefined;
12
+ maxWidth?: string | undefined;
13
+ }>, {
14
+ subtitle: string;
15
+ searchPlaceholder: string;
16
+ isLoading: boolean;
17
+ loadingMessage: string;
18
+ error: null;
19
+ isEmpty: boolean;
20
+ emptyMessage: string;
21
+ maxWidth: string;
22
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
+ "update:show": (value: boolean) => void;
24
+ "update:search": (value: string) => void;
25
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
26
+ show: boolean;
27
+ title: string;
28
+ subtitle?: string | undefined;
29
+ search: string;
30
+ searchPlaceholder?: string | undefined;
31
+ isLoading?: boolean | undefined;
32
+ loadingMessage?: string | undefined;
33
+ error?: string | null | undefined;
34
+ isEmpty?: boolean | undefined;
35
+ emptyMessage?: string | undefined;
36
+ maxWidth?: string | undefined;
37
+ }>, {
38
+ subtitle: string;
39
+ searchPlaceholder: string;
40
+ isLoading: boolean;
41
+ loadingMessage: string;
42
+ error: null;
43
+ isEmpty: boolean;
44
+ emptyMessage: string;
45
+ maxWidth: string;
46
+ }>>> & Readonly<{
47
+ "onUpdate:show"?: ((value: boolean) => any) | undefined;
48
+ "onUpdate:search"?: ((value: string) => any) | undefined;
49
+ }>, {
50
+ error: string | null;
51
+ subtitle: string;
52
+ maxWidth: string;
53
+ searchPlaceholder: string;
54
+ isLoading: boolean;
55
+ loadingMessage: string;
56
+ isEmpty: boolean;
57
+ emptyMessage: string;
58
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
59
+ empty?(_: {}): any;
60
+ default?(_: {}): any;
61
+ }>;
62
+ export default _default;
63
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
64
+ type __VLS_TypePropsToRuntimeProps<T> = {
65
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
66
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
67
+ } : {
68
+ type: import('vue').PropType<T[K]>;
69
+ required: true;
70
+ };
71
+ };
72
+ type __VLS_WithDefaults<P, D> = {
73
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
74
+ default: D[K];
75
+ }> : P[K];
76
+ };
77
+ type __VLS_Prettify<T> = {
78
+ [K in keyof T]: T[K];
79
+ } & {};
80
+ type __VLS_WithTemplateSlots<T, S> = T & {
81
+ new (): {
82
+ $slots: S;
83
+ };
84
+ };
@@ -0,0 +1,20 @@
1
+ import { type MarketingCampaignOption } from '@/api/marketing';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ model: MarketingCampaignOption | null;
4
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:model": (value: MarketingCampaignOption | null) => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ model: MarketingCampaignOption | null;
8
+ }>>> & Readonly<{
9
+ "onUpdate:model"?: ((value: MarketingCampaignOption | null) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,20 @@
1
+ import { type MarketingMaterialOption } from '@/api/marketing';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ model: MarketingMaterialOption | null;
4
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:model": (value: MarketingMaterialOption | null) => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ model: MarketingMaterialOption | null;
8
+ }>>> & Readonly<{
9
+ "onUpdate:model"?: ((value: MarketingMaterialOption | null) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,20 @@
1
+ import { type MarketingProductAttachment } from '@/api/marketing';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ model: MarketingProductAttachment[];
4
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:model": (value: MarketingProductAttachment[]) => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ model: MarketingProductAttachment[];
8
+ }>>> & Readonly<{
9
+ "onUpdate:model"?: ((value: MarketingProductAttachment[]) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,2 @@
1
+ import type { SlashCommand } from './types';
2
+ export declare const slashCommands: SlashCommand[];
@@ -0,0 +1,30 @@
1
+ import type { Component } from 'vue';
2
+ import type { ChatCommand } from '@/types/chat';
3
+ export interface CommandInputModel {
4
+ /** Prompt text that will be sent as the user message. */
5
+ prompt: string;
6
+ /** Structured command-specific data forwarded to the backend. */
7
+ params: Record<string, unknown> | null;
8
+ /** Whether the selected command UI has enough information to submit. */
9
+ canSubmit?: boolean;
10
+ }
11
+ export interface ChatCommandAttachment<TModel = unknown> {
12
+ key: string;
13
+ component: Component;
14
+ initialModel: TModel | (() => TModel);
15
+ required?: boolean;
16
+ }
17
+ export interface SlashCommand {
18
+ command: ChatCommand;
19
+ name: string;
20
+ description: string;
21
+ aliases?: string[];
22
+ forceFullscreen?: boolean;
23
+ attachments?: ChatCommandAttachment[];
24
+ /** Optional pre-submit UI shown after selecting this command. */
25
+ inputComponent?: Component;
26
+ /** Optional compact UI shown in the composer action bar for this command. */
27
+ actionComponent?: Component;
28
+ /** Initial model used by the optional command-specific input UI. */
29
+ initialInput?: () => CommandInputModel;
30
+ }
@@ -0,0 +1,19 @@
1
+ import { type Ref } from 'vue';
2
+ /**
3
+ * Invokes a callback when a click occurs outside the target element.
4
+ *
5
+ * Use this to close dropdowns, modals, or menus when the user clicks outside.
6
+ *
7
+ * @param target - A ref to the DOM element to monitor
8
+ * @param callback - Function called when a click occurs outside the target
9
+ * @param isActive - Optional ref that controls whether the listener is active
10
+ *
11
+ * @example
12
+ * const containerRef = ref<HTMLElement | null>(null)
13
+ * const isOpen = ref(false)
14
+ *
15
+ * useClickOutside(containerRef, () => {
16
+ * isOpen.value = false
17
+ * }, isOpen)
18
+ */
19
+ export declare function useClickOutside(target: Ref<HTMLElement | null>, callback: () => void, isActive?: Ref<boolean>): void;
@@ -1,4 +1,4 @@
1
- import type { ChatCommand } from '../types/chat';
1
+ import type { ChatCommand, ChatCommandAttachmentPayload } from '../types/chat';
2
2
  import { type TokenBalance } from '../api/token';
3
3
  interface ActivateOptions {
4
4
  prompt?: string;
@@ -10,10 +10,12 @@ interface ActivateOptions {
10
10
  imageData?: string;
11
11
  /** Multiple base64 data URLs to pre-fill as image attachments in the chat input. */
12
12
  images?: string[];
13
- /** Extra parameters forwarded to the agent (e.g. { campaign: selectedCampaign }). */
14
- params?: Record<string, unknown>;
13
+ /** Command-specific attachments forwarded to the agent. */
14
+ attachments?: ChatCommandAttachmentPayload[];
15
15
  /** When true, the panel opens in full-screen (100vw × 100vh) mode. */
16
16
  fullscreen?: boolean;
17
+ /** When true, immediately creates and opens a fresh conversation, discarding any active session. */
18
+ forceNewConversation?: boolean;
17
19
  }
18
20
  export declare const useAppStore: import("pinia").StoreDefinition<"app", Pick<{
19
21
  showRemy: import("vue").Ref<boolean, boolean>;
@@ -1,4 +1,4 @@
1
- import type { ChatMessage, ChatCommand, Conversation } from '@/types/chat';
1
+ import type { ChatMessage, ChatCommand, Conversation, ChatCommandAttachmentPayload } from '@/types/chat';
2
2
  type MessageFeedback = 'helpful' | 'unhelpful';
3
3
  export interface ContextSnapshot {
4
4
  factsCount: number;
@@ -12,7 +12,13 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
12
12
  inputText: import("vue").Ref<string, string>;
13
13
  pendingCommand: import("vue").Ref<ChatCommand | null, ChatCommand | null>;
14
14
  pendingImages: import("vue").Ref<string[], string[]>;
15
- pendingParams: import("vue").Ref<Record<string, unknown> | null, Record<string, unknown> | null>;
15
+ pendingAttachments: import("vue").Ref<{
16
+ key: string;
17
+ value: unknown;
18
+ }[] | null, ChatCommandAttachmentPayload[] | {
19
+ key: string;
20
+ value: unknown;
21
+ }[] | null>;
16
22
  messages: import("vue").Ref<{
17
23
  id: string;
18
24
  role: "user" | "assistant";
@@ -72,14 +78,14 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
72
78
  isLoadingMoreMessages: import("vue").Ref<boolean, boolean>;
73
79
  hasMoreMessages: import("vue").Ref<boolean, boolean>;
74
80
  initializeChatTransport: () => Promise<void>;
75
- sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand) => Promise<void>;
81
+ sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
76
82
  stopStreaming: () => Promise<void>;
77
83
  clearConversation: () => void;
78
84
  updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
79
85
  loadConversations: () => Promise<void>;
80
86
  loadMoreConversations: () => Promise<void>;
81
87
  createNewConversation: () => Promise<void>;
82
- createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand) => Promise<void>;
88
+ createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
83
89
  loadConversation: (conversationId: string) => Promise<void>;
84
90
  loadMoreMessages: () => Promise<void>;
85
91
  switchConversation: (conversationId: string | null) => Promise<void>;
@@ -99,11 +105,17 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
99
105
  toolsUsed: string[];
100
106
  inputTokens: number;
101
107
  } | null>;
102
- }, "inputText" | "pendingCommand" | "pendingImages" | "pendingParams" | "messages" | "currentConversationId" | "conversations" | "isLoadingConversation" | "isLoadingConversations" | "isLoadingMoreConversations" | "hasMoreConversations" | "isLoadingMoreMessages" | "hasMoreMessages" | "lastContextSnapshot">, Pick<{
108
+ }, "inputText" | "pendingCommand" | "pendingImages" | "pendingAttachments" | "messages" | "currentConversationId" | "conversations" | "isLoadingConversation" | "isLoadingConversations" | "isLoadingMoreConversations" | "hasMoreConversations" | "isLoadingMoreMessages" | "hasMoreMessages" | "lastContextSnapshot">, Pick<{
103
109
  inputText: import("vue").Ref<string, string>;
104
110
  pendingCommand: import("vue").Ref<ChatCommand | null, ChatCommand | null>;
105
111
  pendingImages: import("vue").Ref<string[], string[]>;
106
- pendingParams: import("vue").Ref<Record<string, unknown> | null, Record<string, unknown> | null>;
112
+ pendingAttachments: import("vue").Ref<{
113
+ key: string;
114
+ value: unknown;
115
+ }[] | null, ChatCommandAttachmentPayload[] | {
116
+ key: string;
117
+ value: unknown;
118
+ }[] | null>;
107
119
  messages: import("vue").Ref<{
108
120
  id: string;
109
121
  role: "user" | "assistant";
@@ -163,14 +175,14 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
163
175
  isLoadingMoreMessages: import("vue").Ref<boolean, boolean>;
164
176
  hasMoreMessages: import("vue").Ref<boolean, boolean>;
165
177
  initializeChatTransport: () => Promise<void>;
166
- sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand) => Promise<void>;
178
+ sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
167
179
  stopStreaming: () => Promise<void>;
168
180
  clearConversation: () => void;
169
181
  updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
170
182
  loadConversations: () => Promise<void>;
171
183
  loadMoreConversations: () => Promise<void>;
172
184
  createNewConversation: () => Promise<void>;
173
- createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand) => Promise<void>;
185
+ createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
174
186
  loadConversation: (conversationId: string) => Promise<void>;
175
187
  loadMoreMessages: () => Promise<void>;
176
188
  switchConversation: (conversationId: string | null) => Promise<void>;
@@ -194,7 +206,13 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
194
206
  inputText: import("vue").Ref<string, string>;
195
207
  pendingCommand: import("vue").Ref<ChatCommand | null, ChatCommand | null>;
196
208
  pendingImages: import("vue").Ref<string[], string[]>;
197
- pendingParams: import("vue").Ref<Record<string, unknown> | null, Record<string, unknown> | null>;
209
+ pendingAttachments: import("vue").Ref<{
210
+ key: string;
211
+ value: unknown;
212
+ }[] | null, ChatCommandAttachmentPayload[] | {
213
+ key: string;
214
+ value: unknown;
215
+ }[] | null>;
198
216
  messages: import("vue").Ref<{
199
217
  id: string;
200
218
  role: "user" | "assistant";
@@ -254,14 +272,14 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
254
272
  isLoadingMoreMessages: import("vue").Ref<boolean, boolean>;
255
273
  hasMoreMessages: import("vue").Ref<boolean, boolean>;
256
274
  initializeChatTransport: () => Promise<void>;
257
- sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand) => Promise<void>;
275
+ sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
258
276
  stopStreaming: () => Promise<void>;
259
277
  clearConversation: () => void;
260
278
  updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
261
279
  loadConversations: () => Promise<void>;
262
280
  loadMoreConversations: () => Promise<void>;
263
281
  createNewConversation: () => Promise<void>;
264
- createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand) => Promise<void>;
282
+ createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
265
283
  loadConversation: (conversationId: string) => Promise<void>;
266
284
  loadMoreMessages: () => Promise<void>;
267
285
  switchConversation: (conversationId: string | null) => Promise<void>;