Full-stack real-time group chat with Rust/Axum backend and Riot.js frontend. Features: - Auth (register/login/JWT), rooms, invites, WebSocket messaging - AI responses via OpenRouter with tool calling (Brave Search + web fetch) - Real-time tool usage indicators (searching/reading page) - Collapsible tool results in message bubbles - AI stats bar (model, tokens, speed, response time) persisted to DB - Room soft-delete, /clear command, dynamic model fetching - Markdown rendering with code highlighting and copy buttons Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
703 B
JavaScript
37 lines
703 B
JavaScript
import { defineConfig } from 'vite'
|
|
|
|
// Custom Riot.js plugin for Vite
|
|
function riotPlugin() {
|
|
return {
|
|
name: 'vite-plugin-riot',
|
|
async transform(code, id) {
|
|
if (!id.endsWith('.riot')) return null
|
|
|
|
const { compile } = await import('@riotjs/compiler')
|
|
const { code: compiled } = compile(code, { file: id })
|
|
|
|
return {
|
|
code: compiled,
|
|
map: null,
|
|
}
|
|
},
|
|
}
|
|
}
|
|
|
|
export default defineConfig({
|
|
plugins: [riotPlugin()],
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3001',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:3001',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
})
|