@feedmepos/mf-remy-panel 0.17.0-dev.3 → 0.18.0-dev.1

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, c as m, i as n, d as u, r as C, u as l, b as A } from "./app-da81b5a0.js";
2
+ import { C as o, A as p, c as m, i as n, d as u, r as C, u as l, b as A } from "./app-b703bd4a.js";
3
3
  import "pinia";
4
4
  import "@feedmepos/mf-common";
5
5
  import "vue-router";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import type { ToolCall } from '@/types/chat';
2
+ interface Props {
3
+ toolCall: ToolCall;
4
+ }
5
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
7
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
+ type __VLS_TypePropsToRuntimeProps<T> = {
9
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
10
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
+ } : {
12
+ type: import('vue').PropType<T[K]>;
13
+ required: true;
14
+ };
15
+ };
@@ -0,0 +1,24 @@
1
+ import type { McpPromptArgument } from './types';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ args: McpPromptArgument[];
4
+ promptName: string;
5
+ modelValue: Record<string, string>;
6
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: Record<string, string>) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ args: McpPromptArgument[];
10
+ promptName: string;
11
+ modelValue: Record<string, string>;
12
+ }>>> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ export default _default;
16
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
+ type __VLS_TypePropsToRuntimeProps<T> = {
18
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
19
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
+ } : {
21
+ type: import('vue').PropType<T[K]>;
22
+ required: true;
23
+ };
24
+ };
@@ -0,0 +1,11 @@
1
+ import type { McpPromptArgument } from './types';
2
+ /**
3
+ * Names of `args` that are `required` but have no value (or only a
4
+ * blank/whitespace value) in `argValues` yet. Used by `ChatInput.vue` to
5
+ * gate sending an MCP-prompt command until its `McpPromptArgsForm.vue`
6
+ * dedicated input fields are all filled in — unlike remy-cli, which fills
7
+ * declared args positionally from free text typed after `/promptName`,
8
+ * mf-remy-panel collects them via one labeled field per argument (see
9
+ * `McpPromptArgsForm.vue`), so there's no text to parse here anymore.
10
+ */
11
+ export declare function getMissingRequiredMcpPromptArgs(args: McpPromptArgument[], argValues: Record<string, string>): string[];
@@ -14,8 +14,20 @@ export interface ChatCommandAttachment<TModel = unknown> {
14
14
  initialModel: TModel | (() => TModel);
15
15
  required?: boolean;
16
16
  }
17
+ /** One declared argument of a real MCP prompt (standard `prompts/list`),
18
+ * mirrors remy-cli's `McpPromptArgument` (`packages/remy-cli/src/
19
+ * mcp-prompts.ts`). */
20
+ export interface McpPromptArgument {
21
+ name: string;
22
+ description?: string;
23
+ required?: boolean;
24
+ }
17
25
  export interface SlashCommand {
18
- command: ChatCommand;
26
+ /** `ChatCommand` for the static, hardcoded registry below; an arbitrary
27
+ * MCP prompt name (e.g. "showWeatherCard") for commands sourced from
28
+ * `chatStore.mcpPromptCommands` — loosened to `string` since MCP prompt
29
+ * names aren't part of the fixed `ChatCommand` union. */
30
+ command: ChatCommand | string;
19
31
  name: string;
20
32
  description: string;
21
33
  aliases?: string[];
@@ -27,4 +39,16 @@ export interface SlashCommand {
27
39
  actionComponent?: Component;
28
40
  /** Initial model used by the optional command-specific input UI. */
29
41
  initialInput?: () => CommandInputModel;
42
+ /**
43
+ * Set ONLY for commands sourced from a live MCP server's `prompts/list`
44
+ * (see `@/api/mcpPrompts.ts` + `chatStore.ts`'s `loadMcpPrompts`) rather
45
+ * than the static registry above. When present, `ChatInput.vue` resolves
46
+ * the prompt server-side (`prompts/get`) at send time and submits the
47
+ * result as an ordinary free-text message — NOT routed as a fixed
48
+ * `ChatCommand` like the rest of this registry.
49
+ */
50
+ mcpPrompt?: {
51
+ serverPromptName: string;
52
+ args: McpPromptArgument[];
53
+ };
30
54
  }
@@ -1,4 +1,6 @@
1
+ import type { ComputedRef, Ref } from 'vue';
1
2
  import type { ChatMessage, ChatCommand, Conversation, ChatCommandAttachmentPayload } from '@/types/chat';
3
+ import type { SlashCommand } from '@/components/chatPanel/commands/types';
2
4
  type MessageFeedback = 'helpful' | 'unhelpful';
3
5
  export interface ContextSnapshot {
4
6
  factsCount: number;
@@ -9,80 +11,30 @@ export interface ContextSnapshot {
9
11
  toolsUsed: string[];
10
12
  inputTokens: number;
11
13
  }
12
- export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<{
13
- inputText: import("vue").Ref<string, string>;
14
- pendingCommand: import("vue").Ref<ChatCommand | null, ChatCommand | null>;
15
- pendingImages: import("vue").Ref<string[], string[]>;
16
- pendingAttachments: import("vue").Ref<{
17
- key: string;
18
- value: unknown;
19
- }[] | null, ChatCommandAttachmentPayload[] | {
20
- key: string;
21
- value: unknown;
22
- }[] | null>;
23
- messages: import("vue").Ref<{
24
- id: string;
25
- role: "user" | "assistant";
26
- content: string;
27
- command?: ChatCommand | undefined;
28
- timestamp: number;
29
- imageData?: string | undefined;
30
- imageDatas?: string[] | undefined;
31
- feedback?: "helpful" | "unhelpful" | undefined;
32
- isStreaming?: boolean | undefined;
33
- toolCalls?: {
34
- id: string;
35
- name: string;
36
- arguments: any;
37
- state?: string | undefined;
38
- result?: any;
39
- }[] | undefined;
40
- retrievedFacts?: string | undefined;
41
- }[], ChatMessage[] | {
42
- id: string;
43
- role: "user" | "assistant";
44
- content: string;
45
- command?: ChatCommand | undefined;
46
- timestamp: number;
47
- imageData?: string | undefined;
48
- imageDatas?: string[] | undefined;
49
- feedback?: "helpful" | "unhelpful" | undefined;
50
- isStreaming?: boolean | undefined;
51
- toolCalls?: {
52
- id: string;
53
- name: string;
54
- arguments: any;
55
- state?: string | undefined;
56
- result?: any;
57
- }[] | undefined;
58
- retrievedFacts?: string | undefined;
59
- }[]>;
60
- isStreaming: import("vue").ComputedRef<boolean>;
61
- currentConversationId: import("vue").Ref<string | null, string | null>;
62
- conversations: import("vue").Ref<{
63
- id: string;
64
- title: string;
65
- createdAt: number;
66
- lastMessageAt: number;
67
- messageCount?: number | undefined;
68
- }[], Conversation[] | {
69
- id: string;
70
- title: string;
71
- createdAt: number;
72
- lastMessageAt: number;
73
- messageCount?: number | undefined;
74
- }[]>;
75
- isLoadingConversation: import("vue").Ref<boolean, boolean>;
76
- isLoadingConversations: import("vue").Ref<boolean, boolean>;
77
- isLoadingMoreConversations: import("vue").Ref<boolean, boolean>;
78
- hasMoreConversations: import("vue").Ref<boolean, boolean>;
79
- isLoadingMoreMessages: import("vue").Ref<boolean, boolean>;
80
- hasMoreMessages: import("vue").Ref<boolean, boolean>;
14
+ interface ChatStoreSetup {
15
+ inputText: Ref<string>;
16
+ pendingCommand: Ref<ChatCommand | null>;
17
+ pendingImages: Ref<string[]>;
18
+ pendingAttachments: Ref<ChatCommandAttachmentPayload[] | null>;
19
+ composerGeneration: Ref<number>;
20
+ messages: Ref<ChatMessage[]>;
21
+ isStreaming: ComputedRef<boolean>;
22
+ mcpPromptCommands: Ref<SlashCommand[]>;
23
+ currentConversationId: Ref<string | null>;
24
+ conversations: Ref<Conversation[]>;
25
+ isLoadingConversation: Ref<boolean>;
26
+ isLoadingConversations: Ref<boolean>;
27
+ isLoadingMoreConversations: Ref<boolean>;
28
+ hasMoreConversations: Ref<boolean>;
29
+ isLoadingMoreMessages: Ref<boolean>;
30
+ hasMoreMessages: Ref<boolean>;
81
31
  initializeChatTransport: () => Promise<void>;
82
32
  sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
83
33
  stopStreaming: () => Promise<void>;
84
34
  clearConversation: () => void;
85
35
  updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
36
+ addLocalAssistantMessage: (content: string) => void;
37
+ loadMcpPrompts: () => Promise<void>;
86
38
  loadConversations: () => Promise<void>;
87
39
  loadMoreConversations: () => Promise<void>;
88
40
  createNewConversation: () => Promise<void>;
@@ -91,220 +43,7 @@ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<
91
43
  loadMoreMessages: () => Promise<void>;
92
44
  switchConversation: (conversationId: string | null) => Promise<void>;
93
45
  deleteCurrentConversation: () => Promise<void>;
94
- lastContextSnapshot: import("vue").Ref<{
95
- factsCount: number;
96
- memoryLoaded: boolean;
97
- memoryFactsCount: number;
98
- skillLoaded: boolean;
99
- skillNames: string[];
100
- toolsUsed: string[];
101
- inputTokens: number;
102
- } | null, ContextSnapshot | {
103
- factsCount: number;
104
- memoryLoaded: boolean;
105
- memoryFactsCount: number;
106
- skillLoaded: boolean;
107
- skillNames: string[];
108
- toolsUsed: string[];
109
- inputTokens: number;
110
- } | null>;
111
- }, "messages" | "inputText" | "pendingCommand" | "pendingImages" | "pendingAttachments" | "currentConversationId" | "conversations" | "isLoadingConversation" | "isLoadingConversations" | "isLoadingMoreConversations" | "hasMoreConversations" | "isLoadingMoreMessages" | "hasMoreMessages" | "lastContextSnapshot">, Pick<{
112
- inputText: import("vue").Ref<string, string>;
113
- pendingCommand: import("vue").Ref<ChatCommand | null, ChatCommand | null>;
114
- pendingImages: import("vue").Ref<string[], string[]>;
115
- pendingAttachments: import("vue").Ref<{
116
- key: string;
117
- value: unknown;
118
- }[] | null, ChatCommandAttachmentPayload[] | {
119
- key: string;
120
- value: unknown;
121
- }[] | null>;
122
- messages: import("vue").Ref<{
123
- id: string;
124
- role: "user" | "assistant";
125
- content: string;
126
- command?: ChatCommand | undefined;
127
- timestamp: number;
128
- imageData?: string | undefined;
129
- imageDatas?: string[] | undefined;
130
- feedback?: "helpful" | "unhelpful" | undefined;
131
- isStreaming?: boolean | undefined;
132
- toolCalls?: {
133
- id: string;
134
- name: string;
135
- arguments: any;
136
- state?: string | undefined;
137
- result?: any;
138
- }[] | undefined;
139
- retrievedFacts?: string | undefined;
140
- }[], ChatMessage[] | {
141
- id: string;
142
- role: "user" | "assistant";
143
- content: string;
144
- command?: ChatCommand | undefined;
145
- timestamp: number;
146
- imageData?: string | undefined;
147
- imageDatas?: string[] | undefined;
148
- feedback?: "helpful" | "unhelpful" | undefined;
149
- isStreaming?: boolean | undefined;
150
- toolCalls?: {
151
- id: string;
152
- name: string;
153
- arguments: any;
154
- state?: string | undefined;
155
- result?: any;
156
- }[] | undefined;
157
- retrievedFacts?: string | undefined;
158
- }[]>;
159
- isStreaming: import("vue").ComputedRef<boolean>;
160
- currentConversationId: import("vue").Ref<string | null, string | null>;
161
- conversations: import("vue").Ref<{
162
- id: string;
163
- title: string;
164
- createdAt: number;
165
- lastMessageAt: number;
166
- messageCount?: number | undefined;
167
- }[], Conversation[] | {
168
- id: string;
169
- title: string;
170
- createdAt: number;
171
- lastMessageAt: number;
172
- messageCount?: number | undefined;
173
- }[]>;
174
- isLoadingConversation: import("vue").Ref<boolean, boolean>;
175
- isLoadingConversations: import("vue").Ref<boolean, boolean>;
176
- isLoadingMoreConversations: import("vue").Ref<boolean, boolean>;
177
- hasMoreConversations: import("vue").Ref<boolean, boolean>;
178
- isLoadingMoreMessages: import("vue").Ref<boolean, boolean>;
179
- hasMoreMessages: import("vue").Ref<boolean, boolean>;
180
- initializeChatTransport: () => Promise<void>;
181
- sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
182
- stopStreaming: () => Promise<void>;
183
- clearConversation: () => void;
184
- updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
185
- loadConversations: () => Promise<void>;
186
- loadMoreConversations: () => Promise<void>;
187
- createNewConversation: () => Promise<void>;
188
- createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
189
- loadConversation: (conversationId: string) => Promise<void>;
190
- loadMoreMessages: () => Promise<void>;
191
- switchConversation: (conversationId: string | null) => Promise<void>;
192
- deleteCurrentConversation: () => Promise<void>;
193
- lastContextSnapshot: import("vue").Ref<{
194
- factsCount: number;
195
- memoryLoaded: boolean;
196
- memoryFactsCount: number;
197
- skillLoaded: boolean;
198
- skillNames: string[];
199
- toolsUsed: string[];
200
- inputTokens: number;
201
- } | null, ContextSnapshot | {
202
- factsCount: number;
203
- memoryLoaded: boolean;
204
- memoryFactsCount: number;
205
- skillLoaded: boolean;
206
- skillNames: string[];
207
- toolsUsed: string[];
208
- inputTokens: number;
209
- } | null>;
210
- }, "isStreaming">, Pick<{
211
- inputText: import("vue").Ref<string, string>;
212
- pendingCommand: import("vue").Ref<ChatCommand | null, ChatCommand | null>;
213
- pendingImages: import("vue").Ref<string[], string[]>;
214
- pendingAttachments: import("vue").Ref<{
215
- key: string;
216
- value: unknown;
217
- }[] | null, ChatCommandAttachmentPayload[] | {
218
- key: string;
219
- value: unknown;
220
- }[] | null>;
221
- messages: import("vue").Ref<{
222
- id: string;
223
- role: "user" | "assistant";
224
- content: string;
225
- command?: ChatCommand | undefined;
226
- timestamp: number;
227
- imageData?: string | undefined;
228
- imageDatas?: string[] | undefined;
229
- feedback?: "helpful" | "unhelpful" | undefined;
230
- isStreaming?: boolean | undefined;
231
- toolCalls?: {
232
- id: string;
233
- name: string;
234
- arguments: any;
235
- state?: string | undefined;
236
- result?: any;
237
- }[] | undefined;
238
- retrievedFacts?: string | undefined;
239
- }[], ChatMessage[] | {
240
- id: string;
241
- role: "user" | "assistant";
242
- content: string;
243
- command?: ChatCommand | undefined;
244
- timestamp: number;
245
- imageData?: string | undefined;
246
- imageDatas?: string[] | undefined;
247
- feedback?: "helpful" | "unhelpful" | undefined;
248
- isStreaming?: boolean | undefined;
249
- toolCalls?: {
250
- id: string;
251
- name: string;
252
- arguments: any;
253
- state?: string | undefined;
254
- result?: any;
255
- }[] | undefined;
256
- retrievedFacts?: string | undefined;
257
- }[]>;
258
- isStreaming: import("vue").ComputedRef<boolean>;
259
- currentConversationId: import("vue").Ref<string | null, string | null>;
260
- conversations: import("vue").Ref<{
261
- id: string;
262
- title: string;
263
- createdAt: number;
264
- lastMessageAt: number;
265
- messageCount?: number | undefined;
266
- }[], Conversation[] | {
267
- id: string;
268
- title: string;
269
- createdAt: number;
270
- lastMessageAt: number;
271
- messageCount?: number | undefined;
272
- }[]>;
273
- isLoadingConversation: import("vue").Ref<boolean, boolean>;
274
- isLoadingConversations: import("vue").Ref<boolean, boolean>;
275
- isLoadingMoreConversations: import("vue").Ref<boolean, boolean>;
276
- hasMoreConversations: import("vue").Ref<boolean, boolean>;
277
- isLoadingMoreMessages: import("vue").Ref<boolean, boolean>;
278
- hasMoreMessages: import("vue").Ref<boolean, boolean>;
279
- initializeChatTransport: () => Promise<void>;
280
- sendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
281
- stopStreaming: () => Promise<void>;
282
- clearConversation: () => void;
283
- updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
284
- loadConversations: () => Promise<void>;
285
- loadMoreConversations: () => Promise<void>;
286
- createNewConversation: () => Promise<void>;
287
- createConversationAndSendMessage: (prompt: string, imageUrls?: string[], command?: ChatCommand, attachments?: ChatCommandAttachmentPayload[]) => Promise<void>;
288
- loadConversation: (conversationId: string) => Promise<void>;
289
- loadMoreMessages: () => Promise<void>;
290
- switchConversation: (conversationId: string | null) => Promise<void>;
291
- deleteCurrentConversation: () => Promise<void>;
292
- lastContextSnapshot: import("vue").Ref<{
293
- factsCount: number;
294
- memoryLoaded: boolean;
295
- memoryFactsCount: number;
296
- skillLoaded: boolean;
297
- skillNames: string[];
298
- toolsUsed: string[];
299
- inputTokens: number;
300
- } | null, ContextSnapshot | {
301
- factsCount: number;
302
- memoryLoaded: boolean;
303
- memoryFactsCount: number;
304
- skillLoaded: boolean;
305
- skillNames: string[];
306
- toolsUsed: string[];
307
- inputTokens: number;
308
- } | null>;
309
- }, "sendMessage" | "initializeChatTransport" | "stopStreaming" | "clearConversation" | "updateMessageFeedback" | "loadConversations" | "loadMoreConversations" | "createNewConversation" | "createConversationAndSendMessage" | "loadConversation" | "loadMoreMessages" | "switchConversation" | "deleteCurrentConversation">>;
46
+ lastContextSnapshot: Ref<ContextSnapshot | null>;
47
+ }
48
+ export declare const useChatStore: import("pinia").StoreDefinition<"chat", Pick<ChatStoreSetup, "inputText" | "pendingCommand" | "pendingImages" | "pendingAttachments" | "composerGeneration" | "messages" | "mcpPromptCommands" | "currentConversationId" | "conversations" | "isLoadingConversation" | "isLoadingConversations" | "isLoadingMoreConversations" | "hasMoreConversations" | "isLoadingMoreMessages" | "hasMoreMessages" | "lastContextSnapshot">, Pick<ChatStoreSetup, "isStreaming">, Pick<ChatStoreSetup, "initializeChatTransport" | "sendMessage" | "stopStreaming" | "clearConversation" | "updateMessageFeedback" | "addLocalAssistantMessage" | "loadMcpPrompts" | "loadConversations" | "loadMoreConversations" | "createNewConversation" | "createConversationAndSendMessage" | "loadConversation" | "loadMoreMessages" | "switchConversation" | "deleteCurrentConversation">>;
310
49
  export {};
@@ -0,0 +1,13 @@
1
+ interface ExclusiveOperationLease {
2
+ readonly token: symbol;
3
+ }
4
+ /** Keeps one async UI operation active and makes late cleanup harmless. */
5
+ export declare class ExclusiveOperation {
6
+ private activeToken;
7
+ get isBusy(): boolean;
8
+ tryAcquire(): ExclusiveOperationLease | null;
9
+ isActive(lease: ExclusiveOperationLease): boolean;
10
+ release(lease: ExclusiveOperationLease): void;
11
+ invalidate(): void;
12
+ }
13
+ export {};