memory-eternal 0.17.0 → 0.18.1
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/.claude-plugin/plugin.json +27 -27
- package/.codex-plugin/plugin.json +24 -24
- package/.cursor-plugin/plugin.json +14 -14
- package/README.md +138 -138
- package/README.zh-CN.md +138 -138
- package/cursor-extension/package.json +54 -54
- package/dsh-tui-plugin/dsh-plugin.json +42 -42
- package/dsh-tui-plugin/package.json +51 -51
- package/index.js +70 -8
- package/lib/api.js +48 -6
- package/lib/capture.js +37 -2
- package/lib/client.js +34 -21
- package/lib/core-memory.js +45 -0
- package/lib/db.js +2 -0
- package/lib/setup.js +242 -33
- package/lib/vault.js +20 -0
- package/orca-plugin/orca-plugin.json +36 -36
- package/package.json +2 -2
- package/web/app.js +39 -26
package/lib/client.js
CHANGED
|
@@ -3,17 +3,17 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
|
-
var
|
|
7
|
-
`),
|
|
8
|
-
`)){let s=c.indexOf(":");if(s<=0)continue;let
|
|
9
|
-
`)).body;if(!a.trim())return"";let
|
|
10
|
-
`)){let
|
|
11
|
-
`)}var Ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJ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vCXhuljgbyAAAAAElFTkSuQmCC";function la(t,a,r=48){if(!a||!t)return"";let p=String(t),c=p.toLowerCase(),s=String(a).toLowerCase();if(!s)return"";let h=c.indexOf(s);if(h<0)return"";let v=Math.max(0,h-r),x=Math.min(p.length,h+s.length+r),A=p.slice(v,x).replace(/\s+/g," ").trim();return(v>0?"\u2026":"")+A+(x<p.length?"\u2026":"")}function da({hasVersion:t=!1,hostVersion:a="",onDisk:r="",residentServed:p="",residentPresent:c=!1,residentManaged:s=null,residentManagedKnown:h=null,residentManagedBy:v="",replaceBlocked:x=null}={}){let A=String(r||""),C=String(a||""),w=String(p||""),u=!!(t&&c&&!w),N=!!(A&&w&&w!==A),M=s===!1&&h===!1,O=v==="host",k=s===!1&&!M&&!O,H=!!(C&&A&&C!==A),I=!!(x&&x.fresh),ce=N||u||k||M,Y=null;H?Y="hostProcessStale":u?Y="residentDown":I?Y="residentReplaceBlocked":M?Y="residentLockUnknown":k&&(Y="residentUnmanaged");let ee;return u?ee="restartStart":N?ee="restartFixes":k||M?ee="restartRepair":H?ee="restartHostOnly":ee="restartAnyway",{showButton:!!t,emphasis:ce,warn:Y,hint:ee,hostStale:H,residentDown:u,residentStale:N,residentUnmanaged:k,residentLockUnknown:M,residentHostManaged:O,needsRestart:ce}}function ca(t={}){let a=t.repo||"EternalNight996/memory-eternal",r=String(t.title||"[Bug] ").slice(0,120),p=Array.isArray(t.labels)?t.labels:["bug"],c=Number(t.maxLength)>500?Number(t.maxLength):7e3,s=x=>{let A=new URLSearchParams;return A.set("title",r),A.set("body",x),p.length&&A.set("labels",p.join(",")),"https://github.com/"+a+"/issues/new?"+A.toString()},h=String(t.body||""),v=s(h);if(v.length>c){let x=`
|
|
12
|
-
|
|
13
|
-
> \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,
|
|
14
|
-
`)}var
|
|
15
|
-
`),
|
|
16
|
-
`);function ma(t={}){let a=t.lang==="en"?"en":"zh",r=a==="en"?Ga:Ua,p=t.repo||"EternalNight996/memory-eternal";return r=r.split(Jt).join("https://github.com/"+p),t.description&&(r=r.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(r=r.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),r}function ua({panX:t=0,panY:a=0,zoom:r=1,w:p=0,h:c=0,margin:s=60}={}){let h=r||1;return{x0:(0-t)/h-s,y0:(0-a)/h-s,x1:(p-t)/h+s,y1:(c-a)/h+s}}function Gt(t,a,r,p){return p?t+r>=p.x0&&t-r<=p.x1&&a+r>=p.y0&&a-r<=p.y1:!0}function ga(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function fa(t,a={}){let r=Number.isFinite(a.limit)?a.limit:1/0,p=new Set,c=x=>{x&&p.size<r&&p.add(x)};if(c(a.focusId),c(a.hoverId),a.searchHits)for(let x of a.searchHits){if(p.size>=r)break;p.add(x)}let s=a.degree||{},h=x=>Number(s[x])||0,v=[];for(let x of Array.isArray(t)?t:[])x&&x.id&&!p.has(x.id)&&v.push(x);v.sort((x,A)=>h(A.id)-h(x.id));for(let x of v){if(p.size>=r)break;p.add(x.id)}return p}function ba(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function Ka(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function ha(t,a){let r={...t||{}},p={};for(let[c,s]of Object.entries(a||{}))Ka(t?t[c]:void 0,s)||(r[c]=s,p[c]=s);return{values:r,overlay:p}}var e=require("react/jsx-runtime"),It="memory-eternal",$="/memory-eternal/api";async function ea(t){try{let a=await fetch(`${$}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),r=await a.json().catch(()=>null);if(a.ok&&r&&r.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var qa=100,Ya=["slots","locale"],xa={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",loadingGraph:"\u6B63\u5728\u52A0\u8F7D\u77E5\u8BC6\u661F\u56FE\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",cardsTab:"\u77E5\u8BC6\u5361",webTab:"Web \u7248",webOpening:"\u6B63\u5728\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248\u2026",webOpened:"\u5DF2\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248",webOpenFail:"\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\uFF0C\u53EF\u624B\u52A8\u8BBF\u95EE",terminalTab:"\u7EC8\u7AEF\u7248",terminalTitle:"\u7EC8\u7AEF\u5B8C\u6574\u7248",terminalIntro:"Web UI \u4E0D\u6E32\u67D3\u7EC8\u7AEF\u539F\u751F TUI\u3002\u8981\u5B8C\u6574\u6279\u5361\u3001\u957F\u6587\u6EDA\u52A8\u548C\u5168\u9009\uFF0C\u8BF7\u6253\u5F00\u672C\u673A\u7EC8\u7AEF\uFF1B\u6216\u8005\u76F4\u63A5\u5728 dsh-tui \u91CC\u7528 /audit\u3002",terminalRun:"\u53EA\u8BFB\u4F53\u9A8C\uFF08\u771F\u5B9E\u961F\u5217\uFF09",terminalTui:"\u5199\u5165\u6A21\u5F0F\uFF08\u771F\u5B9E\u6279\u9A73\uFF09",terminalWhy:"\u4E3A\u4EC0\u4E48\u4E0D\u76F4\u63A5\u5D4C\u8FDB\u7F51\u9875",terminalWhyBody:"\u7EC8\u7AEF TUI \u4F9D\u8D56 alternate screen\u3001\u539F\u59CB\u952E\u76D8\u4E8B\u4EF6\u548C\u5B57\u7B26\u7F51\u683C\uFF0C\u65E0\u6CD5\u7528 iframe \u5FE0\u5B9E\u5D4C\u5165\u3002\u8FD9\u91CC\u7ED9\u51FA\u771F\u5B9E\u547D\u4EE4\uFF0C\u6253\u5F00\u540E\u5C31\u662F\u540C\u4E00\u5957\u754C\u9762\u3002",terminalCopy:"\u590D\u5236\u547D\u4EE4",terminalCopied:"\u5DF2\u590D\u5236",terminalPreview:"\u7EC8\u7AEF\u9884\u89C8",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",graphWarming:"\u6B63\u5728\u5E03\u5C40 {n} \u4E2A\u8282\u70B9\u2026",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
6
|
+
var Ba=Object.create;var Gt=Object.defineProperty;var ja=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var Fa=Object.getPrototypeOf,Ha=Object.prototype.hasOwnProperty;var Ea=(t,a)=>{for(var i in a)Gt(t,i,{get:a[i],enumerable:!0})},ca=(t,a,i,u)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of Pa(a))!Ha.call(t,c)&&c!==i&&Gt(t,c,{get:()=>a[c],enumerable:!(u=ja(a,c))||u.enumerable});return t};var Oa=(t,a,i)=>(i=t!=null?Ba(Fa(t)):{},ca(a||!t||!t.__esModule?Gt(i,"default",{value:t,enumerable:!0}):i,t)),Wa=t=>ca(Gt({},"__esModule",{value:!0}),t);var Ln={};Ea(Ln,{EN:()=>Ma,MemoryLibrary:()=>gn,ZH:()=>Na,apply:()=>nn,inject:()=>en});module.exports=Wa(Ln);var n=Oa(require("react"),1),Ca=require("react-dom");var _a={"&":"&","<":"<",">":">"},Xt=t=>String(t).replace(/[&<>]/g,a=>_a[a]),$a=[[/结论|总结|tl;?dr|summary|takeaway/i,"\u2705","ok"],[/风险|注意|警告|禁止|坑|踩坑|务必/i,"\u26A0\uFE0F","warn"],[/根因|原因|为什么|定位|复现/i,"\u{1F50D}","info"],[/修复|解决|变更|fix/i,"\u{1F527}","ok"],[/验证|测试|实测|回归/i,"\u{1F9EA}","ok"],[/方案|做法|实现|设计|思路|架构/i,"\u{1F6E0}\uFE0F","plan"],[/步骤|流程|操作|用法|命令/i,"\u{1F9E9}","plan"],[/背景|由来|context/i,"\u{1F9ED}","info"],[/目标|需求|要解决/i,"\u{1F3AF}","plan"],[/环境|依赖|前置|安装/i,"\u{1F4E6}","info"],[/收益|效果|性能|指标|数据|统计/i,"\u{1F4C8}","ok"],[/示例|例子|样例|demo/i,"\u{1F4A1}","idea"],[/参考|链接|相关/i,"\u{1F517}","info"]],Ua=["\u2728","info"],Ga=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],Ka=t=>{let a=String(t);for(let[i,u,c]of $a)if(i.test(a))return[u,c];return Ua},Va=t=>{let a=t.join(" ");for(let[i,u,c]of Ga)if(i.test(a))return[u,c];return["\u{1F4CC}","info"]};function Bt(t){let a=String(t),i=/^([^::\s]{1,8})[::]\s*(.+)$/.exec(a);if(i&&!/[是为有了吗呢着过把被和与或于]/.test(i[1]))return'<span class="md-kv"><span class="md-k">'+Xt(i[1])+'</span><span class="md-v">'+Bt(i[2])+"</span></span>";let u=Xt(a);return u=u.replace(/^\[([ xX])\](?=\s|$)\s*/,(c,s)=>'<span class="md-task">'+(s.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),u=u.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),u=u.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),u=u.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),u=u.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(c,s,v)=>/^(https?:|\/|#)/i.test(v)?'<a class="md-link" href="'+v+'" target="_blank" rel="noopener noreferrer">'+s+"</a>":s),u}function Kt(t){let a=String(t||"").replace(/\r\n?/g,`
|
|
7
|
+
`),i=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!i)return{meta:[],body:a};let u=[];for(let c of i[1].split(`
|
|
8
|
+
`)){let s=c.indexOf(":");if(s<=0)continue;let v=c.slice(0,s).trim(),k=c.slice(s+1).trim().replace(/^["']|["']$/g,"");v&&u.push([v,k])}return{meta:u,body:a.slice(i[0].length)}}function pa(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function Zt(t){let a=Kt(String(t||"").replace(/\r\n?/g,`
|
|
9
|
+
`)).body;if(!a.trim())return"";let i=[],u=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(T,B,E)=>(i.push('<pre class="md-pre"><code>'+Xt(E.replace(/\n$/,""))+"</code></pre>"),"\0F"+(i.length-1)+"\0")),c=[],s=0,v=[],k=null,y=null,F=()=>{v.length&&(c.push('<p class="md-p">'+v.join("<br/>")+"</p>"),v=[])},N=()=>{if(!k)return;let T=k.type;c.push("<"+T+' class="md-'+T+'">'+k.items.map(B=>"<li>"+B+"</li>").join("")+"</"+T+">"),k=null},S=()=>{if(!y)return;let[T,B]=Va(y);c.push('<div class="md-callout md-c-'+B+'"><span class="md-ico">'+T+"</span>"+y.join("<br/>")+"</div>"),y=null},h=()=>{F(),N(),S()};for(let T of u.split(`
|
|
10
|
+
`)){let B=T.trim();if(!B){h();continue}let E=/^\u0000F(\d+)\u0000$/.exec(B);if(E){h(),c.push(i[Number(E[1])]);continue}let z;if(z=/^(#{1,6})\s+(.+)$/.exec(B)){h();let[A,R]=Ka(z[2]);s++,c.push('<div id="md-h-'+s+'" class="md-h md-h-'+(z[1].length<=2?"h1":"h2")+" md-c-"+R+'"><span class="md-ico">'+A+'</span><span class="md-hx">'+Bt(z[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(B)){h(),c.push('<hr class="md-hr"/>');continue}if(z=/^>\s?(.*)$/.exec(B)){F(),N(),y=y||[],y.push(Bt(z[1]));continue}if(z=/^[-*+]\s+(.+)$/.exec(B)){F(),S(),(!k||k.type!=="ul")&&(N(),k={type:"ul",items:[]}),k.items.push(Bt(z[1]));continue}if(z=/^\d+[.)]\s+(.+)$/.exec(B)){F(),S(),(!k||k.type!=="ol")&&(N(),k={type:"ol",items:[]}),k.items.push(Bt(z[1]));continue}N(),S(),v.push(Bt(B))}return h(),c.join(`
|
|
11
|
+
`)}var Vt="data:image/png;base64,iVBORw0KGgoAAA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SWQR+LI7wAGCI7k4XWKsCvV/Ugf0leq+8kjPcgrgAECq6gpY1Wq+5E+pK9U95NHepBXAAMHbDD8qUxCapVMY/izqCRZHgkirwAGEEJsLh8IfeSRPuQVwABCe2HBKmLsTVX70rb0kar280g/8gpgAGHOnLW7lMLqVLUvbUsfqWo/j/QjrwAGEhaCnVC1qbADSJvStvSR7LbzyBzy0YADCOIM06j5RafCDxOsenQAFAEhzS/mHW4GFvIKYIBhb8HIlc7QtskcUklVAeTSFCoY+U4y28wjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgDtvD/AXvCXhuljgbyAAAAAElFTkSuQmCC";function ma(t,a,i=48){if(!a||!t)return"";let u=String(t),c=u.toLowerCase(),s=String(a).toLowerCase();if(!s)return"";let v=c.indexOf(s);if(v<0)return"";let k=Math.max(0,v-i),y=Math.min(u.length,v+s.length+i),F=u.slice(k,y).replace(/\s+/g," ").trim();return(k>0?"\u2026":"")+F+(y<u.length?"\u2026":"")}function ua({hasVersion:t=!1,hostVersion:a="",onDisk:i="",residentServed:u="",residentPresent:c=!1,residentManaged:s=null,residentManagedKnown:v=null,residentManagedBy:k="",replaceBlocked:y=null}={}){let F=String(i||""),N=String(a||""),S=String(u||""),h=!!(t&&c&&!S),T=!!(F&&S&&S!==F),B=s===!1&&v===!1,E=k==="host",z=s===!1&&!B&&!E,A=!!(N&&F&&N!==F),R=!!(y&&y.fresh),se=T||h||z||B,oe=null;A?oe="hostProcessStale":h?oe="residentDown":R?oe="residentReplaceBlocked":B?oe="residentLockUnknown":z&&(oe="residentUnmanaged");let K;return h?K="restartStart":T?K="restartFixes":z||B?K="restartRepair":A?K="restartHostOnly":K="restartAnyway",{showButton:!!t,emphasis:se,warn:oe,hint:K,hostStale:A,residentDown:h,residentStale:T,residentUnmanaged:z,residentLockUnknown:B,residentHostManaged:E,needsRestart:se}}function ga(t={}){let a=t.repo||"EternalNight996/memory-eternal",i=String(t.title||"[Bug] ").slice(0,120),u=Array.isArray(t.labels)?t.labels:["bug"],c=Number(t.maxLength)>500?Number(t.maxLength):7e3,s=y=>{let F=new URLSearchParams;return F.set("title",i),F.set("body",y),u.length&&F.set("labels",u.join(",")),"https://github.com/"+a+"/issues/new?"+F.toString()},v=String(t.body||""),k=s(v);if(k.length>c){let y=`
|
|
12
|
+
|
|
13
|
+
> \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,F=N=>s(v.slice(0,N)+y);if(F(0).length>c)v=y;else{let N=0,S=v.length;for(;N<S;){let h=Math.ceil((N+S)/2);F(h).length<=c?N=h:S=h-1}v=v.slice(0,N)+y}k=s(v)}return k}function fa(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
|
|
14
|
+
`)}var Qt="https://github.com/EternalNight996/memory-eternal",Ya=["\u6211\u5728\u4F7F\u7528 memory-eternal\uFF08DeepSeek Harness \u7684\u8BB0\u5FC6\u63D2\u4EF6\uFF09\u65F6\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u4F60\u5E2E\u6211\u628A\u8FD9\u4E2A\u95EE\u9898\u63D0\u4EA4\u5230 GitHub\u3002","","\u4ED3\u5E93\uFF1A"+Qt,"","\u8BF7\u6309\u8FD9\u4E2A\u6D41\u7A0B\u505A\uFF1A","","1. \u5148\u8DD1 `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50`\uFF0C\u770B\u662F\u5426\u5DF2\u6709\u76F8\u540C\u95EE\u9898\uFF1A"," - \u5DF2\u6709 \u2192 \u7528 `gh issue comment <\u7F16\u53F7> --body-file <\u6587\u4EF6>` \u8865\u5145\u73B0\u8C61\uFF0C\u4E0D\u8981\u91CD\u590D\u5F00\u65B0 issue\uFF1B"," - \u6CA1\u6709 \u2192 \u7EE7\u7EED\u7B2C 2 \u6B65\u3002",'2. \u628A\u6B63\u6587\u5199\u6210\u6587\u4EF6\uFF0C\u7136\u540E `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <\u4E00\u53E5\u8BDD\u6982\u62EC>" --body-file <\u6587\u4EF6>`\uFF1B\u6B63\u6587\u7528\u8FD9\u4E2A\u7ED3\u6784\uFF1A'," \u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A / \u5B9E\u9645\u884C\u4E3A / \u73AF\u5883\uFF08\u63D2\u4EF6\u7248\u672C / DSH \u7248\u672C / \u64CD\u4F5C\u7CFB\u7EDF / Node\uFF09/ \u8BCA\u65AD\u4FE1\u606F\u3002","3. \u5982\u679C `gh` \u6CA1\u767B\u5F55\u6216\u4E0D\u53EF\u7528\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u6539\u4E3A\u8F93\u51FA\u4E00\u6761\u300C\u6807\u9898\u4E0E\u6B63\u6587\u90FD\u5DF2\u9884\u586B\u300D\u7684 GitHub \u65B0\u5EFA issue \u94FE\u63A5\u7ED9\u6211\uFF0C\u6211\u81EA\u5DF1\u70B9\u63D0\u4EA4\u3002","4. \u63D0\u4EA4\u6210\u529F\u540E\uFF0C\u628A issue \u94FE\u63A5\u53D1\u7ED9\u6211\u3002","","\u6CE8\u610F\uFF1A\u6211\u7684\u95EE\u9898\u63CF\u8FF0\u8BF7\u539F\u6837\u7167\u5F55\uFF0C\u4E0D\u8981\u66FF\u6211\u7F8E\u5316\u6216\u7701\u7565\u7EC6\u8282\uFF1B\u8BCA\u65AD\u4FE1\u606F\u539F\u6837\u653E\u8FDB\u300C\u8BCA\u65AD\u4FE1\u606F\u300D\u4E00\u8282\u3002","","\u6211\u7684\u95EE\u9898\u63CF\u8FF0\uFF1A","<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>","","\u8BCA\u65AD\u4FE1\u606F\uFF1A","<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>"].join(`
|
|
15
|
+
`),Ja=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+Qt,"","Workflow:","","1. Run `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50` first: if a matching issue exists, add a comment with `gh issue comment <n> --body-file <file>` instead of opening a duplicate.",'2. Otherwise create it with `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <one-line summary>" --body-file <file>`, using sections: Symptoms / Steps to reproduce / Expected / Actual / Environment (plugin, DSH, OS, Node) / Diagnostics.',"3. If `gh` is not authenticated or unavailable, do NOT try to submit: output a GitHub new-issue link with the title and body pre-filled instead, and I will click submit myself.","4. Report the resulting issue URL back to me.","","Keep my description verbatim - do not rewrite or summarise it. Put the diagnostics under the Diagnostics section as-is.","","My description:","<write your problem here>","","Diagnostics:","<paste the diagnostics copied from the in-app Report-a-bug dialog>"].join(`
|
|
16
|
+
`);function ba(t={}){let a=t.lang==="en"?"en":"zh",i=a==="en"?Ja:Ya,u=t.repo||"EternalNight996/memory-eternal";return i=i.split(Qt).join("https://github.com/"+u),t.description&&(i=i.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(i=i.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),i}function ha({panX:t=0,panY:a=0,zoom:i=1,w:u=0,h:c=0,margin:s=60}={}){let v=i||1;return{x0:(0-t)/v-s,y0:(0-a)/v-s,x1:(u-t)/v+s,y1:(c-a)/v+s}}function qt(t,a,i,u){return u?t+i>=u.x0&&t-i<=u.x1&&a+i>=u.y0&&a-i<=u.y1:!0}function ya(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function va(t,a={}){let i=Number.isFinite(a.limit)?a.limit:1/0,u=new Set,c=y=>{y&&u.size<i&&u.add(y)};if(c(a.focusId),c(a.hoverId),a.searchHits)for(let y of a.searchHits){if(u.size>=i)break;u.add(y)}let s=a.degree||{},v=y=>Number(s[y])||0,k=[];for(let y of Array.isArray(t)?t:[])y&&y.id&&!u.has(y.id)&&k.push(y);k.sort((y,F)=>v(F.id)-v(y.id));for(let y of k){if(u.size>=i)break;u.add(y.id)}return u}function xa(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function Xa(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function wa(t,a){let i={...t||{}},u={};for(let[c,s]of Object.entries(a||{}))Xa(t?t[c]:void 0,s)||(i[c]=s,u[c]=s);return{values:i,overlay:u}}var e=require("react/jsx-runtime"),jt="memory-eternal",_="/memory-eternal/api";async function na(t){try{let a=await fetch(`${_}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),i=await a.json().catch(()=>null);if(a.ok&&i&&i.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var Qa=100,en=["slots","locale"],Na={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",loadingGraph:"\u6B63\u5728\u52A0\u8F7D\u77E5\u8BC6\u661F\u56FE\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",kindCore:"\u6838\u5FC3\u8BB0\u5FC6",cardsTab:"\u77E5\u8BC6\u5361",webTab:"Web \u7248",webOpening:"\u6B63\u5728\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248\u2026",webOpened:"\u5DF2\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248",webOpenFail:"\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\uFF0C\u53EF\u624B\u52A8\u8BBF\u95EE",terminalTab:"\u7EC8\u7AEF\u7248",terminalTitle:"\u7EC8\u7AEF\u5B8C\u6574\u7248",terminalIntro:"Web UI \u4E0D\u6E32\u67D3\u7EC8\u7AEF\u539F\u751F TUI\u3002\u8981\u5B8C\u6574\u6279\u5361\u3001\u957F\u6587\u6EDA\u52A8\u548C\u5168\u9009\uFF0C\u8BF7\u6253\u5F00\u672C\u673A\u7EC8\u7AEF\uFF1B\u6216\u8005\u76F4\u63A5\u5728 dsh-tui \u91CC\u7528 /audit\u3002",terminalRun:"\u53EA\u8BFB\u4F53\u9A8C\uFF08\u771F\u5B9E\u961F\u5217\uFF09",terminalTui:"\u5199\u5165\u6A21\u5F0F\uFF08\u771F\u5B9E\u6279\u9A73\uFF09",terminalWhy:"\u4E3A\u4EC0\u4E48\u4E0D\u76F4\u63A5\u5D4C\u8FDB\u7F51\u9875",terminalWhyBody:"\u7EC8\u7AEF TUI \u4F9D\u8D56 alternate screen\u3001\u539F\u59CB\u952E\u76D8\u4E8B\u4EF6\u548C\u5B57\u7B26\u7F51\u683C\uFF0C\u65E0\u6CD5\u7528 iframe \u5FE0\u5B9E\u5D4C\u5165\u3002\u8FD9\u91CC\u7ED9\u51FA\u771F\u5B9E\u547D\u4EE4\uFF0C\u6253\u5F00\u540E\u5C31\u662F\u540C\u4E00\u5957\u754C\u9762\u3002",terminalCopy:"\u590D\u5236\u547D\u4EE4",terminalCopied:"\u5DF2\u590D\u5236",terminalPreview:"\u7EC8\u7AEF\u9884\u89C8",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",graphWarming:"\u6B63\u5728\u5E03\u5C40 {n} \u4E2A\u8282\u70B9\u2026",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",mcpNeedsRepair:"\u26A0 \u9700\u4FEE\u590D\uFF08\u65E7\u914D\u7F6E\u4F1A\u62C9\u8D77 GUI\uFF09",repairMcp:"\u4FEE\u590D\u914D\u7F6E",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",approveAndCore:"\u6279\u51C6\u5E76\u8BBE\u4E3A\u6838\u5FC3",approveCore:"\u6279\u51C6\u4E3A\u6838\u5FC3\u8BB0\u5FC6",approveAsNormal:"\u6279\u51C6\u4E3A\u666E\u901A\u5361",coreSuggested:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u5F85\u5BA1\u6838\uFF09",reclassify:"\u91CD\u65B0\u8BC6\u522B\u7C7B\u578B",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",coreMemory:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u524D\u7F6E\u5F3A\u5236\uFF09",coreMemoryHint:"\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6CE8\u5165\uFF0C\u4E0D\u4F9D\u8D56\u6A21\u578B\u4E3B\u52A8\u53EC\u56DE\uFF1B\u53EA\u8BFB\u53D6\u5DF2\u6279\u51C6\u7684\u6838\u5FC3\u5361",coreMemoryEnabled:"\u542F\u7528\u6838\u5FC3\u8BB0\u5FC6\u6CE8\u5165",coreMemoryLimit:"\u6838\u5FC3\u8BB0\u5FC6\u4E0A\u9650\uFF08\u5F20\uFF09",coreMemoryMaxChars:"\u6838\u5FC3\u8BB0\u5FC6\u603B\u5B57\u7B26\u4E0A\u9650",setCore:"\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",unsetCore:"\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetOk:"\u5DF2\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",coreUnsetOk:"\u5DF2\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetFail:"\u8BBE\u7F6E\u5931\u8D25",coreActiveHint:"\u8FD9\u5F20\u5361\u6BCF\u6B21\u4F1A\u8BDD\u90FD\u4F1A\u5F3A\u5236\u6CE8\u5165\uFF1B\u4E0E\u666E\u901A\u8BB0\u5FC6\u51B2\u7A81\u65F6\u4EE5\u5B83\u4E3A\u51C6\u3002",coreInactiveHint:"\u666E\u901A\u77E5\u8BC6\u5361\u53EF\u4EE5\u63D0\u5347\u4E3A\u6838\u5FC3\u8BB0\u5FC6\uFF1B\u63D0\u5347\u540E\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u751F\u6548\u3002",coreNeedApproval:"\u5148\u6279\u51C6\u8FD9\u5F20\u5361\uFF0C\u624D\u80FD\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6\u3002",coreShort:"\u6838\u5FC3",setCoreShort:"\u8BBE\u6838\u5FC3",uiLayout:"\u5E03\u5C40\u5927\u5C0F",uiLayoutHint:"\u8C03\u6574\u8BB0\u5FC6\u754C\u9762\u6574\u4F53\u5927\u5C0F\uFF08\u53EA\u5F71\u54CD\u663E\u793A\uFF0C\u4E0D\u5F71\u54CD\u8BB0\u5FC6\u6570\u636E\uFF09",uiCompact:"\u7D27\u51D1",uiNormal:"\u6807\u51C6",uiLarge:"\u5927",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
17
17
|
|
|
18
18
|
## \u80CC\u666F
|
|
19
19
|
- \u95EE\u9898\u63CF\u8FF0
|
|
@@ -58,7 +58,7 @@ var Da=Object.create;var _t=Object.defineProperty;var za=Object.getOwnPropertyDe
|
|
|
58
58
|
-
|
|
59
59
|
|
|
60
60
|
## \u98CE\u9669/\u963B\u585E
|
|
61
|
-
- `},wa={nav:"Memory",loading:"Loading\u2026",loadingGraph:"Loading knowledge graph\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",cardsTab:"Cards",webTab:"Web version",webOpening:"Opening the web version in your browser\u2026",webOpened:"Opened the web version in your browser",webOpenFail:"Could not open a browser; visit this URL manually",terminalTab:"Terminal",terminalTitle:"Full terminal UI",terminalIntro:"The Web UI does not render the native terminal TUI. For select-all, batch review and long-form scrolling, open a local terminal or use /audit inside dsh-tui.",terminalRun:"Read-only live queue",terminalTui:"Write mode (real review)",terminalWhy:"Why not embed it in the page",terminalWhyBody:"The terminal TUI relies on the alternate screen, raw key events and a character grid; an iframe cannot reproduce it faithfully. These are the real commands.",terminalCopy:"Copy command",terminalCopied:"Copied",terminalPreview:"Terminal preview",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",graphWarming:"Laying out {n} nodes\u2026",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
|
|
61
|
+
- `},Ma={nav:"Memory",loading:"Loading\u2026",loadingGraph:"Loading knowledge graph\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",kindCore:"Core memory",cardsTab:"Cards",webTab:"Web version",webOpening:"Opening the web version in your browser\u2026",webOpened:"Opened the web version in your browser",webOpenFail:"Could not open a browser; visit this URL manually",terminalTab:"Terminal",terminalTitle:"Full terminal UI",terminalIntro:"The Web UI does not render the native terminal TUI. For select-all, batch review and long-form scrolling, open a local terminal or use /audit inside dsh-tui.",terminalRun:"Read-only live queue",terminalTui:"Write mode (real review)",terminalWhy:"Why not embed it in the page",terminalWhyBody:"The terminal TUI relies on the alternate screen, raw key events and a character grid; an iframe cannot reproduce it faithfully. These are the real commands.",terminalCopy:"Copy command",terminalCopied:"Copied",terminalPreview:"Terminal preview",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",graphWarming:"Laying out {n} nodes\u2026",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",mcpNeedsRepair:"\u26A0 Needs repair (old config launches GUI)",repairMcp:"Repair",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",approveAndCore:"Approve as core",approveCore:"Approve as core memory",approveAsNormal:"Approve as normal card",coreSuggested:"Core memory (pending review)",reclassify:"Reclassify types",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",coreMemory:"Core memory (always-on)",coreMemoryHint:"Injected into every session; only approved core cards are used",coreMemoryEnabled:"Enable core-memory injection",coreMemoryLimit:"Core-memory limit (cards)",coreMemoryMaxChars:"Core-memory total character limit",setCore:"Set as core memory",unsetCore:"Remove from core memory",coreSetOk:"Set as core memory",coreUnsetOk:"Removed from core memory",coreSetFail:"Failed to update",coreActiveHint:"This card is injected into every session; it wins conflicts with normal memory.",coreInactiveHint:"Any approved knowledge card can be promoted to core memory and applies to every session.",coreNeedApproval:"Approve this card before making it core memory.",coreShort:"Core",setCoreShort:"Set core",uiLayout:"Layout size",uiLayoutHint:"Scale the memory UI only; memory data is unchanged",uiCompact:"Compact",uiNormal:"Normal",uiLarge:"Large",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
|
|
62
62
|
|
|
63
63
|
## Background
|
|
64
64
|
- Problem
|
|
@@ -103,7 +103,7 @@ Option A, because:
|
|
|
103
103
|
-
|
|
104
104
|
|
|
105
105
|
## Risks/blockers
|
|
106
|
-
- `},
|
|
106
|
+
- `},ra=["all","core","project","knowledge","content","prompt","business","tool","mistake"],Ke={core:"#FF7A45",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},ea=t=>Array.isArray(t&&t.tags)?t.tags:[],Mt={core:"\u2B50",project:"\u{1F4C1}",knowledge:"\u{1F4DA}",content:"\u{1F4DD}",prompt:"\u{1F4AC}",business:"\u{1F4BC}",tool:"\u{1F527}",mistake:"\u26A0\uFE0F",other:"\u{1F4CE}"},_e={core:"kindCore",project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindKnowledge"},Ot="deepseek-harness",Nt=t=>{let a=String(t||""),i=a.toLowerCase();return!a||a==="agent"||a==="unknown"||a.startsWith("session:")||i.startsWith("claude-code")?i.startsWith("claude-code")?"claude":Ot:i==="deepseek harness"?Ot:a.split(":")[0]||Ot},tn=[Ot,"claude","codex","cursor","codex-desktop"],Ta=(t=[])=>[...new Set([...tn,...(t||[]).map(Nt)])],an={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},Ve=`
|
|
107
107
|
.memory-eternal-root { font-family: inherit; color: var(--dsw-alias-label-primary, #1f2937); }
|
|
108
108
|
.mc-card { background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 14px 16px; }
|
|
109
109
|
.mc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
|
|
@@ -242,6 +242,7 @@ Option A, because:
|
|
|
242
242
|
.me-audit-preview-actions { flex: none; display: flex; gap: 7px; padding: 10px 14px; border-top: 1px solid rgba(127,127,127,.12); }
|
|
243
243
|
.me-audit-row-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
|
|
244
244
|
.me-audit-row { border-bottom: 1px solid rgba(127,127,127,.12); }
|
|
245
|
+
.me-audit-row.core { background: rgba(255,122,69,.08); border-left: 3px solid #ff7a45; }
|
|
245
246
|
.me-audit-row:last-child { border-bottom: 0; }
|
|
246
247
|
.me-audit-row:hover { background: rgba(127,127,127,.035); }
|
|
247
248
|
.me-audit-row.active { background: rgba(255,122,69,.055); box-shadow: inset 2px 0 0 #ff7a45; }
|
|
@@ -253,6 +254,7 @@ Option A, because:
|
|
|
253
254
|
.me-audit-row-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
254
255
|
.me-audit-row-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
|
|
255
256
|
.me-audit-row-kind { font-size: 10px; color: #b0b7c1; }
|
|
257
|
+
.me-audit-row-kind.core { color: #ff9a72; font-weight: 700; }
|
|
256
258
|
.me-audit-row-state { padding: 0 5px; border-radius: 4px; font-size: 9px; line-height: 15px; background: rgba(245,158,11,.1); color: #fbbf24; }
|
|
257
259
|
.me-audit-row-state.rejected { background: rgba(248,113,113,.1); color: #f87171; }
|
|
258
260
|
.me-audit-row-time { margin-left: auto; font-size: 9.5px; color: #99a1ac; white-space: nowrap; }
|
|
@@ -366,7 +368,7 @@ Option A, because:
|
|
|
366
368
|
.me-footer.rail .me-footer-label { display: none; }
|
|
367
369
|
|
|
368
370
|
/* ---- full library modal ---- */
|
|
369
|
-
.me-overlay-top { position: fixed; inset: 0; z-index:
|
|
371
|
+
.me-overlay-top { position: fixed; inset: 0; z-index: 2147483000; background: rgba(0,0,0,0.72); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 28px; }
|
|
370
372
|
.me-modal { width: min(1380px, 98vw); height: min(98vh, 1080px); display: flex; flex-direction: column; background: var(--dsw-alias-bg-layer-1, #1e232c); color: var(--dsw-alias-label-primary, #e5e7eb); border: 1px solid var(--dsw-alias-border-l1, #2c333c); border-radius: 18px; box-shadow: 0 34px 90px rgba(0,0,0,0.6); overflow: hidden; animation: me-pop 0.22s cubic-bezier(0.2,0.8,0.2,1); }
|
|
371
373
|
/* \u5F39\u7A97\u5FC5\u987B\u6C38\u8FDC\u88C5\u5F97\u8FDB\u906E\u7F69\u7684 28px\xD72 \u5185\u8FB9\u8DDD\u300298vh \u7684\u5F39\u7A97 + 56px \u5185\u8FB9\u8DDD\u5728\u591A\u6570\u7A97\u53E3\u9AD8\u5EA6\u4E0B\u4F1A\u6EA2\u51FA\uFF0C
|
|
372
374
|
flex \u5C45\u4E2D\u628A\u9876\u8FB9\u9876\u5230\u53EF\u89C6\u533A\u5916/\u9876\u8FDB\u684C\u9762\u58F3\u7684 caption \u2014\u2014 \u53F3\u4E0A\u89D2\u63A7\u5236\u6761\u538B\u5230\u539F\u751F\u7A97\u53E3\u6309\u94AE\u4E0A\uFF0C
|
|
@@ -418,7 +420,7 @@ Option A, because:
|
|
|
418
420
|
@media (max-width: 816px) { .me-wctl-btn { height: 50px; } }
|
|
419
421
|
@media (max-width: 776px) { .me-wctl-btn { width: 44px; height: 46px; } }
|
|
420
422
|
.me-modal-body { flex: 1; padding: 18px 20px; overflow: hidden; display: flex; }
|
|
421
|
-
.me-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.66); z-index:
|
|
423
|
+
.me-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.66); z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 24px; }
|
|
422
424
|
.me-dialog { background: var(--dsw-alias-bg-layer-1, #1e232c); color: var(--dsw-alias-label-primary, #e5e7eb); border-radius: 14px; max-width: 760px; width: 100%; max-height: 84vh; display: flex; flex-direction: column; box-sizing: border-box; box-shadow: 0 24px 60px rgba(0,0,0,0.5); border: 1px solid var(--dsw-alias-border-l1, #2c333c); }
|
|
423
425
|
.me-reader-dialog { max-width: 1180px; }
|
|
424
426
|
.me-reader-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
|
|
@@ -434,6 +436,7 @@ Option A, because:
|
|
|
434
436
|
.me-reader-toc { display: flex; flex-direction: column; gap: 2px; }
|
|
435
437
|
.me-reader-toc button { display: flex; gap: 7px; text-align: left; padding: 4px 5px; border: 0; background: transparent; border-radius: 5px; font-size: 10.5px; line-height: 1.5; color: var(--dsw-alias-label-secondary, #9aa3af); }
|
|
436
438
|
.me-reader-toc button:hover { background: rgba(127,127,127,.09); color: var(--dsw-alias-label-primary, #e9ecf1); }
|
|
439
|
+
.me-reader-toc button.active { background: rgba(255,122,69,.14); color: #ff9a72; font-weight: 650; }
|
|
437
440
|
.me-reader-toc button.lv2 { padding-left: 13px; }
|
|
438
441
|
.me-reader-toc button.lv3 { padding-left: 22px; }
|
|
439
442
|
.me-reader-toc button span { flex: none; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 8.5px; opacity: .45; padding-top: 1px; }
|
|
@@ -699,9 +702,19 @@ Option A, because:
|
|
|
699
702
|
.me-v5 .mc-v5-card-kind { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid; border-radius: 999px; font-size: 9.5px; line-height: 17px; white-space: nowrap; }
|
|
700
703
|
.me-v5 .mc-v5-card-tile { width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid; border-radius: 7px; font-size: 12px; flex: none; }
|
|
701
704
|
.me-v5 .mc-v5-card-kind-name { font-size: 9.5px; color: #b0b7c1; white-space: nowrap; }
|
|
705
|
+
.me-v5 .mc-v5-core-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border: 1px solid rgba(255,122,69,.55); border-radius: 999px; background: rgba(255,122,69,.16); color: #ff9a72; font-size: 9px; font-weight: 700; white-space: nowrap; }
|
|
702
706
|
.me-v5 .mc-v5-pin { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 9px; opacity: .35; flex: none; }
|
|
707
|
+
.me-v5 .mc-v5-core { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border: 1px solid rgba(255,122,69,.35); border-radius: 5px; background: rgba(255,122,69,.08); color: #ff9a72; font-size: 9.5px; font-weight: 650; cursor: pointer; flex: none; }
|
|
708
|
+
.me-v5 .mc-v5-core:hover { border-color: rgba(255,122,69,.65); background: rgba(255,122,69,.16); }
|
|
709
|
+
.me-v5 .mc-v5-core.on { border-color: rgba(255,122,69,.7); background: rgba(255,122,69,.2); color: #ffb08a; }
|
|
710
|
+
.me-core-banner { display: flex; align-items: center; gap: 10px; margin: 10px 18px 0; padding: 10px 12px; border: 1px solid rgba(255,122,69,.35); border-radius: 10px; background: rgba(255,122,69,.08); }
|
|
711
|
+
.me-core-banner.on { border-color: rgba(255,122,69,.65); background: rgba(255,122,69,.14); }
|
|
712
|
+
.me-core-banner-k { color: #ff9a72; font-weight: 700; white-space: nowrap; font-size: 12px; }
|
|
713
|
+
.me-core-banner-desc { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.6; opacity: .78; }
|
|
714
|
+
.me-core-btn { background: #ff7a45 !important; border-color: #ff7a45 !important; color: #1b120e !important; font-weight: 700; white-space: nowrap; }
|
|
703
715
|
.me-v5 .mc-v5-pin:hover, .me-v5 .mc-v5-pin.on { opacity: 1; background: rgba(255,122,69,.12); }
|
|
704
716
|
.me-v5 .mc-v5-card.pinned { border-color: rgba(255,122,69,.32); }
|
|
717
|
+
.me-v5 .mc-v5-card.core { border-color: rgba(255,122,69,.52); box-shadow: inset 0 0 0 1px rgba(255,122,69,.16); }
|
|
705
718
|
.me-v5 .mc-v5-card-insight { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
|
|
706
719
|
.me-v5 .mc-v5-insight-k { flex: none; margin-top: 1px; padding: 1px 4px; border-radius: 4px; background: rgba(255,122,69,.09); color: #ff9a72; font-size: 8.5px; line-height: 14px; white-space: nowrap; }
|
|
707
720
|
.me-v5 .mc-v5-card-lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
@@ -797,7 +810,7 @@ Option A, because:
|
|
|
797
810
|
.mc-audit-batchcard > .mc-btn { width: 100%; }
|
|
798
811
|
.mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
|
|
799
812
|
}
|
|
800
|
-
`;function
|
|
813
|
+
`;function nn(t){t.effect(()=>t.locale.register(jt,{zh:Na,en:Ma}),"memory-eternal: locale");let a=t.locale.bind(jt);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:jt,order:25,label:()=>a("nav"),locale:jt,inject:()=>({})},()=>n.default.createElement(rn,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${jt}:footer`,order:100,label:()=>a("nav"),locale:jt,inject:()=>({})},i=>n.default.createElement(sn,{t:a,locale:t.locale,wide:!(i&&i.wide===!1)}))),"memory-eternal: sidebar footer action")}function on(){let[t,a]=(0,n.useState)(_+"/ui/app");return(0,n.useEffect)(()=>{let i=!0,u=()=>fetch("/memory-eternal/api/web-info").then(c=>c.json()).then(c=>{i&&c&&c.ok&&c.alive!==!1&&c.url&&a(c.url.endsWith("/")?c.url:c.url+"/")}).catch(()=>{});return fetch(_+"/ui/app",{method:"HEAD"}).then(c=>{if(i&&!c.ok)return u()}).catch(()=>i?u():void 0),()=>{i=!1}},[]),t}function rn({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsx)(Da,{t,onReload:()=>{},version:0})]})}function sn({t,locale:a,wide:i}){let[u,c]=(0,n.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${i?"":" rail"}`,children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>c(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(mn,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),u&&(0,e.jsx)(pn,{t,locale:a,onClose:()=>c(!1)})]})}function ln(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:(0,e.jsx)("rect",{x:"2.9",y:"2.9",width:"10.2",height:"10.2",rx:"1.7"})})}function dn(){return(0,e.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,e.jsx)("rect",{x:"2.6",y:"5.4",width:"8",height:"8",rx:"1.5"}),(0,e.jsx)("path",{d:"M5.6 5.4V4.1c0-.9.7-1.6 1.6-1.6h4.7c.9 0 1.6.7 1.6 1.6v4.7c0 .9-.7 1.6-1.6 1.6h-1.3"})]})}function cn(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M3.9 3.9l8.2 8.2M12.1 3.9l-8.2 8.2"})})}function pn({t,locale:a,onClose:i,tab:u}){let[c,s]=(0,n.useState)(!1),[v,k]=(0,n.useState)(!1),y=(0,n.useRef)(null),F=on(),N=(0,n.useCallback)(A=>a&&typeof a.subscribe=="function"?a.subscribe(A):()=>{},[a]),S=(0,n.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),h=(0,n.useSyncExternalStore)(N,S),T=h&&(h.active==="zh"||h.active==="en")?h.active:null,B=(0,n.useRef)(null);B.current===null&&T&&(B.current=T);let E=(0,n.useMemo)(()=>{let A=B.current?`lang=${B.current}`:"";if(u==="config")return`${_}/ui/config?tab=config${A?`&${A}`:""}`;let R=F.replace(/\/$/,""),se=R.endsWith("/ui/app")?"?":"/?";return u?`${R}${se}tab=${u}${A?`&${A}`:""}`:A?`${R}${se}${A}`:F},[F,u]);(0,n.useEffect)(()=>{let A=y.current&&y.current.contentWindow;A&&T&&A.postMessage({source:"memory-eternal",type:"locale",lang:T},"*")},[T]),(0,n.useEffect)(()=>{let A=R=>{R.key==="Escape"&&i()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[i]);let z=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:i,children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsx)("div",{className:"me-modal"+(c?" me-modal-full":""),onClick:A=>A.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{className:"me-wctl",children:[(0,e.jsx)("button",{type:"button",className:"me-wctl-btn","data-me-wctl":c?"restore":"full","aria-pressed":c,onClick:()=>s(A=>!A),"aria-label":t(c?"exitFullscreen":"enterFullscreen"),title:t(c?"exitFullscreen":"enterFullscreen"),children:c?(0,e.jsx)(dn,{}):(0,e.jsx)(ln,{})}),(0,e.jsx)("button",{type:"button",className:"me-wctl-btn me-wctl-close","data-me-wctl":"close",onClick:i,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)(cn,{})})]}),(0,e.jsx)("iframe",{ref:y,src:E,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>k(!0),style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"transparent"}}),!v&&(0,e.jsxs)("div",{className:"me-frame-boot",role:"status","aria-live":"polite",children:[(0,e.jsx)(da,{}),(0,e.jsx)("span",{className:"me-loading-text",children:t("loading")})]})]})})]});return typeof document>"u"?z:(0,Ca.createPortal)(z,document.body)}function mn(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}var Pt="0.18.1";function un({t}){let[a,i]=(0,n.useState)(""),u="dsh-memory tui",c="dsh-memory tui --write",s=async(F,N)=>{try{await navigator.clipboard.writeText(F),i(N),setTimeout(()=>i(""),1600)}catch{}},v={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},k={margin:"10px 0 0",padding:"12px 14px",borderRadius:10,background:"#171a1f",border:"1px solid #333943",color:"#f3f5f8",fontSize:12.5,lineHeight:1.7,overflowX:"auto",fontFamily:"ui-monospace, Consolas, monospace"},y={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{style:{padding:"22px 26px 34px",maxWidth:1040,color:"#f3f5f8"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap"},children:[(0,e.jsx)("h2",{style:{margin:0,fontSize:24,letterSpacing:"-.02em"},children:t("terminalTitle")}),(0,e.jsx)("span",{style:{color:"#99a1ac",fontSize:12},children:"TUI \xB7 LIVE \xB7 dsh-tui"})]}),(0,e.jsx)("p",{style:{margin:"9px 0 20px",color:"#aeb5bf",fontSize:13.5,lineHeight:1.8},children:t("terminalIntro")}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.1fr) minmax(0, .9fr)",gap:14},children:[(0,e.jsxs)("div",{style:v,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalRun")]}),(0,e.jsx)("pre",{style:k,children:u}),(0,e.jsx)("button",{type:"button",style:y,onClick:()=>s(u,"run"),children:a==="run"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsxs)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:["\u9ED8\u8BA4\u8BFB\u53D6\u771F\u5B9E\u8BB0\u5FC6\u5E93\u4E0E\u5F85\u5BA1\u961F\u5217\uFF1B\u53EA\u8BFB\uFF0C\u786E\u8BA4\u540E\u624D\u7528 `--write`\u3002\u793A\u4F8B\u6570\u636E\u7528 `--demo`\u3002",(0,e.jsx)("br",{}),"\u6CA1\u6709 `dsh-memory` \u547D\u4EE4\u65F6\uFF1A`npx -p memory-eternal dsh-memory tui`"]})]}),(0,e.jsxs)("div",{style:v,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalTui")]}),(0,e.jsx)("pre",{style:k,children:c}),(0,e.jsx)("button",{type:"button",style:y,onClick:()=>s(c,"tui"),children:a==="tui"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsx)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:"\u771F\u5B9E\u6279\u51C6/\u9A73\u56DE\uFF1B\u4E0D\u786E\u5B9A\u65F6\u5148\u7528\u53EA\u8BFB\u6A21\u5F0F\u3002"})]})]}),(0,e.jsxs)("div",{style:{...v,marginTop:14},children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalPreview")]}),(0,e.jsx)("pre",{style:{...k,marginTop:10,color:"#d7dce3",fontSize:12,lineHeight:1.5},children:`\u256D\u2500 MEMORY ATLAS / \u5F85\u5BA1 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
|
|
801
814
|
\u2502 \u7C7B\u578B \u25CF \u5168\u90E8 7 \u25CB \u9879\u76EE 3 \u25CB \u77E5\u8BC6 1 \u25CB \u6559\u8BAD 1 \u2502
|
|
802
815
|
\u2502 \u2502
|
|
803
816
|
\u2502 \u25A3 \u5168\u9009 7 \u5DF2\u9009 3 s \u5168\u9009 \u2502
|
|
@@ -806,14 +819,14 @@ Option A, because:
|
|
|
806
819
|
\u2502 \u25C9 [\u6559\u8BAD] shj-web \u7AEF\u53E3\u83DC\u5355\u9519\u4F4D \u2502
|
|
807
820
|
\u2502 \u2502
|
|
808
821
|
\u2502 [a] \u6279\u51C6 3 [r] \u9A73\u56DE [s] \u53CD\u9009 [Esc] \u6E05\u7A7A \u2502
|
|
809
|
-
\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`})]}),(0,e.jsxs)("div",{style:{marginTop:16,color:"#99a1ac",fontSize:12.5,lineHeight:1.8},children:[(0,e.jsx)("b",{style:{color:"#f3f5f8"},children:t("terminalWhy")}),(0,e.jsx)("br",{}),t("terminalWhyBody")]})]})}var
|
|
822
|
+
\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`})]}),(0,e.jsxs)("div",{style:{marginTop:16,color:"#99a1ac",fontSize:12.5,lineHeight:1.8},children:[(0,e.jsx)("b",{style:{color:"#f3f5f8"},children:t("terminalWhy")}),(0,e.jsx)("br",{}),t("terminalWhyBody")]})]})}var oa=class extends n.default.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a||new Error("unknown")}}componentDidCatch(a,i){try{console.warn("[memory-eternal] \u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09",a,i&&i.componentStack)}catch{}}render(){if(!this.state.error)return this.props.children;let a=String(this.state.error&&this.state.error.message||this.state.error||"unknown");return(0,e.jsxs)("div",{style:{padding:"22px 24px",fontFamily:'system-ui, "Segoe UI", "Microsoft YaHei", sans-serif',color:"var(--dsw-alias-label-primary, #1f2937)"},children:[(0,e.jsx)("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:"\u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u51FA\u9519"}),(0,e.jsx)("div",{style:{fontSize:12.5,opacity:.75,lineHeight:1.7,marginBottom:14,wordBreak:"break-all"},children:a}),(0,e.jsx)("div",{style:{fontSize:12,opacity:.6,marginBottom:14,lineHeight:1.7},children:"\u5DF2\u7ECF\u515C\u5E95\u4F4F\uFF0C\u4E0D\u4F1A\u518D\u6574\u9875\u767D\u5C4F\u3002\u70B9\u300C\u91CD\u65B0\u52A0\u8F7D\u300D\u53EF\u6062\u590D\uFF1B\u53CD\u590D\u51FA\u73B0\u8BF7\u7528\u5DE6\u680F\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5E26\u4E0A\u8FD9\u6BB5\u62A5\u9519\u3002"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{try{window.location.reload()}catch{}},children:"\u91CD\u65B0\u52A0\u8F7D"})]})}};function gn(t){return(0,e.jsx)(oa,{children:(0,e.jsx)(fn,{...t})})}function fn({t,inModal:a,onClose:i}){let u=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[c,s]=(0,n.useState)(null),[v,k]=(0,n.useState)(()=>{try{let b=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(b)?b:"normal"}catch{return"normal"}}),[y,F]=(0,n.useState)([]),[N,S]=(0,n.useState)(!0),[h,T]=(0,n.useState)(null),[B,E]=(0,n.useState)(""),[z,A]=(0,n.useState)("all"),[R,se]=(0,n.useState)(""),[oe,K]=(0,n.useState)("all"),[ie,me]=(0,n.useState)("all"),[U,W]=(0,n.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[G,ve]=(0,n.useState)(!1),$e=(0,n.useCallback)(b=>{W(L=>{let l=new Set(L);l.has(b)?l.delete(b):l.add(b);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...l]))}catch{}return l})},[]),[J,je]=(0,n.useState)(""),[m,Pe]=(0,n.useState)(()=>{try{let b=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),L={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(b&&L[b])return L[b]}catch{}return"cards"}),[le,Z]=(0,n.useState)(()=>new Set([m])),Se=(0,n.useCallback)(b=>{Z(L=>L.has(b)?L:new Set(L).add(b)),Pe(b)},[]),[de,Re]=(0,n.useState)("recent"),[ze,M]=(0,n.useState)(null),p=(0,n.useRef)(null),j=(0,n.useRef)(null),[Y,we]=(0,n.useState)(!1),[re,ue]=(0,n.useState)(null),[te,Xe]=(0,n.useState)(!1),[d,I]=(0,n.useState)(!1),[P,Q]=(0,n.useState)(!1),[Ce,ge]=(0,n.useState)("group"),[X,De]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let b=L=>{let l=L&&L.detail;if(["compact","normal","large"].includes(l)){k(l);try{localStorage.setItem("me-ui-scale",l)}catch{}}};return window.addEventListener("me-ui-scale",b),()=>window.removeEventListener("me-ui-scale",b)},[]);let Ne=(0,n.useCallback)(()=>{De(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),f=(0,n.useCallback)((b="group")=>{ge(b),Q(!0)},[]),g=(0,n.useRef)(!1),O=(0,n.useCallback)(async()=>{if(g.current)return;g.current=!0;let b=(L,l=!0)=>{p.current&&clearTimeout(p.current),M({ok:l,msg:L}),p.current=setTimeout(()=>M(null),3e3)};b(t("webOpening"));try{let L=await fetch(`${_}/open-web`,{method:"POST"}).then(D=>D.json()).catch(()=>null);if(L&&L.ok&&L.url){b(t("webOpened")+" \xB7 "+L.url);return}let l=await fetch(`${_}/web-info`).then(D=>D.json()).catch(()=>null),x=l&&l.ok&&l.url||"http://127.0.0.1:7999/",w=window.open(x,"_blank","noopener,noreferrer");b(w?t("webOpened")+" \xB7 "+x:t("webOpenFail")+" \xB7 "+x,!!w)}catch{b(t("webOpenFail"),!1)}finally{g.current=!1}},[t]);(0,n.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||m!=="cards")return;let b=setTimeout(()=>De(!0),900);return()=>clearTimeout(b)}catch{}},[m]);let[q,he]=(0,n.useState)(!0),[We,o]=(0,n.useState)(null),[at,At]=(0,n.useState)(0),gt=(0,n.useCallback)(()=>At(b=>b+1),[]),Fe=c?.quarantine?.pending??0,st=c?.quarantine?.deleted??0,lt=(0,n.useRef)(null),[dt,nt]=(0,n.useState)(0),[qe,ft]=(0,n.useState)(!1),Lt=(0,n.useRef)(null),wt=(0,n.useRef)(null),et=(0,n.useCallback)(async(b=z,L=R,l=ie,x={})=>{let w=x.append===!0;try{w?ft(!0):(S(!0),E(""));let D=new URLSearchParams;b&&b!=="all"&&D.set("kind",b),L.trim()&&D.set("q",L.trim());let $=x.tag!==void 0?x.tag:J;$&&D.set("tag",$),D.set("status",l||"all"),D.set("limit",String(Qa)),D.set("offset",String(x.offset||0)),de==="title"&&D.set("sort","title");let ce=await(await fetch(`${_}/cards?${D.toString()}`)).json();if(ce.ok){let be=ce.cards||[];F(Ae=>w?[...Ae,...be.filter(Ye=>!Ae.some(ke=>ke.path===Ye.path))]:be),nt(Number(ce.total)||be.length)}}catch(D){E(String(D&&D.message?D.message:D))}finally{w?ft(!1):S(!1)}},[z,R,ie,de,J]),Me=(0,n.useCallback)(async()=>{try{let[b,L,l]=await Promise.all([fetch(`${_}/overview`).then(w=>w.json()),fetch(`${_}/capture-log`).then(w=>w.json()).catch(()=>null),fetch(`${_}/config`).then(w=>w.json()).catch(()=>null)]);b.ok&&s(b);let x=l&&l.ok&&l.config&&l.config.uiScale;if(["compact","normal","large"].includes(x)){k(x);try{localStorage.setItem("me-ui-scale",x)}catch{}}T(L&&L.ok&&L.available&&L.health||null)}catch(b){E(String(b&&b.message?b.message:b))}finally{S(!1)}},[]),ot=async b=>{try{let l=await(await fetch(`${_}/delete?path=${encodeURIComponent(b)}`)).json();l.ok?(M({ok:!0,msg:t("deleted")}),await Me(),gt()):M({ok:!1,msg:l.error||t("deleteFail")})}catch{M({ok:!1,msg:t("deleteFail")})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)};(0,n.useEffect)(()=>(Me(),()=>{lt.current&&clearTimeout(lt.current)}),[Me]);let Ue=b=>{se(b),lt.current&&clearTimeout(lt.current),lt.current=setTimeout(()=>et(z,b,ie),280)},He=b=>{A(b),et(b,R,ie)},kt=b=>{let L=String(b||"");je(L),ue(null),et(z,R,ie,{tag:L})};(0,n.useEffect)(()=>{m==="cards"&&et(z,R,ie)},[ie,m,at,de,J]),(0,n.useEffect)(()=>{if(m!=="cards"||N||qe||y.length>=dt)return;let b=Lt.current,L=wt.current;if(!b)return;let l=new IntersectionObserver(x=>{x[0]&&x[0].isIntersecting&&et(z,R,ie,{append:!0,offset:y.length})},{root:L||null,rootMargin:"400px"});return l.observe(b),()=>l.disconnect()},[m,y,dt,N,qe,z,R,ie,et]);let r=async(b,L)=>{try{let l=await fetch(`${_}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:b,kind:L})}).then(x=>x.json());!l||!l.ok?M({ok:!1,msg:l&&l.error||t("coreSetFail")}):(ue(x=>x&&x.path===b?{...x,kind:l.kind}:x),await Me(),gt(),M({ok:!0,msg:t(L==="core"?"coreSetOk":"coreUnsetOk")}))}catch(l){M({ok:!1,msg:String(l&&l.message||l)})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)},H=async b=>{try{let L=b.status;if(!L&&b.path)try{let $=((await fetch(`${_}/cards?status=all&q=${encodeURIComponent(b.title||"")}&limit=50`).then(ne=>ne.json())).cards||[]).find(ne=>ne.path===b.path);$&&(L=$.status)}catch{}let l=L&&L!=="approved"?`&status=${encodeURIComponent(L)}`:"",x=await fetch(`${_}/card?path=${encodeURIComponent(b.path||b.id)}${l}`),w=await x.json();w.ok?ue({path:w.path,title:b.title,text:w.text,kind:b.kind||"knowledge",status:L||"approved"}):E(w.error||`HTTP ${x.status}`)}catch(L){E(String(L&&L.message?L.message:L))}},V=async(b,L)=>{we(!0);try{let l=await fetch(`${_}/export`);if(!l.ok)throw new Error("HTTP "+l.status);let x=await l.json();if(!x.ok)throw new Error(x.error||"export failed");let w,D,$;if(b==="json"){D="memory-vault.json",$="application/json";let be=x.cards.map(Ae=>({path:Ae.path,title:Ae.title,kind:Ae.kind,status:Ae.status,store:Ae.store,text:Ae.text}));w=JSON.stringify({format:x.format||"memory-eternal-vault",formatVersion:x.formatVersion||1,exportedAt:x.exportedAt||new Date().toISOString(),count:be.length,cards:be},null,2)}else D="memory-vault.md",$="text/markdown;charset=utf-8",w=x.cards.map(be=>be.text.trim()).filter(Boolean).join(`
|
|
810
823
|
|
|
811
824
|
---
|
|
812
825
|
|
|
813
|
-
`);let z=new Blob([de],{type:f}),T=await Nn(z,ve,!1);if(!T.ok){le({ok:!1,msg:t("exportFail")}),Z(!1);return}le({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+T.name})}catch(Q){le({ok:!1,msg:t("exportFail")+" \xB7 "+(Q.message||"")})}finally{Z(!1)}fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>le(null),2600)},zt=async g=>{let D=g.target.files&&g.target.files[0];if(g.target.value="",!!D){try{let Q=await D.text(),de=await(await fetch(`${$}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:Q})).json();if(de.ok){await Oe();let ve=de.imported||0,f=t("importedVault")+"\uFF1A"+ve;de.total&&(f+=t("importedTotal")+de.total+t("importedTotalTail")),de.quarantined&&(f+=t("importedQuarantine")+de.quarantined+t("importedQuarantineTail")),de.skipped&&(f+=t("importedSkipped")+de.skipped+t("importedSkippedTail")),de.warning&&(f+=" \xB7 "+de.warning),le({ok:ve>0||!de.total,msg:f})}else le({ok:!1,msg:de.error||t("importFail")})}catch{le({ok:!1,msg:t("importFail")})}fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>le(null),2400)}},i=(0,o.useMemo)(()=>{let g=h.slice();return I!=="all"&&(g=g.filter(D=>Ct(D.submittedBy)===I)),Y!=="all"&&(g=g.filter(D=>(D.status||"approved")===Y)),X&&(g=g.filter(D=>Me.has(D.path))),F==="title"?g.sort((D,Q)=>String(D.title||"").localeCompare(String(Q.title||""))):F==="hot"?g.sort((D,Q)=>(Q.weight||Q.links||0)-(D.weight||D.links||0)):g.sort((D,Q)=>new Date(Q.updated||0).getTime()-new Date(D.updated||0).getTime()),g},[h,F,I,Y,X,Me]),j=(0,o.useMemo)(()=>[...new Set(h.map(g=>Ct(g.submittedBy)))],[h]),E=(0,o.useMemo)(()=>{let g={};for(let D of h){let Q=new Set(D.tags||[]),be=0;for(let de of h)de.path!==D.path&&(de.tags||[]).some(ve=>Q.has(ve))&&be++;g[D.path]=be}return g},[h]),[ie,re]=(0,o.useState)(null),q=(0,o.useMemo)(()=>{if(!i.length)return null;let g=ie?i.find(Q=>Q.path===ie):null;return g||i.find(Q=>Date.now()-new Date(Q.updated||0).getTime()>21*864e5)||i[0]},[i,ie]),ye=()=>{if(!i.length)return;let g=i.findIndex(D=>D.path===(q&&q.path));re(i[(g+1+i.length)%i.length].path)},Ve=!k&&M==="all"&&!ue&&Y==="all"&&!!q;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5",style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:Qe}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${p?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:Ut,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(L==="cards"?"cardsTab":L==="graph"?"graphTab":L==="stats"?"tabUsage":L==="audit"?"tabAudit":L==="optimize"?"tabRecycle":L==="terminal"?"terminalTab":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",Bt]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>ea("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>Ce("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),ge&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(ge.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ge.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ge.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:ge.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:Ut,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:r,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),C&&C.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[C.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:C.since?xt(new Date(C.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${l?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[l&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:Ut,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>te(g=>!g),"aria-label":t(l?"collapse":"expand"),title:t(l?"collapse":"expand"),children:l?"\xAB":"\xBB"})]}),l&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="cards"?" active":""}`,onClick:()=>G("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="graph"?" active":""}`,onClick:()=>G("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="stats"?" active":""}`,onClick:()=>G("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="audit"?" active":""}`,onClick:()=>G("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),dt>0&&(0,e.jsx)("span",{className:"mc-dot",children:dt>99?"99+":dt})]}),l&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="optimize"?" active":""}`,onClick:()=>G("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),wt>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:wt>99?"99+":wt})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="terminal"?" active":""}`,onClick:()=>G("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:m,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${L==="config"?" active":""}`,onClick:()=>G("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),l&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>Ce("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>Ce("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>Ce("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>Je(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),l&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:kt,children:[c&&c.db&&c.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",c.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,L==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:c?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",c?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",c?.quarantine?.pending??c?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",c?.quarantine?.rejected??c?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[h.length," / ",Ke]})]}),L==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:k,onChange:g=>_e(g.target.value)}),ue&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>He(""),children:["\u{1F3F7} ",ue," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:S,type:"file",accept:".json,application/json",style:{display:"none"},onChange:zt}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>S.current&&S.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>ze({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ne,onClick:()=>Mt("md"),children:t(ne?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ne,onClick:()=>Mt("json"),children:t(ne?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Oe(),children:t("refresh")})]}),L==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[na.map(g=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${M===g?" active":""}`,onClick:()=>nt(g),children:[t(g==="all"?"all":qe[g]),(0,e.jsx)("span",{className:"mc-chip-n",children:g==="all"?c?.total??0:c?.byKind?.[g]??0})]},g)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${X?" active":""}`,onClick:()=>W(g=>!g),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:Me.size})]}),(0,e.jsxs)("select",{value:I,onChange:g=>ce(g.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),ka(j).map(g=>(0,e.jsx)("option",{value:g,children:g},g))]}),(0,e.jsxs)("select",{value:Y,onChange:g=>ee(g.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(g=>(0,e.jsx)("button",{type:"button",className:`mc-chip${F===g.key?" active":""}`,onClick:()=>Le(g.key),children:g.label},g.key))]}),u&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",u]}),(0,e.jsx)("div",{style:{display:L==="cards"?"contents":"none"},children:x?(0,e.jsx)(Ra,{text:t("loading")}):u?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",u," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Oe(),children:t("retry")})]}):h.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[Ve&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>je(q),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:q.title}),(0,e.jsx)("p",{children:oa(q)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Nt[q.kind]||"\u{1F4CE}"," ",t(qe[q.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",xt(q.updated)]}),(q.tags||[]).slice(0,3).map(g=>(0,e.jsxs)("span",{children:["#",g]},g))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(Ta,{n:E[q.path]||0,color:Ze[q.kind]||Ze.other,size:58}),(0,e.jsx)("b",{children:E[q.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:g=>{g.stopPropagation(),ye()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:i.filter(g=>!Ve||g.path!==q.path).map(g=>(0,e.jsx)(gn,{card:g,t,query:k.trim(),onOpen:je,onDelete:We,onTagClick:He,pinned:Me.has(g.path),onPin:U,links:E[g.path]||0},g.path))}),h.length<Ke&&(0,e.jsx)("div",{ref:pt,style:{height:1}}),ct&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",h.length," / ",Ke,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:L==="graph"?"flex":"none",flex:1,minHeight:0},children:b.has("graph")&&(0,e.jsx)(wn,{t,onOpen:je,all:Ie,onAllChange:Ee,onMutate:tt,active:L==="graph",visible:L==="graph"})}),(0,e.jsx)("div",{style:{display:L==="terminal"?"contents":"none"},children:b.has("terminal")&&(0,e.jsx)(ln,{t})}),(0,e.jsx)("div",{style:{display:L==="config"?"contents":"none"},children:b.has("config")&&(0,e.jsx)(Ca,{t,onReload:()=>Oe(),version:Pe})}),(0,e.jsx)("div",{style:{display:L==="stats"?"contents":"none"},children:b.has("stats")&&(0,e.jsx)(fn,{t,tab:"stats",onReload:()=>Oe(),version:Pe})}),(0,e.jsx)("div",{style:{display:L==="audit"?"contents":"none"},children:b.has("audit")&&(0,e.jsx)(pn,{t,onReload:()=>Oe(),version:Pe})}),(0,e.jsx)("div",{style:{display:L==="optimize"?"contents":"none"},children:b.has("optimize")&&(0,e.jsx)(mn,{t,onReload:()=>Oe(),version:Pe})}),Ge&&(0,e.jsx)(hn,{t,onClose:()=>Je(!1)}),d&&(0,e.jsx)(yn,{t,tab:B,onTab:ae,onClose:()=>R(!1),onFeedback:()=>{R(!1),Je(!0)},onReplay:()=>{R(!1),oe(!0)}}),De&&(0,e.jsx)(vn,{t,onDone:J}),Te&&(0,e.jsx)(xn,{t,card:Te,query:k.trim(),onNavigate:g=>{let D=i.findIndex(be=>be.path===Te.path),Q=i[D+g];Q&&je(Q)},onTagClick:He,onClose:()=>K(null),onDelete:g=>{K(null),We(g)},onFeedback:g=>{let D=Te.path;fetch(`${$}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:k.trim(),path:D,useful:g})}).then(()=>le({ok:!0,msg:t(g?"fbUseful":"fbIrr")})).catch(()=>{}),fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>le(null),2e3)},allCards:i,onOpenRelated:g=>je(g)}),(0,e.jsx)(bn,{t,newCard:xe,setNewCard:ze,onCreated:()=>{Oe(),tt(),le({ok:!0,msg:t("created")}),fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>le(null),2e3)}})]})]})]})}var Sa=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;function Ca({t,onReload:a,version:r,compact:p}){let[c,s]=(0,o.useState)(null),[h,v]=(0,o.useState)(0),[x,A]=(0,o.useState)(null),[C,w]=(0,o.useState)(null),[u,N]=(0,o.useState)(!1),[M,O]=(0,o.useState)(!1),k=(0,o.useRef)(!1),H=(0,o.useRef)(null),I=(0,o.useRef)({}),[ce,Y]=(0,o.useState)(null),[ee,Me]=(0,o.useState)(null),[Se,X]=(0,o.useState)(""),[W,U]=(0,o.useState)(""),[ue,Ye]=(0,o.useState)(""),[L,Be]=(0,o.useState)(null),[b,_]=(0,o.useState)(null),G=(0,o.useCallback)(async(i,j=!1)=>{j||U("version");try{let E=await fetch($+"/version-check"+(i?"?force=1":"")).then(ie=>ie.json());E&&E.ok?(_(E),i&&K(E.updateAvailable?t("vcLatest")+" v"+E.latest:t("vcUpToDate"))):i&&K(t("vcCheckFail"),!1)}catch{i&&K(t("vcCheckFail"),!1)}finally{j||U("")}},[t]);(0,o.useEffect)(()=>{G(!1);let i=setInterval(()=>{G(!1,!0)},6e4),j=()=>{typeof document<"u"&&!document.hidden&&G(!1,!0)};return document.addEventListener("visibilitychange",j),()=>{clearInterval(i),document.removeEventListener("visibilitychange",j)}},[r,G]);let[F,Le]=(0,o.useState)(""),[ge,le]=(0,o.useState)(null),[fe,S]=(0,o.useState)(""),[ne,Z]=(0,o.useState)(!1),Te=(0,o.useRef)(null),K=(i,j=!0)=>{Te.current&&clearTimeout(Te.current),le({msg:i,ok:j}),Te.current=setTimeout(()=>le(null),1900)},Ie=async()=>{if(!W){U("restart");try{let i=await fetch($+"/restart-self",{method:"POST"});if(i.status===404||i.status===405){K(se("vcRestartNoRoute",{cmd:b&&b.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let j=await i.json().catch(()=>null);if(!j){K(t("vcRestartFail")+"\uFF08HTTP "+i.status+"\uFF09",!1);return}if(!j.ok){K(j.error||t("vcRestartFail"),!1);return}if(j.alreadyCurrent){K(j.note||t("vcRestartCurrent"));return}K(j.note||t("vcRestartSent")),j.alreadyRunning||setTimeout(()=>{G(!0)},6e3)}catch(i){K(t("vcRestartFail")+"\uFF1A"+String(i&&i.message||i),!1)}finally{U("")}}},Ee=b&&b.resident?String(b.resident.served||""):"",Ge=!!(b&&b.onDisk&&Ee&&Ee!==b.onDisk),Je=!!(b&&b.resident&&b.resident.managed===!1&&b.resident.managedKnown===!1),d=b&&b.resident&&b.resident.replaceBlocked&&b.resident.replaceBlocked.fresh||null,R=!!(b&&b.resident&&b.resident.managedBy==="host"),B=!!(b&&b.resident&&b.resident.managed===!1&&!Je&&!R),ae=!!(b&&b.resident&&!Ee),De=Ge||ae||B||Je,oe=da({hasVersion:!!b,hostVersion:b?b.loaded:"",onDisk:b?b.onDisk:"",residentServed:b&&b.resident?b.resident.served:"",residentPresent:!!(b&&b.resident),residentManaged:b&&b.resident?b.resident.managed:null,residentManagedKnown:b&&b.resident?b.resident.managedKnown:null,residentManagedBy:b&&b.resident?b.resident.managedBy:"",replaceBlocked:b&&b.resident?b.resident.replaceBlocked:null}),J={hostProcessStale:()=>se("vcHostProcessStale",{disk:b.onDisk,loaded:b.loaded}),residentDown:()=>se("vcResidentDown",{port:b.resident&&b.resident.port||"",cmd:b.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>se("vcResidentReplaceBlocked",{served:Ee,err:d&&d.error||"",path:d&&d.lockPath||"",cmd:b.restartCommand||"dsh-memory restart --port "+(b.resident&&b.resident.port||7999)}),residentLockUnknown:()=>se("vcResidentLockUnknown",{served:Ee,path:b.resident&&b.resident.lock&&b.resident.lock.path||"",err:b.resident&&b.resident.lock&&b.resident.lock.error||""}),residentUnmanaged:()=>se("vcResidentUnmanaged",{served:Ee,cmd:b.restartCommand||"dsh-memory restart --port 7999"})},Ce={restartStart:()=>se("vcRestartStart",{disk:b&&b.onDisk||""}),restartRepair:()=>se("vcRestartRepair",{disk:b&&b.onDisk||""}),restartFixes:()=>se("vcRestartFixes",{served:Ee||"",disk:b&&b.onDisk||""}),restartHostOnly:()=>se("vcRestartHostOnly",{loaded:b&&b.loaded||"",disk:b&&b.onDisk||""}),restartAnyway:()=>se("vcRestartAnyway",{ver:b&&b.onDisk||""})},se=(i,j)=>Object.keys(j).reduce((E,ie)=>E.split("{"+ie+"}").join(j[ie]),t(i)),m=(0,o.useCallback)(async()=>{try{let[i,j,E,ie]=await Promise.all([fetch(`${$}/config`).then(re=>re.json()).catch(()=>null),fetch(`${$}/setup-status`).then(re=>re.json()).catch(()=>null),fetch(`${$}/budget`).then(re=>re.json()).catch(()=>null),fetch(`${$}/llm-routes`).then(re=>re.json()).catch(()=>null)]);if(ie&&ie.ok&&Be(ie),i&&i.ok){s(i),v(i.revision??0),A(i.schema??null);let re=ha(i.config??{},I.current);I.current=re.overlay,w({...re.values}),Z(!1),Y(i.dsh??null),N(i.writable===!1),O(i.viaPending===!0),X(""),k.current=!1}else E&&E.ok?(w({...E}),Z(!1),N(!0),X(t("configNeedsDsh"))):X(t("adminLoadFail"));j&&j.ok&&Me(j),Ye("")}catch{X(t("adminLoadFail"))}},[t]);(0,o.useEffect)(()=>{m()},[r,m]);let l=(i,j)=>{k.current=!0,Z(!0),S(""),w(E=>({...E??{},[i]:j}))};(0,o.useEffect)(()=>{H.current=m},[m]),(0,o.useEffect)(()=>{if(typeof EventSource>"u")return;let i=null;try{i=new EventSource($+"/events")}catch{return}let j=()=>{!k.current&&typeof H.current=="function"&&H.current()};try{i.addEventListener("config",j)}catch{}return()=>{try{i.close()}catch{}}},[]);let te=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars"]),xe=i=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[i]||i,ze=async()=>{if(!C)return;if(u){K(t("editInSetting"),!1);return}let i={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9]},j=[];for(let[E,[ie,re]]of Object.entries(i)){if(!(E in C))continue;let q=C[E],ye=typeof q=="number"?q:Number(q);(q===""||q===null||q===void 0||!Number.isFinite(ye)||ye<ie||ye>re)&&j.push(t("invalidField",{field:E,min:ie,max:re,value:String(q===""?"\u7A7A":q)}))}if(j.length){let E=t("saveInvalid")+"\uFF1A"+j.join("\uFF1B");X(E),K(E,!1);return}U("save");try{let E={...C};for(let ye of Object.keys(C))ye in E&&typeof E[ye]=="string"&&E[ye].trim()!==""&&te.has(ye)&&(E[ye]=Number(E[ye]));Array.isArray(E.vaultProfiles)&&(E.vaultProfiles=E.vaultProfiles.filter(ye=>ye&&(String(ye.name||"").trim()||String(ye.path||"").trim())));let ie=await fetch(`${$}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:E,expectedRevision:h})}),re=await ie.text(),q=null;try{q=re?JSON.parse(re):null}catch{q=null}if(q||(q={error:"HTTP "+ie.status+(re?"\uFF1A"+re.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),q&&q.ok){let ye=typeof q.pendingOutcome=="string"?q.pendingOutcome:"",Ve,g=!0;if(ye==="applied")Ve=t("savedApplied")+(Array.isArray(q.applied)&&q.applied.length?" \xB7 "+q.applied.join("\u3001"):"");else if(ye==="queued")g=!1,Ve=t("saveQueued");else if(ye==="failed")g=!1,Ve=t("saveFail")+" \xB7 "+(q.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(ye==="applied-direct")Ve=t("savedOk")+" \xB7 "+t("savedDirect");else{let D=Array.isArray(q.pending)&&q.pending.length?" \xB7 "+t("savePending"):q.note?" \xB7 "+t("restartHint"):"";Ve=(q.retried?"\u267B ":"")+t("savedOk")+D}I.current={...I.current,...E},g?(S(""),Z(!1),Ye(Ve)):X(Ve),K(Ve,g),await m()}else{let ye=ie.status===409?t("conflictRefresh"):q?.error||t("saveFail");X(ye),K(ye,!1)}}catch{X(t("saveFail")),K(t("saveFail"),!1)}finally{U("")}},Pe=()=>{I.current={},w({...c?.config??{}}),S(""),Z(!1),Ye("")},n={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},tt=i=>Array.isArray(i?.vaultProfiles)?i.vaultProfiles:[],dt=(i,j,E)=>{k.current=!0,Z(!0),w(ie=>{let re=tt(ie).map(ye=>({...ye||{}})),q={...re[i]||{}};return j==="match"?String(E).trim()?q.match={...q.match||{},workspace:E}:delete q.match:q[j]=E,re[i]=q,{...ie??{},vaultProfiles:re}})},wt=()=>{k.current=!0,Z(!0),w(i=>({...i??{},vaultProfiles:[...tt(i),{name:"",path:""}]}))},Xe=i=>{k.current=!0,Z(!0),w(j=>({...j??{},vaultProfiles:tt(j).filter((E,ie)=>ie!==i)}))},Ke={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},bt={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},ct={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},Dt=i=>{let j=ct[i];j&&(w(E=>({...E??{},...j})),k.current=!0,Z(!0),S(i),K(se("planApplied",{plan:j.label})))},pt=async()=>{try{let i=await fetch($+"/setup-status").then(j=>j.json());i&&i.ok&&Me(i)}catch{}},kt=async(i,j)=>{U(i+j);try{let ie=await(await fetch(`${$}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:i,action:j})})).json();ie&&ie.ok?K(se(j==="install"?"mcpInstalled":"mcpUninstalled",{agent:i})):K(se("mcpActionFail",{agent:i,error:ie?.error||""}),!1);try{let re=await fetch(`${$}/setup-status`).then(q=>q.json());re&&re.ok&&Me(re)}catch{}}catch{K(t("mergeFail"),!1)}finally{U("")}},ke=({k:i,label:j,hint:E,type:ie="text",step:re,min:q,max:ye})=>(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:j||i}),(0,e.jsx)("input",{type:ie,step:re,min:q,max:ye,value:C?C[i]??"":"",onChange:Ve=>{let g=Ve.target.value;l(i,ie==="number"?g===""?"":Number(g):g)}}),E?(0,e.jsx)("span",{className:"mc-field-hint",children:E}):null]}),Oe=new Set(["autoRestartOnDrift"]),We=({k:i,label:j})=>{let E=C?C[i]:void 0,ie=E===void 0?Oe.has(i):!!E;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:ie,onChange:re=>l(i,re.target.checked)}),(0,e.jsx)("span",{children:j||i})]})},_e=({icon:i,title:j,sub:E,children:ie})=>(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:i}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:j}),E?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:E}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:ie})]}),nt=ee&&Array.isArray(ee.agents)?ee.agents:[],He=nt.filter(i=>i.installed),je=[...new Set(He.flatMap(i=>Array.isArray(i.servers)?i.servers:[]))],Mt=nt.filter(i=>i.mcpConfigured&&!i.isDsh).length,zt=nt.some(i=>Array.isArray(i.servers));return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:p?"0 0 auto":1,minHeight:0,maxHeight:p?"52vh":void 0},children:[(0,e.jsx)("style",{children:Qe}),ge&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(ge.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ge.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ge.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:ge.msg})]}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[!p&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),Se&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",Se]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:m,children:["\u21BB ",t("retry")]})]}),M&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),u&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),ue&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",ue]}),c&&(c.version||c.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),c.version&&(0,e.jsxs)("code",{style:Ke,children:[t("vcLoaded")," v",c.version]}),b&&b.resident&&b.resident.served&&b.resident.served!==c.version&&(0,e.jsxs)("code",{style:Ke,children:[t("vcResident")," v",b.resident.served]}),b&&b.resident&&!b.resident.served&&(0,e.jsxs)("code",{style:{...Ke,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),b&&b.resident&&b.resident.served&&b.resident.managed===!1&&(0,e.jsxs)("code",{style:{...Ke,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",b.resident.served," \xB7 ",t(d?"vcResidentReplaceBlockedShort":R?"vcResidentHostManagedShort":Je?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),Bt&&(0,e.jsxs)("code",{style:Ke,children:[t("vcPage")," v",Bt]}),b&&b.onDisk&&(0,e.jsxs)("code",{style:Ke,children:[t("vcOnDisk")," v",b.onDisk]}),b&&b.latest&&(0,e.jsxs)("code",{style:Ke,children:[t("vcLatest")," v",b.latest]}),c.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",c.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:W==="version",onClick:()=>G(!0),children:W==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),b&&oe.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",J[oe.warn]?J[oe.warn]():""]})}),oe.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(oe.emphasis?" me-on":""),disabled:!!W,onClick:Ie,children:W==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),b.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:b.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:Ce[oe.hint]?Ce[oe.hint]():""})]}),Bt&&b&&b.onDisk&&Bt!==b.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:Bt,disk:b.onDisk})}),b&&b.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:b.updateCommand})]}),b&&b.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",b.checkError]})]}),ee&&ee.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:pt,children:t("mcpRefresh")})]}),zt?(0,e.jsx)("div",{className:"mc-mcp-summary",children:se("mcpSummary",{agents:He.length,servers:je.length,mounted:Mt})}):null,nt.map(i=>{let j=Array.isArray(i.servers),E=j?i.servers:[],ie=i.isDsh?t("dshHostLabel"):i.label||i.name;return(0,e.jsxs)("div",{className:"mc-mcp-row",style:{opacity:i.installed?1:.55},children:[(0,e.jsxs)("div",{className:"mc-mcp-main",children:[(0,e.jsxs)("div",{className:"mc-mcp-title",children:[(0,e.jsx)("b",{children:ie}),i.isDsh&&i.version&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:["v",i.version]}),!i.installed&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("notInstalled")}),i.installed&&i.mcpConfigured===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("noMcpEntry")}),i.mcpConfigured===!0&&(0,e.jsxs)("span",{className:"mc-mcp-badge",style:{color:"#10b981"},children:["\u2713 ",t("healthy")]}),i.mcpConfigured===!0&&i.mcpMatchesCurrentNode===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("nodePathNote")}),i.isDsh&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:[t("recallTool"),": ",i.recallTool?t("enabled"):t("disabled")]}),i.detectedOnly&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("mcpDetectedOnly")}),i.reason&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:i.reason})]}),j?E.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:E.map(re=>(0,e.jsx)("code",{className:re==="memory"?"on":"",children:re},re))}):i.installed?(0,e.jsx)("div",{className:"mc-mcp-servers",children:(0,e.jsx)("span",{style:{fontSize:10.5,opacity:.45},children:t("mcpNoServers")})}):null:null,i.mcpPath&&(0,e.jsx)("div",{className:"mc-mcp-path",title:i.mcpPath,children:i.mcpPath})]}),(0,e.jsxs)("div",{className:"mc-mcp-actions",children:[i.hook&&(0,e.jsxs)("span",{style:{fontSize:10.5,opacity:.55},children:["hook: ",i.hook]}),!i.isDsh&&!i.detectedOnly&&i.installed&&i.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>kt(i.name,"install"),children:t("installMcp")}),!i.isDsh&&!i.detectedOnly&&i.installed&&i.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!W,onClick:()=>{window.confirm(t("uninstallConfirm"))&&kt(i.name,"uninstall")},children:t("uninstallMcp")})]})]},i.name+(i.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),F&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:F})})]}),C?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(_e,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(i=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(fe===i?" on":""),"aria-pressed":fe===i,onClick:()=>Dt(i),disabled:!!W,children:[(0,e.jsxs)("b",{children:[fe===i?"\u2705 ":i==="A"?"\u{1F7E2} ":i==="B"?"\u{1F4B0} ":"\u2B50 ",ct[i].label]}),(0,e.jsx)("span",{children:t("planDesc"+i)})]},i))}),fe?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",se("planApplied",{plan:ct[fe].label})]}):null]}),(0,e.jsx)(_e,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(We,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(We,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(We,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(ke,{k:"vaultDir",label:t("vaultDirLabel")}),(0,e.jsx)(ke,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(ke,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(ke,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(ke,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(ke,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(We,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(ke,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(ke,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsxs)(_e,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:ce?.vaultDir||"\u2014"}),ce?.vaultName?`\uFF08${ce.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(n[ce?.vaultSource]||"vaultSrcDefault"),ce?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:ce.workspace})]}):null]}),tt(C).map((i,j)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:i.name||"",placeholder:t("vaultNamePh"),onChange:E=>dt(j,"name",E.target.value),style:bt,disabled:u}),(0,e.jsx)("input",{value:i.path||"",placeholder:t("vaultPathPh"),onChange:E=>dt(j,"path",E.target.value),style:bt,disabled:u}),(0,e.jsx)("input",{value:i.match&&i.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:E=>dt(j,"match",E.target.value),style:bt,disabled:u}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Xe(j),disabled:u,title:t("delete"),children:"\u2715"})]},j)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:wt,disabled:u,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:C.activeVault||"",onChange:i=>l("activeVault",i.target.value),disabled:u,style:bt,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),tt(C).filter(i=>i&&i.name).map(i=>(0,e.jsx)("option",{value:i.name,children:i.name},i.name))]})]})]})]}),(0,e.jsx)(_e,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(We,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(We,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(ke,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(ke,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(ke,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(ke,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),L&&L.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",se("routeListFail",{err:L.error||"\u672A\u77E5\u539F\u56E0"})]}),L&&L.providers&&L.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:C.captureProvider||"",onChange:i=>{l("captureProvider",i.target.value),l("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),L.providers.map(i=>(0,e.jsx)("option",{value:i.id,children:i.label},i.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:C.captureModel||"",onChange:i=>l("captureModel",i.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((L.providers.find(i=>i.id===C.captureProvider)||{}).models||[]).map(i=>(0,e.jsx)("option",{value:i.id,children:i.label||i.id},i.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ke,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(ke,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(We,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(We,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(ke,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:async()=>{U("llmtest");try{let i=await fetch($+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:C.captureProvider||"",model:C.captureModel||"",firstOnly:C.captureFirstOnly===!0})}).then(j=>j.json());i&&i.ok?K(t("llmTestOk")+"\uFF1A"+i.route.provider+(i.route.model?"/"+i.route.model:"")+" \xB7 "+i.ms+"ms \xB7 "+t("llmCandidates")+" "+i.candidates):K(t("llmTestFail")+"\uFF1A"+(i&&(i.failure?i.failure.code+" "+i.failure.message:i.error)||"?"),!1)}catch(i){K(t("llmTestFail")+"\uFF1A"+String(i&&i.message||i),!1)}finally{U("")}},children:W==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(_e,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:C.auditMode??"all",onChange:i=>l("auditMode",i.target.value),children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(va,{label:t("auditExemptAgents"),value:C.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(ee?.agents||[]).filter(i=>!i.isDsh).map(i=>({value:i.name,label:i.name}))],onChange:i=>l("auditExemptAgents",i)}),(0,e.jsx)(va,{label:t("auditExemptKinds"),value:C.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...na.filter(i=>i!=="all").map(i=>({value:i,label:t(qe[i])}))],onChange:i=>l("auditExemptKinds",i)}),(0,e.jsx)(ke,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(_e,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(We,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:C.autoWebMode??"init",onChange:i=>l("autoWebMode",i.target.value),children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(ke,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(ke,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(ke,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"}),(0,e.jsx)(We,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(We,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(We,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[ne?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),W==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),ue&&W!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",ue]}),Se&&W!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",Se]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Pe,disabled:!!W,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:u?()=>K(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):ze,disabled:W==="save",title:t(u?"readonlyBody":"saveConfig"),children:W==="save"?"\u23F3 "+t("saving"):u?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})}function pn({t,onReload:a,version:r}){let[p,c]=(0,o.useState)([]),[s,h]=(0,o.useState)([]),[v,x]=(0,o.useState)("all"),[A,C]=(0,o.useState)("all"),[w,u]=(0,o.useState)(""),[N,M]=(0,o.useState)(new Set),[O,k]=(0,o.useState)(null),[H,I]=(0,o.useState)(""),[ce,Y]=(0,o.useState)(null),[ee,Me]=(0,o.useState)("pending"),Se=(S,ne=!0)=>{Y({msg:S,ok:ne}),setTimeout(()=>Y(null),3e3)},X=[...new Set([...p,...s].map(S=>S.submittedBy).filter(Boolean))],W=(0,o.useCallback)(async()=>{try{let S=await fetch(`${$}/audit/list`).then(ne=>ne.json());S.ok&&(c(S.pending||[]),h(S.rejected||[]),M(new Set),b({}))}catch{}},[]);(0,o.useEffect)(()=>{W()},[r,W]);let U=(ee==="pending"?p:s).filter(S=>{if(v!=="all"&&S.kind!==v||A!=="all"&&Ct(S.submittedBy)!==A)return!1;if(w){let ne=(S.created||"").slice(0,10);if(ne&&ne!==w)return!1}return!0}),ue=(0,o.useMemo)(()=>{let S=ee==="pending"?p:s,ne={all:0};return S.forEach(Z=>{if(!(A!=="all"&&Ct(Z.submittedBy)!==A)){if(w){let Te=(Z.created||"").slice(0,10);if(Te&&Te!==w)return}ne.all++,ne[Z.kind||"other"]=(ne[Z.kind||"other"]||0)+1}}),ne},[p,s,ee,A,w]),Ye=S=>M(ne=>{let Z=new Set(ne);return Z.has(S)?Z.delete(S):Z.add(S),Z}),L=async(S,ne)=>{let Z=ne||[...N];if(!Z.length){Se(t("noSelection"),!1);return}I("apply");let Te=t(S==="approved"?"toastApproved":S==="rejected"?"toastRejected":"toastCardDeleted");try{let K=0;for(let Ie of Z){let Ee=S==="approved"?"audit/approve":S==="rejected"?"audit/reject":"delete";try{(await fetch($+"/"+Ee+"?path="+encodeURIComponent(Ie)+(S==="delete"?"&permanent=0":""))).ok||K++}catch{K++}}await W(),a&&a(),K?Se(t("toastFailed")+"\uFF08"+K+"/"+Z.length+"\uFF09",!1):Se(Te+" "+Z.length+" \u5F20")}catch(K){Se(t("toastFailed")+": "+String(K&&K.message||K),!1)}finally{I("")}},[Be,b]=(0,o.useState)({}),_=S=>Be[S]||{},G=[...N],F=U.find(S=>S.path===O)||U[0]||null,Le=F?_(F.path):{};(0,o.useEffect)(()=>{let S=F;if(!S||Be[S.path])return;let ne=!0,Z=S.path;b(K=>({...K,[Z]:{loading:!0}}));let Te=S.status||(ee==="pending"?"pending":"rejected");return fetch(`${$}/card?path=${encodeURIComponent(Z)}&status=${Te}`).then(K=>K.json()).then(K=>{ne&&(K&&K.ok?b(Ie=>({...Ie,[Z]:{text:K.text||""}})):b(Ie=>({...Ie,[Z]:{error:K&&K.error||"HTTP"}})))}).catch(K=>{ne&&b(Ie=>({...Ie,[Z]:{error:String(K&&K.message||K)}}))}),()=>{ne=!1}},[F&&F.path,ee]);let ge=()=>M(new Set),le=S=>{Me(S),ge()},fe=["all",...na.filter(S=>S!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Sa,{toast:ce}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[p.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("select",{value:A,onChange:S=>{C(S.target.value),ge()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),ka(X).map(S=>(0,e.jsx)("option",{value:S,children:S},S))]}),(0,e.jsx)("input",{type:"date",value:w,onChange:S=>{u(S.target.value),ge()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),fe.map(S=>{let ne=S==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":Ze[S]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${v===S?" active":""}`,onClick:()=>{x(S),ge()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:ne}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(S==="all"?"all":qe[S])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:ue[S]||0})]},S)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${ee==="pending"?" me-on":""}`,onClick:()=>le("pending"),children:[t("pending"),"\uFF08",p.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${ee==="rejected"?" me-on":""}`,onClick:()=>le("rejected"),children:[t("rejected"),"\uFF08",s.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:U.length>0&&G.length===U.length,onChange:S=>{S.target.checked?M(new Set(U.map(ne=>ne.path))):M(new Set)}})," ",t("selectAll"),"\uFF08",U.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",G.length]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!G.length||!!H,onClick:()=>L("approved"),children:["\u2713 ",t(ee==="rejected"?"restore":"approve")]}),ee==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!G.length||!!H,onClick:()=>L("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!G.length||!!H,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&L("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),G.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ge,children:t("auditClearSelection")})]}),U.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:U.map(S=>{let ne=Ze[S.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${F&&F.path===S.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>k(S.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:N.has(S.path),onClick:Z=>Z.stopPropagation(),onChange:()=>Ye(S.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:ne,borderColor:ne+"38",background:ne+"18"},children:Nt[S.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:"me-audit-row-kind",children:t(qe[S.kind]||"kindKnowledge")}),(0,e.jsx)("span",{className:`me-audit-row-state ${ee==="pending"?"pending":"rejected"}`,children:ee==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:S.created?S.created.slice(0,16).replace("T"," "):"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:S.title,onClick:()=>k(S.path),children:S.title}),(S.reason||S.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:S.reason||S.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Ct(S.submittedBy)]}),(Array.isArray(S.tags)?S.tags:[]).slice(0,3).map(Z=>(0,e.jsxs)("span",{children:["#",Z]},Z))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:Z=>Z.stopPropagation(),children:ee==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>L("approved",[S.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>L("rejected",[S.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>L("approved",[S.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&L("delete",[S.path])},children:"\u{1F5D1}"})]})})]})},S.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t("noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:F?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:Ze[F.kind]||"#6B7280",borderColor:(Ze[F.kind]||"#6B7280")+"59",background:(Ze[F.kind]||"#6B7280")+"1a"},children:[Nt[F.kind]||"\u{1F4CE}"," ",t(qe[F.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${ee==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:ee==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:F.created?F.created.slice(0,16).replace("T"," "):""})]}),(0,e.jsx)("h3",{children:F.title}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Ct(F.submittedBy)]}),!!F.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",F.reason]}),(Array.isArray(F.tags)?F.tags:[]).slice(0,5).map(S=>(0,e.jsxs)("span",{children:["#",S]},S))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[Le.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),Le.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Le.error]}),Le.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Yt(Na($t(Le.text).body,F.title))}}):!Le.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:F.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!H,onClick:()=>L("approved",[F.path]),children:["\u2713 ",t(ee==="rejected"?"restore":"approve")]}),ee==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!H,onClick:()=>L("rejected",[F.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!H,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&L("delete",[F.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("noAuditItems")})})]})]})]})]})}function mn({t,onReload:a,version:r}){let[p,c]=(0,o.useState)([]),[s,h]=(0,o.useState)(""),[v,x]=(0,o.useState)(null),A=(u,N=!0)=>{x({msg:u,ok:N}),setTimeout(()=>x(null),3200)},C=(0,o.useCallback)(async()=>{try{let u=await fetch(`${$}/recycle/list`).then(N=>N.json());u.ok&&c(u.items||[])}catch{}},[]);(0,o.useEffect)(()=>{C()},[r,C]);let w=async(u,N)=>{let M=(p.find(O=>O.path===N)||{}).title||N;h(u+N);try{let k=await fetch($+(u==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(N)),H=await k.json().catch(()=>null);await C(),a&&a(),k.ok&&(!H||H.ok!==!1)?A(t(u==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+M):A(t("toastFailed")+"\uFF1A"+(H&&H.error||"HTTP "+k.status),!1)}catch(O){A(t("toastFailed")+"\uFF1A"+String(O&&O.message||O),!1)}finally{h("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Sa,{toast:v}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:p.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!s||p.length===0,title:p.length?"":t("emptyRecycle"),onClick:async()=>{h("purgeAll");try{let u=await fetch($+"/recycle/purge-expired?days=0"),N=await u.json().catch(()=>null);await C(),A(u.ok?t("toastPurgedExpired")+(N&&N.purged!=null?"\uFF08"+N.purged+"\uFF09":""):t("toastFailed"),u.ok)}catch(u){A(t("toastFailed")+"\uFF1A"+String(u&&u.message||u),!1)}finally{h("")}},children:["\u{1F5D1} ",t("emptyRecycle")]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),p.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:p.map(u=>{let N=Ze[u.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:N,background:N+"18",borderColor:N+"38"},children:Nt[u.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:u.title}),(0,e.jsxs)("span",{children:[t(qe[u.kind]||"kindKnowledge")," \xB7 ",t("deletedAt")," ",(u.deletedAt||"").slice(0,10)]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!s,onClick:()=>w("restore",u.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!s,onClick:()=>{window.confirm(t("purgeConfirm"))&&w("purge",u.path)},children:t("purge")})]})]},u.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var Na=(t,a)=>{let r=String(t||"").split(/\r?\n/),p=s=>String(s||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),c=p(a);for(;;){let s=0;for(;s<r.length&&!r[s].trim();)s++;let h=/^#{1,2}\s+(.+?)\s*$/.exec(r[s]||"");if(!h||p(h[1])!==c)break;for(r.splice(s,1);s<r.length&&!r[s].trim();)r.splice(s,1)}return r.join(`
|
|
814
|
-
`)},un=t=>{let a=[],r=!1,p=0;for(let c of String(t||"").split(/\r?\n/)){let s=c.trim();if(/^```/.test(s)){r=!r;continue}if(r)continue;let h=/^(#{1,6})\s+(.+)$/.exec(s);if(!h)continue;p++;let v=h[1].length;v<=3&&a.push({id:"md-h-"+p,level:v,text:h[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},oa=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},Ma=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},Ta=({n:t=0,color:a="#ff9a72",size:r=30})=>{let p=Math.max(2,Math.min(6,Number(t)||2)),c=Array.from({length:p},(s,h)=>{let v=-Math.PI/2+h*Math.PI*2/p,x=h%2?13:16;return[20+Math.cos(v)*x,20+Math.sin(v)*x]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:r,height:r,viewBox:"0 0 40 40","aria-hidden":"true",children:[c.map(([s,h],v)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:s,y2:h,stroke:a,strokeOpacity:".35"},"l"+v)),c.map(([s,h],v)=>(0,e.jsx)("circle",{cx:s,cy:h,r:v%2?2.2:1.8,fill:a,fillOpacity:v%2?.8:.55},"c"+v)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},gn=({card:t,t:a,onOpen:r,query:p,onDelete:c,onTagClick:s,pinned:h,onPin:v,links:x})=>{let A=Ze[t.kind]||Ze.other,C=Number(x??t.links??t.weight??0),w=Xt(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${h?" pinned":""}`,onClick:()=>r(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:A,background:A+"18",borderColor:A+"38"},children:Nt[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:a(qe[t.kind]||"kindKnowledge")}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),Cn(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:xt(t.updated)}),v&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${h?" on":""}`,title:a(h?"unpinCard":"pinCard"),"aria-label":a(h?"unpinCard":"pinCard"),onClick:u=>{u.stopPropagation(),v(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:p?Qt(t.title,p):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(Ma(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:p?Qt(t.summary||"",p):oa(t)})]}),p&&(()=>{let u=la(t.body||"",p);return u?(0,e.jsx)("p",{className:"mc-snippet",children:Qt(u,p)}):null})(),Xt(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[Xt(t).slice(0,2).map(u=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:u,onClick:N=>{N.stopPropagation(),s&&s(u)},children:["#",u]},u)),w.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",w.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[C>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(Ta,{n:C,color:A})," ",(0,e.jsx)("b",{children:C})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Ct(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:u=>{u.stopPropagation(),window.confirm(a("deleteConfirm"))&&c&&c(t.path)},children:"\u{1F5D1}"})]})]})};function fn({t,tab:a,onReload:r,version:p}){let[c,s]=(0,o.useState)(null),[h,v]=(0,o.useState)(""),[x,A]=(0,o.useState)(null),[C,w]=(0,o.useState)(null),[u,N]=(0,o.useState)(null),[M,O]=(0,o.useState)(null),[k,H]=(0,o.useState)(null),[I,ce]=(0,o.useState)(null),Y=(0,o.useCallback)(async()=>{W("align");try{let d=await fetch($+"/align").then(R=>R.json());d&&d.findings?ce(d):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{W("")}},[t]),ee=async()=>{if(window.confirm(t("alignFixConfirm"))){W("alignfix");try{let d=await fetch($+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(R=>R.json());d&&d.ok?(notify(t("alignFixed")),await Y()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{W("")}}},[Me,Se]=(0,o.useState)([]),[X,W]=(0,o.useState)(""),[U,ue]=(0,o.useState)(!1),Ye=(0,o.useCallback)(async()=>{if(!(!x||!x.merge||!x.merge.length)&&window.confirm(t("mergeAllConfirm"))){W("merge");try{let d={},R=J=>d[J]===void 0?J:d[J]=R(d[J]),B=(J,Ce)=>{d[R(J)]=R(Ce)},ae=new Set;for(let J of x.merge)ae.add(J.a.path),ae.add(J.b.path),B(J.a.path,J.b.path);let De={};for(let J of ae){let Ce=R(J);(De[Ce]=De[Ce]||[]).push(J)}let oe=0;for(let J of Object.values(De)){if(J.length<2)continue;(await fetch(`${$}/merge?paths=${encodeURIComponent(J.join(","))}`).then(se=>se.json())).ok&&oe++}await L(),r&&r()}catch{}W("")}},[x,L,r,t]);async function L(){try{let d=await Promise.all([fetch(`${$}/stats`),fetch(`${$}/budget`),fetch(`${$}/capture-log`),fetch(`${$}/cards?status=all&limit=30&agent=${Ht}`),fetch(`${$}/overview`),fetch(`${$}/ledger?days=7`)]),[R,B,ae,De,oe,J]=await Promise.all(d.map(Ce=>Ce.json()));R&&R.ok&&s(R),B&&B.ok&&w(B),ae&&ae.ok&&N(ae),De&&De.ok&&Se(De.cards||[]),oe&&oe.ok&&O({db:oe.db,backups:oe.backups,total:oe.total,version:oe.version,degraded:oe.degraded===!0}),H(J&&J.ok?J:{ok:!1,error:J&&J.error||""}),v(!R||!R.ok?t("adminLoadFail"):"")}catch{v(t("adminLoadFail"))}}let Be=(0,o.useCallback)(async()=>{W("scan");try{let d=await fetch(`${$}/optimize`).then(R=>R.json());d.ok&&A(d)}catch{v(t("adminLoadFail"))}finally{W("")}},[t]),[b,_]=(0,o.useState)(null),G=(0,o.useCallback)(async()=>{W("refine");try{let d=await fetch(`${$}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(R=>R.json());d&&d.ok?_(d):notify(d&&d.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{W("")}},[t]),F=async(d,R)=>{if(!(R==="merge"&&!window.confirm(t("mergeConfirm")))){W("refineapply");try{let B=await fetch(`${$}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:d.a.path,b:d.b.path,action:R,relation:d.relation})}).then(ae=>ae.json());B&&B.ok?(notify(t("refineApplied")),_(ae=>ae&&{...ae,findings:(ae.findings||[]).filter(De=>!(De.a.path===d.a.path&&De.b.path===d.b.path))}),await L(),r&&r()):notify(B&&B.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{W("")}}},[Le,ge]=(0,o.useState)(null),le=(0,o.useCallback)(async()=>{W("junk");try{let d=await fetch(`${$}/refine-junk`).then(R=>R.json());d&&d.ok?ge(d.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{W("")}},[t]),fe=async d=>{if(d.length&&window.confirm(t("junkRecycleAllConfirm"))){W("junkpurge");try{let R=await fetch(`${$}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d})}).then(B=>B.json());R&&R.removed?(notify(t("junkDone")+"\uFF1A"+R.removed.length+(R.failed?.length?"\uFF08\u5931\u8D25 "+R.failed.length+"\uFF09":"")),ge(B=>B&&B.filter(ae=>!R.removed.includes(ae.path))),await L(),r&&r()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{W("")}}},[S,ne]=(0,o.useState)(null),Z=(0,o.useCallback)(async()=>{W("goals");try{let d=await fetch($+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(R=>R.json());d&&d.ok?ne(d):notify(d&&d.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{W("")}},[t]),Te=async d=>{W("goalskeep");try{let R=await fetch($+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d.members.map(B=>B.path)})}).then(B=>B.json());R&&R.ok?(notify(t("goalDone")),ne(B=>B&&{...B,clusters:(B.clusters||[]).filter(ae=>ae.goal!==d.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{W("")}},K=async d=>{if(window.confirm(t("mergeConfirm"))){W("goalsmerge");try{let R=await fetch($+"/merge?paths="+encodeURIComponent(d.members.map(B=>B.path).join(","))).then(B=>B.json());R&&R.ok?(notify(t("goalMerged")),ne(B=>B&&{...B,clusters:(B.clusters||[]).filter(ae=>ae.goal!==d.goal)}),await L(),r&&r()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{W("")}}};(0,o.useEffect)(()=>{L()},[p]);let Ie=async(d,R)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${$}/merge?paths=${encodeURIComponent(d+","+R)}`).then(ae=>ae.json())).ok&&(await L(),r&&r())}catch{}},Ee=async d=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${$}/delete?path=${encodeURIComponent(d)}`).then(B=>B.json())).ok&&(await L(),r&&r())}catch{}},Ge=["project","knowledge","content","prompt","business","tool","mistake"],Je=({title:d,kind:R,updated:B,path:ae})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:ft.colors[R]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:xt(B)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ee(ae),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[h&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",h]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:L,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:M?`${M.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>L(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:M?M.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:M?.db?.journalMode||M?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:M?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:M?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(M.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:u?.available?u.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:u?.health?.lastAt?xt(new Date(u.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:M?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>L(),children:["\u21BB ",t("refresh")]})]}),M?(()=>{let d=M.db||{},R=d.writable!==!1&&!d.corrupt,B=M.backups||{count:0,newestAt:0},ae=B.newestAt?Math.floor((Date.now()-Number(B.newestAt))/864e5):-1,De=B.count?ae>7?"warn":"ok":"bad",oe=u&&u.available?u.health:null,J=oe?oe.ok?"ok":"warn":"none",Ce=I&&I.findings?I.onDisk&&I.residentServed===I.onDisk&&I.hostVersion===I.onDisk?"ok":"warn":"none",se={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},m=[{label:t("healthDb"),level:R?"ok":"bad",text:R?"journal="+(d.journalMode||"?")+(d.checkedAt?" \xB7 "+new Date(d.checkedAt).toLocaleString():""):(d.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:De,text:B.count?(ae<=0?t("healthBackupToday").replace("{n}",String(B.count)):t("healthBackupAge").replace("{n}",String(B.count)).replace("{d}",String(ae)))+(B.files&&B.files.length?" \xB7 "+B.files[B.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:J,text:oe?oe.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(oe.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:Ce,text:Ce==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(I.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(I.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(I.hostVersion||"?"),action:Ce==="none"?{label:t("alignRun"),run:Y}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:m.map(l=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:se[l.level][1]},children:se[l.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:l.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:l.text}),l.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!X,onClick:l.action.run,children:l.action.label})]},l.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9FE} ",t("ledgerTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("ledgerHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>L(),children:["\u21BB ",t("refresh")]})]}),k?k.ok===!1?(0,e.jsxs)("div",{style:{color:"#f59e0b",fontSize:12,padding:"8px 0",lineHeight:1.7},children:["\u26A0 ",/未知接口|404|not found/i.test(String(k.error||""))?t("ledgerNeedRestart"):k.error||t("adminLoadFail")]}):k.totals.recalls+k.totals.captures===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("ledgerNoData")}):(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:8},children:[{k:t("ledgerRecalls"),v:String(k.totals.recalls),s:t("ledgerInjected")+" "+Number(k.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(k.totals.captures),s:t("ledgerLlmCalls")+" "+k.totals.llmCalls+(k.totals.captureFail?" \xB7 \u2717 "+k.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(k.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:k.feedback.rate==null?"\u2014":Math.round(k.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(d=>(0,e.jsxs)("div",{style:{border:"1px solid rgba(127,127,127,.16)",borderRadius:10,padding:"8px 10px"},children:[(0,e.jsx)("div",{style:{fontSize:11,opacity:.6},children:d.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:d.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:d.s})]},d.k))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:8,lineHeight:1.7},children:t("ledgerFormula")})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!X,onClick:Y,children:t(X==="align"?"exporting":"alignRun")}),I&&I.counts&&I.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!X,onClick:ee,children:t(X==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),I&&I.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",I.onDisk||"?",I.residentServed?" \xB7 "+t("alignResident")+" v"+I.residentServed:"",I.hostVersion?" \xB7 "+t("alignHost")+" v"+I.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:I.findings.map((d,R)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:R?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:d.level==="fix"?"#ef4444":d.level==="warn"?"#f59e0b":"#10b981"},children:d.level==="fix"?"\u2717":d.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:d.title}),d.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:d.detail}):null,d.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:d.command})]}):null]},R))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>L(),children:["\u21BB ",t("refresh")]})]}),u?u.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(u.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(u.entries||[]).map((d,R)=>{let B=Xa[d.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:xt(d.time?new Date(d.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:B[1],fontWeight:600},children:[B[0]," ",d.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:d.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d.preview||"",children:d.preview||""})]},R)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",Me.length,"\uFF09"]}),Me.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:Me.map(d=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ze[d.kind]||Ze.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),d.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:xt(d.updated)})]},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),c&&(0,e.jsxs)(e.Fragment,{children:[c.trend&&c.trend.length>0&&(()=>{let d=c.trend,R=Math.max(...d.map(oe=>oe.count),1),B=260,ae=50,De=B/d.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:B,height:ae,style:{display:"block",width:"100%",height:50},children:d.map((oe,J)=>{let Ce=Math.round(oe.count/R*(ae-4));return(0,e.jsx)("rect",{x:J*De+1,y:ae-Ce,width:Math.max(De-2,2),height:Ce,rx:1.5,fill:oe.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:oe.count>0?.85:.35},oe.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:Ge.map(d=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:ft.colors[d]||"#666"}}),t(qe[d]),": ",c.byKind?.[d]||0]},d))})]}),C&&(C.budgetChars||C.recallLimit||C.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:C.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:C.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",C.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",c.todayCards?.length||0,"\uFF09"]}),c.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:c.todayCards.map(d=>(0,e.jsx)(Je,{title:d.title,kind:d.kind,updated:d.updated,path:d.path},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!X,onClick:Be,children:X==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),x&&x.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!X,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){W("oneclick");try{let d=JSON.stringify({cleanupStale:U}),B=await(await fetch(`${$}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:d})).json();B&&B.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${B.plan.merged} ${t("optimizedMerged")}${U?` \xB7 ${B.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await L(),r&&r(),A(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{W("")}}},children:X==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),x&&x.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:U,onChange:d=>ue(d.target.checked)}),t("oneClickAlsoStale")]})]}),!x&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),x&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),x.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!X,onClick:Ye,children:t(X==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),x.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:x.merge.map((d,R)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.a.title," \u21C4 ",d.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(d.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ie(d.a.path,d.b.path),children:t("mergeNow")})]},R))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",x.stale?.length||0,"\uFF09"]}),x.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!X,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;W("clean");let d=0;for(let R of x.stale)try{await fetch(`${$}/delete?path=${encodeURIComponent(R.path)}`),d++}catch{}W(""),notify(`${d} ${t("deletedStale")}`),await L(),r&&r()},children:t("cleanStale")})}),x.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:x.stale.map(d=>(0,e.jsx)(Je,{title:d.title,kind:"other",updated:d.updated,path:d.path},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!X,onClick:G,children:t(X==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),b?.findings?.length?b.findings.map((d,R)=>(0,e.jsxs)("div",{style:{borderTop:R?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:d.relation==="conflict"?"#ef4444":d.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+d.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",d.sim," \xB7 ",d.useModel||""]}),d.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:d.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",d.a.title,(0,e.jsx)("br",{}),"B\uFF1A",d.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>F(d,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>F(d,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>F(d,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>F(d,"merge"),children:t("refineMerge")})]})]},R)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(b?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!X,onClick:le,children:t(X==="junk"?"exporting":"junkScan")}),Le?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!X,onClick:()=>fe(Le.map(d=>d.path)),children:t(X==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),Le?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:Le.map((d,R)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:R?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d.reasons.join("\uFF1B"),children:d.title||d.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:d.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>fe([d.path]),children:t("junkRecycle")})]},R))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(Le?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!X,onClick:Z,children:t(X==="goals"?"exporting":"goalScan")}),S?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",S.cached," / ",S.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),S?.clusters?.length?S.clusters.map((d,R)=>(0,e.jsxs)("div",{style:{borderTop:R?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:d.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",d.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:d.members.map((B,ae)=>(0,e.jsx)("li",{children:B.title},ae))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>Te(d),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!X,onClick:()=>K(d),children:t("goalMerge")})]})]},R)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(S?"goalNone":"goalIdle")})]})]})]})]})}var Zt=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function bn({t,newCard:a,setNewCard:r,onCreated:p}){if(!a)return null;let c=Zt.find(w=>w.key===a.template),s=a.body||(c?t(c.bodyKey):""),h=a.kind||(c?c.kind:"knowledge"),v=a.tags||(c?t(c.tagKey):""),x=a._creating,A=w=>{let u=Zt.find(N=>N.key===w);r(N=>({...N,template:w,kind:u?u.kind:N.kind,body:u?t(u.bodyKey):N.body,tags:u?t(u.tagKey):N.tags}))},C=async()=>{if(!(!a.title&&!s)){r(w=>({...w,_creating:!0}));try{(await fetch(`${$}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:h,tags:v.split(",").map(u=>u.trim()).filter(Boolean),body:s,source:"manual"})}).then(u=>u.json())).ok?(r(null),p&&p()):r(u=>({...u,_creating:!1}))}catch{r(u=>({...u,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>r(null),children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:w=>w.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>r(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[Zt.map(w=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===w.key?" me-on":""}`,onClick:()=>A(w.key),children:t(w.label)},w.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>r(w=>({...w,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:h,onChange:w=>r(u=>({...u,kind:w.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:["project","knowledge","content","prompt","business","tool","mistake"].map(w=>(0,e.jsx)("option",{value:w,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:w},w))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:w=>r(u=>({...u,title:w.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:v,onChange:w=>r(u=>({...u,tags:w.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:s,onChange:w=>r(u=>({...u,body:w.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:x,onClick:C,children:t(x?"exporting":"createCard")})})]})]})]})}async function aa(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let r=document.createElement("textarea");r.value=a,r.setAttribute("readonly",""),r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();let p=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(r),p}catch{return!1}}function hn({t,onClose:a}){let[r,p]=(0,o.useState)(""),[c,s]=(0,o.useState)(""),[h,v]=(0,o.useState)(""),[x,A]=(0,o.useState)(!0),[C,w]=(0,o.useState)(!1),[u,N]=(0,o.useState)(""),[M,O]=(0,o.useState)(""),k=(0,o.useRef)(null),H=(0,o.useRef)(null),I=()=>{let U=k.current;if(U)try{U.focus(),U.select()}catch{}},ce=U=>{N(U),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>N(""),2400)};(0,o.useEffect)(()=>{let U=!0;return fetch($+"/diagnostics").then(ue=>ue.json()).then(ue=>{U&&(ue&&ue.ok?(s(String(ue.diagnostics||"")),v(String(ue.version||""))):w(!0))}).catch(()=>{U&&w(!0)}).finally(()=>{U&&A(!1)}),()=>{U=!1}},[]),(0,o.useEffect)(()=>{let U=ue=>{ue.key==="Escape"&&a()};return window.addEventListener("keydown",U),()=>{window.removeEventListener("keydown",U),H.current&&clearTimeout(H.current)}},[a]);let Y=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),ee=()=>{let U=r.trim().split(`
|
|
815
|
-
`)[0]||"",ue=ca({title:"[Bug] "+(U.slice(0,60)||"memory-eternal \u95EE\u9898"),body:pa({description:r,diagnostics:c,version:h})});try{window.open(ue,"_blank","noopener")}catch{ce(t("fbCopyFail"))}},Me=async()=>{await aa(c)?(O(""),ce(t("fbCopiedDiag"))):(O(c),ce(t("fbCopyManual")))},Se=async()=>{let U=ma({lang:Y,description:r,diagnostics:c});await aa(U)?(O(""),ce(t("fbCopiedPrompt"))):(O(U),ce(t("fbCopyManual")))},X={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},W={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:U=>U.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:r,onChange:U=>p(U.target.value),placeholder:t("fbDesc"),rows:5,style:X}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Me,disabled:!c,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:W,children:x?t("fbLoading"):C?t("fbDiagFail"):c})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!r.trim()){ce(t("fbNeedDesc"));return}ee()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Se,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),u&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:u}),M&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:I,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:k,readOnly:!0,value:M,rows:7,style:X})]})]})]})]})}function yn({t,tab:a,onTab:r,onClose:p,onFeedback:c,onReplay:s}){let[h,v]=(0,o.useState)(null);(0,o.useEffect)(()=>{if(!h)return;let w=u=>{u.key==="Escape"&&v(null)};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[h]);let x=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],A="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",C=(w,u)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:w,alt:u,loading:"lazy",title:t("clickToZoom"),onClick:N=>v(N.currentTarget.currentSrc||w),onError:N=>{let M=N.currentTarget;M.dataset.fb||(M.dataset.fb="1",M.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(w).split("/").pop())}}),(0,e.jsx)("figcaption",{children:u})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:p,children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:w=>w.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:p,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:x.map(w=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===w.id?" active":""}`,onClick:()=>r(w.id),children:w.label},w.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsx)("div",{className:"me-support-qr",children:C("support/group-qr.jpg",t("supportGroup"))}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:A,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[C("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),C("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:A,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:c,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:s,children:["\u2728 ",t("supportReplay")]})]})]}),h&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:w=>{w.stopPropagation(),v(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:w=>{w.stopPropagation(),v(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:h,alt:"",onClick:w=>w.stopPropagation()})]})]})}function vn({t,onDone:a}){let[r,p]=(0,o.useState)(0),c="https://github.com/EternalNight996/memory-eternal",s=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],h=r===s.length-1;return(0,o.useEffect)(()=>{let v=x=>{x.key==="Escape"&&a()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:s.map((v,x)=>(0,e.jsx)("span",{className:`me-guide-dot${x<=r?" on":""}`},x))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:s[r].title}),(0,e.jsx)("p",{children:s[r].body}),r===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>ea(c),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ea(c+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),r===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),r===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),r===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),r>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>p(v=>v-1),children:t("onboardBack")}),h?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>p(v=>v+1),children:t(r===0?"onboardStarred":"onboardNext")})]})]})]})}function xn({t,card:a,query:r,onClose:p,onDelete:c,onFeedback:s,onNavigate:h,onTagClick:v,allCards:x,onOpenRelated:A}){let[C,w]=(0,o.useState)(0),[u,N]=(0,o.useState)(""),[M,O]=(0,o.useState)(()=>{try{let _=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(_)?_:"mid"}catch{return"mid"}}),k={narrow:720,mid:900,wide:1180};(0,o.useEffect)(()=>{let _=G=>{if(G.key==="Escape"){p();return}let F=String(G.target&&G.target.tagName||"").toLowerCase();F==="input"||F==="textarea"||F==="select"||G.target&&G.target.isContentEditable||(G.key==="j"&&h?(G.preventDefault(),h(1)):G.key==="k"&&h&&(G.preventDefault(),h(-1)))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[p,h]);let H=async(_,G)=>{let F=await aa(String(_||""));N(F?t("copied")+" \xB7 "+G:t("copyFail")),setTimeout(()=>N(""),1500)},{meta:I,body:ce}=(0,o.useMemo)(()=>$t(a.text||""),[a.text]),Y=_=>{let G=I.find(([F])=>String(F).toLowerCase()===_);return G?G[1]:""},ee=sa(Y("tags")),Me=Y("kind")||"knowledge",Se=(Y("status")||"approved").toLowerCase(),X=Ze[Me]||"#6B7280",W=(ce||"").length>460,U=(0,o.useMemo)(()=>Na(ce,a.title),[ce,a.title]),ue=(0,o.useMemo)(()=>{let _=oa(a);if(_)return _;let F=(U.split(/\r?\n/).map(Le=>Le.trim()).find(Le=>Le&&!/^#{1,2}\s/.test(Le))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return F.length>150?F.slice(0,148)+"\u2026":F},[a,U]),Ye=(0,o.useMemo)(()=>un(U),[U]),L=(0,o.useMemo)(()=>{let _=new Set(ee);return(x||[]).filter(G=>G.path!==a.path&&(G.tags||[]).some(F=>_.has(F))).slice(0,3)},[x,a.path,ee.join("|")]),[Be,b]=(0,o.useState)(!0);return(0,e.jsxs)("div",{className:"me-overlay",onClick:p,children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:_=>_.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:Nt[Me]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[u&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:u}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>H(ce,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>H(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let _=["narrow","mid","wide"],G=_[(_.indexOf(M)+1)%_.length];O(G);try{localStorage.setItem("me-read-width",G)}catch{}},children:[t("readWidth")," \xB7 ",t(M==="narrow"?"widthNarrow":M==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!1),children:["\u{1F44E} ",t("fbIrr")]}),W&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":Be,onClick:()=>b(_=>!_),children:t(Be?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&c&&c(a.path)},children:t("delete")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:p,children:t("close")})]})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:X,borderColor:X+"59",background:X+"1a"},children:[Nt[Me]||"\u{1F4CE}"," ",t(qe[Me]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(Se==="approved"?"md-chip-st-ok":Se==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[Se==="approved"?"\u2705":Se==="pending"?"\u23F3":"\u26D4"," ",t(Se==="approved"?"statusApproved":Se==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(ee)?ee:[]).slice(0,8).map(_=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:_,onClick:()=>v&&v(_),children:["\u{1F3F7} ",_]},_)),!!Y("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",xt(Y("updated"))]}),!!Y("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",Y("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:C+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:k[M],margin:"0 auto",width:"100%",boxSizing:"border-box",...Be?{}:{maxHeight:300,overflow:"hidden"}},onScroll:_=>{let G=_.currentTarget,F=G.scrollHeight-G.clientHeight;w(F<=0?100:Math.min(100,Math.max(0,G.scrollTop/F*100)))},onClick:Be?void 0:_=>{_.stopPropagation(),b(!0)},children:[!!ue&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(Ma(a))}),(0,e.jsx)("p",{children:ue})]}),(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Yt(U)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[Ye.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:Ye.map((_,G)=>(0,e.jsxs)("button",{type:"button",className:`lv${_.level}`,onClick:()=>{let F=document.getElementById(_.id);F&&F.scrollIntoView({block:"start",behavior:"smooth"})},children:[(0,e.jsx)("span",{children:String(G+1).padStart(2,"0")}),_.text]},_.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:Y("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:xt(Y("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),ee.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:ee.slice(0,8).map(_=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>v&&v(_),children:["#",_]},_))})]}),L.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:L.map(_=>(0,e.jsxs)("button",{type:"button",onClick:()=>A&&A(_),children:[(0,e.jsx)("span",{children:Nt[_.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:_.title})]},_.path))})]})]})]}),!Be&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:_=>{_.stopPropagation(),b(!0)},children:[t("expand")," \u2304"]})]})]})}function wn({t,onOpen:a,all:r,onAllChange:p,onMutate:c,active:s,visible:h}){let[v,x]=(0,o.useState)(null),[A,C]=(0,o.useState)(""),w=(0,o.useRef)(!1),u=(0,o.useRef)(0),N=(0,o.useRef)(t);N.current=t;let M=(0,o.useCallback)(async()=>{try{w.current=!1;let I=await(await fetch(`${$}/graph${r?"?all=1":""}`)).json();I.ok?(x(I),C(""),w.current=!0):(x(null),C(I.error||t("error")))}catch(H){C(String(H&&H.message?H.message:H))}},[r,t]);(0,o.useEffect)(()=>{if(!s||w.current)return;let H=!0;return fetch(`${$}/graph${r?"?all=1":""}`).then(I=>I.json()).then(I=>{H&&(I.ok?(x(I),C(""),w.current=!0):(x(null),C(I.error||t("error"))))}).catch(I=>{H&&C(String(I&&I.message?I.message:I))}),()=>{H=!1}},[r,t,s]),(0,o.useEffect)(()=>{h&&v&&u.current++},[h,v]);let O=(0,o.useCallback)(async H=>{try{let ce=await(await fetch(`${$}/delete?path=${encodeURIComponent(H)}`)).json();return ce&&ce.ok?(await M(),c&&c(),!0):!1}catch{return!1}},[M]),k=(0,o.useCallback)(async H=>{if(!H||H.length<2)return!1;try{let I=await fetch(`${$}/merge?paths=${encodeURIComponent(H.join(","))}`).then(ce=>ce.json());return I&&I.ok?(await M(),c&&c(),!0):!1}catch{return!1}},[M,c]);return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:Qe}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:v?`${v.nodes.length} ${t("nodes")} \xB7 ${ya(v.edges)} ${t("edges")}`:""})]}),A&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",A]}),!v&&!A&&(0,e.jsx)(Ra,{text:t("loadingGraph")}),v&&v.nodes.length===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("emptyGraph")}),v&&v.nodes.length>0&&(0,e.jsx)(kn,{nodes:v.nodes,edges:v.edges,onOpen:a,onDelete:O,onMerge:k,t,all:r,onAllChange:p,countLabel:`${v.nodes.length} ${t("nodes")} \xB7 ${ya(v.edges)} ${t("edges")}`,fitTrigger:u.current})]})}function ya(t){let a=new Set;for(let r of t||[])a.add([r.source,r.target].sort().join("|"));return a.size}var ft={colors:{project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function Rt(t,a){try{let r=globalThis;if(r.__meGraphDrawWarned)return;r.__meGraphDrawWarned=!0,console.warn("[memory-eternal] \u77E5\u8BC6\u56FE\u8C31\u7ED8\u5236\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09"+(a?" @ "+a:""),t)}catch{}}function ia({value:t,small:a}){let r=typeof t=="number"&&Number.isFinite(t),p=r?Math.max(0,Math.min(100,t)):0;return(0,e.jsx)("div",{className:"me-progress"+(a?" me-progress-sm":"")+(r?" is-determinate":""),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r?Math.round(p):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:r?{width:Math.max(3,p)+"%"}:void 0})})}function Ra({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(ia,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}function kn({nodes:t,edges:a,onOpen:r,onDelete:p,onMerge:c,t:s,countLabel:h,all:v,onAllChange:x,fitTrigger:A}){let C=(0,o.useRef)(null),w=(0,o.useRef)(null),u=(0,o.useRef)(null),N=(0,o.useRef)(null),M=(0,o.useRef)(null),O=(0,o.useRef)(r);(0,o.useEffect)(()=>{O.current=r},[r]);let k=(0,o.useRef)(p);(0,o.useEffect)(()=>{k.current=p},[p]);let H=(0,o.useRef)(c);(0,o.useEffect)(()=>{H.current=c},[c]);let[I,ce]=(0,o.useState)(""),[Y,ee]=(0,o.useState)(null),[Me,Se]=(0,o.useState)(null),X=(0,o.useRef)("");(0,o.useEffect)(()=>{X.current=I.trim().toLowerCase()},[I]),(0,o.useEffect)(()=>{let m=u.current;if(!m)return;let l=I.trim().toLowerCase();if(!l)return;let te=m.nodes.find(xe=>(xe.name||"").toLowerCase().includes(l));if(te){u.current.selectedId=te.id,ee(te.id),m.panX=m.w/2-te.x*m.zoom,m.panY=m.h/2-te.y*m.zoom;try{m.render&&m.render()}catch(xe){Rt(xe,"search-center")}}},[I]);let[W,U]=(0,o.useState)("all"),[ue,Ye]=(0,o.useState)(!1),L=(0,o.useRef)("all"),[Be,b]=(0,o.useState)(""),_=(0,o.useRef)(""),[G,F]=(0,o.useState)(!1),Le=(0,o.useRef)(!1),[ge,le]=(0,o.useState)(null);(0,o.useEffect)(()=>{L.current=W},[W]),(0,o.useEffect)(()=>{_.current=Be},[Be]),(0,o.useEffect)(()=>{Le.current=G},[G]);let fe=(0,o.useMemo)(()=>{let m=new Map;for(let l of t)for(let te of l.tags||[]){let xe=String(te).trim();xe&&m.set(xe,(m.get(xe)||0)+1)}return[...m.entries()].sort((l,te)=>te[1]-l[1]).slice(0,24).map(([l,te])=>({tag:l,n:te}))},[t]),S=(0,o.useMemo)(()=>{let m={};for(let l of t)m[l.kind||"other"]=(m[l.kind||"other"]||0)+1;return m},[t]),ne=(()=>{let m=I.trim().toLowerCase();return!!m&&!t.some(l=>(l.title||l.name||"").toLowerCase().includes(m)||String(l.kind||"").toLowerCase().includes(m)||String(qe[l.kind]||"").toLowerCase().includes(m))})();(0,o.useEffect)(()=>{let m=u.current;m&&m.wake&&m.wake()},[I]),(0,o.useEffect)(()=>{let m=u.current;if(!(!m||!m.render))try{m.render()}catch(l){Rt(l,"filter/timeDim")}},[W,Be,G]);let Z=(0,o.useRef)(null),[Te,K]=(0,o.useState)([]),[Ie,Ee]=(0,o.useState)(null),[Ge,Je]=(0,o.useState)(!1),[d,R]=(0,o.useState)(null),[B,ae]=(0,o.useState)(""),De=(0,o.useRef)(null),oe=(0,o.useRef)(null),J=(m,l=!0)=>{De.current&&clearTimeout(De.current),R({msg:m,ok:l}),De.current=setTimeout(()=>R(null),1900)},Ce=m=>{ae(m),oe.current&&clearTimeout(oe.current),oe.current=setTimeout(()=>ae(""),1600)};(0,o.useEffect)(()=>()=>{De.current&&clearTimeout(De.current),oe.current&&clearTimeout(oe.current)},[]);let se=(0,o.useMemo)(()=>t.reduce((m,l)=>(m[l.id]=l,m),{}),[t]);return(0,o.useEffect)(()=>{let m=C.current;if(!m||t.length===0)return;let l=m.getContext("2d");if(!l)return;let te=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),xe=()=>document.documentElement.getAttribute("data-theme")==="dark",ze={};a.forEach(f=>{ze[f.source]=(ze[f.source]||0)+1,ze[f.target]=(ze[f.target]||0)+1});let Pe=Math.max(1,...Object.values(ze)),n={nodes:t.map(f=>({id:f.id,name:f.title||"",type:f.kind||"other",r:9+Math.min(10,(ze[f.id]||0)/Pe*8),x:0,y:0,vx:0,vy:0})),edges:a.map(f=>({sourceNodeId:f.source,targetNodeId:f.target,weight:1})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:te,ctx:l,multi:[],marquee:null};n.domain=t,n.domainById=t.reduce((f,z)=>(f[z.id]=z,f),{}),n.nodes.forEach((f,z)=>{let T=z*2.399963229728653,P=12*Math.sqrt(z);f.x=Math.cos(T)*P,f.y=Math.sin(T)*P});let tt=[...new Set(n.nodes.map(f=>f.type))];n.clustered=tt.length>1,n.typeCenters={},tt.forEach((f,z)=>{let T=z/tt.length*Math.PI*2-Math.PI/2;n.typeCenters[f]={x:Math.cos(T)*160,y:Math.sin(T)*160}}),u.current=n;let dt=0,wt=0,Xe=null,Ke="",bt=()=>{let f=m.clientWidth,z=m.clientHeight;n.w=f,n.h=z,m.width=f*te,m.height=z*te,l.setTransform(te,0,0,te,0,0),(dt===0||wt===0)&&f>0&&z>0&&n.tickCount>0&&requestAnimationFrame(()=>_e()),dt=f,wt=z};bt();let ct=new ResizeObserver(bt);ct.observe(m.parentElement);let Dt=(f,z)=>f&&f.length>z?f.slice(0,z)+"\u2026":f,pt=(f,z,T,P)=>{if(l.beginPath(),P==="rect")l.rect(f-T,z-T*.75,T*2,T*1.5);else if(P==="diamond")l.moveTo(f,z-T),l.lineTo(f+T,z),l.lineTo(f,z+T),l.lineTo(f-T,z),l.closePath();else if(P==="hexagon"){for(let V=0;V<6;V++){let pe=Math.PI/3*V-Math.PI/2,we=f+T*Math.cos(pe),Ae=z+T*Math.sin(pe);V===0?l.moveTo(we,Ae):l.lineTo(we,Ae)}l.closePath()}else l.arc(f,z,T,0,Math.PI*2)},kt=new Map,ke=(f,z)=>{let T=f+"|"+Math.round(z),P=kt.get(T);if(!P){let V=parseInt(f.slice(1,3),16),pe=parseInt(f.slice(3,5),16),we=parseInt(f.slice(5,7),16);P=l.createRadialGradient(-z*.3,-z*.3,0,0,0,z*1.2),P.addColorStop(0,"rgba("+Math.min(255,V+70)+","+Math.min(255,pe+70)+","+Math.min(255,we+70)+",0.95)"),P.addColorStop(1,f),kt.set(T,P)}return P},Oe=1.1,We=3,_e=()=>{if(!n.nodes.length)return;let f=1/0,z=-1/0,T=1/0,P=-1/0;n.nodes.forEach(ot=>{f=Math.min(f,ot.x),z=Math.max(z,ot.x),T=Math.min(T,ot.y),P=Math.max(P,ot.y)});let V=20,pe=z-f+V*2,we=P-T+V*2,Ae=Math.min(n.w/pe,n.h/we),rt=Math.pow(1/Oe,We);n.zoom=Math.max(.35,Math.min(1.8,Ae*rt)),n.panX=n.w/2-(f+z)/2*n.zoom,n.panY=n.h/2-(T+P)/2*n.zoom};N.current=_e;let nt=()=>{l.clearRect(0,0,n.w,n.h),n.searchTerm=X.current,n.kindFilter=L.current,n.timeMode=Le.current,n.tagFilter=_.current;let f=n.tagFilter,z=n.kindFilter,T=y=>String(y||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");l.save();let P=n.w+"x"+n.h;if(!Xe||Ke!==P){Xe=new Path2D;for(let y=0;y<n.w;y+=24)Xe.moveTo(y,0),Xe.lineTo(y,n.h);for(let y=0;y<n.h;y+=24)Xe.moveTo(0,y),Xe.lineTo(n.w,y);Ke=P}l.strokeStyle=xe()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",l.lineWidth=.5,l.stroke(Xe),l.restore(),l.save(),l.translate(n.panX,n.panY),l.scale(n.zoom,n.zoom);let V={};n.nodes.forEach(y=>V[y.id]=y);let pe=n.nodes.length>40,we=pe?1.5:.55,Ae=n.selectedId||n.hoverId,rt=ua({panX:n.panX,panY:n.panY,zoom:n.zoom,w:n.w,h:n.h,margin:80}),ot=(()=>{let y=(n.searchTerm||"").toLowerCase();if(!y)return null;let me=[];for(let he of n.nodes){let Ue=(n.domainById[he.id]||{}).kind||"other";if(((he.name||"").toLowerCase().includes(y)||String(qe[Ue]||"").toLowerCase().includes(y)||String(Ue).toLowerCase().includes(y))&&me.push(he.id),me.length>200)break}return me})(),Ne=fa(n.nodes,{limit:ga(n.nodes.length),focusId:Ae,hoverId:n.hoverId,searchHits:ot,degree:ze}),Re=new Map,at=(y,me)=>{let he=y+"|"+me,Fe=Re.get(he);return Fe===void 0&&(l.font=y,Fe=l.measureText(me).width,Re.set(he,Fe)),Fe},mt=n.nodes.length<=250,st=new Map,ht=n.nodes.length>1200&&n.zoom<.3;n.edges.forEach(y=>{if(ht)return;let me=V[y.sourceNodeId],he=V[y.targetNodeId];if(!me||!he||!Gt(me.x,me.y,10,rt)&&!Gt(he.x,he.y,10,rt))return;if(z!=="all"){let At=n.domainById[y.sourceNodeId]&&n.domainById[y.sourceNodeId].kind,gt=n.domainById[y.targetNodeId]&&n.domainById[y.targetNodeId].kind;if(At!==z&>!==z)return}if(f){let At=n.domainById[y.sourceNodeId]&&(n.domainById[y.sourceNodeId].tags||[]).includes(f),gt=n.domainById[y.targetNodeId]&&(n.domainById[y.targetNodeId].tags||[]).includes(f);if(!At&&!gt)return}let Fe=he.x-me.x,Ue=he.y-me.y,et=Math.sqrt(Fe*Fe+Ue*Ue)||1,vt=pe?12:18,St=-Ue/et*vt,Et=Fe/et*vt,Ot=(me.x+he.x)/2+St,Wt=(me.y+he.y)/2+Et,jt=ft.colors[n.domainById[me.id]&&n.domainById[me.id].kind||"other"]||ft.colors.other,Pt=Ae&&(y.sourceNodeId===Ae||y.targetNodeId===Ae),Kt=Ae?Pt?.6:.08:pe?.14:.24,ut=parseInt(jt.slice(1,3),16),Ft=parseInt(jt.slice(3,5),16),Vt=parseInt(jt.slice(5,7),16),lt=Pt?1.6+(y.weight||1):.8+(y.weight||1)*.5,Tt=ut+","+Ft+","+Vt+","+Kt+","+lt,it=st.get(Tt);it||(it={path:new Path2D,stroke:"rgba("+ut+","+Ft+","+Vt+","+Kt+")",width:lt},st.set(Tt,it)),it.path.moveTo(me.x,me.y),it.path.quadraticCurveTo(Ot,Wt,he.x,he.y)}),st.forEach(y=>{l.strokeStyle=y.stroke,l.lineWidth=y.width,l.stroke(y.path)});let $e=null;Ae&&($e=new Set,n.edges.forEach(y=>{y.sourceNodeId===Ae?$e.add(y.targetNodeId):y.targetNodeId===Ae&&$e.add(y.sourceNodeId)}));let yt=[];if(n.nodes.forEach(y=>{if(!Gt(y.x,y.y,y.r+2,rt))return;let me=n.domainById[y.id]||{},he=me.kind||"other",Fe=n.timeMode?Sn(me.updated):ft.colors[he]||ft.colors.other,Ue=ft.shapes[he]||"circle",et=n.selectedId===y.id,vt=n.hoverId===y.id,St=n.searchTerm||"",Et=!St||(y.name||"").toLowerCase().includes(St)||String(qe[he]||"").toLowerCase().includes(St)||String(he).toLowerCase().includes(St),Ot=z==="all"||he===z,Wt=!f||(me.tags||[]).includes(f),jt=Ae&&y.id!==Ae&&!($e&&$e.has(y.id))||St&&!Et||!Ot||!Wt;l.save(),l.globalAlpha=jt?.08:1,(et||vt)&&mt&&(l.shadowColor=Fe,l.shadowBlur=et?20:14),l.translate(y.x,y.y),pt(0,0,y.r,Ue),l.fillStyle=ke(Fe,y.r),l.fill(),l.restore(),et?(l.save(),pt(y.x,y.y,y.r+3,Ue),l.strokeStyle=Fe,l.lineWidth=3,l.shadowColor=Fe,l.shadowBlur=12,l.stroke(),l.restore()):vt?(l.save(),pt(y.x,y.y,y.r+2,Ue),l.strokeStyle=Fe,l.lineWidth=2,l.stroke(),l.restore()):St&&Et?(l.save(),pt(y.x,y.y,y.r+2,Ue),l.strokeStyle="#e11d48",l.lineWidth=2,l.stroke(),l.restore()):n.multi.indexOf(y.id)>=0&&(l.save(),pt(y.x,y.y,y.r+2,Ue),l.strokeStyle="#60a5fa",l.lineWidth=2,l.shadowColor="#60a5fa",l.shadowBlur=8,l.stroke(),l.restore());let Pt=Dt(y.name,16);if((et||vt||Ne.has(y.id)&&n.zoom>we||!pe&&n.zoom>.6)&&Ot&&Wt){let ut=1/n.zoom,Ft="500 "+(12*ut).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";l.font=Ft;let lt=at(Ft,Pt)+16*ut,Tt=18*ut,it=y.y+y.r+8*ut,At=!0;for(let gt of yt)if(y.x-lt/2<gt.x+gt.w&&y.x+lt/2>gt.x&&it<gt.y+gt.h&&it+Tt>gt.y){At=!1;break}if(!At&&!et&&!vt)return;yt.push({x:y.x-lt/2,y:it,w:lt,h:Tt}),l.fillStyle=xe()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",l.beginPath(),l.roundRect?l.roundRect(y.x-lt/2,it,lt,Tt,4*ut):l.rect(y.x-lt/2,it,lt,Tt),l.fill(),l.strokeStyle=xe()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",l.lineWidth=1*ut,l.stroke(),l.fillStyle=xe()?et||vt?"#eee":"#bbb":et||vt?"#111":"#444",l.textAlign="center",l.fillText(Pt,y.x,it+13*ut)}}),l.restore(),n.marquee){let y=n.marquee,me=Math.min(y.sx,y.ex),he=Math.min(y.sy,y.ey),Fe=Math.abs(y.ex-y.sx),Ue=Math.abs(y.ey-y.sy);l.save(),l.setLineDash([4,4]),l.strokeStyle="rgba(96,165,250,0.9)",l.lineWidth=1,l.fillStyle="rgba(96,165,250,0.12)",l.fillRect(me,he,Fe,Ue),l.strokeRect(me,he,Fe,Ue),l.restore()}if(n.hoverId&&Z.current){let y=n.domainById[n.hoverId],me=n.nodes.find(function(he){return he.id===n.hoverId});if(y&&me){let he=n.edges.filter(function(et){return et.sourceNodeId===y.id||et.targetNodeId===y.id}).length,Fe=me.x*n.zoom+n.panX,Ue=me.y*n.zoom+n.panY;Z.current.style.display="block",Z.current.style.left=Fe+14+"px",Z.current.style.top=Ue-6+"px",Z.current.innerHTML="<b>"+T(y.title||y.name||"")+'</b><br/><span style="opacity:.8">'+T(y.kind||"")+" \xB7 "+tRef.current("connCount").replace("{n}",he)+"</span>"}}else Z.current&&(Z.current.style.display="none")},He=0,je=()=>{He>0||(n.running=!0,n.raf||(n.raf=requestAnimationFrame(zt)))};n.wake=je,n.render=nt;let Mt=()=>{let f=n.nodes.length;n.tickCount++;let T=.9-Math.min(.4,n.tickCount/1500),P=f>1e3?3e3:f>100?2e3:f>50?1200:800,V=f>100?.002:.005,pe=f>1e3?.012:f>100?.005:.01,we=f>1e3?6:f>200?12:24,Ae={};n.nodes.forEach(Ne=>Ae[Ne.id]=Ne);for(let Ne=0;Ne<f;Ne++){if(n.dragNode===n.nodes[Ne])continue;let Re=n.nodes[Ne],at=0,mt=0;for(let $e=0;$e<f;$e++){if(Ne===$e)continue;let yt=Re.x-n.nodes[$e].x,y=Re.y-n.nodes[$e].y,me=Math.sqrt(yt*yt+y*y)||1,he=P/(me*me);at+=yt/me*he,mt+=y/me*he}if(n.clustered&&n.typeCenters[Re.type]){let $e=n.typeCenters[Re.type];at+=($e.x-Re.x)*.006,mt+=($e.y-Re.y)*.006}else at-=Re.x*pe,mt-=Re.y*pe;let st=(Re.vx+at)*T,ht=(Re.vy+mt)*T;st=Math.max(-we,Math.min(we,st)),ht=Math.max(-we,Math.min(we,ht)),Re.vx=st,Re.vy=ht}n.edges.forEach(Ne=>{let Re=Ae[Ne.sourceNodeId],at=Ae[Ne.targetNodeId];if(!Re||!at)return;let mt=at.x-Re.x,st=at.y-Re.y,ht=Math.sqrt(mt*mt+st*st)||1,$e=(ht-100)*V,yt=mt/ht*$e,y=st/ht*$e;n.dragNode!==Re&&(Re.vx+=yt,Re.vy+=y),n.dragNode!==at&&(at.vx-=yt,at.vy-=y)});let rt=0;n.nodes.forEach(Ne=>{n.dragNode!==Ne&&(Ne.x+=Ne.vx,Ne.y+=Ne.vy,rt+=Ne.vx*Ne.vx+Ne.vy*Ne.vy)}),n.autoFitPending&&n.tickCount>45&&(n.autoFitPending=!1,_e()),(f?Math.sqrt(rt/f):0)<.05&&n.tickCount>60&&!n.dragNode?n.quietTicks=(n.quietTicks|0)+1:n.quietTicks=0},zt=()=>{if(n.running){try{Mt(),nt()}catch(f){Rt(f,"step")}if(n.quietTicks>30){n.raf=0;return}n.raf=requestAnimationFrame(zt)}},i=(f,z)=>{let T=m.getBoundingClientRect();return{x:(f-T.left-n.panX)/n.zoom,y:(z-T.top-n.panY)/n.zoom}},j=f=>{let z=n.domainById[f];return!(!z||L.current!=="all"&&z.kind!==L.current||_.current&&!(z.tags||[]).includes(_.current))},E=(f,z,T)=>Math.max(z,Math.min(T,f)),ie=f=>{n.mouseX=f.clientX,n.mouseY=f.clientY;let z=i(f.clientX,f.clientY),T=null;for(let P=n.nodes.length-1;P>=0;P--){let V=n.nodes[P];if(!j(V.id))continue;let pe=V.x-z.x,we=V.y-z.y;if(pe*pe+we*we<V.r*V.r+36){T=V.id;break}}T!==n.hoverId&&(n.hoverId=T,je())},re=f=>{if(f.button!==0)return;let z=i(f.clientX,f.clientY),T=null;for(let P=n.nodes.length-1;P>=0;P--){let V=n.nodes[P];if(!j(V.id))continue;let pe=V.x-z.x,we=V.y-z.y;if(pe*pe+we*we<V.r*V.r+25){T=V;break}}if(f.shiftKey){if(T){n.shiftClick=T.id;return}n.marquee={sx:f.clientX,sy:f.clientY,ex:f.clientX,ey:f.clientY};return}n.userTouched=!0,n.dragStart={x:f.clientX,y:f.clientY,px:n.panX,py:n.panY},n.dragging=!1,n.dragNode=T||null,T&&(n.dragOffset={dx:T.x-z.x,dy:T.y-z.y})},q=f=>{if(n.marquee){n.marquee.ex=f.clientX,n.marquee.ey=f.clientY,je();return}if(!n.dragStart)return;let z=f.clientX-n.dragStart.x,T=f.clientY-n.dragStart.y;if(Math.abs(z)+Math.abs(T)>3&&(n.dragging=!0),n.dragNode){let P=i(f.clientX,f.clientY);n.dragNode.x=P.x+n.dragOffset.dx,n.dragNode.y=P.y+n.dragOffset.dy,je()}else n.dragging&&(n.panX=E(n.dragStart.px+z,-1e5,1e5),n.panY=E(n.dragStart.py+T,-1e5,1e5),je())},ye=f=>{if(n.marquee){let T=n.marquee;n.marquee=null;let P=m.getBoundingClientRect(),V=Math.min(T.sx,T.ex)-P.left,pe=Math.max(T.sx,T.ex)-P.left,we=Math.min(T.sy,T.ey)-P.top,Ae=Math.max(T.sy,T.ey)-P.top,rt=n.nodes.filter(ot=>{let Ne=ot.x*n.zoom+n.panX,Re=ot.y*n.zoom+n.panY;return Ne>=V&&Ne<=pe&&Re>=we&&Re<=Ae}).map(ot=>ot.id);n.multi=rt,K(rt),je();return}let z=n.dragStart&&!n.dragging;if(n.shiftClick){let T=n.shiftClick;n.shiftClick=null;let P=Array.isArray(n.multi)?n.multi.slice():[];P.includes(T)||P.push(T),n.multi=P,K(P),je();return}if(z){let T=i(f.clientX,f.clientY),P=null;for(let V=n.nodes.length-1;V>=0;V--){let pe=n.nodes[V];if(!j(pe.id))continue;let we=pe.x-T.x,Ae=pe.y-T.y;if(we*we+Ae*Ae<pe.r*pe.r+20){P=pe;break}}P?(n.selectedId=P.id,ee(P.id),je()):(n.selectedId=null,n.hoverId=null,f.shiftKey||(n.multi=[],K([])),ee(null),je())}n.dragStart=null,n.dragging=!1,n.dragNode=null},Ve=f=>{f.preventDefault();let z=i(f.clientX,f.clientY),T=null;for(let P=n.nodes.length-1;P>=0;P--){let V=n.nodes[P];if(!j(V.id))continue;let pe=V.x-z.x,we=V.y-z.y;if(pe*pe+we*we<V.r*V.r+25){T=V;break}}if(T){let P=n.domainById[T.id];P&&le({x:f.clientX,y:f.clientY,id:T.id,path:P.id,title:P.title})}else le(null)},g=f=>{f.preventDefault();let z=m.getBoundingClientRect(),T=(f.clientX-z.left-n.panX)/n.zoom,P=(f.clientY-z.top-n.panY)/n.zoom,V=Math.max(.3,Math.min(3,n.zoom*(f.deltaY<0?Oe:1/Oe)));n.panX=E(n.panX+T*(n.zoom-V),-1e5,1e5),n.panY=E(n.panY+P*(n.zoom-V),-1e5,1e5),n.zoom=V,n.userTouched=!0,je()};m.addEventListener("mousemove",ie),m.addEventListener("mousedown",re),window.addEventListener("mousemove",q),window.addEventListener("mouseup",ye),m.addEventListener("wheel",g,{passive:!1}),m.addEventListener("contextmenu",Ve),M.current=()=>{n.selectedId=null,n.hoverId=null,n.multi=[],K([]),n.userTouched=!1,_e(),je()},He=ba(n.nodes.length);let D=He,Q=()=>D>0?Math.round((D-He)/D*100):100;He>0&&Se(0);let be=D>0?[.75,.5,.25].map(f=>Math.round(D*f)):[],de=()=>{if(!n.running)return;let f=performance.now();for(;He>0&&performance.now()-f<12;)Mt(),He--;if(Se(He>0?Math.min(99,Q()):100),be.length&&He<=be[0]){be.shift(),n.userTouched||_e();try{nt()}catch(z){Rt(z,"warm-frame")}}if(He>0){n.userTouched||_e(),n.warmRaf=requestAnimationFrame(de);return}n.warmRaf=0,n.userTouched||_e();try{nt()}catch(z){Rt(z,"warm-final")}Se(null),je()};n.warmStep=de,_e();try{nt()}catch(f){Rt(f,"first-frame")}He>0?n.warmRaf=requestAnimationFrame(de):(Se(0),je());let ve=()=>Ye(!1);return window.addEventListener("mousedown",ve),()=>{n.running=!1,n.raf&&cancelAnimationFrame(n.raf),n.warmRaf&&cancelAnimationFrame(n.warmRaf),ct.disconnect(),m.removeEventListener("mousemove",ie),m.removeEventListener("mousedown",re),window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",ye),m.removeEventListener("wheel",g),m.removeEventListener("contextmenu",Ve),window.removeEventListener("mousedown",ve)}},[t,a]),(0,o.useEffect)(()=>{A!==void 0&&N.current&&requestAnimationFrame(()=>{try{N.current()}catch(m){Rt(m,"fit")}})},[A]),(0,e.jsxs)("div",{className:"me-graph",ref:w,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[t.length," ",s("nodes")," \xB7 ",a.length," ",s("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:s("search"),value:I,onChange:m=>ce(m.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Ye(m=>!m),"aria-expanded":ue,title:s("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",s("filterLabel")," ",W!=="all"||G||Be?"\u25CF":"\u25BE"]}),ue&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:m=>m.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${W==="all"&&!G?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{U("all"),F(!1)},children:s("all")}),Object.keys(Ze).map(m=>(0,e.jsxs)("button",{type:"button",className:`lg${W===m?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>U(l=>l===m?"all":m),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:ft.colors[m]||Ze[m]}}),s(qe[m])]},m)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${G?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>F(m=>!m),children:["\u23F1 ",s("timeDim")]}),fe.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:fe.map(m=>(0,e.jsxs)("button",{type:"button",className:`lg${Be===m.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>b(l=>l===m.tag?"":m.tag),title:m.tag,children:["#",m.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:m.n})]},m.tag))})]}),(W!=="all"||G||Be)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{U("all"),F(!1),b("")},children:[s("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:s("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!v,onChange:m=>x&&x(m.target.checked)}),s("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${G?" me-on":""}`,onClick:()=>F(m=>!m),children:s("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let m=C.current;if(m)try{m.toBlob(l=>{l&&Ee({url:URL.createObjectURL(l),blob:l})},"image/png")}catch{}},children:s("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>N.current&&N.current(),children:s("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{ee(null),U("all"),M.current&&M.current()},children:s("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:C,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),Me!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:10,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(28,28,32,0.86)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",color:"#eee",fontSize:11.5,fontWeight:600,letterSpacing:".02em",pointerEvents:"none",boxShadow:"0 6px 18px rgba(0,0,0,.22)"},children:[(0,e.jsx)(ia,{value:Me,small:!0}),(0,e.jsxs)("span",{children:[s("graphWarming").replace("{n}",t.length)," \xB7 ",Math.round(Me),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(ft.colors).filter(m=>S[m]).map(m=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:ft.colors[m]}}),(0,e.jsx)("span",{children:s(qe[m]||"kindKnowledge")}),(0,e.jsx)("b",{children:S[m]})]},m))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:Z,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),ne&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:s("noMatch")}),ge&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>le(null)}),ge&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:ge.x,top:ge.y,zIndex:31},onMouseDown:m=>m.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",onClick:()=>{O.current({path:ge.path,title:ge.title}),le(null)},children:s("openCard")}),(0,e.jsx)("button",{type:"button",onClick:()=>{ge.id&&(u.current.selectedId=ge.id,ee(ge.id)),le(null);let m=u.current;m&&m.wake&&m.wake()},children:s("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(ge.title||"")}catch{}le(null),J(s("copied"))},children:s("copyName")}),(0,e.jsx)("button",{type:"button",onClick:()=>{let m=u.current,l=m&&Array.isArray(m.multi)?m.multi.slice():[],te=ge.id;if(te&&!l.includes(te)&&l.push(te),le(null),l.length<2){J(s("mergeNeed"),!1);return}if(!window.confirm(s("mergeConfirm")))return;let xe=H.current&&H.current(l);xe&&xe.then?xe.then(ze=>ze?J(s("merged")):J(s("mergeFail"),!1)).catch(()=>J(s("mergeFail"),!1)):xe&&J(s("merged"))},children:s("merge")}),(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let m=ge.path;le(null),window.confirm(s("deleteConfirm"))&&(async()=>{try{(k.current?await k.current(m):!1)?J(s("deleted")):J(s("deleteFail"),!1)}catch{J(s("deleteFail"),!1)}})()},children:s("delete")})]}),Te.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[Te.length," ",s("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let l=Te.map(Pe=>se[Pe]).filter(Boolean).map(Pe=>Pe.title||Pe.name).join(`
|
|
816
|
-
`),
|
|
826
|
+
`);let ne=new Blob([w],{type:$}),ce=await An(ne,D,!1);if(!ce.ok){M({ok:!1,msg:t("exportFail")}),we(!1);return}M({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+ce.name})}catch(l){M({ok:!1,msg:t("exportFail")+" \xB7 "+(l.message||"")})}finally{we(!1)}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2600)},fe=async b=>{let L=b.target.files&&b.target.files[0];if(b.target.value="",!!L){try{let l=await L.text(),w=await(await fetch(`${_}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:l})).json();if(w.ok){await Me();let D=w.imported||0,$=t("importedVault")+"\uFF1A"+D;w.total&&($+=t("importedTotal")+w.total+t("importedTotalTail")),w.quarantined&&($+=t("importedQuarantine")+w.quarantined+t("importedQuarantineTail")),w.skipped&&($+=t("importedSkipped")+w.skipped+t("importedSkippedTail")),w.warning&&($+=" \xB7 "+w.warning),M({ok:D>0||!w.total,msg:$})}else M({ok:!1,msg:w.error||t("importFail")})}catch{M({ok:!1,msg:t("importFail")})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2400)}},ee=(0,n.useMemo)(()=>{let b=y.slice();return oe!=="all"&&(b=b.filter(L=>Nt(L.submittedBy)===oe)),ie!=="all"&&(b=b.filter(L=>(L.status||"approved")===ie)),G&&(b=b.filter(L=>U.has(L.path))),de==="title"?b.sort((L,l)=>String(L.title||"").localeCompare(String(l.title||""))):de==="hot"?b.sort((L,l)=>(l.weight||l.links||0)-(L.weight||L.links||0)):b.sort((L,l)=>new Date(l.updated||0).getTime()-new Date(L.updated||0).getTime()),b},[y,de,oe,ie,G,U]),ae=(0,n.useMemo)(()=>[...new Set(y.map(b=>Nt(b.submittedBy)))],[y]),xe=(0,n.useMemo)(()=>{let b={};for(let L of y){let l=new Set(L.tags||[]),x=0;for(let w of y)w.path!==L.path&&(w.tags||[]).some(D=>l.has(D))&&x++;b[L.path]=x}return b},[y]),[Ge,bt]=(0,n.useState)(null),Be=(0,n.useMemo)(()=>{if(!ee.length)return null;let b=Ge?ee.find(l=>l.path===Ge):null;return b||ee.find(l=>Date.now()-new Date(l.updated||0).getTime()>21*864e5)||ee[0]},[ee,Ge]),Tt=()=>{if(!ee.length)return;let b=ee.findIndex(L=>L.path===(Be&&Be.path));bt(ee[(b+1+ee.length)%ee.length].path)},Wt=!R&&z==="all"&&!J&&ie==="all"&&!!Be,Rt=v==="large"?1.15:v==="compact"?.92:1.06;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5","data-ui-scale":v,style:{height:`calc(100% / ${Rt})`,width:`calc(100% / ${Rt})`,zoom:Rt,display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:Ve}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${u?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:Vt,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(m==="cards"?"cardsTab":m==="graph"?"graphTab":m==="stats"?"tabUsage":m==="audit"?"tabAudit":m==="optimize"?"tabRecycle":m==="terminal"?"terminalTab":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",Pt]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>na("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>f("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),ze&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(ze.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ze.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ze.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:ze.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:Vt,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:i,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),h&&h.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[h.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:h.since?xt(new Date(h.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${q?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[q&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:Vt,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>he(b=>!b),"aria-label":t(q?"collapse":"expand"),title:t(q?"collapse":"expand"),children:q?"\xAB":"\xBB"})]}),q&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="cards"?" active":""}`,onClick:()=>Se("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="graph"?" active":""}`,onClick:()=>Se("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="stats"?" active":""}`,onClick:()=>Se("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="audit"?" active":""}`,onClick:()=>Se("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),Fe>0&&(0,e.jsx)("span",{className:"mc-dot",children:Fe>99?"99+":Fe})]}),q&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="optimize"?" active":""}`,onClick:()=>Se("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),st>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:st>99?"99+":st})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="terminal"?" active":""}`,onClick:()=>Se("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:O,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="config"?" active":""}`,onClick:()=>Se("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),q&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>f("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>f("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>f("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>I(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),q&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:wt,children:[c&&c.db&&c.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",c.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,m==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:c?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",c?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",c?.quarantine?.pending??c?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",c?.quarantine?.rejected??c?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[y.length," / ",dt]})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:R,onChange:b=>Ue(b.target.value)}),J&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>kt(""),children:["\u{1F3F7} ",J," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:j,type:"file",accept:".json,application/json",style:{display:"none"},onChange:fe}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>j.current&&j.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>o({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Y,onClick:()=>V("md"),children:t(Y?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Y,onClick:()=>V("json"),children:t(Y?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Me(),children:t("refresh")})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[ra.map(b=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${z===b?" active":""}`,onClick:()=>He(b),children:[t(b==="all"?"all":_e[b]),(0,e.jsx)("span",{className:"mc-chip-n",children:b==="all"?c?.total??0:c?.byKind?.[b]??0})]},b)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${G?" active":""}`,onClick:()=>ve(b=>!b),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:U.size})]}),(0,e.jsxs)("select",{value:oe,onChange:b=>K(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),Ta(ae).map(b=>(0,e.jsx)("option",{value:b,children:b},b))]}),(0,e.jsxs)("select",{value:ie,onChange:b=>me(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(b=>(0,e.jsx)("button",{type:"button",className:`mc-chip${de===b.key?" active":""}`,onClick:()=>Re(b.key),children:b.label},b.key))]}),B&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",B]}),(0,e.jsx)("div",{style:{display:m==="cards"?"contents":"none"},children:N?(0,e.jsx)(Ia,{text:t("loading")}):B?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",B," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Me(),children:t("retry")})]}):y.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[Wt&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>H(Be),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:Be.title}),(0,e.jsx)("p",{children:la(Be)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Mt[Be.kind]||"\u{1F4CE}"," ",t(_e[Be.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",xt(Be.updated)]}),(Be.tags||[]).slice(0,3).map(b=>(0,e.jsxs)("span",{children:["#",b]},b))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(La,{n:xe[Be.path]||0,color:Ke[Be.kind]||Ke.other,size:58}),(0,e.jsx)("b",{children:xe[Be.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:b=>{b.stopPropagation(),Tt()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:ee.filter(b=>!Wt||b.path!==Be.path).map(b=>(0,e.jsx)(xn,{card:b,t,query:R.trim(),onOpen:H,onDelete:ot,onTagClick:kt,pinned:U.has(b.path),onPin:$e,onCore:r,links:xe[b.path]||0},b.path))}),y.length<dt&&(0,e.jsx)("div",{ref:Lt,style:{height:1}}),qe&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",y.length," / ",dt,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:m==="graph"?"flex":"none",flex:1,minHeight:0},children:le.has("graph")&&(0,e.jsx)(Tn,{t,onOpen:H,all:te,onAllChange:Xe,onMutate:gt,active:m==="graph",visible:m==="graph"})}),(0,e.jsx)("div",{style:{display:m==="terminal"?"contents":"none"},children:le.has("terminal")&&(0,e.jsx)(un,{t})}),(0,e.jsx)("div",{style:{display:m==="config"?"contents":"none"},children:le.has("config")&&(0,e.jsx)(Da,{t,onReload:()=>Me(),version:at})}),(0,e.jsx)("div",{style:{display:m==="stats"?"contents":"none"},children:le.has("stats")&&(0,e.jsx)(wn,{t,tab:"stats",onReload:()=>Me(),version:at})}),(0,e.jsx)("div",{style:{display:m==="audit"?"contents":"none"},children:le.has("audit")&&(0,e.jsx)(hn,{t,onReload:()=>Me(),version:at})}),(0,e.jsx)("div",{style:{display:m==="optimize"?"contents":"none"},children:le.has("optimize")&&(0,e.jsx)(yn,{t,onReload:()=>Me(),version:at})}),d&&(0,e.jsx)(Sn,{t,onClose:()=>I(!1)}),P&&(0,e.jsx)(Cn,{t,tab:Ce,onTab:ge,onClose:()=>Q(!1),onFeedback:()=>{Q(!1),I(!0)},onReplay:()=>{Q(!1),De(!0)}}),X&&(0,e.jsx)(Nn,{t,onDone:Ne}),re&&(0,e.jsx)(Mn,{t,card:re,query:R.trim(),onNavigate:b=>{let L=ee.findIndex(x=>x.path===re.path),l=ee[L+b];l&&H(l)},onTagClick:kt,onClose:()=>ue(null),onDelete:b=>{ue(null),ot(b)},onFeedback:b=>{let L=re.path;fetch(`${_}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:R.trim(),path:L,useful:b})}).then(()=>M({ok:!0,msg:t(b?"fbUseful":"fbIrr")})).catch(()=>{}),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)},allCards:ee,onOpenRelated:b=>H(b),onKindChange:r}),(0,e.jsx)(kn,{t,newCard:We,setNewCard:o,onCreated:()=>{Me(),gt(),M({ok:!0,msg:t("created")}),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)}})]})]})]})}var Ra=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;var sa=(0,n.createContext)({form:null,set:()=>{}}),bn=new Set(["autoRestartOnDrift","coreMemoryEnabled"]);function Le({k:t,label:a,hint:i,type:u="text",step:c,min:s,max:v}){let{form:k,set:y}=(0,n.useContext)(sa);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:u,step:c,min:s,max:v,value:k?k[t]??"":"",onChange:F=>{let N=F.target.value;y(t,u==="number"?N===""?"":Number(N):N)}}),i?(0,e.jsx)("span",{className:"mc-field-hint",children:i}):null]})}function Qe({k:t,label:a}){let{form:i,set:u}=(0,n.useContext)(sa),c=i?i[t]:void 0,s=c===void 0?bn.has(t):!!c;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:s,onChange:v=>u(t,v.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function Ct({icon:t,title:a,sub:i,children:u}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),i?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:i}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:u})]})}function Da({t,onReload:a,version:i,compact:u}){let[c,s]=(0,n.useState)(null),[v,k]=(0,n.useState)(0),[y,F]=(0,n.useState)(null),[N,S]=(0,n.useState)(null),[h,T]=(0,n.useState)(!1),[B,E]=(0,n.useState)(!1),z=(0,n.useRef)(!1),A=(0,n.useRef)(null),R=(0,n.useRef)({}),[se,oe]=(0,n.useState)(null),[K,ie]=(0,n.useState)(null),[me,U]=(0,n.useState)(""),[W,G]=(0,n.useState)(""),[ve,$e]=(0,n.useState)(""),[J,je]=(0,n.useState)(null),[m,Pe]=(0,n.useState)(null),le=(0,n.useCallback)(async(r,H=!1)=>{H||G("version");try{let V=await fetch(_+"/version-check"+(r?"?force=1":"")).then(fe=>fe.json());V&&V.ok?(Pe(V),r&&te(V.updateAvailable?t("vcLatest")+" v"+V.latest:t("vcUpToDate"))):r&&te(t("vcCheckFail"),!1)}catch{r&&te(t("vcCheckFail"),!1)}finally{H||G("")}},[t]);(0,n.useEffect)(()=>{le(!1);let r=setInterval(()=>{le(!1,!0)},6e4),H=()=>{typeof document<"u"&&!document.hidden&&le(!1,!0)};return document.addEventListener("visibilitychange",H),()=>{clearInterval(r),document.removeEventListener("visibilitychange",H)}},[i,le]);let[Z,Se]=(0,n.useState)(""),[de,Re]=(0,n.useState)(null),[ze,M]=(0,n.useState)(""),[p,j]=(0,n.useState)(!1),Y=(0,n.useRef)(null),we=(0,n.useRef)(0),re=r=>{we.current=r.currentTarget.scrollTop};(0,n.useLayoutEffect)(()=>{let r=Y.current;r&&Math.abs(r.scrollTop-we.current)>1&&(r.scrollTop=we.current)});let ue=(0,n.useRef)(null),te=(r,H=!0)=>{ue.current&&clearTimeout(ue.current),Re({msg:r,ok:H}),ue.current=setTimeout(()=>Re(null),1900)},Xe=async()=>{if(!W){G("restart");try{let r=await fetch(_+"/restart-self",{method:"POST"});if(r.status===404||r.status===405){te(O("vcRestartNoRoute",{cmd:m&&m.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let H=await r.json().catch(()=>null);if(!H){te(t("vcRestartFail")+"\uFF08HTTP "+r.status+"\uFF09",!1);return}if(!H.ok){te(H.error||t("vcRestartFail"),!1);return}if(H.alreadyCurrent){te(H.note||t("vcRestartCurrent"));return}te(H.note||t("vcRestartSent")),H.alreadyRunning||setTimeout(()=>{le(!0)},6e3)}catch(r){te(t("vcRestartFail")+"\uFF1A"+String(r&&r.message||r),!1)}finally{G("")}}},d=m&&m.resident?String(m.resident.served||""):"",I=!!(m&&m.onDisk&&d&&d!==m.onDisk),P=!!(m&&m.resident&&m.resident.managed===!1&&m.resident.managedKnown===!1),Q=m&&m.resident&&m.resident.replaceBlocked&&m.resident.replaceBlocked.fresh||null,Ce=!!(m&&m.resident&&m.resident.managedBy==="host"),ge=!!(m&&m.resident&&m.resident.managed===!1&&!P&&!Ce),X=!!(m&&m.resident&&!d),De=I||X||ge||P,Ne=ua({hasVersion:!!m,hostVersion:m?m.loaded:"",onDisk:m?m.onDisk:"",residentServed:m&&m.resident?m.resident.served:"",residentPresent:!!(m&&m.resident),residentManaged:m&&m.resident?m.resident.managed:null,residentManagedKnown:m&&m.resident?m.resident.managedKnown:null,residentManagedBy:m&&m.resident?m.resident.managedBy:"",replaceBlocked:m&&m.resident?m.resident.replaceBlocked:null}),f={hostProcessStale:()=>O("vcHostProcessStale",{disk:m.onDisk,loaded:m.loaded}),residentDown:()=>O("vcResidentDown",{port:m.resident&&m.resident.port||"",cmd:m.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>O("vcResidentReplaceBlocked",{served:d,err:Q&&Q.error||"",path:Q&&Q.lockPath||"",cmd:m.restartCommand||"dsh-memory restart --port "+(m.resident&&m.resident.port||7999)}),residentLockUnknown:()=>O("vcResidentLockUnknown",{served:d,path:m.resident&&m.resident.lock&&m.resident.lock.path||"",err:m.resident&&m.resident.lock&&m.resident.lock.error||""}),residentUnmanaged:()=>O("vcResidentUnmanaged",{served:d,cmd:m.restartCommand||"dsh-memory restart --port 7999"})},g={restartStart:()=>O("vcRestartStart",{disk:m&&m.onDisk||""}),restartRepair:()=>O("vcRestartRepair",{disk:m&&m.onDisk||""}),restartFixes:()=>O("vcRestartFixes",{served:d||"",disk:m&&m.onDisk||""}),restartHostOnly:()=>O("vcRestartHostOnly",{loaded:m&&m.loaded||"",disk:m&&m.onDisk||""}),restartAnyway:()=>O("vcRestartAnyway",{ver:m&&m.onDisk||""})},O=(r,H)=>Object.keys(H).reduce((V,fe)=>V.split("{"+fe+"}").join(H[fe]),t(r)),q=(0,n.useCallback)(async()=>{try{let[r,H,V,fe]=await Promise.all([fetch(`${_}/config`).then(ee=>ee.json()).catch(()=>null),fetch(`${_}/setup-status`).then(ee=>ee.json()).catch(()=>null),fetch(`${_}/budget`).then(ee=>ee.json()).catch(()=>null),fetch(`${_}/llm-routes`).then(ee=>ee.json()).catch(()=>null)]);if(fe&&fe.ok&&je(fe),r&&r.ok){s(r),k(r.revision??0),F(r.schema??null);let ee=wa(r.config??{},R.current);R.current=ee.overlay,S({...ee.values}),j(!1),oe(r.dsh??null),T(r.writable===!1),E(r.viaPending===!0),U(""),z.current=!1}else V&&V.ok?(S({...V}),j(!1),T(!0),U(t("configNeedsDsh"))):U(t("adminLoadFail"));H&&H.ok&&ie(H),$e("")}catch{U(t("adminLoadFail"))}},[t]);(0,n.useEffect)(()=>{q()},[i,q]);let he=(r,H)=>{z.current=!0,j(!0),M(""),S(V=>({...V??{},[r]:H}))};(0,n.useEffect)(()=>{A.current=q},[q]),(0,n.useEffect)(()=>{if(typeof EventSource>"u")return;let r=null;try{r=new EventSource(_+"/events")}catch{return}let H=()=>{!z.current&&typeof A.current=="function"&&A.current()};try{r.addEventListener("config",H)}catch{}return()=>{try{r.close()}catch{}}},[]);let We=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),o=r=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[r]||r,at=async()=>{if(!N)return;if(h){te(t("editInSetting"),!1);return}let r={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9],coreMemoryLimit:[1,20],coreMemoryMaxChars:[200,1e4]},H=[];for(let[V,[fe,ee]]of Object.entries(r)){if(!(V in N))continue;let ae=N[V],xe=typeof ae=="number"?ae:Number(ae);(ae===""||ae===null||ae===void 0||!Number.isFinite(xe)||xe<fe||xe>ee)&&H.push(t("invalidField",{field:V,min:fe,max:ee,value:String(ae===""?"\u7A7A":ae)}))}if(H.length){let V=t("saveInvalid")+"\uFF1A"+H.join("\uFF1B");U(V),te(V,!1);return}G("save");try{let V={...N};for(let xe of Object.keys(N))xe in V&&typeof V[xe]=="string"&&V[xe].trim()!==""&&We.has(xe)&&(V[xe]=Number(V[xe]));Array.isArray(V.vaultProfiles)&&(V.vaultProfiles=V.vaultProfiles.filter(xe=>xe&&(String(xe.name||"").trim()||String(xe.path||"").trim())));let fe=await fetch(`${_}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:V,expectedRevision:v})}),ee=await fe.text(),ae=null;try{ae=ee?JSON.parse(ee):null}catch{ae=null}if(ae||(ae={error:"HTTP "+fe.status+(ee?"\uFF1A"+ee.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),ae&&ae.ok){let xe=typeof ae.pendingOutcome=="string"?ae.pendingOutcome:"",Ge,bt=!0;if(xe==="applied")Ge=t("savedApplied")+(Array.isArray(ae.applied)&&ae.applied.length?" \xB7 "+ae.applied.join("\u3001"):"");else if(xe==="queued")bt=!1,Ge=t("saveQueued");else if(xe==="failed")bt=!1,Ge=t("saveFail")+" \xB7 "+(ae.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(xe==="applied-direct")Ge=t("savedOk")+" \xB7 "+t("savedDirect");else{let Be=Array.isArray(ae.pending)&&ae.pending.length?" \xB7 "+t("savePending"):ae.note?" \xB7 "+t("restartHint"):"";Ge=(ae.retried?"\u267B ":"")+t("savedOk")+Be}R.current={...R.current,...V},bt?(M(""),j(!1),$e(Ge)):U(Ge),te(Ge,bt),await q()}else{let xe=fe.status===409?t("conflictRefresh"):ae?.error||t("saveFail");U(xe),te(xe,!1)}}catch{U(t("saveFail")),te(t("saveFail"),!1)}finally{G("")}},At=()=>{R.current={},S({...c?.config??{}}),M(""),j(!1),$e("")},gt={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},Fe=r=>Array.isArray(r?.vaultProfiles)?r.vaultProfiles:[],st=(r,H,V)=>{z.current=!0,j(!0),S(fe=>{let ee=Fe(fe).map(xe=>({...xe||{}})),ae={...ee[r]||{}};return H==="match"?String(V).trim()?ae.match={...ae.match||{},workspace:V}:delete ae.match:ae[H]=V,ee[r]=ae,{...fe??{},vaultProfiles:ee}})},lt=()=>{z.current=!0,j(!0),S(r=>({...r??{},vaultProfiles:[...Fe(r),{name:"",path:""}]}))},dt=r=>{z.current=!0,j(!0),S(H=>({...H??{},vaultProfiles:Fe(H).filter((V,fe)=>fe!==r)}))},nt={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},qe={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},ft={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},Lt=r=>{let H=ft[r];H&&(S(V=>({...V??{},...H})),z.current=!0,j(!0),M(r),te(O("planApplied",{plan:H.label})))},wt=async()=>{try{let r=await fetch(_+"/setup-status").then(H=>H.json());r&&r.ok&&ie(r)}catch{}},et=async(r,H)=>{G(r+H);try{let fe=await(await fetch(`${_}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:r,action:H})})).json();fe&&fe.ok?te(O(H==="install"?"mcpInstalled":"mcpUninstalled",{agent:r})):te(O("mcpActionFail",{agent:r,error:fe?.error||""}),!1);try{let ee=await fetch(`${_}/setup-status`).then(ae=>ae.json());ee&&ee.ok&&ie(ee)}catch{}}catch{te(t("mergeFail"),!1)}finally{G("")}},Me=K&&Array.isArray(K.agents)?K.agents:[],ot=Me.filter(r=>r.installed),Ue=[...new Set(ot.flatMap(r=>Array.isArray(r.servers)?r.servers:[]))],He=Me.filter(r=>r.mcpConfigured&&!r.isDsh).length,kt=Me.some(r=>Array.isArray(r.servers));return(0,e.jsx)(sa.Provider,{value:{form:N,set:he},children:(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:u?"0 0 auto":1,minHeight:0,maxHeight:u?"52vh":void 0},children:[(0,e.jsx)("style",{children:Ve}),de&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(de.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:de.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:de.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:de.msg})]}),(0,e.jsxs)("div",{ref:Y,onScroll:re,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!u&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),me&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",me]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:q,children:["\u21BB ",t("retry")]})]}),B&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),h&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),ve&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",ve]}),c&&(c.version||c.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),c.version&&(0,e.jsxs)("code",{style:nt,children:[t("vcLoaded")," v",c.version]}),m&&m.resident&&m.resident.served&&m.resident.served!==c.version&&(0,e.jsxs)("code",{style:nt,children:[t("vcResident")," v",m.resident.served]}),m&&m.resident&&!m.resident.served&&(0,e.jsxs)("code",{style:{...nt,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),m&&m.resident&&m.resident.served&&m.resident.managed===!1&&(0,e.jsxs)("code",{style:{...nt,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",m.resident.served," \xB7 ",t(Q?"vcResidentReplaceBlockedShort":Ce?"vcResidentHostManagedShort":P?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),Pt&&(0,e.jsxs)("code",{style:nt,children:[t("vcPage")," v",Pt]}),m&&m.onDisk&&(0,e.jsxs)("code",{style:nt,children:[t("vcOnDisk")," v",m.onDisk]}),m&&m.latest&&(0,e.jsxs)("code",{style:nt,children:[t("vcLatest")," v",m.latest]}),c.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",c.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:W==="version",onClick:()=>le(!0),children:W==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),m&&Ne.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",f[Ne.warn]?f[Ne.warn]():""]})}),Ne.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(Ne.emphasis?" me-on":""),disabled:!!W,onClick:Xe,children:W==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),m.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:m.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:g[Ne.hint]?g[Ne.hint]():""})]}),Pt&&m&&m.onDisk&&Pt!==m.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:Pt,disk:m.onDisk})}),m&&m.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:m.updateCommand})]}),m&&m.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",m.checkError]})]}),K&&K.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:wt,children:t("mcpRefresh")})]}),kt?(0,e.jsx)("div",{className:"mc-mcp-summary",children:O("mcpSummary",{agents:ot.length,servers:Ue.length,mounted:He})}):null,Me.map(r=>{let H=Array.isArray(r.servers),V=H?r.servers:[],fe=r.isDsh?t("dshHostLabel"):r.label||r.name;return(0,e.jsxs)("div",{className:"mc-mcp-row",style:{opacity:r.installed?1:.55},children:[(0,e.jsxs)("div",{className:"mc-mcp-main",children:[(0,e.jsxs)("div",{className:"mc-mcp-title",children:[(0,e.jsx)("b",{children:fe}),r.isDsh&&r.version&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:["v",r.version]}),!r.installed&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("notInstalled")}),r.installed&&r.mcpConfigured===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("noMcpEntry")}),r.mcpConfigured===!0&&(0,e.jsxs)("span",{className:"mc-mcp-badge",style:{color:"#10b981"},children:["\u2713 ",t("healthy")]}),r.mcpConfigured===!0&&r.mcpMatchesCurrentNode===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("nodePathNote")}),(r.needsRepair||r.mcpNeedsRepair)&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("mcpNeedsRepair")}),r.isDsh&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:[t("recallTool"),": ",r.recallTool?t("enabled"):t("disabled")]}),r.detectedOnly&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("mcpDetectedOnly")}),r.reason&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:r.reason})]}),H?V.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:V.map(ee=>(0,e.jsx)("code",{className:ee==="memory"?"on":"",children:ee},ee))}):r.installed?(0,e.jsx)("div",{className:"mc-mcp-servers",children:(0,e.jsx)("span",{style:{fontSize:10.5,opacity:.45},children:t("mcpNoServers")})}):null:null,r.mcpPath&&(0,e.jsx)("div",{className:"mc-mcp-path",title:r.mcpPath,children:r.mcpPath})]}),(0,e.jsxs)("div",{className:"mc-mcp-actions",children:[r.hook&&(0,e.jsxs)("span",{style:{fontSize:10.5,opacity:.55},children:["hook: ",r.hook]}),!r.isDsh&&!r.detectedOnly&&r.installed&&r.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>et(r.name,"install"),children:t("installMcp")}),!r.isDsh&&!r.detectedOnly&&r.installed&&(r.needsRepair||r.mcpNeedsRepair||r.mcpMatchesCurrentNode===!1)&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>et(r.name,"install"),children:t("repairMcp")}),!r.isDsh&&!r.detectedOnly&&r.installed&&r.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!W,onClick:()=>{window.confirm(t("uninstallConfirm"))&&et(r.name,"uninstall")},children:t("uninstallMcp")})]})]},r.name+(r.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),Z&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:Z})})]}),N?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(Ct,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(r=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(ze===r?" on":""),"aria-pressed":ze===r,onClick:()=>Lt(r),disabled:!!W,children:[(0,e.jsxs)("b",{children:[ze===r?"\u2705 ":r==="A"?"\u{1F7E2} ":r==="B"?"\u{1F4B0} ":"\u2B50 ",ft[r].label]}),(0,e.jsx)("span",{children:t("planDesc"+r)})]},r))}),ze?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",O("planApplied",{plan:ft[ze].label})]}):null]}),(0,e.jsx)(Ct,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Qe,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(Qe,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(Qe,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Le,{k:"vaultDir",label:t("vaultDirLabel")}),(0,e.jsx)(Le,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Le,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(Le,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Le,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Le,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Qe,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Le,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Le,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(Ct,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Qe,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(Le,{k:"coreMemoryLimit",label:t("coreMemoryLimit"),type:"number"}),(0,e.jsx)(Le,{k:"coreMemoryMaxChars",label:t("coreMemoryMaxChars"),type:"number"})]})}),(0,e.jsx)(Ct,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:N&&N.uiScale||"normal",onChange:r=>{let H=r.target.value;he("uiScale",H);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:H}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(Ct,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:se?.vaultDir||"\u2014"}),se?.vaultName?`\uFF08${se.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(gt[se?.vaultSource]||"vaultSrcDefault"),se?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:se.workspace})]}):null]}),Fe(N).map((r,H)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:r.name||"",placeholder:t("vaultNamePh"),onChange:V=>st(H,"name",V.target.value),style:qe,disabled:h}),(0,e.jsx)("input",{value:r.path||"",placeholder:t("vaultPathPh"),onChange:V=>st(H,"path",V.target.value),style:qe,disabled:h}),(0,e.jsx)("input",{value:r.match&&r.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:V=>st(H,"match",V.target.value),style:qe,disabled:h}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>dt(H),disabled:h,title:t("delete"),children:"\u2715"})]},H)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:lt,disabled:h,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:N.activeVault||"",onChange:r=>he("activeVault",r.target.value),disabled:h,style:qe,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),Fe(N).filter(r=>r&&r.name).map(r=>(0,e.jsx)("option",{value:r.name,children:r.name},r.name))]})]})]})]}),(0,e.jsx)(Ct,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Qe,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(Qe,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(Le,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Le,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Le,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Le,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),J&&J.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",O("routeListFail",{err:J.error||"\u672A\u77E5\u539F\u56E0"})]}),J&&J.providers&&J.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:N.captureProvider||"",onChange:r=>{he("captureProvider",r.target.value),he("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),J.providers.map(r=>(0,e.jsx)("option",{value:r.id,children:r.label},r.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:N.captureModel||"",onChange:r=>he("captureModel",r.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((J.providers.find(r=>r.id===N.captureProvider)||{}).models||[]).map(r=>(0,e.jsx)("option",{value:r.id,children:r.label||r.id},r.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Le,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Le,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(Qe,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(Qe,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Le,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:async()=>{G("llmtest");try{let r=await fetch(_+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:N.captureProvider||"",model:N.captureModel||"",firstOnly:N.captureFirstOnly===!0})}).then(H=>H.json());r&&r.ok?te(t("llmTestOk")+"\uFF1A"+r.route.provider+(r.route.model?"/"+r.route.model:"")+" \xB7 "+r.ms+"ms \xB7 "+t("llmCandidates")+" "+r.candidates):te(t("llmTestFail")+"\uFF1A"+(r&&(r.failure?r.failure.code+" "+r.failure.message:r.error)||"?"),!1)}catch(r){te(t("llmTestFail")+"\uFF1A"+String(r&&r.message||r),!1)}finally{G("")}},children:W==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(Ct,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:N.auditMode??"all",onChange:r=>he("auditMode",r.target.value),children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(Sa,{label:t("auditExemptAgents"),value:N.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(K?.agents||[]).filter(r=>!r.isDsh).map(r=>({value:r.name,label:r.name}))],onChange:r=>he("auditExemptAgents",r)}),(0,e.jsx)(Sa,{label:t("auditExemptKinds"),value:N.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...ra.filter(r=>r!=="all").map(r=>({value:r,label:t(_e[r])}))],onChange:r=>he("auditExemptKinds",r)}),(0,e.jsx)(Le,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(Ct,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Qe,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:N.autoWebMode??"init",onChange:r=>he("autoWebMode",r.target.value),children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(Le,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Le,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Le,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"}),(0,e.jsx)(Qe,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(Qe,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(Qe,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[p?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),W==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),ve&&W!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",ve]}),me&&W!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",me]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:At,disabled:!!W,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:h?()=>te(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):at,disabled:W==="save",title:t(h?"readonlyBody":"saveConfig"),children:W==="save"?"\u23F3 "+t("saving"):h?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function hn({t,onReload:a,version:i}){let[u,c]=(0,n.useState)([]),[s,v]=(0,n.useState)([]),[k,y]=(0,n.useState)("all"),[F,N]=(0,n.useState)("all"),[S,h]=(0,n.useState)(""),[T,B]=(0,n.useState)(new Set),[E,z]=(0,n.useState)(null),[A,R]=(0,n.useState)(""),[se,oe]=(0,n.useState)(null),[K,ie]=(0,n.useState)("pending"),me=(p,j=!0)=>{oe({msg:p,ok:j}),setTimeout(()=>oe(null),3e3)},U=[...new Set([...u,...s].map(p=>p.submittedBy).filter(Boolean))],W=(0,n.useCallback)(async()=>{try{let p=await fetch(`${_}/audit/list`).then(j=>j.json());p.ok&&(c(p.pending||[]),v(p.rejected||[]),B(new Set),m({}))}catch{}},[]);(0,n.useEffect)(()=>{W()},[i,W]);let G=(K==="pending"?u:s).filter(p=>{if(k!=="all"&&p.kind!==k||F!=="all"&&Nt(p.submittedBy)!==F)return!1;if(S){let j=(p.created||"").slice(0,10);if(j&&j!==S)return!1}return!0}),ve=(0,n.useMemo)(()=>{let p=K==="pending"?u:s,j={all:0};return p.forEach(Y=>{if(!(F!=="all"&&Nt(Y.submittedBy)!==F)){if(S){let we=(Y.created||"").slice(0,10);if(we&&we!==S)return}j.all++,j[Y.kind||"other"]=(j[Y.kind||"other"]||0)+1}}),j},[u,s,K,F,S]),$e=p=>B(j=>{let Y=new Set(j);return Y.has(p)?Y.delete(p):Y.add(p),Y}),J=async(p,j,Y={})=>{let we=j||[...T];if(!we.length){me(t("noSelection"),!1);return}R("apply");let re=p==="approved"?Y.kind==="core"?t("approveCore"):t("toastApproved"):t(p==="rejected"?"toastRejected":"toastCardDeleted");try{let ue=0;for(let te of we){let Xe=p==="approved"?"audit/approve":p==="rejected"?"audit/reject":"delete";try{let d=p==="approved"&&Y.kind?{path:te,kind:Y.kind}:null;(await fetch(_+"/"+Xe+(d?"":"?path="+encodeURIComponent(te)+(p==="delete"?"&permanent=0":"")),d?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)}:void 0)).ok||ue++}catch{ue++}}await W(),a&&a(),ue?me(t("toastFailed")+"\uFF08"+ue+"/"+we.length+"\uFF09",!1):me(re+" "+we.length+" \u5F20")}catch(ue){me(t("toastFailed")+": "+String(ue&&ue.message||ue),!1)}finally{R("")}},[je,m]=(0,n.useState)({}),Pe=p=>je[p]||{},le=[...T],Z=G.find(p=>p.path===E)||G[0]||null,Se=Z?Pe(Z.path):{};(0,n.useEffect)(()=>{let p=Z;if(!p||je[p.path])return;let j=!0,Y=p.path;m(re=>({...re,[Y]:{loading:!0}}));let we=p.status||(K==="pending"?"pending":"rejected");return fetch(`${_}/card?path=${encodeURIComponent(Y)}&status=${we}`).then(re=>re.json()).then(re=>{j&&(re&&re.ok?m(ue=>({...ue,[Y]:{text:re.text||""}})):m(ue=>({...ue,[Y]:{error:re&&re.error||"HTTP"}})))}).catch(re=>{j&&m(ue=>({...ue,[Y]:{error:String(re&&re.message||re)}}))}),()=>{j=!1}},[Z&&Z.path,K]);let de=async()=>{if(window.confirm(t("reclassify")+"\uFF1F\u53EA\u5904\u7406\u81EA\u52A8\u6C89\u6DC0\u7684\u5F85\u5BA1\u539F\u6587\u5361\uFF0C\u4E0D\u6539\u4EBA\u5DE5\u5361\u3002")){R("reclassify");try{let p=await fetch(_+"/reclassify").then(j=>j.json());p&&p.ok?me(t("reclassify")+"\uFF1A"+p.changed+" / "+p.scanned):me(t("toastFailed")+": "+(p&&p.error||"HTTP"),!1),await W(),a&&a()}catch(p){me(t("toastFailed")+": "+String(p&&p.message||p),!1)}finally{R("")}}},Re=()=>B(new Set),ze=p=>{ie(p),Re()},M=["all",...ra.filter(p=>p!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ra,{toast:se}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[u.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("select",{value:F,onChange:p=>{N(p.target.value),Re()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),Ta(U).map(p=>(0,e.jsx)("option",{value:p,children:p},p))]}),(0,e.jsx)("input",{type:"date",value:S,onChange:p=>{h(p.target.value),Re()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),M.map(p=>{let j=p==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":Ke[p]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${k===p?" active":""}`,onClick:()=>{y(p),Re()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:j}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(p==="all"?"all":_e[p])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:ve[p]||0})]},p)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${K==="pending"?" me-on":""}`,onClick:()=>ze("pending"),children:[t("pending"),"\uFF08",u.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${K==="rejected"?" me-on":""}`,onClick:()=>ze("rejected"),children:[t("rejected"),"\uFF08",s.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:G.length>0&&le.length===G.length,onChange:p=>{p.target.checked?B(new Set(G.map(j=>j.path))):B(new Set)}})," ",t("selectAll"),"\uFF08",G.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",le.length]}),K==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!A,onClick:de,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!le.length||!!A,onClick:()=>J("approved"),children:["\u2713 ",t(K==="rejected"?"restore":"approve")]}),K==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!le.length||!!A,onClick:()=>J("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!le.length||!!A,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&J("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),le.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Re,children:t("auditClearSelection")})]}),G.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:G.map(p=>{let j=Ke[p.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${p.kind==="core"?" core":""}${Z&&Z.path===p.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>z(p.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:T.has(p.path),onClick:Y=>Y.stopPropagation(),onChange:()=>$e(p.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:j,borderColor:j+"38",background:j+"18"},children:Mt[p.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:`me-audit-row-kind${p.kind==="core"?" core":""}`,children:p.kind==="core"?"\u2B50 "+t("kindCore"):t(_e[p.kind]||"kindKnowledge")}),(0,e.jsx)("span",{className:`me-audit-row-state ${K==="pending"?"pending":"rejected"}`,children:K==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:p.created?p.created.slice(0,16).replace("T"," "):"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:p.title,onClick:()=>z(p.path),children:p.title}),(p.reason||p.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:p.reason||p.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Nt(p.submittedBy)]}),(Array.isArray(p.tags)?p.tags:[]).slice(0,3).map(Y=>(0,e.jsxs)("span",{children:["#",Y]},Y))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:Y=>Y.stopPropagation(),children:K==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>J("approved",[p.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>J("rejected",[p.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>J("approved",[p.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&J("delete",[p.path])},children:"\u{1F5D1}"})]})})]})},p.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t("noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:Z?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:Ke[Z.kind]||"#6B7280",borderColor:(Ke[Z.kind]||"#6B7280")+"59",background:(Ke[Z.kind]||"#6B7280")+"1a"},children:[Mt[Z.kind]||"\u{1F4CE}"," ",t(_e[Z.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${K==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:K==="pending"?Z.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:Z.created?Z.created.slice(0,16).replace("T"," "):""})]}),(0,e.jsx)("h3",{children:Z.title}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Nt(Z.submittedBy)]}),!!Z.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",Z.reason]}),(Array.isArray(Z.tags)?Z.tags:[]).slice(0,5).map(p=>(0,e.jsxs)("span",{children:["#",p]},p))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[Se.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),Se.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Se.error]}),Se.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(za(Kt(Se.text).body,Z.title))}}):!Se.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:Z.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!A,onClick:()=>J("approved",[Z.path]),children:["\u2713 ",K==="rejected"?t("restore"):Z.kind==="core"?t("approveCore"):t("approve")]}),K==="pending"&&Z.kind!=="core"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!A,onClick:()=>J("approved",[Z.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),K==="pending"&&Z.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!A,onClick:()=>J("approved",[Z.path],{kind:"knowledge"}),children:t("approveAsNormal")}),K==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!A,onClick:()=>J("rejected",[Z.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!A,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&J("delete",[Z.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("noAuditItems")})})]})]})]})]})}function yn({t,onReload:a,version:i}){let[u,c]=(0,n.useState)([]),[s,v]=(0,n.useState)(""),[k,y]=(0,n.useState)(null),F=(h,T=!0)=>{y({msg:h,ok:T}),setTimeout(()=>y(null),3200)},N=(0,n.useCallback)(async()=>{try{let h=await fetch(`${_}/recycle/list`).then(T=>T.json());h.ok&&c(h.items||[])}catch{}},[]);(0,n.useEffect)(()=>{N()},[i,N]);let S=async(h,T)=>{let B=(u.find(E=>E.path===T)||{}).title||T;v(h+T);try{let z=await fetch(_+(h==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(T)),A=await z.json().catch(()=>null);await N(),a&&a(),z.ok&&(!A||A.ok!==!1)?F(t(h==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+B):F(t("toastFailed")+"\uFF1A"+(A&&A.error||"HTTP "+z.status),!1)}catch(E){F(t("toastFailed")+"\uFF1A"+String(E&&E.message||E),!1)}finally{v("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ra,{toast:k}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:u.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!s||u.length===0,title:u.length?"":t("emptyRecycle"),onClick:async()=>{v("purgeAll");try{let h=await fetch(_+"/recycle/purge-expired?days=0"),T=await h.json().catch(()=>null);await N(),F(h.ok?t("toastPurgedExpired")+(T&&T.purged!=null?"\uFF08"+T.purged+"\uFF09":""):t("toastFailed"),h.ok)}catch(h){F(t("toastFailed")+"\uFF1A"+String(h&&h.message||h),!1)}finally{v("")}},children:["\u{1F5D1} ",t("emptyRecycle")]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),u.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:u.map(h=>{let T=Ke[h.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:T,background:T+"18",borderColor:T+"38"},children:Mt[h.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:h.title}),(0,e.jsxs)("span",{children:[t(_e[h.kind]||"kindKnowledge")," \xB7 ",t("deletedAt")," ",(h.deletedAt||"").slice(0,10)]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!s,onClick:()=>S("restore",h.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!s,onClick:()=>{window.confirm(t("purgeConfirm"))&&S("purge",h.path)},children:t("purge")})]})]},h.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var za=(t,a)=>{let i=String(t||"").split(/\r?\n/),u=s=>String(s||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),c=u(a);for(;;){let s=0;for(;s<i.length&&!i[s].trim();)s++;let v=/^#{1,2}\s+(.+?)\s*$/.exec(i[s]||"");if(!v||u(v[1])!==c)break;for(i.splice(s,1);s<i.length&&!i[s].trim();)i.splice(s,1)}return i.join(`
|
|
827
|
+
`)},vn=t=>{let a=[],i=!1,u=0;for(let c of String(t||"").split(/\r?\n/)){let s=c.trim();if(/^```/.test(s)){i=!i;continue}if(i)continue;let v=/^(#{1,6})\s+(.+)$/.exec(s);if(!v)continue;u++;let k=v[1].length;k<=3&&a.push({id:"md-h-"+u,level:k,text:v[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},la=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},Aa=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},La=({n:t=0,color:a="#ff9a72",size:i=30})=>{let u=Math.max(2,Math.min(6,Number(t)||2)),c=Array.from({length:u},(s,v)=>{let k=-Math.PI/2+v*Math.PI*2/u,y=v%2?13:16;return[20+Math.cos(k)*y,20+Math.sin(k)*y]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:i,height:i,viewBox:"0 0 40 40","aria-hidden":"true",children:[c.map(([s,v],k)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:s,y2:v,stroke:a,strokeOpacity:".35"},"l"+k)),c.map(([s,v],k)=>(0,e.jsx)("circle",{cx:s,cy:v,r:k%2?2.2:1.8,fill:a,fillOpacity:k%2?.8:.55},"c"+k)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},xn=({card:t,t:a,onOpen:i,query:u,onDelete:c,onTagClick:s,pinned:v,onPin:k,onCore:y,links:F})=>{let N=Ke[t.kind]||Ke.other,S=Number(F??t.links??t.weight??0),h=ea(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${v?" pinned":""}${t.kind==="core"?" core":""}`,onClick:()=>i(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:N,background:N+"18",borderColor:N+"38"},children:Mt[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(_e[t.kind]||"kindKnowledge")}),t.kind==="core"&&(0,e.jsxs)("span",{className:"mc-v5-core-badge",children:["\u2B50 ",a("kindCore")]}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),zn(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:xt(t.updated)}),y&&t.status!=="pending"&&t.status!=="rejected"&&(0,e.jsx)("button",{type:"button",className:`mc-v5-core${t.kind==="core"?" on":""}`,title:a(t.kind==="core"?"unsetCore":"setCore"),onClick:T=>{T.stopPropagation(),y(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),k&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${v?" on":""}`,title:a(v?"unpinCard":"pinCard"),"aria-label":a(v?"unpinCard":"pinCard"),onClick:T=>{T.stopPropagation(),k(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:u?aa(t.title,u):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(Aa(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:u?aa(t.summary||"",u):la(t)})]}),u&&(()=>{let T=ma(t.body||"",u);return T?(0,e.jsx)("p",{className:"mc-snippet",children:aa(T,u)}):null})(),ea(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[ea(t).slice(0,2).map(T=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:T,onClick:B=>{B.stopPropagation(),s&&s(T)},children:["#",T]},T)),h.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",h.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[S>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(La,{n:S,color:N})," ",(0,e.jsx)("b",{children:S})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Nt(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:T=>{T.stopPropagation(),window.confirm(a("deleteConfirm"))&&c&&c(t.path)},children:"\u{1F5D1}"})]})]})};function wn({t,tab:a,onReload:i,version:u}){let[c,s]=(0,n.useState)(null),[v,k]=(0,n.useState)(""),[y,F]=(0,n.useState)(null),[N,S]=(0,n.useState)(null),[h,T]=(0,n.useState)(null),[B,E]=(0,n.useState)(null),[z,A]=(0,n.useState)(null),[R,se]=(0,n.useState)(null),oe=(0,n.useCallback)(async()=>{W("align");try{let d=await fetch(_+"/align").then(I=>I.json());d&&d.findings?se(d):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{W("")}},[t]),K=async()=>{if(window.confirm(t("alignFixConfirm"))){W("alignfix");try{let d=await fetch(_+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(I=>I.json());d&&d.ok?(notify(t("alignFixed")),await oe()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{W("")}}},[ie,me]=(0,n.useState)([]),[U,W]=(0,n.useState)(""),[G,ve]=(0,n.useState)(!1),$e=(0,n.useCallback)(async()=>{if(!(!y||!y.merge||!y.merge.length)&&window.confirm(t("mergeAllConfirm"))){W("merge");try{let d={},I=X=>d[X]===void 0?X:d[X]=I(d[X]),P=(X,De)=>{d[I(X)]=I(De)},Q=new Set;for(let X of y.merge)Q.add(X.a.path),Q.add(X.b.path),P(X.a.path,X.b.path);let Ce={};for(let X of Q){let De=I(X);(Ce[De]=Ce[De]||[]).push(X)}let ge=0;for(let X of Object.values(Ce)){if(X.length<2)continue;(await fetch(`${_}/merge?paths=${encodeURIComponent(X.join(","))}`).then(Ne=>Ne.json())).ok&&ge++}await J(),i&&i()}catch{}W("")}},[y,J,i,t]);async function J(){try{let d=await Promise.all([fetch(`${_}/stats`),fetch(`${_}/budget`),fetch(`${_}/capture-log`),fetch(`${_}/cards?status=all&limit=30&agent=${Ot}`),fetch(`${_}/overview`),fetch(`${_}/ledger?days=7`)]),[I,P,Q,Ce,ge,X]=await Promise.all(d.map(De=>De.json()));I&&I.ok&&s(I),P&&P.ok&&S(P),Q&&Q.ok&&T(Q),Ce&&Ce.ok&&me(Ce.cards||[]),ge&&ge.ok&&E({db:ge.db,backups:ge.backups,total:ge.total,version:ge.version,degraded:ge.degraded===!0}),A(X&&X.ok?X:{ok:!1,error:X&&X.error||""}),k(!I||!I.ok?t("adminLoadFail"):"")}catch{k(t("adminLoadFail"))}}let je=(0,n.useCallback)(async()=>{W("scan");try{let d=await fetch(`${_}/optimize`).then(I=>I.json());d.ok&&F(d)}catch{k(t("adminLoadFail"))}finally{W("")}},[t]),[m,Pe]=(0,n.useState)(null),le=(0,n.useCallback)(async()=>{W("refine");try{let d=await fetch(`${_}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(I=>I.json());d&&d.ok?Pe(d):notify(d&&d.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{W("")}},[t]),Z=async(d,I)=>{if(!(I==="merge"&&!window.confirm(t("mergeConfirm")))){W("refineapply");try{let P=await fetch(`${_}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:d.a.path,b:d.b.path,action:I,relation:d.relation})}).then(Q=>Q.json());P&&P.ok?(notify(t("refineApplied")),Pe(Q=>Q&&{...Q,findings:(Q.findings||[]).filter(Ce=>!(Ce.a.path===d.a.path&&Ce.b.path===d.b.path))}),await J(),i&&i()):notify(P&&P.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{W("")}}},[Se,de]=(0,n.useState)(null),Re=(0,n.useCallback)(async()=>{W("junk");try{let d=await fetch(`${_}/refine-junk`).then(I=>I.json());d&&d.ok?de(d.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{W("")}},[t]),ze=async d=>{if(d.length&&window.confirm(t("junkRecycleAllConfirm"))){W("junkpurge");try{let I=await fetch(`${_}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d})}).then(P=>P.json());I&&I.removed?(notify(t("junkDone")+"\uFF1A"+I.removed.length+(I.failed?.length?"\uFF08\u5931\u8D25 "+I.failed.length+"\uFF09":"")),de(P=>P&&P.filter(Q=>!I.removed.includes(Q.path))),await J(),i&&i()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{W("")}}},[M,p]=(0,n.useState)(null),j=(0,n.useCallback)(async()=>{W("goals");try{let d=await fetch(_+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(I=>I.json());d&&d.ok?p(d):notify(d&&d.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{W("")}},[t]),Y=async d=>{W("goalskeep");try{let I=await fetch(_+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d.members.map(P=>P.path)})}).then(P=>P.json());I&&I.ok?(notify(t("goalDone")),p(P=>P&&{...P,clusters:(P.clusters||[]).filter(Q=>Q.goal!==d.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{W("")}},we=async d=>{if(window.confirm(t("mergeConfirm"))){W("goalsmerge");try{let I=await fetch(_+"/merge?paths="+encodeURIComponent(d.members.map(P=>P.path).join(","))).then(P=>P.json());I&&I.ok?(notify(t("goalMerged")),p(P=>P&&{...P,clusters:(P.clusters||[]).filter(Q=>Q.goal!==d.goal)}),await J(),i&&i()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{W("")}}};(0,n.useEffect)(()=>{J()},[u]);let re=async(d,I)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${_}/merge?paths=${encodeURIComponent(d+","+I)}`).then(Q=>Q.json())).ok&&(await J(),i&&i())}catch{}},ue=async d=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${_}/delete?path=${encodeURIComponent(d)}`).then(P=>P.json())).ok&&(await J(),i&&i())}catch{}},te=["project","knowledge","content","prompt","business","tool","mistake"],Xe=({title:d,kind:I,updated:P,path:Q})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:ut.colors[I]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:xt(P)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>ue(Q),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[v&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",v]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:J,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:B?`${B.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>J(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:B?B.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:B?.db?.journalMode||B?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:B?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:B?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(B.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:h?.available?h.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:h?.health?.lastAt?xt(new Date(h.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:B?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>J(),children:["\u21BB ",t("refresh")]})]}),B?(()=>{let d=B.db||{},I=d.writable!==!1&&!d.corrupt,P=B.backups||{count:0,newestAt:0},Q=P.newestAt?Math.floor((Date.now()-Number(P.newestAt))/864e5):-1,Ce=P.count?Q>7?"warn":"ok":"bad",ge=h&&h.available?h.health:null,X=ge?ge.ok?"ok":"warn":"none",De=R&&R.findings?R.onDisk&&R.residentServed===R.onDisk&&R.hostVersion===R.onDisk?"ok":"warn":"none",Ne={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},f=[{label:t("healthDb"),level:I?"ok":"bad",text:I?"journal="+(d.journalMode||"?")+(d.checkedAt?" \xB7 "+new Date(d.checkedAt).toLocaleString():""):(d.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:Ce,text:P.count?(Q<=0?t("healthBackupToday").replace("{n}",String(P.count)):t("healthBackupAge").replace("{n}",String(P.count)).replace("{d}",String(Q)))+(P.files&&P.files.length?" \xB7 "+P.files[P.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:X,text:ge?ge.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(ge.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:De,text:De==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(R.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(R.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(R.hostVersion||"?"),action:De==="none"?{label:t("alignRun"),run:oe}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:f.map(g=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:Ne[g.level][1]},children:Ne[g.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:g.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:g.text}),g.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!U,onClick:g.action.run,children:g.action.label})]},g.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9FE} ",t("ledgerTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("ledgerHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>J(),children:["\u21BB ",t("refresh")]})]}),z?z.ok===!1?(0,e.jsxs)("div",{style:{color:"#f59e0b",fontSize:12,padding:"8px 0",lineHeight:1.7},children:["\u26A0 ",/未知接口|404|not found/i.test(String(z.error||""))?t("ledgerNeedRestart"):z.error||t("adminLoadFail")]}):z.totals.recalls+z.totals.captures===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("ledgerNoData")}):(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:8},children:[{k:t("ledgerRecalls"),v:String(z.totals.recalls),s:t("ledgerInjected")+" "+Number(z.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(z.totals.captures),s:t("ledgerLlmCalls")+" "+z.totals.llmCalls+(z.totals.captureFail?" \xB7 \u2717 "+z.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(z.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:z.feedback.rate==null?"\u2014":Math.round(z.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(d=>(0,e.jsxs)("div",{style:{border:"1px solid rgba(127,127,127,.16)",borderRadius:10,padding:"8px 10px"},children:[(0,e.jsx)("div",{style:{fontSize:11,opacity:.6},children:d.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:d.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:d.s})]},d.k))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:8,lineHeight:1.7},children:t("ledgerFormula")})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:oe,children:t(U==="align"?"exporting":"alignRun")}),R&&R.counts&&R.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:K,children:t(U==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),R&&R.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",R.onDisk||"?",R.residentServed?" \xB7 "+t("alignResident")+" v"+R.residentServed:"",R.hostVersion?" \xB7 "+t("alignHost")+" v"+R.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:R.findings.map((d,I)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:I?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:d.level==="fix"?"#ef4444":d.level==="warn"?"#f59e0b":"#10b981"},children:d.level==="fix"?"\u2717":d.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:d.title}),d.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:d.detail}):null,d.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:d.command})]}):null]},I))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>J(),children:["\u21BB ",t("refresh")]})]}),h?h.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(h.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(h.entries||[]).map((d,I)=>{let P=an[d.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:xt(d.time?new Date(d.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:P[1],fontWeight:600},children:[P[0]," ",d.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:d.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d.preview||"",children:d.preview||""})]},I)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",ie.length,"\uFF09"]}),ie.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:ie.map(d=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ke[d.kind]||Ke.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),d.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:xt(d.updated)})]},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),c&&(0,e.jsxs)(e.Fragment,{children:[c.trend&&c.trend.length>0&&(()=>{let d=c.trend,I=Math.max(...d.map(ge=>ge.count),1),P=260,Q=50,Ce=P/d.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:P,height:Q,style:{display:"block",width:"100%",height:50},children:d.map((ge,X)=>{let De=Math.round(ge.count/I*(Q-4));return(0,e.jsx)("rect",{x:X*Ce+1,y:Q-De,width:Math.max(Ce-2,2),height:De,rx:1.5,fill:ge.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:ge.count>0?.85:.35},ge.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:te.map(d=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:ut.colors[d]||"#666"}}),t(_e[d]),": ",c.byKind?.[d]||0]},d))})]}),N&&(N.budgetChars||N.recallLimit||N.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:N.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:N.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",N.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",c.todayCards?.length||0,"\uFF09"]}),c.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:c.todayCards.map(d=>(0,e.jsx)(Xe,{title:d.title,kind:d.kind,updated:d.updated,path:d.path},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:je,children:U==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),y&&y.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){W("oneclick");try{let d=JSON.stringify({cleanupStale:G}),P=await(await fetch(`${_}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:d})).json();P&&P.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${P.plan.merged} ${t("optimizedMerged")}${G?` \xB7 ${P.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await J(),i&&i(),F(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{W("")}}},children:U==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),y&&y.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:G,onChange:d=>ve(d.target.checked)}),t("oneClickAlsoStale")]})]}),!y&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),y&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),y.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:$e,children:t(U==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),y.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:y.merge.map((d,I)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.a.title," \u21C4 ",d.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(d.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>re(d.a.path,d.b.path),children:t("mergeNow")})]},I))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",y.stale?.length||0,"\uFF09"]}),y.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!U,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;W("clean");let d=0;for(let I of y.stale)try{await fetch(`${_}/delete?path=${encodeURIComponent(I.path)}`),d++}catch{}W(""),notify(`${d} ${t("deletedStale")}`),await J(),i&&i()},children:t("cleanStale")})}),y.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:y.stale.map(d=>(0,e.jsx)(Xe,{title:d.title,kind:"other",updated:d.updated,path:d.path},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:le,children:t(U==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),m?.findings?.length?m.findings.map((d,I)=>(0,e.jsxs)("div",{style:{borderTop:I?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:d.relation==="conflict"?"#ef4444":d.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+d.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",d.sim," \xB7 ",d.useModel||""]}),d.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:d.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",d.a.title,(0,e.jsx)("br",{}),"B\uFF1A",d.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>Z(d,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>Z(d,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>Z(d,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>Z(d,"merge"),children:t("refineMerge")})]})]},I)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(m?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:Re,children:t(U==="junk"?"exporting":"junkScan")}),Se?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:()=>ze(Se.map(d=>d.path)),children:t(U==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),Se?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:Se.map((d,I)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:I?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d.reasons.join("\uFF1B"),children:d.title||d.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:d.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>ze([d.path]),children:t("junkRecycle")})]},I))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(Se?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:j,children:t(U==="goals"?"exporting":"goalScan")}),M?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",M.cached," / ",M.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),M?.clusters?.length?M.clusters.map((d,I)=>(0,e.jsxs)("div",{style:{borderTop:I?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:d.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",d.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:d.members.map((P,Q)=>(0,e.jsx)("li",{children:P.title},Q))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>Y(d),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>we(d),children:t("goalMerge")})]})]},I)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(M?"goalNone":"goalIdle")})]})]})]})]})}var ta=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function kn({t,newCard:a,setNewCard:i,onCreated:u}){if(!a)return null;let c=ta.find(S=>S.key===a.template),s=a.body||(c?t(c.bodyKey):""),v=a.kind||(c?c.kind:"knowledge"),k=a.tags||(c?t(c.tagKey):""),y=a._creating,F=S=>{let h=ta.find(T=>T.key===S);i(T=>({...T,template:S,kind:h?h.kind:T.kind,body:h?t(h.bodyKey):T.body,tags:h?t(h.tagKey):T.tags}))},N=async()=>{if(!(!a.title&&!s)){i(S=>({...S,_creating:!0}));try{(await fetch(`${_}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:v,tags:k.split(",").map(h=>h.trim()).filter(Boolean),body:s,source:"manual"})}).then(h=>h.json())).ok?(i(null),u&&u()):i(h=>({...h,_creating:!1}))}catch{i(h=>({...h,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>i(null),children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:S=>S.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>i(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[ta.map(S=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===S.key?" me-on":""}`,onClick:()=>F(S.key),children:t(S.label)},S.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>i(S=>({...S,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:v,onChange:S=>i(h=>({...h,kind:S.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:["project","knowledge","content","prompt","business","tool","mistake"].map(S=>(0,e.jsx)("option",{value:S,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:S},S))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:S=>i(h=>({...h,title:S.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:k,onChange:S=>i(h=>({...h,tags:S.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:s,onChange:S=>i(h=>({...h,body:S.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:y,onClick:N,children:t(y?"exporting":"createCard")})})]})]})]})}async function ia(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let i=document.createElement("textarea");i.value=a,i.setAttribute("readonly",""),i.style.position="fixed",i.style.left="-9999px",i.style.top="0",document.body.appendChild(i),i.focus(),i.select();let u=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(i),u}catch{return!1}}function Sn({t,onClose:a}){let[i,u]=(0,n.useState)(""),[c,s]=(0,n.useState)(""),[v,k]=(0,n.useState)(""),[y,F]=(0,n.useState)(!0),[N,S]=(0,n.useState)(!1),[h,T]=(0,n.useState)(""),[B,E]=(0,n.useState)(""),z=(0,n.useRef)(null),A=(0,n.useRef)(null),R=()=>{let G=z.current;if(G)try{G.focus(),G.select()}catch{}},se=G=>{T(G),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>T(""),2400)};(0,n.useEffect)(()=>{let G=!0;return fetch(_+"/diagnostics").then(ve=>ve.json()).then(ve=>{G&&(ve&&ve.ok?(s(String(ve.diagnostics||"")),k(String(ve.version||""))):S(!0))}).catch(()=>{G&&S(!0)}).finally(()=>{G&&F(!1)}),()=>{G=!1}},[]),(0,n.useEffect)(()=>{let G=ve=>{ve.key==="Escape"&&a()};return window.addEventListener("keydown",G),()=>{window.removeEventListener("keydown",G),A.current&&clearTimeout(A.current)}},[a]);let oe=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),K=()=>{let G=i.trim().split(`
|
|
828
|
+
`)[0]||"",ve=ga({title:"[Bug] "+(G.slice(0,60)||"memory-eternal \u95EE\u9898"),body:fa({description:i,diagnostics:c,version:v})});try{window.open(ve,"_blank","noopener")}catch{se(t("fbCopyFail"))}},ie=async()=>{await ia(c)?(E(""),se(t("fbCopiedDiag"))):(E(c),se(t("fbCopyManual")))},me=async()=>{let G=ba({lang:oe,description:i,diagnostics:c});await ia(G)?(E(""),se(t("fbCopiedPrompt"))):(E(G),se(t("fbCopyManual")))},U={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},W={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:G=>G.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:i,onChange:G=>u(G.target.value),placeholder:t("fbDesc"),rows:5,style:U}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ie,disabled:!c,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:W,children:y?t("fbLoading"):N?t("fbDiagFail"):c})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!i.trim()){se(t("fbNeedDesc"));return}K()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:me,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),h&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:h}),B&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:R,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:z,readOnly:!0,value:B,rows:7,style:U})]})]})]})]})}function Cn({t,tab:a,onTab:i,onClose:u,onFeedback:c,onReplay:s}){let[v,k]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!v)return;let S=h=>{h.key==="Escape"&&k(null)};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[v]);let y=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],F="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",N=(S,h)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:S,alt:h,loading:"lazy",title:t("clickToZoom"),onClick:T=>k(T.currentTarget.currentSrc||S),onError:T=>{let B=T.currentTarget;B.dataset.fb||(B.dataset.fb="1",B.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(S).split("/").pop())}}),(0,e.jsx)("figcaption",{children:h})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:u,children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:S=>S.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:u,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:y.map(S=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===S.id?" active":""}`,onClick:()=>i(S.id),children:S.label},S.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsx)("div",{className:"me-support-qr",children:N("support/group-qr.jpg",t("supportGroup"))}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:F,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[N("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),N("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:F,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:c,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:s,children:["\u2728 ",t("supportReplay")]})]})]}),v&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:S=>{S.stopPropagation(),k(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:S=>{S.stopPropagation(),k(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:v,alt:"",onClick:S=>S.stopPropagation()})]})]})}function Nn({t,onDone:a}){let[i,u]=(0,n.useState)(0),c="https://github.com/EternalNight996/memory-eternal",s=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],v=i===s.length-1;return(0,n.useEffect)(()=>{let k=y=>{y.key==="Escape"&&a()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:s.map((k,y)=>(0,e.jsx)("span",{className:`me-guide-dot${y<=i?" on":""}`},y))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:s[i].title}),(0,e.jsx)("p",{children:s[i].body}),i===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>na(c),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>na(c+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),i===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),i===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),i===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),i>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>u(k=>k-1),children:t("onboardBack")}),v?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>u(k=>k+1),children:t(i===0?"onboardStarred":"onboardNext")})]})]})]})}function Mn({t,card:a,query:i,onClose:u,onDelete:c,onFeedback:s,onNavigate:v,onTagClick:k,allCards:y,onOpenRelated:F,onKindChange:N}){let[S,h]=(0,n.useState)(0),[T,B]=(0,n.useState)(""),[E,z]=(0,n.useState)(()=>{try{let M=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(M)?M:"mid"}catch{return"mid"}}),A={narrow:720,mid:900,wide:1180};(0,n.useEffect)(()=>{let M=p=>{if(p.key==="Escape"){u();return}let j=String(p.target&&p.target.tagName||"").toLowerCase();j==="input"||j==="textarea"||j==="select"||p.target&&p.target.isContentEditable||(p.key==="j"&&v?(p.preventDefault(),v(1)):p.key==="k"&&v&&(p.preventDefault(),v(-1)))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[u,v]);let R=async(M,p)=>{let j=await ia(String(M||""));B(j?t("copied")+" \xB7 "+p:t("copyFail")),setTimeout(()=>B(""),1500)},{meta:se,body:oe}=(0,n.useMemo)(()=>Kt(a.text||""),[a.text]),K=M=>{let p=se.find(([j])=>String(j).toLowerCase()===M);return p?p[1]:""},ie=pa(K("tags")),me=a.kind||K("kind")||"knowledge",U=String(a.status||K("status")||"approved").toLowerCase(),W=Ke[me]||"#6B7280",G=(oe||"").length>460,ve=(0,n.useMemo)(()=>za(oe,a.title),[oe,a.title]),$e=(0,n.useMemo)(()=>{let M=la(a);if(M)return M;let j=(ve.split(/\r?\n/).map(Y=>Y.trim()).find(Y=>Y&&!/^#{1,2}\s/.test(Y))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return j.length>150?j.slice(0,148)+"\u2026":j},[a,ve]),J=(0,n.useMemo)(()=>vn(ve),[ve]),je=(0,n.useMemo)(()=>{let M=new Set(ie);return(y||[]).filter(p=>p.path!==a.path&&(p.tags||[]).some(j=>M.has(j))).slice(0,3)},[y,a.path,ie.join("|")]),[m,Pe]=(0,n.useState)(!0),le=(0,n.useRef)(null),[Z,Se]=(0,n.useState)(""),de=M=>{let p=le.current;if(!p)return;let j=document.getElementById(M);if(!j||!p.contains(j))return;let Y=j.getBoundingClientRect().top-p.getBoundingClientRect().top+p.scrollTop-12;p.scrollTo({top:Math.max(0,Y),behavior:"smooth"})},Re=M=>{if(!m){Pe(!0),setTimeout(()=>de(M),80);return}de(M)},ze=M=>{let p=M.currentTarget,j=p.scrollHeight-p.clientHeight;h(j<=0?100:Math.min(100,Math.max(0,p.scrollTop/j*100)));let Y=p.querySelectorAll(".md-doc .md-h"),we="",re=p.getBoundingClientRect().top+28;for(let ue of Y)if(ue.getBoundingClientRect().top<=re)we=ue.id;else break;Se(we)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:u,children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:Mt[me]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[T&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:T}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>R(oe,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>R(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let M=["narrow","mid","wide"],p=M[(M.indexOf(E)+1)%M.length];z(p);try{localStorage.setItem("me-read-width",p)}catch{}},children:[t("readWidth")," \xB7 ",t(E==="narrow"?"widthNarrow":E==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!1),children:["\u{1F44E} ",t("fbIrr")]}),G&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":m,onClick:()=>Pe(M=>!M),children:t(m?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&c&&c(a.path)},children:t("delete")}),N&&U==="approved"&&(me==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>N(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>N(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:u,children:t("close")})]})]}),N&&(0,e.jsxs)("div",{className:"me-core-banner"+(me==="core"?" on":""),children:[(0,e.jsxs)("div",{className:"me-core-banner-k",children:["\u2B50 ",t("kindCore")]}),(0,e.jsx)("div",{className:"me-core-banner-desc",children:t(me==="core"?"coreActiveHint":"coreInactiveHint")}),U==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>N(a.path,me==="core"?"knowledge":"core"),children:me==="core"?t("unsetCore"):"\u2B50 "+t("setCore")}):(0,e.jsx)("span",{className:"me-core-banner-desc",style:{flex:"none",opacity:.6},children:t("coreNeedApproval")})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:W,borderColor:W+"59",background:W+"1a"},children:[Mt[me]||"\u{1F4CE}"," ",t(_e[me]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(U==="approved"?"md-chip-st-ok":U==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[U==="approved"?"\u2705":U==="pending"?"\u23F3":"\u26D4"," ",t(U==="approved"?"statusApproved":U==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(ie)?ie:[]).slice(0,8).map(M=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:M,onClick:()=>k&&k(M),children:["\u{1F3F7} ",M]},M)),!!K("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",xt(K("updated"))]}),!!K("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",K("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:S+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:A[E],margin:"0 auto",width:"100%",boxSizing:"border-box",...m?{}:{maxHeight:300,overflow:"hidden"}},ref:le,onScroll:ze,onClick:m?void 0:M=>{M.stopPropagation(),Pe(!0)},children:[!!$e&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(Aa(a))}),(0,e.jsx)("p",{children:$e})]}),(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(ve)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[J.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:J.map((M,p)=>(0,e.jsxs)("button",{type:"button",className:`lv${M.level}${Z===M.id?" active":""}`,onClick:()=>Re(M.id),children:[(0,e.jsx)("span",{children:String(p+1).padStart(2,"0")}),M.text]},M.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:K("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:xt(K("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),ie.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:ie.slice(0,8).map(M=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>k&&k(M),children:["#",M]},M))})]}),je.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:je.map(M=>(0,e.jsxs)("button",{type:"button",onClick:()=>F&&F(M),children:[(0,e.jsx)("span",{children:Mt[M.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:M.title})]},M.path))})]})]})]}),!m&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:M=>{M.stopPropagation(),Pe(!0)},children:[t("expand")," \u2304"]})]})]})}function Tn({t,onOpen:a,all:i,onAllChange:u,onMutate:c,active:s,visible:v}){let[k,y]=(0,n.useState)(null),[F,N]=(0,n.useState)(""),S=(0,n.useRef)(!1),h=(0,n.useRef)(0),T=(0,n.useRef)(t);T.current=t;let B=(0,n.useCallback)(async()=>{try{S.current=!1;let R=await(await fetch(`${_}/graph${i?"?all=1":""}`)).json();R.ok?(y(R),N(""),S.current=!0):(y(null),N(R.error||t("error")))}catch(A){N(String(A&&A.message?A.message:A))}},[i,t]);(0,n.useEffect)(()=>{if(!s||S.current)return;let A=!0;return fetch(`${_}/graph${i?"?all=1":""}`).then(R=>R.json()).then(R=>{A&&(R.ok?(y(R),N(""),S.current=!0):(y(null),N(R.error||t("error"))))}).catch(R=>{A&&N(String(R&&R.message?R.message:R))}),()=>{A=!1}},[i,t,s]),(0,n.useEffect)(()=>{v&&k&&h.current++},[v,k]);let E=(0,n.useCallback)(async A=>{try{let se=await(await fetch(`${_}/delete?path=${encodeURIComponent(A)}`)).json();return se&&se.ok?(await B(),c&&c(),!0):!1}catch{return!1}},[B]),z=(0,n.useCallback)(async A=>{if(!A||A.length<2)return!1;try{let R=await fetch(`${_}/merge?paths=${encodeURIComponent(A.join(","))}`).then(se=>se.json());return R&&R.ok?(await B(),c&&c(),!0):!1}catch{return!1}},[B,c]);return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:k?`${k.nodes.length} ${t("nodes")} \xB7 ${ka(k.edges)} ${t("edges")}`:""})]}),F&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",F]}),!k&&!F&&(0,e.jsx)(Ia,{text:t("loadingGraph")}),k&&k.nodes.length===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("emptyGraph")}),k&&k.nodes.length>0&&(0,e.jsx)(Rn,{nodes:k.nodes,edges:k.edges,onOpen:a,onDelete:E,onMerge:z,t,all:i,onAllChange:u,countLabel:`${k.nodes.length} ${t("nodes")} \xB7 ${ka(k.edges)} ${t("edges")}`,fitTrigger:h.current})]})}function ka(t){let a=new Set;for(let i of t||[])a.add([i.source,i.target].sort().join("|"));return a.size}var ut={colors:{project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function zt(t,a){try{let i=globalThis;if(i.__meGraphDrawWarned)return;i.__meGraphDrawWarned=!0,console.warn("[memory-eternal] \u77E5\u8BC6\u56FE\u8C31\u7ED8\u5236\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09"+(a?" @ "+a:""),t)}catch{}}function da({value:t,small:a}){let i=typeof t=="number"&&Number.isFinite(t),u=i?Math.max(0,Math.min(100,t)):0;return(0,e.jsx)("div",{className:"me-progress"+(a?" me-progress-sm":"")+(i?" is-determinate":""),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i?Math.round(u):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:i?{width:Math.max(3,u)+"%"}:void 0})})}function Ia({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(da,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}function Rn({nodes:t,edges:a,onOpen:i,onDelete:u,onMerge:c,t:s,countLabel:v,all:k,onAllChange:y,fitTrigger:F}){let N=(0,n.useRef)(null),S=(0,n.useRef)(null),h=(0,n.useRef)(null),T=(0,n.useRef)(null),B=(0,n.useRef)(null),E=(0,n.useRef)(i);(0,n.useEffect)(()=>{E.current=i},[i]);let z=(0,n.useRef)(u);(0,n.useEffect)(()=>{z.current=u},[u]);let A=(0,n.useRef)(c);(0,n.useEffect)(()=>{A.current=c},[c]);let[R,se]=(0,n.useState)(""),[oe,K]=(0,n.useState)(null),[ie,me]=(0,n.useState)(null),U=(0,n.useRef)("");(0,n.useEffect)(()=>{U.current=R.trim().toLowerCase()},[R]),(0,n.useEffect)(()=>{let f=h.current;if(!f)return;let g=R.trim().toLowerCase();if(!g)return;let O=f.nodes.find(q=>(q.name||"").toLowerCase().includes(g));if(O){h.current.selectedId=O.id,K(O.id),f.panX=f.w/2-O.x*f.zoom,f.panY=f.h/2-O.y*f.zoom;try{f.render&&f.render()}catch(q){zt(q,"search-center")}}},[R]);let[W,G]=(0,n.useState)("all"),[ve,$e]=(0,n.useState)(!1),J=(0,n.useRef)("all"),[je,m]=(0,n.useState)(""),Pe=(0,n.useRef)(""),[le,Z]=(0,n.useState)(!1),Se=(0,n.useRef)(!1),[de,Re]=(0,n.useState)(null);(0,n.useEffect)(()=>{J.current=W},[W]),(0,n.useEffect)(()=>{Pe.current=je},[je]),(0,n.useEffect)(()=>{Se.current=le},[le]);let ze=(0,n.useMemo)(()=>{let f=new Map;for(let g of t)for(let O of g.tags||[]){let q=String(O).trim();q&&f.set(q,(f.get(q)||0)+1)}return[...f.entries()].sort((g,O)=>O[1]-g[1]).slice(0,24).map(([g,O])=>({tag:g,n:O}))},[t]),M=(0,n.useMemo)(()=>{let f={};for(let g of t)f[g.kind||"other"]=(f[g.kind||"other"]||0)+1;return f},[t]),p=(()=>{let f=R.trim().toLowerCase();return!!f&&!t.some(g=>(g.title||g.name||"").toLowerCase().includes(f)||String(g.kind||"").toLowerCase().includes(f)||String(_e[g.kind]||"").toLowerCase().includes(f))})();(0,n.useEffect)(()=>{let f=h.current;f&&f.wake&&f.wake()},[R]),(0,n.useEffect)(()=>{let f=h.current;if(!(!f||!f.render))try{f.render()}catch(g){zt(g,"filter/timeDim")}},[W,je,le]);let j=(0,n.useRef)(null),[Y,we]=(0,n.useState)([]),[re,ue]=(0,n.useState)(null),[te,Xe]=(0,n.useState)(!1),[d,I]=(0,n.useState)(null),[P,Q]=(0,n.useState)(""),Ce=(0,n.useRef)(null),ge=(0,n.useRef)(null),X=(f,g=!0)=>{Ce.current&&clearTimeout(Ce.current),I({msg:f,ok:g}),Ce.current=setTimeout(()=>I(null),1900)},De=f=>{Q(f),ge.current&&clearTimeout(ge.current),ge.current=setTimeout(()=>Q(""),1600)};(0,n.useEffect)(()=>()=>{Ce.current&&clearTimeout(Ce.current),ge.current&&clearTimeout(ge.current)},[]);let Ne=(0,n.useMemo)(()=>t.reduce((f,g)=>(f[g.id]=g,f),{}),[t]);return(0,n.useEffect)(()=>{let f=N.current;if(!f||t.length===0)return;let g=f.getContext("2d");if(!g)return;let O=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),q=()=>document.documentElement.getAttribute("data-theme")==="dark",he={};a.forEach(l=>{he[l.source]=(he[l.source]||0)+1,he[l.target]=(he[l.target]||0)+1});let We=Math.max(1,...Object.values(he)),o={nodes:t.map(l=>({id:l.id,name:l.title||"",type:l.kind||"other",r:9+Math.min(10,(he[l.id]||0)/We*8),x:0,y:0,vx:0,vy:0})),edges:a.map(l=>({sourceNodeId:l.source,targetNodeId:l.target,weight:1})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:O,ctx:g,multi:[],marquee:null};o.domain=t,o.domainById=t.reduce((l,x)=>(l[x.id]=x,l),{}),o.nodes.forEach((l,x)=>{let w=x*2.399963229728653,D=12*Math.sqrt(x);l.x=Math.cos(w)*D,l.y=Math.sin(w)*D});let at=[...new Set(o.nodes.map(l=>l.type))];o.clustered=at.length>1,o.typeCenters={},at.forEach((l,x)=>{let w=x/at.length*Math.PI*2-Math.PI/2;o.typeCenters[l]={x:Math.cos(w)*160,y:Math.sin(w)*160}}),h.current=o;let At=0,gt=0,Fe=null,st="",lt=()=>{let l=f.clientWidth,x=f.clientHeight;o.w=l,o.h=x,f.width=l*O,f.height=x*O,g.setTransform(O,0,0,O,0,0),(At===0||gt===0)&&l>0&&x>0&&o.tickCount>0&&requestAnimationFrame(()=>Me()),At=l,gt=x};lt();let dt=new ResizeObserver(lt);dt.observe(f.parentElement);let nt=(l,x)=>l&&l.length>x?l.slice(0,x)+"\u2026":l,qe=(l,x,w,D)=>{if(g.beginPath(),D==="rect")g.rect(l-w,x-w*.75,w*2,w*1.5);else if(D==="diamond")g.moveTo(l,x-w),g.lineTo(l+w,x),g.lineTo(l,x+w),g.lineTo(l-w,x),g.closePath();else if(D==="hexagon"){for(let $=0;$<6;$++){let ne=Math.PI/3*$-Math.PI/2,ce=l+w*Math.cos(ne),be=x+w*Math.sin(ne);$===0?g.moveTo(ce,be):g.lineTo(ce,be)}g.closePath()}else g.arc(l,x,w,0,Math.PI*2)},ft=new Map,Lt=(l,x)=>{let w=l+"|"+Math.round(x),D=ft.get(w);if(!D){let $=parseInt(l.slice(1,3),16),ne=parseInt(l.slice(3,5),16),ce=parseInt(l.slice(5,7),16);D=g.createRadialGradient(-x*.3,-x*.3,0,0,0,x*1.2),D.addColorStop(0,"rgba("+Math.min(255,$+70)+","+Math.min(255,ne+70)+","+Math.min(255,ce+70)+",0.95)"),D.addColorStop(1,l),ft.set(w,D)}return D},wt=1.1,et=3,Me=()=>{if(!o.nodes.length)return;let l=1/0,x=-1/0,w=1/0,D=-1/0;o.nodes.forEach(Ye=>{l=Math.min(l,Ye.x),x=Math.max(x,Ye.x),w=Math.min(w,Ye.y),D=Math.max(D,Ye.y)});let $=20,ne=x-l+$*2,ce=D-w+$*2,be=Math.min(o.w/ne,o.h/ce),Ae=Math.pow(1/wt,et);o.zoom=Math.max(.35,Math.min(1.8,be*Ae)),o.panX=o.w/2-(l+x)/2*o.zoom,o.panY=o.h/2-(w+D)/2*o.zoom};T.current=Me;let ot=()=>{g.clearRect(0,0,o.w,o.h),o.searchTerm=U.current,o.kindFilter=J.current,o.timeMode=Se.current,o.tagFilter=Pe.current;let l=o.tagFilter,x=o.kindFilter,w=C=>String(C||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");g.save();let D=o.w+"x"+o.h;if(!Fe||st!==D){Fe=new Path2D;for(let C=0;C<o.w;C+=24)Fe.moveTo(C,0),Fe.lineTo(C,o.h);for(let C=0;C<o.h;C+=24)Fe.moveTo(0,C),Fe.lineTo(o.w,C);st=D}g.strokeStyle=q()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",g.lineWidth=.5,g.stroke(Fe),g.restore(),g.save(),g.translate(o.panX,o.panY),g.scale(o.zoom,o.zoom);let $={};o.nodes.forEach(C=>$[C.id]=C);let ne=o.nodes.length>40,ce=ne?1.5:.55,be=o.selectedId||o.hoverId,Ae=ha({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),Ye=(()=>{let C=(o.searchTerm||"").toLowerCase();if(!C)return null;let pe=[];for(let ye of o.nodes){let Oe=(o.domainById[ye.id]||{}).kind||"other";if(((ye.name||"").toLowerCase().includes(C)||String(_e[Oe]||"").toLowerCase().includes(C)||String(Oe).toLowerCase().includes(C))&&pe.push(ye.id),pe.length>200)break}return pe})(),ke=va(o.nodes,{limit:ya(o.nodes.length),focusId:be,hoverId:o.hoverId,searchHits:Ye,degree:he}),Te=new Map,Ze=(C,pe)=>{let ye=C+"|"+pe,Ie=Te.get(ye);return Ie===void 0&&(g.font=C,Ie=g.measureText(pe).width,Te.set(ye,Ie)),Ie},ct=o.nodes.length<=250,it=new Map,ht=o.nodes.length>1200&&o.zoom<.3;o.edges.forEach(C=>{if(ht)return;let pe=$[C.sourceNodeId],ye=$[C.targetNodeId];if(!pe||!ye||!qt(pe.x,pe.y,10,Ae)&&!qt(ye.x,ye.y,10,Ae))return;if(x!=="all"){let It=o.domainById[C.sourceNodeId]&&o.domainById[C.sourceNodeId].kind,mt=o.domainById[C.targetNodeId]&&o.domainById[C.targetNodeId].kind;if(It!==x&&mt!==x)return}if(l){let It=o.domainById[C.sourceNodeId]&&(o.domainById[C.sourceNodeId].tags||[]).includes(l),mt=o.domainById[C.targetNodeId]&&(o.domainById[C.targetNodeId].tags||[]).includes(l);if(!It&&!mt)return}let Ie=ye.x-pe.x,Oe=ye.y-pe.y,Je=Math.sqrt(Ie*Ie+Oe*Oe)||1,vt=ne?12:18,St=-Oe/Je*vt,_t=Ie/Je*vt,$t=(pe.x+ye.x)/2+St,Ut=(pe.y+ye.y)/2+_t,Ft=ut.colors[o.domainById[pe.id]&&o.domainById[pe.id].kind||"other"]||ut.colors.other,Ht=be&&(C.sourceNodeId===be||C.targetNodeId===be),Yt=be?Ht?.6:.08:ne?.14:.24,pt=parseInt(Ft.slice(1,3),16),Et=parseInt(Ft.slice(3,5),16),Jt=parseInt(Ft.slice(5,7),16),rt=Ht?1.6+(C.weight||1):.8+(C.weight||1)*.5,Dt=pt+","+Et+","+Jt+","+Yt+","+rt,tt=it.get(Dt);tt||(tt={path:new Path2D,stroke:"rgba("+pt+","+Et+","+Jt+","+Yt+")",width:rt},it.set(Dt,tt)),tt.path.moveTo(pe.x,pe.y),tt.path.quadraticCurveTo($t,Ut,ye.x,ye.y)}),it.forEach(C=>{g.strokeStyle=C.stroke,g.lineWidth=C.width,g.stroke(C.path)});let Ee=null;be&&(Ee=new Set,o.edges.forEach(C=>{C.sourceNodeId===be?Ee.add(C.targetNodeId):C.targetNodeId===be&&Ee.add(C.sourceNodeId)}));let yt=[];if(o.nodes.forEach(C=>{if(!qt(C.x,C.y,C.r+2,Ae))return;let pe=o.domainById[C.id]||{},ye=pe.kind||"other",Ie=o.timeMode?Dn(pe.updated):ut.colors[ye]||ut.colors.other,Oe=ut.shapes[ye]||"circle",Je=o.selectedId===C.id,vt=o.hoverId===C.id,St=o.searchTerm||"",_t=!St||(C.name||"").toLowerCase().includes(St)||String(_e[ye]||"").toLowerCase().includes(St)||String(ye).toLowerCase().includes(St),$t=x==="all"||ye===x,Ut=!l||(pe.tags||[]).includes(l),Ft=be&&C.id!==be&&!(Ee&&Ee.has(C.id))||St&&!_t||!$t||!Ut;g.save(),g.globalAlpha=Ft?.08:1,(Je||vt)&&ct&&(g.shadowColor=Ie,g.shadowBlur=Je?20:14),g.translate(C.x,C.y),qe(0,0,C.r,Oe),g.fillStyle=Lt(Ie,C.r),g.fill(),g.restore(),Je?(g.save(),qe(C.x,C.y,C.r+3,Oe),g.strokeStyle=Ie,g.lineWidth=3,g.shadowColor=Ie,g.shadowBlur=12,g.stroke(),g.restore()):vt?(g.save(),qe(C.x,C.y,C.r+2,Oe),g.strokeStyle=Ie,g.lineWidth=2,g.stroke(),g.restore()):St&&_t?(g.save(),qe(C.x,C.y,C.r+2,Oe),g.strokeStyle="#e11d48",g.lineWidth=2,g.stroke(),g.restore()):o.multi.indexOf(C.id)>=0&&(g.save(),qe(C.x,C.y,C.r+2,Oe),g.strokeStyle="#60a5fa",g.lineWidth=2,g.shadowColor="#60a5fa",g.shadowBlur=8,g.stroke(),g.restore());let Ht=nt(C.name,16);if((Je||vt||ke.has(C.id)&&o.zoom>ce||!ne&&o.zoom>.6)&&$t&&Ut){let pt=1/o.zoom,Et="500 "+(12*pt).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";g.font=Et;let rt=Ze(Et,Ht)+16*pt,Dt=18*pt,tt=C.y+C.r+8*pt,It=!0;for(let mt of yt)if(C.x-rt/2<mt.x+mt.w&&C.x+rt/2>mt.x&&tt<mt.y+mt.h&&tt+Dt>mt.y){It=!1;break}if(!It&&!Je&&!vt)return;yt.push({x:C.x-rt/2,y:tt,w:rt,h:Dt}),g.fillStyle=q()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",g.beginPath(),g.roundRect?g.roundRect(C.x-rt/2,tt,rt,Dt,4*pt):g.rect(C.x-rt/2,tt,rt,Dt),g.fill(),g.strokeStyle=q()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",g.lineWidth=1*pt,g.stroke(),g.fillStyle=q()?Je||vt?"#eee":"#bbb":Je||vt?"#111":"#444",g.textAlign="center",g.fillText(Ht,C.x,tt+13*pt)}}),g.restore(),o.marquee){let C=o.marquee,pe=Math.min(C.sx,C.ex),ye=Math.min(C.sy,C.ey),Ie=Math.abs(C.ex-C.sx),Oe=Math.abs(C.ey-C.sy);g.save(),g.setLineDash([4,4]),g.strokeStyle="rgba(96,165,250,0.9)",g.lineWidth=1,g.fillStyle="rgba(96,165,250,0.12)",g.fillRect(pe,ye,Ie,Oe),g.strokeRect(pe,ye,Ie,Oe),g.restore()}if(o.hoverId&&j.current){let C=o.domainById[o.hoverId],pe=o.nodes.find(function(ye){return ye.id===o.hoverId});if(C&&pe){let ye=o.edges.filter(function(Je){return Je.sourceNodeId===C.id||Je.targetNodeId===C.id}).length,Ie=pe.x*o.zoom+o.panX,Oe=pe.y*o.zoom+o.panY;j.current.style.display="block",j.current.style.left=Ie+14+"px",j.current.style.top=Oe-6+"px",j.current.innerHTML="<b>"+w(C.title||C.name||"")+'</b><br/><span style="opacity:.8">'+w(C.kind||"")+" \xB7 "+tRef.current("connCount").replace("{n}",ye)+"</span>"}}else j.current&&(j.current.style.display="none")},Ue=0,He=()=>{Ue>0||(o.running=!0,o.raf||(o.raf=requestAnimationFrame(r)))};o.wake=He,o.render=ot;let kt=()=>{let l=o.nodes.length;o.tickCount++;let w=.9-Math.min(.4,o.tickCount/1500),D=l>1e3?3e3:l>100?2e3:l>50?1200:800,$=l>100?.002:.005,ne=l>1e3?.012:l>100?.005:.01,ce=l>1e3?6:l>200?12:24,be={};o.nodes.forEach(ke=>be[ke.id]=ke);for(let ke=0;ke<l;ke++){if(o.dragNode===o.nodes[ke])continue;let Te=o.nodes[ke],Ze=0,ct=0;for(let Ee=0;Ee<l;Ee++){if(ke===Ee)continue;let yt=Te.x-o.nodes[Ee].x,C=Te.y-o.nodes[Ee].y,pe=Math.sqrt(yt*yt+C*C)||1,ye=D/(pe*pe);Ze+=yt/pe*ye,ct+=C/pe*ye}if(o.clustered&&o.typeCenters[Te.type]){let Ee=o.typeCenters[Te.type];Ze+=(Ee.x-Te.x)*.006,ct+=(Ee.y-Te.y)*.006}else Ze-=Te.x*ne,ct-=Te.y*ne;let it=(Te.vx+Ze)*w,ht=(Te.vy+ct)*w;it=Math.max(-ce,Math.min(ce,it)),ht=Math.max(-ce,Math.min(ce,ht)),Te.vx=it,Te.vy=ht}o.edges.forEach(ke=>{let Te=be[ke.sourceNodeId],Ze=be[ke.targetNodeId];if(!Te||!Ze)return;let ct=Ze.x-Te.x,it=Ze.y-Te.y,ht=Math.sqrt(ct*ct+it*it)||1,Ee=(ht-100)*$,yt=ct/ht*Ee,C=it/ht*Ee;o.dragNode!==Te&&(Te.vx+=yt,Te.vy+=C),o.dragNode!==Ze&&(Ze.vx-=yt,Ze.vy-=C)});let Ae=0;o.nodes.forEach(ke=>{o.dragNode!==ke&&(ke.x+=ke.vx,ke.y+=ke.vy,Ae+=ke.vx*ke.vx+ke.vy*ke.vy)}),o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,Me()),(l?Math.sqrt(Ae/l):0)<.05&&o.tickCount>60&&!o.dragNode?o.quietTicks=(o.quietTicks|0)+1:o.quietTicks=0},r=()=>{if(o.running){try{kt(),ot()}catch(l){zt(l,"step")}if(o.quietTicks>30){o.raf=0;return}o.raf=requestAnimationFrame(r)}},H=(l,x)=>{let w=f.getBoundingClientRect();return{x:(l-w.left-o.panX)/o.zoom,y:(x-w.top-o.panY)/o.zoom}},V=l=>{let x=o.domainById[l];return!(!x||J.current!=="all"&&x.kind!==J.current||Pe.current&&!(x.tags||[]).includes(Pe.current))},fe=(l,x,w)=>Math.max(x,Math.min(w,l)),ee=l=>{o.mouseX=l.clientX,o.mouseY=l.clientY;let x=H(l.clientX,l.clientY),w=null;for(let D=o.nodes.length-1;D>=0;D--){let $=o.nodes[D];if(!V($.id))continue;let ne=$.x-x.x,ce=$.y-x.y;if(ne*ne+ce*ce<$.r*$.r+36){w=$.id;break}}w!==o.hoverId&&(o.hoverId=w,He())},ae=l=>{if(l.button!==0)return;let x=H(l.clientX,l.clientY),w=null;for(let D=o.nodes.length-1;D>=0;D--){let $=o.nodes[D];if(!V($.id))continue;let ne=$.x-x.x,ce=$.y-x.y;if(ne*ne+ce*ce<$.r*$.r+25){w=$;break}}if(l.shiftKey){if(w){o.shiftClick=w.id;return}o.marquee={sx:l.clientX,sy:l.clientY,ex:l.clientX,ey:l.clientY};return}o.userTouched=!0,o.dragStart={x:l.clientX,y:l.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=w||null,w&&(o.dragOffset={dx:w.x-x.x,dy:w.y-x.y})},xe=l=>{if(o.marquee){o.marquee.ex=l.clientX,o.marquee.ey=l.clientY,He();return}if(!o.dragStart)return;let x=l.clientX-o.dragStart.x,w=l.clientY-o.dragStart.y;if(Math.abs(x)+Math.abs(w)>3&&(o.dragging=!0),o.dragNode){let D=H(l.clientX,l.clientY);o.dragNode.x=D.x+o.dragOffset.dx,o.dragNode.y=D.y+o.dragOffset.dy,He()}else o.dragging&&(o.panX=fe(o.dragStart.px+x,-1e5,1e5),o.panY=fe(o.dragStart.py+w,-1e5,1e5),He())},Ge=l=>{if(o.marquee){let w=o.marquee;o.marquee=null;let D=f.getBoundingClientRect(),$=Math.min(w.sx,w.ex)-D.left,ne=Math.max(w.sx,w.ex)-D.left,ce=Math.min(w.sy,w.ey)-D.top,be=Math.max(w.sy,w.ey)-D.top,Ae=o.nodes.filter(Ye=>{let ke=Ye.x*o.zoom+o.panX,Te=Ye.y*o.zoom+o.panY;return ke>=$&&ke<=ne&&Te>=ce&&Te<=be}).map(Ye=>Ye.id);o.multi=Ae,we(Ae),He();return}let x=o.dragStart&&!o.dragging;if(o.shiftClick){let w=o.shiftClick;o.shiftClick=null;let D=Array.isArray(o.multi)?o.multi.slice():[];D.includes(w)||D.push(w),o.multi=D,we(D),He();return}if(x){let w=H(l.clientX,l.clientY),D=null;for(let $=o.nodes.length-1;$>=0;$--){let ne=o.nodes[$];if(!V(ne.id))continue;let ce=ne.x-w.x,be=ne.y-w.y;if(ce*ce+be*be<ne.r*ne.r+20){D=ne;break}}D?(o.selectedId=D.id,K(D.id),He()):(o.selectedId=null,o.hoverId=null,l.shiftKey||(o.multi=[],we([])),K(null),He())}o.dragStart=null,o.dragging=!1,o.dragNode=null},bt=l=>{l.preventDefault();let x=H(l.clientX,l.clientY),w=null;for(let D=o.nodes.length-1;D>=0;D--){let $=o.nodes[D];if(!V($.id))continue;let ne=$.x-x.x,ce=$.y-x.y;if(ne*ne+ce*ce<$.r*$.r+25){w=$;break}}if(w){let D=o.domainById[w.id];D&&Re({x:l.clientX,y:l.clientY,id:w.id,path:D.id,title:D.title})}else Re(null)},Be=l=>{l.preventDefault();let x=f.getBoundingClientRect(),w=(l.clientX-x.left-o.panX)/o.zoom,D=(l.clientY-x.top-o.panY)/o.zoom,$=Math.max(.3,Math.min(3,o.zoom*(l.deltaY<0?wt:1/wt)));o.panX=fe(o.panX+w*(o.zoom-$),-1e5,1e5),o.panY=fe(o.panY+D*(o.zoom-$),-1e5,1e5),o.zoom=$,o.userTouched=!0,He()};f.addEventListener("mousemove",ee),f.addEventListener("mousedown",ae),window.addEventListener("mousemove",xe),window.addEventListener("mouseup",Ge),f.addEventListener("wheel",Be,{passive:!1}),f.addEventListener("contextmenu",bt),B.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],we([]),o.userTouched=!1,Me(),He()},Ue=xa(o.nodes.length);let Tt=Ue,Wt=()=>Tt>0?Math.round((Tt-Ue)/Tt*100):100;Ue>0&&me(0);let Rt=Tt>0?[.75,.5,.25].map(l=>Math.round(Tt*l)):[],b=()=>{if(!o.running)return;let l=performance.now();for(;Ue>0&&performance.now()-l<12;)kt(),Ue--;if(me(Ue>0?Math.min(99,Wt()):100),Rt.length&&Ue<=Rt[0]){Rt.shift(),o.userTouched||Me();try{ot()}catch(x){zt(x,"warm-frame")}}if(Ue>0){o.userTouched||Me(),o.warmRaf=requestAnimationFrame(b);return}o.warmRaf=0,o.userTouched||Me();try{ot()}catch(x){zt(x,"warm-final")}me(null),He()};o.warmStep=b,Me();try{ot()}catch(l){zt(l,"first-frame")}Ue>0?o.warmRaf=requestAnimationFrame(b):(me(0),He());let L=()=>$e(!1);return window.addEventListener("mousedown",L),()=>{o.running=!1,o.raf&&cancelAnimationFrame(o.raf),o.warmRaf&&cancelAnimationFrame(o.warmRaf),dt.disconnect(),f.removeEventListener("mousemove",ee),f.removeEventListener("mousedown",ae),window.removeEventListener("mousemove",xe),window.removeEventListener("mouseup",Ge),f.removeEventListener("wheel",Be),f.removeEventListener("contextmenu",bt),window.removeEventListener("mousedown",L)}},[t,a]),(0,n.useEffect)(()=>{F!==void 0&&T.current&&requestAnimationFrame(()=>{try{T.current()}catch(f){zt(f,"fit")}})},[F]),(0,e.jsxs)("div",{className:"me-graph",ref:S,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[t.length," ",s("nodes")," \xB7 ",a.length," ",s("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:s("search"),value:R,onChange:f=>se(f.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>$e(f=>!f),"aria-expanded":ve,title:s("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",s("filterLabel")," ",W!=="all"||le||je?"\u25CF":"\u25BE"]}),ve&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:f=>f.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${W==="all"&&!le?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{G("all"),Z(!1)},children:s("all")}),Object.keys(Ke).map(f=>(0,e.jsxs)("button",{type:"button",className:`lg${W===f?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>G(g=>g===f?"all":f),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:ut.colors[f]||Ke[f]}}),s(_e[f])]},f)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${le?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Z(f=>!f),children:["\u23F1 ",s("timeDim")]}),ze.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:ze.map(f=>(0,e.jsxs)("button",{type:"button",className:`lg${je===f.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>m(g=>g===f.tag?"":f.tag),title:f.tag,children:["#",f.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:f.n})]},f.tag))})]}),(W!=="all"||le||je)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{G("all"),Z(!1),m("")},children:[s("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:s("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!k,onChange:f=>y&&y(f.target.checked)}),s("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${le?" me-on":""}`,onClick:()=>Z(f=>!f),children:s("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let f=N.current;if(f)try{f.toBlob(g=>{g&&ue({url:URL.createObjectURL(g),blob:g})},"image/png")}catch{}},children:s("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>T.current&&T.current(),children:s("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{K(null),G("all"),B.current&&B.current()},children:s("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:N,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),ie!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:10,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(28,28,32,0.86)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",color:"#eee",fontSize:11.5,fontWeight:600,letterSpacing:".02em",pointerEvents:"none",boxShadow:"0 6px 18px rgba(0,0,0,.22)"},children:[(0,e.jsx)(da,{value:ie,small:!0}),(0,e.jsxs)("span",{children:[s("graphWarming").replace("{n}",t.length)," \xB7 ",Math.round(ie),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(ut.colors).filter(f=>M[f]).map(f=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:ut.colors[f]}}),(0,e.jsx)("span",{children:s(_e[f]||"kindKnowledge")}),(0,e.jsx)("b",{children:M[f]})]},f))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:j,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),p&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:s("noMatch")}),de&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>Re(null)}),de&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:de.x,top:de.y,zIndex:31},onMouseDown:f=>f.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",onClick:()=>{E.current({path:de.path,title:de.title}),Re(null)},children:s("openCard")}),(0,e.jsx)("button",{type:"button",onClick:()=>{de.id&&(h.current.selectedId=de.id,K(de.id)),Re(null);let f=h.current;f&&f.wake&&f.wake()},children:s("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(de.title||"")}catch{}Re(null),X(s("copied"))},children:s("copyName")}),(0,e.jsx)("button",{type:"button",onClick:()=>{let f=h.current,g=f&&Array.isArray(f.multi)?f.multi.slice():[],O=de.id;if(O&&!g.includes(O)&&g.push(O),Re(null),g.length<2){X(s("mergeNeed"),!1);return}if(!window.confirm(s("mergeConfirm")))return;let q=A.current&&A.current(g);q&&q.then?q.then(he=>he?X(s("merged")):X(s("mergeFail"),!1)).catch(()=>X(s("mergeFail"),!1)):q&&X(s("merged"))},children:s("merge")}),(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let f=de.path;Re(null),window.confirm(s("deleteConfirm"))&&(async()=>{try{(z.current?await z.current(f):!1)?X(s("deleted")):X(s("deleteFail"),!1)}catch{X(s("deleteFail"),!1)}})()},children:s("delete")})]}),Y.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[Y.length," ",s("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let g=Y.map(We=>Ne[We]).filter(Boolean).map(We=>We.title||We.name).join(`
|
|
829
|
+
`),O=new Blob([g],{type:"text/plain;charset=utf-8"}),q=URL.createObjectURL(O),he=document.createElement("a");he.href=q,he.download="memory-selected.txt",document.body.appendChild(he),he.click(),document.body.removeChild(he),setTimeout(()=>URL.revokeObjectURL(q),1e3),X(Y.length+s("exportedSel"))},children:s("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(Y.length<2){X(s("mergeNeed"),!1);return}let f=Y.map(O=>Ne[O]?Ne[O].id:O);if(!window.confirm(s("mergeConfirm")))return;we([]);let g=h.current;g&&(g.multi=[]),fetch(`${_}/merge?paths=${encodeURIComponent(f.join(","))}`).then(O=>O.json()).then(O=>{O&&O.ok?X(s("merged")):X(s("mergeFail"),!1)}).catch(()=>X(s("mergeFail"),!1))},children:s("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(s("deleteConfirm")))return;let f=Y.map(O=>Ne[O]?Ne[O].id:O);we([]);let g=h.current;g&&(g.multi=[]),(async()=>{let O=0;for(let q of f)try{(z.current?await z.current(q):!1)&&O++}catch{}X(O+s("deletedSelected"),O>0)})()},children:s("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let f=h.current;f&&(f.multi=[]),we([]);let g=h.current;g&&g.render&&g.render()},children:s("clearSelection")})]}),oe&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:Ne[oe]?Ne[oe].title||Ne[oe].name:oe}),(0,e.jsx)("div",{style:{opacity:.8,marginBottom:8},children:Ne[oe]?s(_e[Ne[oe].kind]||"kindKnowledge"):"\u2014"}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:s("graphHint")}),(a.filter(f=>f.source===oe||f.target===oe)||[]).slice(0,8).map((f,g)=>{let O=f.source===oe?f.target:f.source,q=Ne[O];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:he=>{he.preventDefault();let We=h.current;We&&(We.selectedId=O,We.hoverId=O,We.wake&&We.wake()),K(O)},children:q?(q.title||q.name).slice(0,28):O},g)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:s("graphTip")}),d&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(d.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:d.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:d.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:d.msg})]}),re&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{re.url&&URL.revokeObjectURL(re.url),ue(null),Xe(!1)},children:[(0,e.jsx)("style",{children:Ve}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:te?"100vw":900,width:te?"100vw":"92vw",maxHeight:te?"100%":"90vh",height:te?"100%":void 0,borderRadius:te?0:14},onClick:f=>f.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:s("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:re.url,download:"memory-graph.png",onClick:()=>{De("download"),X(s("downloaded")+" \xB7 "+s("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:s(P==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{De("full"),Xe(f=>!f),X(s("fullscreen"))},children:s(P==="full"?"done":te?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let f=re.blob;f&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":f})]).then(()=>{De("copy"),X(s("copied"))}).catch(()=>{X(s("copyFail"),!1)}):X(s("copyFail"),!1)},children:s(P==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{re.url&&URL.revokeObjectURL(re.url),ue(null),Xe(!1)},children:s("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:te?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:re.url,alt:s("exportGraph"),style:{maxWidth:"100%",maxHeight:te?"calc(100% - 64px)":"70vh",borderRadius:te?0:8,cursor:"zoom-in"},onClick:()=>Xe(f=>!f)})})]})]})]})}function Dn(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let i=(Date.now()-a)/864e5;return i<3?"#10b981":i<14?"#f59e0b":i<30?"#f97316":"#94a3b8"}function Sa({label:t,value:a=[],options:i,onChange:u,placeholder:c,z:s=20}){let[v,k]=(0,n.useState)(!1),y=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!v)return;let E=z=>{y.current&&!y.current.contains(z.target)&&k(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[v]);let F=Array.isArray(a)?a:[],N=F.includes("__all__"),S=N?i.find(E=>E.value==="__all__")?.label||"":F.length?F.map(E=>i.find(z=>z.value===E)?.label||E).join("\u3001"):"",h=(E,z)=>{if(E.value==="__all__"){u(z?["__all__"]:[]);return}let A=new Set(F);A.has("__all__")&&A.delete("__all__"),z?A.add(E.value):A.delete(E.value),u([...A])},T=i.find(E=>E.value==="__all__"),B=i.filter(E=>E.value!=="__all__");return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t}),(0,e.jsxs)("div",{ref:y,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>k(E=>!E),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S||c||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),v&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:s,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[T&&(0,e.jsxs)("label",{onClick:E=>E.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:N,onChange:E=>h(T,E.target.checked)}),(0,e.jsx)("span",{children:T.label})]}),B.map(E=>(0,e.jsxs)("label",{onClick:z=>z.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer"},children:[(0,e.jsx)("input",{type:"checkbox",checked:F.includes(E.value),onChange:z=>h(E,z.target.checked)}),(0,e.jsx)("span",{children:E.label})]},E.value))]})]})]})}function zn(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function An(t,a,i){if(i&&typeof window.showSaveFilePicker=="function")try{let s=await window.showSaveFilePicker({suggestedName:a}),v=await s.createWritable();return await v.write(t),await v.close(),{ok:!0,picked:!0,name:s.name}}catch(s){return s&&s.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(s.message||s)}}let u=URL.createObjectURL(t),c=document.createElement("a");return c.href=u,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),setTimeout(()=>URL.revokeObjectURL(u),1e3),{ok:!0,picked:!1,name:a}}function aa(t,a){if(!a||!t)return t;let i=t.toLowerCase(),u=a.toLowerCase(),c=[],s=0;for(;s<t.length;){let v=i.indexOf(u,s);if(v<0){c.push(t.slice(s));break}v>s&&c.push(t.slice(s,v)),c.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(v,v+u.length)},v)),s=v+u.length}return c}function xt(t){if(!t)return"";let a=new Date(t);if(Number.isNaN(a.getTime()))return"";let i=new Date,u=a.toDateString()===i.toDateString(),c=v=>String(v).padStart(2,"0"),s=`${c(a.getHours())}:${c(a.getMinutes())}`;return u?s:`${a.getMonth()+1}-${a.getDate()} ${s}`}
|
|
817
830
|
|
|
818
831
|
return module.exports;
|
|
819
832
|
},
|