mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 13:37:15 +01:00
Major changes: - AI streaming: Add unified client for OpenRouter SSE and local (Ollama) providers - Local AI detection: Auto-detect and configure local model providers - Rate limiting: Canonical adapters with X-RateLimit-* headers across APIs - SSE: Add lib/sse.ts for consistent event-stream parsing Cleanup: - Remove /demo, /donate, /fund-us, /funding, /fundraising pages - Simplify ModelSelector component (288 → 80 lines) - Consolidate timeline queries New features: - Voice input component and hook - Query provider for React Query - Model registry with status badges - HTTP headers config Tests & Docs: - E2E tests for project creation wizard - Unit tests for auth, streaming, components - CHANGELOG.md for version tracking - Deployment checklist and PR summary docs Bug fixes: - Timeline schema and functions migration fixes - Messaging RLS recursion fix - Auth callback improvements - Bitcoin formatting precision - Lint fixes for unused variables Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
JavaScript
#!/usr/bin/env node
|
|
/*
|
|
docs-slop-scan.js
|
|
Scans for sloppy placeholder phrases outside of allowed directories (archives/tests)
|
|
*/
|
|
|
|
const { glob } = require('glob');
|
|
const fs = require('fs');
|
|
|
|
const PHRASES = [/coming soon/i, /tbd/i, /todo/i, /wip/i, /work in progress/i, /placeholder/i, /lorem ipsum/i, /beta only/i];
|
|
|
|
async function main() {
|
|
const patterns = [
|
|
'docs/**/*.md',
|
|
'src/**/*.{ts,tsx,md}',
|
|
'app/**/*.{ts,tsx,md}',
|
|
];
|
|
|
|
const files = (await Promise.all(patterns.map(p => glob(p, { ignore: [
|
|
'**/node_modules/**',
|
|
'**/.next/**',
|
|
'**/__tests__/**',
|
|
'docs/archives/**',
|
|
'.claude/**',
|
|
] })))).flat();
|
|
|
|
let violations = [];
|
|
for (const file of files) {
|
|
const text = fs.readFileSync(file, 'utf8');
|
|
const lines = text.split(/\r?\n/);
|
|
lines.forEach((line, idx) => {
|
|
PHRASES.forEach(rx => {
|
|
if (rx.test(line)) {
|
|
violations.push({ file, line: idx + 1, text: line.trim() });
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
if (violations.length) {
|
|
console.log('Slop phrases found (outside archives/tests):');
|
|
violations.slice(0, 100).forEach(v => console.log(`- ${v.file}:${v.line} ${v.text}`));
|
|
process.exitCode = 1;
|
|
} else {
|
|
console.log('No slop phrases found.');
|
|
}
|
|
}
|
|
|
|
main().catch(err => {
|
|
console.error(err);
|
|
process.exitCode = 1;
|
|
});
|
|
|