ghostykit 0.11.0 → 0.11.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.
|
@@ -21,8 +21,10 @@ function namedVerb(t, verbs) {
|
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
function stepLabel(t, verbs, fallback = "Paso") {
|
|
24
|
-
|
|
24
|
+
const rawLabel = !!t.label && !/\s/.test(t.label);
|
|
25
|
+
if (t.label && !rawLabel) return t.label;
|
|
25
26
|
const named = namedVerb(t, verbs);
|
|
27
|
+
if (!named && t.label) return t.label;
|
|
26
28
|
if (named) return isRunning(t) && named.verb.running ? named.verb.running : named.verb.one;
|
|
27
29
|
return t.title ?? t.kind ?? fallback;
|
|
28
30
|
}
|
|
@@ -72,6 +74,8 @@ var TOOL_VERBS_ES = {
|
|
|
72
74
|
glob: { one: "Busqu\xE9 archivos", many: "Busqu\xE9 archivos" },
|
|
73
75
|
search: { one: "Busqu\xE9", many: "Busqu\xE9 %n veces" },
|
|
74
76
|
tool_search: { one: "Busqu\xE9 una herramienta", many: "Busqu\xE9 %n herramientas" },
|
|
77
|
+
ToolSearch: { one: "Busqu\xE9 una herramienta", many: "Busqu\xE9 %n herramientas" },
|
|
78
|
+
create_document: { one: "Arm\xE9 el documento", many: "Arm\xE9 %n documentos" },
|
|
75
79
|
web_search: { one: "Busqu\xE9 en la web", many: "Busqu\xE9 en la web" },
|
|
76
80
|
web_fetch: { one: "Abr\xED una p\xE1gina", many: "Abr\xED %n p\xE1ginas" },
|
|
77
81
|
fetch: { one: "Abr\xED una p\xE1gina", many: "Abr\xED %n p\xE1ginas" },
|
package/dist/core/index.js
CHANGED
package/dist/plugins/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
definePlugin,
|
|
4
4
|
pluginPoints,
|
|
5
5
|
pluginRequires
|
|
6
|
-
} from "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-MGRCZENR.js";
|
|
7
|
+
import "../chunks/chunk-EJPAMT4B.js";
|
|
8
8
|
import "../chunks/chunk-6U545WJG.js";
|
|
9
9
|
import "../chunks/chunk-5DVFSEQM.js";
|
|
10
10
|
|
package/dist/react/index.js
CHANGED
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
resolvePlugins,
|
|
49
49
|
rootProps,
|
|
50
50
|
usePiloto
|
|
51
|
-
} from "../chunks/chunk-
|
|
51
|
+
} from "../chunks/chunk-MGRCZENR.js";
|
|
52
52
|
import {
|
|
53
53
|
TOOL_VERBS_EN,
|
|
54
54
|
TOOL_VERBS_ES,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
summarizeTools,
|
|
59
59
|
toolName,
|
|
60
60
|
toolNames
|
|
61
|
-
} from "../chunks/chunk-
|
|
61
|
+
} from "../chunks/chunk-EJPAMT4B.js";
|
|
62
62
|
import {
|
|
63
63
|
applyReferences,
|
|
64
64
|
cleanUserText,
|
|
@@ -823,6 +823,19 @@ function AgentBody({ turn, live, onRetry, onOption, showUsage, showCopy, showDur
|
|
|
823
823
|
// src/react/Delivery.tsx
|
|
824
824
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
825
825
|
var kb = (n) => !n ? null : n < 1024 * 1024 ? `${Math.max(1, Math.round(n / 1024))} KB` : `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
826
|
+
var KIND_COLORS = {
|
|
827
|
+
PDF: "#E5252A",
|
|
828
|
+
XLSX: "#1D6F42",
|
|
829
|
+
XLS: "#1D6F42",
|
|
830
|
+
CSV: "#1D6F42",
|
|
831
|
+
DOCX: "#2B579A",
|
|
832
|
+
DOC: "#2B579A",
|
|
833
|
+
PPTX: "#C43E1C",
|
|
834
|
+
HTML: "#E8710A",
|
|
835
|
+
PNG: "#7C3AED",
|
|
836
|
+
JPG: "#7C3AED",
|
|
837
|
+
ZIP: "#6B7280"
|
|
838
|
+
};
|
|
826
839
|
var kind = (mime, name) => {
|
|
827
840
|
const ext = name?.split(".").pop()?.toUpperCase();
|
|
828
841
|
if (mime === "application/pdf") return "PDF";
|
|
@@ -833,15 +846,28 @@ function DeliveryCard({ entry, locale = "es" }) {
|
|
|
833
846
|
if (!d.url) return null;
|
|
834
847
|
const name = d.nombre || d.titulo || "archivo";
|
|
835
848
|
const download = d.url + (d.url.includes("?") ? "&" : "?") + "download=1";
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
849
|
+
const type = kind(d.mime, name);
|
|
850
|
+
const meta = [type, kb(d.size)].filter(Boolean).join(" \xB7 ");
|
|
851
|
+
const openLabel = locale === "en" ? "Open" : "Abrir";
|
|
852
|
+
const downloadLabel = locale === "en" ? `Download ${name}` : `Descargar ${name}`;
|
|
853
|
+
return /* @__PURE__ */ jsxs5("div", { className: "piloto-delivery mt-3 flex max-w-md items-center gap-1 rounded-xl border border-irongray/20 bg-irongray/5 pr-2 transition-colors hover:border-brand-500/40 hover:bg-brand-500/5", children: [
|
|
854
|
+
/* @__PURE__ */ jsxs5("a", { href: download, download: name, className: "flex min-w-0 flex-1 items-center gap-3 p-3", title: downloadLabel, "aria-label": downloadLabel, children: [
|
|
855
|
+
/* @__PURE__ */ jsx7(
|
|
856
|
+
"span",
|
|
857
|
+
{
|
|
858
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-[10px] font-bold tracking-wide text-white",
|
|
859
|
+
style: { background: KIND_COLORS[type] ?? "#6B7280" },
|
|
860
|
+
"aria-hidden": true,
|
|
861
|
+
children: type === "Archivo" ? /* @__PURE__ */ jsx7(FileText, { size: 20, strokeWidth: 1.8 }) : type
|
|
862
|
+
}
|
|
863
|
+
),
|
|
864
|
+
/* @__PURE__ */ jsxs5("span", { className: "min-w-0 flex-1", children: [
|
|
865
|
+
/* @__PURE__ */ jsx7("span", { className: "block truncate text-sm font-medium text-dark", children: d.titulo || name }),
|
|
866
|
+
/* @__PURE__ */ jsx7("span", { className: "block truncate text-xs text-metal", children: meta })
|
|
867
|
+
] }),
|
|
868
|
+
/* @__PURE__ */ jsx7(Download, { size: 16, className: "shrink-0 text-metal" })
|
|
842
869
|
] }),
|
|
843
|
-
/* @__PURE__ */ jsx7("a", { href: d.url, target: "_blank", rel: "noopener noreferrer", className: "inline-flex h-8 w-8 items-center justify-center rounded-full text-metal hover:bg-irongray/10 hover:text-dark", title:
|
|
844
|
-
/* @__PURE__ */ jsx7("a", { href: download, className: "inline-flex h-8 w-8 items-center justify-center rounded-full text-metal hover:bg-irongray/10 hover:text-dark", title: locale === "en" ? "Download" : "Descargar", "aria-label": locale === "en" ? "Download" : "Descargar", children: /* @__PURE__ */ jsx7(Download, { size: 16 }) })
|
|
870
|
+
/* @__PURE__ */ jsx7("a", { href: d.url, target: "_blank", rel: "noopener noreferrer", className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-metal hover:bg-irongray/10 hover:text-dark", title: openLabel, "aria-label": openLabel, children: /* @__PURE__ */ jsx7(ExternalLink, { size: 16 }) })
|
|
845
871
|
] });
|
|
846
872
|
}
|
|
847
873
|
|
package/dist/styles.css
CHANGED
|
@@ -32,8 +32,10 @@
|
|
|
32
32
|
--text-3xl--line-height: calc(2.25 / 1.875);
|
|
33
33
|
--font-weight-medium: 500;
|
|
34
34
|
--font-weight-semibold: 600;
|
|
35
|
+
--font-weight-bold: 700;
|
|
35
36
|
--font-weight-extrabold: 800;
|
|
36
37
|
--tracking-tight: -0.025em;
|
|
38
|
+
--tracking-wide: 0.025em;
|
|
37
39
|
--radius-md: calc(0.375 * var(--piloto-rem));
|
|
38
40
|
--radius-lg: calc(0.5 * var(--piloto-rem));
|
|
39
41
|
--radius-xl: calc(0.75 * var(--piloto-rem));
|
|
@@ -1004,6 +1006,9 @@
|
|
|
1004
1006
|
.piloto .pr-1:not([data-piloto-isolate] *) {
|
|
1005
1007
|
padding-right: var(--spacing);
|
|
1006
1008
|
}
|
|
1009
|
+
.piloto .pr-2:not([data-piloto-isolate] *) {
|
|
1010
|
+
padding-right: calc(var(--spacing) * 2);
|
|
1011
|
+
}
|
|
1007
1012
|
.piloto .pb-4:not([data-piloto-isolate] *) {
|
|
1008
1013
|
padding-bottom: calc(var(--spacing) * 4);
|
|
1009
1014
|
}
|
|
@@ -1086,6 +1091,10 @@
|
|
|
1086
1091
|
--tw-leading: 1;
|
|
1087
1092
|
line-height: 1;
|
|
1088
1093
|
}
|
|
1094
|
+
.piloto .font-bold:not([data-piloto-isolate] *) {
|
|
1095
|
+
--tw-font-weight: var(--font-weight-bold);
|
|
1096
|
+
font-weight: var(--font-weight-bold);
|
|
1097
|
+
}
|
|
1089
1098
|
.piloto .font-extrabold:not([data-piloto-isolate] *) {
|
|
1090
1099
|
--tw-font-weight: var(--font-weight-extrabold);
|
|
1091
1100
|
font-weight: var(--font-weight-extrabold);
|
|
@@ -1102,6 +1111,10 @@
|
|
|
1102
1111
|
--tw-tracking: var(--tracking-tight);
|
|
1103
1112
|
letter-spacing: var(--tracking-tight);
|
|
1104
1113
|
}
|
|
1114
|
+
.piloto .tracking-wide:not([data-piloto-isolate] *) {
|
|
1115
|
+
--tw-tracking: var(--tracking-wide);
|
|
1116
|
+
letter-spacing: var(--tracking-wide);
|
|
1117
|
+
}
|
|
1105
1118
|
.piloto .break-words:not([data-piloto-isolate] *) {
|
|
1106
1119
|
overflow-wrap: break-word;
|
|
1107
1120
|
}
|
|
@@ -1382,6 +1395,14 @@
|
|
|
1382
1395
|
.piloto .hover\:border-brand-300:hover:not([data-piloto-isolate] *) {
|
|
1383
1396
|
border-color: var(--color-brand-300);
|
|
1384
1397
|
}
|
|
1398
|
+
.piloto .hover\:border-brand-500\/40:hover:not([data-piloto-isolate] *) {
|
|
1399
|
+
border-color: var(--color-brand-500);
|
|
1400
|
+
}
|
|
1401
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1402
|
+
.piloto .hover\:border-brand-500\/40:hover:not([data-piloto-isolate] *) {
|
|
1403
|
+
border-color: color-mix(in oklab, var(--color-brand-500) 40%, transparent);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1385
1406
|
.piloto .hover\:border-text-tertiary:hover:not([data-piloto-isolate] *) {
|
|
1386
1407
|
border-color: var(--color-text-tertiary);
|
|
1387
1408
|
}
|
|
@@ -1413,6 +1434,14 @@
|
|
|
1413
1434
|
background-color: color-mix(in oklab, var(--color-black) 5%, transparent);
|
|
1414
1435
|
}
|
|
1415
1436
|
}
|
|
1437
|
+
.piloto .hover\:bg-brand-500\/5:hover:not([data-piloto-isolate] *) {
|
|
1438
|
+
background-color: var(--color-brand-500);
|
|
1439
|
+
}
|
|
1440
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1441
|
+
.piloto .hover\:bg-brand-500\/5:hover:not([data-piloto-isolate] *) {
|
|
1442
|
+
background-color: color-mix(in oklab, var(--color-brand-500) 5%, transparent);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1416
1445
|
.piloto .hover\:bg-brand-600:hover:not([data-piloto-isolate] *) {
|
|
1417
1446
|
background-color: var(--color-brand-600);
|
|
1418
1447
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghostykit",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Ghosty Autopilot — the autopilot chat for your React app, on AG-UI: works with LangGraph, Mastra, CrewAI or any AG-UI agent. Streaming text, agent steps, human approval cards (interrupt/resume), attachments and voice.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/core/index.js",
|