@feedmepos/mf-remy-panel 0.21.0-dev.2 → 0.21.0-dev.3

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 m, A as o, R as p, c as n, i as u, d as A, r as C, u as R, b as l } from "./app-78f777c7.js";
2
+ import { C as m, A as o, R as p, c as n, i as u, d as A, r as C, u as R, b as l } from "./app-1e501e4f.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;
@@ -1,5 +1,6 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { ChatMessage, ChatCommand, Conversation, ChatCommandAttachmentPayload } from '@/types/chat';
3
+ import { type FeatureFeedbackRating } from '@/api/feedback';
3
4
  import type { SlashCommand } from '@/components/chatPanel/commands/types';
4
5
  type MessageFeedback = 'helpful' | 'unhelpful';
5
6
  export interface ContextSnapshot {
@@ -21,6 +22,8 @@ interface ChatStoreSetup {
21
22
  composerGeneration: Ref<number>;
22
23
  messages: Ref<ChatMessage[]>;
23
24
  isStreaming: ComputedRef<boolean>;
25
+ /** Whether `sendMessage` would send rather than return silently. */
26
+ canSendMessage: ComputedRef<boolean>;
24
27
  hasError: ComputedRef<boolean>;
25
28
  mcpPromptCommands: Ref<SlashCommand[]>;
26
29
  currentConversationId: Ref<string | null>;
@@ -36,6 +39,15 @@ interface ChatStoreSetup {
36
39
  stopStreaming: () => Promise<void>;
37
40
  clearConversation: () => void;
38
41
  updateMessageFeedback: (messageId: string, feedback: MessageFeedback) => void;
42
+ featureFeedbackPrompts: ComputedRef<{
43
+ id: string;
44
+ featureKey: string;
45
+ noOfUsage: number;
46
+ messageId: string;
47
+ label: string;
48
+ }[]>;
49
+ dismissFeatureFeedbackPrompt: (id: string) => void;
50
+ submitFeatureFeedbackPrompt: (id: string, featureKey: string, noOfUsage: number, rated: FeatureFeedbackRating, comment?: string) => Promise<void>;
39
51
  addLocalAssistantMessage: (content: string) => void;
40
52
  loadMcpPrompts: () => Promise<void>;
41
53
  loadConversations: () => Promise<void>;
@@ -48,5 +60,5 @@ interface ChatStoreSetup {
48
60
  deleteCurrentConversation: () => Promise<void>;
49
61
  lastContextSnapshot: Ref<ContextSnapshot | null>;
50
62
  }
51
- 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" | "hasError">, Pick<ChatStoreSetup, "initializeChatTransport" | "sendMessage" | "stopStreaming" | "clearConversation" | "updateMessageFeedback" | "addLocalAssistantMessage" | "loadMcpPrompts" | "loadConversations" | "loadMoreConversations" | "createNewConversation" | "createConversationAndSendMessage" | "loadConversation" | "loadMoreMessages" | "switchConversation" | "deleteCurrentConversation">>;
63
+ 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" | "canSendMessage" | "hasError" | "featureFeedbackPrompts">, Pick<ChatStoreSetup, "initializeChatTransport" | "sendMessage" | "stopStreaming" | "clearConversation" | "updateMessageFeedback" | "dismissFeatureFeedbackPrompt" | "submitFeatureFeedbackPrompt" | "addLocalAssistantMessage" | "loadMcpPrompts" | "loadConversations" | "loadMoreConversations" | "createNewConversation" | "createConversationAndSendMessage" | "loadConversation" | "loadMoreMessages" | "switchConversation" | "deleteCurrentConversation">>;
52
64
  export {};
@@ -1,7 +1,13 @@
1
1
  interface ExclusiveOperationLease {
2
2
  readonly token: symbol;
3
3
  }
4
- /** Keeps one async UI operation active and makes late cleanup harmless. */
4
+ /**
5
+ * Keeps one async UI operation active and makes late cleanup harmless.
6
+ *
7
+ * The token is a ref so `isBusy` can be read from a computed: whether a send is
8
+ * possible is a question the UI asks, and a plain field would let a card go on
9
+ * showing a button that this gate is about to refuse.
10
+ */
5
11
  export declare class ExclusiveOperation {
6
12
  private activeToken;
7
13
  get isBusy(): boolean;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Holds a card's answer that arrived while a send was already in flight.
3
+ *
4
+ * `sendMessage` refuses on three guards that do not clear together, and the panel
5
+ * used to simply drop such a press. That reads as the card being broken: a card
6
+ * disables its buttons and says what it is doing the moment it is pressed, so a
7
+ * merchant who answers a moment too early sees an answered card, no message in
8
+ * the chat, and no error. The fastest presses are on the questions whose answer
9
+ * they already knew, which is most of them.
10
+ *
11
+ * One slot, not a queue: a card's buttons are one-shot, so a second press on the
12
+ * same card cannot happen. If one ever did, the last answer is the one meant.
13
+ */
14
+ export declare class PendingPrompt {
15
+ #private;
16
+ /** The text to send now, or null when it has been held instead. */
17
+ offer(text: string, canSend: boolean): string | null;
18
+ /** The held text, once sending is possible — and only once. */
19
+ release(canSend: boolean): string | null;
20
+ /** Whether an answer is waiting for its turn. */
21
+ get isPending(): boolean;
22
+ }