openwolf-enhanced 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/dashboard/assets/{AISuggestions-1R0pnlm9.js → AISuggestions-BfgCmCvU.js} +1 -1
- package/dist/dashboard/assets/{ActivityLog-Cet80S6D.js → ActivityLog-DXNaS0hX.js} +1 -1
- package/dist/dashboard/assets/{ActivityTimeline-CoCPhZRg.js → ActivityTimeline-CbCEyVtf.js} +1 -1
- package/dist/dashboard/assets/{AnatomyBrowser-BK7WiuNN.js → AnatomyBrowser-Cgoo81Nn.js} +1 -1
- package/dist/dashboard/assets/{BugLog-DlOfPz4q.js → BugLog-4jV0KE_C.js} +1 -1
- package/dist/dashboard/assets/{CerebrumViewer-C0gSBIxg.js → CerebrumViewer-DTeD__lQ.js} +1 -1
- package/dist/dashboard/assets/{CronStatus-DMGKkek9.js → CronStatus-fXVkPzMI.js} +1 -1
- package/dist/dashboard/assets/{DesignQC-BUjKJ4wE.js → DesignQC-CxorYE4I.js} +1 -1
- package/dist/dashboard/assets/{MemoryViewer-CbFNeqWm.js → MemoryViewer-BbBPGn8t.js} +1 -1
- package/dist/dashboard/assets/{NativeMemory-DEAyhwK9.js → NativeMemory-CBf2B9WK.js} +1 -1
- package/dist/dashboard/assets/{ProjectOverview-CnxeetBi.js → ProjectOverview-CeaY2OtB.js} +1 -1
- package/dist/dashboard/assets/{ProjectsAggregate-DG5Vxc2k.js → ProjectsAggregate-BsBMRflP.js} +1 -1
- package/dist/dashboard/assets/{StatusBadge-DelYV9XQ.js → StatusBadge-CZX-0CQE.js} +1 -1
- package/dist/dashboard/assets/{TokenUsage-Bvk7bQ1V.js → TokenUsage-C9yjDd1O.js} +1 -1
- package/dist/dashboard/assets/{index-QzB3QJTS.js → index-D2sNMefT.js} +3 -3
- package/dist/dashboard/index.html +1 -1
- package/dist/hooks/pre-read.js +10 -0
- package/dist/hooks/precompact.js +30 -0
- package/dist/hooks/session-start.js +51 -24
- package/dist/hooks/shared.js +47 -0
- package/dist/hooks/stop.js +22 -1
- package/dist/src/cli/index.js +8 -0
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/report-cmd.js +47 -0
- package/dist/src/cli/report-cmd.js.map +1 -0
- package/dist/src/hooks/pre-read.js +10 -0
- package/dist/src/hooks/pre-read.js.map +1 -1
- package/dist/src/hooks/precompact.js +31 -0
- package/dist/src/hooks/precompact.js.map +1 -0
- package/dist/src/hooks/session-start.js +51 -24
- package/dist/src/hooks/session-start.js.map +1 -1
- package/dist/src/hooks/shared.js +47 -0
- package/dist/src/hooks/shared.js.map +1 -1
- package/dist/src/hooks/stop.js +22 -1
- package/dist/src/hooks/stop.js.map +1 -1
- package/dist/src/scanner/anatomy-scanner.js +19 -5
- package/dist/src/scanner/anatomy-scanner.js.map +1 -1
- package/dist/src/scanner/symbol-extractor.js +82 -0
- package/dist/src/scanner/symbol-extractor.js.map +1 -0
- package/dist/src/utils/agent-hooks.js +2 -1
- package/dist/src/utils/agent-hooks.js.map +1 -1
- package/dist/src/utils/hooks-deploy.js +1 -0
- package/dist/src/utils/hooks-deploy.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,33 @@ This is a fork of [OpenWolf](https://github.com/cytostack/openwolf) by Cytostack
|
|
|
6
6
|
Pvt Ltd. Versions ≤ 1.0.4 refer to the upstream project; `1.1.0` is the first
|
|
7
7
|
release of this fork.
|
|
8
8
|
|
|
9
|
+
## [1.18.0] — 2026-07-16
|
|
10
|
+
|
|
11
|
+
> Upgrades ported from upstream `cytostack/openwolf` 2.0 (AGPL-3.0), adapted to this fork.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Compaction survival (PreCompact hook).** When Claude Code / Codex compacts the context window,
|
|
16
|
+
the live session state on disk survives but nothing in the compacted context tells the model what
|
|
17
|
+
already happened. A new `precompact.js` hook snapshots `_session.json`, and SessionStart — which
|
|
18
|
+
fires with `source: "compact"` afterwards — now re-injects a digest that lists the files already
|
|
19
|
+
modified this session, so the model doesn't re-read them from scratch. SessionStart also no longer
|
|
20
|
+
resets the session on `compact`/`resume` (it only resets for a genuinely new session), which used to
|
|
21
|
+
wipe read/write tracking and append a spurious memory.md header on every compaction.
|
|
22
|
+
- **Measured token usage (`openwolf report`).** The ledger was estimate-only (a char/token ratio). The
|
|
23
|
+
Stop hook now reads the harness transcript (`transcript_path` in its payload) and sums the real
|
|
24
|
+
`message.usage` — input, output, cache-read, cache-creation tokens, and API calls — deduped per
|
|
25
|
+
message id. Numbers land per-session (`real_usage`) and in `lifetime.real_*`, tagged with the driving
|
|
26
|
+
agent (`detectAgent`). `openwolf report` shows the estimate and the measured ground truth side by
|
|
27
|
+
side. Sessions without a transcript (older harness, other agents) simply record no measured usage.
|
|
28
|
+
- **Symbol-level anatomy hints.** `openwolf scan` now extracts top-level symbols (functions, classes,
|
|
29
|
+
interfaces) with 1-based line ranges for big files (≥500 est. tokens, TS/JS/PY/GO/RS) into a
|
|
30
|
+
`anatomy-symbols.json` sidecar. When the agent is about to read such a file, the pre-read hook lists
|
|
31
|
+
the symbols and their ranges — `parse (23-45), Engine (69-91)` — so it can read one function with
|
|
32
|
+
`offset`/`limit` instead of the whole file. Heuristic (line-anchored regexes, symbol end = line
|
|
33
|
+
before the next), which is enough for slice reads. This is the lightweight take on upstream's
|
|
34
|
+
durable anatomy index: a sidecar, so our markdown `anatomy.md` pipeline is untouched.
|
|
35
|
+
|
|
9
36
|
## [1.17.0] — 2026-07-16
|
|
10
37
|
|
|
11
38
|
### Added
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";import{i as r}from"./utils-BqE_aDxV.js";var i=t(e(),1),a=n(),o=new Set(`ts.tsx.js.jsx.mjs.cjs.py.rs.go.java.rb.php.cs.cpp.cc.c.h.hpp.swift.kt.vue.svelte.json.md.mdx.yml.yaml.toml.css.scss.html.sh.sql.prisma.graphql`.split(`.`)),s=/([A-Za-z0-9_.\-/]+\.[A-Za-z][A-Za-z0-9]{0,7})/g;function c(e,t){if(!t)return e;let n=[],r=0,i;for(s.lastIndex=0;(i=s.exec(e))!==null;){let s=i[1],c=s.slice(s.lastIndexOf(`.`)+1).toLowerCase();(s.includes(`/`)||o.has(c))&&(i.index>r&&n.push(e.slice(r,i.index)),n.push((0,a.jsx)(`button`,{onClick:()=>t(s),className:`font-mono underline decoration-dotted underline-offset-2`,style:{color:`var(--accent)`},title:`Jump to ${s} in Anatomy`,children:s},`${i.index}-${s}`)),r=i.index+s.length)}return r<e.length&&n.push(e.slice(r)),n.length?n:e}var l=[{key:`achievements`,title:`Achievements`,icon:`🏆`,color:`#059669`},{key:`improvements`,title:`Improvements`,icon:`✨`,color:`#3b82f6`},{key:`next_tasks`,title:`Next Tasks`,icon:`📋`,color:`#d97706`},{key:`risks`,title:`Risks & Tech Debt`,icon:`🛡`,color:`#dc2626`}],u=`Analyze this project and write a JSON file to .wolf/suggestions.json with this exact structure:
|
|
2
2
|
{
|
|
3
3
|
"generated_at": "<ISO timestamp>",
|
|
4
4
|
"achievements": ["..."],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";var r=t(e(),1),i=n();function a(e){return e.split(`
|
|
2
2
|
`).filter(e=>e.trim().length>0).map(e=>{let t=/ → error$/.test(e),n=e.replace(/ → error$/,``),r=n.match(/^(\d{1,2}:\d{2})\s+(.*)$/);return r?{time:r[1],cmd:r[2],failed:t}:{time:``,cmd:n,failed:t}}).reverse()}function o({label:e,value:t,accent:n}){return(0,i.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:e}),(0,i.jsx)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:n?`var(--danger)`:`var(--text-primary)`},children:t})]})}function s({data:e}){let[t,n]=(0,r.useState)(``),[s,c]=(0,r.useState)(!1),l=(0,r.useMemo)(()=>a(e.activityLog||``),[e.activityLog]),u=l.filter(e=>e.failed).length,d=l.filter(e=>(!s||e.failed)&&(!t||e.cmd.toLowerCase().includes(t.toLowerCase())));if(l.length===0)return(0,i.jsxs)(`div`,{className:`rounded-xl p-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsx)(`h3`,{className:`font-medium mb-2`,style:{color:`var(--text-secondary)`},children:`No shell activity captured`}),(0,i.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:[`Passive Bash capture is `,(0,i.jsx)(`strong`,{children:`opt-in`}),`. Enable it in `,(0,i.jsx)(`code`,{className:`px-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:`.wolf/config.json`}),` — set `,(0,i.jsx)(`code`,{className:`px-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:`openwolf.capture.enabled = true`}),` — and notable commands (commits, installs, tests, builds) plus any failures land in `,(0,i.jsx)(`code`,{children:`.wolf/activity.log`}),`, redacted, and feed the next session's resume digest.`]})]});let f={color:`var(--text-secondary)`,padding:`0.5rem 0.75rem`,borderTop:`1px solid var(--border)`},p={color:`var(--text-muted)`,fontWeight:500,textAlign:`left`,padding:`0.5rem 0.75rem`};return(0,i.jsxs)(`div`,{children:[(0,i.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 gap-4 mb-4`,children:[(0,i.jsx)(o,{label:`Captured commands`,value:String(l.length)}),(0,i.jsx)(o,{label:`Failures`,value:String(u),accent:u>0}),(0,i.jsx)(o,{label:`Showing`,value:String(d.length)})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 mb-3`,children:[(0,i.jsx)(`input`,{type:`text`,placeholder:`Filter commands…`,value:t,onChange:e=>n(e.target.value),className:`rounded-lg px-3 py-2 text-sm flex-1 min-w-[200px] focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,i.jsx)(`button`,{onClick:()=>c(e=>!e),className:`px-3 py-2 text-xs rounded-lg transition-colors`,style:{background:s?`var(--danger-subtle)`:`var(--bg-surface)`,border:`1px solid var(--border)`,color:s?`var(--danger)`:`var(--text-muted)`},children:s?`Showing failures only`:`Failures only`})]}),(0,i.jsx)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,i.jsx)(`div`,{className:`overflow-x-auto`,style:{maxHeight:520},children:(0,i.jsxs)(`table`,{className:`w-full text-sm`,style:{borderCollapse:`collapse`},children:[(0,i.jsx)(`thead`,{children:(0,i.jsxs)(`tr`,{children:[(0,i.jsx)(`th`,{style:{...p,width:64},children:`Time`}),(0,i.jsxs)(`th`,{style:p,children:[`Command (`,d.length,`)`]})]})}),(0,i.jsx)(`tbody`,{children:d.map((e,t)=>(0,i.jsxs)(`tr`,{style:{background:e.failed?`var(--danger-subtle)`:`transparent`},children:[(0,i.jsx)(`td`,{style:{...f,color:`var(--text-faint)`,whiteSpace:`nowrap`},children:e.time||`—`}),(0,i.jsxs)(`td`,{style:{...f,color:e.failed?`var(--danger)`:`var(--text-primary)`},className:`font-mono`,children:[e.cmd,e.failed&&(0,i.jsx)(`span`,{className:`text-xs ml-2`,style:{color:`var(--danger)`},children:`error`})]})]},t))})]})})}),(0,i.jsxs)(`p`,{className:`text-xs mt-3`,style:{color:`var(--text-faint)`},children:[`Secrets are redacted before capture; the newest commands feed the resume digest. Read-only view of `,(0,i.jsx)(`code`,{children:`.wolf/activity.log`}),`.`]})]})}export{s as ActivityLog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";var r=t(e(),1),i=n();function a({data:e}){let{memory:t}=e,[n,a]=(0,r.useState)(`all`),[o,s]=(0,r.useState)(``),[c,l]=(0,r.useState)(!0),u=(0,r.useMemo)(()=>{let e=t;if(n===`today`){let t=new Date().toISOString().slice(0,10);e=e.filter(e=>e.date===t)}else if(n===`week`){let t=new Date(Date.now()-7*864e5).toISOString().slice(0,10);e=e.filter(e=>e.date>=t)}if(o){let t=o.toLowerCase();e=e.map(e=>({...e,entries:e.entries.filter(e=>e.action.toLowerCase().includes(t)||e.files.toLowerCase().includes(t))})).filter(e=>e.entries.length>0)}return e},[t,n,o]);return(0,i.jsxs)(`div`,{children:[(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 mb-4`,children:[(0,i.jsx)(`div`,{className:`flex gap-1 rounded-lg p-1`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[`all`,`today`,`week`].map(e=>(0,i.jsx)(`button`,{onClick:()=>a(e),className:`px-3 py-1 text-xs rounded-md transition-colors`,style:{background:n===e?`var(--bg-surface-hover)`:`transparent`,color:n===e?`var(--text-primary)`:`var(--text-muted)`},children:e===`all`?`All`:e===`today`?`Today`:`This Week`},e))}),(0,i.jsx)(`input`,{type:`text`,placeholder:`Search actions...`,value:o,onChange:e=>s(e.target.value),className:`rounded-lg px-3 py-1.5 text-sm flex-1 min-w-[200px] focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,i.jsx)(`button`,{onClick:()=>l(!c),className:`px-3 py-1.5 text-xs rounded-lg`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-muted)`},children:c?`Flat view`:`Group by session`})]}),u.length===0?(0,i.jsx)(`div`,{className:`text-center py-12`,style:{color:`var(--text-muted)`},children:`No activity found.`}):c?u.map((e,t)=>(0,i.jsxs)(`div`,{className:`mb-4`,children:[(0,i.jsxs)(`div`,{className:`text-sm font-medium mb-2`,style:{color:`var(--text-muted)`},children:[e.date,` `,e.time,` — `,e.entries.length,` actions`]}),(0,i.jsx)(`div`,{className:`rounded-xl`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:e.entries.map((t,n)=>(0,i.jsxs)(`div`,{className:`flex items-center gap-4 px-4 py-3`,style:{borderBottom:n<e.entries.length-1?`1px solid var(--border)`:`none`},children:[(0,i.jsx)(`span`,{className:`text-xs font-mono w-12 shrink-0`,style:{color:`var(--text-faint)`},children:t.time}),(0,i.jsx)(`span`,{className:`w-2 h-2 rounded-full shrink-0 ${t.action.includes(`Created`)?`bg-emerald-500`:t.action.includes(`Edited`)?`bg-blue-500`:``}`,style:{background:!t.action.includes(`Created`)&&!t.action.includes(`Edited`)?`var(--text-faint)`:void 0}}),(0,i.jsx)(`span`,{className:`text-sm flex-1`,style:{color:`var(--text-secondary)`},children:t.action}),(0,i.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`var(--text-faint)`},children:t.tokens})]},n))})]},t)):(0,i.jsx)(`div`,{className:`rounded-xl`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:u.flatMap(e=>e.entries.map((t,n)=>(0,i.jsxs)(`div`,{className:`flex items-center gap-4 px-4 py-3`,style:{borderBottom:`1px solid var(--border)`},children:[(0,i.jsx)(`span`,{className:`text-xs font-mono w-20 shrink-0`,style:{color:`var(--text-faint)`},children:e.date}),(0,i.jsx)(`span`,{className:`text-xs font-mono w-12 shrink-0`,style:{color:`var(--text-faint)`},children:t.time}),(0,i.jsx)(`span`,{className:`text-sm flex-1`,style:{color:`var(--text-secondary)`},children:t.action}),(0,i.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`var(--text-faint)`},children:t.tokens})]},`${e.date}-${n}`)))})]})}export{a as ActivityTimeline};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";import{r,t as i}from"./utils-BqE_aDxV.js";var a=t(e(),1),o=n();function s({tokens:e,className:t}){return(0,o.jsxs)(`span`,{className:i(`font-mono text-xs`,e<200?`text-emerald-400`:e<1e3?`text-amber-400`:`text-red-400`,t),children:[`~`,r(e),` tok`]})}function c(e){let t={name:`.`,path:`.`,children:[],files:[]},n=new Map;n.set(`./`,t);for(let r of e){let e=r.section;if(!n.has(e)){let r=e.replace(/\/$/,``).split(`/`),i=t,a=``;for(let e of r){a=a?`${a}/${e}`:e;let t=`${a}/`;if(!n.has(t)){let r={name:e,path:t,children:[],files:[]};i.children.push(r),n.set(t,r)}i=n.get(t)}}n.get(e).files.push({file:r.file,description:r.description,tokens:r.tokens})}return t}function l({node:e,search:t,depth:n=0}){let[r,i]=(0,a.useState)(n<2),c=t.toLowerCase(),f=e.files.filter(e=>!t||e.file.toLowerCase().includes(c)||e.description.toLowerCase().includes(c)),p=e.children.some(e=>d(e,c));return t&&f.length===0&&!p?null:(0,o.jsxs)(`div`,{className:`ml-3`,children:[e.name!==`.`&&(0,o.jsxs)(`button`,{onClick:()=>i(!r),className:`flex items-center gap-1.5 py-1 text-sm transition-colors`,style:{color:`var(--text-secondary)`},children:[(0,o.jsx)(`span`,{className:`w-4 text-center`,style:{color:`var(--text-faint)`},children:r?`▼`:`▶`}),(0,o.jsx)(`span`,{className:`text-amber-400`,children:`📁`}),(0,o.jsxs)(`span`,{children:[e.name,`/`]}),(0,o.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:[u(e),` files`]})]}),(r||e.name===`.`)&&(0,o.jsxs)(`div`,{className:e.name===`.`?``:`ml-4`,children:[f.sort((e,t)=>e.file.localeCompare(t.file)).map(e=>(0,o.jsxs)(`div`,{className:`flex items-center gap-2 py-1 pl-5`,children:[(0,o.jsx)(`span`,{style:{color:`var(--text-faint)`},children:`📄`}),(0,o.jsx)(`span`,{className:`text-sm font-mono`,style:{color:`var(--text-primary)`},children:e.file}),e.description&&(0,o.jsxs)(`span`,{className:`text-xs truncate max-w-xs`,style:{color:`var(--text-faint)`},children:[`— `,e.description]}),(0,o.jsx)(s,{tokens:e.tokens,className:`ml-auto shrink-0`})]},e.file)),e.children.sort((e,t)=>e.name.localeCompare(t.name)).map(e=>(0,o.jsx)(l,{node:e,search:t,depth:n+1},e.path))]})]})}function u(e){return e.files.length+e.children.reduce((e,t)=>e+u(t),0)}function d(e,t){return e.files.some(e=>e.file.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))?!0:e.children.some(e=>d(e,t))}function f({data:e,initialFile:t}){let{anatomy:n}=e,[r,i]=(0,a.useState)(t??``),[s,u]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&i(t)},[t]);let d=(0,a.useMemo)(()=>c(n.entries),[n.entries]),f=(0,a.useMemo)(()=>{let e=n.entries.map(e=>e.tokens);return{total:n.entries.length,avg:e.length>0?Math.round(e.reduce((e,t)=>e+t,0)/e.length):0,largest:e.length>0?Math.max(...e):0}},[n.entries]);return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 mb-4`,children:[(0,o.jsx)(`input`,{type:`text`,placeholder:`Search files...`,value:r,onChange:e=>i(e.target.value),className:`flex-1 min-w-[200px] rounded-lg px-3 py-2 text-sm focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,o.jsx)(`button`,{onClick:()=>u(!s),className:`px-3 py-2 text-xs rounded-lg`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-muted)`},children:s?`Sort: Size`:`Sort: A-Z`})]}),(0,o.jsxs)(`div`,{className:`flex gap-4 mb-4 text-sm`,style:{color:`var(--text-muted)`},children:[(0,o.jsxs)(`span`,{children:[f.total,` files tracked`]}),(0,o.jsxs)(`span`,{children:[`Avg: `,f.avg,` tok/file`]}),(0,o.jsxs)(`span`,{children:[`Largest: `,f.largest,` tok`]})]}),(0,o.jsx)(`div`,{className:`rounded-xl p-4`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:n.entries.length===0?(0,o.jsxs)(`div`,{className:`text-center py-12`,style:{color:`var(--text-muted)`},children:[(0,o.jsx)(`p`,{className:`text-2xl mb-2`,children:`📂`}),(0,o.jsxs)(`p`,{children:[`No anatomy data. Run `,(0,o.jsx)(`code`,{style:{color:`var(--text-secondary)`},children:`openwolf scan`}),` to index your project.`]})]}):(0,o.jsx)(l,{node:d,search:r})})]})}export{f as AnatomyBrowser};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";var r=t(e(),1),i=n();function a({data:e}){let{buglog:t}=e,[n,a]=(0,r.useState)(``),[o,s]=(0,r.useState)(null),c=n?t.bugs.filter(e=>e.error_message.toLowerCase().includes(n.toLowerCase())||e.root_cause.toLowerCase().includes(n.toLowerCase())||e.fix.toLowerCase().includes(n.toLowerCase())||e.tags.some(e=>e.toLowerCase().includes(n.toLowerCase()))):t.bugs;if(t.bugs.length===0)return(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,i.jsx)(`div`,{className:`text-4xl mb-3`,children:`🐛`}),(0,i.jsx)(`h3`,{className:`font-medium mb-1`,style:{color:`var(--text-secondary)`},children:`No bugs logged yet`}),(0,i.jsx)(`p`,{className:`text-sm max-w-sm`,style:{color:`var(--text-muted)`},children:`When you encounter and fix bugs, they'll appear here for future reference.`})]});let l=t.bugs.flatMap(e=>e.tags),u=new Map;for(let e of l)u.set(e,(u.get(e)||0)+1);let d=[...u.entries()].sort((e,t)=>t[1]-e[1]).slice(0,5);return(0,i.jsxs)(`div`,{children:[(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 mb-4`,children:[(0,i.jsx)(`input`,{type:`text`,placeholder:`Search bugs...`,value:n,onChange:e=>a(e.target.value),className:`flex-1 min-w-[200px] rounded-lg px-3 py-2 text-sm focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,i.jsxs)(`span`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:[t.bugs.length,` bugs logged`]})]}),d.length>0&&(0,i.jsx)(`div`,{className:`flex flex-wrap gap-2 mb-4`,children:d.map(([e,t])=>(0,i.jsxs)(`button`,{onClick:()=>a(e),className:`px-2 py-1 text-xs rounded-full`,style:{background:`var(--bg-surface-hover)`,border:`1px solid var(--border-subtle)`,color:`var(--text-muted)`},children:[e,` (`,t,`)`]},e))}),(0,i.jsx)(`div`,{className:`space-y-3`,children:c.map(e=>{let t=o===e.id;return(0,i.jsxs)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsxs)(`button`,{onClick:()=>s(t?null:e.id),className:`w-full flex items-start gap-3 px-5 py-3 transition-colors text-left`,onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsx)(`span`,{className:`text-sm mt-0.5`,style:{color:`var(--text-faint)`},children:t?`▼`:`▶`}),(0,i.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,i.jsx)(`p`,{className:`text-sm truncate`,style:{color:`var(--text-primary)`},children:e.error_message}),(0,i.jsxs)(`div`,{className:`flex items-center gap-3 mt-1`,children:[(0,i.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:e.file}),(0,i.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:e.timestamp?.slice(0,10)})]})]}),e.occurrences>1&&(0,i.jsxs)(`span`,{className:`shrink-0 px-2 py-0.5 rounded-full text-xs`,style:{background:`var(--warning-subtle)`,color:`var(--warning)`},children:[`Seen `,e.occurrences,`x`]})]}),t&&(0,i.jsxs)(`div`,{className:`px-5 py-4 space-y-3`,style:{borderTop:`1px solid var(--border)`},children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs uppercase mb-1`,style:{color:`var(--text-faint)`},children:`Error Message`}),(0,i.jsx)(`pre`,{className:`text-sm rounded-lg p-3 overflow-x-auto font-mono`,style:{color:`var(--danger)`,background:`var(--danger-subtle)`},children:e.error_message})]}),(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs uppercase mb-1`,style:{color:`var(--text-faint)`},children:`Root Cause`}),(0,i.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-secondary)`},children:e.root_cause})]}),(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-xs uppercase mb-1`,style:{color:`var(--text-faint)`},children:`Fix`}),(0,i.jsx)(`pre`,{className:`text-sm rounded-lg p-3 overflow-x-auto font-mono`,style:{color:`var(--accent)`,background:`var(--accent-subtle)`},children:e.fix})]}),(0,i.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.tags.map(e=>(0,i.jsx)(`span`,{className:`px-2 py-0.5 text-xs rounded-full`,style:{background:`var(--bg-surface-hover)`,border:`1px solid var(--border-subtle)`,color:`var(--text-muted)`},children:e},e))})]})]},e.id)})})]})}export{a as BugLog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";var r=t(e(),1),i=n();function a({data:e}){let{cerebrum:t}=e,[n,a]=(0,r.useState)(``),[o,s]=(0,r.useState)({preferences:!0,learnings:!0,doNotRepeat:!0,decisions:!1}),c=e=>s(t=>({...t,[e]:!t[e]})),l=e=>!n||e.toLowerCase().includes(n.toLowerCase());return(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{className:`flex items-center justify-between mb-4`,children:(0,i.jsxs)(`div`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:[`Last updated: `,t.lastUpdated||`—`,` ·`,t.preferences.length+t.learnings.length+t.doNotRepeat.length+t.decisions.length,` entries`]})}),(0,i.jsx)(`input`,{type:`text`,placeholder:`Search cerebrum...`,value:n,onChange:e=>a(e.target.value),className:`w-full rounded-lg px-3 py-2 text-sm mb-4 focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,i.jsxs)(`div`,{className:`rounded-xl mb-4 overflow-hidden`,style:{background:`var(--danger-subtle)`,border:`1px solid rgba(220, 38, 38, 0.2)`},children:[(0,i.jsxs)(`button`,{onClick:()=>c(`doNotRepeat`),className:`w-full flex items-center justify-between px-5 py-3 transition-colors`,onMouseEnter:e=>e.currentTarget.style.background=`rgba(220, 38, 38, 0.08)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,i.jsx)(`span`,{style:{color:`var(--danger)`},children:`⊘`}),(0,i.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--danger)`},children:`Do-Not-Repeat`}),(0,i.jsx)(`span`,{className:`text-xs px-2 py-0.5 rounded-full`,style:{background:`rgba(220, 38, 38, 0.1)`,color:`var(--danger)`},children:t.doNotRepeat.length})]}),(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:o.doNotRepeat?`▼`:`▶`})]}),o.doNotRepeat&&(0,i.jsxs)(`div`,{className:`px-5 pb-4 space-y-2`,children:[t.doNotRepeat.filter(e=>l(e.text)).map((e,t)=>(0,i.jsxs)(`div`,{className:`rounded-lg p-3`,style:{background:`rgba(220, 38, 38, 0.05)`,border:`1px solid rgba(220, 38, 38, 0.1)`},children:[e.date&&(0,i.jsxs)(`span`,{className:`text-xs font-mono mr-2`,style:{color:`rgba(220, 38, 38, 0.6)`},children:[`[`,e.date,`]`]}),(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-secondary)`},children:e.text})]},t)),t.doNotRepeat.length===0&&(0,i.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`No entries yet.`})]})]}),(0,i.jsxs)(`div`,{className:`rounded-xl mb-4 overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsxs)(`button`,{onClick:()=>c(`preferences`),className:`w-full flex items-center justify-between px-5 py-3 transition-colors`,onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,i.jsx)(`span`,{className:`text-blue-400`,children:`◈`}),(0,i.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`User Preferences`}),(0,i.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:t.preferences.length})]}),(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:o.preferences?`▼`:`▶`})]}),o.preferences&&(0,i.jsxs)(`div`,{className:`px-5 pb-4`,children:[t.preferences.filter(l).map((e,t)=>(0,i.jsxs)(`div`,{className:`flex items-start gap-2 py-1.5`,children:[(0,i.jsx)(`span`,{className:`mt-1`,style:{color:`var(--text-faint)`},children:`•`}),(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-secondary)`},children:e})]},t)),t.preferences.length===0&&(0,i.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`No preferences recorded yet.`})]})]}),(0,i.jsxs)(`div`,{className:`rounded-xl mb-4 overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsxs)(`button`,{onClick:()=>c(`learnings`),className:`w-full flex items-center justify-between px-5 py-3 transition-colors`,onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,i.jsx)(`span`,{style:{color:`var(--accent)`},children:`◎`}),(0,i.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`Key Learnings`}),(0,i.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:t.learnings.length})]}),(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:o.learnings?`▼`:`▶`})]}),o.learnings&&(0,i.jsxs)(`div`,{className:`px-5 pb-4 space-y-2`,children:[t.learnings.filter(l).map((e,t)=>(0,i.jsx)(`div`,{className:`rounded-lg p-3 text-sm`,style:{background:`var(--bg-surface-hover)`,color:`var(--text-secondary)`},children:e},t)),t.learnings.length===0&&(0,i.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`No learnings recorded yet.`})]})]}),(0,i.jsxs)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsxs)(`button`,{onClick:()=>c(`decisions`),className:`w-full flex items-center justify-between px-5 py-3 transition-colors`,onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,i.jsx)(`span`,{className:`text-amber-400`,children:`⚖`}),(0,i.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`Decision Log`}),(0,i.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:t.decisions.length})]}),(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:o.decisions?`▼`:`▶`})]}),o.decisions&&(0,i.jsxs)(`div`,{className:`px-5 pb-4 space-y-2`,children:[t.decisions.filter(l).map((e,t)=>(0,i.jsx)(`div`,{className:`rounded-lg p-3 text-sm`,style:{background:`var(--bg-surface-hover)`,color:`var(--text-secondary)`},children:e},t)),t.decisions.length===0&&(0,i.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`No decisions logged yet.`})]})]})]})}export{a as CerebrumViewer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n,t as r}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n,t as r}from"./index-D2sNMefT.js";import{i,n as a}from"./utils-BqE_aDxV.js";import{t as o}from"./StatusBadge-CZX-0CQE.js";var s=t(e(),1),c=n();function l({data:e}){let{cronManifest:t,cronState:n,client:l}=e,[u,d]=(0,s.useState)(!0),[f,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)({}),g=e=>n.dead_letter_queue.some(t=>t.task_id===e)?`failed`:n.execution_log.filter(t=>t.task_id===e).sort((e,t)=>t.timestamp.localeCompare(e.timestamp))[0]?.status||`ok`,_=e=>{let t=n.execution_log.filter(t=>t.task_id===e).sort((e,t)=>t.timestamp.localeCompare(e.timestamp))[0];return t?i(t.timestamp):`never`},v=e=>{h(t=>({...t,[e]:`running`})),r(`/api/cron/run/${encodeURIComponent(e)}`,{method:`POST`}).then(t=>{h(n=>({...n,[e]:t.ok?`ok`:`error`})),setTimeout(()=>h(t=>{let n={...t};return delete n[e],n}),3e3)}).catch(()=>{h(t=>({...t,[e]:`error`})),setTimeout(()=>h(t=>{let n={...t};return delete n[e],n}),3e3)})},y=e=>{l?.send({type:`retry_dead_letter`,task_id:e})};return(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`div`,{className:`rounded-xl overflow-hidden mb-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,c.jsxs)(`table`,{className:`w-full`,children:[(0,c.jsx)(`thead`,{children:(0,c.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--border)`},children:[(0,c.jsx)(`th`,{className:`text-left px-4 py-3 text-xs font-medium uppercase`,style:{color:`var(--text-faint)`},children:`Status`}),(0,c.jsx)(`th`,{className:`text-left px-4 py-3 text-xs font-medium uppercase`,style:{color:`var(--text-faint)`},children:`Task`}),(0,c.jsx)(`th`,{className:`text-left px-4 py-3 text-xs font-medium uppercase hidden md:table-cell`,style:{color:`var(--text-faint)`},children:`Schedule`}),(0,c.jsx)(`th`,{className:`text-left px-4 py-3 text-xs font-medium uppercase hidden md:table-cell`,style:{color:`var(--text-faint)`},children:`Last Run`}),(0,c.jsx)(`th`,{className:`text-right px-4 py-3 text-xs font-medium uppercase`,style:{color:`var(--text-faint)`},children:`Actions`})]})}),(0,c.jsx)(`tbody`,{children:t.tasks.map(e=>(0,c.jsxs)(`tr`,{className:`transition-colors`,style:{borderBottom:`1px solid var(--border)`},onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,c.jsx)(`td`,{className:`px-4 py-3`,children:(0,c.jsx)(o,{status:e.enabled?g(e.id):`disabled`})}),(0,c.jsxs)(`td`,{className:`px-4 py-3`,children:[(0,c.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-primary)`},children:e.name}),(0,c.jsx)(`p`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:e.description})]}),(0,c.jsx)(`td`,{className:`px-4 py-3 hidden md:table-cell text-sm`,style:{color:`var(--text-muted)`},children:a(e.schedule)}),(0,c.jsx)(`td`,{className:`px-4 py-3 hidden md:table-cell text-sm`,style:{color:`var(--text-faint)`},children:_(e.id)}),(0,c.jsx)(`td`,{className:`px-4 py-3 text-right`,children:(()=>{let t=m[e.id];return(0,c.jsx)(`button`,{onClick:()=>v(e.id),disabled:t===`running`,className:`px-3 py-1 text-xs rounded-md transition-colors`,style:{background:`var(--bg-surface-hover)`,border:`1px solid var(--border-subtle)`,color:t===`ok`?`var(--accent)`:t===`error`?`var(--danger)`:`var(--text-secondary)`,opacity:t===`running`?.6:1},children:t===`running`?`Running…`:t===`ok`?`Triggered ✓`:t===`error`?`Failed ✗`:`Run Now`})})()})]},e.id))})]})}),(0,c.jsxs)(`div`,{className:`rounded-xl p-5 mb-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,c.jsxs)(`button`,{onClick:()=>d(!u),className:`flex items-center gap-2 w-full text-left`,children:[(0,c.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:u?`▼`:`▶`}),(0,c.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`Dead Letter Queue`}),(0,c.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:[`(`,n.dead_letter_queue.length,`)`]})]}),u&&(n.dead_letter_queue.length===0?(0,c.jsx)(`div`,{className:`text-center py-6 text-sm mt-2`,style:{color:`var(--text-muted)`},children:`No dead letters — all systems healthy`}):(0,c.jsx)(`div`,{className:`space-y-3 mt-3`,children:n.dead_letter_queue.map((e,t)=>(0,c.jsx)(`div`,{className:`rounded-lg p-4`,style:{background:`var(--danger-subtle)`,border:`1px solid rgba(220, 38, 38, 0.2)`},children:(0,c.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`p`,{className:`text-sm font-medium`,style:{color:`var(--danger)`},children:e.task_id}),(0,c.jsx)(`p`,{className:`text-xs mt-1`,style:{color:`var(--text-muted)`},children:e.error}),(0,c.jsxs)(`p`,{className:`text-xs mt-1`,style:{color:`var(--text-faint)`},children:[i(e.timestamp),` · `,e.attempts,` attempts`]})]}),(0,c.jsx)(`button`,{onClick:()=>y(e.task_id),className:`px-3 py-1 text-xs rounded-md`,style:{background:`var(--bg-surface-hover)`,border:`1px solid var(--border-subtle)`,color:`var(--text-secondary)`},children:`Retry`})]})},t))}))]}),(0,c.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,c.jsxs)(`button`,{onClick:()=>p(!f),className:`flex items-center gap-2 w-full text-left`,children:[(0,c.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:f?`▼`:`▶`}),(0,c.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`Execution History`})]}),f&&(0,c.jsxs)(`div`,{className:`mt-3`,children:[n.execution_log.slice(-30).reverse().map((e,t)=>(0,c.jsxs)(`div`,{className:`flex items-center gap-4 py-2`,style:{borderBottom:`1px solid var(--border)`},children:[(0,c.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`var(--text-faint)`},children:e.timestamp?.slice(11,16)}),(0,c.jsx)(`span`,{className:`text-sm flex-1`,style:{color:`var(--text-secondary)`},children:e.task_id}),(0,c.jsxs)(`span`,{className:`text-xs font-mono`,style:{color:`var(--text-faint)`},children:[e.duration_ms,`ms`]}),(0,c.jsx)(o,{status:e.status})]},t)),n.execution_log.length===0&&(0,c.jsx)(`p`,{className:`text-sm py-4 text-center`,style:{color:`var(--text-muted)`},children:`No executions yet.`})]})]})]})}export{l as CronStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,n,r,t as i}from"./index-
|
|
1
|
+
import{a as e,c as t,n,r,t as i}from"./index-D2sNMefT.js";var a=t(e(),1),o=r(),s=e=>n(`/api/designqc/capture/${encodeURIComponent(e)}`);function c({data:e}){let{designqcReport:t,project:n}=e,[r,c]=(0,a.useState)(`idle`),[l,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(null),p=t&&t.captures&&t.captures.length>0;return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`rounded-xl px-4 py-3 mb-6 flex items-start gap-3`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsx)(`span`,{style:{color:`var(--text-faint)`,marginTop:1},children:`ℹ`}),(0,o.jsxs)(`div`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:[`Works with `,(0,o.jsx)(`span`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`any accessible URL`}),` — local or deployed. The URL is auto-detected from `,(0,o.jsx)(`code`,{className:`px-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:`package.json`}),` homepage, env files, or a running dev server.`,n?.root&&(0,o.jsxs)(`span`,{children:[` Scanning `,(0,o.jsx)(`code`,{className:`px-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:n.root}),`.`]})]})]}),(0,o.jsxs)(`div`,{className:`rounded-xl p-5 mb-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,o.jsx)(`h3`,{className:`font-medium`,style:{color:`var(--text-secondary)`},children:`Capture Screenshots`}),(0,o.jsx)(`button`,{onClick:()=>{c(`running`),u(null),i(`/api/designqc/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>({error:e.statusText}));throw Error(t.error||e.statusText)}c(`idle`)}).catch(e=>{c(`error`),u(e.message)})},disabled:r===`running`,className:`px-4 py-1.5 text-sm rounded-lg transition-colors`,style:{background:r===`error`?`var(--danger-subtle)`:`var(--accent-subtle)`,border:`1px solid ${r===`error`?`rgba(220,38,38,0.3)`:`var(--accent)`}`,color:r===`error`?`var(--danger)`:`var(--accent)`,opacity:r===`running`?.6:1},children:r===`running`?`Capturing…`:r===`error`?`Retry Capture`:`Run Capture`})]}),r===`running`&&(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Auto-detecting URL, launching browser, capturing screenshots… this takes ~15–30s.`}),r===`error`&&l&&(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--danger)`},children:l}),r===`idle`&&(0,o.jsxs)(`div`,{className:`space-y-1.5 text-sm`,style:{color:`var(--text-muted)`},children:[(0,o.jsxs)(`p`,{children:[`Detects your URL automatically from `,(0,o.jsx)(`code`,{className:`px-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:`package.json`}),`, env files, or a running dev server.`]}),(0,o.jsxs)(`p`,{children:[`After capture, ask Claude: `,(0,o.jsx)(`span`,{className:`italic`,children:`"Read .wolf/designqc-captures/ and evaluate the design"`})]})]})]}),(0,o.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsx)(`h3`,{className:`font-medium mb-3`,style:{color:`var(--text-secondary)`},children:`Last Capture`}),p?(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`flex gap-4 text-sm mb-4`,children:[(0,o.jsxs)(`span`,{style:{color:`var(--text-faint)`},children:[`Captured: `,t.captured_at||`—`]}),(0,o.jsxs)(`span`,{style:{color:`var(--text-faint)`},children:[`Size: `,t.total_size_kb||0,`KB`]}),(0,o.jsxs)(`span`,{style:{color:`var(--text-faint)`},children:[`Est. tokens: ~`,t.estimated_tokens||0]})]}),(0,o.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 gap-4`,children:t.captures.map((e,t)=>(0,o.jsxs)(`button`,{onClick:()=>f(e.file),className:`text-left rounded-lg overflow-hidden transition-transform hover:-translate-y-0.5`,style:{background:`var(--bg-base)`,border:`1px solid var(--border)`},title:`Klicken zum Vergrößern`,children:[(0,o.jsx)(`img`,{src:s(e.file),alt:`${e.viewport} · ${e.route}`,loading:`lazy`,className:`w-full block`,style:{maxHeight:200,objectFit:`cover`,objectPosition:`top`,background:`var(--bg-surface)`}}),(0,o.jsxs)(`div`,{className:`px-3 py-2`,children:[(0,o.jsx)(`div`,{className:`text-sm truncate`,style:{color:`var(--text-primary)`},children:e.file}),(0,o.jsxs)(`div`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:[e.viewport,` · `,e.route]})]})]},t))})]}):(0,o.jsx)(`div`,{className:`text-center py-8`,children:(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`No screenshots captured yet.`})})]}),d&&(0,o.jsxs)(`div`,{onClick:()=>f(null),className:`fixed inset-0 z-50 flex items-center justify-center p-6`,style:{background:`rgba(0,0,0,0.8)`},children:[(0,o.jsx)(`div`,{className:`relative max-w-6xl max-h-[90vh] overflow-auto rounded-lg`,onClick:e=>e.stopPropagation(),children:(0,o.jsx)(`img`,{src:s(d),alt:d,className:`block`,style:{maxWidth:`100%`}})}),(0,o.jsx)(`button`,{onClick:()=>f(null),className:`absolute top-4 right-4 w-9 h-9 rounded-full flex items-center justify-center text-lg`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`},"aria-label":`Schließen`,children:`✕`})]})]})}export{c as DesignQC};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n}from"./index-D2sNMefT.js";var r=t(e(),1),i=n();function a({data:e}){let{memory:t}=e,[n,a]=(0,r.useState)(0),[o,s]=(0,r.useState)(``),c=o?t.filter(e=>e.entries.some(e=>e.action.toLowerCase().includes(o.toLowerCase())||e.files.toLowerCase().includes(o.toLowerCase()))):t;return(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{className:`flex items-center gap-3 mb-4`,children:(0,i.jsx)(`input`,{type:`text`,placeholder:`Search memory...`,value:o,onChange:e=>s(e.target.value),className:`flex-1 rounded-lg px-3 py-2 text-sm focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}})}),c.length===0?(0,i.jsx)(`div`,{className:`text-center py-12`,style:{color:`var(--text-muted)`},children:`No sessions found.`}):(0,i.jsx)(`div`,{className:`space-y-3`,children:c.map((e,t)=>{let r=n===t,o=e.entries.reduce((e,t)=>e+(parseInt(t.tokens.replace(/[^0-9]/g,``))||0),0);return(0,i.jsxs)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,i.jsxs)(`button`,{onClick:()=>a(r?-1:t),className:`w-full flex items-center justify-between px-5 py-3 transition-colors`,onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`span`,{className:`text-sm`,style:{color:`var(--text-faint)`},children:r?`▼`:`▶`}),(0,i.jsxs)(`span`,{className:`text-sm font-medium`,style:{color:`var(--text-primary)`},children:[e.date,` `,e.time]}),(0,i.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:[e.entries.length,` actions`]})]}),o>0&&(0,i.jsxs)(`span`,{className:`text-xs font-mono`,style:{color:`var(--text-faint)`},children:[`~`,o,` tok`]})]}),r&&e.entries.length>0&&(0,i.jsx)(`div`,{style:{borderTop:`1px solid var(--border)`},children:(0,i.jsxs)(`table`,{className:`w-full`,children:[(0,i.jsx)(`thead`,{children:(0,i.jsxs)(`tr`,{className:`text-xs uppercase`,style:{color:`var(--text-faint)`},children:[(0,i.jsx)(`th`,{className:`text-left px-4 py-2 w-16`,children:`Time`}),(0,i.jsx)(`th`,{className:`text-left px-4 py-2`,children:`Action`}),(0,i.jsx)(`th`,{className:`text-left px-4 py-2 hidden md:table-cell`,children:`Files`}),(0,i.jsx)(`th`,{className:`text-left px-4 py-2 hidden md:table-cell`,children:`Outcome`}),(0,i.jsx)(`th`,{className:`text-right px-4 py-2 w-20`,children:`Tokens`})]})}),(0,i.jsx)(`tbody`,{children:e.entries.map((e,t)=>(0,i.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--border)`},onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-surface-hover)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,i.jsx)(`td`,{className:`px-4 py-2 text-xs font-mono`,style:{color:`var(--text-faint)`},children:e.time}),(0,i.jsx)(`td`,{className:`px-4 py-2 text-sm`,style:{color:`var(--text-secondary)`},children:e.action}),(0,i.jsx)(`td`,{className:`px-4 py-2 text-sm hidden md:table-cell`,style:{color:`var(--text-muted)`},children:e.files}),(0,i.jsx)(`td`,{className:`px-4 py-2 text-sm hidden md:table-cell`,style:{color:`var(--text-muted)`},children:e.outcome}),(0,i.jsx)(`td`,{className:`px-4 py-2 text-xs font-mono text-right`,style:{color:`var(--text-faint)`},children:e.tokens})]},t))})]})})]},t)})})]})}export{a as MemoryViewer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n,t as r}from"./index-QzB3QJTS.js";import{i}from"./utils-BqE_aDxV.js";var a=t(e(),1),o=n();function s(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function c({label:e,value:t,accent:n}){return(0,o.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:e}),(0,o.jsx)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:n?`var(--accent)`:`var(--text-primary)`},children:t})]})}var l=2160*60*60*1e3;function u({scope:e,setScope:t}){return(0,o.jsx)(`div`,{className:`inline-flex rounded-lg mb-4 p-0.5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[{id:`project`,label:`This project`},{id:`all`,label:`All projects`}].map(n=>(0,o.jsx)(`button`,{onClick:()=>t(n.id),className:`text-sm px-3 py-1.5 rounded-md transition-colors`,style:{background:e===n.id?`var(--accent)`:`transparent`,color:e===n.id?`#fff`:`var(--text-muted)`},children:n.label},n.id))})}function d({data:e}){let[t,n]=(0,a.useState)(`project`);return(0,o.jsxs)(`div`,{children:[(0,o.jsx)(u,{scope:t,setScope:n}),t===`project`?(0,o.jsx)(f,{data:e}):(0,o.jsx)(p,{data:e})]})}function f(e){let[t,n]=(0,a.useState)(null),[u,d]=(0,a.useState)(null),[f,p]=(0,a.useState)(``),[m,h]=(0,a.useState)(null),[g,_]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=!1;return r(`/api/native-memory`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>{e||n(t)}).catch(t=>{e||d(String(t?.message||t))}),()=>{e=!0}},[]);let v=e=>{_(!0),h({name:e,content:``}),r(`/api/native-memory/file?name=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>h({name:e,content:t.content??``})).catch(()=>h({name:e,content:`(could not load file)`})).finally(()=>_(!1))};if(u)return(0,o.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--danger)`},children:[`Could not load native memory: `,u]});if(!t)return(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Loading…`});if(!t.available)return(0,o.jsxs)(`div`,{className:`rounded-xl p-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsx)(`h3`,{className:`font-medium mb-2`,style:{color:`var(--text-secondary)`},children:`No native memory found`}),(0,o.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:[`Claude Code's native Auto Memory isn't present for this project (expected at`,(0,o.jsx)(`code`,{className:`px-1 mx-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:`~/.claude/projects/<project>/memory/`}),`). It appears once Auto Memory has written notes. OpenWolf falls back to its own `,(0,o.jsx)(`code`,{children:`.wolf/`}),` memory.`]})]});let y=t.health,b=Date.now(),x=(t.files??[]).filter(e=>!f||e.name.toLowerCase().includes(f.toLowerCase())),S={color:`var(--text-secondary)`,padding:`0.5rem 0.75rem`,borderTop:`1px solid var(--border)`},C={color:`var(--text-muted)`,fontWeight:500,textAlign:`left`,padding:`0.5rem 0.75rem`};return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 mb-4`,children:[(0,o.jsx)(c,{label:`Topic files`,value:String(y.topicFiles)}),(0,o.jsx)(c,{label:`In index`,value:`${y.indexedCount}`,accent:!0}),(0,o.jsx)(c,{label:`Not indexed`,value:String(y.orphanCount)}),(0,o.jsx)(c,{label:`Footprint`,value:s(y.footprintBytes)})]}),(y.indexCutoffExceeded||y.orphanCount>0||y.deadLinks.length>0)&&(0,o.jsxs)(`div`,{className:`rounded-xl px-4 py-3 mb-4 text-sm space-y-1`,style:{background:`var(--danger-subtle)`,border:`1px solid rgba(220,38,38,0.3)`,color:`var(--text-secondary)`},children:[y.indexCutoffExceeded&&(0,o.jsxs)(`div`,{children:[`⚠ `,(0,o.jsxs)(`strong`,{children:[`MEMORY.md is `,y.indexLines,` lines`]}),` — only the first 200 load at session start; the rest is invisible until trimmed.`]}),y.orphanCount>0&&(0,o.jsxs)(`div`,{children:[`⚠ `,(0,o.jsxs)(`strong`,{children:[y.orphanCount,` topic files aren't in the index`]}),` → they never surface on resume. They're still searchable via `,(0,o.jsx)(`code`,{children:`openwolf recall`}),` and below.`]}),y.deadLinks.length>0&&(0,o.jsxs)(`div`,{children:[`⚠ `,(0,o.jsxs)(`strong`,{children:[y.deadLinks.length,` dead index link(s)`]}),`: `,y.deadLinks.slice(0,5).join(`, `),y.deadLinks.length>5?`…`:``]})]}),(0,o.jsx)(`input`,{type:`text`,placeholder:`Filter topic files…`,value:f,onChange:e=>p(e.target.value),className:`w-full mb-3 rounded-lg px-3 py-2 text-sm focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,o.jsx)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,o.jsx)(`div`,{className:`overflow-x-auto`,style:{maxHeight:460},children:(0,o.jsxs)(`table`,{className:`w-full text-sm`,style:{borderCollapse:`collapse`},children:[(0,o.jsx)(`thead`,{children:(0,o.jsxs)(`tr`,{children:[(0,o.jsxs)(`th`,{style:C,children:[`Topic file (`,x.length,`)`]}),(0,o.jsx)(`th`,{style:C,children:`Index`}),(0,o.jsx)(`th`,{style:{...C,textAlign:`right`},children:`Size`}),(0,o.jsx)(`th`,{style:C,children:`Modified`})]})}),(0,o.jsx)(`tbody`,{children:x.map(e=>{let t=b-new Date(e.mtime).getTime()>l;return(0,o.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>v(e.name),children:[(0,o.jsx)(`td`,{style:{...S,color:`var(--text-primary)`},className:`font-mono`,children:e.name}),(0,o.jsx)(`td`,{style:S,children:e.indexed?(0,o.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--accent-subtle)`,color:`var(--accent)`},children:`indexed`}):(0,o.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--bg-base)`,color:`var(--text-faint)`},children:`orphan`})}),(0,o.jsx)(`td`,{style:{...S,textAlign:`right`},children:s(e.bytes)}),(0,o.jsxs)(`td`,{style:{...S,color:t?`var(--text-faint)`:`var(--text-muted)`},children:[i(e.mtime),t?` · stale`:``]})]},e.name)})})]})})}),m&&(0,o.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,style:{background:`rgba(0,0,0,0.5)`},onClick:()=>h(null),children:(0,o.jsxs)(`div`,{className:`rounded-xl w-full max-w-3xl max-h-[80vh] flex flex-col`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2`,style:{borderBottom:`1px solid var(--border)`},children:[(0,o.jsx)(`span`,{className:`font-mono text-sm`,style:{color:`var(--text-primary)`},children:m.name}),(0,o.jsx)(`button`,{onClick:()=>h(null),className:`text-sm px-2 py-1 rounded`,style:{color:`var(--text-muted)`},children:`✕`})]}),(0,o.jsx)(`pre`,{className:`text-xs px-4 py-3 overflow-auto whitespace-pre-wrap`,style:{color:`var(--text-secondary)`},children:g?`Loading…`:m.content})]})}),(0,o.jsx)(`p`,{className:`text-xs mt-3`,style:{color:`var(--text-faint)`},children:`Read-only view of Claude Code's native Auto Memory. OpenWolf never writes here — Claude's own Auto Dream owns consolidation.`})]})}function p({data:e}){let[t,n]=(0,a.useState)(null),[i,l]=(0,a.useState)(null),u=e.project.root;(0,a.useEffect)(()=>{let e=!1;return r(`/api/native-memory/aggregate`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>{e||n(t.projects||[])}).catch(t=>{e||l(String(t?.message||t))}),()=>{e=!0}},[]);let d=e=>{r(`/api/switch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({root:e})}).then(e=>{e.ok&&location.reload()})};if(i)return(0,o.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--danger)`},children:[`Could not load projects: `,i]});if(!t)return(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Loading projects…`});let f=t.filter(e=>e.available&&e.health),p=[...t].sort((e,t)=>e.available===t.available?(t.health?.topicFiles??0)-(e.health?.topicFiles??0):e.available?-1:1),m=f.reduce((e,t)=>({topics:e.topics+t.health.topicFiles,orphans:e.orphans+t.health.orphanCount,footprint:e.footprint+t.health.footprintBytes}),{topics:0,orphans:0,footprint:0}),h={color:`var(--text-muted)`,fontWeight:500,textAlign:`left`,padding:`0.5rem 0.75rem`},g={color:`var(--text-secondary)`,padding:`0.5rem 0.75rem`,borderTop:`1px solid var(--border)`};return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 mb-6`,children:[(0,o.jsx)(c,{label:`With native memory`,value:`${f.length}/${t.length}`}),(0,o.jsx)(c,{label:`Total topic files`,value:String(m.topics),accent:!0}),(0,o.jsx)(c,{label:`Total orphaned`,value:String(m.orphans)}),(0,o.jsx)(c,{label:`Total footprint`,value:s(m.footprint)})]}),(0,o.jsx)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,o.jsx)(`div`,{className:`overflow-x-auto`,children:(0,o.jsxs)(`table`,{className:`w-full text-sm`,style:{borderCollapse:`collapse`},children:[(0,o.jsx)(`thead`,{children:(0,o.jsxs)(`tr`,{children:[(0,o.jsx)(`th`,{style:h,children:`Project`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Topic files`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Indexed`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Orphaned`}),(0,o.jsx)(`th`,{style:h,children:`MEMORY.md`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Footprint`}),(0,o.jsx)(`th`,{style:h})]})}),(0,o.jsx)(`tbody`,{children:p.map(e=>{let t=u&&e.root===u,n=e.health;return(0,o.jsxs)(`tr`,{style:{background:t?`var(--bg-surface-hover)`:`transparent`},children:[(0,o.jsxs)(`td`,{style:g,children:[(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,o.jsx)(`span`,{style:{color:`var(--text-primary)`,fontWeight:500},children:e.name}),t&&(0,o.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--accent)`,color:`#fff`},children:`current`}),!e.available&&(0,o.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:`no native memory`})]}),(0,o.jsx)(`div`,{className:`text-xs truncate`,style:{color:`var(--text-faint)`,maxWidth:320},title:e.root,children:e.root})]}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:n?`var(--text-primary)`:`var(--text-faint)`},children:n?n.topicFiles:`—`}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:`var(--accent)`},children:n?n.indexedCount:`—`}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:n&&n.orphanCount>0?`var(--text-primary)`:`var(--text-faint)`},children:n?n.orphanCount:`—`}),(0,o.jsxs)(`td`,{style:g,children:[n?n.indexCutoffExceeded?(0,o.jsxs)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--danger-subtle)`,color:`var(--danger)`},title:`Only the first 200 lines load at session start`,children:[n.indexLines,` lines · over cutoff`]}):(0,o.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-muted)`},children:[n.indexLines,` lines`]}):(0,o.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:`—`}),n&&n.deadLinks.length>0&&(0,o.jsxs)(`span`,{className:`text-xs ml-2`,style:{color:`var(--danger)`},title:n.deadLinks.slice(0,8).join(`, `),children:[n.deadLinks.length,` dead`]})]}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:`var(--text-muted)`},children:n?s(n.footprintBytes):`—`}),(0,o.jsx)(`td`,{style:g,children:!t&&e.available&&(0,o.jsx)(`button`,{onClick:()=>d(e.root),className:`text-xs px-2 py-1 rounded-md transition-colors`,style:{background:`var(--bg-base)`,border:`1px solid var(--border)`,color:`var(--text-secondary)`},children:`Open`})})]},e.root)})})]})})}),(0,o.jsx)(`p`,{className:`text-xs mt-3`,style:{color:`var(--text-faint)`},children:`Native Auto Memory health across all registered OpenWolf projects. "Open" switches the daemon to that project — then "This project" browses its files. Read-only.`})]})}export{d as NativeMemory};
|
|
1
|
+
import{a as e,c as t,r as n,t as r}from"./index-D2sNMefT.js";import{i}from"./utils-BqE_aDxV.js";var a=t(e(),1),o=n();function s(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function c({label:e,value:t,accent:n}){return(0,o.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:e}),(0,o.jsx)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:n?`var(--accent)`:`var(--text-primary)`},children:t})]})}var l=2160*60*60*1e3;function u({scope:e,setScope:t}){return(0,o.jsx)(`div`,{className:`inline-flex rounded-lg mb-4 p-0.5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[{id:`project`,label:`This project`},{id:`all`,label:`All projects`}].map(n=>(0,o.jsx)(`button`,{onClick:()=>t(n.id),className:`text-sm px-3 py-1.5 rounded-md transition-colors`,style:{background:e===n.id?`var(--accent)`:`transparent`,color:e===n.id?`#fff`:`var(--text-muted)`},children:n.label},n.id))})}function d({data:e}){let[t,n]=(0,a.useState)(`project`);return(0,o.jsxs)(`div`,{children:[(0,o.jsx)(u,{scope:t,setScope:n}),t===`project`?(0,o.jsx)(f,{data:e}):(0,o.jsx)(p,{data:e})]})}function f(e){let[t,n]=(0,a.useState)(null),[u,d]=(0,a.useState)(null),[f,p]=(0,a.useState)(``),[m,h]=(0,a.useState)(null),[g,_]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=!1;return r(`/api/native-memory`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>{e||n(t)}).catch(t=>{e||d(String(t?.message||t))}),()=>{e=!0}},[]);let v=e=>{_(!0),h({name:e,content:``}),r(`/api/native-memory/file?name=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>h({name:e,content:t.content??``})).catch(()=>h({name:e,content:`(could not load file)`})).finally(()=>_(!1))};if(u)return(0,o.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--danger)`},children:[`Could not load native memory: `,u]});if(!t)return(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Loading…`});if(!t.available)return(0,o.jsxs)(`div`,{className:`rounded-xl p-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,o.jsx)(`h3`,{className:`font-medium mb-2`,style:{color:`var(--text-secondary)`},children:`No native memory found`}),(0,o.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:[`Claude Code's native Auto Memory isn't present for this project (expected at`,(0,o.jsx)(`code`,{className:`px-1 mx-1 rounded text-xs`,style:{background:`var(--bg-base)`},children:`~/.claude/projects/<project>/memory/`}),`). It appears once Auto Memory has written notes. OpenWolf falls back to its own `,(0,o.jsx)(`code`,{children:`.wolf/`}),` memory.`]})]});let y=t.health,b=Date.now(),x=(t.files??[]).filter(e=>!f||e.name.toLowerCase().includes(f.toLowerCase())),S={color:`var(--text-secondary)`,padding:`0.5rem 0.75rem`,borderTop:`1px solid var(--border)`},C={color:`var(--text-muted)`,fontWeight:500,textAlign:`left`,padding:`0.5rem 0.75rem`};return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 mb-4`,children:[(0,o.jsx)(c,{label:`Topic files`,value:String(y.topicFiles)}),(0,o.jsx)(c,{label:`In index`,value:`${y.indexedCount}`,accent:!0}),(0,o.jsx)(c,{label:`Not indexed`,value:String(y.orphanCount)}),(0,o.jsx)(c,{label:`Footprint`,value:s(y.footprintBytes)})]}),(y.indexCutoffExceeded||y.orphanCount>0||y.deadLinks.length>0)&&(0,o.jsxs)(`div`,{className:`rounded-xl px-4 py-3 mb-4 text-sm space-y-1`,style:{background:`var(--danger-subtle)`,border:`1px solid rgba(220,38,38,0.3)`,color:`var(--text-secondary)`},children:[y.indexCutoffExceeded&&(0,o.jsxs)(`div`,{children:[`⚠ `,(0,o.jsxs)(`strong`,{children:[`MEMORY.md is `,y.indexLines,` lines`]}),` — only the first 200 load at session start; the rest is invisible until trimmed.`]}),y.orphanCount>0&&(0,o.jsxs)(`div`,{children:[`⚠ `,(0,o.jsxs)(`strong`,{children:[y.orphanCount,` topic files aren't in the index`]}),` → they never surface on resume. They're still searchable via `,(0,o.jsx)(`code`,{children:`openwolf recall`}),` and below.`]}),y.deadLinks.length>0&&(0,o.jsxs)(`div`,{children:[`⚠ `,(0,o.jsxs)(`strong`,{children:[y.deadLinks.length,` dead index link(s)`]}),`: `,y.deadLinks.slice(0,5).join(`, `),y.deadLinks.length>5?`…`:``]})]}),(0,o.jsx)(`input`,{type:`text`,placeholder:`Filter topic files…`,value:f,onChange:e=>p(e.target.value),className:`w-full mb-3 rounded-lg px-3 py-2 text-sm focus:outline-none`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`,color:`var(--text-primary)`}}),(0,o.jsx)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,o.jsx)(`div`,{className:`overflow-x-auto`,style:{maxHeight:460},children:(0,o.jsxs)(`table`,{className:`w-full text-sm`,style:{borderCollapse:`collapse`},children:[(0,o.jsx)(`thead`,{children:(0,o.jsxs)(`tr`,{children:[(0,o.jsxs)(`th`,{style:C,children:[`Topic file (`,x.length,`)`]}),(0,o.jsx)(`th`,{style:C,children:`Index`}),(0,o.jsx)(`th`,{style:{...C,textAlign:`right`},children:`Size`}),(0,o.jsx)(`th`,{style:C,children:`Modified`})]})}),(0,o.jsx)(`tbody`,{children:x.map(e=>{let t=b-new Date(e.mtime).getTime()>l;return(0,o.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>v(e.name),children:[(0,o.jsx)(`td`,{style:{...S,color:`var(--text-primary)`},className:`font-mono`,children:e.name}),(0,o.jsx)(`td`,{style:S,children:e.indexed?(0,o.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--accent-subtle)`,color:`var(--accent)`},children:`indexed`}):(0,o.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--bg-base)`,color:`var(--text-faint)`},children:`orphan`})}),(0,o.jsx)(`td`,{style:{...S,textAlign:`right`},children:s(e.bytes)}),(0,o.jsxs)(`td`,{style:{...S,color:t?`var(--text-faint)`:`var(--text-muted)`},children:[i(e.mtime),t?` · stale`:``]})]},e.name)})})]})})}),m&&(0,o.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,style:{background:`rgba(0,0,0,0.5)`},onClick:()=>h(null),children:(0,o.jsxs)(`div`,{className:`rounded-xl w-full max-w-3xl max-h-[80vh] flex flex-col`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2`,style:{borderBottom:`1px solid var(--border)`},children:[(0,o.jsx)(`span`,{className:`font-mono text-sm`,style:{color:`var(--text-primary)`},children:m.name}),(0,o.jsx)(`button`,{onClick:()=>h(null),className:`text-sm px-2 py-1 rounded`,style:{color:`var(--text-muted)`},children:`✕`})]}),(0,o.jsx)(`pre`,{className:`text-xs px-4 py-3 overflow-auto whitespace-pre-wrap`,style:{color:`var(--text-secondary)`},children:g?`Loading…`:m.content})]})}),(0,o.jsx)(`p`,{className:`text-xs mt-3`,style:{color:`var(--text-faint)`},children:`Read-only view of Claude Code's native Auto Memory. OpenWolf never writes here — Claude's own Auto Dream owns consolidation.`})]})}function p({data:e}){let[t,n]=(0,a.useState)(null),[i,l]=(0,a.useState)(null),u=e.project.root;(0,a.useEffect)(()=>{let e=!1;return r(`/api/native-memory/aggregate`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>{e||n(t.projects||[])}).catch(t=>{e||l(String(t?.message||t))}),()=>{e=!0}},[]);let d=e=>{r(`/api/switch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({root:e})}).then(e=>{e.ok&&location.reload()})};if(i)return(0,o.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--danger)`},children:[`Could not load projects: `,i]});if(!t)return(0,o.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Loading projects…`});let f=t.filter(e=>e.available&&e.health),p=[...t].sort((e,t)=>e.available===t.available?(t.health?.topicFiles??0)-(e.health?.topicFiles??0):e.available?-1:1),m=f.reduce((e,t)=>({topics:e.topics+t.health.topicFiles,orphans:e.orphans+t.health.orphanCount,footprint:e.footprint+t.health.footprintBytes}),{topics:0,orphans:0,footprint:0}),h={color:`var(--text-muted)`,fontWeight:500,textAlign:`left`,padding:`0.5rem 0.75rem`},g={color:`var(--text-secondary)`,padding:`0.5rem 0.75rem`,borderTop:`1px solid var(--border)`};return(0,o.jsxs)(`div`,{children:[(0,o.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 mb-6`,children:[(0,o.jsx)(c,{label:`With native memory`,value:`${f.length}/${t.length}`}),(0,o.jsx)(c,{label:`Total topic files`,value:String(m.topics),accent:!0}),(0,o.jsx)(c,{label:`Total orphaned`,value:String(m.orphans)}),(0,o.jsx)(c,{label:`Total footprint`,value:s(m.footprint)})]}),(0,o.jsx)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,o.jsx)(`div`,{className:`overflow-x-auto`,children:(0,o.jsxs)(`table`,{className:`w-full text-sm`,style:{borderCollapse:`collapse`},children:[(0,o.jsx)(`thead`,{children:(0,o.jsxs)(`tr`,{children:[(0,o.jsx)(`th`,{style:h,children:`Project`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Topic files`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Indexed`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Orphaned`}),(0,o.jsx)(`th`,{style:h,children:`MEMORY.md`}),(0,o.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Footprint`}),(0,o.jsx)(`th`,{style:h})]})}),(0,o.jsx)(`tbody`,{children:p.map(e=>{let t=u&&e.root===u,n=e.health;return(0,o.jsxs)(`tr`,{style:{background:t?`var(--bg-surface-hover)`:`transparent`},children:[(0,o.jsxs)(`td`,{style:g,children:[(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,o.jsx)(`span`,{style:{color:`var(--text-primary)`,fontWeight:500},children:e.name}),t&&(0,o.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--accent)`,color:`#fff`},children:`current`}),!e.available&&(0,o.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:`no native memory`})]}),(0,o.jsx)(`div`,{className:`text-xs truncate`,style:{color:`var(--text-faint)`,maxWidth:320},title:e.root,children:e.root})]}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:n?`var(--text-primary)`:`var(--text-faint)`},children:n?n.topicFiles:`—`}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:`var(--accent)`},children:n?n.indexedCount:`—`}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:n&&n.orphanCount>0?`var(--text-primary)`:`var(--text-faint)`},children:n?n.orphanCount:`—`}),(0,o.jsxs)(`td`,{style:g,children:[n?n.indexCutoffExceeded?(0,o.jsxs)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--danger-subtle)`,color:`var(--danger)`},title:`Only the first 200 lines load at session start`,children:[n.indexLines,` lines · over cutoff`]}):(0,o.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-muted)`},children:[n.indexLines,` lines`]}):(0,o.jsx)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:`—`}),n&&n.deadLinks.length>0&&(0,o.jsxs)(`span`,{className:`text-xs ml-2`,style:{color:`var(--danger)`},title:n.deadLinks.slice(0,8).join(`, `),children:[n.deadLinks.length,` dead`]})]}),(0,o.jsx)(`td`,{style:{...g,textAlign:`right`,color:`var(--text-muted)`},children:n?s(n.footprintBytes):`—`}),(0,o.jsx)(`td`,{style:g,children:!t&&e.available&&(0,o.jsx)(`button`,{onClick:()=>d(e.root),className:`text-xs px-2 py-1 rounded-md transition-colors`,style:{background:`var(--bg-base)`,border:`1px solid var(--border)`,color:`var(--text-secondary)`},children:`Open`})})]},e.root)})})]})})}),(0,o.jsx)(`p`,{className:`text-xs mt-3`,style:{color:`var(--text-faint)`},children:`Native Auto Memory health across all registered OpenWolf projects. "Open" switches the daemon to that project — then "This project" browses its files. Read-only.`})]})}export{d as NativeMemory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./index-
|
|
1
|
+
import{a as e,r as t}from"./index-D2sNMefT.js";import{i as n,r}from"./utils-BqE_aDxV.js";import{t as i}from"./StatusBadge-CZX-0CQE.js";e();var a=t();function o({data:e}){let{identity:t,health:o,cronState:s,tokenLedger:c,anatomy:l,memory:u,project:d}=e,f=c.lifetime,p=d.name||t.name,m=d.description||``;return(0,a.jsxs)(`div`,{children:[(0,a.jsxs)(`div`,{className:`rounded-xl p-6 mb-6`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,a.jsx)(`h2`,{className:`text-3xl font-bold`,style:{color:`var(--text-primary)`},children:p}),m&&(0,a.jsx)(`p`,{className:`mt-1`,style:{color:`var(--text-muted)`},children:m}),(0,a.jsxs)(`div`,{className:`flex items-center gap-4 mt-3`,children:[(0,a.jsx)(i,{status:s.engine_status}),o.uptime_seconds>0&&(0,a.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:[`Uptime: `,Math.floor(o.uptime_seconds/3600),`h `,Math.floor(o.uptime_seconds%3600/60),`m`]}),s.last_heartbeat&&(0,a.jsxs)(`span`,{className:`text-xs`,style:{color:`var(--text-faint)`},children:[`Last heartbeat: `,n(s.last_heartbeat)]})]})]}),(0,a.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4 mb-6`,children:[(0,a.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,a.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Files Tracked`}),(0,a.jsx)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:`var(--text-primary)`},children:l.metadata.files})]}),(0,a.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,a.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Sessions`}),(0,a.jsx)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:`var(--text-primary)`},children:f.total_sessions})]}),(0,a.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,a.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Tokens Saved`}),(0,a.jsxs)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:`var(--accent)`},children:[`~`,r(f.estimated_savings_vs_bare_cli)]}),f.total_tokens_estimated>0&&(0,a.jsxs)(`p`,{className:`text-xs mt-1`,style:{color:`var(--text-faint)`},children:[Math.round(f.estimated_savings_vs_bare_cli/(f.total_tokens_estimated+f.estimated_savings_vs_bare_cli)*100),`% savings`]})]})]}),(0,a.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,a.jsx)(`h3`,{className:`font-medium mb-3`,style:{color:`var(--text-secondary)`},children:`Recent Activity`}),u.length===0?(0,a.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`No activity yet. Start a Claude Code session to see activity here.`}):(0,a.jsx)(`div`,{className:`space-y-2`,children:u.slice(0,3).flatMap(e=>e.entries.slice(0,5).map((t,n)=>(0,a.jsxs)(`div`,{className:`flex items-center gap-3 py-2`,style:{borderBottom:`1px solid var(--border)`},children:[(0,a.jsx)(`span`,{className:`text-xs font-mono w-12`,style:{color:`var(--text-faint)`},children:t.time}),(0,a.jsx)(`span`,{className:`text-sm flex-1`,style:{color:`var(--text-secondary)`},children:t.action}),(0,a.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`var(--text-faint)`},children:t.tokens})]},`${e.date}-${n}`))).slice(0,5)})]})]})}export{o as ProjectOverview};
|
package/dist/dashboard/assets/{ProjectsAggregate-DG5Vxc2k.js → ProjectsAggregate-BsBMRflP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,r as n,t as r}from"./index-
|
|
1
|
+
import{a as e,c as t,r as n,t as r}from"./index-D2sNMefT.js";import{i,r as a}from"./utils-BqE_aDxV.js";var o=t(e(),1),s=n();function c({label:e,value:t,accent:n}){return(0,s.jsxs)(`div`,{className:`rounded-xl p-5`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:[(0,s.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:e}),(0,s.jsx)(`p`,{className:`text-2xl font-bold mt-1`,style:{color:n?`var(--accent)`:`var(--text-primary)`},children:t})]})}function l({data:e}){let[t,n]=(0,o.useState)(null),[l,u]=(0,o.useState)(null),d=e.project.root;(0,o.useEffect)(()=>{let e=!1;return r(`/api/aggregate`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(t=>{e||n(t.projects||[])}).catch(t=>{e||u(String(t?.message||t))}),()=>{e=!0}},[]);let f=e=>{r(`/api/switch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({root:e})}).then(e=>{e.ok&&location.reload()})};if(l)return(0,s.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--danger)`},children:[`Could not load projects: `,l]});if(!t)return(0,s.jsx)(`p`,{className:`text-sm`,style:{color:`var(--text-muted)`},children:`Loading projects…`});let p=[...t].sort((e,t)=>(t.last_activity||``).localeCompare(e.last_activity||``)),m=t.reduce((e,t)=>({sessions:e.sessions+t.total_sessions,saved:e.saved+t.estimated_savings,bugs:e.bugs+t.open_bugs}),{sessions:0,saved:0,bugs:0}),h={color:`var(--text-muted)`,fontWeight:500,textAlign:`left`,padding:`0.5rem 0.75rem`},g={color:`var(--text-secondary)`,padding:`0.5rem 0.75rem`,borderTop:`1px solid var(--border)`};return(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-4 gap-4 mb-6`,children:[(0,s.jsx)(c,{label:`Projects`,value:String(t.length)}),(0,s.jsx)(c,{label:`Total Sessions`,value:String(m.sessions)}),(0,s.jsx)(c,{label:`Tokens Saved`,value:`~${a(m.saved)}`,accent:!0}),(0,s.jsx)(c,{label:`Open Bugs`,value:String(m.bugs)})]}),(0,s.jsx)(`div`,{className:`rounded-xl overflow-hidden`,style:{background:`var(--bg-surface)`,border:`1px solid var(--border)`},children:(0,s.jsx)(`div`,{className:`overflow-x-auto`,children:(0,s.jsxs)(`table`,{className:`w-full text-sm`,style:{borderCollapse:`collapse`},children:[(0,s.jsx)(`thead`,{children:(0,s.jsxs)(`tr`,{children:[(0,s.jsx)(`th`,{style:h,children:`Project`}),(0,s.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Sessions`}),(0,s.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Tokens`}),(0,s.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Saved`}),(0,s.jsx)(`th`,{style:{...h,textAlign:`right`},children:`Bugs`}),(0,s.jsx)(`th`,{style:h,children:`Last activity`}),(0,s.jsx)(`th`,{style:h})]})}),(0,s.jsx)(`tbody`,{children:p.map(e=>{let t=d&&e.root===d;return(0,s.jsxs)(`tr`,{style:{background:t?`var(--bg-surface-hover)`:`transparent`},children:[(0,s.jsxs)(`td`,{style:g,children:[(0,s.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,s.jsx)(`span`,{style:{color:`var(--text-primary)`,fontWeight:500},children:e.name}),t&&(0,s.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded`,style:{background:`var(--accent)`,color:`#fff`},children:`current`}),!e.exists&&(0,s.jsx)(`span`,{className:`text-xs`,style:{color:`var(--danger)`},children:`missing`})]}),(0,s.jsx)(`div`,{className:`text-xs truncate`,style:{color:`var(--text-faint)`,maxWidth:320},title:e.root,children:e.root})]}),(0,s.jsx)(`td`,{style:{...g,textAlign:`right`},children:e.total_sessions}),(0,s.jsx)(`td`,{style:{...g,textAlign:`right`},children:a(e.total_tokens_estimated)}),(0,s.jsxs)(`td`,{style:{...g,textAlign:`right`,color:`var(--accent)`},children:[`~`,a(e.estimated_savings)]}),(0,s.jsx)(`td`,{style:{...g,textAlign:`right`,color:e.open_bugs>0?`var(--text-primary)`:`var(--text-faint)`},children:e.open_bugs}),(0,s.jsx)(`td`,{style:{...g,color:`var(--text-muted)`},children:e.last_activity?i(e.last_activity):`—`}),(0,s.jsx)(`td`,{style:g,children:!t&&e.exists&&(0,s.jsx)(`button`,{onClick:()=>f(e.root),className:`text-xs px-2 py-1 rounded-md transition-colors`,style:{background:`var(--bg-base)`,border:`1px solid var(--border)`,color:`var(--text-secondary)`},children:`Open`})})]},e.root)})})]})})}),(0,s.jsx)(`p`,{className:`text-xs mt-3`,style:{color:`var(--text-faint)`},children:`Aggregated across all registered OpenWolf projects. "Open" switches the daemon to that project.`})]})}export{l as ProjectsAggregate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./index-
|
|
1
|
+
import{a as e,r as t}from"./index-D2sNMefT.js";import{t as n}from"./utils-BqE_aDxV.js";e();var r=t(),i={healthy:`bg-emerald-500/20 text-emerald-400 border-emerald-500/30`,running:`bg-emerald-500/20 text-emerald-400 border-emerald-500/30`,success:`bg-emerald-500/20 text-emerald-400 border-emerald-500/30`,ok:`bg-emerald-500/20 text-emerald-400 border-emerald-500/30`,enabled:`bg-emerald-500/20 text-emerald-400 border-emerald-500/30`,warning:`bg-amber-500/20 text-amber-400 border-amber-500/30`,retrying:`bg-amber-500/20 text-amber-400 border-amber-500/30`,degraded:`bg-amber-500/20 text-amber-400 border-amber-500/30`,error:`bg-red-500/20 text-red-400 border-red-500/30`,failed:`bg-red-500/20 text-red-400 border-red-500/30`,stopped:`bg-red-500/20 text-red-400 border-red-500/30`,disabled:`bg-zinc-500/20 text-zinc-400 border-zinc-500/30`,unknown:`bg-zinc-500/20 text-zinc-400 border-zinc-500/30`,initialized:`bg-blue-500/20 text-blue-400 border-blue-500/30`};function a({status:e,className:t}){return(0,r.jsxs)(`span`,{className:n(`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border`,i[e.toLowerCase()]||i.unknown,t),children:[e===`running`||e===`healthy`?(0,r.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-emerald-400 mr-1.5 pulse-green`}):null,e.charAt(0).toUpperCase()+e.slice(1)]})}export{a as t};
|