emergence-mini-dilles/web/style.css
Jeuners 23c914d743 Ollama URL with auto-fallback
The user wanted to use Ollama on a network host (192.168.1.245).
The host is reachable (ping ~900ms) but its Ollama port (11434)
is not open, so the engine falls back to a local URL.

Changes:
- .env: EMERGENCE_OLLAMA_URL = network host, EMERGENCE_OLLAMA_FALLBACK_URL
  = localhost
- engine/llm.py: chat_ollama now iterates primary then fallback URL
  on connection failure. is_available() does the same. provider_info()
  exposes both URLs.
- All 100 tests still pass.

Live-verified: lovely+spark (llama3.2:3b) use mode=llm with ~10s
latency, which is the connection-refused on 192.168.1.245 + the
successful fallback to 127.0.0.1. As soon as 192.168.1.245's Ollama
is reachable, latency will drop to normal (~1-3s).
2026-06-15 03:08:42 +02:00

76 lines
4.8 KiB
CSS

* { box-sizing: border-box; }
body { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace;
background: #0b0f14; color: #d6e2ee; }
header { display: flex; justify-content: space-between; align-items: baseline;
padding: 12px 18px; border-bottom: 1px solid #1c2733; background: #0e141b; }
header h1 { margin: 0; font-size: 18px; letter-spacing: 1px; color: #6cf0c2; }
.meta span { margin-left: 14px; color: #8aa1b6; font-size: 12px; }
.meta b { color: #d6e2ee; }
.ws-status.connected { color: #6cf0c2; }
.ws-status.disconnected { color: #ff6c6c; }
.llm-info { color: #82aaff; font-size: 11px; }
.clock-card { background: #0a1018; border: 1px solid #1c2733; padding: 6px 8px; margin: 4px 0; }
.clock-card .name { font-weight: bold; }
.clock-card .tau-bar { height: 4px; background: #1c2733; border-radius: 2px; margin: 4px 0; }
.clock-card .tau-bar > i { display: block; height: 100%; border-radius: 2px; }
.clock-card .meta { color: #6c8aa6; font-size: 10px; }
.drift-warn { background: #2a1018; border: 1px solid #ff6c6c; padding: 8px; margin: 6px 0; color: #ff8fb1; font-size: 11px; }
.drift-ok { background: #0a1018; border: 1px solid #1c2733; padding: 8px; margin: 6px 0; color: #6cf0c2; font-size: 11px; }
.text-card { background: #0a1018; border: 1px solid #1c2733; padding: 8px; margin: 6px 0; font-size: 12px; }
.text-card .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.text-card .agent { font-weight: bold; }
.text-card .agent.anchor { color: #ffd166; }
.text-card .agent.flora { color: #6cf0c2; }
.text-card .agent.lovely { color: #ff8fb1; }
.text-card .agent.spark { color: #82aaff; }
.text-card .model { font-size: 9px; padding: 1px 4px; border-radius: 2px; background: #1c2733; color: #82aaff; }
.text-card .model.local { color: #6cf0c2; }
.text-card .model.cloud { color: #ffd166; }
.text-card .kind { font-size: 9px; padding: 1px 4px; border-radius: 2px; background: #2a1a18; color: #ff8fb1; text-transform: uppercase; }
.text-card .body { color: #d6e2ee; line-height: 1.4; margin-top: 4px; word-wrap: break-word; }
.text-card .body.llm { color: #6cf0c2; }
.text-card .body.fallback { color: #8aa1b6; font-style: italic; }
.text-card .ts { color: #6c8aa6; font-size: 10px; }
main { display: grid; grid-template-columns: 1fr 360px; gap: 16px; padding: 16px; }
.canvas-wrap { background: #0e141b; padding: 10px; border: 1px solid #1c2733; }
canvas { display: block; width: 100%; height: auto; image-rendering: pixelated;
background: #060a0e; }
.legend { padding-top: 8px; font-size: 12px; color: #8aa1b6; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
margin-right: 4px; margin-left: 12px; vertical-align: middle; }
.dot.anchor { background: #ffd166; }
.dot.flora { background: #6cf0c2; }
.dot.lovely { background: #ff8fb1; }
.dot.spark { background: #82aaff; }
aside { background: #0e141b; padding: 14px; border: 1px solid #1c2733;
height: calc(100vh - 80px); overflow-y: auto; }
aside h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
color: #6cf0c2; margin: 18px 0 6px; }
#feed { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; }
#feed li { font-size: 12px; padding: 4px 0; border-bottom: 1px dotted #1c2733; }
#feed li .who { color: #82aaff; }
#feed li .tool { color: #ffd166; }
#feed li .why { color: #6c8aa6; font-style: italic; }
.agent-card { background: #0a1018; border: 1px solid #1c2733; padding: 8px; margin: 6px 0; }
.agent-card h3 { margin: 0 0 4px; font-size: 13px; }
.agent-card .bar { height: 4px; background: #1c2733; margin: 2px 0; border-radius: 2px; }
.agent-card .bar > i { display: block; height: 100%; border-radius: 2px; }
.bar.energy > i { background: #ffd166; }
.bar.knowledge > i { background: #82aaff; }
.bar.influence > i { background: #ff8fb1; }
.bar.credits > i { background: #6cf0c2; }
.proposal { background: #0a1018; border: 1px solid #1c2733; padding: 8px; margin: 6px 0; }
.proposal h4 { margin: 0 0 4px; font-size: 13px; color: #ffd166; }
.proposal small { color: #6c8aa6; }
#constitution { font-size: 12px; }
#constitution .article { background: #0a1018; border: 1px solid #1c2733; padding: 8px;
margin: 6px 0; }
#constitution .article b { color: #6cf0c2; }
form#manual { display: grid; gap: 6px; }
form#manual label { display: grid; gap: 2px; font-size: 11px; color: #8aa1b6; }
form#manual select, form#manual input { background: #060a0e; color: #d6e2ee;
border: 1px solid #1c2733; padding: 6px;
font-family: inherit; }
form#manual button { background: #6cf0c2; color: #060a0e; border: 0; padding: 6px;
font-weight: bold; cursor: pointer; }
form#manual button:hover { background: #82ffd6; }