@clawchatsai/connector 0.0.93 → 0.0.94
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/server/gateway.js +2 -0
package/package.json
CHANGED
package/server/gateway.js
CHANGED
|
@@ -260,6 +260,8 @@ export class GatewayClient {
|
|
|
260
260
|
const now = Date.now();
|
|
261
261
|
try {
|
|
262
262
|
db.prepare('INSERT INTO messages (id, thread_id, role, content, status, metadata, timestamp, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)').run(`gw-error-${parsed.threadId}-${now}`, parsed.threadId, 'system', `[error] ${message?.error || message?.content || 'Unknown error'}`, 'sent', '{"transient":true}', now, now);
|
|
263
|
+
// Clear stale pending flag so browsers reloading the chat don't re-derive "thinking..." state.
|
|
264
|
+
db.prepare("UPDATE messages SET metadata = json_remove(metadata, '$.pending') WHERE thread_id = ? AND role = 'assistant' AND json_extract(metadata, '$.pending') = 1").run(parsed.threadId);
|
|
263
265
|
} catch (e) { console.error('Failed to save error marker:', e.message); }
|
|
264
266
|
}
|
|
265
267
|
|