@feedmepos/mf-remy-panel 0.21.0-dev.1 → 0.21.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.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-32e89eb4.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-78f777c7.js";
3
3
  import "pinia";
4
4
  import "@feedmepos/mf-common";
5
5
  import "vue-router";
@@ -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>;
@@ -1,105 +1,19 @@
1
- import type { MemoryDto, MemoryScope } from '@/api/memory';
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: 'page' | 'history' | 'memory';
6
+ source: 'fallback' | 'generated';
10
7
  }
11
8
  export interface ContextualStart {
12
9
  workspaceLabel: string;
13
- workspaceDetail: string;
14
10
  memoryScope: MemoryScope;
15
- suggestions: [ContextualSuggestion, ContextualSuggestion];
11
+ suggestions: ContextualSuggestion[];
12
+ }
13
+ export interface WorkspaceChoice {
14
+ id: string;
15
+ label: string;
16
+ path?: string;
16
17
  }
17
- export declare const WORKSPACE_CHOICES: readonly [{
18
- readonly id: "auto";
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;