feat(web): add web demo and polish Lit web components UI and demo tooling

This commit is contained in:
2026-03-07 08:15:23 +00:00
parent dd04edb420
commit 54f9cea7f9
15 changed files with 994 additions and 100 deletions
+21
View File
@@ -0,0 +1,21 @@
import { getModel } from '@push.rocks/smartai';
import { startChat } from '../ts_cli/index.js';
const apiKey = process.env.ANTHROPIC_TOKEN;
if (!apiKey) {
console.error('Missing ANTHROPIC_TOKEN environment variable.');
console.error('Usage: ANTHROPIC_TOKEN=sk-... tsx demo/demo.cli.ts');
process.exit(1);
}
const model = getModel({
provider: 'anthropic',
model: 'claude-sonnet-4-5-20250929',
apiKey,
});
await startChat({
model,
system: 'You are a friendly, concise assistant. Keep responses short unless asked for detail.',
modelName: 'Claude Sonnet',
});