@mastra/playground-ui 5.1.2 → 5.1.4-alpha.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.
- package/dist/index.cjs.js +497 -222
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +499 -224
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/dynamic-form/index.d.ts +3 -2
- package/dist/src/components/ui/copy-button.d.ts +2 -2
- package/dist/src/components/ui/form.d.ts +1 -1
- package/dist/src/components/ui/resizable.d.ts +1 -1
- package/dist/src/ds/components/Txt/Txt.d.ts +2 -0
- package/package.json +4 -4
- package/dist/src/components/syntax-highlighter.d.ts +0 -4
- package/dist/src/components/ui/syntax-highlighter.d.ts +0 -5
package/dist/index.cjs.js
CHANGED
|
@@ -19,6 +19,7 @@ const langJson = require('@codemirror/lang-json');
|
|
|
19
19
|
const highlight$1 = require('@lezer/highlight');
|
|
20
20
|
const codemirrorThemeDracula = require('@uiw/codemirror-theme-dracula');
|
|
21
21
|
const CodeMirror = require('@uiw/react-codemirror');
|
|
22
|
+
const sonner = require('sonner');
|
|
22
23
|
const DialogPrimitive = require('@radix-ui/react-dialog');
|
|
23
24
|
const shallow = require('zustand/shallow');
|
|
24
25
|
const di = require('@mastra/core/di');
|
|
@@ -26,7 +27,6 @@ const zustand = require('zustand');
|
|
|
26
27
|
const middleware = require('zustand/middleware');
|
|
27
28
|
const dateFns = require('date-fns');
|
|
28
29
|
const TabsPrimitive = require('@radix-ui/react-tabs');
|
|
29
|
-
const sonner = require('sonner');
|
|
30
30
|
const react$1 = require('motion/react');
|
|
31
31
|
const colors = require('./colors-Du4i-E0i.cjs');
|
|
32
32
|
const uiUtils = require('@ai-sdk/ui-utils');
|
|
@@ -571,8 +571,8 @@ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
|
571
571
|
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
572
572
|
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
573
573
|
const isFraction = value => fractionRegex.test(value);
|
|
574
|
-
const isNumber = value =>
|
|
575
|
-
const isInteger = value =>
|
|
574
|
+
const isNumber = value => !!value && !Number.isNaN(Number(value));
|
|
575
|
+
const isInteger = value => !!value && Number.isInteger(Number(value));
|
|
576
576
|
const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
|
|
577
577
|
const isTshirtSize = value => tshirtUnitRegex.test(value);
|
|
578
578
|
const isAny = () => true;
|
|
@@ -591,7 +591,7 @@ const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isL
|
|
|
591
591
|
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
592
592
|
const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
593
593
|
const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
594
|
-
const isArbitraryShadow = value => getIsArbitraryValue(value,
|
|
594
|
+
const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
595
595
|
const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
|
|
596
596
|
const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
|
|
597
597
|
const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
@@ -621,11 +621,9 @@ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) =>
|
|
|
621
621
|
return false;
|
|
622
622
|
};
|
|
623
623
|
// Labels
|
|
624
|
-
const isLabelPosition = label => label === 'position';
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
-
const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
|
|
628
|
-
const isLabelSize = label => sizeLabels.has(label);
|
|
624
|
+
const isLabelPosition = label => label === 'position' || label === 'percentage';
|
|
625
|
+
const isLabelImage = label => label === 'image' || label === 'url';
|
|
626
|
+
const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';
|
|
629
627
|
const isLabelLength = label => label === 'length';
|
|
630
628
|
const isLabelNumber = label => label === 'number';
|
|
631
629
|
const isLabelFamilyName = label => label === 'family-name';
|
|
@@ -648,6 +646,7 @@ const getDefaultConfig = () => {
|
|
|
648
646
|
const themeRadius = fromTheme('radius');
|
|
649
647
|
const themeShadow = fromTheme('shadow');
|
|
650
648
|
const themeInsetShadow = fromTheme('inset-shadow');
|
|
649
|
+
const themeTextShadow = fromTheme('text-shadow');
|
|
651
650
|
const themeDropShadow = fromTheme('drop-shadow');
|
|
652
651
|
const themeBlur = fromTheme('blur');
|
|
653
652
|
const themePerspective = fromTheme('perspective');
|
|
@@ -662,7 +661,16 @@ const getDefaultConfig = () => {
|
|
|
662
661
|
*/
|
|
663
662
|
/***/
|
|
664
663
|
const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
|
|
665
|
-
const scalePosition = () => ['
|
|
664
|
+
const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',
|
|
665
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
666
|
+
'left-top', 'top-right',
|
|
667
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
668
|
+
'right-top', 'bottom-right',
|
|
669
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
670
|
+
'right-bottom', 'bottom-left',
|
|
671
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
672
|
+
'left-bottom'];
|
|
673
|
+
const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
|
|
666
674
|
const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
|
|
667
675
|
const scaleOverscroll = () => ['auto', 'contain', 'none'];
|
|
668
676
|
const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
|
|
@@ -670,25 +678,34 @@ const getDefaultConfig = () => {
|
|
|
670
678
|
const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
|
|
671
679
|
const scaleGridColRowStartAndEnd = () => ['auto', {
|
|
672
680
|
span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
|
|
673
|
-
}, isArbitraryVariable, isArbitraryValue];
|
|
681
|
+
}, isInteger, isArbitraryVariable, isArbitraryValue];
|
|
674
682
|
const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
|
|
675
683
|
const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
|
|
676
|
-
const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline'];
|
|
677
|
-
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch'];
|
|
684
|
+
const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];
|
|
685
|
+
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
|
|
678
686
|
const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
|
|
679
687
|
const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
680
688
|
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
|
681
|
-
const
|
|
689
|
+
const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
|
|
690
|
+
position: [isArbitraryVariable, isArbitraryValue]
|
|
691
|
+
}];
|
|
692
|
+
const scaleBgRepeat = () => ['no-repeat', {
|
|
693
|
+
repeat: ['', 'x', 'y', 'space', 'round']
|
|
694
|
+
}];
|
|
695
|
+
const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {
|
|
696
|
+
size: [isArbitraryVariable, isArbitraryValue]
|
|
697
|
+
}];
|
|
698
|
+
const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
|
|
682
699
|
const scaleRadius = () => [
|
|
683
700
|
// Deprecated since Tailwind CSS v4.0.0
|
|
684
701
|
'', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
|
|
685
702
|
const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
|
|
686
703
|
const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
|
|
687
704
|
const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
|
|
705
|
+
const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
|
|
688
706
|
const scaleBlur = () => [
|
|
689
707
|
// Deprecated since Tailwind CSS v4.0.0
|
|
690
708
|
'', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
|
|
691
|
-
const scaleOrigin = () => ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryVariable, isArbitraryValue];
|
|
692
709
|
const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
693
710
|
const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
694
711
|
const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
|
|
@@ -713,6 +730,7 @@ const getDefaultConfig = () => {
|
|
|
713
730
|
shadow: [isTshirtSize],
|
|
714
731
|
spacing: ['px', isNumber],
|
|
715
732
|
text: [isTshirtSize],
|
|
733
|
+
'text-shadow': [isTshirtSize],
|
|
716
734
|
tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
|
|
717
735
|
},
|
|
718
736
|
classGroups: {
|
|
@@ -815,7 +833,7 @@ const getDefaultConfig = () => {
|
|
|
815
833
|
* @see https://tailwindcss.com/docs/object-position
|
|
816
834
|
*/
|
|
817
835
|
'object-position': [{
|
|
818
|
-
object:
|
|
836
|
+
object: scalePositionWithArbitrary()
|
|
819
837
|
}],
|
|
820
838
|
/**
|
|
821
839
|
* Overflow
|
|
@@ -1122,14 +1140,18 @@ const getDefaultConfig = () => {
|
|
|
1122
1140
|
* @see https://tailwindcss.com/docs/align-items
|
|
1123
1141
|
*/
|
|
1124
1142
|
'align-items': [{
|
|
1125
|
-
items: [...scaleAlignSecondaryAxis(),
|
|
1143
|
+
items: [...scaleAlignSecondaryAxis(), {
|
|
1144
|
+
baseline: ['', 'last']
|
|
1145
|
+
}]
|
|
1126
1146
|
}],
|
|
1127
1147
|
/**
|
|
1128
1148
|
* Align Self
|
|
1129
1149
|
* @see https://tailwindcss.com/docs/align-self
|
|
1130
1150
|
*/
|
|
1131
1151
|
'align-self': [{
|
|
1132
|
-
self: ['auto', ...scaleAlignSecondaryAxis(),
|
|
1152
|
+
self: ['auto', ...scaleAlignSecondaryAxis(), {
|
|
1153
|
+
baseline: ['', 'last']
|
|
1154
|
+
}]
|
|
1133
1155
|
}],
|
|
1134
1156
|
/**
|
|
1135
1157
|
* Place Content
|
|
@@ -1344,21 +1366,21 @@ const getDefaultConfig = () => {
|
|
|
1344
1366
|
* @see https://tailwindcss.com/docs/height
|
|
1345
1367
|
*/
|
|
1346
1368
|
h: [{
|
|
1347
|
-
h: ['screen', ...scaleSizing()]
|
|
1369
|
+
h: ['screen', 'lh', ...scaleSizing()]
|
|
1348
1370
|
}],
|
|
1349
1371
|
/**
|
|
1350
1372
|
* Min-Height
|
|
1351
1373
|
* @see https://tailwindcss.com/docs/min-height
|
|
1352
1374
|
*/
|
|
1353
1375
|
'min-h': [{
|
|
1354
|
-
'min-h': ['screen', 'none', ...scaleSizing()]
|
|
1376
|
+
'min-h': ['screen', 'lh', 'none', ...scaleSizing()]
|
|
1355
1377
|
}],
|
|
1356
1378
|
/**
|
|
1357
1379
|
* Max-Height
|
|
1358
1380
|
* @see https://tailwindcss.com/docs/max-height
|
|
1359
1381
|
*/
|
|
1360
1382
|
'max-h': [{
|
|
1361
|
-
'max-h': ['screen', ...scaleSizing()]
|
|
1383
|
+
'max-h': ['screen', 'lh', ...scaleSizing()]
|
|
1362
1384
|
}],
|
|
1363
1385
|
// ------------------
|
|
1364
1386
|
// --- Typography ---
|
|
@@ -1574,6 +1596,13 @@ const getDefaultConfig = () => {
|
|
|
1574
1596
|
break: [{
|
|
1575
1597
|
break: ['normal', 'words', 'all', 'keep']
|
|
1576
1598
|
}],
|
|
1599
|
+
/**
|
|
1600
|
+
* Overflow Wrap
|
|
1601
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
1602
|
+
*/
|
|
1603
|
+
wrap: [{
|
|
1604
|
+
wrap: ['break-word', 'anywhere', 'normal']
|
|
1605
|
+
}],
|
|
1577
1606
|
/**
|
|
1578
1607
|
* Hyphens
|
|
1579
1608
|
* @see https://tailwindcss.com/docs/hyphens
|
|
@@ -1617,23 +1646,21 @@ const getDefaultConfig = () => {
|
|
|
1617
1646
|
* @see https://tailwindcss.com/docs/background-position
|
|
1618
1647
|
*/
|
|
1619
1648
|
'bg-position': [{
|
|
1620
|
-
bg:
|
|
1649
|
+
bg: scaleBgPosition()
|
|
1621
1650
|
}],
|
|
1622
1651
|
/**
|
|
1623
1652
|
* Background Repeat
|
|
1624
1653
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
1625
1654
|
*/
|
|
1626
1655
|
'bg-repeat': [{
|
|
1627
|
-
bg:
|
|
1628
|
-
repeat: ['', 'x', 'y', 'space', 'round']
|
|
1629
|
-
}]
|
|
1656
|
+
bg: scaleBgRepeat()
|
|
1630
1657
|
}],
|
|
1631
1658
|
/**
|
|
1632
1659
|
* Background Size
|
|
1633
1660
|
* @see https://tailwindcss.com/docs/background-size
|
|
1634
1661
|
*/
|
|
1635
1662
|
'bg-size': [{
|
|
1636
|
-
bg:
|
|
1663
|
+
bg: scaleBgSize()
|
|
1637
1664
|
}],
|
|
1638
1665
|
/**
|
|
1639
1666
|
* Background Image
|
|
@@ -2002,7 +2029,7 @@ const getDefaultConfig = () => {
|
|
|
2002
2029
|
* @see https://tailwindcss.com/docs/outline-color
|
|
2003
2030
|
*/
|
|
2004
2031
|
'outline-color': [{
|
|
2005
|
-
outline:
|
|
2032
|
+
outline: scaleColor()
|
|
2006
2033
|
}],
|
|
2007
2034
|
// ---------------
|
|
2008
2035
|
// --- Effects ---
|
|
@@ -2028,7 +2055,7 @@ const getDefaultConfig = () => {
|
|
|
2028
2055
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2029
2056
|
*/
|
|
2030
2057
|
'inset-shadow': [{
|
|
2031
|
-
'inset-shadow': ['none',
|
|
2058
|
+
'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2032
2059
|
}],
|
|
2033
2060
|
/**
|
|
2034
2061
|
* Inset Box Shadow Color
|
|
@@ -2090,6 +2117,20 @@ const getDefaultConfig = () => {
|
|
|
2090
2117
|
'inset-ring-color': [{
|
|
2091
2118
|
'inset-ring': scaleColor()
|
|
2092
2119
|
}],
|
|
2120
|
+
/**
|
|
2121
|
+
* Text Shadow
|
|
2122
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
2123
|
+
*/
|
|
2124
|
+
'text-shadow': [{
|
|
2125
|
+
'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2126
|
+
}],
|
|
2127
|
+
/**
|
|
2128
|
+
* Text Shadow Color
|
|
2129
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
2130
|
+
*/
|
|
2131
|
+
'text-shadow-color': [{
|
|
2132
|
+
'text-shadow': scaleColor()
|
|
2133
|
+
}],
|
|
2093
2134
|
/**
|
|
2094
2135
|
* Opacity
|
|
2095
2136
|
* @see https://tailwindcss.com/docs/opacity
|
|
@@ -2111,6 +2152,202 @@ const getDefaultConfig = () => {
|
|
|
2111
2152
|
'bg-blend': [{
|
|
2112
2153
|
'bg-blend': scaleBlendMode()
|
|
2113
2154
|
}],
|
|
2155
|
+
/**
|
|
2156
|
+
* Mask Clip
|
|
2157
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
2158
|
+
*/
|
|
2159
|
+
'mask-clip': [{
|
|
2160
|
+
'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
|
|
2161
|
+
}, 'mask-no-clip'],
|
|
2162
|
+
/**
|
|
2163
|
+
* Mask Composite
|
|
2164
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
2165
|
+
*/
|
|
2166
|
+
'mask-composite': [{
|
|
2167
|
+
mask: ['add', 'subtract', 'intersect', 'exclude']
|
|
2168
|
+
}],
|
|
2169
|
+
/**
|
|
2170
|
+
* Mask Image
|
|
2171
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2172
|
+
*/
|
|
2173
|
+
'mask-image-linear-pos': [{
|
|
2174
|
+
'mask-linear': [isNumber]
|
|
2175
|
+
}],
|
|
2176
|
+
'mask-image-linear-from-pos': [{
|
|
2177
|
+
'mask-linear-from': scaleMaskImagePosition()
|
|
2178
|
+
}],
|
|
2179
|
+
'mask-image-linear-to-pos': [{
|
|
2180
|
+
'mask-linear-to': scaleMaskImagePosition()
|
|
2181
|
+
}],
|
|
2182
|
+
'mask-image-linear-from-color': [{
|
|
2183
|
+
'mask-linear-from': scaleColor()
|
|
2184
|
+
}],
|
|
2185
|
+
'mask-image-linear-to-color': [{
|
|
2186
|
+
'mask-linear-to': scaleColor()
|
|
2187
|
+
}],
|
|
2188
|
+
'mask-image-t-from-pos': [{
|
|
2189
|
+
'mask-t-from': scaleMaskImagePosition()
|
|
2190
|
+
}],
|
|
2191
|
+
'mask-image-t-to-pos': [{
|
|
2192
|
+
'mask-t-to': scaleMaskImagePosition()
|
|
2193
|
+
}],
|
|
2194
|
+
'mask-image-t-from-color': [{
|
|
2195
|
+
'mask-t-from': scaleColor()
|
|
2196
|
+
}],
|
|
2197
|
+
'mask-image-t-to-color': [{
|
|
2198
|
+
'mask-t-to': scaleColor()
|
|
2199
|
+
}],
|
|
2200
|
+
'mask-image-r-from-pos': [{
|
|
2201
|
+
'mask-r-from': scaleMaskImagePosition()
|
|
2202
|
+
}],
|
|
2203
|
+
'mask-image-r-to-pos': [{
|
|
2204
|
+
'mask-r-to': scaleMaskImagePosition()
|
|
2205
|
+
}],
|
|
2206
|
+
'mask-image-r-from-color': [{
|
|
2207
|
+
'mask-r-from': scaleColor()
|
|
2208
|
+
}],
|
|
2209
|
+
'mask-image-r-to-color': [{
|
|
2210
|
+
'mask-r-to': scaleColor()
|
|
2211
|
+
}],
|
|
2212
|
+
'mask-image-b-from-pos': [{
|
|
2213
|
+
'mask-b-from': scaleMaskImagePosition()
|
|
2214
|
+
}],
|
|
2215
|
+
'mask-image-b-to-pos': [{
|
|
2216
|
+
'mask-b-to': scaleMaskImagePosition()
|
|
2217
|
+
}],
|
|
2218
|
+
'mask-image-b-from-color': [{
|
|
2219
|
+
'mask-b-from': scaleColor()
|
|
2220
|
+
}],
|
|
2221
|
+
'mask-image-b-to-color': [{
|
|
2222
|
+
'mask-b-to': scaleColor()
|
|
2223
|
+
}],
|
|
2224
|
+
'mask-image-l-from-pos': [{
|
|
2225
|
+
'mask-l-from': scaleMaskImagePosition()
|
|
2226
|
+
}],
|
|
2227
|
+
'mask-image-l-to-pos': [{
|
|
2228
|
+
'mask-l-to': scaleMaskImagePosition()
|
|
2229
|
+
}],
|
|
2230
|
+
'mask-image-l-from-color': [{
|
|
2231
|
+
'mask-l-from': scaleColor()
|
|
2232
|
+
}],
|
|
2233
|
+
'mask-image-l-to-color': [{
|
|
2234
|
+
'mask-l-to': scaleColor()
|
|
2235
|
+
}],
|
|
2236
|
+
'mask-image-x-from-pos': [{
|
|
2237
|
+
'mask-x-from': scaleMaskImagePosition()
|
|
2238
|
+
}],
|
|
2239
|
+
'mask-image-x-to-pos': [{
|
|
2240
|
+
'mask-x-to': scaleMaskImagePosition()
|
|
2241
|
+
}],
|
|
2242
|
+
'mask-image-x-from-color': [{
|
|
2243
|
+
'mask-x-from': scaleColor()
|
|
2244
|
+
}],
|
|
2245
|
+
'mask-image-x-to-color': [{
|
|
2246
|
+
'mask-x-to': scaleColor()
|
|
2247
|
+
}],
|
|
2248
|
+
'mask-image-y-from-pos': [{
|
|
2249
|
+
'mask-y-from': scaleMaskImagePosition()
|
|
2250
|
+
}],
|
|
2251
|
+
'mask-image-y-to-pos': [{
|
|
2252
|
+
'mask-y-to': scaleMaskImagePosition()
|
|
2253
|
+
}],
|
|
2254
|
+
'mask-image-y-from-color': [{
|
|
2255
|
+
'mask-y-from': scaleColor()
|
|
2256
|
+
}],
|
|
2257
|
+
'mask-image-y-to-color': [{
|
|
2258
|
+
'mask-y-to': scaleColor()
|
|
2259
|
+
}],
|
|
2260
|
+
'mask-image-radial': [{
|
|
2261
|
+
'mask-radial': [isArbitraryVariable, isArbitraryValue]
|
|
2262
|
+
}],
|
|
2263
|
+
'mask-image-radial-from-pos': [{
|
|
2264
|
+
'mask-radial-from': scaleMaskImagePosition()
|
|
2265
|
+
}],
|
|
2266
|
+
'mask-image-radial-to-pos': [{
|
|
2267
|
+
'mask-radial-to': scaleMaskImagePosition()
|
|
2268
|
+
}],
|
|
2269
|
+
'mask-image-radial-from-color': [{
|
|
2270
|
+
'mask-radial-from': scaleColor()
|
|
2271
|
+
}],
|
|
2272
|
+
'mask-image-radial-to-color': [{
|
|
2273
|
+
'mask-radial-to': scaleColor()
|
|
2274
|
+
}],
|
|
2275
|
+
'mask-image-radial-shape': [{
|
|
2276
|
+
'mask-radial': ['circle', 'ellipse']
|
|
2277
|
+
}],
|
|
2278
|
+
'mask-image-radial-size': [{
|
|
2279
|
+
'mask-radial': [{
|
|
2280
|
+
closest: ['side', 'corner'],
|
|
2281
|
+
farthest: ['side', 'corner']
|
|
2282
|
+
}]
|
|
2283
|
+
}],
|
|
2284
|
+
'mask-image-radial-pos': [{
|
|
2285
|
+
'mask-radial-at': scalePosition()
|
|
2286
|
+
}],
|
|
2287
|
+
'mask-image-conic-pos': [{
|
|
2288
|
+
'mask-conic': [isNumber]
|
|
2289
|
+
}],
|
|
2290
|
+
'mask-image-conic-from-pos': [{
|
|
2291
|
+
'mask-conic-from': scaleMaskImagePosition()
|
|
2292
|
+
}],
|
|
2293
|
+
'mask-image-conic-to-pos': [{
|
|
2294
|
+
'mask-conic-to': scaleMaskImagePosition()
|
|
2295
|
+
}],
|
|
2296
|
+
'mask-image-conic-from-color': [{
|
|
2297
|
+
'mask-conic-from': scaleColor()
|
|
2298
|
+
}],
|
|
2299
|
+
'mask-image-conic-to-color': [{
|
|
2300
|
+
'mask-conic-to': scaleColor()
|
|
2301
|
+
}],
|
|
2302
|
+
/**
|
|
2303
|
+
* Mask Mode
|
|
2304
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
2305
|
+
*/
|
|
2306
|
+
'mask-mode': [{
|
|
2307
|
+
mask: ['alpha', 'luminance', 'match']
|
|
2308
|
+
}],
|
|
2309
|
+
/**
|
|
2310
|
+
* Mask Origin
|
|
2311
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
2312
|
+
*/
|
|
2313
|
+
'mask-origin': [{
|
|
2314
|
+
'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
|
|
2315
|
+
}],
|
|
2316
|
+
/**
|
|
2317
|
+
* Mask Position
|
|
2318
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
2319
|
+
*/
|
|
2320
|
+
'mask-position': [{
|
|
2321
|
+
mask: scaleBgPosition()
|
|
2322
|
+
}],
|
|
2323
|
+
/**
|
|
2324
|
+
* Mask Repeat
|
|
2325
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
2326
|
+
*/
|
|
2327
|
+
'mask-repeat': [{
|
|
2328
|
+
mask: scaleBgRepeat()
|
|
2329
|
+
}],
|
|
2330
|
+
/**
|
|
2331
|
+
* Mask Size
|
|
2332
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
2333
|
+
*/
|
|
2334
|
+
'mask-size': [{
|
|
2335
|
+
mask: scaleBgSize()
|
|
2336
|
+
}],
|
|
2337
|
+
/**
|
|
2338
|
+
* Mask Type
|
|
2339
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
2340
|
+
*/
|
|
2341
|
+
'mask-type': [{
|
|
2342
|
+
'mask-type': ['alpha', 'luminance']
|
|
2343
|
+
}],
|
|
2344
|
+
/**
|
|
2345
|
+
* Mask Image
|
|
2346
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2347
|
+
*/
|
|
2348
|
+
'mask-image': [{
|
|
2349
|
+
mask: ['none', isArbitraryVariable, isArbitraryValue]
|
|
2350
|
+
}],
|
|
2114
2351
|
// ---------------
|
|
2115
2352
|
// --- Filters ---
|
|
2116
2353
|
// ---------------
|
|
@@ -2151,7 +2388,14 @@ const getDefaultConfig = () => {
|
|
|
2151
2388
|
'drop-shadow': [{
|
|
2152
2389
|
'drop-shadow': [
|
|
2153
2390
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2154
|
-
'', 'none', themeDropShadow,
|
|
2391
|
+
'', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2392
|
+
}],
|
|
2393
|
+
/**
|
|
2394
|
+
* Drop Shadow Color
|
|
2395
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
2396
|
+
*/
|
|
2397
|
+
'drop-shadow-color': [{
|
|
2398
|
+
'drop-shadow': scaleColor()
|
|
2155
2399
|
}],
|
|
2156
2400
|
/**
|
|
2157
2401
|
* Grayscale
|
|
@@ -2372,7 +2616,7 @@ const getDefaultConfig = () => {
|
|
|
2372
2616
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2373
2617
|
*/
|
|
2374
2618
|
'perspective-origin': [{
|
|
2375
|
-
'perspective-origin':
|
|
2619
|
+
'perspective-origin': scalePositionWithArbitrary()
|
|
2376
2620
|
}],
|
|
2377
2621
|
/**
|
|
2378
2622
|
* Rotate
|
|
@@ -2468,7 +2712,7 @@ const getDefaultConfig = () => {
|
|
|
2468
2712
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
2469
2713
|
*/
|
|
2470
2714
|
'transform-origin': [{
|
|
2471
|
-
origin:
|
|
2715
|
+
origin: scalePositionWithArbitrary()
|
|
2472
2716
|
}],
|
|
2473
2717
|
/**
|
|
2474
2718
|
* Transform Style
|
|
@@ -2836,10 +3080,10 @@ const getDefaultConfig = () => {
|
|
|
2836
3080
|
'rounded-b': ['rounded-br', 'rounded-bl'],
|
|
2837
3081
|
'rounded-l': ['rounded-tl', 'rounded-bl'],
|
|
2838
3082
|
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
|
|
2839
|
-
'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
|
3083
|
+
'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
|
2840
3084
|
'border-w-x': ['border-w-r', 'border-w-l'],
|
|
2841
3085
|
'border-w-y': ['border-w-t', 'border-w-b'],
|
|
2842
|
-
'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
3086
|
+
'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
2843
3087
|
'border-color-x': ['border-color-r', 'border-color-l'],
|
|
2844
3088
|
'border-color-y': ['border-color-t', 'border-color-b'],
|
|
2845
3089
|
translate: ['translate-x', 'translate-y', 'translate-none'],
|
|
@@ -2858,7 +3102,7 @@ const getDefaultConfig = () => {
|
|
|
2858
3102
|
conflictingClassGroupModifiers: {
|
|
2859
3103
|
'font-size': ['leading']
|
|
2860
3104
|
},
|
|
2861
|
-
orderSensitiveModifiers: ['
|
|
3105
|
+
orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
|
|
2862
3106
|
};
|
|
2863
3107
|
};
|
|
2864
3108
|
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
|
@@ -4031,6 +4275,48 @@ const AgentNetworkCoinIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
|
4031
4275
|
) }) })
|
|
4032
4276
|
] });
|
|
4033
4277
|
|
|
4278
|
+
function useCopyToClipboard({ text, copyMessage = "Copied to clipboard!" }) {
|
|
4279
|
+
const [isCopied, setIsCopied] = React.useState(false);
|
|
4280
|
+
const timeoutRef = React.useRef(null);
|
|
4281
|
+
const handleCopy = React.useCallback(() => {
|
|
4282
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
4283
|
+
sonner.toast.success(copyMessage);
|
|
4284
|
+
setIsCopied(true);
|
|
4285
|
+
if (timeoutRef.current) {
|
|
4286
|
+
clearTimeout(timeoutRef.current);
|
|
4287
|
+
timeoutRef.current = null;
|
|
4288
|
+
}
|
|
4289
|
+
timeoutRef.current = setTimeout(() => {
|
|
4290
|
+
setIsCopied(false);
|
|
4291
|
+
}, 2e3);
|
|
4292
|
+
}).catch(() => {
|
|
4293
|
+
sonner.toast.error("Failed to copy to clipboard.");
|
|
4294
|
+
});
|
|
4295
|
+
}, [text, copyMessage]);
|
|
4296
|
+
return { isCopied, handleCopy };
|
|
4297
|
+
}
|
|
4298
|
+
|
|
4299
|
+
function CopyButton({ content, copyMessage, className }) {
|
|
4300
|
+
const { isCopied, handleCopy } = useCopyToClipboard({
|
|
4301
|
+
text: content,
|
|
4302
|
+
copyMessage
|
|
4303
|
+
});
|
|
4304
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4305
|
+
Button$1,
|
|
4306
|
+
{
|
|
4307
|
+
variant: "ghost",
|
|
4308
|
+
size: "icon",
|
|
4309
|
+
className: cn("relative h-6 w-6", className),
|
|
4310
|
+
"aria-label": "Copy to clipboard",
|
|
4311
|
+
onClick: handleCopy,
|
|
4312
|
+
children: [
|
|
4313
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: cn("h-4 w-4 transition-transform ease-in-out", isCopied ? "scale-100" : "scale-0") }) }),
|
|
4314
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: cn("h-4 w-4 transition-transform ease-in-out", isCopied ? "scale-0" : "scale-100") })
|
|
4315
|
+
]
|
|
4316
|
+
}
|
|
4317
|
+
);
|
|
4318
|
+
}
|
|
4319
|
+
|
|
4034
4320
|
const useCodemirrorTheme$1 = () => {
|
|
4035
4321
|
return React.useMemo(
|
|
4036
4322
|
() => codemirrorThemeDracula.draculaInit({
|
|
@@ -4047,10 +4333,13 @@ const useCodemirrorTheme$1 = () => {
|
|
|
4047
4333
|
[]
|
|
4048
4334
|
);
|
|
4049
4335
|
};
|
|
4050
|
-
const SyntaxHighlighter$1 = ({ data }) => {
|
|
4336
|
+
const SyntaxHighlighter$1 = ({ data, className }) => {
|
|
4051
4337
|
const formattedCode = JSON.stringify(data, null, 2);
|
|
4052
4338
|
const theme = useCodemirrorTheme$1();
|
|
4053
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
4339
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx("rounded-md bg-surface4 p-1 font-mono relative", className), children: [
|
|
4340
|
+
/* @__PURE__ */ jsxRuntime.jsx(CopyButton, { content: formattedCode, className: "absolute top-2 right-2" }),
|
|
4341
|
+
/* @__PURE__ */ jsxRuntime.jsx(CodeMirror, { value: formattedCode, theme, extensions: [langJson.jsonLanguage] })
|
|
4342
|
+
] });
|
|
4054
4343
|
};
|
|
4055
4344
|
async function highlight(code, language) {
|
|
4056
4345
|
const { codeToTokens, bundledLanguages } = await import('shiki');
|
|
@@ -4118,7 +4407,7 @@ const AssistantActionBar = () => {
|
|
|
4118
4407
|
hideWhenRunning: true,
|
|
4119
4408
|
autohide: "always",
|
|
4120
4409
|
autohideFloat: "single-branch",
|
|
4121
|
-
className: "flex gap-1 items-center transition-all",
|
|
4410
|
+
className: "flex gap-1 items-center transition-all relative",
|
|
4122
4411
|
children: /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipIconButton, { tooltip: "Copy", className: "bg-transparent text-icon3 hover:text-icon6", children: [
|
|
4123
4412
|
/* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.If, { copied: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) }),
|
|
4124
4413
|
/* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.If, { copied: false, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, {}) })
|
|
@@ -4390,37 +4679,25 @@ const Thread = ({ ToolFallback, agentName, hasMemory, showFileSupport }) => {
|
|
|
4390
4679
|
return /* @__PURE__ */ jsxRuntime.jsx(AssistantMessage, { ...props, ToolFallback });
|
|
4391
4680
|
};
|
|
4392
4681
|
return /* @__PURE__ */ jsxRuntime.jsxs(ThreadWrapper, { children: [
|
|
4393
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.ThreadPrimitive.Viewport, { className: "
|
|
4394
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
{
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
AssistantMessage: WrappedAssistantMessage
|
|
4403
|
-
}
|
|
4682
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.ThreadPrimitive.Viewport, { ref: areaRef, autoScroll: false, className: "overflow-y-scroll scroll-smooth h-full", children: [
|
|
4683
|
+
/* @__PURE__ */ jsxRuntime.jsx(ThreadWelcome, { agentName }),
|
|
4684
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[568px] w-full mx-auto px-4 pb-7", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4685
|
+
react.ThreadPrimitive.Messages,
|
|
4686
|
+
{
|
|
4687
|
+
components: {
|
|
4688
|
+
UserMessage,
|
|
4689
|
+
EditComposer,
|
|
4690
|
+
AssistantMessage: WrappedAssistantMessage
|
|
4404
4691
|
}
|
|
4405
|
-
|
|
4406
|
-
|
|
4692
|
+
}
|
|
4693
|
+
) }),
|
|
4407
4694
|
/* @__PURE__ */ jsxRuntime.jsx(react.ThreadPrimitive.If, { empty: false, children: /* @__PURE__ */ jsxRuntime.jsx("div", {}) })
|
|
4408
4695
|
] }),
|
|
4409
4696
|
/* @__PURE__ */ jsxRuntime.jsx(Composer, { hasMemory, showFileSupport })
|
|
4410
4697
|
] });
|
|
4411
4698
|
};
|
|
4412
4699
|
const ThreadWrapper = ({ children }) => {
|
|
4413
|
-
|
|
4414
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4415
|
-
react.ThreadPrimitive.Root,
|
|
4416
|
-
{
|
|
4417
|
-
className: clsx(
|
|
4418
|
-
"max-w-[568px] w-full mx-auto px-4",
|
|
4419
|
-
hasAttachments ? "h-[calc(100%-208px)]" : "h-[calc(100%-112px)]"
|
|
4420
|
-
),
|
|
4421
|
-
children
|
|
4422
|
-
}
|
|
4423
|
-
);
|
|
4700
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.ThreadPrimitive.Root, { className: "grid grid-rows-[1fr_auto] h-full overflow-y-auto", children });
|
|
4424
4701
|
};
|
|
4425
4702
|
const ThreadWelcome = ({ agentName }) => {
|
|
4426
4703
|
const safeAgentName = agentName ?? "";
|
|
@@ -4439,10 +4716,10 @@ const ThreadWelcome = ({ agentName }) => {
|
|
|
4439
4716
|
] }) });
|
|
4440
4717
|
};
|
|
4441
4718
|
const Composer = ({ hasMemory, showFileSupport }) => {
|
|
4442
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4719
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-4", children: [
|
|
4443
4720
|
/* @__PURE__ */ jsxRuntime.jsxs(react.ComposerPrimitive.Root, { children: [
|
|
4444
|
-
/* @__PURE__ */ jsxRuntime.jsx(ComposerAttachments, {}),
|
|
4445
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
4721
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[568px] w-full mx-auto px-2 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(ComposerAttachments, {}) }),
|
|
4722
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-[568px] w-full mx-auto px-4", children: [
|
|
4446
4723
|
/* @__PURE__ */ jsxRuntime.jsx(react.ComposerPrimitive.Input, { asChild: true, className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4447
4724
|
"textarea",
|
|
4448
4725
|
{
|
|
@@ -4459,8 +4736,8 @@ const Composer = ({ hasMemory, showFileSupport }) => {
|
|
|
4459
4736
|
] })
|
|
4460
4737
|
] })
|
|
4461
4738
|
] }),
|
|
4462
|
-
!hasMemory && /* @__PURE__ */ jsxRuntime.jsxs(Txt, { variant: "ui-sm", className: "text-icon3 flex
|
|
4463
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(InfoIcon, {}) }),
|
|
4739
|
+
!hasMemory && /* @__PURE__ */ jsxRuntime.jsxs(Txt, { variant: "ui-sm", className: "text-icon3 flex gap-2 pt-1 max-w-[568px] w-full mx-auto border-t items-start", children: [
|
|
4740
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "transform translate-y-[0.1rem]", children: /* @__PURE__ */ jsxRuntime.jsx(InfoIcon, {}) }),
|
|
4464
4741
|
"Memory is not enabled. The conversation will not be persisted."
|
|
4465
4742
|
] })
|
|
4466
4743
|
] });
|
|
@@ -4647,22 +4924,26 @@ function MastraRuntimeProvider({
|
|
|
4647
4924
|
if (messages.length === 0 || currentThreadId !== threadId || hasNewInitialMessages && currentThreadId === threadId) {
|
|
4648
4925
|
if (initialMessages && threadId && memory) {
|
|
4649
4926
|
const convertedMessages = initialMessages?.map((message) => {
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4927
|
+
const toolInvocationsAsContentParts = (message.toolInvocations || []).map((toolInvocation) => ({
|
|
4928
|
+
type: "tool-call",
|
|
4929
|
+
toolCallId: toolInvocation?.toolCallId,
|
|
4930
|
+
toolName: toolInvocation?.toolName,
|
|
4931
|
+
args: toolInvocation?.args,
|
|
4932
|
+
result: toolInvocation?.result
|
|
4933
|
+
}));
|
|
4934
|
+
const attachmentsAsContentParts = (message.experimental_attachments || []).map((image) => ({
|
|
4935
|
+
type: image.contentType.startsWith(`image/`) ? "image" : image.contentType.startsWith(`audio/`) ? "audio" : "file",
|
|
4936
|
+
mimeType: image.contentType,
|
|
4937
|
+
image: image.url
|
|
4938
|
+
}));
|
|
4939
|
+
return {
|
|
4940
|
+
...message,
|
|
4941
|
+
content: [
|
|
4942
|
+
...typeof message.content === "string" ? [{ type: "text", text: message.content }] : [],
|
|
4943
|
+
...toolInvocationsAsContentParts,
|
|
4944
|
+
...attachmentsAsContentParts
|
|
4945
|
+
]
|
|
4946
|
+
};
|
|
4666
4947
|
}).filter(Boolean);
|
|
4667
4948
|
setMessages(convertedMessages);
|
|
4668
4949
|
setCurrentThreadId(threadId);
|
|
@@ -5048,7 +5329,7 @@ const AgentChat = ({
|
|
|
5048
5329
|
modelSettings,
|
|
5049
5330
|
chatWithGenerate,
|
|
5050
5331
|
runtimeContext,
|
|
5051
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5332
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Thread, { agentName: agentName ?? "", hasMemory: memory, showFileSupport })
|
|
5052
5333
|
}
|
|
5053
5334
|
);
|
|
5054
5335
|
};
|
|
@@ -5134,7 +5415,7 @@ const Input = React__namespace.forwardRef(
|
|
|
5134
5415
|
"input",
|
|
5135
5416
|
{
|
|
5136
5417
|
type,
|
|
5137
|
-
className:
|
|
5418
|
+
className: clsx(className, inputVariants({ variant, customSize, className })),
|
|
5138
5419
|
"data-testid": testId,
|
|
5139
5420
|
ref,
|
|
5140
5421
|
...props
|
|
@@ -6452,48 +6733,6 @@ function MastraNetworkRuntimeProvider({
|
|
|
6452
6733
|
] });
|
|
6453
6734
|
}
|
|
6454
6735
|
|
|
6455
|
-
function useCopyToClipboard({ text, copyMessage = "Copied to clipboard!" }) {
|
|
6456
|
-
const [isCopied, setIsCopied] = React.useState(false);
|
|
6457
|
-
const timeoutRef = React.useRef(null);
|
|
6458
|
-
const handleCopy = React.useCallback(() => {
|
|
6459
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
6460
|
-
sonner.toast.success(copyMessage);
|
|
6461
|
-
setIsCopied(true);
|
|
6462
|
-
if (timeoutRef.current) {
|
|
6463
|
-
clearTimeout(timeoutRef.current);
|
|
6464
|
-
timeoutRef.current = null;
|
|
6465
|
-
}
|
|
6466
|
-
timeoutRef.current = setTimeout(() => {
|
|
6467
|
-
setIsCopied(false);
|
|
6468
|
-
}, 2e3);
|
|
6469
|
-
}).catch(() => {
|
|
6470
|
-
sonner.toast.error("Failed to copy to clipboard.");
|
|
6471
|
-
});
|
|
6472
|
-
}, [text, copyMessage]);
|
|
6473
|
-
return { isCopied, handleCopy };
|
|
6474
|
-
}
|
|
6475
|
-
|
|
6476
|
-
function CopyButton({ content, copyMessage, classname }) {
|
|
6477
|
-
const { isCopied, handleCopy } = useCopyToClipboard({
|
|
6478
|
-
text: content,
|
|
6479
|
-
copyMessage
|
|
6480
|
-
});
|
|
6481
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6482
|
-
Button$1,
|
|
6483
|
-
{
|
|
6484
|
-
variant: "ghost",
|
|
6485
|
-
size: "icon",
|
|
6486
|
-
className: cn("relative h-6 w-6", classname),
|
|
6487
|
-
"aria-label": "Copy to clipboard",
|
|
6488
|
-
onClick: handleCopy,
|
|
6489
|
-
children: [
|
|
6490
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: cn("h-4 w-4 transition-transform ease-in-out", isCopied ? "scale-100" : "scale-0") }) }),
|
|
6491
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: cn("h-4 w-4 transition-transform ease-in-out", isCopied ? "scale-0" : "scale-100") })
|
|
6492
|
-
]
|
|
6493
|
-
}
|
|
6494
|
-
);
|
|
6495
|
-
}
|
|
6496
|
-
|
|
6497
6736
|
function MarkdownRenderer({ children }) {
|
|
6498
6737
|
const processedText = children.replace(/\\n/g, "\n");
|
|
6499
6738
|
return /* @__PURE__ */ jsxRuntime.jsx(Markdown, { remarkPlugins: [remarkGfm], components: COMPONENTS, className: "space-y-3", children: processedText });
|
|
@@ -6720,7 +6959,7 @@ function NetworkProvider({ children }) {
|
|
|
6720
6959
|
|
|
6721
6960
|
const NetworkChat = ({ agentId, memory }) => {
|
|
6722
6961
|
const { modelSettings } = React.useContext(NetworkContext);
|
|
6723
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MastraNetworkRuntimeProvider, { agentId, memory, modelSettings, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6962
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MastraNetworkRuntimeProvider, { agentId, memory, modelSettings, children: /* @__PURE__ */ jsxRuntime.jsx(Thread, { ToolFallback }) });
|
|
6724
6963
|
};
|
|
6725
6964
|
|
|
6726
6965
|
function WorkflowTraces({ traces, error, runId, stepName }) {
|
|
@@ -9084,7 +9323,8 @@ function DynamicForm({
|
|
|
9084
9323
|
onSubmit,
|
|
9085
9324
|
defaultValues,
|
|
9086
9325
|
isSubmitLoading,
|
|
9087
|
-
submitButtonLabel
|
|
9326
|
+
submitButtonLabel,
|
|
9327
|
+
className
|
|
9088
9328
|
}) {
|
|
9089
9329
|
if (!schema) {
|
|
9090
9330
|
console.error("no form schema found");
|
|
@@ -9102,21 +9342,21 @@ function DynamicForm({
|
|
|
9102
9342
|
const formProps = {
|
|
9103
9343
|
schema: schemaProvider,
|
|
9104
9344
|
onSubmit: async (values) => {
|
|
9105
|
-
await onSubmit(values?.[""] || {});
|
|
9345
|
+
await onSubmit?.(values?.[""] || {});
|
|
9106
9346
|
},
|
|
9107
9347
|
defaultValues: defaultValues ? { "": defaultValues } : void 0,
|
|
9108
9348
|
formProps: {
|
|
9109
9349
|
className: ""
|
|
9110
9350
|
},
|
|
9111
9351
|
uiComponents: {
|
|
9112
|
-
SubmitButton: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "light", className: "w-full", size: "lg", disabled: isSubmitLoading, children: isSubmitLoading ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) }) : submitButtonLabel || children })
|
|
9352
|
+
SubmitButton: ({ children }) => onSubmit ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "light", className: "w-full", size: "lg", disabled: isSubmitLoading, children: isSubmitLoading ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) }) : submitButtonLabel || children }) : null
|
|
9113
9353
|
},
|
|
9114
9354
|
formComponents: {
|
|
9115
9355
|
Label: ({ value }) => /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-sm font-normal", children: value })
|
|
9116
9356
|
},
|
|
9117
9357
|
withSubmit: true
|
|
9118
9358
|
};
|
|
9119
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9359
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AutoForm, { ...formProps });
|
|
9120
9360
|
}
|
|
9121
9361
|
|
|
9122
9362
|
function resolveSerializedZodOutput(obj) {
|
|
@@ -9178,7 +9418,7 @@ const WorkflowResult = ({ jsonResult, sanitizedJsonResult }) => {
|
|
|
9178
9418
|
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 justify-between w-full", children: [
|
|
9179
9419
|
/* @__PURE__ */ jsxRuntime.jsxs(Txt, { variant: "ui-lg", className: "text-icon6 flex items-center gap-3 font-medium", children: [
|
|
9180
9420
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(DeploymentIcon, {}) }),
|
|
9181
|
-
"
|
|
9421
|
+
"Workflow Execution (JSON)"
|
|
9182
9422
|
] }),
|
|
9183
9423
|
/* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
9184
9424
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9667,23 +9907,6 @@ function WorkflowGraph({ workflowId, onShowTrace }) {
|
|
|
9667
9907
|
) }) }, snapshot?.runId ?? workflowId);
|
|
9668
9908
|
}
|
|
9669
9909
|
|
|
9670
|
-
const WorkflowStatus = ({ stepId, status }) => {
|
|
9671
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9672
|
-
WorkflowCard,
|
|
9673
|
-
{
|
|
9674
|
-
header: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
9675
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Icon, { children: [
|
|
9676
|
-
status === "success" && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "text-accent1" }),
|
|
9677
|
-
status === "failed" && /* @__PURE__ */ jsxRuntime.jsx(CrossIcon, { className: "text-accent2" }),
|
|
9678
|
-
status === "suspended" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CirclePause, { className: "text-icon3" }),
|
|
9679
|
-
status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "text-icon3 animate-spin" })
|
|
9680
|
-
] }),
|
|
9681
|
-
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "span", variant: "ui-lg", className: "text-icon6 font-medium", children: stepId.charAt(0).toUpperCase() + stepId.slice(1) })
|
|
9682
|
-
] })
|
|
9683
|
-
}
|
|
9684
|
-
);
|
|
9685
|
-
};
|
|
9686
|
-
|
|
9687
9910
|
function WorkflowTrigger({ workflowId, setRunId }) {
|
|
9688
9911
|
const { runtimeContext } = usePlaygroundStore();
|
|
9689
9912
|
const { result, setResult, payload, setPayload } = React.useContext(WorkflowRunContext);
|
|
@@ -9722,7 +9945,6 @@ function WorkflowTrigger({ workflowId, setRunId }) {
|
|
|
9722
9945
|
});
|
|
9723
9946
|
};
|
|
9724
9947
|
const watchResultToUse = result ?? watchResult;
|
|
9725
|
-
const workflowActivePaths = watchResultToUse?.payload?.workflowState?.steps ?? {};
|
|
9726
9948
|
React.useEffect(() => {
|
|
9727
9949
|
setIsRunning(isWatchingWorkflow);
|
|
9728
9950
|
}, [isWatchingWorkflow]);
|
|
@@ -9749,81 +9971,134 @@ function WorkflowTrigger({ workflowId, setRunId }) {
|
|
|
9749
9971
|
if (!workflow) return null;
|
|
9750
9972
|
const isSuspendedSteps = suspendedSteps.length > 0;
|
|
9751
9973
|
const zodInputSchema = triggerSchema ? resolveSerializedZodOutput(jsonSchemaToZod(superjson.parse(triggerSchema))) : null;
|
|
9752
|
-
const { sanitizedOutput, ...restResult } = result
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
}
|
|
9770
|
-
}
|
|
9771
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9772
|
-
Button,
|
|
9773
|
-
{
|
|
9774
|
-
className: "w-full",
|
|
9775
|
-
variant: "light",
|
|
9776
|
-
disabled: isRunning,
|
|
9777
|
-
onClick: () => handleExecuteWorkflow(null),
|
|
9778
|
-
children: isRunning ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) }) : "Trigger"
|
|
9779
|
-
}
|
|
9780
|
-
) }),
|
|
9781
|
-
!isWatchingWorkflow && isSuspendedSteps && suspendedSteps?.map((step) => {
|
|
9782
|
-
const stepDefinition = workflow.steps[step.stepId];
|
|
9783
|
-
const stepSchema = stepDefinition?.resumeSchema ? resolveSerializedZodOutput(jsonSchemaToZod(superjson.parse(stepDefinition.resumeSchema))) : z.z.record(z.z.string(), z.z.any());
|
|
9784
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col px-4", children: [
|
|
9785
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "secondary", className: "text-mastra-el-3", size: "xs", children: step.stepId }),
|
|
9786
|
-
step.suspendPayload && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9787
|
-
CodeBlockDemo,
|
|
9788
|
-
{
|
|
9789
|
-
className: "w-full overflow-x-auto p-2",
|
|
9790
|
-
code: JSON.stringify(step.suspendPayload, null, 2),
|
|
9791
|
-
language: "json"
|
|
9974
|
+
const { sanitizedOutput, ...restResult } = result || {};
|
|
9975
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full pt-3 pb-12", children: [
|
|
9976
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 px-5 pb-5 border-b-sm border-border1", children: [
|
|
9977
|
+
isResumingWorkflow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
|
|
9978
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin text-icon6" }) }),
|
|
9979
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { children: "Resuming workflow" })
|
|
9980
|
+
] }),
|
|
9981
|
+
!isSuspendedSteps && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: zodInputSchema ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9982
|
+
DynamicForm,
|
|
9983
|
+
{
|
|
9984
|
+
schema: zodInputSchema,
|
|
9985
|
+
defaultValues: payload,
|
|
9986
|
+
isSubmitLoading: isWatchingWorkflow,
|
|
9987
|
+
submitButtonLabel: "Run",
|
|
9988
|
+
onSubmit: (data) => {
|
|
9989
|
+
setPayload(data);
|
|
9990
|
+
handleExecuteWorkflow(data);
|
|
9792
9991
|
}
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9992
|
+
}
|
|
9993
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9994
|
+
Button,
|
|
9995
|
+
{
|
|
9996
|
+
className: "w-full",
|
|
9997
|
+
variant: "light",
|
|
9998
|
+
disabled: isRunning,
|
|
9999
|
+
onClick: () => handleExecuteWorkflow(null),
|
|
10000
|
+
children: isRunning ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) }) : "Trigger"
|
|
10001
|
+
}
|
|
10002
|
+
) }),
|
|
10003
|
+
!isWatchingWorkflow && isSuspendedSteps && suspendedSteps?.map((step) => {
|
|
10004
|
+
const stepDefinition = workflow.steps[step.stepId];
|
|
10005
|
+
const stepSchema = stepDefinition?.resumeSchema ? resolveSerializedZodOutput(jsonSchemaToZod(superjson.parse(stepDefinition.resumeSchema))) : z.z.record(z.z.string(), z.z.any());
|
|
10006
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col px-4", children: [
|
|
10007
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "secondary", className: "text-mastra-el-3", size: "xs", children: step.stepId }),
|
|
10008
|
+
step.suspendPayload && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10009
|
+
CodeBlockDemo,
|
|
10010
|
+
{
|
|
10011
|
+
className: "w-full overflow-x-auto p-2",
|
|
10012
|
+
code: JSON.stringify(step.suspendPayload, null, 2),
|
|
10013
|
+
language: "json"
|
|
9807
10014
|
}
|
|
9808
|
-
}
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
10015
|
+
) }),
|
|
10016
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10017
|
+
DynamicForm,
|
|
10018
|
+
{
|
|
10019
|
+
schema: stepSchema,
|
|
10020
|
+
isSubmitLoading: isResumingWorkflow,
|
|
10021
|
+
submitButtonLabel: "Resume",
|
|
10022
|
+
onSubmit: (data) => {
|
|
10023
|
+
handleResumeWorkflow({
|
|
10024
|
+
stepId: step.stepId,
|
|
10025
|
+
runId: step.runId,
|
|
10026
|
+
suspendPayload: step.suspendPayload,
|
|
10027
|
+
resumeData: data
|
|
10028
|
+
});
|
|
10029
|
+
}
|
|
10030
|
+
}
|
|
10031
|
+
)
|
|
10032
|
+
] });
|
|
10033
|
+
})
|
|
9820
10034
|
] }),
|
|
9821
|
-
result && /* @__PURE__ */ jsxRuntime.
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
] })
|
|
9825
|
-
] }) });
|
|
10035
|
+
result && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5 border-b-sm border-border1", children: /* @__PURE__ */ jsxRuntime.jsx(WorkflowJsonDialog, { result: restResult }) }),
|
|
10036
|
+
result && /* @__PURE__ */ jsxRuntime.jsx(WorkflowResultSection, { result, workflow })
|
|
10037
|
+
] });
|
|
9826
10038
|
}
|
|
10039
|
+
const WorkflowResultSection = ({ result, workflow }) => {
|
|
10040
|
+
const workflowState = result.payload.workflowState;
|
|
10041
|
+
if (typeof workflowState.result === "string" || typeof workflowState.result === "number" || typeof workflowState.result === "boolean") {
|
|
10042
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 p-5", children: [
|
|
10043
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", htmlFor: "string-result", variant: "ui-sm", className: "text-icon3", children: "Workflow Result" }) }),
|
|
10044
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { id: "string-result", defaultValue: String(workflowState.result) })
|
|
10045
|
+
] });
|
|
10046
|
+
}
|
|
10047
|
+
const hasResult = Object.keys(workflowState.result || {}).length > 0;
|
|
10048
|
+
if (!hasResult) return null;
|
|
10049
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5", children: [
|
|
10050
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: "Final Output" }),
|
|
10051
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "pt-4", children: Object.entries(workflowState.result || {}).map(([stepId, stepResult]) => {
|
|
10052
|
+
const stepDefinition = workflow.steps[stepId];
|
|
10053
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10054
|
+
"li",
|
|
10055
|
+
{
|
|
10056
|
+
className: "border-b-sm border-dashed border-border1 last:border-b-0 py-4 first:pt-0 last:pb-0",
|
|
10057
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(WorkflowResultFinishedStep, { stepResult, stepDefinition })
|
|
10058
|
+
},
|
|
10059
|
+
stepId
|
|
10060
|
+
);
|
|
10061
|
+
}) })
|
|
10062
|
+
] });
|
|
10063
|
+
};
|
|
10064
|
+
const WorkflowResultFinishedStep = ({ stepResult, stepDefinition }) => {
|
|
10065
|
+
const id = React.useId();
|
|
10066
|
+
try {
|
|
10067
|
+
const zodObjectSchema = resolveSerializedZodOutput(jsonSchemaToZod(superjson.parse(stepDefinition.outputSchema)));
|
|
10068
|
+
if (zodObjectSchema?._def?.typeName === "ZodString") {
|
|
10069
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
10070
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10071
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Footprints, { className: "text-icon3" }) }),
|
|
10072
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", htmlFor: id, variant: "ui-sm", className: "text-icon3", children: stepDefinition.description })
|
|
10073
|
+
] }),
|
|
10074
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { id, defaultValue: stepResult })
|
|
10075
|
+
] });
|
|
10076
|
+
}
|
|
10077
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10078
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pb-2", children: [
|
|
10079
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Footprints, { className: "text-icon3" }) }),
|
|
10080
|
+
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: stepDefinition.description })
|
|
10081
|
+
] }),
|
|
10082
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicForm, { schema: zodObjectSchema, defaultValues: stepResult })
|
|
10083
|
+
] });
|
|
10084
|
+
} catch (err) {
|
|
10085
|
+
console.error("Error parsing output schema", err);
|
|
10086
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Txt, { children: "An error occured. Please open an issue on GitHub." });
|
|
10087
|
+
}
|
|
10088
|
+
};
|
|
10089
|
+
const WorkflowJsonDialog = ({ result }) => {
|
|
10090
|
+
const [open, setOpen] = React.useState(false);
|
|
10091
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10092
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "light", onClick: () => setOpen(true), className: "w-full", size: "lg", children: [
|
|
10093
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Braces, { className: "text-icon3" }) }),
|
|
10094
|
+
"Open Workflow Execution (JSON)"
|
|
10095
|
+
] }),
|
|
10096
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxRuntime.jsx(DialogPortal, { children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-6xl max-h-[90vh] overflow-y-auto overflow-x-hidden bg-surface2", children: [
|
|
10097
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Workflow Execution (JSON)" }),
|
|
10098
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full overflow-x-scroll", children: /* @__PURE__ */ jsxRuntime.jsx(SyntaxHighlighter$1, { data: result, className: "p-4" }) })
|
|
10099
|
+
] }) }) })
|
|
10100
|
+
] });
|
|
10101
|
+
};
|
|
9827
10102
|
|
|
9828
10103
|
const WorkflowRuns = ({ workflowId, runId, isLoading, runs, onPressRun }) => {
|
|
9829
10104
|
if (isLoading) {
|
|
@@ -9952,7 +10227,7 @@ const ThreadItem = ({ children, isActive }) => {
|
|
|
9952
10227
|
"li",
|
|
9953
10228
|
{
|
|
9954
10229
|
className: clsx(
|
|
9955
|
-
"border-b-sm border-border1 hover:bg-surface3 group flex h-[54px] items-center justify-between gap-2
|
|
10230
|
+
"border-b-sm border-border1 hover:bg-surface3 group flex h-[54px] items-center justify-between gap-2 pl-5 py-2",
|
|
9956
10231
|
isActive && "bg-surface4"
|
|
9957
10232
|
),
|
|
9958
10233
|
children
|