feat: add devices page with goal input and step log

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sanju Sivalingam
2026-02-17 14:45:47 +05:30
parent edfc91468b
commit 7557481e83
4 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { query, getRequestEvent } from '$app/server';
import { env } from '$env/dynamic/private';
const SERVER_URL = env.SERVER_URL || 'http://localhost:8080';
export const listDevices = query(async () => {
const { request } = getRequestEvent();
const res = await fetch(`${SERVER_URL}/devices`, {
headers: {
cookie: request.headers.get('cookie') ?? ''
}
});
if (!res.ok) return [];
return res.json();
});