Initial commit: Hermes Chat v2

Svelte 5 + shadcn-svelte + Tailwind CSS v4 chat interface
for Hermes Agent with Monaco editor, file drag/drop,
artifacts, image preview, and real session management.

- SSE streaming via hermes CLI proxy
- File upload + drag/drop with image preview
- Code artifacts with Monaco editor
- Markdown + highlight.js syntax highlighting
- Full settings (model, provider, temp, system prompt)
- 12 shadcn UI components
- Dark/light theme
This commit is contained in:
2026-05-22 05:21:37 +02:00
commit 511793772a
80 changed files with 4637 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import { json } from '@sveltejs/kit';
import { execSync } from 'child_process';
export async function GET({ url }) {
try {
const limit = url.searchParams.get('limit') || '20';
const output = execSync(
'hermes sessions list --limit ' + limit + ' --json 2>/dev/null || echo "[]"',
{ timeout: 5000, encoding: 'utf-8' }
);
const parsed = JSON.parse(output);
return json(
parsed.map((s: any) => ({
id: s.id || s.session_id || '',
title: s.title || 'Untitled',
preview: s.preview || (s.first_message || '').slice(0, 80),
timestamp: s.timestamp || s.created_at || Date.now()
}))
);
} catch {
return json([]);
}
}