edoardo 1.0.13 → 1.0.17
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.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Edoardo</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CULXt9dZ.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BhfrXmZQ.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
package/server/standalone.js
CHANGED
|
@@ -112,6 +112,23 @@ async function parseSSEResponse(response) {
|
|
|
112
112
|
|
|
113
113
|
async function handleMcpResponse(response) {
|
|
114
114
|
const contentType = response.headers.get('content-type') || '';
|
|
115
|
+
|
|
116
|
+
// Check for error responses first
|
|
117
|
+
if (!response.ok) {
|
|
118
|
+
const text = await response.text();
|
|
119
|
+
// Try to parse as JSON error
|
|
120
|
+
try {
|
|
121
|
+
const jsonError = JSON.parse(text);
|
|
122
|
+
throw new Error(jsonError.message || jsonError.error || `HTTP ${response.status}`);
|
|
123
|
+
} catch (e) {
|
|
124
|
+
// If not JSON, use the text directly
|
|
125
|
+
if (e.message && !e.message.includes('HTTP')) {
|
|
126
|
+
throw e;
|
|
127
|
+
}
|
|
128
|
+
throw new Error(text || `HTTP ${response.status} ${response.statusText}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
115
132
|
if (contentType.includes('text/event-stream')) {
|
|
116
133
|
return await parseSSEResponse(response);
|
|
117
134
|
} else {
|