@sqaitech/visualizer 0.5.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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/es/assets/sqai-logo.mjs +2 -0
- package/dist/es/component/blackboard/index.css +33 -0
- package/dist/es/component/blackboard/index.mjs +278 -0
- package/dist/es/component/config-selector/index.mjs +104 -0
- package/dist/es/component/context-preview/index.mjs +38 -0
- package/dist/es/component/env-config/index.mjs +112 -0
- package/dist/es/component/env-config-reminder/index.css +22 -0
- package/dist/es/component/env-config-reminder/index.mjs +28 -0
- package/dist/es/component/form-field/index.mjs +163 -0
- package/dist/es/component/history-selector/index.css +135 -0
- package/dist/es/component/history-selector/index.mjs +170 -0
- package/dist/es/component/index.mjs +1 -0
- package/dist/es/component/logo/index.css +13 -0
- package/dist/es/component/logo/index.mjs +21 -0
- package/dist/es/component/misc/index.mjs +94 -0
- package/dist/es/component/nav-actions/index.mjs +32 -0
- package/dist/es/component/nav-actions/style.css +35 -0
- package/dist/es/component/player/index.css +185 -0
- package/dist/es/component/player/index.mjs +856 -0
- package/dist/es/component/playground/index.css +431 -0
- package/dist/es/component/playground/index.mjs +8 -0
- package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
- package/dist/es/component/playground-result/index.css +34 -0
- package/dist/es/component/playground-result/index.mjs +62 -0
- package/dist/es/component/prompt-input/index.css +391 -0
- package/dist/es/component/prompt-input/index.mjs +730 -0
- package/dist/es/component/service-mode-control/index.mjs +105 -0
- package/dist/es/component/shiny-text/index.css +75 -0
- package/dist/es/component/shiny-text/index.mjs +15 -0
- package/dist/es/component/universal-playground/index.css +341 -0
- package/dist/es/component/universal-playground/index.mjs +302 -0
- package/dist/es/component/universal-playground/providers/context-provider.mjs +52 -0
- package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +207 -0
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +210 -0
- package/dist/es/hooks/usePlaygroundExecution.mjs +180 -0
- package/dist/es/hooks/usePlaygroundState.mjs +203 -0
- package/dist/es/hooks/useSafeOverrideAIConfig.mjs +24 -0
- package/dist/es/hooks/useServerValid.mjs +30 -0
- package/dist/es/icons/avatar.mjs +28 -0
- package/dist/es/icons/close.mjs +19 -0
- package/dist/es/icons/global-perspective.mjs +16 -0
- package/dist/es/icons/history.mjs +30 -0
- package/dist/es/icons/magnifying-glass.mjs +39 -0
- package/dist/es/icons/player-setting.mjs +26 -0
- package/dist/es/icons/setting.mjs +20 -0
- package/dist/es/icons/show-marker.mjs +16 -0
- package/dist/es/index.mjs +25 -0
- package/dist/es/static/image/sqai-logo.png +0 -0
- package/dist/es/store/history.mjs +89 -0
- package/dist/es/store/store.mjs +186 -0
- package/dist/es/types.mjs +70 -0
- package/dist/es/utils/color.mjs +35 -0
- package/dist/es/utils/constants.mjs +99 -0
- package/dist/es/utils/index.mjs +10 -0
- package/dist/es/utils/pixi-loader.mjs +16 -0
- package/dist/es/utils/playground-utils.mjs +67 -0
- package/dist/es/utils/replay-scripts.mjs +312 -0
- package/dist/lib/assets/sqai-logo.js +24 -0
- package/dist/lib/component/blackboard/index.css +33 -0
- package/dist/lib/component/blackboard/index.js +321 -0
- package/dist/lib/component/config-selector/index.js +148 -0
- package/dist/lib/component/context-preview/index.js +83 -0
- package/dist/lib/component/env-config/index.js +146 -0
- package/dist/lib/component/env-config-reminder/index.css +22 -0
- package/dist/lib/component/env-config-reminder/index.js +62 -0
- package/dist/lib/component/form-field/index.js +209 -0
- package/dist/lib/component/history-selector/index.css +135 -0
- package/dist/lib/component/history-selector/index.js +216 -0
- package/dist/lib/component/index.js +60 -0
- package/dist/lib/component/logo/index.css +13 -0
- package/dist/lib/component/logo/index.js +68 -0
- package/dist/lib/component/misc/index.js +150 -0
- package/dist/lib/component/nav-actions/index.js +66 -0
- package/dist/lib/component/nav-actions/style.css +35 -0
- package/dist/lib/component/player/index.css +185 -0
- package/dist/lib/component/player/index.js +902 -0
- package/dist/lib/component/playground/index.css +431 -0
- package/dist/lib/component/playground/index.js +113 -0
- package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
- package/dist/lib/component/playground-result/index.css +34 -0
- package/dist/lib/component/playground-result/index.js +106 -0
- package/dist/lib/component/prompt-input/index.css +391 -0
- package/dist/lib/component/prompt-input/index.js +774 -0
- package/dist/lib/component/service-mode-control/index.js +139 -0
- package/dist/lib/component/shiny-text/index.css +75 -0
- package/dist/lib/component/shiny-text/index.js +49 -0
- package/dist/lib/component/universal-playground/index.css +341 -0
- package/dist/lib/component/universal-playground/index.js +350 -0
- package/dist/lib/component/universal-playground/providers/context-provider.js +95 -0
- package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +247 -0
- package/dist/lib/component/universal-playground/providers/storage-provider.js +268 -0
- package/dist/lib/hooks/usePlaygroundExecution.js +214 -0
- package/dist/lib/hooks/usePlaygroundState.js +237 -0
- package/dist/lib/hooks/useSafeOverrideAIConfig.js +61 -0
- package/dist/lib/hooks/useServerValid.js +64 -0
- package/dist/lib/icons/avatar.js +62 -0
- package/dist/lib/icons/close.js +53 -0
- package/dist/lib/icons/global-perspective.js +50 -0
- package/dist/lib/icons/history.js +64 -0
- package/dist/lib/icons/magnifying-glass.js +73 -0
- package/dist/lib/icons/player-setting.js +60 -0
- package/dist/lib/icons/setting.js +54 -0
- package/dist/lib/icons/show-marker.js +50 -0
- package/dist/lib/index.js +187 -0
- package/dist/lib/static/image/sqai-logo.png +0 -0
- package/dist/lib/store/history.js +96 -0
- package/dist/lib/store/store.js +196 -0
- package/dist/lib/types.js +116 -0
- package/dist/lib/utils/color.js +75 -0
- package/dist/lib/utils/constants.js +154 -0
- package/dist/lib/utils/index.js +63 -0
- package/dist/lib/utils/pixi-loader.js +56 -0
- package/dist/lib/utils/playground-utils.js +110 -0
- package/dist/lib/utils/replay-scripts.js +355 -0
- package/dist/types/component/blackboard/index.d.ts +15 -0
- package/dist/types/component/config-selector/index.d.ts +9 -0
- package/dist/types/component/context-preview/index.d.ts +9 -0
- package/dist/types/component/env-config/index.d.ts +6 -0
- package/dist/types/component/env-config-reminder/index.d.ts +6 -0
- package/dist/types/component/form-field/index.d.ts +17 -0
- package/dist/types/component/history-selector/index.d.ts +10 -0
- package/dist/types/component/index.d.ts +1 -0
- package/dist/types/component/logo/index.d.ts +5 -0
- package/dist/types/component/misc/index.d.ts +6 -0
- package/dist/types/component/nav-actions/index.d.ts +10 -0
- package/dist/types/component/player/index.d.ts +13 -0
- package/dist/types/component/playground/index.d.ts +7 -0
- package/dist/types/component/playground-result/index.d.ts +20 -0
- package/dist/types/component/prompt-input/index.d.ts +22 -0
- package/dist/types/component/service-mode-control/index.d.ts +6 -0
- package/dist/types/component/shiny-text/index.d.ts +12 -0
- package/dist/types/component/universal-playground/index.d.ts +4 -0
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
- package/dist/types/component/universal-playground/providers/indexeddb-storage-provider.d.ts +71 -0
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +10 -0
- package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
- package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
- package/dist/types/hooks/useServerValid.d.ts +1 -0
- package/dist/types/index.d.ts +27 -0
- package/dist/types/store/history.d.ts +16 -0
- package/dist/types/store/store.d.ts +36 -0
- package/dist/types/types.d.ts +161 -0
- package/dist/types/utils/color.d.ts +4 -0
- package/dist/types/utils/constants.d.ts +74 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/pixi-loader.d.ts +5 -0
- package/dist/types/utils/playground-utils.d.ts +6 -0
- package/dist/types/utils/replay-scripts.d.ts +34 -0
- package/package.json +85 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
ServiceModeControl: ()=>ServiceModeControl
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const playground_namespaceObject = require("@sqaitech/playground");
|
|
31
|
+
const external_antd_namespaceObject = require("antd");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const useSafeOverrideAIConfig_js_namespaceObject = require("../../hooks/useSafeOverrideAIConfig.js");
|
|
34
|
+
const useServerValid_js_namespaceObject = require("../../hooks/useServerValid.js");
|
|
35
|
+
const store_js_namespaceObject = require("../../store/store.js");
|
|
36
|
+
const index_js_namespaceObject = require("../env-config/index.js");
|
|
37
|
+
const external_misc_index_js_namespaceObject = require("../misc/index.js");
|
|
38
|
+
const TITLE_TEXT = {
|
|
39
|
+
Server: 'Server Status',
|
|
40
|
+
'In-Browser': 'In-Browser'
|
|
41
|
+
};
|
|
42
|
+
const SWITCH_BUTTON_TEXT = {
|
|
43
|
+
Server: 'Switch to In-Browser Mode',
|
|
44
|
+
'In-Browser': 'Switch to Server Mode'
|
|
45
|
+
};
|
|
46
|
+
const ServiceModeControl = (param)=>{
|
|
47
|
+
let { serviceMode } = param;
|
|
48
|
+
const { setServiceMode, config } = (0, store_js_namespaceObject.useEnvConfig)();
|
|
49
|
+
const serverValid = (0, useServerValid_js_namespaceObject.useServerValid)('Server' === serviceMode);
|
|
50
|
+
const renderServerTip = ()=>{
|
|
51
|
+
if (serverValid) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
52
|
+
title: "Connected",
|
|
53
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
54
|
+
className: "server-tip",
|
|
55
|
+
children: (0, external_misc_index_js_namespaceObject.iconForStatus)('connected')
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
59
|
+
title: "Connection failed",
|
|
60
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
61
|
+
className: "server-tip",
|
|
62
|
+
children: (0, external_misc_index_js_namespaceObject.iconForStatus)('failed')
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const renderSwitchButton = ()=>{
|
|
67
|
+
const nextMode = 'Server' === serviceMode ? 'In-Browser' : 'Server';
|
|
68
|
+
const buttonText = SWITCH_BUTTON_TEXT[serviceMode];
|
|
69
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
70
|
+
title: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
71
|
+
children: [
|
|
72
|
+
"Server Mode: send the request through the server ",
|
|
73
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
74
|
+
"In-Browser Mode: send the request through the browser fetch API (The AI service should support CORS in this case)"
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
78
|
+
type: "link",
|
|
79
|
+
onClick: (e)=>{
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
setServiceMode(nextMode);
|
|
82
|
+
},
|
|
83
|
+
children: buttonText
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
88
|
+
(0, useSafeOverrideAIConfig_js_namespaceObject.safeOverrideAIConfig)(config, false, false);
|
|
89
|
+
if ('Server' === serviceMode) {
|
|
90
|
+
const playgroundSDK = new playground_namespaceObject.PlaygroundSDK({
|
|
91
|
+
type: 'remote-execution'
|
|
92
|
+
});
|
|
93
|
+
playgroundSDK.overrideConfig(config);
|
|
94
|
+
}
|
|
95
|
+
}, [
|
|
96
|
+
config,
|
|
97
|
+
serviceMode,
|
|
98
|
+
serverValid
|
|
99
|
+
]);
|
|
100
|
+
const statusContent = 'Server' === serviceMode && renderServerTip();
|
|
101
|
+
const title = TITLE_TEXT[serviceMode];
|
|
102
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
103
|
+
children: [
|
|
104
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
105
|
+
style: {
|
|
106
|
+
display: 'flex',
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
justifyContent: 'space-between',
|
|
109
|
+
gap: '10px'
|
|
110
|
+
},
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
113
|
+
style: {
|
|
114
|
+
whiteSpace: 'nowrap',
|
|
115
|
+
margin: 0,
|
|
116
|
+
flexShrink: 0
|
|
117
|
+
},
|
|
118
|
+
children: title
|
|
119
|
+
}),
|
|
120
|
+
statusContent,
|
|
121
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.EnvConfig, {
|
|
122
|
+
showTooltipWhenEmpty: 'Server' !== serviceMode
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
127
|
+
className: "switch-btn-wrapper",
|
|
128
|
+
children: renderSwitchButton()
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
exports.ServiceModeControl = __webpack_exports__.ServiceModeControl;
|
|
134
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
135
|
+
"ServiceModeControl"
|
|
136
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
137
|
+
Object.defineProperty(exports, '__esModule', {
|
|
138
|
+
value: true
|
|
139
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.shiny-text {
|
|
2
|
+
color: rgba(0, 0, 0, 0);
|
|
3
|
+
letter-spacing: .5px;
|
|
4
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
|
5
|
+
background-image: linear-gradient(45deg, #2b83ff, #6a11cb, #2575fc, #4481eb);
|
|
6
|
+
background-size: 300%;
|
|
7
|
+
-webkit-background-clip: text;
|
|
8
|
+
background-clip: text;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
animation: 8s infinite textGradient;
|
|
11
|
+
display: inline-block;
|
|
12
|
+
position: relative;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.shiny-text:after {
|
|
17
|
+
content: "";
|
|
18
|
+
width: 120%;
|
|
19
|
+
height: 120%;
|
|
20
|
+
animation: shine var(--animation-duration, 5s) cubic-bezier(.25, .1, .25, 1) infinite;
|
|
21
|
+
z-index: 1;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .1) 10%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, .1) 90%, rgba(255, 255, 255, 0) 100%);
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: -10%;
|
|
26
|
+
left: -150%;
|
|
27
|
+
transform: skewX(-20deg)translateY(0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.shiny-text.disabled {
|
|
31
|
+
background: #2b83ff;
|
|
32
|
+
-webkit-background-clip: text;
|
|
33
|
+
background-clip: text;
|
|
34
|
+
animation: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.shiny-text.disabled:after {
|
|
38
|
+
animation: none;
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes shine {
|
|
43
|
+
0% {
|
|
44
|
+
opacity: .7;
|
|
45
|
+
left: -150%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
20% {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
80% {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
100% {
|
|
57
|
+
opacity: .7;
|
|
58
|
+
left: 250%;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes textGradient {
|
|
63
|
+
0% {
|
|
64
|
+
background-position: 0%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
50% {
|
|
68
|
+
background-position: 100%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
100% {
|
|
72
|
+
background-position: 0%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
default: ()=>shiny_text
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("./index.css");
|
|
31
|
+
const ShinyText = (param)=>{
|
|
32
|
+
let { text, disabled = false, speed = 5, className = '' } = param;
|
|
33
|
+
const style = {
|
|
34
|
+
'--animation-duration': `${speed}s`
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
37
|
+
className: `shiny-text ${disabled ? 'disabled' : ''} ${className}`,
|
|
38
|
+
style: style,
|
|
39
|
+
children: text
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const shiny_text = ShinyText;
|
|
43
|
+
exports["default"] = __webpack_exports__["default"];
|
|
44
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
45
|
+
"default"
|
|
46
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
47
|
+
Object.defineProperty(exports, '__esModule', {
|
|
48
|
+
value: true
|
|
49
|
+
});
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
.playground-container {
|
|
2
|
+
background: #fff;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
display: flex;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.playground-container .command-form {
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.playground-container .context-preview-section {
|
|
18
|
+
border-bottom: 1px solid #f0f0f0;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
padding: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.playground-container .middle-dialog-area {
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
flex: 1;
|
|
26
|
+
min-height: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
position: relative;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.playground-container .middle-dialog-area .clear-button-container {
|
|
33
|
+
z-index: 10;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 16px;
|
|
36
|
+
right: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.playground-container .middle-dialog-area .clear-button-container .clear-button {
|
|
40
|
+
opacity: .7;
|
|
41
|
+
transition: opacity .2s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.playground-container .middle-dialog-area .clear-button-container .clear-button:hover {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.playground-container .middle-dialog-area .info-list-container {
|
|
49
|
+
scrollbar-width: none;
|
|
50
|
+
flex: 1;
|
|
51
|
+
padding-top: 16px;
|
|
52
|
+
padding-bottom: 16px;
|
|
53
|
+
overflow-x: hidden;
|
|
54
|
+
overflow-y: auto;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.playground-container .middle-dialog-area .info-list-container .ant-list .ant-list-item {
|
|
58
|
+
border-bottom: none;
|
|
59
|
+
padding: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.playground-container .middle-dialog-area .info-list-container .ant-list .ant-list-item .ant-card {
|
|
63
|
+
border: 1px solid #f0f0f0;
|
|
64
|
+
border-radius: 8px;
|
|
65
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.playground-container .middle-dialog-area .info-list-container .ant-list .ant-list-item .ant-card:hover {
|
|
69
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.playground-container .middle-dialog-area .info-list-container .ant-list .ant-list-item .ant-card .ant-card-body {
|
|
73
|
+
padding: 12px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.playground-container .middle-dialog-area .info-list-container .ant-list .ant-list-empty-text {
|
|
77
|
+
color: #999;
|
|
78
|
+
font-style: italic;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.playground-container .middle-dialog-area .info-list-container::-webkit-scrollbar {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.playground-container .middle-dialog-area .info-list-container .list-item {
|
|
86
|
+
background: none;
|
|
87
|
+
border: none;
|
|
88
|
+
padding: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.playground-container .middle-dialog-area .scroll-to-bottom-button {
|
|
92
|
+
z-index: 10;
|
|
93
|
+
background: #fff;
|
|
94
|
+
border: 1px solid rgba(0, 0, 0, .08);
|
|
95
|
+
position: absolute;
|
|
96
|
+
bottom: 10px;
|
|
97
|
+
right: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.playground-container .middle-dialog-area .scroll-to-bottom-button:hover {
|
|
101
|
+
background: #1890ff;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.playground-container .middle-dialog-area .scroll-to-bottom-button:hover .anticon {
|
|
105
|
+
color: #fff;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.playground-container .middle-dialog-area .scroll-to-bottom-button .anticon {
|
|
109
|
+
color: #333;
|
|
110
|
+
font-size: 16px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.playground-container .user-message-container {
|
|
114
|
+
justify-content: flex-end;
|
|
115
|
+
width: 100%;
|
|
116
|
+
margin: 20px 0 30px;
|
|
117
|
+
display: flex;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.playground-container .user-message-container .user-message-bubble {
|
|
121
|
+
color: rgba(0, 0, 0, .85);
|
|
122
|
+
text-align: left;
|
|
123
|
+
background: #f2f4f7;
|
|
124
|
+
border-radius: 12px;
|
|
125
|
+
max-width: 80%;
|
|
126
|
+
padding: 12px 16px;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
font-weight: 400;
|
|
129
|
+
display: inline-block;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.playground-container .progress-action-item {
|
|
133
|
+
color: #000;
|
|
134
|
+
background: #f2f4f7;
|
|
135
|
+
border-radius: 8px;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
height: 36px;
|
|
138
|
+
margin: 4px 0;
|
|
139
|
+
padding: 0 12px;
|
|
140
|
+
font-size: 14px;
|
|
141
|
+
line-height: 36px;
|
|
142
|
+
display: flex;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.playground-container .progress-action-item .progress-status-icon {
|
|
146
|
+
margin-left: 4px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.playground-container .progress-action-item .progress-status-icon.loading {
|
|
150
|
+
color: #1890ff;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.playground-container .progress-action-item .progress-status-icon.completed {
|
|
154
|
+
color: #52c41a;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.playground-container .progress-action-item .progress-status-icon.error {
|
|
158
|
+
color: #ff4d4f;
|
|
159
|
+
font-weight: bold;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.playground-container .progress-description {
|
|
163
|
+
color: #000;
|
|
164
|
+
padding: 8px 0;
|
|
165
|
+
font-size: 14px;
|
|
166
|
+
line-height: 22px;
|
|
167
|
+
display: inline-block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.playground-container .system-message-container {
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
display: flex;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.playground-container .system-message-container .system-message-header {
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 8px;
|
|
178
|
+
margin: 12px 0;
|
|
179
|
+
display: flex;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.playground-container .system-message-container .system-message-header .system-message-title {
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
font-weight: 400;
|
|
185
|
+
line-height: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.playground-container .system-message-container .system-message-content {
|
|
189
|
+
color: rgba(0, 0, 0, .85);
|
|
190
|
+
font-size: 14px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.playground-container .system-message-container .system-message-content .system-message-text {
|
|
194
|
+
color: rgba(0, 0, 0, .85);
|
|
195
|
+
font-size: 14px;
|
|
196
|
+
line-height: 25px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.playground-container .system-message-container .system-message-content .error-message {
|
|
200
|
+
color: #e51723;
|
|
201
|
+
word-break: break-word;
|
|
202
|
+
background-color: #fff;
|
|
203
|
+
border: none;
|
|
204
|
+
border-radius: 0;
|
|
205
|
+
align-items: flex-start;
|
|
206
|
+
margin-bottom: 16px;
|
|
207
|
+
padding: 0;
|
|
208
|
+
font-size: 14px;
|
|
209
|
+
display: flex;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.playground-container .system-message-container .system-message-content .error-message .divider {
|
|
213
|
+
background-color: #e6e8eb;
|
|
214
|
+
flex-shrink: 0;
|
|
215
|
+
align-self: stretch;
|
|
216
|
+
width: 1px;
|
|
217
|
+
min-height: 20px;
|
|
218
|
+
margin: 0 8px 0 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.playground-container .system-message-container .system-message-content .loading-progress-text {
|
|
222
|
+
color: #666;
|
|
223
|
+
background: #f6f8fa;
|
|
224
|
+
border-left: 3px solid #1890ff;
|
|
225
|
+
border-radius: 4px;
|
|
226
|
+
margin-top: 8px;
|
|
227
|
+
padding: 8px 12px;
|
|
228
|
+
font-size: 13px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.playground-container .new-conversation-separator {
|
|
232
|
+
flex-shrink: 0;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
align-items: center;
|
|
235
|
+
padding: 20px 0;
|
|
236
|
+
display: flex;
|
|
237
|
+
position: relative;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.playground-container .new-conversation-separator .separator-line {
|
|
241
|
+
background-color: #e8e8e8;
|
|
242
|
+
height: 1px;
|
|
243
|
+
position: absolute;
|
|
244
|
+
top: 50%;
|
|
245
|
+
left: 0;
|
|
246
|
+
right: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.playground-container .new-conversation-separator .separator-text-container {
|
|
250
|
+
z-index: 1;
|
|
251
|
+
background-color: #fff;
|
|
252
|
+
padding: 0 16px;
|
|
253
|
+
position: relative;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.playground-container .new-conversation-separator .separator-text-container .separator-text {
|
|
257
|
+
color: #999;
|
|
258
|
+
background-color: #fff;
|
|
259
|
+
font-size: 12px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.playground-container .bottom-input-section {
|
|
263
|
+
background-color: #fff;
|
|
264
|
+
flex-shrink: 0;
|
|
265
|
+
padding: 16px 0 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.playground-container .version-info-section {
|
|
269
|
+
flex-shrink: 0;
|
|
270
|
+
justify-content: center;
|
|
271
|
+
align-items: center;
|
|
272
|
+
height: 38px;
|
|
273
|
+
display: flex;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.playground-container .version-text {
|
|
277
|
+
color: #999;
|
|
278
|
+
text-align: center;
|
|
279
|
+
font-size: 12px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.playground-container .hidden-result-ref {
|
|
283
|
+
display: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.playground-container .playground-description {
|
|
287
|
+
margin-bottom: 32px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.playground-container .playground-description .description-zh {
|
|
291
|
+
color: #333;
|
|
292
|
+
margin: 0 0 8px;
|
|
293
|
+
font-size: 16px;
|
|
294
|
+
line-height: 1.5;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.playground-container .playground-description .description-en {
|
|
298
|
+
color: #666;
|
|
299
|
+
margin: 0;
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
line-height: 1.5;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.playground-container .config-section {
|
|
305
|
+
margin-bottom: 24px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.playground-container .config-section .config-title {
|
|
309
|
+
color: #333;
|
|
310
|
+
margin: 0 0 16px;
|
|
311
|
+
font-size: 18px;
|
|
312
|
+
font-weight: 600;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.playground-container .config-section .config-item {
|
|
316
|
+
align-items: center;
|
|
317
|
+
gap: 8px;
|
|
318
|
+
margin-bottom: 12px;
|
|
319
|
+
display: flex;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.playground-container .config-section .config-item .config-check {
|
|
323
|
+
color: #52c41a;
|
|
324
|
+
font-size: 16px;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.playground-container .config-section .config-item .config-label {
|
|
328
|
+
color: #333;
|
|
329
|
+
font-size: 14px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.playground-container .config-section .config-link {
|
|
333
|
+
color: #1890ff;
|
|
334
|
+
font-size: 14px;
|
|
335
|
+
text-decoration: none;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.playground-container .config-section .config-link:hover {
|
|
339
|
+
text-decoration: underline;
|
|
340
|
+
}
|
|
341
|
+
|