@feedmepos/mf-remy-panel 0.3.1 → 0.3.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.
@@ -0,0 +1,142 @@
1
+ import { defineComponent as y, ref as a, openBlock as l, createElementBlock as n, createElementVNode as e, unref as b, createTextVNode as g, createStaticVNode as k, toDisplayString as i, createCommentVNode as m } from "vue";
2
+ import { u as E, a as _, R as C, _ as x } from "./app-fdb0b4e7.js";
3
+ import "pinia";
4
+ import "@feedmepos/mf-common";
5
+ import "vue-router";
6
+ const B = { class: "home" }, R = { class: "home__hero" }, D = { class: "home__brand" }, T = ["src"], N = { class: "home__card" }, H = {
7
+ key: 0,
8
+ class: "home__autofill"
9
+ }, I = { class: "home__autofill-price" }, w = {
10
+ key: 1,
11
+ class: "home__autofill"
12
+ }, Q = { class: "home__autofill-value" }, S = {
13
+ key: 2,
14
+ class: "home__autofill"
15
+ }, M = { class: "home__autofill-value" }, O = {
16
+ key: 3,
17
+ class: "home__debug"
18
+ }, V = { class: "home__debug-title" }, P = { class: "home__debug-json" }, j = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAB2klEQVR4nO2ZO04DMRCGc6tt9wJISNTbUuQStFyDK9BQcBk4AW06UBJk/JjHP15nZ5FGmiLx7tjfZ3v2kRy+T5//Og7uBCHgTRAC3gQh4E0QAt4EIeBNEALeBCHgTRAC3gQh4E0QAt4EIeBNEAK36/3jtYidClSUfbG1wBDoQTIWgbe7IqxkVbraAzl6p0A7tlWjO70CMAsIY2sQXw/3efQ75CcbBFp0vt8ClBOg0h/fjyn0dTPUQJXc9pi10KBke2aboxMa5NyhK0DS86tfgabd0jbmX1kBbo+lzzYBoAZuKNDOnS6QcoSlbNqJYtVO0wUEAF2AVBeLjKjUZuxqTdgCkOcOEhB2IVIb/JnFQl3a2a3P1YAg8PL8RF9twN65E1amNzxnTk7g18E0x/KTArhEYPuFnha4HvhbBMuNjDiqVhGXzl8q0vTnDoTA+RgCZ7lMjUovIFEB07MKt5G60xl6WEAdXoYA08U7fYsOCRRfOyBwdGzH6wKVA5HQwbQiFBjyMrrMk5y2gQkCsMzTKoHhMtZBWYE+h40jp6cfp/fsUNGzb2TLPO1N44oEv1LuSYND1wXcNWR0VAC/UQwMHKn/t1FH6DECQ2TWDx3/D3hHCHhHCHhHCHjHDwvk2e+WkMn1AAAAAElFTkSuQmCC", F = /* @__PURE__ */ y({
19
+ __name: "HomeView",
20
+ setup(G) {
21
+ const c = E(), r = a(null), u = a(null), d = a(null), o = a(null), p = a(null);
22
+ _("apply-pricing", (s) => {
23
+ r.value = s, o.value = "apply-pricing", p.value = s;
24
+ }), _("apply-description", (s) => {
25
+ u.value = s, o.value = "apply-description", p.value = s;
26
+ }), _("apply-image", (s) => {
27
+ d.value = (s == null ? void 0 : s.mimeType) ?? null, o.value = "apply-image", p.value = s;
28
+ });
29
+ function h() {
30
+ c.activate({
31
+ prompt: "Suggest pricing for Nasi Lemak",
32
+ command: "suggestPrice"
33
+ });
34
+ }
35
+ function v() {
36
+ c.activate({
37
+ prompt: "Generate a menu description for Pad Thai",
38
+ command: "suggestDescription"
39
+ });
40
+ }
41
+ function f() {
42
+ c.activate({
43
+ prompt: "Help me generate an image for my menu item",
44
+ command: "modifyImage",
45
+ imageData: j
46
+ });
47
+ }
48
+ function A() {
49
+ c.activate({
50
+ prompt: "What were my top 5 selling items last week?",
51
+ command: "askReport"
52
+ });
53
+ }
54
+ return (s, t) => (l(), n("div", B, [
55
+ e("section", R, [
56
+ e("div", D, [
57
+ e("img", {
58
+ src: b(C),
59
+ alt: "Remy",
60
+ class: "home__avatar"
61
+ }, null, 8, T),
62
+ t[0] || (t[0] = e("div", null, [
63
+ e("p", { class: "home__name" }, "Remy AI"),
64
+ e("p", { class: "home__badge" }, "Beta")
65
+ ], -1))
66
+ ]),
67
+ t[1] || (t[1] = e("h1", { class: "home__title" }, "Welcome to Remy Panel", -1)),
68
+ t[2] || (t[2] = e("p", { class: "home__subtitle" }, "Your AI assistant for pricing, descriptions, and menu images.", -1)),
69
+ t[3] || (t[3] = e("div", { class: "home__hero-hint" }, [
70
+ g("Tip: Type "),
71
+ e("code", null, "/"),
72
+ g(" in chat to access commands.")
73
+ ], -1))
74
+ ]),
75
+ t[12] || (t[12] = k('<section class="home__card" data-v-83f779cc><h2 class="home__section-title" data-v-83f779cc>Getting Started</h2><ol class="home__list" data-v-83f779cc><li data-v-83f779cc>Click the <strong data-v-83f779cc>Remy icon</strong> in your top navigation to open the chat panel.</li><li data-v-83f779cc> Desktop opens a right-side panel. Mobile/tablet opens Remy in <strong data-v-83f779cc>full-screen</strong>. </li><li data-v-83f779cc> Use <strong data-v-83f779cc>/suggestPrice</strong>, <strong data-v-83f779cc>/suggestDescription</strong>, <strong data-v-83f779cc>/modifyImage</strong>, or <strong data-v-83f779cc>/askReport</strong>. </li><li data-v-83f779cc>After selecting a command, enter the item details and send.</li></ol></section>', 1)),
76
+ e("section", N, [
77
+ t[11] || (t[11] = e("div", { class: "home__section-head" }, [
78
+ e("h2", { class: "home__section-title" }, "Try Examples"),
79
+ e("p", null, "Start with one of these quick actions:")
80
+ ], -1)),
81
+ e("div", { class: "home__grid" }, [
82
+ e("button", {
83
+ class: "home__example",
84
+ type: "button",
85
+ onClick: h
86
+ }, [...t[4] || (t[4] = [
87
+ e("span", { class: "home__example-icon" }, "/suggestPrice", -1),
88
+ e("h3", null, "Suggest Price", -1),
89
+ e("p", null, "Get a suggested menu price with short market-based rationale.", -1)
90
+ ])]),
91
+ e("button", {
92
+ class: "home__example",
93
+ type: "button",
94
+ onClick: v
95
+ }, [...t[5] || (t[5] = [
96
+ e("span", { class: "home__example-icon" }, "/suggestDescription", -1),
97
+ e("h3", null, "Suggest Description", -1),
98
+ e("p", null, "Generate a polished menu description for your item.", -1)
99
+ ])]),
100
+ e("button", {
101
+ class: "home__example",
102
+ type: "button",
103
+ onClick: f
104
+ }, [...t[6] || (t[6] = [
105
+ e("span", { class: "home__example-icon" }, "/modifyImage", -1),
106
+ e("h3", null, "Modify Image", -1),
107
+ e("p", null, "Transform an attached food photo into a menu-ready image.", -1)
108
+ ])]),
109
+ e("button", {
110
+ class: "home__example",
111
+ type: "button",
112
+ onClick: A
113
+ }, [...t[7] || (t[7] = [
114
+ e("span", { class: "home__example-icon" }, "/askReport", -1),
115
+ e("h3", null, "Ask Report", -1),
116
+ e("p", null, "Ask questions about your sales, revenue, and business analytics.", -1)
117
+ ])])
118
+ ]),
119
+ r.value !== null ? (l(), n("div", H, [
120
+ t[8] || (t[8] = e("p", { class: "home__autofill-label" }, "Applied price event received", -1)),
121
+ e("p", I, "RM " + i(r.value.toFixed(2)), 1)
122
+ ])) : m("", !0),
123
+ u.value ? (l(), n("div", w, [
124
+ t[9] || (t[9] = e("p", { class: "home__autofill-label" }, "Applied description event received", -1)),
125
+ e("p", Q, i(u.value), 1)
126
+ ])) : m("", !0),
127
+ d.value ? (l(), n("div", S, [
128
+ t[10] || (t[10] = e("p", { class: "home__autofill-label" }, "Applied image event received", -1)),
129
+ e("p", M, i(d.value), 1)
130
+ ])) : m("", !0),
131
+ o.value ? (l(), n("div", O, [
132
+ e("p", V, "Last Apply Event: " + i(o.value), 1),
133
+ e("pre", P, i(JSON.stringify(p.value, null, 2)), 1)
134
+ ])) : m("", !0)
135
+ ])
136
+ ]));
137
+ }
138
+ });
139
+ const J = /* @__PURE__ */ x(F, [["__scopeId", "data-v-83f779cc"]]);
140
+ export {
141
+ J as default
142
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as s, computed as o, openBlock as i, createElementBlock as l, normalizeClass as t, createElementVNode as p, unref as u, createCommentVNode as d } from "vue";
2
- import { u as y, R as _ } from "./app-722c1500.js";
2
+ import { u as y, R as _ } from "./app-fdb0b4e7.js";
3
3
  import "pinia";
4
4
  import "@feedmepos/mf-common";
5
5
  import "vue-router";
@@ -8,6 +8,7 @@ export interface MessageResponseDto {
8
8
  command?: string;
9
9
  imageData?: string;
10
10
  toolCalls?: any[];
11
+ parts?: any[];
11
12
  feedback?: 'helpful' | 'unhelpful';
12
13
  createdAt: string;
13
14
  updatedAt: string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Uploads an image file to Cloudflare R2 via the backend and returns the public URL.
3
+ * If the File has no content (e.g. when the image came from pendingImageData),
4
+ * the dataUrl is converted to a Blob before uploading.
5
+ */
6
+ export declare function uploadImage(file: File, dataUrl: string): Promise<string>;
@@ -0,0 +1,6 @@
1
+ export interface TokenBalance {
2
+ free: number;
3
+ normal: number;
4
+ total: number;
5
+ }
6
+ export declare function fetchTokenBalance(businessId: string, authToken: string): Promise<TokenBalance>;