@feedmepos/mf-remy-panel 0.2.10 → 0.3.0
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-ab6d0ec3.js +144 -0
- package/dist/RemyButton-d451909b.js +30 -0
- package/dist/api/conversations.d.ts +21 -0
- package/dist/api/http.d.ts +2 -0
- package/dist/api/messages.d.ts +16 -0
- package/dist/app-919731f0.js +14287 -0
- package/dist/app.d.ts +6 -105
- package/dist/app.js +9 -9
- package/dist/assets/icons/index.d.ts +2 -3
- package/dist/bootstrap/remy.d.ts +5 -0
- package/dist/components/chatPanel/{ToolCallDisplay.vue.d.ts → ActionCard.vue.d.ts} +2 -2
- package/dist/components/chatPanel/ChatInput.vue.d.ts +1 -5
- package/dist/components/chatPanel/ChatMessageAssistant.vue.d.ts +1 -1
- package/dist/components/chatPanel/ChatMessageUser.vue.d.ts +1 -1
- package/dist/components/chatPanel/ChatMessages.vue.d.ts +1 -1
- package/dist/components/chatPanel/MessageContent.vue.d.ts +0 -2
- package/dist/composables/useClientEvent.d.ts +17 -0
- package/dist/locales/index.d.ts +96 -0
- package/dist/stores/appStore.d.ts +28 -0
- package/dist/stores/chatStore.d.ts +190 -0
- package/dist/style.css +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/chat.d.ts +26 -0
- package/package.json +5 -3
- package/dist/HomeView-bd2d7032.js +0 -172
- package/dist/RemyButton-88ce06e0.js +0 -65
- package/dist/app-73c05327.js +0 -9423
- package/dist/components/chatPanel/ChatFollowUps.vue.d.ts +0 -20
- package/dist/components/chatPanel/HistoryView.vue.d.ts +0 -8
- package/dist/components/chatPanel/MessageActions.vue.d.ts +0 -16
- package/dist/router/shared.d.ts +0 -2
- package/dist/stores/counter.d.ts +0 -13
- package/dist/stores/remyChat.d.ts +0 -831
- package/dist/stores/remyStore.d.ts +0 -62
- /package/dist/components/chatPanel/{RemyChatPanel.vue.d.ts → ChatPanel.vue.d.ts} +0 -0
- /package/dist/components/chatPanel/{Navigator.vue.d.ts → ConversationList.vue.d.ts} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { onMounted as k, onUnmounted as x, defineComponent as A, ref as i, openBlock as p, createElementBlock as m, createElementVNode as e, unref as R, createTextVNode as g, createStaticVNode as E, toDisplayString as r, createCommentVNode as c } from "vue";
|
|
2
|
+
import { u as w, R as S, _ as C } from "./app-919731f0.js";
|
|
3
|
+
import "pinia";
|
|
4
|
+
import "@feedmepos/mf-common";
|
|
5
|
+
import "vue-router";
|
|
6
|
+
function v(u, s) {
|
|
7
|
+
function o(l) {
|
|
8
|
+
s(l.detail);
|
|
9
|
+
}
|
|
10
|
+
k(() => window.addEventListener(u, o)), x(() => window.removeEventListener(u, o));
|
|
11
|
+
}
|
|
12
|
+
const I = { class: "home" }, P = { class: "home__hero" }, T = { class: "home__brand" }, D = ["src"], V = { class: "home__card" }, N = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "home__autofill"
|
|
15
|
+
}, M = { class: "home__autofill-price" }, G = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "home__autofill"
|
|
18
|
+
}, H = { class: "home__autofill-value" }, L = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "home__autofill"
|
|
21
|
+
}, B = { class: "home__autofill-value" }, q = {
|
|
22
|
+
key: 3,
|
|
23
|
+
class: "home__debug"
|
|
24
|
+
}, U = { class: "home__debug-title" }, W = { class: "home__debug-json" }, j = /* @__PURE__ */ A({
|
|
25
|
+
__name: "HomeView",
|
|
26
|
+
setup(u) {
|
|
27
|
+
const s = w(), o = i(null), l = i(null), _ = i(null), n = i(null), d = i(null);
|
|
28
|
+
v("apply-pricing", (a) => {
|
|
29
|
+
o.value = a, n.value = "apply-pricing", d.value = a;
|
|
30
|
+
}), v("apply-description", (a) => {
|
|
31
|
+
l.value = a, n.value = "apply-description", d.value = a;
|
|
32
|
+
}), v("apply-image", (a) => {
|
|
33
|
+
_.value = (a == null ? void 0 : a.mimeType) ?? null, n.value = "apply-image", d.value = a;
|
|
34
|
+
});
|
|
35
|
+
function h() {
|
|
36
|
+
s.activate({
|
|
37
|
+
prompt: "Suggest pricing for Nasi Lemak"
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function f() {
|
|
41
|
+
s.activate({
|
|
42
|
+
prompt: "Generate a menu description for Pad Thai"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function y() {
|
|
46
|
+
s.activate({
|
|
47
|
+
prompt: "Help me generate an image for my menu item"
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function b() {
|
|
51
|
+
s.activate({
|
|
52
|
+
command: "askReport",
|
|
53
|
+
prompt: "What were my top 5 selling items last week?"
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return (a, t) => (p(), m("div", I, [
|
|
57
|
+
e("section", P, [
|
|
58
|
+
e("div", T, [
|
|
59
|
+
e("img", {
|
|
60
|
+
src: R(S),
|
|
61
|
+
alt: "Remy",
|
|
62
|
+
class: "home__avatar"
|
|
63
|
+
}, null, 8, D),
|
|
64
|
+
t[0] || (t[0] = e("div", null, [
|
|
65
|
+
e("p", { class: "home__name" }, "Remy AI"),
|
|
66
|
+
e("p", { class: "home__badge" }, "Beta")
|
|
67
|
+
], -1))
|
|
68
|
+
]),
|
|
69
|
+
t[1] || (t[1] = e("h1", { class: "home__title" }, "Welcome to Remy Panel", -1)),
|
|
70
|
+
t[2] || (t[2] = e("p", { class: "home__subtitle" }, "Your AI assistant for pricing, descriptions, and menu images.", -1)),
|
|
71
|
+
t[3] || (t[3] = e("div", { class: "home__hero-hint" }, [
|
|
72
|
+
g("Tip: Type "),
|
|
73
|
+
e("code", null, "/"),
|
|
74
|
+
g(" in chat to access commands.")
|
|
75
|
+
], -1))
|
|
76
|
+
]),
|
|
77
|
+
t[12] || (t[12] = E('<section class="home__card" data-v-94caad04><h2 class="home__section-title" data-v-94caad04>Getting Started</h2><ol class="home__list" data-v-94caad04><li data-v-94caad04>Click the <strong data-v-94caad04>Remy icon</strong> in your top navigation to open the chat panel.</li><li data-v-94caad04> Desktop opens a right-side panel. Mobile/tablet opens Remy in <strong data-v-94caad04>full-screen</strong>. </li><li data-v-94caad04> Use <strong data-v-94caad04>/suggestPrice</strong>, <strong data-v-94caad04>/suggestDescription</strong>, <strong data-v-94caad04>/modifyImage</strong>, or <strong data-v-94caad04>/askReport</strong>. </li><li data-v-94caad04>After selecting a command, enter the item details and send.</li></ol></section>', 1)),
|
|
78
|
+
e("section", V, [
|
|
79
|
+
t[11] || (t[11] = e("div", { class: "home__section-head" }, [
|
|
80
|
+
e("h2", { class: "home__section-title" }, "Try Examples"),
|
|
81
|
+
e("p", null, "Start with one of these quick actions:")
|
|
82
|
+
], -1)),
|
|
83
|
+
e("div", { class: "home__grid" }, [
|
|
84
|
+
e("button", {
|
|
85
|
+
class: "home__example",
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: h
|
|
88
|
+
}, [...t[4] || (t[4] = [
|
|
89
|
+
e("span", { class: "home__example-icon" }, "/suggestPrice", -1),
|
|
90
|
+
e("h3", null, "Suggest Price", -1),
|
|
91
|
+
e("p", null, "Get a suggested menu price with short market-based rationale.", -1)
|
|
92
|
+
])]),
|
|
93
|
+
e("button", {
|
|
94
|
+
class: "home__example",
|
|
95
|
+
type: "button",
|
|
96
|
+
onClick: f
|
|
97
|
+
}, [...t[5] || (t[5] = [
|
|
98
|
+
e("span", { class: "home__example-icon" }, "/suggestDescription", -1),
|
|
99
|
+
e("h3", null, "Suggest Description", -1),
|
|
100
|
+
e("p", null, "Generate a polished menu description for your item.", -1)
|
|
101
|
+
])]),
|
|
102
|
+
e("button", {
|
|
103
|
+
class: "home__example",
|
|
104
|
+
type: "button",
|
|
105
|
+
onClick: y
|
|
106
|
+
}, [...t[6] || (t[6] = [
|
|
107
|
+
e("span", { class: "home__example-icon" }, "/modifyImage", -1),
|
|
108
|
+
e("h3", null, "Modify Image", -1),
|
|
109
|
+
e("p", null, "Transform an attached food photo into a menu-ready image.", -1)
|
|
110
|
+
])]),
|
|
111
|
+
e("button", {
|
|
112
|
+
class: "home__example",
|
|
113
|
+
type: "button",
|
|
114
|
+
onClick: b
|
|
115
|
+
}, [...t[7] || (t[7] = [
|
|
116
|
+
e("span", { class: "home__example-icon" }, "/askReport", -1),
|
|
117
|
+
e("h3", null, "Ask Report", -1),
|
|
118
|
+
e("p", null, "Ask questions about your sales, revenue, and business analytics.", -1)
|
|
119
|
+
])])
|
|
120
|
+
]),
|
|
121
|
+
o.value !== null ? (p(), m("div", N, [
|
|
122
|
+
t[8] || (t[8] = e("p", { class: "home__autofill-label" }, " Applied price event received ", -1)),
|
|
123
|
+
e("p", M, "RM " + r(o.value.toFixed(2)), 1)
|
|
124
|
+
])) : c("", !0),
|
|
125
|
+
l.value ? (p(), m("div", G, [
|
|
126
|
+
t[9] || (t[9] = e("p", { class: "home__autofill-label" }, "Applied description event received", -1)),
|
|
127
|
+
e("p", H, r(l.value), 1)
|
|
128
|
+
])) : c("", !0),
|
|
129
|
+
_.value ? (p(), m("div", L, [
|
|
130
|
+
t[10] || (t[10] = e("p", { class: "home__autofill-label" }, "Applied image event received", -1)),
|
|
131
|
+
e("p", B, r(_.value), 1)
|
|
132
|
+
])) : c("", !0),
|
|
133
|
+
n.value ? (p(), m("div", q, [
|
|
134
|
+
e("p", U, "Last Apply Event: " + r(n.value), 1),
|
|
135
|
+
e("pre", W, r(JSON.stringify(d.value, null, 2)), 1)
|
|
136
|
+
])) : c("", !0)
|
|
137
|
+
])
|
|
138
|
+
]));
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
const K = /* @__PURE__ */ C(j, [["__scopeId", "data-v-94caad04"]]);
|
|
142
|
+
export {
|
|
143
|
+
K as default
|
|
144
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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-919731f0.js";
|
|
3
|
+
import "pinia";
|
|
4
|
+
import "@feedmepos/mf-common";
|
|
5
|
+
import "vue-router";
|
|
6
|
+
const f = ["src"], v = /* @__PURE__ */ s({
|
|
7
|
+
__name: "RemyButton",
|
|
8
|
+
emits: ["click"],
|
|
9
|
+
setup(g, { emit: n }) {
|
|
10
|
+
const r = n, e = y(), c = o(() => e.showRemy), m = o(() => e.dialogShowing);
|
|
11
|
+
function a() {
|
|
12
|
+
r("click");
|
|
13
|
+
}
|
|
14
|
+
return (h, k) => c.value ? (i(), l("button", {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: t(["bg-fm-color-neutral-gray-100 rounded-lg p-[6px]"]),
|
|
17
|
+
type: "button",
|
|
18
|
+
onClick: a
|
|
19
|
+
}, [
|
|
20
|
+
p("img", {
|
|
21
|
+
src: u(_),
|
|
22
|
+
alt: "Remy",
|
|
23
|
+
class: t(["h-6 w-6 rounded", { "opacity-80": m.value }])
|
|
24
|
+
}, null, 10, f)
|
|
25
|
+
])) : d("", !0);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
v as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ConversationResponseDto {
|
|
2
|
+
id: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
businessId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
lastMessageAt: string;
|
|
7
|
+
messageCount?: number;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateConversationDto {
|
|
12
|
+
businessId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UpdateConversationDto {
|
|
15
|
+
title: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function createConversation(businessId: string): Promise<ConversationResponseDto>;
|
|
18
|
+
export declare function fetchConversations(businessId: string): Promise<ConversationResponseDto[]>;
|
|
19
|
+
export declare function fetchConversation(conversationId: string): Promise<ConversationResponseDto>;
|
|
20
|
+
export declare function updateConversation(conversationId: string, data: UpdateConversationDto): Promise<ConversationResponseDto>;
|
|
21
|
+
export declare function deleteConversation(conversationId: string): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChatMessage } from '../types/chat';
|
|
2
|
+
export interface MessageResponseDto {
|
|
3
|
+
id: string;
|
|
4
|
+
conversationId: string;
|
|
5
|
+
messageId: string;
|
|
6
|
+
role: 'user' | 'assistant';
|
|
7
|
+
content: string;
|
|
8
|
+
command?: string;
|
|
9
|
+
imageData?: string;
|
|
10
|
+
toolCalls?: any[];
|
|
11
|
+
feedback?: 'helpful' | 'unhelpful';
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function fetchMessages(conversationId: string): Promise<MessageResponseDto[]>;
|
|
16
|
+
export declare function convertToChMessage(dto: MessageResponseDto): ChatMessage;
|