fireworks-ai 0.4.2 → 0.4.4
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.
Potentially problematic release.
This version of fireworks-ai might be problematic. Click here for more details.
package/dist/react/StatusDot.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "./cn.js";
|
|
3
3
|
const phaseClasses = {
|
|
4
4
|
pending: "bg-muted-foreground/40",
|
|
5
|
-
streaming_input: "bg-
|
|
6
|
-
running: "bg-
|
|
7
|
-
complete: "bg-
|
|
8
|
-
error: "bg-
|
|
5
|
+
streaming_input: "bg-amber-500 animate-pulse",
|
|
6
|
+
running: "bg-amber-500 animate-pulse",
|
|
7
|
+
complete: "bg-emerald-500",
|
|
8
|
+
error: "bg-destructive",
|
|
9
9
|
};
|
|
10
10
|
export function StatusDot({ status, className }) {
|
|
11
11
|
return _jsx("span", { className: cn("h-2 w-2 shrink-0 rounded-full", phaseClasses[status], className) });
|
|
12
12
|
}
|
|
13
13
|
export function PulsingDot({ className }) {
|
|
14
|
-
return (_jsx("span", { className: cn("inline-block h-2 w-2 shrink-0 rounded-full bg-
|
|
14
|
+
return (_jsx("span", { className: cn("inline-block h-2 w-2 shrink-0 rounded-full bg-amber-500 animate-pulse", className) }));
|
|
15
15
|
}
|
|
@@ -7,5 +7,5 @@ export function ToolApprovalCard({ request, onApprove, onDeny, className, }) {
|
|
|
7
7
|
const reg = getWidget(stripMcpPrefix(request.toolName));
|
|
8
8
|
const label = reg?.label ?? request.toolName;
|
|
9
9
|
const InputRenderer = reg?.inputRenderer;
|
|
10
|
-
return (_jsxs("div", { className: cn("rounded-md border border-
|
|
10
|
+
return (_jsxs("div", { className: cn("rounded-md border border-amber-500/40 bg-amber-500/5 px-3 py-2.5 text-xs", className), children: [_jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [_jsx(PulsingDot, {}), _jsx("span", { className: "font-medium", children: label }), request.description && (_jsxs("span", { className: "ml-1 opacity-70", children: ["\u2014 ", request.description] }))] }), InputRenderer ? (_jsx(InputRenderer, { input: request.input })) : (Object.keys(request.input).length > 0 && (_jsx("pre", { className: "mt-1.5 max-h-32 overflow-auto rounded bg-background/60 px-2 py-1 font-mono text-[10px] text-muted-foreground", children: JSON.stringify(request.input, null, 2) }))), _jsx(ApprovalButtons, { onApprove: onApprove, onDeny: () => onDeny() })] }));
|
|
11
11
|
}
|
|
@@ -41,7 +41,7 @@ export function ToolCallCard({ toolCall, className, }) {
|
|
|
41
41
|
}
|
|
42
42
|
if (matchingApproval) {
|
|
43
43
|
const InputRenderer = reg?.inputRenderer;
|
|
44
|
-
return (_jsxs("div", { className: cn("rounded-md border border-
|
|
44
|
+
return (_jsxs("div", { className: cn("rounded-md border border-amber-500/40 bg-amber-500/5 px-3 py-2.5 text-xs", className), children: [_jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [_jsx(PulsingDot, {}), _jsx("span", { className: "font-medium", children: label }), matchingApproval.description && (_jsxs("span", { className: "ml-1 opacity-70", children: ["\u2014 ", matchingApproval.description] }))] }), InputRenderer ? (_jsx(InputRenderer, { input: matchingApproval.input })) : (Object.keys(matchingApproval.input).length > 0 && (_jsx("pre", { className: "mt-1.5 max-h-32 overflow-auto rounded bg-background/60 px-2 py-1 font-mono text-[10px] text-muted-foreground", children: JSON.stringify(matchingApproval.input, null, 2) }))), _jsx(ApprovalButtons, { onApprove: () => respondToPermission({
|
|
45
45
|
kind: "tool_approval",
|
|
46
46
|
requestId: matchingApproval.requestId,
|
|
47
47
|
behavior: "allow",
|
package/package.json
CHANGED
package/src/theme.css
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Provides the CSS variable bridge (via @theme inline) and a neutral color
|
|
5
5
|
* palette so fireworks-ai components render correctly out of the box.
|
|
6
6
|
*
|
|
7
|
-
* If your app already uses shadcn/ui
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* If your app already uses shadcn/ui you don't need this file — fireworks-ai
|
|
8
|
+
* components use only standard shadcn variables plus Tailwind's built-in
|
|
9
|
+
* color palette (amber, emerald, blue) for status indicators.
|
|
10
10
|
*
|
|
11
|
-
* Usage:
|
|
11
|
+
* Usage (non-shadcn apps):
|
|
12
12
|
* @import "fireworks-ai/theme.css";
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
--color-accent: var(--accent);
|
|
42
42
|
--color-accent-foreground: var(--accent-foreground);
|
|
43
43
|
--color-destructive: var(--destructive);
|
|
44
|
+
--color-warning: var(--warning);
|
|
45
|
+
--color-success: var(--success);
|
|
46
|
+
--color-info: var(--info);
|
|
44
47
|
--color-border: var(--border);
|
|
45
48
|
--color-input: var(--input);
|
|
46
49
|
--color-ring: var(--ring);
|
|
@@ -65,6 +68,9 @@
|
|
|
65
68
|
--accent: oklch(0.97 0 0);
|
|
66
69
|
--accent-foreground: oklch(0.205 0 0);
|
|
67
70
|
--destructive: oklch(0.577 0.245 27.325);
|
|
71
|
+
--warning: oklch(0.795 0.184 86.047);
|
|
72
|
+
--success: oklch(0.723 0.219 149.579);
|
|
73
|
+
--info: oklch(0.623 0.214 259.815);
|
|
68
74
|
--border: oklch(0.922 0 0);
|
|
69
75
|
--input: oklch(0.922 0 0);
|
|
70
76
|
--ring: oklch(0.708 0 0);
|
|
@@ -88,6 +94,9 @@
|
|
|
88
94
|
--accent: oklch(0.269 0 0);
|
|
89
95
|
--accent-foreground: oklch(0.985 0 0);
|
|
90
96
|
--destructive: oklch(0.704 0.191 22.216);
|
|
97
|
+
--warning: oklch(0.852 0.199 91.936);
|
|
98
|
+
--success: oklch(0.792 0.209 151.711);
|
|
99
|
+
--info: oklch(0.707 0.165 254.624);
|
|
91
100
|
--border: oklch(1 0 0 / 10%);
|
|
92
101
|
--input: oklch(1 0 0 / 15%);
|
|
93
102
|
--ring: oklch(0.556 0 0);
|
|
@@ -113,6 +122,9 @@
|
|
|
113
122
|
--accent: oklch(0.269 0 0);
|
|
114
123
|
--accent-foreground: oklch(0.985 0 0);
|
|
115
124
|
--destructive: oklch(0.704 0.191 22.216);
|
|
125
|
+
--warning: oklch(0.852 0.199 91.936);
|
|
126
|
+
--success: oklch(0.792 0.209 151.711);
|
|
127
|
+
--info: oklch(0.707 0.165 254.624);
|
|
116
128
|
--border: oklch(1 0 0 / 10%);
|
|
117
129
|
--input: oklch(1 0 0 / 15%);
|
|
118
130
|
--ring: oklch(0.556 0 0);
|