Files
mission-control-v2/frontend/dist/assets/IdeenAnsicht-Crw42hu2.js
T
HitonabiandClaude Opus 5 a494d320d7 feat(agent): P6 — Werkzeug-Verlauf, und der Blocker war nur eine halbe Wand
Der Blueprint sah eine "Live Agent Matrix" mit Denkstrom vor (§4.4). In P4 hatte ich
sie als blockiert gemeldet: Lucys Denkschritte entstehen im Hermes-Prozess, und
AGENTS.md verbietet es, dessen Quellcode zu patchen.

Beim Nachsehen zeigte sich, dass die HAELFTE davon offen daliegt.
`~/.hermes/logs/agent.log` protokolliert JEDEN Werkzeug-Ruf:

  INFO [cron_195e…] agent.tool_executor: tool terminal completed (1.40s, 53 chars)
  WARNING [cron_195e…] agent.tool_executor: Tool web_extract returned error (0.17s): {…}

Eine Log-Datei zu LESEN ist kein Patchen. Was dadurch sichtbar wird — welches Werkzeug,
wie lange, mit welchem Ergebnis, in welchem Lauf — ist fuer "was tut sie gerade und wo
haengt es" oft nuetzlicher als der Fliesstext ihrer Gedanken.

## Es hat sich beim ersten Blick bezahlt gemacht

Der Parser lief gegen den echten Box-Log und meldete sofort:

  web_extract      2 Rufe   2 Fehler   <-- IMMER ROT
      DuckDuckGo (ddgs) is a search-only backend and cannot extract URL content.
  web_search      20 Rufe   0 Fehler   Schnitt 1,77 s

Nachgesehen: `web_extract` scheitert seit MINDESTENS dem 25.08. jeden Morgen um 07:00
mit derselben Meldung — im Daily-News-Cron, vier Tage lang, ohne dass es irgendwo
aufgefallen waere. Genau dafuer steht die Bilanz OBEN und die Zeitleiste darunter:
Ein Dauerfehler verschwindet in einer Ereignisliste, in der Zeile
"web_extract · 2 Rufe · 2 Fehler" nicht.

## Was die Ansicht NICHT verspricht

Denkstrom und Werkzeug-Argumente stehen nicht im Log und tauchen darum auch nicht auf.
Das steht so in der Ansicht selbst, nicht nur im Code — eine Oberflaeche, die mehr
andeutet als sie hat, ist schlimmer als eine, die ihre Grenze nennt.

## Umsetzung

  services/agent_aktivitaet.py   liest nur die letzten 512 kB (die Datei waechst auf
                                 MB und wird rotiert), vier gemessene Zeilenformen,
                                 Bilanz je Werkzeug + Gruppierung je Lauf
  GET /api/agent/aktivitaet      limit gedeckelt auf 300
  features/agent/Werkzeugverlauf.tsx   Bilanz -> Laeufe -> aufklappbare Zeitleiste

Fehlt das Log (Entwicklungsrechner ohne Hermes), verschwindet der Abschnitt still,
statt eine leere Karte zu zeigen — wie der Rest der Seite es haelt.

## Verifiziert

  Parser gegen den echten Box-Log: 26 Rufe, 4 Werkzeuge, 2 Laeufe erkannt,
    Rauschen (mem_trim, aiohttp) ignoriert
  Im Browser gegen dieselben Daten: "IMMER ROT"-Markierung sitzt, Grund im Klartext,
    Laufgruppen mit Zeitspanne, 26 Einzelrufe in der Zeitleiste
  7 neue Tests (44 gesamt) — sie pruefen gezielt die BILANZ-Karte, nicht irgendein
    Vorkommen des Werkzeugnamens; der steht auch in der Zeitleiste

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 09:51:14 +02:00

36 lines
37 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{c as R,$ as O,r as u,n as z,j as e,b as S,L as D,G as T,X as Q,a3 as Se,u as De,k as Ce,z as Ke,A as ze,a6 as Ee,a7 as xe,C as Ae,T as Le,a4 as Pe,R as We,q as $e}from"./index-DvtGY8-b.js";import{S as Re}from"./SectionLabel-D0h88ho8.js";import{C as ee}from"./code-xml-CWTq52sX.js";import{H as X}from"./hammer-CE6Zn7Q-.js";import{R as ge}from"./refresh-cw-CTp9Wnlo.js";import{F as fe}from"./file-text-BN2uI732.js";import{L as Be}from"./layers-DGDzGr16.js";import{C as U}from"./chevron-down-hb9Pt4vA.js";import{C as he}from"./clock-geHux9wJ.js";/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ie=R("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Oe=R("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Te=R("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Y=R("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const me=R("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ve=R("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),qe={triage:{label:"wird ausgearbeitet …",cls:"text-violet-300 border-violet-500/40 bg-violet-500/10",spin:!0},todo:{label:"wartet",cls:"text-muted-foreground border-border/60 bg-background/30"},scheduled:{label:"geplant",cls:"text-muted-foreground border-border/60 bg-background/30"},ready:{label:"gleich dran",cls:"text-sky-300/80 border-sky-500/30 bg-sky-500/5"},running:{label:"in Arbeit …",cls:"text-sky-300 border-sky-500/40 bg-sky-500/10",spin:!0},review:{label:"im Review",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10"},blocked:{label:"hängt — braucht dich",cls:"text-red-300 border-red-500/40 bg-red-500/10"},done:{label:"fertig ✓",cls:"text-emerald-300 border-emerald-500/40 bg-emerald-500/10"}},_e={box:{label:"BOX",icon:X,cls:"border-border/60 bg-background/40 text-muted-foreground",title:"Box-Welt: die Werkstatt baut das selbst. Das Ergebnis kommt als Patch-Vorschlag zurück — nichts geht ohne deinen Klick live."},idee:{label:"IDEE",icon:O,cls:"border-sky-500/40 bg-sky-500/10 text-sky-300",title:"Nur durchdacht: die Box hat die Produkt-Idee mit voller Denk-Kaskade zu einem Konzept ausgearbeitet. Kein Gerüst, kein Bau — du liest es und entscheidest, ob ein Projekt draus wird."},projekt:{label:"IDE",icon:ee,cls:"border-violet-500/40 bg-violet-500/10 text-violet-300",title:"IDE-Welt: die Box bereitet nur vor (Konzept + Repo + Doku, kein Code). Gebaut wird von dir in der Agentic IDE."}},Fe={needs_input:"Die Box hat eine Frage:",capability:"Die Box kam hier nicht weiter:",transient:"Die Aufgabe hakt:"},$={blocked:0,running:1,review:2,ready:3,triage:4},be="mc_ideen_quote";function ke(){try{const r=JSON.parse(localStorage.getItem(be)||"{}");return{gesendet:Number(r.gesendet)||0,geaendert:Number(r.geaendert)||0}}catch{return{gesendet:0,geaendert:0}}}function pe(r){try{const d=ke();d[r]+=1,localStorage.setItem(be,JSON.stringify(d))}catch{}}function Ge({id:r}){const[d,k]=u.useState(null),[n,m]=u.useState(!1),[p,h]=u.useState(0);u.useEffect(()=>{let o=!1;return m(!1),k(null),z(`/api/ideen/${r}/ergebnis`).then(i=>{o||k(i)}).catch(()=>{o||m(!0)}),()=>{o=!0}},[r,p]);const g=d?d.summary||d.result:"";return e.jsx("div",{className:"ml-2 -mt-1",children:e.jsxs("div",{className:"rounded-lg border border-emerald-500/25 bg-emerald-500/5 p-2.5",children:[e.jsxs("p",{className:"mb-1 flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wide text-emerald-300",children:[e.jsx(Te,{className:"h-3 w-3"})," Ergebnis des Workers"]}),n?e.jsx("button",{type:"button",onClick:()=>h(o=>o+1),className:"text-[10px] text-red-400 underline decoration-dotted underline-offset-2 hover:text-red-300",children:"Ergebnis nicht ladbar — nochmal versuchen"}):d===null?e.jsx("p",{className:"text-[10px] text-muted-foreground animate-pulse",children:"Wird geladen …"}):g?e.jsx("p",{className:"max-h-64 overflow-y-auto whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:g}):e.jsx("p",{className:"text-[10px] text-muted-foreground italic",children:"Der Worker hat keine Abschluss-Zusammenfassung hinterlassen (ältere Karte oder Protokollverstoß)."})]})})}function Ze({text:r,className:d}){const k=(r||"").split(`
`),n=[];let m=[],p=null;const h=g=>{m.length&&(n.push(e.jsx("ul",{className:"mb-3 ml-4 list-disc space-y-1",children:m},g)),m=[])};return k.forEach((g,o)=>{const i=`l${o}`;if(p!==null){g.trimEnd()==="```"?(n.push(e.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px] leading-relaxed text-foreground/85",children:p.join(`
`)},i)),p=null):p.push(g);return}if(g.trimStart().startsWith("```")){h(i),p=[];return}const j=g.trimEnd();if(!j.trim()){h(i);return}const w=j.match(/^(#{1,4})\s+(.*)$/);if(w){h(i);const N=w[1].length,c=N===1?"text-base font-bold mt-1 mb-2":N===2?"text-sm font-bold mt-4 mb-1.5":"text-xs font-bold mt-3 mb-1 uppercase tracking-wide text-muted-foreground";n.push(e.jsx("p",{className:S(c,"font-space text-foreground"),children:F(w[2],i)},i));return}const y=j.match(/^\s*[-*•]\s+(.*)$/);if(y){m.push(e.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:F(y[1],i)},i));return}const l=j.match(/^\s*\d+\.\s+(.*)$/);if(l){m.push(e.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:F(l[1],i)},i));return}h(i),n.push(e.jsx("p",{className:"mb-2 text-xs leading-relaxed text-foreground/85",children:F(j,i)},i))}),h("end"),p!==null&&n.push(e.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px]",children:p.join(`
`)},"code-end")),e.jsx("div",{className:S("max-w-3xl",d),children:n})}function F(r,d){return r.split(/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g).map((n,m)=>{const p=`${d}-${m}`;return/^\*\*[^*]+\*\*$/.test(n)?e.jsx("b",{className:"font-semibold text-foreground",children:n.slice(2,-2)},p):/^\*[^*]+\*$/.test(n)?e.jsx("i",{children:n.slice(1,-1)},p):/^`[^`]+`$/.test(n)?e.jsx("code",{className:"rounded bg-background/50 px-1 font-mono text-[11px] text-foreground/90",children:n.slice(1,-1)},p):e.jsx("span",{children:n},p)})}function He({id:r,onFertig:d}){const[k,n]=u.useState("lxc"),[m,p]=u.useState("simpel"),[h,g]=u.useState(!1),[o,i]=u.useState(null),[j,w]=u.useState(""),[y,l]=u.useState(""),N=async(c,L,V)=>{g(!0),w("");try{const C=await z(c,{method:"POST",body:JSON.stringify(L)});i({id:C.id,art:V}),d==null||d()}catch(C){w(String((C==null?void 0:C.message)||C))}finally{g(!1)}};return o?e.jsx("p",{className:"mt-3 border-t border-violet-500/20 pt-2 text-[11px] text-emerald-300",children:o.art==="projekt"?e.jsxs(e.Fragment,{children:["Projekt-Karte ",e.jsx("span",{className:"font-mono",children:o.id})," ist angelegt — die Box bereitet das Repo vor (Konzept übernimmt sie, sie denkt es nicht neu). Danach öffnest du es in der Agentic IDE."]}):e.jsxs(e.Fragment,{children:["Überarbeitung ",e.jsx("span",{className:"font-mono",children:o.id}),' läuft — die Box arbeitet deine Rückmeldung ein und schreibt die neue Fassung an dieselbe Stelle. Danach hier wieder „Konzept" öffnen.']})}):e.jsxs("div",{className:"mt-3 space-y-3 border-t border-violet-500/20 pt-2.5",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[e.jsx("b",{className:"text-sky-300/90",children:"Passt etwas nicht?"})," Schreib hin, was anders werden soll — die Box arbeitet es ein und lässt den Rest stehen. Beliebig oft wiederholbar."]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:y,onChange:c=>l(c.target.value),onKeyDown:c=>{c.key==="Enter"&&y.trim().length>=3&&!h&&N("/api/ideen/nachschaerfen",{id:r,hinweis:y},"runde")},placeholder:"z. B. „Punkt 3: kein WebSocket, das ist mir zu fragil — nimm Polling“",maxLength:2e3,className:"h-8 min-w-0 flex-1 rounded-lg border border-border/60 bg-background/60 px-2.5 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-sky-400/50 focus:outline-none"}),e.jsxs("button",{onClick:()=>N("/api/ideen/nachschaerfen",{id:r,hinweis:y},"runde"),disabled:h||y.trim().length<3,className:"flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-sky-500/40 bg-sky-500/10 px-3 text-[10px] font-bold uppercase tracking-wide text-sky-300 transition-all hover:bg-sky-500/20 cursor-pointer disabled:opacity-50",children:[h?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ge,{className:"h-3.5 w-3.5"}),"Nachschärfen"]})]})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[e.jsx("b",{className:"text-violet-300/90",children:"Passt es so?"})," Dann macht die Box daraus ein startklares Repo — Konzept wird übernommen (nicht neu gedacht), dazu Roadmap, AGENTS.md & Co. Gebaut wird danach von dir in der Agentic IDE."]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"Ziel"}),e.jsx("div",{className:"flex rounded-lg border border-border/40 p-0.5",children:["lxc","docker"].map(c=>e.jsx("button",{onClick:()=>n(c),title:c==="lxc"?"Dienst in einem eigenen Proxmox-LXC (systemd, kein Docker) — wird automatisch mitgesichert.":"Natives Docker: Dockerfile + compose, portabel und pipeline-tauglich.",className:S("rounded px-2 py-0.5 text-[10px] font-semibold transition-all cursor-pointer",k===c?"bg-foreground/10 text-foreground":"text-muted-foreground/50 hover:text-foreground/80"),children:c==="lxc"?"LXC":"Docker"},c))}),e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"Aufwand"}),e.jsx("div",{className:"flex rounded-lg border border-border/40 p-0.5",children:["simpel","gruendlich"].map(c=>e.jsx("button",{onClick:()=>p(c),title:c==="simpel"?"Konzept ist schon gehärtet — nur kurz auf die Bau-Sicht nachschärfen (empfohlen).":"Nochmal volle Kaskade über die Bau-Sicht: mehrere Rollen, Härtetests. Dauert entsprechend.",className:S("rounded px-2 py-0.5 text-[10px] font-semibold transition-all cursor-pointer",m===c?"bg-foreground/10 text-foreground":"text-muted-foreground/50 hover:text-foreground/80"),children:c==="simpel"?"schlank":"gründlich"},c))}),e.jsxs("button",{onClick:()=>N("/api/ideen/weiterfuehren",{id:r,ziel:k,tiefe:m},"projekt"),disabled:h,className:"ml-auto flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-violet-500/40 bg-violet-500/10 px-3 text-[10px] font-bold uppercase tracking-wide text-violet-300 transition-all hover:bg-violet-500/20 cursor-pointer disabled:opacity-50",children:[h?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ee,{className:"h-3.5 w-3.5"}),"Gefällt mir — Projekt daraus machen"]})]}),j&&e.jsx("p",{className:"text-[11px] text-red-400",children:j})]})}function Je({id:r,istIdee:d,onWeiter:k}){const[n,m]=u.useState(null),[p,h]=u.useState(!1),[g,o]=u.useState(0);return u.useEffect(()=>{let i=!1;return m(null),h(!1),z(`/api/ideen/${r}/konzept`).then(j=>{i||m(j)}).catch(()=>{i||h(!0)}),()=>{i=!0}},[r,g]),e.jsx("div",{className:"ml-2 -mt-1",children:e.jsxs("div",{className:"rounded-lg border border-violet-500/25 bg-violet-500/[0.04] p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wide text-violet-300",children:[e.jsx(fe,{className:"h-3 w-3"})," Konzept"]}),(n==null?void 0:n.repo)&&e.jsxs("a",{href:`https://git.tobisniceshomelab.ddnsfree.com/${n.repo}`,className:"flex items-center gap-1 text-[10px] text-violet-300/70 hover:text-violet-200",children:[e.jsx(Y,{className:"h-3 w-3"})," ",n.repo]}),!(n!=null&&n.repo)&&(n==null?void 0:n.quelle)==="datei"&&e.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/70",title:"Der Worker hat kein Repo angelegt — das Konzept liegt als Datei auf der Box.",children:n.pfad}),e.jsx("button",{onClick:()=>o(i=>i+1),title:"Neu laden",className:"ml-auto rounded p-0.5 text-muted-foreground/50 hover:text-foreground cursor-pointer",children:e.jsx(ge,{className:"h-3 w-3"})})]}),p?e.jsx("p",{className:"text-[11px] text-red-400",children:"Konzept nicht ladbar — später nochmal versuchen."}):n===null?e.jsx("p",{className:"text-[10px] text-muted-foreground animate-pulse",children:"Konzept wird geladen …"}):n.konzept?e.jsx("div",{className:"max-h-[28rem] overflow-y-auto pr-1",children:e.jsx(Ze,{text:n.konzept})}):e.jsx("p",{className:"text-[11px] text-muted-foreground italic",children:n.error||"Noch kein Konzept — das Projekt wird gerade vorbereitet."}),d&&(n==null?void 0:n.konzept)&&e.jsx(He,{id:r,onFertig:k})]})})}function Me({projekt:r,karten:d,zeile:k,onArchivAlle:n,raeumt:m}){const[p,h]=u.useState(!1),[g,o]=u.useState(!1),i=d.filter(l=>$[l.status]!==void 0).sort((l,N)=>$[l.status]-$[N.status]||(l.erstellt??0)-(N.erstellt??0)),j=d.filter(l=>l.status==="todo"||l.status==="scheduled").sort((l,N)=>{var c,L;return((c=l.wartet_auf)!=null&&c.length?1:0)-((L=N.wartet_auf)!=null&&L.length?1:0)||(l.erstellt??0)-(N.erstellt??0)}),w=d.filter(l=>l.status==="done").sort((l,N)=>(N.fertig??0)-(l.fertig??0)),y=r.gesamt>0?Math.round(r.fertig/r.gesamt*100):0;return e.jsxs("div",{className:"space-y-2 rounded-xl border border-border/50 bg-background/20 p-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Be,{className:"h-4 w-4 shrink-0 text-primary/70"}),e.jsx("p",{className:"min-w-0 flex-1 truncate text-xs font-semibold text-foreground",title:r.titel,children:r.titel}),e.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:[r.fertig," von ",r.gesamt," fertig"]})]}),e.jsx("div",{className:"h-1 overflow-hidden rounded-full bg-background/60",title:`${y}%`,children:e.jsx("div",{className:"h-1 rounded-full bg-primary/70 transition-all",style:{width:`${y}%`}})}),i.length>0&&e.jsx("ul",{className:"space-y-1.5",children:i.map(l=>k(l))}),j.length>0&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>h(l=>!l),className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[p?e.jsx(U,{className:"h-3.5 w-3.5"}):e.jsx(T,{className:"h-3.5 w-3.5"}),j.length," Karte",j.length===1?"":"n"," in der Kette — laufen automatisch der Reihe nach"]}),p&&e.jsx("ul",{className:"mt-1.5 space-y-1.5",children:j.map(l=>k(l))})]}),w.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>o(l=>!l),className:"flex items-center gap-1.5 text-[11px] font-semibold text-emerald-300/70 hover:text-emerald-300 transition-colors cursor-pointer",children:[g?e.jsx(U,{className:"h-3.5 w-3.5"}):e.jsx(T,{className:"h-3.5 w-3.5"}),w.length," fertig"]}),n&&e.jsxs("button",{disabled:m,onClick:()=>n(r.key,w.length,`„${r.titel}"`),title:"Räumt die fertigen Karten dieser Kette weg (Archiv, nichts wird gelöscht).",className:"flex items-center gap-1 text-[11px] text-muted-foreground/60 transition-colors hover:text-foreground disabled:opacity-50 cursor-pointer",children:[m?e.jsx(D,{className:"h-3 w-3 animate-spin"}):e.jsx(Q,{className:"h-3 w-3"}),"wegräumen"]})]}),g&&e.jsx("ul",{className:"mt-1.5 space-y-1.5",children:w.map(l=>k(l))})]})]})}function G({k:r,aktiv:d,onWahl:k}){return e.jsxs("button",{onClick:k,className:S("rounded-xl border p-3 text-left transition-all cursor-pointer",d?"border-primary/60 bg-primary/5":"border-border/50 hover:border-border"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(r.icon,{className:S("h-4 w-4 shrink-0",d?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-xs font-semibold text-foreground",children:r.titel})]}),e.jsx("p",{className:"mt-1 text-[11px] leading-relaxed text-muted-foreground",children:r.text})]})}function Qe(){var ie,le;const{data:r,isLoading:d}=Se(),k=De(),{showAlert:n,showConfirm:m,dialogElement:p}=Ce(),[h,g]=u.useState(""),[o,i]=u.useState("denken"),[j,w]=u.useState("schlank"),[y,l]=u.useState(!1),[N,c]=u.useState(!1),L=o!=="box",V=o==="repo",[C,je]=u.useState("lxc"),[Z,te]=u.useState(!1),[v,E]=u.useState({}),Ne=Ke(),B=ze({from:"/ideen"}).offen??null,we=t=>Ne({to:"/ideen",search:s=>({...s,offen:t??void 0}),replace:!0}),[H,ye]=u.useState(null),[J,re]=u.useState({}),P=(r==null?void 0:r.items)??[],W=()=>k.invalidateQueries({queryKey:$e.ideen});u.useEffect(()=>{const t=h.trim();if(t.length<12){c(!1);return}let s=!1;const x=setTimeout(async()=>{try{const f=await z("/api/ideen/einordnen",{method:"POST",body:JSON.stringify({text:t})});if(s||!(f!=null&&f.ok))return;i(f.nur_denken?"denken":f.wer==="ide"?"repo":"box"),f.tiefe&&w(f.tiefe),c(!0)}catch{}},700);return()=>{s=!0,clearTimeout(x)}},[h]);const se=B!==null&&(((ie=r==null?void 0:r.items.find(t=>t.id===B))==null?void 0:ie.status)==="triage"||((le=r==null?void 0:r.items.find(t=>t.id===B))==null?void 0:le.status)==="running"),I=Ee(B??"",se);async function ne(){const t=h.trim();if(!(t.length<3||Z)){te(!0);try{const s=t.length>160?t.slice(0,157)+"…":t;await z("/api/ideen",{method:"POST",body:JSON.stringify({titel:s,notiz:t.length>160?t:"",welt:L?"ide":"box",tiefe:V?j==="gruendlich"?"gruendlich":"simpel":"",ziel:V?C:"",art:o==="denken"?"idee":"projekt"})}),pe("gesendet"),g(""),c(!1),l(!1),W()}catch(s){n("Das hat nicht geklappt",String((s==null?void 0:s.message)||s))}finally{te(!1)}}}function ae(t,s,x){m(`${s} fertige Karte${s===1?"":"n"} wegräumen?`,`${x} verschwindet aus der Liste. Gelöscht wird nichts — die Karten wandern ins Archiv der Queue und bleiben dort lesbar. Laufende, hängende und wartende Karten bleiben unberührt.`,async()=>{var b;const f="arch:"+(t||"*");E(a=>({...a,[f]:!0}));try{const a=await z("/api/ideen/archivieren-alle",{method:"POST",body:JSON.stringify({projekt:t})});(b=a.fehlgeschlagen)!=null&&b.length&&n("Teilweise erledigt",`${a.archiviert} weggeräumt, ${a.fehlgeschlagen.length} nicht: `+a.fehlgeschlagen.map(A=>A.titel).join(", ")),W()}catch(a){n("Das hat nicht geklappt",String((a==null?void 0:a.message)||a))}finally{E(a=>({...a,[f]:!1}))}})}async function ve(t){E(s=>({...s,[t]:!0}));try{await z("/api/ideen/archivieren",{method:"POST",body:JSON.stringify({id:t})}),W()}catch(s){n("Das hat nicht geklappt",String((s==null?void 0:s.message)||s))}finally{E(s=>({...s,[t]:!1}))}}async function q(t,s,x,f){E(b=>({...b,[t+s]:!0}));try{await z(x,{method:"POST",body:JSON.stringify(f)}),W()}catch(b){n("Das hat nicht geklappt",String((b==null?void 0:b.message)||b))}finally{E(b=>({...b,[t+s]:!1}))}}async function oe(t){const s=(J[t]||"").trim();if(!(s.length<1||v["ans:"+t])){E(x=>({...x,["ans:"+t]:!0}));try{await z("/api/ideen/antwort",{method:"POST",body:JSON.stringify({id:t,antwort:s})}),re(x=>({...x,[t]:""})),W()}catch(x){n("Das hat nicht geklappt",String((x==null?void 0:x.message)||x))}finally{E(x=>({...x,["ans:"+t]:!1}))}}}const _=t=>{var ce,ue;const s=qe[t.status]??{label:t.status,cls:"text-muted-foreground border-border/60 bg-background/30"},x=B===t.id,f=t.status==="triage"||t.status==="running"||t.status==="done",b=t.status==="blocked",a=!!v["ans:"+t.id],A=t.status==="running"&&(t.puls_alter??0)>600,de=t.status==="todo"||t.status==="ready"||t.status==="scheduled";return e.jsxs("li",{className:S("flex flex-col gap-2 rounded-xl border bg-background/30 px-3 py-2",b?"border-red-500/30":A?"border-amber-500/40":"border-border/40"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:S("flex shrink-0 items-center gap-1.5 rounded-lg border px-2 py-0.5 text-[10px] font-bold",s.cls),children:[s.spin&&e.jsx(D,{className:"h-3 w-3 animate-spin"}),s.label]}),A&&e.jsxs("span",{className:"flex shrink-0 items-center gap-1 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[10px] font-bold text-amber-300",title:"Der Worker lebt, gibt aber kein Lebenszeichen mehr — vermutlich wartet er auf etwas, das nie kommt. „Neuer Versuch“ startet die Karte frisch.",children:[e.jsx(Le,{className:"h-3 w-3"})," ",Math.round((t.puls_alter??0)/60)," min ohne Regung"]}),(t.prio??0)!==0&&e.jsxs("span",{className:"shrink-0 rounded bg-background/50 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",title:"Priorität — höher kommt zuerst dran (bei gleicher Prio: Erstellzeit)",children:["P",t.prio]}),(()=>{const K=_e[t.art||(t.welt==="ide"?"projekt":"box")];if(!K)return null;const M=K.icon;return e.jsxs("span",{className:S("flex shrink-0 items-center gap-1 rounded-lg border px-2 py-0.5 text-[10px] font-bold",K.cls),title:K.title,children:[e.jsx(M,{className:"h-3 w-3"})," ",K.label]})})(),e.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-foreground",title:t.titel,children:t.titel}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] text-muted-foreground/70",children:[e.jsx(he,{className:"h-3 w-3"}),Pe(t.erstellt)]}),de&&e.jsxs("span",{className:"flex shrink-0 items-center",children:[e.jsx("button",{disabled:!!v["pr:"+t.id],onClick:()=>q("pr:",t.id,"/api/ideen/prio",{id:t.id,richtung:"hoch"}),title:"Vorziehen (Prio +1)",className:"rounded-md p-1 text-muted-foreground/60 transition-colors hover:text-foreground cursor-pointer disabled:opacity-50",children:e.jsx(Oe,{className:"h-3.5 w-3.5"})}),e.jsx("button",{disabled:!!v["pr:"+t.id],onClick:()=>q("pr:",t.id,"/api/ideen/prio",{id:t.id,richtung:"runter"}),title:"Zurückstellen (Prio 1)",className:"rounded-md p-1 text-muted-foreground/60 transition-colors hover:text-foreground cursor-pointer disabled:opacity-50",children:e.jsx(Ie,{className:"h-3.5 w-3.5"})})]}),(t.status==="running"||b)&&e.jsx("button",{disabled:!!v["rt:"+t.id],onClick:()=>m("Neuer Versuch?",t.status==="running"?`Der laufende Worker von '${t.titel.slice(0,60)}' wird beendet (samt gestarteter Test-Prozesse) und die Karte frisch gestartet. Bisheriger Zwischenstand im Workspace bleibt liegen.`:`Die Karte '${t.titel.slice(0,60)}' wird entsperrt und läuft weiter, sobald ein Platz frei ist.`,()=>q("rt:",t.id,"/api/ideen/retry",{id:t.id})),title:"Neuer Versuch — Karte frisch starten",className:S("shrink-0 rounded-md p-1 transition-colors cursor-pointer disabled:opacity-50",A?"text-amber-300 hover:text-amber-200":"text-muted-foreground/60 hover:text-foreground"),children:v["rt:"+t.id]?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(We,{className:"h-3.5 w-3.5"})}),(t.status==="running"||de||t.status==="triage")&&e.jsx("button",{disabled:!!v["st:"+t.id],onClick:()=>m("Karte stoppen?",`'${t.titel.slice(0,60)}' wird angehalten${t.status==="running"?" und der laufende Worker beendet":""}. Sie bleibt als gestoppt im Board und kann jederzeit per „Neuer Versuch“ weiterlaufen.`,()=>q("st:",t.id,"/api/ideen/stopp",{id:t.id})),title:"Stoppen — Karte anhalten",className:"shrink-0 rounded-md p-1 text-muted-foreground/60 transition-colors hover:text-red-300 cursor-pointer disabled:opacity-50",children:v["st:"+t.id]?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Ve,{className:"h-3.5 w-3.5"})}),(t.status==="done"||b)&&e.jsx("button",{disabled:!!v[t.id],onClick:()=>ve(t.id),title:b?"Aufgeben und aus der Liste räumen (wandert ins Kanban-Archiv)":"Aus der Liste räumen (wandert ins Kanban-Archiv)",className:"shrink-0 rounded-md p-1 text-muted-foreground/60 transition-colors hover:text-foreground cursor-pointer disabled:opacity-50",children:v[t.id]?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Q,{className:"h-3.5 w-3.5"})}),t.welt==="ide"&&(t.status==="running"||t.status==="done")&&e.jsxs("button",{onClick:()=>ye(H===t.id?null:t.id),title:"Konzept ansehen (das ausgearbeitete KONZEPT.md)",className:S("flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 text-[10px] font-bold transition-colors cursor-pointer",H===t.id?"text-violet-300":"text-violet-300/70 hover:text-violet-200"),children:[e.jsx(fe,{className:"h-3.5 w-3.5"})," Konzept"]}),f&&e.jsx("button",{onClick:()=>we(x?null:t.id),title:t.status==="done"?"Ergebnis anzeigen":"Worker-Log anzeigen",className:"shrink-0 rounded-md p-1 text-muted-foreground/60 transition-colors hover:text-foreground cursor-pointer",children:x?e.jsx(U,{className:"h-3.5 w-3.5"}):e.jsx(T,{className:"h-3.5 w-3.5"})})]}),H===t.id&&e.jsx(Je,{id:t.id,istIdee:t.art==="idee"&&t.status==="done",onWeiter:W}),t.status==="running"&&t.notiz&&e.jsxs("p",{className:"-mt-1 ml-1 text-[11px] italic leading-relaxed text-sky-200/80",title:"Jüngste Zwischenmeldung des Workers (Heartbeat)",children:["„",t.notiz,"“"]}),(t.status==="todo"||t.status==="scheduled"||t.status==="ready")&&(((ce=t.wartet_auf)==null?void 0:ce.length)??0)>0&&e.jsxs("p",{className:"-mt-1 ml-1 text-[10px] text-muted-foreground/70",children:["→ wartet auf: ",t.wartet_auf.join(" · ")]}),b&&e.jsxs("div",{className:"space-y-2 border-t border-red-500/20 pt-2",children:[e.jsxs("p",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed text-red-200/90",children:[e.jsx(xe,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-red-300"}),e.jsxs("span",{children:[e.jsx("b",{children:Fe[t.frage_kind||""]??"Die Aufgabe hängt und wartet auf dich:"})," ",t.frage?e.jsx("span",{className:"text-foreground/90",children:t.frage}):e.jsx("span",{className:"text-muted-foreground italic",children:"kein genauer Grund hinterlegt — antworte einfach mit einer Entscheidung, dann läuft sie weiter."})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:J[t.id]||"",onChange:K=>re(M=>({...M,[t.id]:K.target.value})),onKeyDown:K=>{K.key==="Enter"&&oe(t.id)},placeholder:"Deine Antwort — die Box macht damit weiter",maxLength:2e3,className:"h-8 min-w-0 flex-1 rounded-lg border border-border/60 bg-background/60 px-2.5 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-red-400/50 focus:outline-none"}),e.jsxs("button",{onClick:()=>oe(t.id),disabled:a||(J[t.id]||"").trim().length<1,className:"flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-3 text-[10px] font-bold uppercase tracking-wide text-emerald-300 transition-all hover:bg-emerald-500/20 cursor-pointer disabled:opacity-50",children:[a?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(me,{className:"h-3.5 w-3.5"})," Antworten & weiter"]})]})]}),x&&f&&t.status!=="done"&&e.jsx("div",{className:"ml-2 -mt-1",children:e.jsx("div",{className:"rounded-lg border border-border/50 bg-background/50 p-2",children:se&&I.isLoading?e.jsx("p",{className:"text-[10px] text-muted-foreground animate-pulse",children:"Log wird geladen …"}):I.error?e.jsx("p",{className:"text-[10px] text-red-400",children:"Log nicht ladbar"}):(ue=I.data)!=null&&ue.available&&I.data.lines.length>0?e.jsx("pre",{className:"max-h-64 overflow-auto font-mono text-[10px] leading-relaxed text-foreground/80 whitespace-pre-wrap",children:I.data.lines.join(`
`)}):e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Kein Log verfügbar"})})}),x&&t.status==="done"&&e.jsx(Ge,{id:t.id})]},t.id)};return r&&!r.available?null:e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(Re,{icon:O,children:(()=>{if(!r)return"Ideen-Queue";const t=x=>P.filter(f=>x.includes(f.status)).length,s=[t(["blocked"])>0?`${t(["blocked"])} braucht dich`:"",t(["running","triage","review"])>0?`${t(["running","triage","review"])} in Arbeit`:"",t(["todo","scheduled","ready"])>0?`${t(["todo","scheduled","ready"])} wartet`:"",t(["done"])>0?`${t(["done"])} fertig`:""].filter(Boolean);return s.length?s.join(" · "):"noch nichts in der Queue"})()}),(()=>{const t=P.filter(s=>s.status==="done").length;return t===0?null:e.jsxs("button",{disabled:!!v["arch:*"],onClick:()=>ae("",t,`Alle ${t} fertigen Karten`),title:"Räumt ALLE fertigen Karten weg — auch die in abgeschlossenen Projekt-Ketten. Laufende, hängende und wartende bleiben unberührt.",className:"flex shrink-0 items-center gap-1.5 rounded-lg border border-border/60 px-2.5 py-1 text-[11px] font-semibold text-muted-foreground transition-all hover:border-primary/40 hover:text-foreground disabled:opacity-50 cursor-pointer",children:[v["arch:*"]?e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Q,{className:"h-3.5 w-3.5"}),t," fertige wegräumen"]})})()]}),e.jsxs("div",{className:"mc-card p-4 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:h,onChange:t=>{g(t.target.value),c(!1)},onKeyDown:t=>{t.key==="Enter"&&ne()},placeholder:"Was soll entstehen?",className:"h-10 min-w-0 flex-1 rounded-lg border border-border/60 bg-background/50 px-3 text-sm text-foreground placeholder:text-muted-foreground/50 focus:border-primary/50 focus:outline-none"}),e.jsxs("button",{onClick:ne,disabled:Z||h.trim().length<3,className:"flex h-10 shrink-0 items-center gap-1.5 rounded-lg border border-primary/40 bg-primary/10 px-4 text-xs font-semibold text-primary transition-all hover:bg-primary/20 disabled:opacity-40 cursor-pointer",children:[Z?e.jsx(D,{className:"h-4 w-4 animate-spin"}):e.jsx(me,{className:"h-4 w-4"}),"Los"]})]}),y?e.jsxs("div",{className:"space-y-3 rounded-xl border border-border/40 bg-background/20 p-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-[11px] text-muted-foreground/70",children:"Wer baut das?"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsx(G,{aktiv:o!=="box",onWahl:()=>i(o==="box"?"denken":o),k:{id:"ide",icon:ee,titel:"Ich, in der Agentic IDE",text:"Du bekommst Konzept und Repo — den Code schreibst du selbst."}}),e.jsx(G,{aktiv:o==="box",onWahl:()=>i("box"),k:{id:"box",icon:X,titel:"Die Box, allein",text:"Für dein Heimlabor. Das Ergebnis kommt als Patch-Vorschlag ins Auftragsbuch."}})]})]}),o!=="box"&&e.jsxs("div",{className:"border-l-2 border-primary/40 pl-3",children:[e.jsx("p",{className:"mb-1.5 text-[11px] text-muted-foreground/70",children:"Und wie startest du?"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsx(G,{aktiv:o==="denken",onWahl:()=>i("denken"),k:{id:"denken",icon:O,titel:"Erst durchdenken",text:"Konzept zuerst — auf dein Ja wird ein Repo daraus."}}),e.jsx(G,{aktiv:o==="repo",onWahl:()=>i("repo"),k:{id:"repo",icon:Y,titel:"Direkt ein Repo",text:"Konzept und Gitea-Repo in einem Zug."}})]}),o==="repo"?e.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-x-3 gap-y-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"Wie gründlich?"}),e.jsx("div",{className:"flex rounded-lg border border-border/60 p-0.5",children:[["schlank","schlank"],["gruendlich","gründlich"]].map(([t,s])=>e.jsx("button",{onClick:()=>w(t),className:S("rounded px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer",j===t?"bg-primary/15 text-primary":"text-muted-foreground/60 hover:text-foreground"),children:s},t))}),e.jsxs("span",{className:"ml-auto flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"Läuft als"}),e.jsx("div",{className:"flex rounded-lg border border-border/40 p-0.5",children:[["lxc","LXC"],["docker","Docker"]].map(([t,s])=>e.jsx("button",{onClick:()=>je(t),title:t==="lxc"?"Dienst in einem eigenen Proxmox-LXC (systemd, kein Docker). Wird vom Backup-Server mitgesichert.":"Natives Docker: Dockerfile + compose, portabel und pipeline-tauglich.",className:S("rounded px-2 py-0.5 text-[10px] font-semibold transition-all cursor-pointer",C===t?"bg-foreground/10 text-foreground":"text-muted-foreground/50 hover:text-foreground/80"),children:s},t))})]})]}):e.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[10px] leading-relaxed text-muted-foreground/60",children:[e.jsx(xe,{className:"mt-px h-3 w-3 shrink-0"}),'Wie gründlich und wo es läuft, fragt die Box erst beim „gefällt mir" — dann weißt du mehr.']})]}),(()=>{const t=ke();return t.gesendet<3?null:e.jsxs("p",{className:"border-t border-border/30 pt-2 text-[10px] text-muted-foreground/50",children:["Du hast ",t.geaendert," von ",t.gesendet," Vorschlägen geändert. Wird das die Regel, bauen wir hier einen richtigen Schritt-für-Schritt-Assistenten."]})})()]}):e.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border border-border/40 bg-background/20 px-3 py-2.5 text-xs",children:[o==="box"?e.jsx(X,{className:"h-4 w-4 shrink-0 text-primary"}):o==="repo"?e.jsx(Y,{className:"h-4 w-4 shrink-0 text-primary"}):e.jsx(O,{className:"h-4 w-4 shrink-0 text-primary"}),!N&&e.jsx("span",{className:"shrink-0 text-[10px] uppercase tracking-wider text-muted-foreground/50",children:"Voreingestellt"}),e.jsx("span",{className:"text-muted-foreground",children:o==="box"?"Ich baue das selbst und lege dir das Ergebnis als Vorschlag hin.":o==="repo"?"Du baust selbst — ich lege dir Konzept und Repo an.":"Du baust selbst — ich arbeite erst ein Konzept aus."}),N&&e.jsx("span",{className:"shrink-0 rounded border border-primary/40 bg-primary/10 px-1.5 py-0.5 text-[10px] font-bold text-primary",children:"gelesen"}),e.jsx("button",{onClick:()=>{l(!0),pe("geaendert")},className:"ml-auto shrink-0 text-[11px] text-muted-foreground/60 underline underline-offset-2 transition-colors hover:text-foreground cursor-pointer",children:"anders"})]}),d&&e.jsxs("p",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"})," Queue wird geladen …"]}),(r==null?void 0:r.fehler)&&e.jsx("p",{className:"text-xs text-amber-300",children:"Queue gerade nicht lesbar — neuer Versuch läuft."}),P.length>0&&e.jsxs("div",{className:"space-y-3",children:[((r==null?void 0:r.projekte)??[]).map(t=>e.jsx(Me,{projekt:t,karten:P.filter(s=>s.projekt===t.key),zeile:_,onArchivAlle:ae,raeumt:!!v["arch:"+t.key]},t.key)),(()=>{const t=new Set(((r==null?void 0:r.projekte)??[]).map(a=>a.key)),s=P.filter(a=>!a.projekt||!t.has(a.projekt));if(s.length===0)return null;const x=s.filter(a=>$[a.status]!==void 0).sort((a,A)=>$[a.status]-$[A.status]||(a.erstellt??0)-(A.erstellt??0)),f=s.filter(a=>["todo","scheduled"].includes(a.status)),b=s.filter(a=>a.status==="done");return e.jsxs("div",{className:"space-y-2",children:[x.length>0&&e.jsx("ul",{className:"space-y-1.5",children:x.map(a=>_(a))}),f.length>0&&e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 py-1 text-[11px] text-muted-foreground/70 hover:text-foreground",children:[e.jsx(T,{className:"h-3 w-3 transition-transform group-open:rotate-90"}),e.jsx(he,{className:"h-3 w-3"})," Wartet (",f.length,")"]}),e.jsx("ul",{className:"mt-1.5 space-y-1.5",children:f.map(a=>_(a))})]}),b.length>0&&e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 py-1 text-[11px] text-muted-foreground/70 hover:text-foreground",children:[e.jsx(T,{className:"h-3 w-3 transition-transform group-open:rotate-90"}),e.jsx(Ae,{className:"h-3 w-3 text-emerald-400/70"})," Fertig (",b.length,")"]}),e.jsx("ul",{className:"mt-1.5 space-y-1.5",children:b.map(a=>_(a))})]})]})})()]}),(r==null?void 0:r.available)&&!d&&P.length===0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] text-muted-foreground/70",children:"Noch nichts hier. Zum Beispiel:"}),["Ein kleines Werkzeug, das meine Fotos nach Aufnahmedatum in Ordner sortiert","Rippy soll die Untertitel-Spur automatisch auswählen statt zu fragen","Lohnt sich ein Dashboard für die Stromzähler, oder reicht Home Assistant?"].map(t=>e.jsxs("button",{onClick:()=>g(t),className:"flex w-full items-center gap-2 rounded-lg border border-border/40 bg-background/20 px-3 py-2 text-left text-xs text-muted-foreground transition-all hover:border-primary/40 hover:text-foreground cursor-pointer",children:[e.jsx(O,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/50"}),t]},t))]})]}),p]})}function it(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Ideen"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Schreib hin, was entstehen soll. Die Box liest mit und schlägt vor, wie es weitergeht — ändern kannst du das immer."})]}),e.jsx(Qe,{})]})}export{it as IdeenView};