@scalar/agent-chat 0.12.59 → 0.12.60
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/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +1 -15
- package/dist/components/ResponseBody/helpers/process-response-body.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/style.css +41 -26
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-response-body.d.ts","sourceRoot":"","sources":["../../../../src/components/ResponseBody/helpers/process-response-body.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"process-response-body.d.ts","sourceRoot":"","sources":["../../../../src/components/ResponseBody/helpers/process-response-body.ts"],"names":[],"mappings":"AAcA,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE;;;;EA2BzG"}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
+
import { extractFilename } from "@scalar/helpers/http/extract-filename";
|
|
1
2
|
import { parseMimeType } from "@scalar/helpers/http/mime-type";
|
|
2
3
|
// src/components/ResponseBody/helpers/process-response-body.ts
|
|
3
|
-
var decodeURIComponentSafe = (str) => {
|
|
4
|
-
try {
|
|
5
|
-
return decodeURIComponent(str);
|
|
6
|
-
} catch {
|
|
7
|
-
return str;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
function extractFilename(contentDisposition) {
|
|
11
|
-
let filename = "";
|
|
12
|
-
if (contentDisposition) {
|
|
13
|
-
const fileNameMatch = contentDisposition.match(/filename\*=UTF-8''([^;]+)/)?.[1] ?? contentDisposition.match(/filename\s*=\s*"?([^";]+)"?/)?.[1];
|
|
14
|
-
if (fileNameMatch) filename = decodeURIComponentSafe(fileNameMatch.trim());
|
|
15
|
-
}
|
|
16
|
-
return filename;
|
|
17
|
-
}
|
|
18
4
|
var isBlob = (b) => b instanceof Blob;
|
|
19
5
|
var getResponseHeaders = (headers) => {
|
|
20
6
|
return headers ? Object.keys(headers).map((key) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-response-body.js","names":[],"sources":["../../../../src/components/ResponseBody/helpers/process-response-body.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"process-response-body.js","names":[],"sources":["../../../../src/components/ResponseBody/helpers/process-response-body.ts"],"sourcesContent":["import { extractFilename } from '@scalar/helpers/http/extract-filename'\nimport { parseMimeType } from '@scalar/helpers/http/mime-type'\n\nconst isBlob = (b: any): b is Blob => b instanceof Blob\n\nconst getResponseHeaders = (headers?: Record<string, string>) => {\n return headers\n ? Object.keys(headers).map((key) => ({\n name: key,\n value: headers[key] ?? '',\n }))\n : []\n}\n\nexport function processResponseBody({ data, headers }: { data: unknown; headers?: Record<string, string> }) {\n const responseHeaders = getResponseHeaders(headers)\n\n const contentType = responseHeaders.find((header) => header.name.toLowerCase() === 'content-type')\n const mimeType = contentType?.value ? parseMimeType(contentType.value) : undefined\n const attachmentFilename = extractFilename(\n responseHeaders.find((header) => header.name.toLowerCase() === 'content-disposition')?.value ?? '',\n )\n\n const dataUrl = (() => {\n if (isBlob(data)) {\n return URL.createObjectURL(data)\n }\n if (typeof data === 'string') {\n return URL.createObjectURL(new Blob([data], { type: mimeType ? mimeType.toString() : undefined }))\n }\n if (data instanceof Object && Object.keys(data).length) {\n return URL.createObjectURL(\n new Blob([JSON.stringify(data)], {\n type: mimeType ? mimeType.toString() : undefined,\n }),\n )\n }\n return ''\n })()\n\n return { mimeType, attachmentFilename, dataUrl }\n}\n"],"mappings":";;;AAGA,IAAM,UAAU,MAAsB,aAAa;AAEnD,IAAM,sBAAsB,YAAqC;CAC/D,OAAO,UACH,OAAO,KAAK,OAAO,CAAC,CAAC,KAAK,SAAS;EACjC,MAAM;EACN,OAAO,QAAQ,QAAQ;CACzB,EAAE,IACF,CAAC;AACP;AAEA,SAAgB,oBAAoB,EAAE,MAAM,WAAgE;CAC1G,MAAM,kBAAkB,mBAAmB,OAAO;CAElD,MAAM,cAAc,gBAAgB,MAAM,WAAW,OAAO,KAAK,YAAY,MAAM,cAAc;CACjG,MAAM,WAAW,aAAa,QAAQ,cAAc,YAAY,KAAK,IAAI,KAAA;CAsBzE,OAAO;EAAE;EAAU,oBArBQ,gBACzB,gBAAgB,MAAM,WAAW,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAC,EAAE,SAAS,EAoB/E;EAAoB,gBAjBhB;GACrB,IAAI,OAAO,IAAI,GACb,OAAO,IAAI,gBAAgB,IAAI;GAEjC,IAAI,OAAO,SAAS,UAClB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,MAAM,WAAW,SAAS,SAAS,IAAI,KAAA,EAAU,CAAC,CAAC;GAEnG,IAAI,gBAAgB,UAAU,OAAO,KAAK,IAAI,CAAC,CAAC,QAC9C,OAAO,IAAI,gBACT,IAAI,KAAK,CAAC,KAAK,UAAU,IAAI,CAAC,GAAG,EAC/B,MAAM,WAAW,SAAS,SAAS,IAAI,KAAA,EACzC,CAAC,CACH;GAEF,OAAO;EACT,EAAA,CAEuC;CAAQ;AACjD"}
|
package/dist/package.json
CHANGED
package/dist/style.css
CHANGED
|
@@ -182,9 +182,9 @@
|
|
|
182
182
|
0 0 0 var(--scalar-border-width) var(--scalar-border-color);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
@supports (color:
|
|
185
|
+
@supports (color: oklab(from white l a b)) {
|
|
186
186
|
.scalar-card {
|
|
187
|
-
--scalar-card-surface:
|
|
187
|
+
--scalar-card-surface: oklab(from var(--scalar-background-2) calc(l + .055) a b);
|
|
188
188
|
--scalar-card-surface-raised: var(--scalar-card-surface);
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -1072,22 +1072,17 @@
|
|
|
1072
1072
|
display: none;
|
|
1073
1073
|
}
|
|
1074
1074
|
|
|
1075
|
-
.scalar-modal
|
|
1076
|
-
animation: .3s ease-in-out forwards fadein-layout-
|
|
1075
|
+
.scalar-modal[data-v-09866bb7]::backdrop {
|
|
1076
|
+
animation: .3s ease-in-out forwards fadein-layout-09866bb7;
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
-
.scalar-modal[data-v-
|
|
1079
|
+
.scalar-modal[data-v-09866bb7] {
|
|
1080
1080
|
box-shadow: var(--scalar-shadow-2);
|
|
1081
|
-
animation: .3s ease-in-out .1s forwards fadein-modal-
|
|
1081
|
+
animation: .3s ease-in-out .1s forwards fadein-modal-09866bb7;
|
|
1082
1082
|
transform: translate3d(0, 10px, 0);
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
|
-
.
|
|
1086
|
-
opacity: 1 !important;
|
|
1087
|
-
background: none !important;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
.modal-content-search .modal-body[data-v-b002945c] {
|
|
1085
|
+
.modal-content-search .modal-body[data-v-09866bb7] {
|
|
1091
1086
|
flex-direction: column;
|
|
1092
1087
|
max-height: 440px;
|
|
1093
1088
|
padding: 0;
|
|
@@ -1096,13 +1091,13 @@
|
|
|
1096
1091
|
}
|
|
1097
1092
|
|
|
1098
1093
|
@media (max-width: 720px) and (max-height: 480px) {
|
|
1099
|
-
.scalar-modal
|
|
1094
|
+
.scalar-modal[data-v-09866bb7]:not(.full-size-styles) {
|
|
1100
1095
|
max-height: 90svh;
|
|
1101
1096
|
margin-top: 5svh;
|
|
1102
1097
|
}
|
|
1103
1098
|
}
|
|
1104
1099
|
|
|
1105
|
-
@keyframes fadein-layout-
|
|
1100
|
+
@keyframes fadein-layout-09866bb7 {
|
|
1106
1101
|
0% {
|
|
1107
1102
|
opacity: 0;
|
|
1108
1103
|
}
|
|
@@ -1112,7 +1107,7 @@
|
|
|
1112
1107
|
}
|
|
1113
1108
|
}
|
|
1114
1109
|
|
|
1115
|
-
@keyframes fadein-modal-
|
|
1110
|
+
@keyframes fadein-modal-09866bb7 {
|
|
1116
1111
|
0% {
|
|
1117
1112
|
opacity: 0;
|
|
1118
1113
|
transform: translate3d(0, 10px, 0);
|
|
@@ -1124,10 +1119,10 @@
|
|
|
1124
1119
|
}
|
|
1125
1120
|
}
|
|
1126
1121
|
|
|
1127
|
-
.full-size-styles[data-v-
|
|
1122
|
+
.full-size-styles[data-v-09866bb7] {
|
|
1128
1123
|
margin: initial;
|
|
1129
1124
|
border-right: var(--scalar-border-width) solid var(--scalar-border-color);
|
|
1130
|
-
animation: .3s ease-in-out forwards fadein-layout-
|
|
1125
|
+
animation: .3s ease-in-out forwards fadein-layout-09866bb7;
|
|
1131
1126
|
left: 0;
|
|
1132
1127
|
transform: translate3d(0, 0, 0);
|
|
1133
1128
|
background-color: var(--scalar-background-1) !important;
|
|
@@ -1139,12 +1134,12 @@
|
|
|
1139
1134
|
}
|
|
1140
1135
|
|
|
1141
1136
|
@media (min-width: 800px) {
|
|
1142
|
-
.full-size-styles[data-v-
|
|
1137
|
+
.full-size-styles[data-v-09866bb7] {
|
|
1143
1138
|
width: 50dvw !important;
|
|
1144
1139
|
}
|
|
1145
1140
|
}
|
|
1146
1141
|
|
|
1147
|
-
.full-size-styles[data-v-
|
|
1142
|
+
.full-size-styles[data-v-09866bb7]:after {
|
|
1148
1143
|
content: "";
|
|
1149
1144
|
width: 50dvw;
|
|
1150
1145
|
height: 100dvh;
|
|
@@ -2051,7 +2046,7 @@ input[data-v-029a43f5]::placeholder {
|
|
|
2051
2046
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFF' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E");
|
|
2052
2047
|
}
|
|
2053
2048
|
|
|
2054
|
-
.scalar-code-block[data-v-
|
|
2049
|
+
.scalar-code-block[data-v-bbbaf1fc] .hljs * {
|
|
2055
2050
|
font-size: var(--scalar-small);
|
|
2056
2051
|
}
|
|
2057
2052
|
|
|
@@ -2105,12 +2100,12 @@ input[data-v-029a43f5]::placeholder {
|
|
|
2105
2100
|
opacity: 0;
|
|
2106
2101
|
}
|
|
2107
2102
|
|
|
2108
|
-
.animate-response-heading .response-heading[data-v-
|
|
2103
|
+
.animate-response-heading .response-heading[data-v-ad86b672] {
|
|
2109
2104
|
opacity: 1;
|
|
2110
|
-
animation: .2s ease-in-out forwards push-response-
|
|
2105
|
+
animation: .2s ease-in-out forwards push-response-ad86b672;
|
|
2111
2106
|
}
|
|
2112
2107
|
|
|
2113
|
-
@keyframes push-response-
|
|
2108
|
+
@keyframes push-response-ad86b672 {
|
|
2114
2109
|
from {
|
|
2115
2110
|
opacity: 1;
|
|
2116
2111
|
transform: translateY(0);
|
|
@@ -2122,12 +2117,12 @@ input[data-v-029a43f5]::placeholder {
|
|
|
2122
2117
|
}
|
|
2123
2118
|
}
|
|
2124
2119
|
|
|
2125
|
-
.animate-response-heading .animate-response-children[data-v-
|
|
2120
|
+
.animate-response-heading .animate-response-children[data-v-ad86b672] {
|
|
2126
2121
|
opacity: 0;
|
|
2127
|
-
animation: .2s ease-in-out 50ms forwards response-spans-
|
|
2122
|
+
animation: .2s ease-in-out 50ms forwards response-spans-ad86b672;
|
|
2128
2123
|
}
|
|
2129
2124
|
|
|
2130
|
-
@keyframes response-spans-
|
|
2125
|
+
@keyframes response-spans-ad86b672 {
|
|
2131
2126
|
from {
|
|
2132
2127
|
opacity: 0;
|
|
2133
2128
|
transform: translateY(4px);
|
|
@@ -3039,6 +3034,10 @@ input[data-v-029a43f5]::placeholder {
|
|
|
3039
3034
|
max-width: max-content;
|
|
3040
3035
|
}
|
|
3041
3036
|
|
|
3037
|
+
.scalar-app .max-w-none {
|
|
3038
|
+
max-width: none;
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3042
3041
|
.scalar-app .min-w-\[4\.5rem\] {
|
|
3043
3042
|
min-width: 4.5rem;
|
|
3044
3043
|
}
|
|
@@ -3748,6 +3747,10 @@ input[data-v-029a43f5]::placeholder {
|
|
|
3748
3747
|
text-overflow: ellipsis;
|
|
3749
3748
|
}
|
|
3750
3749
|
|
|
3750
|
+
.scalar-app .whitespace-normal {
|
|
3751
|
+
white-space: normal;
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3751
3754
|
.scalar-app .whitespace-nowrap {
|
|
3752
3755
|
white-space: nowrap;
|
|
3753
3756
|
}
|
|
@@ -4061,6 +4064,10 @@ input[data-v-029a43f5]::placeholder {
|
|
|
4061
4064
|
border-top-width: 1px;
|
|
4062
4065
|
}
|
|
4063
4066
|
|
|
4067
|
+
.scalar-app .not-open\:hidden:not(:is([open], :popover-open, :open)) {
|
|
4068
|
+
display: none;
|
|
4069
|
+
}
|
|
4070
|
+
|
|
4064
4071
|
:is(:where(.group\/row):first-child :is(.scalar-app .group-first\/row\:border-t-0)) {
|
|
4065
4072
|
border-top-style: var(--tw-border-style);
|
|
4066
4073
|
border-top-width: 0;
|
|
@@ -4190,6 +4197,10 @@ input[data-v-029a43f5]::placeholder {
|
|
|
4190
4197
|
font-family: inherit;
|
|
4191
4198
|
}
|
|
4192
4199
|
|
|
4200
|
+
.scalar-app .backdrop\:bg-transparent::backdrop {
|
|
4201
|
+
background-color: #0000;
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4193
4204
|
.scalar-app .before\:hidden\!:before {
|
|
4194
4205
|
content: var(--tw-content);
|
|
4195
4206
|
display: none !important;
|
|
@@ -4428,6 +4439,10 @@ input[data-v-029a43f5]::placeholder {
|
|
|
4428
4439
|
background-image: linear-gradient(var(--tw-gradient-stops));
|
|
4429
4440
|
}
|
|
4430
4441
|
|
|
4442
|
+
.scalar-app .dark\:backdrop\:bg-transparent::backdrop {
|
|
4443
|
+
background-color: #0000;
|
|
4444
|
+
}
|
|
4445
|
+
|
|
4431
4446
|
@media (hover: hover) {
|
|
4432
4447
|
.scalar-app .dark\:hover\:bg-linear-to-b:hover {
|
|
4433
4448
|
--tw-gradient-position: to bottom;
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/agent-chat"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.12.
|
|
13
|
+
"version": "0.12.60",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=22"
|
|
16
16
|
},
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@ai-sdk/vue": "4.0.179",
|
|
49
|
-
"@scalar/api-client": "3.29.
|
|
50
|
-
"@scalar/components": "0.36.
|
|
51
|
-
"@scalar/helpers": "0.20.
|
|
49
|
+
"@scalar/api-client": "3.29.2",
|
|
50
|
+
"@scalar/components": "0.36.1",
|
|
51
|
+
"@scalar/helpers": "0.20.1",
|
|
52
52
|
"@scalar/icons": "0.7.12",
|
|
53
|
-
"@scalar/json-magic": "0.23.
|
|
53
|
+
"@scalar/json-magic": "0.23.1",
|
|
54
54
|
"@scalar/openapi-types": "0.9.10",
|
|
55
|
-
"@scalar/schemas": "0.
|
|
56
|
-
"@scalar/themes": "0.
|
|
57
|
-
"@scalar/types": "0.
|
|
58
|
-
"@scalar/use-toasts": "0.10.
|
|
55
|
+
"@scalar/schemas": "0.21.0",
|
|
56
|
+
"@scalar/themes": "0.22.0",
|
|
57
|
+
"@scalar/types": "0.33.0",
|
|
58
|
+
"@scalar/use-toasts": "0.10.11",
|
|
59
59
|
"@scalar/validation": "0.6.9",
|
|
60
|
-
"@scalar/workspace-store": "0.
|
|
60
|
+
"@scalar/workspace-store": "0.78.0",
|
|
61
61
|
"@vueuse/core": "15.0.0",
|
|
62
62
|
"ai": "7.0.179",
|
|
63
63
|
"js-base64": "^3.9.7",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vue": "^3.5.46"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@scalar/sidebar": "0.13.
|
|
69
|
+
"@scalar/sidebar": "0.13.4",
|
|
70
70
|
"@tailwindcss/cli": "^4.3.5",
|
|
71
71
|
"@tailwindcss/vite": "^4.3.5",
|
|
72
72
|
"@types/jsdom": "30.0.0",
|