feat(rhema-code): add the colors setting with four palettes

The stored `colors` key names a palette — rhema (the default,
Jadeite), aquamarine, black-and-white, or dracula — and the
Appearance page of /settings cycles it live, like the theme and
icon toggles beside it. Each palette carries a dark and a light
appearance under the existing `theme` key; dracula's light side is
derived, the official palette ships only dark.

The appearance decision moves off token comparison: Theme now
answers is_dark() from the ground/text luminance, so palettes
beyond the original two get the right per-profile fallback tones.
This commit is contained in:
vhaudiquet committed 2026-10-17 04:28:31 +08:00
commit 81da26b955
159 files changed
+50628

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
// Dev-only same-origin proxy: forwards the claw's routes to a locally
// running daemon (`clawUpstream`, NUXT_CLAW_UPSTREAM to override) so
// the browser sees one origin and CORS never enters the picture.
//
// Why not `nitro.devProxy`: its httpxy pass never delivers responses to
// bodyless GETs (observed against nitro 2.13), which is exactly the
// shape of /healthz and /v1/sessions. `proxyRequest` is the same
// primitive nitro's route-rule proxy uses.
//
// The built bundle is static — with `import.meta.dev` false this falls
// through and the request 404s against the static output; in a real
// deployment the ingress owns /v1 and /healthz routing (README.md).
import { proxyRequest } from 'h3'
export default defineEventHandler((event) => {
if (!import.meta.dev) return
const { pathname } = getRequestURL(event)
if (pathname !== '/healthz' && !pathname.startsWith('/v1/')) return
return proxyRequest(event, useRuntimeConfig(event).clawUpstream + pathname)
})