@feedmepos/mf-remy-panel 0.21.0-dev.1 → 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/{HomeView-7038830e.js → HomeView-296285bd.js} +1 -1
- package/dist/{RemyButton-54f7640c.js → RemyButton-ac507d8c.js} +1 -1
- package/dist/api/contextualSuggestions.d.ts +20 -0
- package/dist/api/feedback.d.ts +7 -0
- package/dist/{app-32e89eb4.js → app-1e501e4f.js} +15421 -15545
- package/dist/app.d.ts +1 -0
- package/dist/app.js +1 -1
- package/dist/bootstrap/remy.d.ts +4 -1
- package/dist/components/chatPanel/FeedbackBar.vue.d.ts +2 -0
- package/dist/components/chatPanel/contextualStart.d.ts +10 -96
- package/dist/context/navigationContext.d.ts +13 -0
- package/dist/stores/chatStore.d.ts +13 -1
- package/dist/stores/exclusiveOperation.d.ts +7 -1
- package/dist/stores/pendingPrompt.d.ts +22 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { ChatMessage, ToolCall } from './types/chat';
|
|
2
2
|
export type { PageContextProvider, PageContextScalar, PageContextStateValue, PortalPageContext } from './context/pageContext';
|
|
3
|
+
export type { NavigationContextProvider, PortalNavigationContext, PortalNavigationItem } from './context/navigationContext';
|
|
3
4
|
export type { RemyChatOptions } from './bootstrap/remy';
|
|
4
5
|
export { useAppStore } from './stores/appStore';
|
|
5
6
|
export { useClientEvent } from './composables/useClientEvent';
|
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-
|
|
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";
|
package/dist/bootstrap/remy.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type PageContextProvider } from '@/context/pageContext';
|
|
2
|
+
import { type NavigationContextProvider } from '@/context/navigationContext';
|
|
2
3
|
export type RemyChatOptions = {
|
|
3
4
|
backendUrl?: string;
|
|
4
5
|
licenseApiUrl?: string;
|
|
5
6
|
/** Optional host adapter for selected tabs, entities or filters. Read once per send. */
|
|
6
7
|
getPageContext?: PageContextProvider;
|
|
8
|
+
/** Optional host adapter for the module navigation currently available to this user. */
|
|
9
|
+
getNavigationContext?: NavigationContextProvider;
|
|
7
10
|
};
|
|
8
11
|
export declare function initializeRemyChat(options?: RemyChatOptions): Promise<void>;
|
|
9
|
-
export declare function initializeRemyChat(backendUrl?: string, licenseApiUrl?: string): Promise<void>;
|
|
12
|
+
export declare function initializeRemyChat(backendUrl?: string, licenseApiUrl?: string, getNavigationContext?: NavigationContextProvider): Promise<void>;
|
|
@@ -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,105 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MemoryScope } from '@/api/memory';
|
|
2
2
|
import type { PortalPageContext } from '@/context/pageContext';
|
|
3
|
-
import type { Conversation } from '@/types/chat';
|
|
4
3
|
export interface ContextualSuggestion {
|
|
5
4
|
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
detail: string;
|
|
8
5
|
prompt: string;
|
|
9
|
-
source: '
|
|
6
|
+
source: 'fallback' | 'generated';
|
|
10
7
|
}
|
|
11
8
|
export interface ContextualStart {
|
|
12
9
|
workspaceLabel: string;
|
|
13
|
-
workspaceDetail: string;
|
|
14
10
|
memoryScope: MemoryScope;
|
|
15
|
-
suggestions: [
|
|
11
|
+
suggestions: ContextualSuggestion[];
|
|
12
|
+
}
|
|
13
|
+
export interface WorkspaceChoice {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
path?: string;
|
|
16
17
|
}
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
readonly label: "Current page";
|
|
20
|
-
}, {
|
|
21
|
-
readonly id: "product";
|
|
22
|
-
readonly label: "Products";
|
|
23
|
-
readonly path: "/menu/product";
|
|
24
|
-
}, {
|
|
25
|
-
readonly id: "category";
|
|
26
|
-
readonly label: "Category";
|
|
27
|
-
readonly path: "/menu/category";
|
|
28
|
-
}, {
|
|
29
|
-
readonly id: "subcategory";
|
|
30
|
-
readonly label: "Subcategory";
|
|
31
|
-
readonly path: "/menu/subcategory";
|
|
32
|
-
}, {
|
|
33
|
-
readonly id: "group";
|
|
34
|
-
readonly label: "Group";
|
|
35
|
-
readonly path: "/menu/group";
|
|
36
|
-
}, {
|
|
37
|
-
readonly id: "takeaway";
|
|
38
|
-
readonly label: "Takeaway";
|
|
39
|
-
readonly path: "/menu/takeaway";
|
|
40
|
-
}, {
|
|
41
|
-
readonly id: "scheduler";
|
|
42
|
-
readonly label: "Scheduler";
|
|
43
|
-
readonly path: "/menu/scheduler";
|
|
44
|
-
}, {
|
|
45
|
-
readonly id: "variant";
|
|
46
|
-
readonly label: "Variant";
|
|
47
|
-
readonly path: "/menu/variant";
|
|
48
|
-
}, {
|
|
49
|
-
readonly id: "order-pacing";
|
|
50
|
-
readonly label: "Order pacing";
|
|
51
|
-
readonly path: "/menu/order-pacing";
|
|
52
|
-
}, {
|
|
53
|
-
readonly id: "recipe";
|
|
54
|
-
readonly label: "Recipe";
|
|
55
|
-
readonly path: "/menu/recipe";
|
|
56
|
-
}, {
|
|
57
|
-
readonly id: "ingredient";
|
|
58
|
-
readonly label: "Ingredient";
|
|
59
|
-
readonly path: "/menu/ingredient";
|
|
60
|
-
}, {
|
|
61
|
-
readonly id: "unit";
|
|
62
|
-
readonly label: "Unit";
|
|
63
|
-
readonly path: "/menu/unit";
|
|
64
|
-
}, {
|
|
65
|
-
readonly id: "cooking-guide";
|
|
66
|
-
readonly label: "Cooking guide";
|
|
67
|
-
readonly path: "/menu/cooking-guide";
|
|
68
|
-
}, {
|
|
69
|
-
readonly id: "print-route";
|
|
70
|
-
readonly label: "Print route";
|
|
71
|
-
readonly path: "/menu/print-route";
|
|
72
|
-
}, {
|
|
73
|
-
readonly id: "serving-sequence";
|
|
74
|
-
readonly label: "Serving sequence";
|
|
75
|
-
readonly path: "/menu/serving-sequence";
|
|
76
|
-
}, {
|
|
77
|
-
readonly id: "publish";
|
|
78
|
-
readonly label: "Publish";
|
|
79
|
-
readonly path: "/menu/publish";
|
|
80
|
-
}, {
|
|
81
|
-
readonly id: "menu-setting";
|
|
82
|
-
readonly label: "Menu setting";
|
|
83
|
-
readonly path: "/menu/menu-setting";
|
|
84
|
-
}, {
|
|
85
|
-
readonly id: "catalog";
|
|
86
|
-
readonly label: "Catalog";
|
|
87
|
-
readonly path: "/menu/catalog";
|
|
88
|
-
}, {
|
|
89
|
-
readonly id: "menu";
|
|
90
|
-
readonly label: "Menu";
|
|
91
|
-
readonly path: "/menu";
|
|
92
|
-
}, {
|
|
93
|
-
readonly id: "report";
|
|
94
|
-
readonly label: "Report";
|
|
95
|
-
readonly path: "/report";
|
|
96
|
-
}, {
|
|
97
|
-
readonly id: "marketing";
|
|
98
|
-
readonly label: "Marketing";
|
|
99
|
-
readonly path: "/marketing";
|
|
100
|
-
}, {
|
|
101
|
-
readonly id: "none";
|
|
102
|
-
readonly label: "None";
|
|
103
|
-
}];
|
|
104
|
-
export type WorkspaceSelection = (typeof WORKSPACE_CHOICES)[number]['id'];
|
|
105
|
-
export declare function buildContextualStart(pageContext: PortalPageContext | null, conversations: Conversation[], memories?: MemoryDto[], workspaceSelection?: WorkspaceSelection): ContextualStart;
|
|
18
|
+
export type WorkspaceSelection = 'auto' | 'none' | string;
|
|
19
|
+
export declare function buildContextualStart(pageContext: PortalPageContext | null, workspaceSelection?: WorkspaceSelection, workspaceChoices?: readonly WorkspaceChoice[], moduleLabel?: string): ContextualStart;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PortalNavigationItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PortalNavigationContext {
|
|
7
|
+
moduleLabel?: string;
|
|
8
|
+
items: PortalNavigationItem[];
|
|
9
|
+
}
|
|
10
|
+
export type NavigationContextProvider = () => Partial<PortalNavigationContext> | null | undefined;
|
|
11
|
+
export declare function sanitizePortalNavigationContext(value: unknown): PortalNavigationContext | null;
|
|
12
|
+
export declare function setNavigationContextProvider(provider?: NavigationContextProvider): void;
|
|
13
|
+
export declare function capturePortalNavigationContext(): PortalNavigationContext | null;
|
|
@@ -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
|
-
/**
|
|
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
|
+
}
|