@feedmepos/mf-remy-panel 0.0.11 → 0.1.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.
@@ -0,0 +1,112 @@
1
+ import { defineComponent as f, ref as y, computed as c, openBlock as a, createElementBlock as s, createStaticVNode as h, createElementVNode as t, Fragment as i, renderList as m, toDisplayString as l, createCommentVNode as x } from "vue";
2
+ import { u as _, a as k, _ as w } from "./app-25c9e531.js";
3
+ import "@feedmepos/mf-common";
4
+ import "pinia";
5
+ import "vue-router";
6
+ const C = { class: "flex flex-col gap-12 p-8 max-w-[1200px] mx-auto md:gap-8 md:p-4" }, S = { class: "flex flex-col gap-6" }, R = {
7
+ key: 0,
8
+ class: "grid grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-6 mt-4 md:grid-cols-1"
9
+ }, V = ["onClick"], j = { class: "text-lg font-semibold mb-2 text-[var(--color-text)]" }, N = { class: "bg-[var(--color-background)] px-1.5 py-0.5 rounded font-mono text-[0.875em] text-[var(--color-primary)]" }, A = { class: "text-[15px] text-[var(--color-text-secondary)] leading-6 m-0" }, O = {
10
+ key: 1,
11
+ class: "px-6 py-4 bg-[var(--color-background-soft)] rounded-lg border border-[var(--color-border)] text-[var(--color-text-secondary)]"
12
+ }, $ = {
13
+ key: 0,
14
+ class: "flex flex-col gap-4 px-6 py-6 bg-[var(--color-background-soft)] rounded-lg border border-[var(--color-border)]"
15
+ }, E = { class: "flex items-center justify-between" }, H = { class: "overflow-x-auto" }, W = { class: "w-full border-collapse" }, z = { class: "px-4 py-3 text-[var(--color-text)] font-mono text-sm align-top" }, B = { class: "px-4 py-3 text-[var(--color-text)]" }, F = {
16
+ key: 0,
17
+ class: "break-words"
18
+ }, I = {
19
+ key: 1,
20
+ class: "bg-[var(--color-background)] p-3 rounded text-xs font-mono overflow-x-auto max-w-full"
21
+ }, L = {
22
+ key: 2,
23
+ class: "flex flex-col gap-2"
24
+ }, T = ["src"], D = { class: "text-xs" }, G = { class: "mt-2 bg-[var(--color-background)] p-2 rounded font-mono overflow-x-auto max-h-32" }, J = /* @__PURE__ */ f({
25
+ __name: "HomeView",
26
+ setup(K) {
27
+ const p = _(), v = k(), n = y(null), d = c(() => {
28
+ const o = v.participants.get("remy");
29
+ return (o == null ? void 0 : o.commands) || [];
30
+ });
31
+ function u(o) {
32
+ return o == null ? { type: "text", content: String(o) } : typeof o == "string" && (o.startsWith("data:image/") || o.match(/^[A-Za-z0-9+/=]{100,}$/)) ? { type: "image", content: o } : typeof o == "object" ? { type: "json", content: JSON.stringify(o, null, 2) } : { type: "text", content: String(o) };
33
+ }
34
+ const g = c(() => n.value ? Object.entries(n.value).map(([o, e]) => ({
35
+ key: o,
36
+ ...u(e)
37
+ })) : []);
38
+ function b(o) {
39
+ p.activate({
40
+ command: o,
41
+ context: { itemName: "Nasi Lemak" },
42
+ onResult: (e) => {
43
+ console.log("Command", o, "result:", e), n.value = e;
44
+ }
45
+ });
46
+ }
47
+ return (o, e) => (a(), s("div", C, [
48
+ e[7] || (e[7] = h('<div class="text-center px-8 py-12 bg-gradient-to-br from-[var(--color-background-soft)] to-[var(--color-background-mute)] rounded-xl md:px-4 md:py-8" data-v-e231fae7><h1 class="text-[2.5rem] font-bold mb-4 text-[var(--color-text)] md:text-[2rem]" data-v-e231fae7>Welcome to Remy Panel</h1><p class="text-xl text-[var(--color-text-secondary)] m-0 md:text-lg" data-v-e231fae7>Your AI-powered assistant for development</p></div><div class="flex flex-col gap-4 p-6 bg-blue-200 rounded-lg border-[var(--color-primary)]" data-v-e231fae7><h2 class="text-[1.75rem] font-semibold m-0 text-[var(--color-text)]" data-v-e231fae7>Getting Started</h2><ol class="m-0 pl-6 flex flex-col gap-3" data-v-e231fae7><li class="text-[var(--color-text)] leading-6" data-v-e231fae7>Click the <strong class="text-[var(--color-primary)] font-semibold" data-v-e231fae7>Remy icon</strong> in the top navigation bar to open the chat panel</li><li class="text-[var(--color-text)] leading-6" data-v-e231fae7>On desktop, the panel appears on the right side with <strong class="text-[var(--color-primary)] font-semibold" data-v-e231fae7>adjustable width</strong></li><li class="text-[var(--color-text)] leading-6" data-v-e231fae7>On mobile/tablet, the panel opens in <strong class="text-[var(--color-primary)] font-semibold" data-v-e231fae7>full-screen mode</strong></li><li class="text-[var(--color-text)] leading-6" data-v-e231fae7>Use the <strong class="text-[var(--color-primary)] font-semibold" data-v-e231fae7>close button (✕)</strong> to hide the panel when done</li><li class="text-[var(--color-text)] leading-6" data-v-e231fae7>Try typing <code class="bg-[var(--color-background)] px-1.5 py-0.5 rounded font-mono text-[0.875em] text-[var(--color-primary)]" data-v-e231fae7>/</code> in the chat input to see available commands</li></ol></div>', 2)),
49
+ t("div", S, [
50
+ e[2] || (e[2] = t("h2", { class: "text-[1.75rem] font-semibold m-0 text-[var(--color-text)]" }, "Remy Commands", -1)),
51
+ e[3] || (e[3] = t("p", { class: "text-[var(--color-text-secondary)] leading-6 m-0" }, " Available slash commands from the Remy agent: ", -1)),
52
+ d.value.length > 0 ? (a(), s("div", R, [
53
+ (a(!0), s(i, null, m(d.value, (r) => (a(), s("div", {
54
+ key: r.name,
55
+ onClick: (U) => b(r.name),
56
+ class: "px-6 py-6 bg-[var(--color-background-soft)] rounded-lg border border-[var(--color-border)] transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(0,0,0,0.1)] hover:border-[var(--color-primary)] cursor-pointer"
57
+ }, [
58
+ e[1] || (e[1] = t("div", { class: "text-[2rem] mb-3" }, "⚡", -1)),
59
+ t("h3", j, [
60
+ t("code", N, "/" + l(r.name), 1)
61
+ ]),
62
+ t("p", A, l(r.description), 1)
63
+ ], 8, V))), 128))
64
+ ])) : (a(), s("div", O, " No commands available. The Remy agent may not be initialized yet. "))
65
+ ]),
66
+ n.value ? (a(), s("div", $, [
67
+ t("div", E, [
68
+ e[4] || (e[4] = t("h2", { class: "text-[1.5rem] font-semibold m-0 text-[var(--color-text)]" }, "Agent Result", -1)),
69
+ t("button", {
70
+ onClick: e[0] || (e[0] = (r) => n.value = null),
71
+ class: "px-3 py-1 text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition-colors"
72
+ }, " Clear ")
73
+ ]),
74
+ t("div", H, [
75
+ t("table", W, [
76
+ e[6] || (e[6] = t("thead", null, [
77
+ t("tr", { class: "border-b border-[var(--color-border)]" }, [
78
+ t("th", { class: "text-left px-4 py-3 text-[var(--color-text)] font-semibold bg-[var(--color-background-mute)]" }, "Key"),
79
+ t("th", { class: "text-left px-4 py-3 text-[var(--color-text)] font-semibold bg-[var(--color-background-mute)]" }, "Value")
80
+ ])
81
+ ], -1)),
82
+ t("tbody", null, [
83
+ (a(!0), s(i, null, m(g.value, (r) => (a(), s("tr", {
84
+ key: r.key,
85
+ class: "border-b border-[var(--color-border)] hover:bg-[var(--color-background-mute)] transition-colors"
86
+ }, [
87
+ t("td", z, l(r.key), 1),
88
+ t("td", B, [
89
+ r.type === "text" ? (a(), s("span", F, l(r.content), 1)) : r.type === "json" ? (a(), s("pre", I, l(r.content), 1)) : r.type === "image" ? (a(), s("div", L, [
90
+ t("img", {
91
+ src: r.content.startsWith("data:") ? r.content : `data:image/png;base64,${r.content}`,
92
+ alt: "Result image",
93
+ class: "max-w-md max-h-96 rounded border border-[var(--color-border)] object-contain"
94
+ }, null, 8, T),
95
+ t("details", D, [
96
+ e[5] || (e[5] = t("summary", { class: "cursor-pointer text-[var(--color-text-secondary)] hover:text-[var(--color-text)]" }, "Show base64", -1)),
97
+ t("pre", G, l(r.content), 1)
98
+ ])
99
+ ])) : x("", !0)
100
+ ])
101
+ ]))), 128))
102
+ ])
103
+ ])
104
+ ])
105
+ ])) : x("", !0)
106
+ ]));
107
+ }
108
+ });
109
+ const Q = /* @__PURE__ */ w(J, [["__scopeId", "data-v-e231fae7"]]);
110
+ export {
111
+ Q as default
112
+ };
@@ -1,5 +1,8 @@
1
1
  import { openBlock as t, createElementBlock as n, createElementVNode as o, defineComponent as a, computed as c, normalizeClass as p, createBlock as i, unref as l, createCommentVNode as h } from "vue";
2
- import { u as k } from "./app-5daba510.js";
2
+ import { u as k } from "./app-25c9e531.js";
3
+ import "@feedmepos/mf-common";
4
+ import "pinia";
5
+ import "vue-router";
3
6
  const g = {
4
7
  xmlns: "http://www.w3.org/2000/svg",
5
8
  width: "24",
@@ -21,14 +24,14 @@ function w(s, e) {
21
24
  }, null, -1)
22
25
  ])]);
23
26
  }
24
- const y = { render: w }, _ = {
27
+ const f = { render: w }, y = {
25
28
  xmlns: "http://www.w3.org/2000/svg",
26
29
  width: "24",
27
30
  height: "24",
28
31
  fill: "none"
29
32
  };
30
- function f(s, e) {
31
- return t(), n("svg", _, [...e[0] || (e[0] = [
33
+ function _(s, e) {
34
+ return t(), n("svg", y, [...e[0] || (e[0] = [
32
35
  o("g", {
33
36
  stroke: "#1C1C1E",
34
37
  "stroke-linecap": "round",
@@ -39,24 +42,24 @@ function f(s, e) {
39
42
  ], -1)
40
43
  ])]);
41
44
  }
42
- const v = { render: f }, B = /* @__PURE__ */ a({
45
+ const v = { render: _ }, j = /* @__PURE__ */ a({
43
46
  __name: "RemyButton",
44
47
  emits: ["click"],
45
48
  setup(s, { emit: e }) {
46
- const C = e, r = k(), m = c(() => r.showRemy), u = c(() => r.dialogShowing);
49
+ const m = e, r = k(), C = c(() => r.showRemy), u = c(() => r.dialogShowing);
47
50
  function d() {
48
- C("click");
51
+ m("click");
49
52
  }
50
- return (x, M) => m.value ? (t(), n("button", {
53
+ return (x, M) => C.value ? (t(), n("button", {
51
54
  key: 0,
52
55
  class: p(["bg-fm-color-neutral-gray-100 rounded-lg p-[6px]"]),
53
56
  type: "button",
54
57
  onClick: d
55
58
  }, [
56
- u.value ? (t(), i(l(v), { key: 0 })) : (t(), i(l(y), { key: 1 }))
59
+ u.value ? (t(), i(l(v), { key: 0 })) : (t(), i(l(f), { key: 1 }))
57
60
  ])) : h("", !0);
58
61
  }
59
62
  });
60
63
  export {
61
- B as _
64
+ j as default
62
65
  };