agent-state-machine 2.0.6 → 2.0.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/lib/llm.js +4 -4
- package/package.json +1 -1
- package/vercel-server/ui/index.html +28 -21
package/lib/llm.js
CHANGED
|
@@ -52,6 +52,10 @@ export function buildPrompt(context, options) {
|
|
|
52
52
|
delete cleanContext._loop;
|
|
53
53
|
delete cleanContext._config;
|
|
54
54
|
|
|
55
|
+
// Add the actual prompt
|
|
56
|
+
parts.push('# Task\n\n');
|
|
57
|
+
parts.push(options.prompt);
|
|
58
|
+
|
|
55
59
|
if (Object.keys(cleanContext).length > 0) {
|
|
56
60
|
parts.push('# Current Context\n');
|
|
57
61
|
parts.push('```json\n');
|
|
@@ -73,10 +77,6 @@ export function buildPrompt(context, options) {
|
|
|
73
77
|
parts.push('\n---\n');
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
// Add the actual prompt
|
|
77
|
-
parts.push('# Task\n\n');
|
|
78
|
-
parts.push(options.prompt);
|
|
79
|
-
|
|
80
80
|
return parts.join('\n');
|
|
81
81
|
}
|
|
82
82
|
|
package/package.json
CHANGED
|
@@ -107,6 +107,14 @@
|
|
|
107
107
|
white-space: pre-wrap;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
.agent-prompt summary {
|
|
111
|
+
list-style: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.agent-prompt summary::-webkit-details-marker {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
110
118
|
@keyframes blink {
|
|
111
119
|
|
|
112
120
|
0%,
|
|
@@ -678,20 +686,27 @@
|
|
|
678
686
|
return wrapIO(
|
|
679
687
|
"left",
|
|
680
688
|
<section className="hairline rounded-2xl rounded-tl-none overflow-hidden io-in">
|
|
681
|
-
<
|
|
682
|
-
<
|
|
683
|
-
<div className="
|
|
684
|
-
|
|
689
|
+
<details className="agent-prompt">
|
|
690
|
+
<summary className="rtl-safe px-5 py-4 divider cursor-pointer">
|
|
691
|
+
<div className="flex items-center justify-between gap-4">
|
|
692
|
+
<div>
|
|
693
|
+
<div className="text-[11px] tracking-[0.22em] font-semibold" style={{ color: "var(--muted)" }}>
|
|
694
|
+
AGENT STARTED
|
|
695
|
+
</div>
|
|
696
|
+
<div className="mt-1 text-[11px] tracking-[0.14em]" style={{ color: "var(--muted)" }}>
|
|
697
|
+
{(item.agent || "").toString()} • {time}
|
|
698
|
+
</div>
|
|
699
|
+
</div>
|
|
700
|
+
<CopyButton text={item.prompt} />
|
|
685
701
|
</div>
|
|
686
|
-
<div className="mt-
|
|
687
|
-
|
|
702
|
+
<div className="mt-3 text-[11px] tracking-[0.18em] font-semibold uppercase" style={{ color: "var(--muted)" }}>
|
|
703
|
+
Show Prompt ▼
|
|
688
704
|
</div>
|
|
705
|
+
</summary>
|
|
706
|
+
<div className="px-5 py-4">
|
|
707
|
+
<div className="markdown-body text-[13px] leading-relaxed overflow-x-auto">{item.prompt}</div>
|
|
689
708
|
</div>
|
|
690
|
-
|
|
691
|
-
</div>
|
|
692
|
-
<div className="px-5 py-4">
|
|
693
|
-
<div className="markdown-body text-[13px] leading-relaxed overflow-x-auto">{item.prompt}</div>
|
|
694
|
-
</div>
|
|
709
|
+
</details>
|
|
695
710
|
</section>,
|
|
696
711
|
idx
|
|
697
712
|
);
|
|
@@ -893,17 +908,9 @@
|
|
|
893
908
|
|
|
894
909
|
<div className="flex items-center justify-between gap-4">
|
|
895
910
|
<div className="min-w-0 flex items-center gap-3">
|
|
896
|
-
<div className="text-[12px] tracking-[0.24em] font-semibold whitespace-nowrap" style={{ color: "var(--muted)" }}>
|
|
897
|
-
{token ? "REMOTE FOLLOW" : "LOCAL TERMINAL"}
|
|
898
|
-
</div>
|
|
899
|
-
|
|
900
|
-
<span className="text-[12px] tracking-[0.24em] font-semibold" style={{ color: "var(--muted)" }}>•</span>
|
|
901
|
-
|
|
902
|
-
<h1 className="text-[14px] tracking-[0.06em] font-semibold truncate">
|
|
911
|
+
<div className="text-[12px] tracking-[0.24em] font-semibold uppercase whitespace-nowrap" style={{ color: "var(--muted)" }}>
|
|
903
912
|
{workflowName || "WORKFLOW"}
|
|
904
|
-
</
|
|
905
|
-
|
|
906
|
-
<span className="text-[12px] tracking-[0.24em] font-semibold" style={{ color: "var(--muted)" }}>•</span>
|
|
913
|
+
</div>
|
|
907
914
|
|
|
908
915
|
<StatusBadge status={status} />
|
|
909
916
|
</div>
|