(content)
| 211 | |
| 212 | // ---- Junk filtering ---- |
| 213 | function isJunkContent(content) { |
| 214 | if (typeof content !== 'string') return false; |
| 215 | const t = content.trim(); |
| 216 | if (/^\/[a-z]+$/i.test(t)) return true; |
| 217 | if (/^Set model to/i.test(t) || /Set model to/i.test(t.replace(/\x1B\[[0-9;]*m/g, ''))) return true; |
| 218 | return JUNK_PATTERNS.some(p => p.test(t)); |
| 219 | } |
| 220 | |
| 221 | // ---- Model / Header ---- |
| 222 | export function syncConfirmedModel(nextModel, { allowToast = false } = {}) { |