@nomoreide/cli-linux-arm64 0.3.0 → 0.3.2
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/bin/nomoreide +0 -0
- package/package.json +1 -1
- package/share/nomoreide/build-info.txt +2 -2
- package/share/nomoreide/web/client/assets/{code-editor-Cqq76LC_.js → code-editor-DTDSwDcE.js} +1 -1
- package/share/nomoreide/web/client/assets/{context-graph-DUCyWlak.js → context-graph-Sc3zvT_u.js} +1 -1
- package/share/nomoreide/web/client/assets/{index-BpCXYcED.js → index-DLbovJIj.js} +40 -40
- package/share/nomoreide/web/client/assets/{system-process-table-BWJjrSZy.js → system-process-table-EwnvWPb8.js} +1 -1
- package/share/nomoreide/web/client/index.html +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as H,n as R,r as o,j as e,a as U,S as _,I as $,A as p,m as P,f as E,k,E as G,d as L,C as O,h as Q,t as V}from"./index-
|
|
1
|
+
import{u as H,n as R,r as o,j as e,a as U,S as _,I as $,A as p,m as P,f as E,k,E as G,d as L,C as O,h as Q,t as V}from"./index-DLbovJIj.js";const h=50;function W({processes:r,refresh:n,totalMemoryBytes:m}){const i=H(),{error:M,success:I}=R(),[x,z]=o.useState(""),[a,A]=o.useState("cpu"),[l,b]=o.useState("desc"),[c,g]=o.useState(null),[F,j]=o.useState(!1),[D,N]=o.useState(h),S=o.useMemo(()=>{const t=x.trim().toLocaleLowerCase();return r.filter(s=>t?[String(s.pid),s.user,s.command,s.managedService??""].some(d=>d.toLocaleLowerCase().includes(t)):!0).sort((s,d)=>{const w=a==="name"?u(s).localeCompare(u(d)):a==="energy"?T(s,m)-T(d,m):a==="memory"?s.rssMb-d.rssMb:s.cpuPercent-d.cpuPercent;return l==="asc"?w:-w})},[r,x,a,l,m]),v=S.slice(0,D),C=Math.max(0,S.length-v.length);o.useEffect(()=>{N(h)},[x]);const y=t=>{if(t===a){b(s=>s==="asc"?"desc":"asc");return}A(t),b(t==="name"?"asc":"desc")},q=async()=>{if(c){j(!0);try{await V(c.pid,c.command),I(i("activity.system.terminated",{pid:String(c.pid)})),g(null),await n()}catch(t){M(i("activity.system.terminateError",{error:t instanceof Error?t.message:String(t)}))}finally{j(!1)}}};return e.jsxs("section",{"aria-labelledby":"activity-system-heading",children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",id:"activity-system-heading",children:[e.jsx(U,{"aria-hidden":"true",className:"size-3.5"}),i("activity.system.title")]}),e.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground",children:i("activity.system.description",{count:String(r.length)})})]}),e.jsx("div",{className:"flex flex-1 flex-wrap items-center justify-end gap-2",children:e.jsxs("label",{className:"relative min-w-44 max-w-64 flex-1 sm:flex-none",htmlFor:"activity-process-search",children:[e.jsx("span",{className:"sr-only",children:i("activity.system.search")}),e.jsx(_,{"aria-hidden":"true",className:"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),e.jsx($,{className:"h-7 pl-7 text-[11px]",id:"activity-process-search",onChange:t=>z(t.target.value),placeholder:i("activity.system.search"),value:x})]})})]}),e.jsxs("div",{className:"overflow-x-auto border-y border-border/70",children:[e.jsxs("table",{className:"w-full min-w-[840px] text-left text-xs",children:[e.jsx("thead",{className:"border-b border-border/60 text-[9px] uppercase tracking-[0.14em] text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx(p,{active:a==="name",ariaLabel:i("activity.sortColumn",{column:i("activity.system.process")}),direction:l,onClick:()=>y("name"),children:i("activity.system.process")}),e.jsx("th",{className:"px-2 py-2 font-semibold",children:i("activity.system.owner")}),e.jsx(p,{active:a==="cpu",align:"right",ariaLabel:i("activity.sortColumn",{column:"CPU"}),direction:l,onClick:()=>y("cpu"),children:"CPU"}),e.jsx(p,{active:a==="memory",align:"right",ariaLabel:i("activity.sortColumn",{column:i("activity.memory")}),direction:l,onClick:()=>y("memory"),children:i("activity.memory")}),e.jsx(p,{active:a==="energy",align:"right",ariaLabel:i("activity.sortColumn",{column:i("activity.energy.title")}),direction:l,onClick:()=>y("energy"),children:i("activity.energy.title")}),e.jsx("th",{className:"px-2 py-2 font-semibold",children:i("activity.system.source")}),e.jsx("th",{className:"w-12 px-2 py-2"})]})}),e.jsx("tbody",{children:v.map(t=>e.jsxs("tr",{className:"border-b border-border/50 transition-colors hover:bg-muted/20 last:border-b-0",children:[e.jsxs("td",{className:"max-w-[420px] px-2 py-2",children:[e.jsx("div",{className:"truncate font-medium",title:t.command,children:u(t)}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-[9px] text-muted-foreground",title:t.command,children:t.command})]}),e.jsxs("td",{className:"px-2 py-2 font-mono text-[10px] text-muted-foreground",children:[t.user," · ",t.pid]}),e.jsxs("td",{className:E("px-2 py-2 text-right font-mono font-semibold tabular-nums",k(t.cpuPercent)),"data-pressure":P(t.cpuPercent),children:[t.cpuPercent.toFixed(1),"%"]}),e.jsx("td",{className:E("px-2 py-2 text-right font-mono font-semibold tabular-nums",k(f(t.rssMb,m))),"data-pressure":P(f(t.rssMb,m)),children:Z(t.rssMb)}),e.jsx("td",{className:"px-2 py-2 text-right",children:e.jsx(G,{cpuPercent:t.cpuPercent,memoryPercent:f(t.rssMb,m)})}),e.jsx("td",{className:"px-2 py-2 text-[10px] text-muted-foreground",children:t.managedService?i("activity.system.managed",{service:t.managedService}):i("activity.system.external")}),e.jsx("td",{className:"px-2 py-2 text-right",children:e.jsx("button",{"aria-label":i("activity.system.terminateAria",{name:u(t),pid:String(t.pid)}),className:"inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-30",disabled:!t.canTerminate,onClick:()=>g(t),title:t.canTerminate?i("activity.system.terminate"):J(t,i),type:"button",children:e.jsx(L,{"aria-hidden":"true",className:"size-3"})})})]},t.pid))})]}),v.length===0?e.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:i("activity.system.empty")}):null,C>0?e.jsx("div",{className:"flex items-center justify-center border-t border-border/60 px-3 py-2",children:e.jsx("button",{className:"rounded px-2 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>N(t=>t+h),type:"button",children:i("activity.system.loadMore",{count:String(Math.min(h,C))})})}):null]}),c?e.jsx(O,{cancelLabel:i("common.cancel"),confirmLabel:i("activity.system.terminate"),icon:e.jsx(L,{}),loading:F,message:e.jsxs("span",{children:[i("activity.system.confirmMessage",{pid:String(c.pid)}),e.jsx("code",{className:"mt-2 block max-h-20 overflow-auto rounded border border-border bg-background p-2 font-mono text-[10px] text-foreground",children:c.command})]}),onCancel:()=>g(null),onConfirm:()=>{q()},title:i("activity.system.confirmTitle",{name:u(c)}),tone:"danger"}):null]})}function u(r){const n=r.command.trim().split(/\s+/,1)[0]??r.command;return n.split("/").at(-1)||n}function Z(r){return r>=1024?`${(r/1024).toFixed(1)} GB`:`${r.toFixed(1)} MB`}function f(r,n){return n<=0?null:r*1024*1024*100/n}function T(r,n){return Q(r.cpuPercent,f(r.rssMb,n)).score}function J(r,n){return r.protection==="managed"?n("activity.system.protectedManaged"):r.protection==="permission"?n("activity.system.protectedPermission"):r.protection==="this-app"?n("activity.system.protectedSelf"):n("activity.system.protectedSystem")}export{W as SystemProcessTable};
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
root.style.setProperty("--code-font-size", `${codeFontSize}px`);
|
|
36
36
|
})();
|
|
37
37
|
</script>
|
|
38
|
-
<script type="module" crossorigin src="/assets/index-
|
|
38
|
+
<script type="module" crossorigin src="/assets/index-DLbovJIj.js"></script>
|
|
39
39
|
<link rel="stylesheet" crossorigin href="/assets/index-CSo__8A6.css">
|
|
40
40
|
</head>
|
|
41
41
|
<body>
|