@elizaos/plugin-vincent 2.0.3-beta.6 → 2.0.3-beta.7
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/TradingProfileCard.d.ts +8 -0
- package/dist/TradingProfileCard.d.ts.map +1 -0
- package/dist/TradingProfileCard.js +70 -0
- package/dist/TradingProfileCard.js.map +1 -0
- package/dist/TradingStrategyPanel.d.ts +10 -0
- package/dist/TradingStrategyPanel.d.ts.map +1 -0
- package/dist/TradingStrategyPanel.js +133 -0
- package/dist/TradingStrategyPanel.js.map +1 -0
- package/dist/VincentAppView.d.ts +4 -0
- package/dist/VincentAppView.d.ts.map +1 -0
- package/dist/VincentAppView.helpers.d.ts +10 -0
- package/dist/VincentAppView.helpers.d.ts.map +1 -0
- package/dist/VincentAppView.helpers.js +21 -0
- package/dist/VincentAppView.helpers.js.map +1 -0
- package/dist/VincentAppView.interact.d.ts +2 -0
- package/dist/VincentAppView.interact.d.ts.map +1 -0
- package/dist/VincentAppView.interact.js +45 -0
- package/dist/VincentAppView.interact.js.map +1 -0
- package/dist/VincentAppView.js +145 -0
- package/dist/VincentAppView.js.map +1 -0
- package/dist/VincentConnectionCard.d.ts +9 -0
- package/dist/VincentConnectionCard.d.ts.map +1 -0
- package/dist/VincentConnectionCard.js +121 -0
- package/dist/VincentConnectionCard.js.map +1 -0
- package/dist/VincentView.d.ts +13 -0
- package/dist/VincentView.d.ts.map +1 -0
- package/dist/VincentView.js +86 -0
- package/dist/VincentView.js.map +1 -0
- package/dist/WalletStatusCard.d.ts +12 -0
- package/dist/WalletStatusCard.d.ts.map +1 -0
- package/dist/WalletStatusCard.js +203 -0
- package/dist/WalletStatusCard.js.map +1 -0
- package/dist/client.d.ts +21 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +31 -0
- package/dist/client.js.map +1 -0
- package/dist/components/VincentSpatialView.d.ts +32 -0
- package/dist/components/VincentSpatialView.d.ts.map +1 -0
- package/dist/components/VincentSpatialView.js +191 -0
- package/dist/components/VincentSpatialView.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +14 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +98 -0
- package/dist/plugin.js.map +1 -0
- package/dist/register-routes.d.ts +2 -0
- package/dist/register-routes.d.ts.map +1 -0
- package/dist/register-routes.js +6 -0
- package/dist/register-routes.js.map +1 -0
- package/dist/register-terminal-view.d.ts +15 -0
- package/dist/register-terminal-view.d.ts.map +1 -0
- package/dist/register-terminal-view.js +28 -0
- package/dist/register-terminal-view.js.map +1 -0
- package/dist/register.d.ts +2 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +6 -0
- package/dist/register.js.map +1 -0
- package/dist/routes.d.ts +24 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +429 -0
- package/dist/routes.js.map +1 -0
- package/dist/ui.d.ts +11 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +16 -0
- package/dist/ui.js.map +1 -0
- package/dist/useVincentDashboard.d.ts +21 -0
- package/dist/useVincentDashboard.d.ts.map +1 -0
- package/dist/useVincentDashboard.js +105 -0
- package/dist/useVincentDashboard.js.map +1 -0
- package/dist/useVincentState.d.ts +15 -0
- package/dist/useVincentState.d.ts.map +1 -0
- package/dist/useVincentState.js +116 -0
- package/dist/useVincentState.js.map +1 -0
- package/dist/views/bundle.js +500 -0
- package/dist/views/bundle.js.map +1 -0
- package/dist/vincent-app.d.ts +10 -0
- package/dist/vincent-app.d.ts.map +1 -0
- package/dist/vincent-app.js +16 -0
- package/dist/vincent-app.js.map +1 -0
- package/dist/vincent-contracts.d.ts +52 -0
- package/dist/vincent-contracts.d.ts.map +1 -0
- package/dist/vincent-contracts.js +8 -0
- package/dist/vincent-contracts.js.map +1 -0
- package/dist/vincent-view-bundle.d.ts +3 -0
- package/dist/vincent-view-bundle.d.ts.map +1 -0
- package/dist/vincent-view-bundle.js +7 -0
- package/dist/vincent-view-bundle.js.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** TradingProfileCard — P&L summary stats and per-token breakdown. */
|
|
2
|
+
import type { VincentTradingProfile } from "./vincent-contracts";
|
|
3
|
+
interface TradingProfileCardProps {
|
|
4
|
+
tradingProfile: VincentTradingProfile | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const TradingProfileCard: import("react").MemoExoticComponent<({ tradingProfile, }: TradingProfileCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=TradingProfileCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TradingProfileCard.d.ts","sourceRoot":"","sources":["../src/TradingProfileCard.tsx"],"names":[],"mappings":"AAAA,sEAAsE;AAItE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,UAAU,uBAAuB;IAC/B,cAAc,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC9C;AAgCD,eAAO,MAAM,kBAAkB,4DAE5B,uBAAuB,6CAyDxB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BadgeDollarSign, Repeat2, Target, TrendingUp } from "lucide-react";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
function StatTile({ label, value, tone = "muted", icon: Icon }) {
|
|
5
|
+
const toneClass = tone === "ok" ? "text-ok" : tone === "accent" ? "text-accent" : "text-muted";
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", { className: "px-1 py-1", children: [
|
|
7
|
+
/* @__PURE__ */ jsx(Icon, { className: `h-4 w-4 ${toneClass}` }),
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2 text-sm font-semibold tabular-nums text-txt", children: value }),
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "mt-0.5 text-2xs font-semibold text-muted", children: label })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
function formatWinRate(rate) {
|
|
13
|
+
return `${(rate * 100).toFixed(1)}%`;
|
|
14
|
+
}
|
|
15
|
+
const TradingProfileCard = memo(function TradingProfileCard2({
|
|
16
|
+
tradingProfile
|
|
17
|
+
}) {
|
|
18
|
+
if (!tradingProfile) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", { className: "px-1 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-muted/50" }),
|
|
21
|
+
/* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-muted/50", title: "None" })
|
|
22
|
+
] }) });
|
|
23
|
+
}
|
|
24
|
+
const { totalPnl, winRate, totalSwaps, volume24h, tokenBreakdown } = tradingProfile;
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-3 px-1 py-3", children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
27
|
+
/* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-accent" }),
|
|
28
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-txt", children: "P&L" })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-2 sm:grid-cols-4", children: [
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
StatTile,
|
|
33
|
+
{
|
|
34
|
+
icon: BadgeDollarSign,
|
|
35
|
+
label: "P&L",
|
|
36
|
+
value: totalPnl,
|
|
37
|
+
tone: "ok"
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
StatTile,
|
|
42
|
+
{
|
|
43
|
+
icon: Target,
|
|
44
|
+
label: "Win",
|
|
45
|
+
value: formatWinRate(winRate),
|
|
46
|
+
tone: "accent"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(StatTile, { icon: Repeat2, label: "Swaps", value: String(totalSwaps) }),
|
|
50
|
+
/* @__PURE__ */ jsx(StatTile, { icon: TrendingUp, label: "24h", value: volume24h })
|
|
51
|
+
] }),
|
|
52
|
+
tokenBreakdown && tokenBreakdown.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: tokenBreakdown.slice(0, 8).map((tok) => /* @__PURE__ */ jsxs(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
className: "inline-flex items-center gap-2 px-1 py-1.5 text-xs font-semibold text-muted",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-ok" }),
|
|
58
|
+
/* @__PURE__ */ jsx("span", { className: "text-txt", children: tok.symbol }),
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-ok", children: tok.pnl }),
|
|
60
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: tok.swaps })
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
tok.symbol
|
|
64
|
+
)) })
|
|
65
|
+
] });
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
TradingProfileCard
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=TradingProfileCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/TradingProfileCard.tsx"],"sourcesContent":["/** TradingProfileCard — P&L summary stats and per-token breakdown. */\n\nimport { BadgeDollarSign, Repeat2, Target, TrendingUp } from \"lucide-react\";\nimport { type ComponentType, memo } from \"react\";\nimport type { VincentTradingProfile } from \"./vincent-contracts.js\";\n\ninterface TradingProfileCardProps {\n tradingProfile: VincentTradingProfile | null;\n}\n\ninterface StatTileProps {\n label: string;\n value: string;\n tone?: \"accent\" | \"ok\" | \"muted\";\n icon: ComponentType<{ className?: string }>;\n}\n\nfunction StatTile({ label, value, tone = \"muted\", icon: Icon }: StatTileProps) {\n const toneClass =\n tone === \"ok\"\n ? \"text-ok\"\n : tone === \"accent\"\n ? \"text-accent\"\n : \"text-muted\";\n\n return (\n <div className=\"px-1 py-1\">\n <Icon className={`h-4 w-4 ${toneClass}`} />\n <div className=\"mt-2 text-sm font-semibold tabular-nums text-txt\">\n {value}\n </div>\n <div className=\"mt-0.5 text-2xs font-semibold text-muted\">{label}</div>\n </div>\n );\n}\n\nfunction formatWinRate(rate: number): string {\n return `${(rate * 100).toFixed(1)}%`;\n}\n\nexport const TradingProfileCard = memo(function TradingProfileCard({\n tradingProfile,\n}: TradingProfileCardProps) {\n if (!tradingProfile) {\n return (\n <div className=\"px-1 py-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <TrendingUp className=\"h-4 w-4 text-muted/50\" />\n <span className=\"h-2 w-2 rounded-full bg-muted/50\" title=\"None\" />\n </div>\n </div>\n );\n }\n\n const { totalPnl, winRate, totalSwaps, volume24h, tokenBreakdown } =\n tradingProfile;\n\n return (\n <div className=\"space-y-3 px-1 py-3\">\n {/* Header */}\n <div className=\"flex items-center gap-2\">\n <TrendingUp className=\"h-4 w-4 text-accent\" />\n <span className=\"text-sm font-semibold text-txt\">P&L</span>\n </div>\n\n <div className=\"grid gap-2 sm:grid-cols-4\">\n <StatTile\n icon={BadgeDollarSign}\n label=\"P&L\"\n value={totalPnl}\n tone=\"ok\"\n />\n <StatTile\n icon={Target}\n label=\"Win\"\n value={formatWinRate(winRate)}\n tone=\"accent\"\n />\n <StatTile icon={Repeat2} label=\"Swaps\" value={String(totalSwaps)} />\n <StatTile icon={TrendingUp} label=\"24h\" value={volume24h} />\n </div>\n\n {tokenBreakdown && tokenBreakdown.length > 0 && (\n <div className=\"flex flex-wrap gap-2\">\n {tokenBreakdown.slice(0, 8).map((tok) => (\n <span\n key={tok.symbol}\n className=\"inline-flex items-center gap-2 px-1 py-1.5 text-xs font-semibold text-muted\"\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-ok\" />\n <span className=\"text-txt\">{tok.symbol}</span>\n <span className=\"font-mono text-ok\">{tok.pnl}</span>\n <span className=\"font-mono\">{tok.swaps}</span>\n </span>\n ))}\n </div>\n )}\n </div>\n );\n});\n"],"mappings":"AA0BI,SACE,KADF;AAxBJ,SAAS,iBAAiB,SAAS,QAAQ,kBAAkB;AAC7D,SAA6B,YAAY;AAczC,SAAS,SAAS,EAAE,OAAO,OAAO,OAAO,SAAS,MAAM,KAAK,GAAkB;AAC7E,QAAM,YACJ,SAAS,OACL,YACA,SAAS,WACP,gBACA;AAER,SACE,qBAAC,SAAI,WAAU,aACb;AAAA,wBAAC,QAAK,WAAW,WAAW,SAAS,IAAI;AAAA,IACzC,oBAAC,SAAI,WAAU,oDACZ,iBACH;AAAA,IACA,oBAAC,SAAI,WAAU,4CAA4C,iBAAM;AAAA,KACnE;AAEJ;AAEA,SAAS,cAAc,MAAsB;AAC3C,SAAO,IAAI,OAAO,KAAK,QAAQ,CAAC,CAAC;AACnC;AAEO,MAAM,qBAAqB,KAAK,SAASA,oBAAmB;AAAA,EACjE;AACF,GAA4B;AAC1B,MAAI,CAAC,gBAAgB;AACnB,WACE,oBAAC,SAAI,WAAU,aACb,+BAAC,SAAI,WAAU,2CACb;AAAA,0BAAC,cAAW,WAAU,yBAAwB;AAAA,MAC9C,oBAAC,UAAK,WAAU,oCAAmC,OAAM,QAAO;AAAA,OAClE,GACF;AAAA,EAEJ;AAEA,QAAM,EAAE,UAAU,SAAS,YAAY,WAAW,eAAe,IAC/D;AAEF,SACE,qBAAC,SAAI,WAAU,uBAEb;AAAA,yBAAC,SAAI,WAAU,2BACb;AAAA,0BAAC,cAAW,WAAU,uBAAsB;AAAA,MAC5C,oBAAC,UAAK,WAAU,kCAAiC,iBAAO;AAAA,OAC1D;AAAA,IAEA,qBAAC,SAAI,WAAU,6BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,OAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAK;AAAA;AAAA,MACP;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,OAAM;AAAA,UACN,OAAO,cAAc,OAAO;AAAA,UAC5B,MAAK;AAAA;AAAA,MACP;AAAA,MACA,oBAAC,YAAS,MAAM,SAAS,OAAM,SAAQ,OAAO,OAAO,UAAU,GAAG;AAAA,MAClE,oBAAC,YAAS,MAAM,YAAY,OAAM,OAAM,OAAO,WAAW;AAAA,OAC5D;AAAA,IAEC,kBAAkB,eAAe,SAAS,KACzC,oBAAC,SAAI,WAAU,wBACZ,yBAAe,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,QAC/B;AAAA,MAAC;AAAA;AAAA,QAEC,WAAU;AAAA,QAEV;AAAA,8BAAC,UAAK,WAAU,kCAAiC;AAAA,UACjD,oBAAC,UAAK,WAAU,YAAY,cAAI,QAAO;AAAA,UACvC,oBAAC,UAAK,WAAU,qBAAqB,cAAI,KAAI;AAAA,UAC7C,oBAAC,UAAK,WAAU,aAAa,cAAI,OAAM;AAAA;AAAA;AAAA,MANlC,IAAI;AAAA,IAOX,CACD,GACH;AAAA,KAEJ;AAEJ,CAAC;","names":["TradingProfileCard"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TradingStrategyPanel — displays Vincent strategy configuration.
|
|
3
|
+
*/
|
|
4
|
+
import type { VincentStrategy } from "./vincent-contracts";
|
|
5
|
+
interface TradingStrategyPanelProps {
|
|
6
|
+
strategy: VincentStrategy | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const TradingStrategyPanel: import("react").MemoExoticComponent<({ strategy, }: TradingStrategyPanelProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=TradingStrategyPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TradingStrategyPanel.d.ts","sourceRoot":"","sources":["../src/TradingStrategyPanel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,UAAU,yBAAyB;IACjC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;CAClC;AASD,eAAO,MAAM,oBAAoB,sDAE9B,yBAAyB,6CAuH1B,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, StatusBadge } from "@elizaos/ui";
|
|
3
|
+
import { useAgentElement } from "@elizaos/ui/agent-surface";
|
|
4
|
+
import {
|
|
5
|
+
Activity,
|
|
6
|
+
ExternalLink,
|
|
7
|
+
Gauge,
|
|
8
|
+
Repeat2,
|
|
9
|
+
Settings2
|
|
10
|
+
} from "lucide-react";
|
|
11
|
+
import { memo, useMemo } from "react";
|
|
12
|
+
const STRATEGY_LABELS = {
|
|
13
|
+
dca: "DCA",
|
|
14
|
+
rebalance: "Rebalance",
|
|
15
|
+
threshold: "Threshold",
|
|
16
|
+
manual: "Manual"
|
|
17
|
+
};
|
|
18
|
+
const TradingStrategyPanel = memo(function TradingStrategyPanel2({
|
|
19
|
+
strategy
|
|
20
|
+
}) {
|
|
21
|
+
const strategyName = strategy?.name ?? null;
|
|
22
|
+
const paramEntries = useMemo(
|
|
23
|
+
() => Object.entries(strategy?.params ?? {}),
|
|
24
|
+
[strategy?.params]
|
|
25
|
+
);
|
|
26
|
+
const openVincent = useAgentElement({
|
|
27
|
+
id: "link-open-vincent",
|
|
28
|
+
role: "link",
|
|
29
|
+
label: "Open Vincent",
|
|
30
|
+
group: "vincent-strategy",
|
|
31
|
+
description: "Open the Vincent dashboard at heyvincent.ai in a new tab"
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-3 px-1 py-3", children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
36
|
+
/* @__PURE__ */ jsx(Activity, { className: "h-4 w-4 text-accent" }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-txt", children: "Strategy" })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40
|
+
strategyName && /* @__PURE__ */ jsx(StatusBadge, { label: STRATEGY_LABELS[strategyName], tone: "muted" }),
|
|
41
|
+
strategy !== null && /* @__PURE__ */ jsx(StatusBadge, { label: "Configured", tone: "success", withDot: true })
|
|
42
|
+
] })
|
|
43
|
+
] }),
|
|
44
|
+
strategy === null && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-6 gap-y-2 px-1 text-xs font-semibold text-muted", children: [
|
|
45
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Settings2, { className: "h-4 w-4" }),
|
|
47
|
+
"Unset"
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
50
|
+
/* @__PURE__ */ jsx(Gauge, { className: "h-4 w-4" }),
|
|
51
|
+
"0%"
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Repeat2, { className: "h-4 w-4" }),
|
|
55
|
+
"Idle"
|
|
56
|
+
] })
|
|
57
|
+
] }),
|
|
58
|
+
strategy !== null && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-6 gap-y-2 px-1 text-xs font-semibold", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-accent", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Settings2, { className: "h-4 w-4" }),
|
|
62
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-txt", children: strategy.venues.join(" + ") || "Venue" })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-muted", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Repeat2, { className: "h-4 w-4" }),
|
|
66
|
+
/* @__PURE__ */ jsxs("span", { className: "tabular-nums text-txt", children: [
|
|
67
|
+
strategy.intervalSeconds,
|
|
68
|
+
"s"
|
|
69
|
+
] })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsxs(
|
|
72
|
+
"span",
|
|
73
|
+
{
|
|
74
|
+
className: `flex items-center gap-2 ${strategy.dryRun ? "text-warn" : "text-ok"}`,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsx(Gauge, { className: "h-4 w-4" }),
|
|
77
|
+
strategy.dryRun ? "Dry" : "Live"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-muted", children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Activity, { className: "h-4 w-4" }),
|
|
83
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-txt", children: paramEntries.length })
|
|
84
|
+
] })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
87
|
+
paramEntries.slice(0, 6).map(([key, val]) => /* @__PURE__ */ jsxs(
|
|
88
|
+
"span",
|
|
89
|
+
{
|
|
90
|
+
className: "inline-flex max-w-full items-center gap-1.5 px-1 py-1.5 text-xs font-semibold text-muted",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-accent/70" }),
|
|
93
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: key }),
|
|
94
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-24 truncate font-mono text-txt", children: String(val) })
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
key
|
|
98
|
+
)),
|
|
99
|
+
paramEntries.length > 6 ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center px-1 py-1.5 text-xs font-semibold text-muted", children: [
|
|
100
|
+
"+",
|
|
101
|
+
paramEntries.length - 6
|
|
102
|
+
] }) : null
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ jsx(
|
|
105
|
+
Button,
|
|
106
|
+
{
|
|
107
|
+
asChild: true,
|
|
108
|
+
variant: "outline",
|
|
109
|
+
size: "sm",
|
|
110
|
+
className: "h-9 w-fit px-4 text-xs font-semibold",
|
|
111
|
+
children: /* @__PURE__ */ jsxs(
|
|
112
|
+
"a",
|
|
113
|
+
{
|
|
114
|
+
ref: openVincent.ref,
|
|
115
|
+
...openVincent.agentProps,
|
|
116
|
+
href: "https://heyvincent.ai",
|
|
117
|
+
target: "_blank",
|
|
118
|
+
rel: "noreferrer",
|
|
119
|
+
children: [
|
|
120
|
+
"Open Vincent",
|
|
121
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5" })
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] })
|
|
128
|
+
] });
|
|
129
|
+
});
|
|
130
|
+
export {
|
|
131
|
+
TradingStrategyPanel
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=TradingStrategyPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/TradingStrategyPanel.tsx"],"sourcesContent":["/**\n * TradingStrategyPanel — displays Vincent strategy configuration.\n */\n\nimport { Button, StatusBadge } from \"@elizaos/ui\";\nimport { useAgentElement } from \"@elizaos/ui/agent-surface\";\nimport {\n Activity,\n ExternalLink,\n Gauge,\n Repeat2,\n Settings2,\n} from \"lucide-react\";\nimport { memo, useMemo } from \"react\";\nimport type { VincentStrategy } from \"./vincent-contracts.js\";\n\ninterface TradingStrategyPanelProps {\n strategy: VincentStrategy | null;\n}\n\nconst STRATEGY_LABELS: Record<VincentStrategy[\"name\"], string> = {\n dca: \"DCA\",\n rebalance: \"Rebalance\",\n threshold: \"Threshold\",\n manual: \"Manual\",\n};\n\nexport const TradingStrategyPanel = memo(function TradingStrategyPanel({\n strategy,\n}: TradingStrategyPanelProps) {\n const strategyName = strategy?.name ?? null;\n const paramEntries = useMemo(\n () => Object.entries(strategy?.params ?? {}),\n [strategy?.params],\n );\n\n const openVincent = useAgentElement<HTMLAnchorElement>({\n id: \"link-open-vincent\",\n role: \"link\",\n label: \"Open Vincent\",\n group: \"vincent-strategy\",\n description: \"Open the Vincent dashboard at heyvincent.ai in a new tab\",\n });\n\n return (\n <div className=\"space-y-3 px-1 py-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex items-center gap-2\">\n <Activity className=\"h-4 w-4 text-accent\" />\n <span className=\"text-sm font-semibold text-txt\">Strategy</span>\n </div>\n <div className=\"flex items-center gap-2\">\n {strategyName && (\n <StatusBadge label={STRATEGY_LABELS[strategyName]} tone=\"muted\" />\n )}\n {strategy !== null && (\n <StatusBadge label=\"Configured\" tone=\"success\" withDot />\n )}\n </div>\n </div>\n\n {strategy === null && (\n <div className=\"flex flex-wrap items-center gap-x-6 gap-y-2 px-1 text-xs font-semibold text-muted\">\n <span className=\"flex items-center gap-2\">\n <Settings2 className=\"h-4 w-4\" />\n Unset\n </span>\n <span className=\"flex items-center gap-2\">\n <Gauge className=\"h-4 w-4\" />\n 0%\n </span>\n <span className=\"flex items-center gap-2\">\n <Repeat2 className=\"h-4 w-4\" />\n Idle\n </span>\n </div>\n )}\n\n {strategy !== null && (\n <>\n <div className=\"flex flex-wrap items-center gap-x-6 gap-y-2 px-1 text-xs font-semibold\">\n <span className=\"flex items-center gap-2 text-accent\">\n <Settings2 className=\"h-4 w-4\" />\n <span className=\"truncate text-txt\">\n {strategy.venues.join(\" + \") || \"Venue\"}\n </span>\n </span>\n <span className=\"flex items-center gap-2 text-muted\">\n <Repeat2 className=\"h-4 w-4\" />\n <span className=\"tabular-nums text-txt\">\n {strategy.intervalSeconds}s\n </span>\n </span>\n <span\n className={`flex items-center gap-2 ${strategy.dryRun ? \"text-warn\" : \"text-ok\"}`}\n >\n <Gauge className=\"h-4 w-4\" />\n {strategy.dryRun ? \"Dry\" : \"Live\"}\n </span>\n <span className=\"flex items-center gap-2 text-muted\">\n <Activity className=\"h-4 w-4\" />\n <span className=\"tabular-nums text-txt\">\n {paramEntries.length}\n </span>\n </span>\n </div>\n\n <div className=\"flex flex-wrap gap-2\">\n {paramEntries.slice(0, 6).map(([key, val]) => (\n <span\n key={key}\n className=\"inline-flex max-w-full items-center gap-1.5 px-1 py-1.5 text-xs font-semibold text-muted\"\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-accent/70\" />\n <span className=\"truncate\">{key}</span>\n <span className=\"max-w-24 truncate font-mono text-txt\">\n {String(val)}\n </span>\n </span>\n ))}\n {paramEntries.length > 6 ? (\n <span className=\"inline-flex items-center px-1 py-1.5 text-xs font-semibold text-muted\">\n +{paramEntries.length - 6}\n </span>\n ) : null}\n </div>\n\n <Button\n asChild\n variant=\"outline\"\n size=\"sm\"\n className=\"h-9 w-fit px-4 text-xs font-semibold\"\n >\n <a\n ref={openVincent.ref}\n {...openVincent.agentProps}\n href=\"https://heyvincent.ai\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n Open Vincent\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </Button>\n </>\n )}\n </div>\n );\n});\n"],"mappings":"AA+CQ,SAgCA,UA/BE,KADF;AA3CR,SAAS,QAAQ,mBAAmB;AACpC,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MA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YAAY;AAAA,cAChB,GAAG,YAAY;AAAA,cAChB,MAAK;AAAA,cACL,QAAO;AAAA,cACP,KAAI;AAAA,cACL;AAAA;AAAA,gBAEC,oBAAC,gBAAa,WAAU,eAAc;AAAA;AAAA;AAAA,UACxC;AAAA;AAAA,MACF;AAAA,OACF;AAAA,KAEJ;AAEJ,CAAC;","names":["TradingStrategyPanel"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** VincentAppView — full-screen overlay app for Vincent trading access. */
|
|
2
|
+
import type { OverlayAppContext } from "@elizaos/ui";
|
|
3
|
+
export declare function VincentAppView({ exitToApps, t }: OverlayAppContext): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=VincentAppView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VincentAppView.d.ts","sourceRoot":"","sources":["../src/VincentAppView.tsx"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,iBAAiB,2CAmJlE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WalletAddresses, WalletBalancesResponse } from "@elizaos/shared";
|
|
2
|
+
import type { VincentStatusResponse, VincentStrategyResponse, VincentTradingProfileResponse } from "./vincent-contracts";
|
|
3
|
+
export declare function loadVincentTuiState(): Promise<{
|
|
4
|
+
status: VincentStatusResponse;
|
|
5
|
+
walletAddresses: WalletAddresses | null;
|
|
6
|
+
walletBalances: WalletBalancesResponse | null;
|
|
7
|
+
strategy: VincentStrategyResponse;
|
|
8
|
+
tradingProfile: VincentTradingProfileResponse;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=VincentAppView.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VincentAppView.helpers.d.ts","sourceRoot":"","sources":["../src/VincentAppView.helpers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,qBAAqB,CAAC;AAE7B,wBAAsB,mBAAmB,IAAI,OAAO,CAAC;IACnD,MAAM,EAAE,qBAAqB,CAAC;IAC9B,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,cAAc,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC9C,QAAQ,EAAE,uBAAuB,CAAC;IAClC,cAAc,EAAE,6BAA6B,CAAC;CAC/C,CAAC,CAyBD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { vincentClient } from "./client.js";
|
|
2
|
+
async function loadVincentTuiState() {
|
|
3
|
+
const status = await vincentClient.vincentStatus();
|
|
4
|
+
const [walletAddresses, walletBalances, strategy, tradingProfile] = await Promise.allSettled([
|
|
5
|
+
vincentClient.getWalletAddresses(),
|
|
6
|
+
vincentClient.getWalletBalances(),
|
|
7
|
+
vincentClient.vincentStrategy(),
|
|
8
|
+
vincentClient.vincentTradingProfile()
|
|
9
|
+
]);
|
|
10
|
+
return {
|
|
11
|
+
status,
|
|
12
|
+
walletAddresses: walletAddresses.status === "fulfilled" ? walletAddresses.value : null,
|
|
13
|
+
walletBalances: walletBalances.status === "fulfilled" ? walletBalances.value : null,
|
|
14
|
+
strategy: strategy.status === "fulfilled" ? strategy.value : { connected: status.connected, strategy: null },
|
|
15
|
+
tradingProfile: tradingProfile.status === "fulfilled" ? tradingProfile.value : { connected: status.connected, profile: null }
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
loadVincentTuiState
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=VincentAppView.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/VincentAppView.helpers.ts"],"sourcesContent":["// Shared data helper for the Vincent terminal `interact` capability handler\n// (in VincentAppView.interact.ts), which loads the full dashboard snapshot for\n// the terminal-vincent-state / start-login / disconnect / update-strategy\n// capabilities. Kept out of the .tsx so that file exports only React components\n// and stays Fast-Refresh-compatible in dev.\nimport type { WalletAddresses, WalletBalancesResponse } from \"@elizaos/shared\";\nimport { vincentClient } from \"./client.js\";\nimport type {\n VincentStatusResponse,\n VincentStrategyResponse,\n VincentTradingProfileResponse,\n} from \"./vincent-contracts.js\";\n\nexport async function loadVincentTuiState(): Promise<{\n status: VincentStatusResponse;\n walletAddresses: WalletAddresses | null;\n walletBalances: WalletBalancesResponse | null;\n strategy: VincentStrategyResponse;\n tradingProfile: VincentTradingProfileResponse;\n}> {\n const status = await vincentClient.vincentStatus();\n const [walletAddresses, walletBalances, strategy, tradingProfile] =\n await Promise.allSettled([\n vincentClient.getWalletAddresses(),\n vincentClient.getWalletBalances(),\n vincentClient.vincentStrategy(),\n vincentClient.vincentTradingProfile(),\n ]);\n\n return {\n status,\n walletAddresses:\n walletAddresses.status === \"fulfilled\" ? walletAddresses.value : null,\n walletBalances:\n walletBalances.status === \"fulfilled\" ? walletBalances.value : null,\n strategy:\n strategy.status === \"fulfilled\"\n ? strategy.value\n : { connected: status.connected, strategy: null },\n tradingProfile:\n tradingProfile.status === \"fulfilled\"\n ? tradingProfile.value\n : { connected: status.connected, profile: null },\n };\n}\n"],"mappings":"AAMA,SAAS,qBAAqB;AAO9B,eAAsB,sBAMnB;AACD,QAAM,SAAS,MAAM,cAAc,cAAc;AACjD,QAAM,CAAC,iBAAiB,gBAAgB,UAAU,cAAc,IAC9D,MAAM,QAAQ,WAAW;AAAA,IACvB,cAAc,mBAAmB;AAAA,IACjC,cAAc,kBAAkB;AAAA,IAChC,cAAc,gBAAgB;AAAA,IAC9B,cAAc,sBAAsB;AAAA,EACtC,CAAC;AAEH,SAAO;AAAA,IACL;AAAA,IACA,iBACE,gBAAgB,WAAW,cAAc,gBAAgB,QAAQ;AAAA,IACnE,gBACE,eAAe,WAAW,cAAc,eAAe,QAAQ;AAAA,IACjE,UACE,SAAS,WAAW,cAChB,SAAS,QACT,EAAE,WAAW,OAAO,WAAW,UAAU,KAAK;AAAA,IACpD,gBACE,eAAe,WAAW,cACtB,eAAe,QACf,EAAE,WAAW,OAAO,WAAW,SAAS,KAAK;AAAA,EACrD;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VincentAppView.interact.d.ts","sourceRoot":"","sources":["../src/VincentAppView.interact.ts"],"names":[],"mappings":"AAQA,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,OAAO,CAAC,CA2ClB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { vincentClient } from "./client.js";
|
|
2
|
+
import { loadVincentTuiState } from "./VincentAppView.helpers";
|
|
3
|
+
async function interact(capability, params) {
|
|
4
|
+
if (capability === "terminal-vincent-state") {
|
|
5
|
+
return { viewType: "tui", ...await loadVincentTuiState() };
|
|
6
|
+
}
|
|
7
|
+
if (capability === "terminal-vincent-start-login") {
|
|
8
|
+
return {
|
|
9
|
+
viewType: "tui",
|
|
10
|
+
login: await vincentClient.vincentStartLogin(
|
|
11
|
+
typeof params?.appName === "string" ? params.appName : "Eliza"
|
|
12
|
+
)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
if (capability === "terminal-vincent-disconnect") {
|
|
16
|
+
return {
|
|
17
|
+
viewType: "tui",
|
|
18
|
+
disconnected: await vincentClient.vincentDisconnect()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (capability === "terminal-vincent-update-strategy") {
|
|
22
|
+
const request = {};
|
|
23
|
+
if (typeof params?.strategy === "string") {
|
|
24
|
+
request.strategy = params.strategy;
|
|
25
|
+
}
|
|
26
|
+
if (params?.params && typeof params.params === "object") {
|
|
27
|
+
request.params = params.params;
|
|
28
|
+
}
|
|
29
|
+
if (typeof params?.intervalSeconds === "number") {
|
|
30
|
+
request.intervalSeconds = params.intervalSeconds;
|
|
31
|
+
}
|
|
32
|
+
if (typeof params?.dryRun === "boolean") {
|
|
33
|
+
request.dryRun = params.dryRun;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
viewType: "tui",
|
|
37
|
+
update: await vincentClient.vincentUpdateStrategy(request)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
throw new Error(`Unsupported capability "${capability}"`);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
interact
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=VincentAppView.interact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/VincentAppView.interact.ts"],"sourcesContent":["// View-bundle `interact` capability handler, split out of VincentAppView.tsx\n// so that file exports only React components and stays Fast-Refresh-compatible\n// (Vite would full-reload a component file that also exports a plain function).\n// The view bundle re-exports `interact` via ./vincent-view-bundle.ts.\nimport { vincentClient } from \"./client.js\";\nimport { loadVincentTuiState } from \"./VincentAppView.helpers\";\nimport type { VincentStrategyUpdateRequest } from \"./vincent-contracts.js\";\n\nexport async function interact(\n capability: string,\n params?: Record<string, unknown>,\n): Promise<unknown> {\n if (capability === \"terminal-vincent-state\") {\n return { viewType: \"tui\", ...(await loadVincentTuiState()) };\n }\n\n if (capability === \"terminal-vincent-start-login\") {\n return {\n viewType: \"tui\",\n login: await vincentClient.vincentStartLogin(\n typeof params?.appName === \"string\" ? params.appName : \"Eliza\",\n ),\n };\n }\n\n if (capability === \"terminal-vincent-disconnect\") {\n return {\n viewType: \"tui\",\n disconnected: await vincentClient.vincentDisconnect(),\n };\n }\n\n if (capability === \"terminal-vincent-update-strategy\") {\n const request: VincentStrategyUpdateRequest = {};\n if (typeof params?.strategy === \"string\") {\n request.strategy =\n params.strategy as VincentStrategyUpdateRequest[\"strategy\"];\n }\n if (params?.params && typeof params.params === \"object\") {\n request.params = params.params as Record<string, unknown>;\n }\n if (typeof params?.intervalSeconds === \"number\") {\n request.intervalSeconds = params.intervalSeconds;\n }\n if (typeof params?.dryRun === \"boolean\") {\n request.dryRun = params.dryRun;\n }\n return {\n viewType: \"tui\",\n update: await vincentClient.vincentUpdateStrategy(request),\n };\n }\n\n throw new Error(`Unsupported capability \"${capability}\"`);\n}\n"],"mappings":"AAIA,SAAS,qBAAqB;AAC9B,SAAS,2BAA2B;AAGpC,eAAsB,SACpB,YACA,QACkB;AAClB,MAAI,eAAe,0BAA0B;AAC3C,WAAO,EAAE,UAAU,OAAO,GAAI,MAAM,oBAAoB,EAAG;AAAA,EAC7D;AAEA,MAAI,eAAe,gCAAgC;AACjD,WAAO;AAAA,MACL,UAAU;AAAA,MACV,OAAO,MAAM,cAAc;AAAA,QACzB,OAAO,QAAQ,YAAY,WAAW,OAAO,UAAU;AAAA,MACzD;AAAA,IACF;AAAA,EACF;AAEA,MAAI,eAAe,+BAA+B;AAChD,WAAO;AAAA,MACL,UAAU;AAAA,MACV,cAAc,MAAM,cAAc,kBAAkB;AAAA,IACtD;AAAA,EACF;AAEA,MAAI,eAAe,oCAAoC;AACrD,UAAM,UAAwC,CAAC;AAC/C,QAAI,OAAO,QAAQ,aAAa,UAAU;AACxC,cAAQ,WACN,OAAO;AAAA,IACX;AACA,QAAI,QAAQ,UAAU,OAAO,OAAO,WAAW,UAAU;AACvD,cAAQ,SAAS,OAAO;AAAA,IAC1B;AACA,QAAI,OAAO,QAAQ,oBAAoB,UAAU;AAC/C,cAAQ,kBAAkB,OAAO;AAAA,IACnC;AACA,QAAI,OAAO,QAAQ,WAAW,WAAW;AACvC,cAAQ,SAAS,OAAO;AAAA,IAC1B;AACA,WAAO;AAAA,MACL,UAAU;AAAA,MACV,QAAQ,MAAM,cAAc,sBAAsB,OAAO;AAAA,IAC3D;AAAA,EACF;AAEA,QAAM,IAAI,MAAM,2BAA2B,UAAU,GAAG;AAC1D;","names":[]}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, PagePanel, Spinner, useAppSelector } from "@elizaos/ui";
|
|
3
|
+
import { useAgentElement } from "@elizaos/ui/agent-surface";
|
|
4
|
+
import {
|
|
5
|
+
ArrowLeft,
|
|
6
|
+
KeyRound,
|
|
7
|
+
RefreshCw,
|
|
8
|
+
ShieldCheck,
|
|
9
|
+
Wallet
|
|
10
|
+
} from "lucide-react";
|
|
11
|
+
import { TradingProfileCard } from "./TradingProfileCard.js";
|
|
12
|
+
import { TradingStrategyPanel } from "./TradingStrategyPanel.js";
|
|
13
|
+
import { useVincentDashboard } from "./useVincentDashboard.js";
|
|
14
|
+
import { VincentConnectionCard } from "./VincentConnectionCard.js";
|
|
15
|
+
import { WalletStatusCard } from "./WalletStatusCard.js";
|
|
16
|
+
function VincentAppView({ exitToApps, t }) {
|
|
17
|
+
const setActionNotice = useAppSelector((s) => s.setActionNotice);
|
|
18
|
+
const backLabel = t("nav.back", { defaultValue: "Back" });
|
|
19
|
+
const refreshLabel = t("actions.refresh", { defaultValue: "Refresh" });
|
|
20
|
+
const back = useAgentElement({
|
|
21
|
+
id: "action-back",
|
|
22
|
+
role: "button",
|
|
23
|
+
label: backLabel,
|
|
24
|
+
group: "vincent-header",
|
|
25
|
+
description: "Exit the Vincent app and return to the apps grid"
|
|
26
|
+
});
|
|
27
|
+
const refreshControl = useAgentElement({
|
|
28
|
+
id: "action-refresh",
|
|
29
|
+
role: "button",
|
|
30
|
+
label: refreshLabel,
|
|
31
|
+
group: "vincent-header",
|
|
32
|
+
description: "Reload Vincent connection status, wallet, strategy and P&L"
|
|
33
|
+
});
|
|
34
|
+
const {
|
|
35
|
+
vincentConnected,
|
|
36
|
+
walletAddresses,
|
|
37
|
+
walletBalances,
|
|
38
|
+
strategy,
|
|
39
|
+
tradingProfile,
|
|
40
|
+
loading,
|
|
41
|
+
error,
|
|
42
|
+
refresh
|
|
43
|
+
} = useVincentDashboard();
|
|
44
|
+
return /* @__PURE__ */ jsxs(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
"data-testid": "vincent-shell",
|
|
48
|
+
className: "fixed inset-0 z-50 flex h-[100vh] flex-col overflow-hidden bg-bg pb-[var(--safe-area-bottom,0px)] pl-[var(--safe-area-left,0px)] pr-[var(--safe-area-right,0px)] pt-[var(--safe-area-top,0px)] supports-[height:100dvh]:h-[100dvh]",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center justify-between gap-3 px-3 py-2", children: [
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Button,
|
|
54
|
+
{
|
|
55
|
+
ref: back.ref,
|
|
56
|
+
...back.agentProps,
|
|
57
|
+
variant: "ghost",
|
|
58
|
+
size: "icon",
|
|
59
|
+
className: "h-9 w-9 shrink-0 text-muted hover:text-txt",
|
|
60
|
+
onClick: exitToApps,
|
|
61
|
+
"aria-label": backLabel,
|
|
62
|
+
children: /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-txt", children: "Vincent" }) })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
68
|
+
/* @__PURE__ */ jsxs(
|
|
69
|
+
"span",
|
|
70
|
+
{
|
|
71
|
+
"data-testid": "vincent-status-card",
|
|
72
|
+
className: `inline-flex max-w-[8.5rem] items-center gap-1.5 px-1 py-1 text-xs-tight font-semibold ${vincentConnected ? "text-ok" : "text-muted"}`,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
className: `h-1.5 w-1.5 shrink-0 rounded-full ${vincentConnected ? "bg-ok" : "bg-muted"}`
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: vincentConnected ? t("vincent.statusConnected", { defaultValue: "Connected" }) : t("vincent.statusDisconnected", {
|
|
81
|
+
defaultValue: "Disconnected"
|
|
82
|
+
}) })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
Button,
|
|
88
|
+
{
|
|
89
|
+
ref: refreshControl.ref,
|
|
90
|
+
...refreshControl.agentProps,
|
|
91
|
+
variant: "ghost",
|
|
92
|
+
size: "icon",
|
|
93
|
+
className: "h-9 w-9 text-muted hover:text-txt",
|
|
94
|
+
onClick: refresh,
|
|
95
|
+
disabled: loading,
|
|
96
|
+
"aria-label": refreshLabel,
|
|
97
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { className: `h-4 w-4 ${loading ? "animate-spin" : ""}` })
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] })
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ jsx("div", { className: "chat-native-scrollbar flex-1 overflow-y-auto px-3 pb-32 pt-2 sm:px-5 sm:pb-36", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl", children: [
|
|
103
|
+
error && /* @__PURE__ */ jsx(PagePanel.Notice, { tone: "danger", children: error }),
|
|
104
|
+
loading && !vincentConnected && walletAddresses === null && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center py-16", children: [
|
|
105
|
+
/* @__PURE__ */ jsx(Spinner, { className: "h-5 w-5 text-muted" }),
|
|
106
|
+
/* @__PURE__ */ jsx("span", { className: "ml-3 text-sm text-muted", children: "Loading\u2026" })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
109
|
+
/* @__PURE__ */ jsx(VincentConnectionCard, { setActionNotice, t }),
|
|
110
|
+
vincentConnected && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
WalletStatusCard,
|
|
113
|
+
{
|
|
114
|
+
walletAddresses,
|
|
115
|
+
walletBalances,
|
|
116
|
+
setActionNotice
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ jsx(TradingStrategyPanel, { strategy }),
|
|
120
|
+
/* @__PURE__ */ jsx(TradingProfileCard, { tradingProfile })
|
|
121
|
+
] }),
|
|
122
|
+
!vincentConnected && !loading && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-6 gap-y-3 px-1 py-2 text-sm font-semibold text-muted", children: [
|
|
123
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-accent", children: [
|
|
124
|
+
/* @__PURE__ */ jsx(ShieldCheck, { className: "h-4 w-4" }),
|
|
125
|
+
"Vincent"
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
128
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-4 w-4" }),
|
|
129
|
+
"Wallet"
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
132
|
+
/* @__PURE__ */ jsx(KeyRound, { className: "h-4 w-4" }),
|
|
133
|
+
"OAuth"
|
|
134
|
+
] })
|
|
135
|
+
] })
|
|
136
|
+
] }) })
|
|
137
|
+
] }) })
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
export {
|
|
143
|
+
VincentAppView
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=VincentAppView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/VincentAppView.tsx"],"sourcesContent":["/** VincentAppView — full-screen overlay app for Vincent trading access. */\n\nimport type { OverlayAppContext } from \"@elizaos/ui\";\nimport { Button, PagePanel, Spinner, useAppSelector } from \"@elizaos/ui\";\nimport { useAgentElement } from \"@elizaos/ui/agent-surface\";\nimport {\n ArrowLeft,\n KeyRound,\n RefreshCw,\n ShieldCheck,\n Wallet,\n} from \"lucide-react\";\nimport { TradingProfileCard } from \"./TradingProfileCard.js\";\nimport { TradingStrategyPanel } from \"./TradingStrategyPanel.js\";\nimport { useVincentDashboard } from \"./useVincentDashboard.js\";\nimport { VincentConnectionCard } from \"./VincentConnectionCard.js\";\nimport { WalletStatusCard } from \"./WalletStatusCard.js\";\n\nexport function VincentAppView({ exitToApps, t }: OverlayAppContext) {\n // Subscribe to only the stable `setActionNotice` callback instead of the whole\n // AppContext value, which is rebuilt on a large dependency array — this stops\n // VincentAppView (and its card subtree) re-rendering on unrelated context churn.\n const setActionNotice = useAppSelector((s) => s.setActionNotice);\n\n const backLabel = t(\"nav.back\", { defaultValue: \"Back\" });\n const refreshLabel = t(\"actions.refresh\", { defaultValue: \"Refresh\" });\n const back = useAgentElement<HTMLButtonElement>({\n id: \"action-back\",\n role: \"button\",\n label: backLabel,\n group: \"vincent-header\",\n description: \"Exit the Vincent app and return to the apps grid\",\n });\n const refreshControl = useAgentElement<HTMLButtonElement>({\n id: \"action-refresh\",\n role: \"button\",\n label: refreshLabel,\n group: \"vincent-header\",\n description: \"Reload Vincent connection status, wallet, strategy and P&L\",\n });\n\n const {\n vincentConnected,\n walletAddresses,\n walletBalances,\n strategy,\n tradingProfile,\n loading,\n error,\n refresh,\n } = useVincentDashboard();\n\n return (\n <div\n data-testid=\"vincent-shell\"\n className=\"fixed inset-0 z-50 flex h-[100vh] flex-col overflow-hidden bg-bg pb-[var(--safe-area-bottom,0px)] pl-[var(--safe-area-left,0px)] pr-[var(--safe-area-right,0px)] pt-[var(--safe-area-top,0px)] supports-[height:100dvh]:h-[100dvh]\"\n >\n {/* Header */}\n <div className=\"flex shrink-0 items-center justify-between gap-3 px-3 py-2\">\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">\n <Button\n ref={back.ref}\n {...back.agentProps}\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-9 w-9 shrink-0 text-muted hover:text-txt\"\n onClick={exitToApps}\n aria-label={backLabel}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <div className=\"min-w-0\">\n <h1 className=\"text-base font-semibold text-txt\">Vincent</h1>\n </div>\n </div>\n\n <div className=\"flex shrink-0 items-center gap-2\">\n {/* Connection status pill */}\n <span\n data-testid=\"vincent-status-card\"\n className={`inline-flex max-w-[8.5rem] items-center gap-1.5 px-1 py-1 text-xs-tight font-semibold ${\n vincentConnected ? \"text-ok\" : \"text-muted\"\n }`}\n >\n <span\n className={`h-1.5 w-1.5 shrink-0 rounded-full ${vincentConnected ? \"bg-ok\" : \"bg-muted\"}`}\n />\n <span className=\"truncate\">\n {vincentConnected\n ? t(\"vincent.statusConnected\", { defaultValue: \"Connected\" })\n : t(\"vincent.statusDisconnected\", {\n defaultValue: \"Disconnected\",\n })}\n </span>\n </span>\n\n <Button\n ref={refreshControl.ref}\n {...refreshControl.agentProps}\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-9 w-9 text-muted hover:text-txt\"\n onClick={refresh}\n disabled={loading}\n aria-label={refreshLabel}\n >\n <RefreshCw className={`h-4 w-4 ${loading ? \"animate-spin\" : \"\"}`} />\n </Button>\n </div>\n </div>\n\n {/* Scrollable content */}\n <div className=\"chat-native-scrollbar flex-1 overflow-y-auto px-3 pb-32 pt-2 sm:px-5 sm:pb-36\">\n <div className=\"mx-auto max-w-5xl\">\n {/* Error banner */}\n {error && <PagePanel.Notice tone=\"danger\">{error}</PagePanel.Notice>}\n\n {/* Initial loading state */}\n {loading && !vincentConnected && walletAddresses === null && (\n <div className=\"flex items-center justify-center py-16\">\n <Spinner className=\"h-5 w-5 text-muted\" />\n <span className=\"ml-3 text-sm text-muted\">Loading…</span>\n </div>\n )}\n\n <div className=\"flex flex-col gap-4\">\n <div className=\"space-y-3\">\n <VincentConnectionCard setActionNotice={setActionNotice} t={t} />\n\n {vincentConnected && (\n <>\n <WalletStatusCard\n walletAddresses={walletAddresses}\n walletBalances={walletBalances}\n setActionNotice={setActionNotice}\n />\n\n <TradingStrategyPanel strategy={strategy} />\n\n <TradingProfileCard tradingProfile={tradingProfile} />\n </>\n )}\n\n {!vincentConnected && !loading && (\n <div className=\"flex flex-wrap items-center gap-x-6 gap-y-3 px-1 py-2 text-sm font-semibold text-muted\">\n <span className=\"flex items-center gap-2 text-accent\">\n <ShieldCheck className=\"h-4 w-4\" />\n Vincent\n </span>\n <span className=\"flex items-center gap-2\">\n <Wallet className=\"h-4 w-4\" />\n Wallet\n </span>\n <span className=\"flex items-center gap-2\">\n <KeyRound className=\"h-4 w-4\" />\n OAuth\n </span>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":"AA2DQ,SAuEQ,UA7DJ,KAVJ;AAxDR,SAAS,QAAQ,WAAW,SAAS,sBAAsB;AAC3D,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AAE1B,SAAS,eAAe,EAAE,YAAY,EAAE,GAAsB;AAInE,QAAM,kBAAkB,eAAe,CAAC,MAAM,EAAE,eAAe;AAE/D,QAAM,YAAY,EAAE,YAAY,EAAE,cAAc,OAAO,CAAC;AACxD,QAAM,eAAe,EAAE,mBAAmB,EAAE,cAAc,UAAU,CAAC;AACrE,QAAM,OAAO,gBAAmC;AAAA,IAC9C,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,OAAO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,0 +1,9 @@
|
|
|
1
|
+
/** VincentConnectionCard — OAuth connect/disconnect UI for Vincent. */
|
|
2
|
+
interface VincentConnectionCardProps {
|
|
3
|
+
onConnectedChange?: (connected: boolean) => void;
|
|
4
|
+
setActionNotice: (text: string, tone?: "info" | "success" | "error", ttlMs?: number) => void;
|
|
5
|
+
t: (key: string, opts?: Record<string, unknown>) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare const VincentConnectionCard: import("react").MemoExoticComponent<({ setActionNotice, t, }: VincentConnectionCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=VincentConnectionCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VincentConnectionCard.d.ts","sourceRoot":"","sources":["../src/VincentConnectionCard.tsx"],"names":[],"mappings":"AAAA,uEAAuE;AAQvE,UAAU,0BAA0B;IAClC,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,eAAe,EAAE,CACf,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,EACnC,KAAK,CAAC,EAAE,MAAM,KACX,IAAI,CAAC;IACV,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;CAC5D;AAiBD,eAAO,MAAM,qBAAqB,gEAG/B,0BAA0B,6CA4G3B,CAAC"}
|