@qzoft/check-list 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/task-checklist.html +15 -1
package/package.json
CHANGED
package/ui/task-checklist.html
CHANGED
|
@@ -214,8 +214,22 @@
|
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
+
function escapeHtml(str) {
|
|
218
|
+
const div = document.createElement('div');
|
|
219
|
+
div.textContent = str;
|
|
220
|
+
return div.innerHTML;
|
|
221
|
+
}
|
|
222
|
+
|
|
217
223
|
function handleToolResult(result) {
|
|
218
224
|
try {
|
|
225
|
+
// Check for error responses first
|
|
226
|
+
if (result.isError) {
|
|
227
|
+
const textContent = result.content?.find(c => c.type === 'text');
|
|
228
|
+
const msg = textContent?.text || 'Unknown error';
|
|
229
|
+
sectionsEl.innerHTML = '<p style="color:var(--save-err)">Error: ' + escapeHtml(msg) + '</p>';
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
|
|
219
233
|
// Prefer structuredContent, fall back to parsing text content
|
|
220
234
|
let fileGroups = result.structuredContent?.files;
|
|
221
235
|
if (!fileGroups) {
|
|
@@ -228,7 +242,7 @@
|
|
|
228
242
|
renderFileGroups(fileGroups);
|
|
229
243
|
}
|
|
230
244
|
} catch (err) {
|
|
231
|
-
sectionsEl.innerHTML = '<p>Error loading tasks: ' + (err.message || String(err)) + '</p>';
|
|
245
|
+
sectionsEl.innerHTML = '<p style="color:var(--save-err)">Error loading tasks: ' + escapeHtml(err.message || String(err)) + '</p>';
|
|
232
246
|
}
|
|
233
247
|
}
|
|
234
248
|
|