@michengai/dsh-archive-manager 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/CHANGELOG.zh-CN.md +8 -0
- package/lib/client.js +5 -5
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -7,20 +7,20 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
globalThis.__dshArchiveReactDOMClient = require("react-dom/client");
|
|
8
8
|
var module = { exports: {} };
|
|
9
9
|
var exports = module.exports;
|
|
10
|
-
"use strict";var fn=Object.defineProperty;var _a=Object.getOwnPropertyDescriptor;var Ta=Object.getOwnPropertyNames;var ja=Object.prototype.hasOwnProperty;var t=(e,r)=>fn(e,"name",{value:r,configurable:!0});var Da=(e,r)=>{for(var i in r)fn(e,i,{get:r[i],enumerable:!0})},Na=(e,r,i,g)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ta(r))!ja.call(e,a)&&a!==i&&fn(e,a,{get:()=>r[a],enumerable:!(g=_a(r,a))||g.enumerable});return e};var za=e=>Na(fn({},"__esModule",{value:!0}),e);var li={};Da(li,{startArchiveClient:()=>oi});module.exports=za(li);function ee(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return e}t(ee,"record");function Ae(e){return String(e&&typeof e=="object"&&"message"in e?e.message??e:e)}t(Ae,"errorMessage");function vn(e){return e&&typeof e=="object"&&"code"in e?e.code:void 0}t(vn,"errorCode");var $r=Function("return globalThis.__dshArchiveReact")(),{Children:pi,Component:mi,Fragment:Gr,Profiler:gi,PureComponent:fi,StrictMode:vi,Suspense:yi,cloneElement:bi,createContext:wi,createElement:Kr,createRef:Si,forwardRef:xi,isValidElement:ki,lazy:Ci,memo:Ei,startTransition:Ii,useCallback:Ai,useContext:Ri,useDebugValue:_i,useDeferredValue:Ti,useEffect:Yr,useId:ji,useImperativeHandle:Di,useInsertionEffect:Ni,useLayoutEffect:zi,useMemo:Oi,useReducer:Mi,useRef:Pi,useState:Ft,useSyncExternalStore:Li,useTransition:Ui,version:Bi}=$r,M=$r;function Jr(e){return M.createElement("input",{className:"dsham_number",type:"number",min:e.min,max:e.max,value:e.value??"",disabled:e.disabled,"aria-label":e["aria-label"],onChange:t(r=>{let i=r.target.value;if(i===""){e.onChange(null);return}let g=Number(i);e.onChange(Number.isNaN(g)?null:g)},"onChange")})}t(Jr,"NumberField");function Ma(e=M.createElement){return e("svg",{className:"dsham_dateIcon",width:14,height:14,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e("rect",{x:2,y:3,width:12,height:11,rx:2}),e("line",{x1:2,y1:6.5,x2:14,y2:6.5}),e("line",{x1:5.5,y1:1.5,x2:5.5,y2:3.5}),e("line",{x1:10.5,y1:1.5,x2:10.5,y2:3.5}))}t(Ma,"CalendarIcon");function Xt(e,r,i){let g=String(r+1).padStart(2,"0"),a=String(i).padStart(2,"0");return`${e}-${g}-${a}`}t(Xt,"formatYmd");function Ht(e){let r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return r?{year:Number(r[1]),monthIndex:Number(r[2])-1,day:Number(r[3])}:null}t(Ht,"parseYmd");function Pa(e,r){let i=new Date(e,r,1).getDay(),g=(i===0?7:i)-1,a=new Date(e,r+1,0).getDate(),l=new Date(e,r,0).getDate(),c=[];for(let x=0;x<42;x++){let y=e,E=r,b=0,v=!1;x<g?(b=l-g+x+1,E=r-1,E<0&&(E=11,y--),v=!0):x<g+a?b=x-g+1:(b=x-g-a+1,E=r+1,E>11&&(E=0,y++),v=!0),c.push({year:y,monthIndex:E,day:b,dateStr:Xt(y,E,b),isOutside:v})}return c}t(Pa,"buildMonthGrid");function La(e,r=new Date){if(e==="all")return{from:"",to:""};let i=Xt(r.getFullYear(),r.getMonth(),r.getDate());if(e==="today")return{from:i,to:i};let g=e==="7d"?6:e==="30d"?29:89,a=new Date(r.getTime()-g*864e5);return{from:Xt(a.getFullYear(),a.getMonth(),a.getDate()),to:i}}t(La,"getPresetRange");function Zr(e,r,i,g){let a=r+g,l=new Date(e,a+1,0).getDate();return new Date(e,a,Math.min(i,l))}t(Zr,"shiftMonthClamped");function Qr(e){let r=e.React||M;function i(I,se){let ze=I==="from"?se:e.from,Lt=I==="to"?se:e.to;if(ze===""&&Lt===""){e.onClear();return}I==="from"?e.onFrom(se):e.onTo(se)}t(i,"change");let g=!!(e.from||e.to),a="";e.from&&e.to?a=`${e.from} \u2013 ${e.to}`:e.from?a=`${e.from} \u2013`:e.to?a=`\u2013 ${e.to}`:a=e.t?e.t("discovery.timeRange")||`${e.fromLabel} \u2013 ${e.toLabel}`:`${e.fromLabel} \u2013 ${e.toLabel}`;let c=(r.useRef??(I=>{let[se]=r.useState({current:I});return se}))(null),[x,y]=r.useState(!1),E=Ht(e.from||e.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[b,v]=r.useState(E.year),[S,R]=r.useState(E.monthIndex),[j,L]=r.useState(null),[P,F]=r.useState(null),[Ce,K]=r.useState(null);r.useEffect(()=>{if(!x)return;let I=t(ze=>{c.current&&!c.current.contains(ze.target)&&(y(!1),L(null))},"onPointerDown"),se=t(ze=>{ze.key==="Escape"&&(ze.preventDefault(),ze.stopPropagation(),y(!1),L(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",I,!0),typeof window<"u"&&window.addEventListener("keydown",se,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",I,!0),typeof window<"u"&&window.removeEventListener("keydown",se,!0)}},[x]),r.useEffect(()=>{if(!x||!Ce||!c.current)return;c.current.querySelector(`[data-date="${Ce}"]`)?.focus()},[x,Ce]);let Y=e.t?e.t("discovery.today")==="Today"||(e.t("locale.language")||"").startsWith("en"):!1,Z=e.t?e.t("discovery.today")==="\u0421\u0435\u0433\u043E\u0434\u043D\u044F"||(e.t("locale.language")||"").startsWith("ru"):!1,X=Y?"en-US":Z?"ru-RU":"zh-CN",Ee=Y?["Mo","Tu","We","Th","Fr","Sa","Su"]:Z?["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"]:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"];function te(I){I.stopPropagation(),S<=0?(R(11),v(se=>se-1)):R(se=>se-1)}t(te,"prevMonth");function $(I){I.stopPropagation(),S>=11?(R(0),v(se=>se+1)):R(se=>se+1)}t($,"nextMonth");function mt(I){j?(I>=j?(e.onFrom(j),e.onTo(I)):(e.onFrom(I),e.onTo(j)),L(null),y(!1)):(L(I),F(I))}t(mt,"handleDayClick");function Se(I){let se=La(I);I==="all"?e.onClear():(e.onFrom(se.from),e.onTo(se.to)),L(null),y(!1)}t(Se,"applyPreset");function U(I){let se=Xt(I.getFullYear(),I.getMonth(),I.getDate());K(se),j&&F(se),(I.getFullYear()!==b||I.getMonth()!==S)&&(v(I.getFullYear()),R(I.getMonth()))}t(U,"moveFocusToDate");function pe(I,se){let ze=Ht(I);ze&&U(new Date(ze.year,ze.monthIndex,ze.day+se))}t(pe,"moveFocus");let qe=e.from,Ot=e.to;j&&P&&(qe=j<=P?j:P,Ot=j<=P?P:j);let rn=Pa(b,S),Qe=new Date,xn=Ce||qe||Xt(Qe.getFullYear(),Qe.getMonth(),Qe.getDate()),Mt=rn.map((I,se)=>{let ze=qe===I.dateStr,Lt=Ot===I.dateStr,Ut=!!(qe&&Ot&&I.dateStr>qe&&I.dateStr<Ot),sn=I.year===Qe.getFullYear()&&I.monthIndex===Qe.getMonth()&&I.day===Qe.getDate(),kt="dsham_dateDay";I.isOutside&&(kt+=" is-outside"),sn&&(kt+=" is-today"),ze&&(kt+=" is-start"),Lt&&(kt+=" is-end"),Ut&&(kt+=" is-in-range");let qt=!I.isOutside&&(I.dateStr===xn||I.day===1&&!rn.some(G=>!G.isOutside&&G.dateStr===xn));return r.createElement("div",{key:se,className:kt,role:"button",tabIndex:qt?0:-1,"data-date":I.dateStr,"aria-label":I.dateStr,"aria-pressed":!!(ze||Lt||Ut),onClick:t(G=>{G.stopPropagation(),mt(I.dateStr)},"onClick"),onKeyDown:t(G=>{if(G.key==="Enter"||G.key===" ")G.preventDefault(),G.stopPropagation(),mt(I.dateStr);else if(G.key==="ArrowLeft")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,-1);else if(G.key==="ArrowRight")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,1);else if(G.key==="ArrowUp")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,-7);else if(G.key==="ArrowDown")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,7);else if(G.key==="Home"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);if(fe){let De=new Date(fe.year,fe.monthIndex,fe.day),Ct=(De.getDay()===0?7:De.getDay())-1;De.setDate(De.getDate()-Ct),U(De)}}else if(G.key==="End"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);if(fe){let De=new Date(fe.year,fe.monthIndex,fe.day),Ct=(De.getDay()===0?7:De.getDay())-1;De.setDate(De.getDate()+(6-Ct)),U(De)}}else if(G.key==="PageUp"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);fe&&U(Zr(fe.year,fe.monthIndex,fe.day,-1))}else if(G.key==="PageDown"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);fe&&U(Zr(fe.year,fe.monthIndex,fe.day,1))}},"onKeyDown"),onMouseEnter:t(()=>{j&&F(I.dateStr)},"onMouseEnter")},I.day)}),Pt=`${b}\u5E74 ${S+1}\u6708`;try{Pt=new Intl.DateTimeFormat(X,{year:"numeric",month:"long"}).format(new Date(b,S,1))}catch{Pt=Y||Z?`${b}-${String(S+1).padStart(2,"0")}`:`${b}\u5E74 ${S+1}\u6708`}return r.createElement("div",{ref:c,className:"dsham_dateRange",role:"group","aria-label":e.label},r.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:e.from,"aria-label":e.fromLabel,"aria-invalid":e.invalid||void 0,onChange:t(I=>i("from",I.target.value),"onChange")}),r.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:e.to,"aria-label":e.toLabel,"aria-invalid":e.invalid||void 0,onChange:t(I=>i("to",I.target.value),"onChange")}),r.createElement("div",{className:"dsham_dateTrigger"+(x?" is-open":""),role:"button",tabIndex:0,"aria-expanded":x,"aria-controls":x?"dsham-date-popover":void 0,onClick:t(()=>{x&&L(null),y(!x)},"onClick"),onKeyDown:t(I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),x&&L(null),y(!x))},"onKeyDown")},Ma(r.createElement),r.createElement("span",{className:"dsham_dateText"+(g?"":" placeholder")},a),g?r.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:t(I=>{I.stopPropagation(),e.onClear(),L(null)},"onClick"),children:"\xD7"}):null,r.createElement("span",{className:"dsham_dateChevron"},Xr(r.createElement,x))),x&&r.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":e.label,onClick:t(I=>I.stopPropagation(),"onClick")},r.createElement("div",{className:"dsham_datePresets"},r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("all"),"onClick")},e.t?e.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("today"),"onClick")},e.t?e.t("discovery.today"):"\u4ECA\u5929"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("7d"),"onClick")},e.t?e.t("discovery.last7Days"):"\u8FD1 7 \u5929"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("30d"),"onClick")},e.t?e.t("discovery.last30Days"):"\u8FD1 30 \u5929"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("90d"),"onClick")},e.t?e.t("discovery.last90Days"):"\u8FD1 90 \u5929")),r.createElement("div",{className:"dsham_dateCalendar"},r.createElement("div",{className:"dsham_dateCalHeader"},r.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:te,"aria-label":"prev month"},"\u2039"),r.createElement("span",{className:"dsham_dateMonthTitle"},Pt),r.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:$,"aria-label":"next month"},"\u203A")),r.createElement("div",{className:"dsham_dateGrid"},Ee.map((I,se)=>r.createElement("div",{key:se,className:"dsham_dateWeekday"},I))),r.createElement("div",{className:"dsham_dateGrid"},Mt))))}t(Qr,"DateRange");function yn(e){return M.createElement("div",{className:e.className},M.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":e.open,onClick:e.onToggle},Xr(M.createElement,e.open),e.title),e.open?M.createElement("div",null,e.children):null)}t(yn,"Disclosure");function Xr(e,r){return e("svg",{className:"dsham_foldChevron"+(r?" is-open":""),viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0},e("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}t(Xr,"foldChevron");function $n(e){let r=M.useRef(null);return M.useEffect(()=>{r.current&&(r.current.indeterminate=!!e.indeterminate&&!e.checked)},[e.indeterminate,e.checked]),M.createElement("input",{ref:r,className:"dsham_checkbox",type:"checkbox",checked:e.checked,disabled:e.disabled,"aria-label":e.label,onChange:t(i=>e.onChange({target:{checked:i.target.checked}}),"onChange")})}t($n,"SelectionCheckbox");var en=t(e=>{if(typeof e!="string"||!e.length||e.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return e},"id"),ts=t((e,r=!1)=>{if(typeof e!="string"||e.length>200||r&&!e.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return e.trim()},"queryText"),es={parse(e){let r=ee(e);if(!r||!Array.isArray(r.sessionIds)||!r.sessionIds.length||r.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u68C0\u7D22\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(r.sessionIds.map(en))],query:ts(r.query,!0)}}},Ua={parse(e){let r=ee(e);if(!r)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:en(r.sessionId),query:ts(r.query??"")}}},Gn=t((e,r)=>{if(typeof e!="string"||e.length>r)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return e},"boundedString"),ns=t(e=>{if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return e},"sequence"),Kn={parse(e){let r=ee(e);if(!r||!Array.isArray(r.items)||!Array.isArray(r.failures)||r.items.length>20||r.failures.length>20)throw new TypeError("\u68C0\u7D22\u7ED3\u679C\u65E0\u6548");return{items:r.items.map(ee).map(i=>({sessionId:en(i.sessionId),seq:ns(i.seq),snippet:Gn(i.snippet,400)})),failures:r.failures.map(ee).map(i=>({sessionId:en(i.sessionId),message:Gn(i.message,500)}))}}},Ba={parse(e){let r=ee(e);if(!r||!Array.isArray(r.messages)||r.messages.length>8||typeof r.hasEarlier!="boolean"||typeof r.hasLater!="boolean")throw new TypeError("\u9884\u89C8\u7ED3\u679C\u65E0\u6548");return{sessionId:en(r.sessionId),hasEarlier:r.hasEarlier,hasLater:r.hasLater,messages:r.messages.map(ee).map(i=>{if(typeof i.role!="string"||!["user","assistant"].includes(i.role)||typeof i.truncated!="boolean")throw new TypeError("\u6D88\u606F\u89D2\u8272\u6216\u622A\u65AD\u72B6\u6001\u65E0\u6548");return{seq:ns(i.seq),role:i.role,text:Gn(i.text,2e3),truncated:i.truncated}})}}};async function rs(e,r=globalThis.navigator?.clipboard){if(typeof e!="string"||!e)throw Object.assign(new Error("\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9"),{code:"copy.empty"});if(!r?.writeText)throw Object.assign(new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762"),{code:"copy.unavailable"});try{await r.writeText(e)}catch{throw Object.assign(new Error("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5"),{code:"copy.denied"})}}t(rs,"copySessionText");function ss(){let e=t((i,g)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${i}`,create:t(()=>g,"create"),schema:g}),"codec");return[["searchSessionContent",es,Kn],["searchArchivedContent",es,Kn],["previewArchivedSession",Ua,Ba]].map(([i,g,a])=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${i}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:i,invocation:{kind:"direct"},parameters:[{name:"input",wire:"input",source:"json",codec:e(i+"Input",g)}],result:e(i+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(ss,"discoveryInvocations");function as(e,r){let i=r?.trim().toLowerCase();if(!i)return null;let g=e.toLowerCase().indexOf(i);if(g<0)return null;let a=0,l=0,c;for(let x of e){let y=l+x.toLowerCase().length;if(c===void 0&&y>g&&(c=a),a+=x.length,y>=g+i.length)return{start:c??a,end:a};l=y}return null}t(as,"findTextRange");function bn(e,r=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return NaN;let[i,g,a]=e.split("-").map(Number),l=new Date(i,g-1,a);return l.getFullYear()!==i||l.getMonth()!==g-1||l.getDate()!==a?NaN:(r&&l.setDate(l.getDate()+1),l.getTime())}t(bn,"dayBoundary");function Yn(e,r){return(!e||Number.isFinite(bn(e)))&&(!r||Number.isFinite(bn(r)))&&(!e||!r||e<=r)}t(Yn,"validUpdatedRange");function is(e,r,i){if(!Yn(r,i))return!1;if(!r&&!i)return!0;let g=typeof e=="number"?e:Date.parse(e??"");return Number.isFinite(g)&&(!r||g>=bn(r))&&(!i||g<bn(i,!0))}t(is,"matchesUpdatedRange");async function os(e,r,i,{signal:g,onProgress:a}={}){let l=[],c=[],x=[...new Set(e)],y=t(()=>{if(g?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let E=0;E<x.length;E+=20){y();let b=Kn.parse(await i({sessionIds:x.slice(E,E+20),query:r}));y(),l.push(...b.items),c.push(...b.failures),a?.({done:Math.min(E+20,x.length),total:x.length,items:[...l],failures:[...c]})}return y(),{items:l,failures:c}}t(os,"searchArchiveBatches");function ls(e,r={}){let i=e.createElement;function g({text:v,query:S=""}){let R=as(v,S);return R?i(e.Fragment,null,v.slice(0,R.start),i("mark",null,v.slice(R.start,R.end)),v.slice(R.end)):v}t(g,"HighlightedText");function a(v,S,R,j){let L=JSON.stringify(v),P=JSON.stringify([L,S]),[F,Ce]=e.useState(0),[K,Y]=e.useState({key:"",status:"idle",items:[],failures:[]});return e.useEffect(()=>{if(!R||!S.trim()||!j)return;let X=new AbortController;Y({key:P,status:"loading",items:[],failures:[],done:0,total:v.length});let Ee=setTimeout(()=>{os(JSON.parse(L),S,j,{signal:X.signal,onProgress:t(te=>{X.signal.aborted||Y({key:P,status:"loading",...te})},"onProgress")}).then(te=>{X.signal.aborted||Y({key:P,status:"ready",done:v.length,total:v.length,...te})}).catch(te=>{X.signal.aborted||Y($=>({...$,key:P,status:"error",error:Ae(te)}))})},350);return()=>{X.abort(),clearTimeout(Ee)}},[L,S,R,j,F]),{...R&&S.trim()&&j?K.key===P?K:{key:P,status:"loading",items:[],failures:[],done:0,total:v.length}:{status:"idle",items:[],failures:[]},retry:t(()=>Ce(X=>X+1),"retry")}}t(a,"useArchiveSearch");function l(v,S){let[R,j]=e.useState(null),[L,P]=e.useState({status:"idle"}),[F,Ce]=e.useState(0),K=R,Y=R&&S.includes(R.session.id);return e.useEffect(()=>{R&&!Y&&j(null)},[R,Y]),e.useEffect(()=>{if(!Y||typeof window>"u")return;let Z=t(X=>{X.key==="Escape"&&(X.preventDefault(),X.stopPropagation(),X.stopImmediatePropagation(),j(null))},"onKeyDown");return window.addEventListener("keydown",Z,!0),()=>window.removeEventListener("keydown",Z,!0)},[Y]),e.useEffect(()=>{if(!R||!Y||!v)return;let Z=!0;return P({key:K,status:"loading"}),Promise.resolve().then(()=>v({sessionId:R.session.id,query:R.query})).then(X=>{Z&&P({key:K,status:"ready",value:X})}).catch(X=>{Z&&P({key:K,status:"error",error:Ae(X)})}),()=>{Z=!1}},[K,Y,v,F]),{target:Y?R:null,...L.key===K?L:{status:"loading"},open:t((Z,X="")=>j({session:Z,query:X}),"open"),close:t(()=>j(null),"close"),retry:t(()=>Ce(Z=>Z+1),"retry")}}t(l,"useArchivePreview");function c({title:v,failures:S,separator:R}){let[j,L]=e.useState(!1),P=i("ul",null,S.map(F=>i("li",{key:F.sessionId},F.sessionId,R,F.message)));return i(yn,{title:v,open:j,onToggle:t(()=>L(F=>!F),"onToggle")},P)}t(c,"FailureDetails");function x(v,S){let R=r.Button??(j=>i("button",{type:"button",disabled:j.disabled,onClick:j.onClick},j.children));return i(R,{variant:"outline",size:"sm",...S},v)}t(x,"textButton");function y({t:v,from:S,to:R,onFrom:j,onTo:L,invalid:P,onClear:F}){return i("div",{className:"dsham_dateFilter"},i(Qr,{React:e,from:S,to:R,invalid:P,label:v("discovery.date"),fromLabel:v("discovery.from"),toLabel:v("discovery.to"),onFrom:j,onTo:L,onClear:F,t:v}),P?i("p",{className:"dsham_dateAlert",role:"alert"},v("discovery.invalidDate")):null)}t(y,"DiscoveryFilters");function E({state:v,t:S}){return v.status==="idle"?null:i("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},i("p",null,S(v.status==="loading"?"discovery.searching":v.status==="error"?"discovery.searchError":"discovery.searched",{done:v.done??0,total:v.total??0})),v.status==="error"&&i("p",null,v.error),v.failures.length>0&&i(c,{title:S("discovery.failed",{n:v.failures.length}),failures:v.failures,separator:S("common.separator")}),(v.status==="error"||v.status==="ready"&&v.failures.length>0)&&x(S("discovery.retry"),{onClick:v.retry}))}t(E,"SearchStatus");function b({preview:v,t:S,MarkdownText:R}){let[j,L]=e.useState(!1);if(v.status==="loading")return i("p",{role:"status"},S("discovery.loading"));if(v.status==="error")return i("div",null,i("p",{role:"alert"},v.error),x(S("discovery.retry"),{onClick:v.retry}));let P=v.value;return P?i("div",{className:"dsham_previewMessages"},i("div",{className:"dsham_previewToolbar"},i("span",{title:S("discovery.previewHint")},S("discovery.readOnly")," \xB7 ",S("discovery.messageCount",{n:P.messages.length})),R&&i(r.SegmentedControl??"div",{id:"dsham-preview-mode",label:S("discovery.displayMode"),value:j?"raw":"formatted",options:[{value:"formatted",label:S("discovery.formatted")},{value:"raw",label:S("discovery.raw")}],onChange:t(F=>L(F==="raw"),"onChange")})),P.hasEarlier&&i("p",null,S("discovery.earlier")),!P.messages.length&&i("p",null,S("discovery.empty")),P.messages.map(F=>i("article",{key:F.seq,className:"dsham_previewMessage"},i("div",{className:"dsham_previewRole","data-role":F.role},i("span",{"aria-hidden":!0},S(F.role==="user"?"discovery.you":"discovery.ai")),i("strong",null,S("discovery."+F.role))),j||!R?i("pre",{className:"dsham_previewRaw"},i(g,{text:F.text,query:v.target?.query})):i(R,{text:F.text,streaming:!1,labels:{code:{copyLabel:S("discovery.copyCode"),copiedLabel:S("details.copied")},footnotes:S("discovery.footnotes")}}),F.truncated&&i("small",null,S("discovery.truncated")))),P.hasLater&&i("p",null,S("discovery.later"))):null}return t(b,"PreviewContent"),{HighlightedText:g,useArchiveSearch:a,useArchivePreview:l,DiscoveryFilters:y,SearchStatus:E,PreviewContent:b}}t(ls,"createDiscoveryTools");var cs=[".dsham_dateFilter{display:flex;align-items:center;gap:8px;min-width:0;position:relative}",".dsham_dateAlert{position:absolute;top:calc(100% + 4px);right:0;margin:0;width:max-content;max-width:240px;padding:4px 8px;background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-state-error-primary);border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,0.25);z-index:1100;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary);pointer-events:none}",".dsham_dateRange{position:relative;display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;box-sizing:border-box}",".dsham_dateTrigger{display:inline-flex;align-items:center;gap:6px;width:100%;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;cursor:pointer;box-sizing:border-box;transition:all .15s ease}",".dsham_dateTrigger:hover{border-color:var(--dsw-alias-border-l3)}",".dsham_dateTrigger.is-open{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 1px var(--dsw-alias-state-business-primary)}",".dsham_dateIcon{flex:none;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center}",".dsham_dateText{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:var(--dsw-alias-label-primary)}",".dsham_dateText.placeholder{color:var(--dsw-alias-label-primary)}",".dsham_dateClearBtn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);border-radius:50%;cursor:pointer;font-size:13px;line-height:1}",".dsham_dateClearBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}",".dsham_dateChevron{flex:none;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center}",".dsham_dateInputSrOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}",".dsham_datePopover{position:absolute;top:calc(100% + 4px);right:0;left:auto;z-index:1000;display:flex;gap:10px;padding:10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,10px);background:var(--dsw-alias-bg-layer-1);box-shadow:0 8px 24px rgba(0,0,0,0.12),0 2px 6px rgba(0,0,0,0.06);box-sizing:border-box}",".dsham_datePresets{width:84px;border-right:0.5px solid var(--dsw-alias-border-l2);padding-right:8px;display:flex;flex-direction:column;gap:3px;flex:none}",".dsham_datePresetBtn{border:0;background:transparent;padding:5px 6px;text-align:left;font:inherit;font-size:12px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm,6px);cursor:pointer;transition:all .15s ease;white-space:nowrap}",".dsham_datePresetBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}",".dsham_dateCalendar{width:224px;display:flex;flex-direction:column;gap:6px;flex:none}",".dsham_dateCalHeader{display:flex;justify-content:space-between;align-items:center;padding:0 2px}",".dsham_dateMonthTitle{font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary)}",".dsham_dateNavBtn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:4px;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:14px;line-height:1}",".dsham_dateNavBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}",".dsham_dateGrid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px}",".dsham_dateWeekday{font-size:11px;color:var(--dsw-alias-label-tertiary);text-align:center;padding:3px 0;font-weight:500}",".dsham_dateDay{position:relative;height:26px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:0}",".dsham_dateDay.is-outside{color:var(--dsw-alias-label-quaternary)}",".dsham_dateDay:not(.is-outside):hover{background:var(--dsw-alias-interactive-bg-hover);border-radius:4px}",".dsham_dateDay.is-start{background:var(--dsw-alias-state-business-primary)!important;color:#fff!important;border-top-left-radius:6px;border-bottom-left-radius:6px}",".dsham_dateDay.is-end{background:var(--dsw-alias-state-business-primary)!important;color:#fff!important;border-top-right-radius:6px;border-bottom-right-radius:6px}",".dsham_dateDay.is-start.is-end{border-radius:6px!important}",".dsham_dateDay.is-in-range{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-business-primary)}",".dsham_dateDay.is-today::after{content:'';position:absolute;bottom:2px;width:3px;height:3px;border-radius:50%;background:var(--dsw-alias-state-business-primary)}",".dsham_dateDay.is-start.is-today::after,.dsham_dateDay.is-end.is-today::after{background:#fff}",".dsham_discoveryStatus{font-size:12px;margin-bottom:12px;overflow-wrap:anywhere}",".dsham_settingsSnippet{display:block;width:100%;padding:0;margin:4px 0 0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}",".dsham_previewMessages{max-height:65vh;overflow:auto;overflow-wrap:anywhere;padding-right:8px}",".dsham_previewToolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;color:var(--dsw-alias-label-secondary);font-size:12px}",".dsham_previewRole{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-size:13px}",".dsham_previewRole>span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--dsw-alias-bg-layer-3);font-size:11px}",".dsham_previewRole[data-role=user]>span{color:var(--dsw-alias-state-business-primary)}",".dsham_previewRaw{white-space:pre-wrap;font:13px/1.8 ui-monospace,monospace;overflow-wrap:anywhere}",".dsham_previewMessage pre:not(.dsham_previewRaw){white-space:pre;overflow-x:auto;max-width:100%}",".dsham_previewMessage table{display:block;max-width:100%;overflow-x:auto}",".dsham_previewMessage img{max-width:100%}","@media(max-width:520px){.dsham_previewToolbar{align-items:flex-start;flex-wrap:wrap}}",".dsham_previewMessage{padding:18px 0;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_previewMessage p{font-size:14px;line-height:1.8}",".dsham_previewHint,.dsham_previewMessage small{color:var(--dsw-alias-label-secondary);font-size:12px}",".dsham_settings mark,.dsham_previewMessages mark{background:var(--dsw-alias-state-warn-tertiary);color:inherit;border-radius:2px}",".dsham_settingsSnippet:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}"].join(""),ds={"common.separator":"\uFF1A","copy.empty":"\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9","copy.unavailable":"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762","copy.denied":"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5","discovery.you":"\u4F60","discovery.ai":"AI","discovery.readOnly":"\u53EA\u8BFB\u9884\u89C8","discovery.messageCount":"\u672C\u6B21\u663E\u793A {n} \u6761\u6D88\u606F","discovery.displayMode":"\u663E\u793A\u65B9\u5F0F","discovery.formatted":"\u6392\u7248","discovery.raw":"\u539F\u6587\u4E0E\u9AD8\u4EAE","discovery.copyCode":"\u590D\u5236\u4EE3\u7801","discovery.footnotes":"\u6CE8\u91CA","details.copyId":"\u590D\u5236\u4F1A\u8BDD ID","details.copied":"\u5DF2\u590D\u5236","discovery.date":"\u65E5\u671F","discovery.timeRange":"\u65F6\u95F4\u8303\u56F4","discovery.allTime":"\u5168\u90E8\u65F6\u95F4","discovery.today":"\u4ECA\u5929","discovery.last7Days":"\u8FD1 7 \u5929","discovery.last30Days":"\u8FD1 30 \u5929","discovery.last90Days":"\u8FD1 90 \u5929","discovery.customRange":"\u81EA\u5B9A\u4E49\u2026","discovery.dateActive":"\u65E5\u671F\xB7\u5DF2\u9009","discovery.clearDate":"\u6E05\u9664\u65E5\u671F","discovery.active":"\u5DF2\u542F\u7528","discovery.scope":"\u67E5\u627E\u8303\u56F4","discovery.titleOnly":"\u4EC5\u6807\u9898","discovery.titleAndContent":"\u6807\u9898\u4E0E\u6B63\u6587","discovery.from":"\u66F4\u65B0\u65F6\u95F4\u4ECE","discovery.to":"\u81F3","discovery.clear":"\u6E05\u9664\u6761\u4EF6","discovery.invalidDate":"\u5F00\u59CB\u65E5\u671F\u4E0D\u80FD\u665A\u4E8E\u7ED3\u675F\u65E5\u671F\uFF0C\u8BF7\u68C0\u67E5\u65E5\u671F\u8303\u56F4\u3002","discovery.searching":"\u6B63\u5728\u68C0\u7D22\u6B63\u6587\uFF1A{done} / {total}","discovery.searched":"\u6B63\u6587\u68C0\u7D22\u5B8C\u6210\uFF1A{done} / {total}","discovery.searchError":"\u6B63\u6587\u68C0\u7D22\u672A\u5B8C\u6210\uFF0C\u5F53\u524D\u7ED3\u679C\u53EF\u80FD\u4E0D\u5B8C\u6574\u3002","discovery.failed":"{n} \u6761\u4F1A\u8BDD\u8BFB\u53D6\u5931\u8D25","discovery.retry":"\u91CD\u8BD5","discovery.preview":"\u5FEB\u901F\u9884\u89C8","discovery.loading":"\u6B63\u5728\u8BFB\u53D6\u4F1A\u8BDD\u2026","discovery.previewHint":"\u53EA\u8BFB\u9884\u89C8\u539F\u59CB\u5BF9\u8BDD\u6587\u672C\uFF0C\u4E0D\u6062\u590D\u4F1A\u8BDD\uFF1B\u4E0D\u542B\u5DE5\u5177\u8F93\u51FA\u3001\u9644\u4EF6\u3001\u63A8\u7406\u548C\u7CFB\u7EDF\u5185\u5BB9\u3002","discovery.earlier":"\u524D\u9762\u8FD8\u6709\u6D88\u606F\uFF0C\u53EF\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD\u67E5\u770B\u3002","discovery.later":"\u540E\u9762\u8FD8\u6709\u6D88\u606F\uFF0C\u53EF\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD\u67E5\u770B\u3002","discovery.empty":"\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u7528\u6237\u6216\u52A9\u624B\u6587\u672C\u3002","discovery.truncated":"\u672C\u6761\u4EC5\u663E\u793A\u90E8\u5206\u5185\u5BB9\u3002","discovery.user":"\u7528\u6237","discovery.assistant":"\u52A9\u624B","discovery.openFull":"\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD","discovery.searchPlaceholder":"\u641C\u7D22\u6807\u9898\u6216\u6B63\u6587"},us={"common.separator":": ","copy.empty":"Nothing to copy","copy.unavailable":"Clipboard unavailable. Open the page over HTTPS or localhost.","copy.denied":"Copy failed. Allow clipboard access and retry.","discovery.you":"You","discovery.ai":"AI","discovery.readOnly":"Read-only preview","discovery.messageCount":"Showing {n} messages","discovery.displayMode":"Display mode","discovery.formatted":"Formatted","discovery.raw":"Source and highlights","discovery.copyCode":"Copy code","discovery.footnotes":"Footnotes","details.copyId":"Copy session ID","details.copied":"Copied","discovery.date":"Date","discovery.timeRange":"Time range","discovery.allTime":"All time","discovery.today":"Today","discovery.last7Days":"Past 7 days","discovery.last30Days":"Past 30 days","discovery.last90Days":"Past 90 days","discovery.customRange":"Custom\u2026","discovery.dateActive":"Date \xB7 Set","discovery.clearDate":"Clear dates","discovery.active":"Active","discovery.scope":"Search in","discovery.titleOnly":"Titles","discovery.titleAndContent":"Titles and content","discovery.from":"Updated from","discovery.to":"To","discovery.clear":"Clear filters","discovery.invalidDate":"Check the date range: the start must not be after the end.","discovery.searching":"Searching content: {done} / {total}","discovery.searched":"Content search complete: {done} / {total}","discovery.searchError":"Content search is incomplete; results may be missing.","discovery.failed":"Could not read {n} conversations","discovery.retry":"Retry","discovery.preview":"Quick preview","discovery.loading":"Reading conversation\u2026","discovery.previewHint":"Read-only original conversation text; keeps the conversation archived. Excludes tools, attachments, reasoning and system content.","discovery.earlier":"More messages before this preview. Open the full conversation to read them.","discovery.later":"More messages after this preview. Open the full conversation to read them.","discovery.empty":"No user or assistant text to preview.","discovery.truncated":"Only part of this message is shown.","discovery.user":"User","discovery.assistant":"Assistant","discovery.openFull":"Open full conversation","discovery.searchPlaceholder":"Search titles or content"},hs={"common.separator":": ","copy.empty":"\u041D\u0435\u0447\u0435\u0433\u043E \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C","copy.unavailable":"\u0411\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u043E HTTPS \u0438\u043B\u0438 localhost.","copy.denied":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C. \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0431\u0443\u0444\u0435\u0440\u0443 \u043E\u0431\u043C\u0435\u043D\u0430 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","discovery.you":"\u0412\u044B","discovery.ai":"\u0418\u0418","discovery.readOnly":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F","discovery.messageCount":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439: {n}","discovery.displayMode":"\u0420\u0435\u0436\u0438\u043C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","discovery.formatted":"\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043E","discovery.raw":"\u0418\u0441\u0445\u043E\u0434\u043D\u0438\u043A \u0438 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0430","discovery.copyCode":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u0434","discovery.footnotes":"\u0421\u043D\u043E\u0441\u043A\u0438","details.copyId":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID \u0441\u0435\u0441\u0441\u0438\u0438","details.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","discovery.date":"\u0414\u0430\u0442\u0430","discovery.timeRange":"\u041F\u0435\u0440\u0438\u043E\u0434","discovery.allTime":"\u0412\u0441\u0435 \u0432\u0440\u0435\u043C\u044F","discovery.today":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F","discovery.last7Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 7 \u0434\u043D\u0435\u0439","discovery.last30Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 30 \u0434\u043D\u0435\u0439","discovery.last90Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 90 \u0434\u043D\u0435\u0439","discovery.customRange":"\u0421\u0432\u043E\u0439 \u043F\u0435\u0440\u0438\u043E\u0434\u2026","discovery.dateActive":"\u0414\u0430\u0442\u0430 \xB7 \u0412\u044B\u0431\u0440\u0430\u043D\u0430","discovery.clearDate":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u0430\u0442\u044B","discovery.active":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E","discovery.scope":"\u0418\u0441\u043A\u0430\u0442\u044C \u0432","discovery.titleOnly":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u044F","discovery.titleAndContent":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435","discovery.from":"\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0441","discovery.to":"\u041F\u043E","discovery.clear":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B","discovery.invalidDate":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D \u0434\u0430\u0442: \u043D\u0430\u0447\u0430\u043B\u043E \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u043E\u0437\u0436\u0435 \u043A\u043E\u043D\u0446\u0430.","discovery.searching":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443: {done} / {total}","discovery.searched":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D: {done} / {total}","discovery.searchError":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u0439; \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u043C\u0438.","discovery.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C {n} \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u043E\u0432","discovery.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","discovery.preview":"\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440","discovery.loading":"\u0427\u0442\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430\u2026","discovery.previewHint":"\u0422\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u0435\u043D\u0438\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430; \u0441\u0435\u0441\u0441\u0438\u044F \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u0432 \u0430\u0440\u0445\u0438\u0432\u0435. \u0411\u0435\u0437 \u0432\u044B\u0432\u043E\u0434\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432, \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0439, \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u0439 \u0438 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u043E\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E.","discovery.earlier":"\u041F\u0435\u0440\u0435\u0434 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u043E\u043C \u0435\u0441\u0442\u044C \u0435\u0449\u0451 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0447\u0442\u043E\u0431\u044B \u0438\u0445 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C.","discovery.later":"\u041F\u043E\u0441\u043B\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0435\u0441\u0442\u044C \u0435\u0449\u0451 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0447\u0442\u043E\u0431\u044B \u0438\u0445 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C.","discovery.empty":"\u041D\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430.","discovery.truncated":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0430\u0441\u0442\u044C \u044D\u0442\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","discovery.user":"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C","discovery.assistant":"\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442","discovery.openFull":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440","discovery.searchPlaceholder":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u043C \u0438\u043B\u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443"};var ps=t(e=>{let r=ee(e);if(!r||typeof r.sessionId!="string"||!r.sessionId.length||r.sessionId.length>1024||typeof r.identity!="string"||!r.identity.length||r.identity.length>4096)throw new TypeError("invalid cache rebuild candidate");return{sessionId:r.sessionId,identity:r.identity}},"candidate"),Fa={parse(e){let r=ee(e);if(!r||!Array.isArray(r.items)||!r.items.length||r.items.length>20)throw new TypeError("invalid cache rebuild batch (1\u201320 items required)");return{items:r.items.map(ps)}}},Zn={parse(e){let r=ee(e);if(!r||!Array.isArray(r.items)||r.count!==r.items.length)throw new TypeError("invalid cache diagnosis");return{count:r.items.length,items:r.items.map(ps)}}},Jn={parse(e){let r=ee(e);for(let i of["rebuiltSessionIds","skippedSessionIds"])if(!Array.isArray(r?.[i])||r[i].some(g=>typeof g!="string"))throw new TypeError("invalid cache rebuild result");if(!Array.isArray(r.failures)||r.failures.some(i=>!i||typeof i.sessionId!="string"||typeof i.message!="string"))throw new TypeError("invalid cache rebuild failures");return r}};function ms(){let e=t((r,i)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${r}`,create:t(()=>i,"create"),schema:i}),"codec");return[{method:"diagnoseSessionCaches",parameters:[],result:e("CacheDiagnosis",Zn)},{method:"rebuildSessionCaches",parameters:[{name:"input",wire:"input",source:"json",codec:e("CacheRebuildInput",Fa)}],result:e("CacheRebuildResult",Jn)}].map(({method:r,...i})=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${r}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:r,invocation:{kind:"direct"},...i,sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(ms,"cacheRebuildInvocations");function gs(e,r={}){let{maxLoadRetries:i=3,retryDelayMs:g=200}=r,a={diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null},l=!0,c=0,x=[],y,E=new Set,b=t(S=>{if(l){a={...a,...S};for(let R of E)R()}},"update"),v=t(async(S=i)=>{if(!l)return;y!==void 0&&(clearTimeout(y),y=void 0);let R=++c;try{let j=Zn.parse(await e.diagnose());l&&R===c&&b({diagnosis:j,error:null})}catch(j){if(S>0&&l&&R===c){y=setTimeout(()=>{y=void 0,l&&R===c&&v(S-1)},g);return}l&&R===c&&b({error:Ae(j)})}},"load");return{snapshot:t(()=>a,"snapshot"),subscribe(S){return E.add(S),()=>{E.delete(S)}},load:v,async run(S=!1){if(!l||a.busy)return;++c,y!==void 0&&(clearTimeout(y),y=void 0);let R=S?[...x]:[...a.diagnosis.items],j={rebuiltSessionIds:[],skippedSessionIds:[],failures:[]};x=[],b({busy:!0,result:null,error:null,refreshError:null,progress:{done:0,total:R.length}});for(let[L,P]of R.entries()){if(!l)return;try{let F=Jn.parse(await e.rebuild({items:[P]}));if(!l)return;j.rebuiltSessionIds.push(...F.rebuiltSessionIds),j.skippedSessionIds.push(...F.skippedSessionIds),j.failures.push(...F.failures),F.failures.length&&x.push(P)}catch(F){if(!l)return;j.failures.push({sessionId:P.sessionId,message:Ae(F)}),x.push(P)}b({progress:{done:L+1,total:R.length}})}b({result:j});try{await e.refresh()}catch(L){b({refreshError:Ae(L)})}l&&(await v(),b({busy:!1,progress:null}))},dismiss(){l&&b({result:null,error:null,refreshError:null})},dispose(){l=!1,++c,y!==void 0&&(clearTimeout(y),y=void 0),E.clear()}}}t(gs,"createCacheRebuildController");var jt=class extends Error{static{t(this,"ArchiveNavigationError")}code;constructor(r){super(r),this.name="ArchiveNavigationError",this.code=r}};function fs(e,r){return e instanceof jt?r(`archives.${e.code}`):Ae(e)}t(fs,"formatArchiveNavigationError");function Ha(e,r){if(typeof e?.retainInfo!="function")return;let i=e.retainInfo(r),g=i&&typeof i=="object"&&"getSnapshot"in i&&typeof i.getSnapshot=="function"?i.getSnapshot():i;if(!g||typeof g!="object"||!("retainedBy"in g))return;let a=g.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}t(Ha,"retainInfoSnapshot");function Wa(e){let r=e?.byId;if(r!==void 0){for(let i of Object.values(r))if(i&&(i.retainedBy?.mainView??0)>0)return i.id}}t(Wa,"mainViewSessionId");function pt(e){return Wa(e)}t(pt,"currentSessionId");function qa(e,r,i){return r===void 0||r===""?!1:(e?.byId?.[r]?.retainedBy?.mainView??0)>0||(Ha(i,r)?.retainedBy?.mainView??0)>0}t(qa,"sessionIsCurrent");async function vs(e,r,i,g=()=>!0){if(i){if(typeof e.prepare=="function"&&await e.prepare(r),!g())return;await e.restore(r)}g()&&await e.open(r)}t(vs,"openArchivedConversation");function ys(e,r,i,{onOpened:g=t(()=>{},"onOpened"),beginNavigation:a,warn:l=t((...c)=>console.warn(...c),"warn")}={}){let c,x=e?.clearArchivedCurrent,y=e&&Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent"),E=t(S=>qa(r.list.getSnapshot(),S,r),"viewing"),b=t(function(...S){return c!==void 0&&E(c)&&i.list.getSnapshot().archivedSessionIds.includes(c)?!1:(c=void 0,x?.apply(this,S))},"wrapped"),v=t(()=>e&&Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent")?.value===b,"ownsWrapper");if(e&&typeof x=="function")try{if(e.clearArchivedCurrent=b,!v())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(S){l("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",S)}return{open(S){c=S;try{if(typeof x=="function"&&!v()&&i.list.getSnapshot().archivedSessionIds.includes(S))throw l("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new jt("navigationUnavailable");if(a?.(),typeof e?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new jt("navigationUnavailable");if(e.openSession(S),!E(S))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof x=="function"}),new jt("sessionNotRetained");g()}catch(R){throw c=void 0,R}},dispose(){c=void 0,!(!e||Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent")?.value!==b)&&(y?Object.defineProperty(e,"clearArchivedCurrent",y):delete e.clearArchivedCurrent,x?.call(e))}}}t(ys,"allowArchivedNavigation");var zt=require("@deepseek-ai/dsh-client-ui-primitives");var bs={check:"\u68C0\u67E5\u66F4\u65B0",update:"\u66F4\u65B0",recheck:"\u91CD\u65B0\u68C0\u67E5",auto:"\u81EA\u52A8\u66F4\u65B0",updating:"\u6B63\u5728\u66F4\u65B0\u2026",copy:"\u590D\u5236\u547D\u4EE4",copied:"\u5DF2\u590D\u5236",copyFailed:"\u590D\u5236\u5931\u8D25",checking:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026",latest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C",found:"\u53D1\u73B0\u65B0\u7248\u672C",failed:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",current:"\u8FD0\u884C\u7248\u672C",latestLabel:"\u6700\u65B0\u7248\u672C",profile:"\u76EE\u6807 profile",unknown:"\u672A\u77E5",manual:"\u624B\u5DE5\u66F4\u65B0",manualHint:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u53EF\u5728\u5F53\u524D DSH \u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5B8C\u6210\u540E\u91CD\u542F DSH Web\u3002",manualHintDesktop:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u8BF7\u5148\u5B8C\u5168\u9000\u51FA DSH Desktop\uFF0C\u518D\u7528 Desktop \u81EA\u5E26\u7684 dsh \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u3002\u666E\u901A dsh \u4F1A\u62D2\u7EDD desktop profile\u3002",intro:"\u4EC5\u68C0\u67E5\u5E76\u66F4\u65B0\u5F53\u524D\u63D2\u4EF6\uFF0C\u4E0D\u4F1A\u8054\u52A8\u5B89\u88C5\u5176\u4ED6\u63D2\u4EF6\u3002",restart:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u91CD\u542F DSH Web\u3002",restartDesktop:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 DSH Desktop\u3002",restarting:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u6B63\u5728\u91CD\u542F DSH Desktop\u2026",unavailable:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u4F7F\u7528\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4\u3002"},ws={check:"Check for updates",update:"Update",recheck:"Check again",auto:"Update automatically",updating:"Updating\u2026",copy:"Copy command",copied:"Copied",copyFailed:"Copy failed",checking:"Checking for updates\u2026",latest:"You are up to date",found:"New version available",failed:"Could not check for updates. Try again later.",current:"Running version",latestLabel:"Latest version",profile:"Target profile",unknown:"Unknown",manual:"Manual update",manualHint:"If automatic update fails, run this command in the current DSH terminal, then restart DSH Web.",manualHintDesktop:"If automatic update fails, fully quit DSH Desktop, then run this command with Desktop's own dsh. A regular dsh rejects the desktop profile.",intro:"Only this plugin is checked and updated. Other plugins are not changed.",restart:"Update complete. Restart DSH Web.",restartDesktop:"Update complete. Fully quit and reopen DSH Desktop.",restarting:"Update complete. Restarting DSH Desktop\u2026",unavailable:"Automatic update is unavailable. Use the manual command."};function tn(e){return e.toLowerCase().startsWith("zh")?bs:ws}t(tn,"pluginUpdateCopy");function Va(e,r,i,g){let a=tn(e),l=r?.restartDesktop===!0||r?.profileName==="desktop",c=l?{...a,manualHint:a.manualHintDesktop}:a,x=i!=="idle",y=c.checking,E="";return i==="checking"?y=c.checking:i==="updating"?y=c.updating:g.type==="error"?(y=g.message||c.failed,E="error"):g.type==="restart"?(y=l?c.restartDesktop:c.restart,E="success"):g.type==="restarting"?(y=c.restarting,E="success"):r===void 0?y=c.checking:r.latestCheckFailed?(y=c.failed,E="error"):!r.canAutoUpdate&&r.updateAvailable?(y=c.unavailable,E="update"):r.updateAvailable?(y=`${c.found}: v${r.latestVersion??c.unknown}`,E="update"):(y=c.latest,E="success"),{copy:c,busy:x,message:y,kind:E,loading:i==="updating",updateLabel:i==="updating"?c.updating:c.auto,disabled:x||r?.canAutoUpdate!==!0||r.updateAvailable!==!0,currentVersion:r===void 0?c.unknown:`v${r.currentVersion}`,latestVersion:r?.latestVersion===void 0?c.unknown:`v${r.latestVersion}`,profileName:r?.profileName??c.unknown,profileRaw:r?.profileName??"",latestRaw:r?.latestVersion??"latest"}}t(Va,"describePluginUpdate");function Ss(e,r,i){let g="idle",a=r,l={type:"status"},c=0,x=new Set,y=t(()=>{for(let b of x)b()},"emit"),E=t(b=>{a=b,i?.(b)},"assign");return{get posts(){return c},subscribe(b){return x.add(b),()=>{x.delete(b)}},view(b){return Va(b,a,g,l)},async check(){if(g==="idle"){g="checking",l={type:"status"},y();try{E(await e("GET")),l={type:"status"}}catch(b){l={type:"error",message:b instanceof Error?b.message:""}}finally{g="idle",y()}}},async update(){if(g==="idle"){g="updating",l={type:"status"},c+=1,y();try{let b=await e("POST");E(b),l={type:b.autoReload===!0?"restarting":"restart"}}catch(b){l={type:"error",message:b instanceof Error?b.message:""}}finally{g="idle",y()}}}}}t(Ss,"createUpdateFlow");function xs(e,r,i){return`dsh plugin${e.trim()===""?"":` --profile ${e.trim()}`} add ${r}@${i} --registry=https://registry.npmjs.org/`}t(xs,"manualPluginUpdateCommand");function ks(e,r){return e.key!=="Escape"?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),r(),!0)}t(ks,"handlePluginUpdateEscape");function $a(){let e=globalThis.document;if(typeof e>"u"||e===null)return;let r=e.baseURI;if(!(typeof r!="string"||r===""))try{let i=new URL(r),g=i.pathname.lastIndexOf("/"),a=i.pathname.slice(g+1);return/\.(html?|php|aspx?|jsp)$/i.test(a)?i.pathname=i.pathname.slice(0,g+1):i.pathname.endsWith("/")||(i.pathname+="/"),i.href}catch{return}}t($a,"pageBaseHref");function wn(e){if(typeof e!="string"||e.charAt(0)!=="/"||e.charAt(1)==="/")return e;let r=$a();if(r===void 0)return e;try{return new URL(e.slice(1),r).href}catch{return e}}t(wn,"resolveApiUrl");function Cs(e){let i=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(i===void 0)throw new Error("createRoot unavailable");return i(e)}t(Cs,"mountRoot");var Ga="x-michengai-plugin-update",Es="michengai-plugin-update-ui",Qn=`
|
|
10
|
+
"use strict";var Cn=Object.defineProperty;var Ga=Object.getOwnPropertyDescriptor;var $a=Object.getOwnPropertyNames;var Ka=Object.prototype.hasOwnProperty;var e=(t,s)=>Cn(t,"name",{value:s,configurable:!0});var Ya=(t,s)=>{for(var o in s)Cn(t,o,{get:s[o],enumerable:!0})},Za=(t,s,o,f)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of $a(s))!Ka.call(t,a)&&a!==o&&Cn(t,a,{get:()=>s[a],enumerable:!(f=Ga(s,a))||f.enumerable});return t};var Ja=t=>Za(Cn({},"__esModule",{value:!0}),t);var Ei={};Ya(Ei,{startArchiveClient:()=>Ci});module.exports=Ja(Ei);function le(t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return t}e(le,"record");function Pe(t){return String(t&&typeof t=="object"&&"message"in t?t.message??t:t)}e(Pe,"errorMessage");function En(t){return t&&typeof t=="object"&&"code"in t?t.code:void 0}e(En,"errorCode");var ss=Function("return globalThis.__dshArchiveReact")(),{Children:ji,Component:Di,Fragment:as,Profiler:Ni,PureComponent:zi,StrictMode:Oi,Suspense:Mi,cloneElement:Pi,createContext:Li,createElement:is,createRef:Fi,forwardRef:Bi,isValidElement:Ui,lazy:Hi,memo:Wi,startTransition:qi,useCallback:Vi,useContext:Gi,useDebugValue:$i,useDeferredValue:Ki,useEffect:os,useId:Yi,useImperativeHandle:Zi,useInsertionEffect:Ji,useLayoutEffect:Qi,useMemo:Xi,useReducer:eo,useRef:to,useState:qt,useSyncExternalStore:no,useTransition:ro,version:so}=ss,L=ss;function cs(t){return L.createElement("input",{className:"dsham_number",type:"number",min:t.min,max:t.max,value:t.value??"",disabled:t.disabled,"aria-label":t["aria-label"],onChange:e(s=>{let o=s.target.value;if(o===""){t.onChange(null);return}let f=Number(o);t.onChange(Number.isNaN(f)?null:f)},"onChange")})}e(cs,"NumberField");function Xa(t=L.createElement){return t("svg",{className:"dsham_dateIcon",width:14,height:14,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},t("rect",{x:2,y:3,width:12,height:11,rx:2}),t("line",{x1:2,y1:6.5,x2:14,y2:6.5}),t("line",{x1:5.5,y1:1.5,x2:5.5,y2:3.5}),t("line",{x1:10.5,y1:1.5,x2:10.5,y2:3.5}))}e(Xa,"CalendarIcon");function an(t,s,o){let f=String(s+1).padStart(2,"0"),a=String(o).padStart(2,"0");return`${t}-${f}-${a}`}e(an,"formatYmd");function Vt(t){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);return s?{year:Number(s[1]),monthIndex:Number(s[2])-1,day:Number(s[3])}:null}e(Vt,"parseYmd");function ei(t,s){let o=new Date(t,s,1).getDay(),f=(o===0?7:o)-1,a=new Date(t,s+1,0).getDate(),l=new Date(t,s,0).getDate(),c=[];for(let E=0;E<42;E++){let y=t,R=s,w=0,v=!1;E<f?(w=l-f+E+1,R=s-1,R<0&&(R=11,y--),v=!0):E<f+a?w=E-f+1:(w=E-f-a+1,R=s+1,R>11&&(R=0,y++),v=!0),c.push({year:y,monthIndex:R,day:w,dateStr:an(y,R,w),isOutside:v})}return c}e(ei,"buildMonthGrid");function ti(t,s=new Date){if(t==="all")return{from:"",to:""};let o=an(s.getFullYear(),s.getMonth(),s.getDate());if(t==="today")return{from:o,to:o};let f=t==="7d"?6:t==="30d"?29:89,a=new Date(s.getTime()-f*864e5);return{from:an(a.getFullYear(),a.getMonth(),a.getDate()),to:o}}e(ti,"getPresetRange");function ls(t,s,o,f){let a=s+f,l=new Date(t,a+1,0).getDate();return new Date(t,a,Math.min(o,l))}e(ls,"shiftMonthClamped");function ds(t){let s=t.React||L;function o(_,J){let Le=_==="from"?J:t.from,zt=_==="to"?J:t.to;if(Le===""&&zt===""){t.onClear();return}_==="from"?t.onFrom(J):t.onTo(J)}e(o,"change");let f=!!(t.from||t.to),a="";t.from&&t.to?a=`${t.from} \u2013 ${t.to}`:t.from?a=`${t.from} \u2013`:t.to?a=`\u2013 ${t.to}`:a=t.t?t.t("discovery.timeRange")||`${t.fromLabel} \u2013 ${t.toLabel}`:`${t.fromLabel} \u2013 ${t.toLabel}`;let c=(s.useRef??(_=>{let[J]=s.useState({current:_});return J}))(null),[E,y]=s.useState(!1),R=Vt(t.from||t.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[w,v]=s.useState(R.year),[x,T]=s.useState(R.monthIndex),[N,B]=s.useState(null),[F,H]=s.useState(null),[De,ne]=s.useState(null);s.useEffect(()=>{if(!E)return;let _=e(Le=>{c.current&&!c.current.contains(Le.target)&&(y(!1),B(null))},"onPointerDown"),J=e(Le=>{Le.key==="Escape"&&(Le.preventDefault(),Le.stopPropagation(),y(!1),B(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",_,!0),typeof window<"u"&&window.addEventListener("keydown",J,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",_,!0),typeof window<"u"&&window.removeEventListener("keydown",J,!0)}},[E]),s.useEffect(()=>{if(!E||!De||!c.current)return;c.current.querySelector(`[data-date="${De}"]`)?.focus()},[E,De]);let re=t.t?t.t("discovery.today")==="Today"||(t.t("locale.language")||"").startsWith("en"):!1,se=t.t?t.t("discovery.today")==="\u0421\u0435\u0433\u043E\u0434\u043D\u044F"||(t.t("locale.language")||"").startsWith("ru"):!1,ie=re?"en-US":se?"ru-RU":"zh-CN",Ne=re?["Mo","Tu","We","Th","Fr","Sa","Su"]:se?["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"]:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"];function ce(_){_.stopPropagation(),x<=0?(T(11),v(J=>J-1)):T(J=>J-1)}e(ce,"prevMonth");function Z(_){_.stopPropagation(),x>=11?(T(0),v(J=>J+1)):T(J=>J+1)}e(Z,"nextMonth");function xt(_){N?(_>=N?(t.onFrom(N),t.onTo(_)):(t.onFrom(_),t.onTo(N)),B(null),y(!1)):(B(_),H(_))}e(xt,"handleDayClick");function Re(_){let J=ti(_);_==="all"?t.onClear():(t.onFrom(J.from),t.onTo(J.to)),B(null),y(!1)}e(Re,"applyPreset");function U(_){let J=an(_.getFullYear(),_.getMonth(),_.getDate());ne(J),N&&H(J),(_.getFullYear()!==w||_.getMonth()!==x)&&(v(_.getFullYear()),T(_.getMonth()))}e(U,"moveFocusToDate");function de(_,J){let Le=Vt(_);Le&&U(new Date(Le.year,Le.monthIndex,Le.day+J))}e(de,"moveFocus");let at=t.from,$t=t.to;N&&F&&(at=N<=F?N:F,$t=N<=F?F:N);let Tn=ei(w,x),Dt=new Date,Nt=De||at||an(Dt.getFullYear(),Dt.getMonth(),Dt.getDate()),dn=Tn.map((_,J)=>{let Le=at===_.dateStr,zt=$t===_.dateStr,Bt=!!(at&&$t&&_.dateStr>at&&_.dateStr<$t),jn=_.year===Dt.getFullYear()&&_.monthIndex===Dt.getMonth()&&_.day===Dt.getDate(),Ot="dsham_dateDay";_.isOutside&&(Ot+=" is-outside"),jn&&(Ot+=" is-today"),Le&&(Ot+=" is-start"),zt&&(Ot+=" is-end"),Bt&&(Ot+=" is-in-range");let Dn=!_.isOutside&&(_.dateStr===Nt||_.day===1&&!Tn.some(X=>!X.isOutside&&X.dateStr===Nt));return s.createElement("div",{key:J,className:Ot,role:"button",tabIndex:Dn?0:-1,"data-date":_.dateStr,"aria-label":_.dateStr,"aria-pressed":!!(Le||zt||Bt),onClick:e(X=>{X.stopPropagation(),xt(_.dateStr)},"onClick"),onKeyDown:e(X=>{if(X.key==="Enter"||X.key===" ")X.preventDefault(),X.stopPropagation(),xt(_.dateStr);else if(X.key==="ArrowLeft")X.preventDefault(),X.stopPropagation(),de(_.dateStr,-1);else if(X.key==="ArrowRight")X.preventDefault(),X.stopPropagation(),de(_.dateStr,1);else if(X.key==="ArrowUp")X.preventDefault(),X.stopPropagation(),de(_.dateStr,-7);else if(X.key==="ArrowDown")X.preventDefault(),X.stopPropagation(),de(_.dateStr,7);else if(X.key==="Home"){X.preventDefault(),X.stopPropagation();let _e=Vt(_.dateStr);if(_e){let nt=new Date(_e.year,_e.monthIndex,_e.day),Kt=(nt.getDay()===0?7:nt.getDay())-1;nt.setDate(nt.getDate()-Kt),U(nt)}}else if(X.key==="End"){X.preventDefault(),X.stopPropagation();let _e=Vt(_.dateStr);if(_e){let nt=new Date(_e.year,_e.monthIndex,_e.day),Kt=(nt.getDay()===0?7:nt.getDay())-1;nt.setDate(nt.getDate()+(6-Kt)),U(nt)}}else if(X.key==="PageUp"){X.preventDefault(),X.stopPropagation();let _e=Vt(_.dateStr);_e&&U(ls(_e.year,_e.monthIndex,_e.day,-1))}else if(X.key==="PageDown"){X.preventDefault(),X.stopPropagation();let _e=Vt(_.dateStr);_e&&U(ls(_e.year,_e.monthIndex,_e.day,1))}},"onKeyDown"),onMouseEnter:e(()=>{N&&H(_.dateStr)},"onMouseEnter")},_.day)}),un=`${w}\u5E74 ${x+1}\u6708`;try{un=new Intl.DateTimeFormat(ie,{year:"numeric",month:"long"}).format(new Date(w,x,1))}catch{un=re||se?`${w}-${String(x+1).padStart(2,"0")}`:`${w}\u5E74 ${x+1}\u6708`}return s.createElement("div",{ref:c,className:"dsham_dateRange",role:"group","aria-label":t.label},s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.from,"aria-label":t.fromLabel,"aria-invalid":t.invalid||void 0,onChange:e(_=>o("from",_.target.value),"onChange")}),s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.to,"aria-label":t.toLabel,"aria-invalid":t.invalid||void 0,onChange:e(_=>o("to",_.target.value),"onChange")}),s.createElement("div",{className:"dsham_dateTrigger"+(E?" is-open":""),role:"button",tabIndex:0,"aria-expanded":E,"aria-controls":E?"dsham-date-popover":void 0,onClick:e(()=>{E&&B(null),y(!E)},"onClick"),onKeyDown:e(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),E&&B(null),y(!E))},"onKeyDown")},Xa(s.createElement),s.createElement("span",{className:"dsham_dateText"+(f?"":" placeholder")},a),f?s.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:e(_=>{_.stopPropagation(),t.onClear(),B(null)},"onClick"),children:"\xD7"}):null,s.createElement("span",{className:"dsham_dateChevron"},us(s.createElement,E))),E&&s.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":t.label,onClick:e(_=>_.stopPropagation(),"onClick")},s.createElement("div",{className:"dsham_datePresets"},s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>Re("all"),"onClick")},t.t?t.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>Re("today"),"onClick")},t.t?t.t("discovery.today"):"\u4ECA\u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>Re("7d"),"onClick")},t.t?t.t("discovery.last7Days"):"\u8FD1 7 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>Re("30d"),"onClick")},t.t?t.t("discovery.last30Days"):"\u8FD1 30 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>Re("90d"),"onClick")},t.t?t.t("discovery.last90Days"):"\u8FD1 90 \u5929")),s.createElement("div",{className:"dsham_dateCalendar"},s.createElement("div",{className:"dsham_dateCalHeader"},s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:ce,"aria-label":"prev month"},"\u2039"),s.createElement("span",{className:"dsham_dateMonthTitle"},un),s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:Z,"aria-label":"next month"},"\u203A")),s.createElement("div",{className:"dsham_dateGrid"},Ne.map((_,J)=>s.createElement("div",{key:J,className:"dsham_dateWeekday"},_))),s.createElement("div",{className:"dsham_dateGrid"},dn))))}e(ds,"DateRange");function An(t){return L.createElement("div",{className:t.className},L.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":t.open,onClick:t.onToggle},us(L.createElement,t.open),t.title),t.open?L.createElement("div",null,t.children):null)}e(An,"Disclosure");function us(t,s){return t("svg",{className:"dsham_foldChevron"+(s?" is-open":""),viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0},t("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}e(us,"foldChevron");function tr(t){let s=L.useRef(null);return L.useEffect(()=>{s.current&&(s.current.indeterminate=!!t.indeterminate&&!t.checked)},[t.indeterminate,t.checked]),L.createElement("input",{ref:s,className:"dsham_checkbox",type:"checkbox",checked:t.checked,disabled:t.disabled,"aria-label":t.label,onChange:e(o=>t.onChange({target:{checked:o.target.checked}}),"onChange")})}e(tr,"SelectionCheckbox");var on=e(t=>{if(typeof t!="string"||!t.length||t.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return t},"id"),ps=e((t,s=!1)=>{if(typeof t!="string"||t.length>200||s&&!t.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return t.trim()},"queryText"),hs={parse(t){let s=le(t);if(!s||!Array.isArray(s.sessionIds)||!s.sessionIds.length||s.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u68C0\u7D22\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(s.sessionIds.map(on))],query:ps(s.query,!0)}}},ni={parse(t){let s=le(t);if(!s)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:on(s.sessionId),query:ps(s.query??"")}}},nr=e((t,s)=>{if(typeof t!="string"||t.length>s)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return t},"boundedString"),ms=e(t=>{if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return t},"sequence"),rr={parse(t){let s=le(t);if(!s||!Array.isArray(s.items)||!Array.isArray(s.failures)||s.items.length>20||s.failures.length>20)throw new TypeError("\u68C0\u7D22\u7ED3\u679C\u65E0\u6548");return{items:s.items.map(le).map(o=>({sessionId:on(o.sessionId),seq:ms(o.seq),snippet:nr(o.snippet,400)})),failures:s.failures.map(le).map(o=>({sessionId:on(o.sessionId),message:nr(o.message,500)}))}}},ri={parse(t){let s=le(t);if(!s||!Array.isArray(s.messages)||s.messages.length>8||typeof s.hasEarlier!="boolean"||typeof s.hasLater!="boolean")throw new TypeError("\u9884\u89C8\u7ED3\u679C\u65E0\u6548");return{sessionId:on(s.sessionId),hasEarlier:s.hasEarlier,hasLater:s.hasLater,messages:s.messages.map(le).map(o=>{if(typeof o.role!="string"||!["user","assistant"].includes(o.role)||typeof o.truncated!="boolean")throw new TypeError("\u6D88\u606F\u89D2\u8272\u6216\u622A\u65AD\u72B6\u6001\u65E0\u6548");return{seq:ms(o.seq),role:o.role,text:nr(o.text,2e3),truncated:o.truncated}})}}};async function fs(t,s=globalThis.navigator?.clipboard){if(typeof t!="string"||!t)throw Object.assign(new Error("\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9"),{code:"copy.empty"});if(!s?.writeText)throw Object.assign(new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762"),{code:"copy.unavailable"});try{await s.writeText(t)}catch{throw Object.assign(new Error("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5"),{code:"copy.denied"})}}e(fs,"copySessionText");function gs(){let t=e((o,f)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:e(()=>f,"create"),schema:f}),"codec");return[["searchSessionContent",hs,rr],["searchArchivedContent",hs,rr],["previewArchivedSession",ni,ri]].map(([o,f,a])=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${o}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:o,invocation:{kind:"direct"},parameters:[{name:"input",wire:"input",source:"json",codec:t(o+"Input",f)}],result:t(o+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(gs,"discoveryInvocations");function vs(t,s){let o=s?.trim().toLowerCase();if(!o)return null;let f=t.toLowerCase().indexOf(o);if(f<0)return null;let a=0,l=0,c;for(let E of t){let y=l+E.toLowerCase().length;if(c===void 0&&y>f&&(c=a),a+=E.length,y>=f+o.length)return{start:c??a,end:a};l=y}return null}e(vs,"findTextRange");function In(t,s=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return NaN;let[o,f,a]=t.split("-").map(Number),l=new Date(o,f-1,a);return l.getFullYear()!==o||l.getMonth()!==f-1||l.getDate()!==a?NaN:(s&&l.setDate(l.getDate()+1),l.getTime())}e(In,"dayBoundary");function sr(t,s){return(!t||Number.isFinite(In(t)))&&(!s||Number.isFinite(In(s)))&&(!t||!s||t<=s)}e(sr,"validUpdatedRange");function ys(t,s,o){if(!sr(s,o))return!1;if(!s&&!o)return!0;let f=typeof t=="number"?t:Date.parse(t??"");return Number.isFinite(f)&&(!s||f>=In(s))&&(!o||f<In(o,!0))}e(ys,"matchesUpdatedRange");async function bs(t,s,o,{signal:f,onProgress:a}={}){let l=[],c=[],E=[...new Set(t)],y=e(()=>{if(f?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let R=0;R<E.length;R+=20){y();let w=rr.parse(await o({sessionIds:E.slice(R,R+20),query:s}));y(),l.push(...w.items),c.push(...w.failures),a?.({done:Math.min(R+20,E.length),total:E.length,items:[...l],failures:[...c]})}return y(),{items:l,failures:c}}e(bs,"searchArchiveBatches");function ws(t,s={}){let o=t.createElement;function f({text:v,query:x=""}){let T=vs(v,x);return T?o(t.Fragment,null,v.slice(0,T.start),o("mark",null,v.slice(T.start,T.end)),v.slice(T.end)):v}e(f,"HighlightedText");function a(v,x,T,N){let B=JSON.stringify(v),F=JSON.stringify([B,x]),[H,De]=t.useState(0),[ne,re]=t.useState({key:"",status:"idle",items:[],failures:[]});return t.useEffect(()=>{if(!T||!x.trim()||!N)return;let ie=new AbortController;re({key:F,status:"loading",items:[],failures:[],done:0,total:v.length});let Ne=setTimeout(()=>{bs(JSON.parse(B),x,N,{signal:ie.signal,onProgress:e(ce=>{ie.signal.aborted||re({key:F,status:"loading",...ce})},"onProgress")}).then(ce=>{ie.signal.aborted||re({key:F,status:"ready",done:v.length,total:v.length,...ce})}).catch(ce=>{ie.signal.aborted||re(Z=>({...Z,key:F,status:"error",error:Pe(ce)}))})},350);return()=>{ie.abort(),clearTimeout(Ne)}},[B,x,T,N,H]),{...T&&x.trim()&&N?ne.key===F?ne:{key:F,status:"loading",items:[],failures:[],done:0,total:v.length}:{status:"idle",items:[],failures:[]},retry:e(()=>De(ie=>ie+1),"retry")}}e(a,"useArchiveSearch");function l(v,x){let[T,N]=t.useState(null),[B,F]=t.useState({status:"idle"}),[H,De]=t.useState(0),ne=T,re=T&&x.includes(T.session.id);return t.useEffect(()=>{T&&!re&&N(null)},[T,re]),t.useEffect(()=>{if(!re||typeof window>"u")return;let se=e(ie=>{ie.key==="Escape"&&(ie.preventDefault(),ie.stopPropagation(),ie.stopImmediatePropagation(),N(null))},"onKeyDown");return window.addEventListener("keydown",se,!0),()=>window.removeEventListener("keydown",se,!0)},[re]),t.useEffect(()=>{if(!T||!re||!v)return;let se=!0;return F({key:ne,status:"loading"}),Promise.resolve().then(()=>v({sessionId:T.session.id,query:T.query})).then(ie=>{se&&F({key:ne,status:"ready",value:ie})}).catch(ie=>{se&&F({key:ne,status:"error",error:Pe(ie)})}),()=>{se=!1}},[ne,re,v,H]),{target:re?T:null,...B.key===ne?B:{status:"loading"},open:e((se,ie="")=>N({session:se,query:ie}),"open"),close:e(()=>N(null),"close"),retry:e(()=>De(se=>se+1),"retry")}}e(l,"useArchivePreview");function c({title:v,failures:x,separator:T}){let[N,B]=t.useState(!1),F=o("ul",null,x.map(H=>o("li",{key:H.sessionId},H.sessionId,T,H.message)));return o(An,{title:v,open:N,onToggle:e(()=>B(H=>!H),"onToggle")},F)}e(c,"FailureDetails");function E(v,x){let T=s.Button??(N=>o("button",{type:"button",disabled:N.disabled,onClick:N.onClick},N.children));return o(T,{variant:"outline",size:"sm",...x},v)}e(E,"textButton");function y({t:v,from:x,to:T,onFrom:N,onTo:B,invalid:F,onClear:H}){return o("div",{className:"dsham_dateFilter"},o(ds,{React:t,from:x,to:T,invalid:F,label:v("discovery.date"),fromLabel:v("discovery.from"),toLabel:v("discovery.to"),onFrom:N,onTo:B,onClear:H,t:v}),F?o("p",{className:"dsham_dateAlert",role:"alert"},v("discovery.invalidDate")):null)}e(y,"DiscoveryFilters");function R({state:v,t:x}){return v.status==="idle"?null:o("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},o("p",null,x(v.status==="loading"?"discovery.searching":v.status==="error"?"discovery.searchError":"discovery.searched",{done:v.done??0,total:v.total??0})),v.status==="error"&&o("p",null,v.error),v.failures.length>0&&o(c,{title:x("discovery.failed",{n:v.failures.length}),failures:v.failures,separator:x("common.separator")}),(v.status==="error"||v.status==="ready"&&v.failures.length>0)&&E(x("discovery.retry"),{onClick:v.retry}))}e(R,"SearchStatus");function w({preview:v,t:x,MarkdownText:T}){let[N,B]=t.useState(!1);if(v.status==="loading")return o("p",{role:"status"},x("discovery.loading"));if(v.status==="error")return o("div",null,o("p",{role:"alert"},v.error),E(x("discovery.retry"),{onClick:v.retry}));let F=v.value;return F?o("div",{className:"dsham_previewMessages"},o("div",{className:"dsham_previewToolbar"},o("span",{title:x("discovery.previewHint")},x("discovery.readOnly")," \xB7 ",x("discovery.messageCount",{n:F.messages.length})),T&&o(s.SegmentedControl??"div",{id:"dsham-preview-mode",label:x("discovery.displayMode"),value:N?"raw":"formatted",options:[{value:"formatted",label:x("discovery.formatted")},{value:"raw",label:x("discovery.raw")}],onChange:e(H=>B(H==="raw"),"onChange")})),F.hasEarlier&&o("p",null,x("discovery.earlier")),!F.messages.length&&o("p",null,x("discovery.empty")),F.messages.map(H=>o("article",{key:H.seq,className:"dsham_previewMessage"},o("div",{className:"dsham_previewRole","data-role":H.role},o("span",{"aria-hidden":!0},x(H.role==="user"?"discovery.you":"discovery.ai")),o("strong",null,x("discovery."+H.role))),N||!T?o("pre",{className:"dsham_previewRaw"},o(f,{text:H.text,query:v.target?.query})):o(T,{text:H.text,streaming:!1,labels:{code:{copyLabel:x("discovery.copyCode"),copiedLabel:x("details.copied")},footnotes:x("discovery.footnotes")}}),H.truncated&&o("small",null,x("discovery.truncated")))),F.hasLater&&o("p",null,x("discovery.later"))):null}return e(w,"PreviewContent"),{HighlightedText:f,useArchiveSearch:a,useArchivePreview:l,DiscoveryFilters:y,SearchStatus:R,PreviewContent:w}}e(ws,"createDiscoveryTools");var Ss=[".dsham_dateFilter{display:flex;align-items:center;gap:8px;min-width:0;position:relative}",".dsham_dateAlert{position:absolute;top:calc(100% + 4px);right:0;margin:0;width:max-content;max-width:240px;padding:4px 8px;background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-state-error-primary);border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,0.25);z-index:1100;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary);pointer-events:none}",".dsham_dateRange{position:relative;display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;box-sizing:border-box}",".dsham_dateTrigger{display:inline-flex;align-items:center;gap:6px;width:100%;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;cursor:pointer;box-sizing:border-box;transition:all .15s ease}",".dsham_dateTrigger:hover{border-color:var(--dsw-alias-border-l3)}",".dsham_dateTrigger.is-open{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 1px var(--dsw-alias-state-business-primary)}",".dsham_dateIcon{flex:none;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center}",".dsham_dateText{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:var(--dsw-alias-label-primary)}",".dsham_dateText.placeholder{color:var(--dsw-alias-label-primary)}",".dsham_dateClearBtn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);border-radius:50%;cursor:pointer;font-size:13px;line-height:1}",".dsham_dateClearBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}",".dsham_dateChevron{flex:none;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center}",".dsham_dateInputSrOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}",".dsham_datePopover{position:absolute;top:calc(100% + 4px);right:0;left:auto;z-index:1000;display:flex;gap:10px;padding:10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,10px);background:var(--dsw-alias-bg-layer-1);box-shadow:0 8px 24px rgba(0,0,0,0.12),0 2px 6px rgba(0,0,0,0.06);box-sizing:border-box}",".dsham_datePresets{width:84px;border-right:0.5px solid var(--dsw-alias-border-l2);padding-right:8px;display:flex;flex-direction:column;gap:3px;flex:none}",".dsham_datePresetBtn{border:0;background:transparent;padding:5px 6px;text-align:left;font:inherit;font-size:12px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm,6px);cursor:pointer;transition:all .15s ease;white-space:nowrap}",".dsham_datePresetBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}",".dsham_dateCalendar{width:224px;display:flex;flex-direction:column;gap:6px;flex:none}",".dsham_dateCalHeader{display:flex;justify-content:space-between;align-items:center;padding:0 2px}",".dsham_dateMonthTitle{font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary)}",".dsham_dateNavBtn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:4px;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:14px;line-height:1}",".dsham_dateNavBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}",".dsham_dateGrid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px}",".dsham_dateWeekday{font-size:11px;color:var(--dsw-alias-label-tertiary);text-align:center;padding:3px 0;font-weight:500}",".dsham_dateDay{position:relative;height:26px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:0}",".dsham_dateDay.is-outside{color:var(--dsw-alias-label-quaternary)}",".dsham_dateDay:not(.is-outside):hover{background:var(--dsw-alias-interactive-bg-hover);border-radius:4px}",".dsham_dateDay.is-start{background:var(--dsw-alias-state-business-primary)!important;color:#fff!important;border-top-left-radius:6px;border-bottom-left-radius:6px}",".dsham_dateDay.is-end{background:var(--dsw-alias-state-business-primary)!important;color:#fff!important;border-top-right-radius:6px;border-bottom-right-radius:6px}",".dsham_dateDay.is-start.is-end{border-radius:6px!important}",".dsham_dateDay.is-in-range{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-business-primary)}",".dsham_dateDay.is-today::after{content:'';position:absolute;bottom:2px;width:3px;height:3px;border-radius:50%;background:var(--dsw-alias-state-business-primary)}",".dsham_dateDay.is-start.is-today::after,.dsham_dateDay.is-end.is-today::after{background:#fff}",".dsham_discoveryStatus{font-size:12px;margin-bottom:12px;overflow-wrap:anywhere}",".dsham_settingsSnippet{display:block;width:100%;padding:0;margin:4px 0 0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}",".dsham_previewMessages{max-height:65vh;overflow:auto;overflow-wrap:anywhere;padding-right:8px}",".dsham_previewToolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;color:var(--dsw-alias-label-secondary);font-size:12px}",".dsham_previewRole{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-size:13px}",".dsham_previewRole>span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--dsw-alias-bg-layer-3);font-size:11px}",".dsham_previewRole[data-role=user]>span{color:var(--dsw-alias-state-business-primary)}",".dsham_previewRaw{white-space:pre-wrap;font:13px/1.8 ui-monospace,monospace;overflow-wrap:anywhere}",".dsham_previewMessage pre:not(.dsham_previewRaw){white-space:pre;overflow-x:auto;max-width:100%}",".dsham_previewMessage table{display:block;max-width:100%;overflow-x:auto}",".dsham_previewMessage img{max-width:100%}","@media(max-width:520px){.dsham_previewToolbar{align-items:flex-start;flex-wrap:wrap}}",".dsham_previewMessage{padding:18px 0;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_previewMessage p{font-size:14px;line-height:1.8}",".dsham_previewHint,.dsham_previewMessage small{color:var(--dsw-alias-label-secondary);font-size:12px}",".dsham_settings mark,.dsham_previewMessages mark{background:var(--dsw-alias-state-warn-tertiary);color:inherit;border-radius:2px}",".dsham_settingsSnippet:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}"].join(""),ks={"common.separator":"\uFF1A","copy.empty":"\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9","copy.unavailable":"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762","copy.denied":"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5","discovery.you":"\u4F60","discovery.ai":"AI","discovery.readOnly":"\u53EA\u8BFB\u9884\u89C8","discovery.messageCount":"\u672C\u6B21\u663E\u793A {n} \u6761\u6D88\u606F","discovery.displayMode":"\u663E\u793A\u65B9\u5F0F","discovery.formatted":"\u6392\u7248","discovery.raw":"\u539F\u6587\u4E0E\u9AD8\u4EAE","discovery.copyCode":"\u590D\u5236\u4EE3\u7801","discovery.footnotes":"\u6CE8\u91CA","details.copyId":"\u590D\u5236\u4F1A\u8BDD ID","details.copied":"\u5DF2\u590D\u5236","discovery.date":"\u65E5\u671F","discovery.timeRange":"\u65F6\u95F4\u8303\u56F4","discovery.allTime":"\u5168\u90E8\u65F6\u95F4","discovery.today":"\u4ECA\u5929","discovery.last7Days":"\u8FD1 7 \u5929","discovery.last30Days":"\u8FD1 30 \u5929","discovery.last90Days":"\u8FD1 90 \u5929","discovery.customRange":"\u81EA\u5B9A\u4E49\u2026","discovery.dateActive":"\u65E5\u671F\xB7\u5DF2\u9009","discovery.clearDate":"\u6E05\u9664\u65E5\u671F","discovery.active":"\u5DF2\u542F\u7528","discovery.scope":"\u67E5\u627E\u8303\u56F4","discovery.titleOnly":"\u4EC5\u6807\u9898","discovery.titleAndContent":"\u6807\u9898\u4E0E\u6B63\u6587","discovery.from":"\u66F4\u65B0\u65F6\u95F4\u4ECE","discovery.to":"\u81F3","discovery.clear":"\u6E05\u9664\u6761\u4EF6","discovery.invalidDate":"\u5F00\u59CB\u65E5\u671F\u4E0D\u80FD\u665A\u4E8E\u7ED3\u675F\u65E5\u671F\uFF0C\u8BF7\u68C0\u67E5\u65E5\u671F\u8303\u56F4\u3002","discovery.searching":"\u6B63\u5728\u68C0\u7D22\u6B63\u6587\uFF1A{done} / {total}","discovery.searched":"\u6B63\u6587\u68C0\u7D22\u5B8C\u6210\uFF1A{done} / {total}","discovery.searchError":"\u6B63\u6587\u68C0\u7D22\u672A\u5B8C\u6210\uFF0C\u5F53\u524D\u7ED3\u679C\u53EF\u80FD\u4E0D\u5B8C\u6574\u3002","discovery.failed":"{n} \u6761\u4F1A\u8BDD\u8BFB\u53D6\u5931\u8D25","discovery.retry":"\u91CD\u8BD5","discovery.preview":"\u5FEB\u901F\u9884\u89C8","discovery.loading":"\u6B63\u5728\u8BFB\u53D6\u4F1A\u8BDD\u2026","discovery.previewHint":"\u53EA\u8BFB\u9884\u89C8\u539F\u59CB\u5BF9\u8BDD\u6587\u672C\uFF0C\u4E0D\u6062\u590D\u4F1A\u8BDD\uFF1B\u4E0D\u542B\u5DE5\u5177\u8F93\u51FA\u3001\u9644\u4EF6\u3001\u63A8\u7406\u548C\u7CFB\u7EDF\u5185\u5BB9\u3002","discovery.earlier":"\u524D\u9762\u8FD8\u6709\u6D88\u606F\uFF0C\u53EF\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD\u67E5\u770B\u3002","discovery.later":"\u540E\u9762\u8FD8\u6709\u6D88\u606F\uFF0C\u53EF\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD\u67E5\u770B\u3002","discovery.empty":"\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u7528\u6237\u6216\u52A9\u624B\u6587\u672C\u3002","discovery.truncated":"\u672C\u6761\u4EC5\u663E\u793A\u90E8\u5206\u5185\u5BB9\u3002","discovery.user":"\u7528\u6237","discovery.assistant":"\u52A9\u624B","discovery.openFull":"\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD","discovery.searchPlaceholder":"\u641C\u7D22\u6807\u9898\u6216\u6B63\u6587"},xs={"common.separator":": ","copy.empty":"Nothing to copy","copy.unavailable":"Clipboard unavailable. Open the page over HTTPS or localhost.","copy.denied":"Copy failed. Allow clipboard access and retry.","discovery.you":"You","discovery.ai":"AI","discovery.readOnly":"Read-only preview","discovery.messageCount":"Showing {n} messages","discovery.displayMode":"Display mode","discovery.formatted":"Formatted","discovery.raw":"Source and highlights","discovery.copyCode":"Copy code","discovery.footnotes":"Footnotes","details.copyId":"Copy session ID","details.copied":"Copied","discovery.date":"Date","discovery.timeRange":"Time range","discovery.allTime":"All time","discovery.today":"Today","discovery.last7Days":"Past 7 days","discovery.last30Days":"Past 30 days","discovery.last90Days":"Past 90 days","discovery.customRange":"Custom\u2026","discovery.dateActive":"Date \xB7 Set","discovery.clearDate":"Clear dates","discovery.active":"Active","discovery.scope":"Search in","discovery.titleOnly":"Titles","discovery.titleAndContent":"Titles and content","discovery.from":"Updated from","discovery.to":"To","discovery.clear":"Clear filters","discovery.invalidDate":"Check the date range: the start must not be after the end.","discovery.searching":"Searching content: {done} / {total}","discovery.searched":"Content search complete: {done} / {total}","discovery.searchError":"Content search is incomplete; results may be missing.","discovery.failed":"Could not read {n} conversations","discovery.retry":"Retry","discovery.preview":"Quick preview","discovery.loading":"Reading conversation\u2026","discovery.previewHint":"Read-only original conversation text; keeps the conversation archived. Excludes tools, attachments, reasoning and system content.","discovery.earlier":"More messages before this preview. Open the full conversation to read them.","discovery.later":"More messages after this preview. Open the full conversation to read them.","discovery.empty":"No user or assistant text to preview.","discovery.truncated":"Only part of this message is shown.","discovery.user":"User","discovery.assistant":"Assistant","discovery.openFull":"Open full conversation","discovery.searchPlaceholder":"Search titles or content"},Cs={"common.separator":": ","copy.empty":"\u041D\u0435\u0447\u0435\u0433\u043E \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C","copy.unavailable":"\u0411\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u043E HTTPS \u0438\u043B\u0438 localhost.","copy.denied":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C. \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0431\u0443\u0444\u0435\u0440\u0443 \u043E\u0431\u043C\u0435\u043D\u0430 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","discovery.you":"\u0412\u044B","discovery.ai":"\u0418\u0418","discovery.readOnly":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F","discovery.messageCount":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439: {n}","discovery.displayMode":"\u0420\u0435\u0436\u0438\u043C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","discovery.formatted":"\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043E","discovery.raw":"\u0418\u0441\u0445\u043E\u0434\u043D\u0438\u043A \u0438 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0430","discovery.copyCode":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u0434","discovery.footnotes":"\u0421\u043D\u043E\u0441\u043A\u0438","details.copyId":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID \u0441\u0435\u0441\u0441\u0438\u0438","details.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","discovery.date":"\u0414\u0430\u0442\u0430","discovery.timeRange":"\u041F\u0435\u0440\u0438\u043E\u0434","discovery.allTime":"\u0412\u0441\u0435 \u0432\u0440\u0435\u043C\u044F","discovery.today":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F","discovery.last7Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 7 \u0434\u043D\u0435\u0439","discovery.last30Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 30 \u0434\u043D\u0435\u0439","discovery.last90Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 90 \u0434\u043D\u0435\u0439","discovery.customRange":"\u0421\u0432\u043E\u0439 \u043F\u0435\u0440\u0438\u043E\u0434\u2026","discovery.dateActive":"\u0414\u0430\u0442\u0430 \xB7 \u0412\u044B\u0431\u0440\u0430\u043D\u0430","discovery.clearDate":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u0430\u0442\u044B","discovery.active":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E","discovery.scope":"\u0418\u0441\u043A\u0430\u0442\u044C \u0432","discovery.titleOnly":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u044F","discovery.titleAndContent":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435","discovery.from":"\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0441","discovery.to":"\u041F\u043E","discovery.clear":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B","discovery.invalidDate":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D \u0434\u0430\u0442: \u043D\u0430\u0447\u0430\u043B\u043E \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u043E\u0437\u0436\u0435 \u043A\u043E\u043D\u0446\u0430.","discovery.searching":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443: {done} / {total}","discovery.searched":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D: {done} / {total}","discovery.searchError":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u0439; \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u043C\u0438.","discovery.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C {n} \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u043E\u0432","discovery.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","discovery.preview":"\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440","discovery.loading":"\u0427\u0442\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430\u2026","discovery.previewHint":"\u0422\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u0435\u043D\u0438\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430; \u0441\u0435\u0441\u0441\u0438\u044F \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u0432 \u0430\u0440\u0445\u0438\u0432\u0435. \u0411\u0435\u0437 \u0432\u044B\u0432\u043E\u0434\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432, \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0439, \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u0439 \u0438 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u043E\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E.","discovery.earlier":"\u041F\u0435\u0440\u0435\u0434 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u043E\u043C \u0435\u0441\u0442\u044C \u0435\u0449\u0451 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0447\u0442\u043E\u0431\u044B \u0438\u0445 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C.","discovery.later":"\u041F\u043E\u0441\u043B\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0435\u0441\u0442\u044C \u0435\u0449\u0451 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0447\u0442\u043E\u0431\u044B \u0438\u0445 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C.","discovery.empty":"\u041D\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430.","discovery.truncated":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0430\u0441\u0442\u044C \u044D\u0442\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","discovery.user":"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C","discovery.assistant":"\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442","discovery.openFull":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440","discovery.searchPlaceholder":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u043C \u0438\u043B\u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443"};var Es=e(t=>{let s=le(t);if(!s||typeof s.sessionId!="string"||!s.sessionId.length||s.sessionId.length>1024||typeof s.identity!="string"||!s.identity.length||s.identity.length>4096)throw new TypeError("invalid cache rebuild candidate");return{sessionId:s.sessionId,identity:s.identity}},"candidate"),si={parse(t){let s=le(t);if(!s||!Array.isArray(s.items)||!s.items.length||s.items.length>20)throw new TypeError("invalid cache rebuild batch (1\u201320 items required)");return{items:s.items.map(Es)}}},ar={parse(t){let s=le(t);if(!s||!Array.isArray(s.items)||s.count!==s.items.length)throw new TypeError("invalid cache diagnosis");return{count:s.items.length,items:s.items.map(Es)}}},ir={parse(t){let s=le(t);for(let o of["rebuiltSessionIds","skippedSessionIds"])if(!Array.isArray(s?.[o])||s[o].some(f=>typeof f!="string"))throw new TypeError("invalid cache rebuild result");if(!Array.isArray(s.failures)||s.failures.some(o=>!o||typeof o.sessionId!="string"||typeof o.message!="string"))throw new TypeError("invalid cache rebuild failures");return s}};function As(){let t=e((s,o)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${s}`,create:e(()=>o,"create"),schema:o}),"codec");return[{method:"diagnoseSessionCaches",parameters:[],result:t("CacheDiagnosis",ar)},{method:"rebuildSessionCaches",parameters:[{name:"input",wire:"input",source:"json",codec:t("CacheRebuildInput",si)}],result:t("CacheRebuildResult",ir)}].map(({method:s,...o})=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${s}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:s,invocation:{kind:"direct"},...o,sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(As,"cacheRebuildInvocations");function Is(t,s={}){let{maxLoadRetries:o=3,retryDelayMs:f=200}=s,a={diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null},l=!0,c=0,E=[],y,R=new Set,w=e(x=>{if(l){a={...a,...x};for(let T of R)T()}},"update"),v=e(async(x=o)=>{if(!l)return;y!==void 0&&(clearTimeout(y),y=void 0);let T=++c;try{let N=ar.parse(await t.diagnose());l&&T===c&&w({diagnosis:N,error:null})}catch(N){if(x>0&&l&&T===c){y=setTimeout(()=>{y=void 0,l&&T===c&&v(x-1)},f);return}l&&T===c&&w({error:Pe(N)})}},"load");return{snapshot:e(()=>a,"snapshot"),subscribe(x){return R.add(x),()=>{R.delete(x)}},load:v,async run(x=!1){if(!l||a.busy)return;++c,y!==void 0&&(clearTimeout(y),y=void 0);let T=x?[...E]:[...a.diagnosis.items],N={rebuiltSessionIds:[],skippedSessionIds:[],failures:[]};E=[],w({busy:!0,result:null,error:null,refreshError:null,progress:{done:0,total:T.length}});for(let[B,F]of T.entries()){if(!l)return;try{let H=ir.parse(await t.rebuild({items:[F]}));if(!l)return;N.rebuiltSessionIds.push(...H.rebuiltSessionIds),N.skippedSessionIds.push(...H.skippedSessionIds),N.failures.push(...H.failures),H.failures.length&&E.push(F)}catch(H){if(!l)return;N.failures.push({sessionId:F.sessionId,message:Pe(H)}),E.push(F)}w({progress:{done:B+1,total:T.length}})}w({result:N});try{await t.refresh()}catch(B){w({refreshError:Pe(B)})}l&&(await v(),w({busy:!1,progress:null}))},dismiss(){l&&w({result:null,error:null,refreshError:null})},dispose(){l=!1,++c,y!==void 0&&(clearTimeout(y),y=void 0),R.clear()}}}e(Is,"createCacheRebuildController");var jt=class extends Error{static{e(this,"ArchiveNavigationError")}code;constructor(s){super(s),this.name="ArchiveNavigationError",this.code=s}};function Rs(t,s){return t instanceof jt?s(`archives.${t.code}`):Pe(t)}e(Rs,"formatArchiveNavigationError");function ai(t,s){if(typeof t?.retainInfo!="function")return;let o=t.retainInfo(s),f=o&&typeof o=="object"&&"getSnapshot"in o&&typeof o.getSnapshot=="function"?o.getSnapshot():o;if(!f||typeof f!="object"||!("retainedBy"in f))return;let a=f.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}e(ai,"retainInfoSnapshot");function ii(t){let s=t?.byId;if(s!==void 0){for(let o of Object.values(s))if(o&&(o.retainedBy?.mainView??0)>0)return o.id}}e(ii,"mainViewSessionId");function kt(t){return ii(t)}e(kt,"currentSessionId");function oi(t,s,o){return s===void 0||s===""?!1:(t?.byId?.[s]?.retainedBy?.mainView??0)>0||(ai(o,s)?.retainedBy?.mainView??0)>0}e(oi,"sessionIsCurrent");async function _s(t,s,o,f=()=>!0){if(o){if(typeof t.prepare=="function"&&await t.prepare(s),!f())return;await t.restore(s)}f()&&await t.open(s)}e(_s,"openArchivedConversation");function Ts(t,s,o,{onOpened:f=e(()=>{},"onOpened"),beginNavigation:a,warn:l=e((...c)=>console.warn(...c),"warn")}={}){let c,E=t?.clearArchivedCurrent,y=t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent"),R=e(x=>oi(s.list.getSnapshot(),x,s),"viewing"),w=e(function(...x){return c!==void 0&&R(c)&&o.list.getSnapshot().archivedSessionIds.includes(c)?!1:(c=void 0,E?.apply(this,x))},"wrapped"),v=e(()=>t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value===w,"ownsWrapper");if(t&&typeof E=="function")try{if(t.clearArchivedCurrent=w,!v())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(x){l("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",x)}return{open(x){c=x;try{if(typeof E=="function"&&!v()&&o.list.getSnapshot().archivedSessionIds.includes(x))throw l("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new jt("navigationUnavailable");if(a?.(),typeof t?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new jt("navigationUnavailable");if(t.openSession(x),!R(x))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof E=="function"}),new jt("sessionNotRetained");f()}catch(T){throw c=void 0,T}},dispose(){c=void 0,!(!t||Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value!==w)&&(y?Object.defineProperty(t,"clearArchivedCurrent",y):delete t.clearArchivedCurrent,E?.call(t))}}}e(Ts,"allowArchivedNavigation");var Ft=require("@deepseek-ai/dsh-client-ui-primitives");var js={check:"\u68C0\u67E5\u66F4\u65B0",update:"\u66F4\u65B0",recheck:"\u91CD\u65B0\u68C0\u67E5",auto:"\u81EA\u52A8\u66F4\u65B0",updating:"\u6B63\u5728\u66F4\u65B0\u2026",copy:"\u590D\u5236\u547D\u4EE4",copied:"\u5DF2\u590D\u5236",copyFailed:"\u590D\u5236\u5931\u8D25",checking:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026",latest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C",found:"\u53D1\u73B0\u65B0\u7248\u672C",failed:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",current:"\u8FD0\u884C\u7248\u672C",latestLabel:"\u6700\u65B0\u7248\u672C",profile:"\u76EE\u6807 profile",unknown:"\u672A\u77E5",manual:"\u624B\u5DE5\u66F4\u65B0",manualHint:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u53EF\u5728\u5F53\u524D DSH \u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5B8C\u6210\u540E\u91CD\u542F DSH Web\u3002",manualHintDesktop:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u8BF7\u5148\u5B8C\u5168\u9000\u51FA DSH Desktop\uFF0C\u518D\u7528 Desktop \u81EA\u5E26\u7684 dsh \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u3002\u666E\u901A dsh \u4F1A\u62D2\u7EDD desktop profile\u3002",intro:"\u4EC5\u68C0\u67E5\u5E76\u66F4\u65B0\u5F53\u524D\u63D2\u4EF6\uFF0C\u4E0D\u4F1A\u8054\u52A8\u5B89\u88C5\u5176\u4ED6\u63D2\u4EF6\u3002",restart:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u91CD\u542F DSH Web\u3002",restartDesktop:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 DSH Desktop\u3002",restarting:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u6B63\u5728\u91CD\u542F DSH Desktop\u2026",unavailable:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u4F7F\u7528\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4\u3002"},Ds={check:"Check for updates",update:"Update",recheck:"Check again",auto:"Update automatically",updating:"Updating\u2026",copy:"Copy command",copied:"Copied",copyFailed:"Copy failed",checking:"Checking for updates\u2026",latest:"You are up to date",found:"New version available",failed:"Could not check for updates. Try again later.",current:"Running version",latestLabel:"Latest version",profile:"Target profile",unknown:"Unknown",manual:"Manual update",manualHint:"If automatic update fails, run this command in the current DSH terminal, then restart DSH Web.",manualHintDesktop:"If automatic update fails, fully quit DSH Desktop, then run this command with Desktop's own dsh. A regular dsh rejects the desktop profile.",intro:"Only this plugin is checked and updated. Other plugins are not changed.",restart:"Update complete. Restart DSH Web.",restartDesktop:"Update complete. Fully quit and reopen DSH Desktop.",restarting:"Update complete. Restarting DSH Desktop\u2026",unavailable:"Automatic update is unavailable. Use the manual command."};function ln(t){return t.toLowerCase().startsWith("zh")?js:Ds}e(ln,"pluginUpdateCopy");function li(t,s,o,f){let a=ln(t),l=s?.restartDesktop===!0||s?.profileName==="desktop",c=l?{...a,manualHint:a.manualHintDesktop}:a,E=o!=="idle",y=c.checking,R="";return o==="checking"?y=c.checking:o==="updating"?y=c.updating:f.type==="error"?(y=f.message||c.failed,R="error"):f.type==="restart"?(y=l?c.restartDesktop:c.restart,R="success"):f.type==="restarting"?(y=c.restarting,R="success"):s===void 0?y=c.checking:s.latestCheckFailed?(y=c.failed,R="error"):!s.canAutoUpdate&&s.updateAvailable?(y=c.unavailable,R="update"):s.updateAvailable?(y=`${c.found}: v${s.latestVersion??c.unknown}`,R="update"):(y=c.latest,R="success"),{copy:c,busy:E,message:y,kind:R,loading:o==="updating",updateLabel:o==="updating"?c.updating:c.auto,disabled:E||s?.canAutoUpdate!==!0||s.updateAvailable!==!0,currentVersion:s===void 0?c.unknown:`v${s.currentVersion}`,latestVersion:s?.latestVersion===void 0?c.unknown:`v${s.latestVersion}`,profileName:s?.profileName??c.unknown,profileRaw:s?.profileName??"",latestRaw:s?.latestVersion??"latest"}}e(li,"describePluginUpdate");function Ns(t,s,o){let f="idle",a=s,l={type:"status"},c=0,E=new Set,y=e(()=>{for(let w of E)w()},"emit"),R=e(w=>{a=w,o?.(w)},"assign");return{get posts(){return c},subscribe(w){return E.add(w),()=>{E.delete(w)}},view(w){return li(w,a,f,l)},async check(){if(f==="idle"){f="checking",l={type:"status"},y();try{R(await t("GET")),l={type:"status"}}catch(w){l={type:"error",message:w instanceof Error?w.message:""}}finally{f="idle",y()}}},async update(){if(f==="idle"){f="updating",l={type:"status"},c+=1,y();try{let w=await t("POST");R(w),l={type:w.autoReload===!0?"restarting":"restart"}}catch(w){l={type:"error",message:w instanceof Error?w.message:""}}finally{f="idle",y()}}}}}e(Ns,"createUpdateFlow");function zs(t,s,o){return`dsh plugin${t.trim()===""?"":` --profile ${t.trim()}`} add ${s}@${o} --registry=https://registry.npmjs.org/`}e(zs,"manualPluginUpdateCommand");function Os(t,s){return t.key!=="Escape"?!1:(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),s(),!0)}e(Os,"handlePluginUpdateEscape");function ci(){let t=globalThis.document;if(typeof t>"u"||t===null)return;let s=t.baseURI;if(!(typeof s!="string"||s===""))try{let o=new URL(s),f=o.pathname.lastIndexOf("/"),a=o.pathname.slice(f+1);return/\.(html?|php|aspx?|jsp)$/i.test(a)?o.pathname=o.pathname.slice(0,f+1):o.pathname.endsWith("/")||(o.pathname+="/"),o.href}catch{return}}e(ci,"pageBaseHref");function Rn(t){if(typeof t!="string"||t.charAt(0)!=="/"||t.charAt(1)==="/")return t;let s=ci();if(s===void 0)return t;try{return new URL(t.slice(1),s).href}catch{return t}}e(Rn,"resolveApiUrl");function Ms(t){let o=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(o===void 0)throw new Error("createRoot unavailable");return o(t)}e(Ms,"mountRoot");var di="x-michengai-plugin-update",Ps="michengai-plugin-update-ui",or=`
|
|
11
11
|
.mpi-version{margin-left:8px;color:var(--dsw-alias-label-tertiary,#a0a0a0);font-family:inherit;font-size:12px;font-weight:500;line-height:18px;letter-spacing:0;white-space:nowrap;vertical-align:baseline}.mpi-check-host{display:inline-flex;align-items:center}.mpi-icon{display:inline-flex;flex:0 0 auto;width:16px;height:16px;align-items:center;justify-content:center;pointer-events:none}.mpi-icon svg{display:block;width:16px;height:16px}
|
|
12
12
|
.mpi-intro{margin:0 0 16px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:13px;line-height:20px}.mpi-meta{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 18px;margin:0 0 16px;font-size:12px;line-height:18px}.mpi-meta dt{color:var(--dsw-alias-label-secondary,#b9b9b9)}.mpi-meta dd{margin:0}.mpi-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.mpi-latest{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}.mpi-status{font-size:13px;font-weight:600;line-height:18px}.mpi-status[data-kind=error]{color:var(--dsw-alias-state-error-primary,#ef7272)}.mpi-status[data-kind=success]{color:var(--dsw-alias-state-success-primary,#51b976)}.mpi-status[data-kind=update]{color:#e8b15a !important}.mpi-manual{border-top:1px solid var(--dsw-alias-border-l2,#494949);padding-top:16px}.mpi-manual h3{margin:0 0 6px;font-size:14px;line-height:20px}.mpi-manual p{margin:0 0 10px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:12px;line-height:18px}.mpi-command{display:flex;align-items:flex-start;gap:8px;border:1px solid var(--dsw-alias-border-l2,#494949);border-radius:7px;padding:10px;background:var(--dsw-alias-bg-layer-3,var(--dsw-specific-menu-item-hover,#353638))}.mpi-command code{min-width:0;flex:1;overflow:visible;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:560px){.mpi-meta{grid-template-columns:1fr;gap:2px}.mpi-meta dd{margin-bottom:6px}}
|
|
13
13
|
.dssm-update-progress{height:4px;border-radius:2px;background:var(--dsw-alias-border-l1,#3a3a3a);overflow:hidden;margin:12px 0;position:relative}.dssm-update-progress-bar{height:100%;width:40%;background:var(--dsw-alias-button-primary-fill,#4176e6);border-radius:2px;animation:dssm-progress-slide 1.4s ease-in-out infinite}@keyframes dssm-progress-slide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}@media (prefers-reduced-motion:reduce){.dssm-update-progress-bar{animation:none;width:100%;opacity:.6}}
|
|
14
|
-
`;function
|
|
14
|
+
`;function ui(){let t=document.getElementById(Ps);if(t!==null){t.textContent!==or&&(t.textContent=or);return}let s=document.createElement("style");s.id=Ps,s.textContent=or,(document.head??document.documentElement).append(s)}e(ui,"ensureStyle");function hi(t){if(t===null||typeof t!="object")return!1;let s=t;return typeof s.packageName=="string"&&typeof s.currentVersion=="string"&&typeof s.updateAvailable=="boolean"&&typeof s.profileName=="string"&&typeof s.canAutoUpdate=="boolean"&&typeof s.latestCheckFailed=="boolean"&&(s.latestVersion===void 0||typeof s.latestVersion=="string")}e(hi,"validPayload");async function Ls(t,s,o){let f=o===void 0?{}:{signal:o},a=await fetch(t,s==="GET"?{cache:"no-store",...f}:{method:"POST",headers:{"content-type":"application/json",[di]:"1"},body:"{}",...f}),l=await a.json();if(!a.ok||!hi(l))throw new Error(l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:ln(document.documentElement.lang).failed);return l}e(Ls,"requestStatus");function pi(t){let s=L.useRef(null);return L.useLayoutEffect(()=>{s.current?.replaceChildren(t.node)},[t.node]),L.createElement("span",{ref:s,className:"mpi-icon","aria-hidden":!0})}e(pi,"HostIcon");function mi(t){let s=L.useRef(null),[,o]=L.useState(0),[f,a]=L.useState("idle");L.useEffect(()=>t.flow.subscribe(()=>o(w=>w+1)),[t.flow]),L.useEffect(()=>{let w=document.documentElement,v=new MutationObserver(()=>o(x=>x+1));return v.observe(w,{attributes:!0,attributeFilter:["lang"]}),()=>v.disconnect()},[]),L.useEffect(()=>{t.flow.check()},[t.flow]),L.useEffect(()=>{function w(v){Os(v,t.onClose)}return e(w,"onKey"),document.addEventListener("keydown",w,!0),()=>document.removeEventListener("keydown",w,!0)},[t.onClose]);let l=document.documentElement.lang,c=t.flow.view(l),E=l.toLowerCase().startsWith("zh")?t.zhName:l.toLowerCase().startsWith("ru")?t.ruName:t.enName,y=zs(c.profileRaw,t.packageName,c.latestRaw),R=f==="copied"?c.copy.copied:f==="failed"?c.copy.copyFailed:c.copy.copy;return L.createElement(Ft.Modal,{open:!0,className:"mpi-dialog",title:`${E} ${c.copy.update}`,closeLabel:"Close",onClose:t.onClose,footer:[L.createElement(Ft.Button,{key:"check",variant:"outline",disabled:c.busy,onClick:e(()=>{t.flow.check()},"onClick")},c.copy.recheck),L.createElement(Ft.Button,{key:"update",variant:"primary",disabled:c.disabled,onClick:e(()=>{t.flow.update()},"onClick")},c.updateLabel)]},L.createElement("div",{ref:s},L.createElement("p",{className:"mpi-intro"},c.copy.intro),L.createElement("dl",{className:"mpi-meta"},L.createElement("dt",null,c.copy.current),L.createElement("dd",null,L.createElement("span",{className:"mpi-mono"},c.currentVersion)),L.createElement("dt",null,c.copy.latestLabel),L.createElement("dd",{className:"mpi-latest"},L.createElement("span",{className:"mpi-mono"},c.latestVersion),L.createElement("span",{className:"mpi-status",role:"status","data-kind":c.kind,...c.kind==="update"?{style:{color:"#e8b15a"}}:{}},c.message)),L.createElement("dt",null,c.copy.profile),L.createElement("dd",null,L.createElement("span",{className:"mpi-mono"},c.profileName))),c.busy?L.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},L.createElement("div",{className:"dssm-update-progress-bar"})):null,L.createElement("section",{className:"mpi-manual"},L.createElement("h3",null,c.copy.manual),L.createElement("p",null,c.copy.manualHint),L.createElement("div",{className:"mpi-command"},L.createElement("code",null,y),L.createElement(Ft.Button,{variant:"outline",size:"sm",disabled:c.busy,onClick:e(()=>{let w=navigator.clipboard?.writeText(y);if(w===void 0){a("failed");return}w.then(()=>{a("copied"),window.setTimeout(()=>a("idle"),1400)}).catch(()=>a("failed"))},"onClick")},R)))))}e(mi,"UpdateDialog");function Fs(t){if(typeof document>"u"||document.body===null)return()=>{};let s=Rn(t.endpoint);ui();let o=new AbortController,f,a,l,c,E,y,R;function w(){l?.unmount(),l=void 0,a=void 0,c=void 0}e(w,"unmountCheck");function v(){if(l===void 0)return;c===void 0&&(c=t.createIcon("refresh"));let ne=c;l.render(L.createElement(Ft.Button,{variant:"outline",size:"sm",onClick:T,icon:L.createElement(pi,{node:ne})},L.createElement("span",{"data-mpi-label":""},ln(document.documentElement.lang).check)))}e(v,"renderCheck");function x(){y?.unmount(),y=void 0,E?.remove(),E=void 0}e(x,"closeDialog");function T(){x();let ne=document.createElement("div");ne.className="mpi-dialog-root",document.body.append(ne),E=ne,y=Ms(ne),y.render(L.createElement(mi,{flow:Ns(re=>Ls(s,re,o.signal),f,re=>{f=re,N()}),packageName:t.packageName,zhName:t.zhName,enName:t.enName,ruName:t.ruName,onClose:x}))}e(T,"openDialog");function N(){let ne=document.querySelector(t.titleRowSelector);if(ne===null)return;let re=ne.querySelector("h1,h2"),se=ne.querySelector(t.linksSelector);if(t.isEnabled&&!t.isEnabled()){if(E!==void 0&&x(),se!==null){let ce=se.querySelector(`[data-mpi-check="${t.packageName}"]`);ce!==null&&(w(),ce.remove())}if(re!==null){let ce=re.querySelector(`.mpi-version[data-package="${t.packageName}"]`);ce!==null&&ce.remove()}return}if(re!==null&&f!==void 0){let ce=re.querySelector(`.mpi-version[data-package="${t.packageName}"]`);ce===null&&(ce=document.createElement("span"),ce.className="mpi-version",ce.dataset.package=t.packageName,re.append(ce));let Z=`v${f.currentVersion}`;ce.textContent!==Z&&(ce.textContent=Z)}if(a!==void 0&&!a.isConnected&&w(),se===null)return;let ie=se.querySelector(`[data-mpi-check="${t.packageName}"]`);if(ie!==null){let ce=ie.querySelector("[data-mpi-label]");(ce===null||ce.textContent!==ln(document.documentElement.lang).check)&&v();return}let Ne=document.createElement("span");Ne.dataset.mpiCheck=t.packageName,Ne.className="mpi-check-host",se.append(Ne),a=Ne,l=Ms(Ne),v()}e(N,"applyControls");let B=new MutationObserver(()=>{R===void 0&&(R=window.requestAnimationFrame(()=>{R=void 0,N()}))});B.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]});let F,H=e(async()=>F||(F=(async()=>{try{return f=await Ls(s,"GET",o.signal),N(),f}finally{F=void 0}})(),F),"load"),De=e(()=>{N(),(!t.isEnabled||t.isEnabled())&&H().catch(()=>{})},"onToggle");return typeof window<"u"&&window.addEventListener("dsham-update-toggle",De),N(),H().catch(()=>{}),()=>{o.abort(),B.disconnect(),x(),w(),typeof window<"u"&&window.removeEventListener("dsham-update-toggle",De),R!==void 0&&window.cancelAnimationFrame(R),document.querySelectorAll(`[data-mpi-check="${t.packageName}"],.mpi-version[data-package="${t.packageName}"]`).forEach(ne=>ne.remove())}}e(Fs,"observePluginUpdate");var cn=require("@deepseek-ai/dsh-client-ui-primitives");var tt=is,fi="@michengai/dsh-archive-manager",lr="archived-sessions",gi=4,Bs="dsham-sidebar-entry-style",vi=`
|
|
15
15
|
.dsham_mainPanel{box-sizing:border-box;height:100%;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:28px clamp(24px,4vw,48px) 48px}
|
|
16
16
|
.dsham_mainPanel>*{width:100%;max-width:960px}
|
|
17
17
|
.dsham_bundle_row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:0.5px solid var(--dsw-alias-border-l2)}
|
|
18
18
|
.dsham_bundle_label_box{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;text-align:left}
|
|
19
19
|
.dsham_bundle_title{font-size:13px;font-weight:500;line-height:20px;color:var(--dsw-alias-label-primary)}
|
|
20
20
|
.dsham_bundle_desc{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}
|
|
21
|
-
`;function _s(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(Rs)!==null||typeof document.createElement!="function")return;let e=document.createElement("style");e.id=Rs,e.textContent=ei,(document.head??document.documentElement)?.appendChild?.(e)}t(_s,"ensureSidebarEntryStyle");function ti(e){let r=e&&typeof e.size=="number"?e.size:16;return We(nn.IconArchiveOutlineMedium,{size:r})}t(ti,"ArchiveSidebarIcon");function ni(e){_s();let{t:r,enabled:i,onToggle:g,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:c,onlineUpdateDisabled:x,onlineUpdateLocked:y=!1}=e,E=[We("div",{key:"sidebar-entry",className:"dsham_bundle_row"},We("div",{className:"dsham_bundle_label_box"},We("span",{className:"dsham_bundle_title"},r("sidebar.entry.title")),We("span",{className:"dsham_bundle_desc"},r("sidebar.entry.desc"))),We(nn.Switch,{checked:i,onChange:g,label:r("sidebar.entry.toggle"),disabled:a}))];if(typeof c=="function"){let b=y?`${r("update.entry.desc")} (${r("update.entry.locked")})`:r("update.entry.desc");E.push(We("div",{key:"online-update",className:"dsham_bundle_row"},We("div",{className:"dsham_bundle_label_box"},We("span",{className:"dsham_bundle_title"},r("update.entry.title")),We("span",{className:"dsham_bundle_desc"},b)),We(nn.Switch,{checked:l,onChange:c,label:r("update.entry.toggle"),disabled:x||y,title:y?r("update.entry.locked"):void 0})))}return We(Gr,null,E)}t(ni,"ArchiveBundleConfigCard");function ri(e){let[r,i]=Ft(e.getEnabled),[g,a]=Ft(e.getOnlineUpdateEnabled?e.getOnlineUpdateEnabled:()=>!0),[l,c]=Ft(e.getOnlineUpdateLocked?e.getOnlineUpdateLocked:()=>!1),[x,y]=Ft(!1),[E,b]=Ft(!1);Yr(()=>{let R=t(()=>{i(e.getEnabled()),e.getOnlineUpdateEnabled&&a(e.getOnlineUpdateEnabled()),e.getOnlineUpdateLocked&&c(e.getOnlineUpdateLocked())},"syncState");return R(),e.subscribe(R)},[e]);let v=t(R=>{y(!0),i(R),e.setSidebar(R).catch(()=>{i(e.getEnabled())}).finally(()=>{y(!1)})},"onToggleSidebar"),S=e.setOnlineUpdate?R=>{e.getOnlineUpdateLocked?.()||(b(!0),a(R),e.setOnlineUpdate(R).catch(()=>{e.getOnlineUpdateEnabled&&a(e.getOnlineUpdateEnabled())}).finally(()=>{b(!1)}))}:void 0;return We(ni,{t:e.t,enabled:r,disabled:x,onToggle:v,onlineUpdateEnabled:g,onlineUpdateDisabled:E||l,onlineUpdateLocked:l,onToggleOnlineUpdate:S})}t(ri,"ArchiveBundleConfigCardWrapper");function er(e,r){if(_s(),!e.locale)return{isEnabled:t(()=>!1,"isEnabled"),isSupported:t(()=>!1,"isSupported"),setEnabled:t(async()=>!1,"setEnabled"),isOnlineUpdateEnabled:t(()=>!0,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:t(()=>!1,"isOnlineUpdateLocked"),setOnlineUpdate:t(async()=>!1,"setOnlineUpdate"),destroy:t(()=>{},"destroy")};let{callApi:i,renderPanel:g,ns:a}=r,l=!1,c=!1,x=!1,y=null,E=null,b=0,v=!1,S,R=new Set,j=t(()=>{if(!v)for(let U of R)try{U()}catch{}},"notify"),L=t(()=>{if(v||!x||!l||y)return;let U=e.slots.register({name:"main",key:Xn,locale:a,inject:t(()=>{let pe=typeof r.injectProps=="function"?r.injectProps():{};return Object.assign({t:e.locale?.bind?e.locale.bind(a):void 0},pe)},"inject")},pe=>We("div",{className:"dsham_mainPanel"},g(pe)));y=typeof U=="function"?U:()=>{}},"mountMain"),P=t(()=>{if(y){try{y()}catch{}y=null}},"unmountMain"),F=t(()=>{if(v||!c||!l||E)return;let U=e.slots.register({name:"sidebar.panellist",id:Xn,order:Xa,label:t(()=>e.locale.bind(a)("archives.title"),"label"),locale:a},pe=>ti(pe&&typeof pe=="object"&&"size"in pe?pe:void 0));E=typeof U=="function"?U:()=>{}},"mountRow"),Ce=t(()=>{if(E){try{E()}catch{}E=null}},"unmountRow"),K=t(()=>{if(!v)if(l)L(),F();else{if(S?.panelInfo&&typeof S.selectPanel=="function")try{S.panelInfo.getSnapshot().activePanelId===Xn&&S.selectPanel(null)}catch{}Ce(),P()}},"sync"),Y=t(async U=>{if(v)return l;let pe=++b;l=U,K(),j();try{return await i("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),U}catch(qe){throw pe===b&&(l=!U,K(),j()),qe}},"setEnabled"),Z=!0,X=!1,Ee=0,te=t(async U=>{if(v||X)return Z;let pe=++Ee;if(Z=U,j(),typeof r.onOnlineUpdateChange=="function")try{r.onOnlineUpdateChange(U)}catch{}try{if(await i("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),pe===Ee&&typeof r.onOnlineUpdateChange=="function")try{r.onOnlineUpdateChange(U)}catch{}return U}catch(qe){if(pe===Ee&&(Z=!U,j(),typeof r.onOnlineUpdateChange=="function"))try{r.onOnlineUpdateChange(!U)}catch{}throw qe}},"setOnlineUpdate"),$=b;i("/sidebar-entry").then(U=>{!v&&b===$&&U&&typeof U.enabled=="boolean"&&(l=U.enabled,K(),j())}).catch(()=>{});let mt=Ee;i("/online-update").then(U=>{if(!v&&Ee===mt&&U&&typeof U.enabled=="boolean"&&(Z=U.enabled,U.locked===!0&&(X=!0),j(),typeof r.onOnlineUpdateChange=="function"))try{r.onOnlineUpdateChange(Z)}catch{}}).catch(()=>{});let Se=e;return typeof Se.inject=="function"&&Se.inject(["layout"],U=>{!v&&U.layout&&(S=U.layout)}),e.slots.inject("main",()=>{if(!v)return x=!0,L(),()=>{x=!1,P()}}),e.slots.inject("sidebar.panellist",()=>{if(!v)return c=!0,F(),()=>{c=!1,Ce()}}),e.slots.inject("plugins.bundle.config",()=>{if(!v)return e.slots.register({name:"plugins.bundle.config",key:Qa,locale:a},U=>U&&U.view==="summary"?null:We(ri,{t:e.locale.bind(a),getEnabled:t(()=>l,"getEnabled"),setSidebar:Y,getOnlineUpdateEnabled:t(()=>Z,"getOnlineUpdateEnabled"),setOnlineUpdate:te,getOnlineUpdateLocked:t(()=>X,"getOnlineUpdateLocked"),subscribe:t(pe=>(R.add(pe),()=>{R.delete(pe)}),"subscribe")}))}),{isEnabled:t(()=>l,"isEnabled"),isSupported:t(()=>c,"isSupported"),setEnabled:Y,isOnlineUpdateEnabled:t(()=>Z,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:t(()=>X,"isOnlineUpdateLocked"),setOnlineUpdate:te,destroy:t(()=>{v||(v=!0,b++,Ee++,S=void 0,R.clear(),Ce(),P())},"destroy")}}t(er,"setupSidebarEntry");function tr(e){if(typeof e!="string"||e.length===0||e.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u957F\u5EA6\u987B\u4E3A 1\uFF5E1024 \u4E2A\u5B57\u7B26");return e}t(tr,"checkedId");var si={parse(e){let r=ee(e);if(!r||typeof r!="object"||typeof r.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:tr(r.sessionId),favorite:r.favorite}}},ai={parse(e){let r=ee(e);if(!r||!Array.isArray(r.favoriteSessionIds)||r.favoriteSessionIds.length>1e5)throw new TypeError("\u6536\u85CF\u96C6\u5408\u65E0\u6548");return{favoriteSessionIds:[...new Set(r.favoriteSessionIds.map(tr))]}},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(r){return{success:!1,error:r}}}};function Ts(){let e=t((r,i)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${r}`,create:t(()=>i,"create"),schema:i}),"codec");return["favoriteSessions","setSessionFavorite"].map(r=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${r}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:r,invocation:{kind:"direct"},parameters:r==="favoriteSessions"?[]:[{name:"input",wire:"input",source:"json",codec:e("FavoriteInput",si)}],result:e("FavoriteState",ai),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(Ts,"favoriteInvocations");function nr(e,{days:r,now:i=Date.now(),favorites:g=new Set,currentId:a,pending:l=new Map}){if(!e||!Number.isInteger(r)||r<1||r>36500||g.has(e.id)||e.id===a||(e.retainedBy?.mainView??0)>0||e.running||(e.runningSubagentCount??0)>0||e.pendingInteraction!=null||l.has(e.id))return!1;let c=typeof e.updatedAt=="number"?e.updatedAt:Date.parse(e.updatedAt??"");return Number.isFinite(c)&&c<=i-r*864e5}t(nr,"idleArchiveCandidate");async function Sn(e,r,{onProgress:i,refresh:g}={}){let a=[...new Set(e.map(tr))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},c=t(()=>i?.({total:a.length,done:l.succeeded.length+l.skipped.length+l.failures.length,succeeded:l.succeeded.length,skipped:l.skipped.length,failed:l.failures.length}),"report");c();for(let x of a){try{(await r(x)?l.succeeded:l.skipped).push(x)}catch(y){l.failures.push({sessionId:x,message:y instanceof Error?y.message:String(y)}),l.remaining.push(x)}c()}try{await g?.()}catch(x){l.refreshError=x instanceof Error?x.message:String(x)}return l}t(Sn,"runSessionBatch");function js({workspaces:e,sessions:r,archive:i,restore:g,deleteOne:a,getFavorites:l,refresh:c,currentSessionId:x}){return async(y,E,b={})=>{if(!["archive","restore","undo","delete"].includes(y))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return Sn(E,async v=>{let R=e.getSnapshot().archivedSessionIds.includes(v);if(y==="archive"){if(R||!r.getSnapshot().byId[v])return!1;if(b.idleDays!==void 0){let Ce=new Set((await l()).favoriteSessionIds),K=r.getSnapshot();if(!nr(K.byId[v],{days:b.idleDays,favorites:Ce,currentId:x(K),pending:b.getPending?.()??b.pending}))return!1}return await i(v),e.getSnapshot().archivedSessionIds.includes(v)}return R?y==="delete"?(await a(v),!0):!((await g(v))?.archivedSessionIds??e.getSnapshot().archivedSessionIds).includes(v):!1},{onProgress:b.onProgress,refresh:c})}}t(js,"createSessionOrganizer");function ii(e){return!e||e<=0?"0 B":e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}t(ii,"formatBytes");function Ds(e,r){let i=e.createElement;function g(l,c){return i(r??(y=>i("button",{type:"button",disabled:y.disabled,onClick:y.onClick},y.children)),{variant:"outline",size:"sm",...c},l)}t(g,"textButton");function a({title:l,failures:c,separator:x}){let[y,E]=e.useState(!1),b=i("ul",null,c.map(v=>i("li",{key:v.sessionId},v.sessionId,x,v.message)));return i(yn,{title:l,open:y,onToggle:t(()=>E(v=>!v),"onToggle")},b)}return t(a,"FailureDetails"),t(function({t:c,archived:x,busy:y,ready:E,days:b,onDays:v,count:S,onPreview:R,progress:j,result:L,onRetry:P,undoCount:F,onUndo:Ce,onReload:K,orphanCount:Y=0,orphanSizeBytes:Z=0,orphanCleaning:X=!1,onCleanOrphans:Ee,cacheCount:te=0,cacheRepair:$,onRebuildCaches:mt,onRetryCaches:Se,onReloadCaches:U,onDismissCaches:pe}){return i(e.Fragment,null,i("style",null,".dsham_organizer,.dsham_batchFeedback{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}.dsham_organizerControls{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.dsham_organizer label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--dsw-alias-label-primary)}.dsham_number{width:88px;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.dsham_number:hover{border-color:var(--dsw-alias-border-l3)}.dsham_number:focus{outline:none;border-color:var(--dsw-alias-state-business-primary)}.dsham_disclosure{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer}.dsham_foldChevron{transition:transform 150ms ease}.dsham_foldChevron.is-open{transform:rotate(180deg)}.dsham_organizer p,.dsham_batchFeedback p{margin:0;font-size:12px;color:var(--dsw-alias-label-secondary)}.dsham_batchFeedback progress{width:100%}.dsham_batchFeedback details{font-size:12px;overflow-wrap:anywhere}.dsham_archivePreview{max-height:260px;overflow:auto;display:grid;gap:8px;padding:8px 0}.dsham_archivePreview label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere}"),(!x||!E)&&i("div",{className:"dsham_organizer"},i("div",{className:"dsham_organizerControls"},!E&&g(c("organizer.reloadFavorites"),{disabled:y,onClick:K}),!x&&i(e.Fragment,null,i("label",null,c("organizer.idleDays"),i(Jr,{min:1,max:36500,value:b===""?null:Number(b),disabled:y,"aria-label":c("organizer.idleDays"),onChange:t(qe=>v(qe==null?"":String(qe)),"onChange")})),g(c("organizer.preview",{n:S}),{disabled:y||!E||S===0,onClick:R}))),!x&&i("p",null,c("organizer.rules"))),Y>0&&i("div",{className:"dsham_organizer"},i("div",{className:"dsham_organizerControls"},i("strong",null,c("organizer.orphanTitle",{n:Y})),Ee&&g(c(X?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:y||X,onClick:Ee})),i("p",null,c("organizer.orphanDesc",{size:ii(Z)}))),te>0&&i("div",{className:"dsham_organizer"},i("div",{className:"dsham_organizerControls"},i("strong",null,c("organizer.cacheTitle",{n:te})),mt&&g(c($?.busy?"organizer.cacheRebuilding":"organizer.cacheRebuild"),{disabled:y||$?.busy,onClick:mt})),i("p",null,c("organizer.cacheDesc"))),$&&($.result||$.progress||$.error||$.refreshError)&&i("section",{className:"dsham_batchFeedback","aria-label":c("organizer.cacheRebuild")},$.progress&&i("div",{role:"status"},i("progress",{value:$.progress.done,max:Math.max(1,$.progress.total)}),c("organizer.progressCount",$.progress)),$.result&&i("div",{role:"status"},i("p",null,c("organizer.result",{succeeded:$.result.rebuiltSessionIds.length,skipped:$.result.skippedSessionIds.length,failed:$.result.failures.length})),$.result.failures.length>0&&i(a,{title:c("organizer.failureDetails"),failures:$.result.failures,separator:c("common.separator")}),$.result.failures.length>0&&Se&&g(c("organizer.cacheRetry",{n:$.result.failures.length}),{disabled:y||$.busy,onClick:Se})),$.error&&i("p",{role:"alert"},c("organizer.cacheError",{detail:$.error})),$.refreshError&&i("p",{role:"alert"},c("organizer.refreshError",{detail:$.refreshError})),i("div",{className:"dsham_organizerControls"},U&&g(c("organizer.cacheCheck"),{disabled:y||$.busy,onClick:U}),pe&&g(c("organizer.dismiss"),{disabled:y||$.busy,onClick:pe}))),(j||L||F>0)&&i("section",{className:"dsham_batchFeedback","aria-label":c("organizer.feedback")},j&&i("div",{role:"status","aria-live":"polite"},i("progress",{value:j.done,max:Math.max(1,j.total),"aria-label":c("organizer.progress")}),c("organizer.progressCount",{done:j.done,total:j.total})),L&&i("div",{role:"status"},i("strong",null,c(`organizer.${L.kind??"archive"}Result`)),i("p",null,c("organizer.result",{succeeded:L.succeeded.length,skipped:L.skipped.length,failed:L.failures.length})),L.failures.length>0&&i(a,{title:c("organizer.failureDetails"),failures:L.failures,separator:c("common.separator")}),L.refreshError&&i("p",{role:"alert"},c("organizer.refreshError",{detail:L.refreshError})),L.remaining.length>0&&g(c("organizer.retry",{n:L.remaining.length}),{disabled:y,onClick:P})),F>0&&i("div",{className:"dsham_organizerControls"},g(c("organizer.undo",{n:F}),{disabled:y,onClick:Ce}),i("p",null,c("organizer.undoHint")))))},"OrganizerPanel")}t(Ds,"createOrganizerPanel");var Ns={"organizer.cacheTitle":"\u53D1\u73B0 {n} \u4E2A\u4F1A\u8BDD\u7F3A\u5C11\u53EF\u7528\u5217\u8868\u7F13\u5B58","organizer.cacheDesc":"\u68C0\u67E5\u5DE5\u4F5C\u533A\u3001\u672A\u5206\u7EC4\u53CA\u5F52\u6863\u666E\u901A\u4F1A\u8BDD\u7684\u5934\u90E8\u4E0E\u5B98\u65B9\u7F13\u5B58\u3002\u70B9\u51FB\u540E\u9010\u6761\u53EA\u8BFB\u65E5\u5FD7\u5E76\u91CD\u5EFA\u5B98\u65B9\u5217\u8868\u7F13\u5B58\uFF1B\u8DF3\u8FC7\u6D3B\u52A8\u4F1A\u8BDD\uFF0C\u4E0D\u6253\u5F00\u4F1A\u8BDD\u3001\u4E0D\u8C03\u7528\u6A21\u578B\uFF0C\u4E5F\u4E0D\u6539\u53D8\u5F52\u6863\u6216\u5B9A\u65F6\u4EFB\u52A1\u3002\u8D85\u65F6\u8868\u793A\u4FDD\u5B58\u672A\u786E\u8BA4\uFF0C\u53EF\u91CD\u8BD5\u3002","organizer.cacheRebuild":"\u91CD\u5EFA\u5217\u8868\u7F13\u5B58","organizer.cacheRebuilding":"\u91CD\u5EFA\u4E2D\u2026","organizer.cacheRetry":"\u91CD\u8BD5\u5931\u8D25 {n} \u6761","organizer.cacheCheck":"\u5237\u65B0\u5217\u8868\u5E76\u91CD\u65B0\u68C0\u6D4B","organizer.cacheError":"\u7F13\u5B58\u68C0\u6D4B\u5931\u8D25\uFF1A{detail}","organizer.dismiss":"\u5B8C\u6210","organizer.feedback":"\u64CD\u4F5C\u53CD\u9988","organizer.allSessions":"\u5168\u90E8\u4F1A\u8BDD","organizer.favoriteFilter":"\u6536\u85CF\u7B5B\u9009","organizer.archiveResult":"\u5F52\u6863\u7ED3\u679C","organizer.restoreResult":"\u6062\u590D\u7ED3\u679C","organizer.deleteResult":"\u5220\u9664\u7ED3\u679C","organizer.undoResult":"\u64A4\u56DE\u7ED3\u679C","organizer.favorite":"\u6536\u85CF","organizer.unfavorite":"\u53D6\u6D88\u6536\u85CF","organizer.favoritesOnly":"\u53EA\u770B\u6536\u85CF","organizer.reloadFavorites":"\u91CD\u65B0\u52A0\u8F7D\u6536\u85CF","organizer.idleDays":"\u95F2\u7F6E\u5929\u6570","organizer.preview":"\u9884\u89C8\u95F2\u7F6E\u5F52\u6863\uFF08{n}\uFF09","organizer.rules":"\u6309\u6700\u540E\u6D3B\u52A8\u65F6\u95F4\u7B5B\u9009\uFF0C\u9075\u5FAA\u5F53\u524D\u5217\u8868\u7B5B\u9009\u6761\u4EF6\uFF1B\u6392\u9664\u6536\u85CF\u3001\u5F53\u524D\u6253\u5F00\u3001\u6B63\u5728\u6267\u884C\u53CA\u7B49\u5F85\u4EA4\u4E92\u7684\u4F1A\u8BDD\u3002","organizer.progress":"\u6279\u91CF\u64CD\u4F5C\u8FDB\u5EA6","organizer.progressCount":"\u5DF2\u5904\u7406 {done} / {total}","organizer.result":"\u6210\u529F {succeeded} \xB7 \u8DF3\u8FC7 {skipped} \xB7 \u5931\u8D25 {failed}","organizer.failureDetails":"\u67E5\u770B\u5931\u8D25\u8BE6\u60C5","organizer.refreshError":"\u64CD\u4F5C\u7ED3\u679C\u5DF2\u4FDD\u7559\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF1A{detail}","organizer.retry":"\u91CD\u8BD5\u5269\u4F59 {n} \u6761","organizer.undo":"\u64A4\u56DE\u672C\u6B21\u5F52\u6863\uFF08{n}\uFF09","organizer.undoHint":"\u4EC5\u4FDD\u7559\u672C\u6B21\u6253\u5F00\u7BA1\u7406\u9875\u671F\u95F4\u6700\u8FD1\u4E00\u6279\u5F52\u6863\uFF1B\u5173\u95ED\u9875\u9762\u6216\u5237\u65B0\u540E\u6E05\u9664\u3002\u64A4\u56DE\u4E0D\u4F1A\u6062\u590D\u5DF2\u5220\u9664\u7684\u4F1A\u8BDD\u3002","organizer.idleConfirm":"\u8BF7\u68C0\u67E5\u4EE5\u4E0B\u5019\u9009\uFF0C\u53EF\u53D6\u6D88\u52FE\u9009\uFF1B\u6267\u884C\u524D\u518D\u6B21\u6392\u9664\u6536\u85CF\u53CA\u6D3B\u8DC3\u4F1A\u8BDD\u3002","organizer.manualConfirm":"\u4EC5\u5F52\u6863\u4EE5\u4E0B\u52FE\u9009\u4F1A\u8BDD\uFF1B\u53EF\u9010\u6761\u53D6\u6D88\u3002\u5F52\u6863\u540E\u53EF\u64A4\u56DE\u672C\u6279\u64CD\u4F5C\u3002","organizer.orphanTitle":"\u53D1\u73B0 {n} \u4E2A\u65E0\u4E3B\u5B64\u513F\u5B50\u4EE3\u7406","organizer.orphanDesc":"\u6BCD\u4F1A\u8BDD\u5DF2\u88AB\u5916\u90E8\u5220\u9664\uFF0C\u8FD9\u4E9B\u5B50\u4EE3\u7406\u5728\u65E5\u5E38\u804A\u5929\u5217\u8868\u4E2D\u4E0D\u53EF\u89C1\uFF0C\u5171\u5360\u7528\u7EA6 {size} \u78C1\u76D8\u7A7A\u95F4\u3002\u6E05\u7406\u4E0D\u53EF\u64A4\u9500\u3002","organizer.cleanOrphans":"\u6E05\u7406\u5168\u90E8\u5B64\u513F","organizer.cleaning":"\u6E05\u7406\u4E2D\u2026","organizer.orphanCleanSuccess":"\u5DF2\u6210\u529F\u6E05\u7406 {n} \u4E2A\u65E0\u4E3B\u5B50\u4EE3\u7406\u4F1A\u8BDD\u3002"},zs={"organizer.cacheTitle":"Found {n} sessions without usable list caches","organizer.cacheDesc":"Checks headers and official caches for workspace, ungrouped, and archived ordinary sessions. On click, reads logs one at a time and rebuilds official caches. Skips active sessions; never opens sessions, calls models or changes archives or schedules. Timeout means persistence is unconfirmed and can be retried.","organizer.cacheRebuild":"Rebuild list caches","organizer.cacheRebuilding":"Rebuilding\u2026","organizer.cacheRetry":"Retry {n} failed","organizer.cacheCheck":"Refresh lists and check again","organizer.cacheError":"Cache check failed: {detail}","organizer.dismiss":"Done","organizer.feedback":"Operation feedback","organizer.allSessions":"All sessions","organizer.favoriteFilter":"Favorites filter","organizer.archiveResult":"Archive results","organizer.restoreResult":"Restore results","organizer.deleteResult":"Delete results","organizer.undoResult":"Undo results","organizer.favorite":"Favorite","organizer.unfavorite":"Unfavorite","organizer.favoritesOnly":"Favorites only","organizer.reloadFavorites":"Reload favorites","organizer.idleDays":"Idle days","organizer.preview":"Preview idle archives ({n})","organizer.rules":"Uses last activity, the current list filters. Excludes favorites, open, running and waiting sessions.","organizer.progress":"Batch progress","organizer.progressCount":"Processed {done} / {total}","organizer.result":"Succeeded {succeeded} \xB7 Skipped {skipped} \xB7 Failed {failed}","organizer.failureDetails":"Failure details","organizer.refreshError":"Results retained, but refresh failed: {detail}","organizer.retry":"Retry remaining {n}","organizer.undo":"Undo this archive batch ({n})","organizer.undoHint":"Only the latest archive batch while this page is open is retained. Closing or refreshing clears undo. Deleted sessions cannot be restored.","organizer.idleConfirm":"Review and deselect candidates. Favorites and active sessions are checked again before archiving.","organizer.manualConfirm":"Only checked sessions below will be archived. You can undo this batch afterward.","organizer.orphanTitle":"Found {n} orphan subagents","organizer.orphanDesc":"Parent sessions were deleted externally. These subagents are hidden from normal chat lists and occupy ~{size} disk space. Removal cannot be undone.","organizer.cleanOrphans":"Clean up all orphans","organizer.cleaning":"Cleaning up\u2026","organizer.orphanCleanSuccess":"Successfully cleaned up {n} orphan subagent sessions."},Os={"organizer.cacheTitle":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E {n} \u0441\u0435\u0441\u0441\u0438\u0439 \u0431\u0435\u0437 \u043F\u0440\u0438\u0433\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u0435\u0448\u0430 \u0441\u043F\u0438\u0441\u043A\u0430","organizer.cacheDesc":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E\u0442\u0441\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0438 \u0438 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043A\u0435\u0448 \u0441\u0435\u0441\u0441\u0438\u0439 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439, \u0431\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B \u0438 \u0430\u0440\u0445\u0438\u0432\u0430. \u041F\u043E \u043D\u0430\u0436\u0430\u0442\u0438\u044E \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u043F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u0435\u0448\u0430. \u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F; \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F, \u043C\u043E\u0434\u0435\u043B\u0438 \u043D\u0435 \u0432\u044B\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F, \u0430\u0440\u0445\u0438\u0432\u044B \u0438 \u0440\u0430\u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043D\u0435 \u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F. \u0422\u0430\u0439\u043C-\u0430\u0443\u0442 \u043E\u0437\u043D\u0430\u0447\u0430\u0435\u0442 \u043D\u0435\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D\u043D\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435; \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u0432\u0442\u043E\u0440.","organizer.cacheRebuild":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u0435\u0448 \u0441\u043F\u0438\u0441\u043A\u043E\u0432","organizer.cacheRebuilding":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435\u2026","organizer.cacheRetry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C {n} \u043E\u0448\u0438\u0431\u043E\u043A","organizer.cacheCheck":"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043A\u0438 \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C","organizer.cacheError":"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0435\u0448\u0430: {detail}","organizer.dismiss":"\u0413\u043E\u0442\u043E\u0432\u043E","organizer.feedback":"\u041E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438","organizer.allSessions":"\u0412\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","organizer.favoriteFilter":"\u0424\u0438\u043B\u044C\u0442\u0440 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E","organizer.archiveResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438","organizer.restoreResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F","organizer.deleteResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F","organizer.undoResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043E\u0442\u043C\u0435\u043D\u044B","organizer.favorite":"\u0412 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.unfavorite":"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E","organizer.favoritesOnly":"\u0422\u043E\u043B\u044C\u043A\u043E \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.reloadFavorites":"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.idleDays":"\u0414\u043D\u0438 \u043F\u0440\u043E\u0441\u0442\u043E\u044F","organizer.preview":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0430\u0440\u0445\u0438\u0432\u0430 \u043F\u0440\u043E\u0441\u0442\u043E\u044F ({n})","organizer.rules":"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044E\u044E \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C \u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B \u0441\u043F\u0438\u0441\u043A\u0430. \u0418\u0441\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435, \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435, \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0435 \u0438 \u043E\u0436\u0438\u0434\u0430\u044E\u0449\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438.","organizer.progress":"\u0425\u043E\u0434 \u043F\u0430\u043A\u0435\u0442\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438","organizer.progressCount":"\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E {done} / {total}","organizer.result":"\u0423\u0441\u043F\u0435\u0448\u043D\u043E {succeeded} \xB7 \u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E {skipped} \xB7 \u041E\u0448\u0438\u0431\u043E\u043A {failed}","organizer.failureDetails":"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u043E\u0448\u0438\u0431\u043E\u043A","organizer.refreshError":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B, \u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043F\u0438\u0441\u043A\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C: {detail}","organizer.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044F {n}","organizer.undo":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u0442\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044E ({n})","organizer.undoHint":"\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u043F\u0430\u043A\u0435\u0442\u043D\u0430\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F, \u043F\u043E\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430 \u044D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430. \u0417\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u0438\u043B\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0431\u0440\u0430\u0441\u044B\u0432\u0430\u0435\u0442 \u043E\u0442\u043C\u0435\u043D\u0443. \u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.","organizer.idleConfirm":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u0430\u043D\u0434\u0438\u0434\u0430\u0442\u043E\u0432, \u043C\u043E\u0436\u043D\u043E \u0441\u043D\u044F\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443. \u041F\u0435\u0440\u0435\u0434 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0435\u0439 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u044E\u0442\u0441\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E.","organizer.manualConfirm":"\u0411\u0443\u0434\u0443\u0442 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u0441\u0435\u0441\u0441\u0438\u0438. \u042D\u0442\u0443 \u043F\u0430\u043A\u0435\u0442\u043D\u0443\u044E \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E \u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0436\u0435.","organizer.orphanTitle":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E {n} \u043E\u0441\u0438\u0440\u043E\u0442\u0435\u0432\u0448\u0438\u0445 \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432","organizer.orphanDesc":"\u0420\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0431\u044B\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0438\u0437\u0432\u043D\u0435. \u041F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u044B \u0441\u043A\u0440\u044B\u0442\u044B \u0438\u0437 \u043E\u0431\u044B\u0447\u043D\u044B\u0445 \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0447\u0430\u0442\u043E\u0432 \u0438 \u0437\u0430\u043D\u0438\u043C\u0430\u044E\u0442 ~{size} \u0434\u0438\u0441\u043A\u043E\u0432\u043E\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","organizer.cleanOrphans":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435\u0445 \u0441\u0438\u0440\u043E\u0442","organizer.cleaning":"\u041E\u0447\u0438\u0441\u0442\u043A\u0430\u2026","organizer.orphanCleanSuccess":"\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u043E\u0441\u0438\u0440\u043E\u0442\u0435\u0432\u0448\u0438\u0445 \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432."};var Wt=Function("return globalThis.__dshArchiveReactDOM")(),Ms=Function("return globalThis.__dshArchiveReactDOMClient")(),Ps=Wt.createPortal,Ro=Wt.flushSync,_o=Ms?.createRoot,To=Ms?.hydrateRoot,jo=Wt.findDOMNode,Do=Wt.unmountComponentAtNode,No=Wt.unstable_batchedUpdates,zo=Wt.version;function oi(e){var r={exports:{}},i=r.exports;Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});let g=e("@deepseek-ai/dsh-client-store"),a=e("react/jsx-runtime"),l=e("react"),c=e("@deepseek-ai/dsh-client-ui-primitives");function x({open:n,onClose:s,title:o,description:u,footer:m,children:f,className:C,width:N}){let A=l.useRef(null),B=l.useCallback(()=>A.current?.closest(".dsham_settings")??document.body,[]),[T,z]=l.useState(null);l.useEffect(()=>{if(!n){z(null);return}z(B())},[n,B]),l.useEffect(()=>{if(!n)return;let h=t(me=>{me.key==="Escape"&&(me.preventDefault(),me.stopPropagation(),"stopImmediatePropagation"in me&&typeof me.stopImmediatePropagation=="function"&&me.stopImmediatePropagation(),s())},"onKey");return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[n,s]);let H=(0,a.jsxs)("div",{className:"dsham_modalRoot",role:"presentation",children:[(0,a.jsx)("div",{className:"dsham_modalMask",onClick:s}),(0,a.jsxs)("div",{role:"dialog","aria-modal":!0,"aria-label":typeof o=="string"?o:void 0,className:kt("dsham_modalDialog",C),style:{width:N??560},children:[(0,a.jsx)("h2",{children:o}),u!=null&&(0,a.jsx)("p",{children:u}),f!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:f}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:m})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{refObject:A,getContainer:B}),n&&T?Ps(H,T):null]})}t(x,"SettingsModal");function y({refObject:n,getContainer:s}){return(0,a.jsx)("span",{hidden:!0,ref:n,"data-get-container":s})}t(y,"SettingsModalAnchor");function E({variant:n="outline",icon:s,children:o,className:u,disabled:m,title:f,onClick:C,"aria-label":N,"aria-pressed":A,"aria-expanded":B,"aria-haspopup":T}){return(0,a.jsx)(c.Button,{variant:n,size:"sm",className:u,disabled:m,title:f,onClick:C,"aria-label":N,"aria-pressed":A,"aria-expanded":B,"aria-haspopup":T,icon:s,children:o})}t(E,"settingsButton");function b({variant:n="outline",danger:s=!1,disabled:o,onClick:u,children:m}){return(0,a.jsx)(c.Button,{variant:s?"outline":n,className:s?"dsham_btnDanger":void 0,disabled:o,onClick:u,children:m})}t(b,"modalFooterButton");function v(n,s){let o={className:n?"dsham_archiveTabsLocked":void 0,children:s};return n&&(o.inert=""),o}t(v,"tabsShell");let S=Ds(l,c.Button),{HighlightedText:R,useArchiveSearch:j,useArchivePreview:L,DiscoveryFilters:P,SearchStatus:F,PreviewContent:Ce}=ls(l,{Button:c.Button,SegmentedControl:c.SegmentedControl}),K={refresh:["M13.5 5.5V2.5m0 0h-3m3 0-2.1 2.1A5.5 5.5 0 1 0 13.2 12"],download:["M8 2v8m0 0 3-3m-3 3-3-3M3 13v2h10v-2"],copy:["M5 5h8v8H5z","M3 3h8"],close:["m4 4 8 8M12 4 4 12"]};function Y(n){let s=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 16 16"),o.setAttribute("width","16"),o.setAttribute("height","16"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.5"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("aria-hidden","true");for(let u of K[n]){let m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",u),o.append(m)}return s.append(o),s}t(Y,"createPluginUpdateIcon");let Z={parse(n){if(typeof n!="string"||n.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(n)}`);return n}},X={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");let o=s.archivedSessionIds;if(!Array.isArray(o)||o.some(u=>typeof u!="string"))throw new TypeError("archivedSessionIds must be a string array");return s}},Ee={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s)||s.deleted!==!0)throw new TypeError("deleted must be true");return s}},te={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("target must be an object");if(s.scope==="all"||s.scope==="ungrouped"||s.scope==="workspace"&&typeof s.workspaceId=="string"&&s.workspaceId.length>0||s.scope==="sessions"&&Array.isArray(s.sessionIds)&&s.sessionIds.length>0&&s.sessionIds.every(o=>typeof o=="string"&&o.length>0))return s;throw new TypeError("target.scope must be all, ungrouped, workspace with a non-empty workspaceId, or sessions with non-empty sessionIds")}},$={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");for(let o of["requestedSessionIds","deletedSessionIds","skippedSessionIds"])if(!Array.isArray(s[o])||s[o].some(u=>typeof u!="string"))throw new TypeError(`${o} must be a string array`);if(!Array.isArray(s.failures)||s.failures.some(o=>typeof o!="object"||o===null||typeof o.sessionId!="string"||typeof o.message!="string"))throw new TypeError("failures must contain sessionId/message objects");return s}},mt={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s)||!Array.isArray(s.items))throw new TypeError("result.items must be an array");if(s.items.some(o=>typeof o!="object"||o===null||typeof o.sessionId!="string"||typeof o.createdAt!="number"||!Number.isFinite(o.createdAt)))throw new TypeError("items must contain sessionId/createdAt objects");return s}};function Se(n,s){return{mode:"strict",typeSymbol:n,create:t(()=>s,"create"),schema:s}}t(Se,"strictCodec");let U={package:"@michengai/dsh-archive-manager",descriptors:[...Ts(),...ss(),...ms(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Se("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:Se("@michengai/dsh-archive-manager/types#ArchivedSessionIds",X),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Se("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:Se("@michengai/dsh-archive-manager/types#Deleted",Ee),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteArchivedSessions",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteArchivedSessions",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",codec:Se("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",te)}],result:Se("@michengai/dsh-archive-manager/types#DeletedBatch",$),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/archivedSessionMetadata",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"archivedSessionMetadata",invocation:{kind:"direct"},parameters:[],result:Se("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",mt),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/diagnoseOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"diagnoseOrphanSubagents",invocation:{kind:"direct"},parameters:[],result:Se("@michengai/dsh-archive-manager/types#OrphanSubagentDiagnosis",{parse(n){let s=ee(n);if(!s||typeof s.count!="number"||!Array.isArray(s.items)||typeof s.totalSizeBytes!="number")throw new TypeError("invalid orphan subagent diagnosis");return s}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/cleanOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"cleanOrphanSubagents",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",acceptsUndefined:!0,codec:Se("@michengai/dsh-archive-manager/types#CleanOrphanTarget",{parse(n){if(n==null)return{};let s=ee(n);if(!s)throw new TypeError("target must be an object");if(s.sessionIds!==void 0&&(!Array.isArray(s.sessionIds)||s.sessionIds.some(o=>typeof o!="string")))throw new TypeError("sessionIds must be an array of strings");return s}})}],result:Se("@michengai/dsh-archive-manager/types#CleanOrphanResult",{parse(n){let s=ee(n);if(!s||!Array.isArray(s.cleanedSessionIds)||!Array.isArray(s.skippedSessionIds)||!Array.isArray(s.failures))throw new TypeError("invalid orphan subagent clean result");return s}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]},pe=".dsham_btnDanger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272);border-color:var(--dsw-alias-state-error-primary,#ef7272)}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/DangerButton.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/DangerButton.css",n.textContent=pe,document.head.appendChild(n)}let qe=".dsham_iconAction{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:22px!important;min-width:22px!important;height:22px!important;padding:0!important;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px)!important;background:transparent;color:var(--dsw-alias-label-secondary)}.dsham_iconAction:not(:disabled):hover{color:var(--dsw-alias-link,#4176e6)!important;border-color:var(--dsw-alias-link,#4176e6)!important}.dsham_iconAction.dsham_iconDanger{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction.dsham_iconDanger:not(:disabled):hover{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction svg{width:16px!important;height:16px!important;flex:none!important}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/IconAction.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/IconAction.css",n.textContent=qe,document.head.appendChild(n)}let Ot=".dsham_modalRoot{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.dsham_modalMask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1,rgb(0 0 0 / 45%))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;max-width:calc(100vw - 48px);max-height:min(80vh,720px);padding:22px 24px 20px;overflow:hidden;border:0;border-radius:var(--dsw-radius-panel,28px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px}.dsham_modalDialog>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dsham_modalBody{display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}.dsham_modalFooter{display:flex;flex:none;align-items:center;justify-content:flex-end;gap:8px}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/Modal.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/Modal.css",n.textContent=Ot,document.head.appendChild(n)}let rn=".dsham_sidebarCardRoot{position:fixed;inset:0;z-index:1200;pointer-events:none}.dsham_sidebarCardBackdrop{position:fixed;inset:0;pointer-events:auto;background:transparent}.dsham_sidebarCard{position:fixed;pointer-events:auto;box-sizing:border-box;width:290px;max-height:calc(100vh - 32px);overflow-y:auto;padding:16px 18px 14px;border-radius:var(--dsw-radius-lg,14px);background:var(--dsw-menu-surface-fill);backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));border:none;box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:8px}.dsham_sidebarCardTitle{margin:0;font-size:14px;font-weight:600;line-height:20px;color:var(--dsw-alias-label-primary)}.dsham_sidebarCardDesc{margin:0;font-size:13px;line-height:18px;color:var(--dsw-alias-label-secondary)}.dsham_sidebarCardError{margin-top:2px;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary,#ef7272);white-space:pre-line}.dsham_sidebarCardFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.dsham_sidebarCardBtn{border:none;background:transparent;padding:5px 12px;border-radius:var(--dsw-radius-sm,6px);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:background-color .15s ease,opacity .15s ease}.dsham_sidebarCardBtnCancel{color:var(--dsw-alias-label-primary)}.dsham_sidebarCardBtnCancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dsham_sidebarCardBtnDanger{color:var(--dsw-alias-state-error-primary,#ef7272)}.dsham_sidebarCardBtnDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,#f25a5a26)}.dsham_sidebarCardBtn:disabled{opacity:.4;cursor:default}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/SidebarPopover.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/SidebarPopover.css",n.textContent=rn,document.head.appendChild(n)}function Qe(n){let s=new Map;for(let o of Object.values(n)){if(o.origin!=="subagent")continue;let u=new Set,m=o;for(;m?.origin==="subagent"&&m.parentId!==void 0&&!u.has(m.id);){u.add(m.id);let f=s.get(m.parentId);f===void 0?s.set(m.parentId,{count:1,runningCount:o.running?1:0}):(f.count+=1,o.running&&(f.runningCount+=1)),m=n[m.parentId]}}return s}t(Qe,"indexSubagentDescendants");let xn="__flat_session_order__",Mt="dsh.archive-manager.workspace.view.v1",Pt="dsh.workspace.view.v5";function I(n){let s=n??globalThis.localStorage;if(s==null||typeof s.getItem!="function"||typeof s.setItem!="function")return!1;try{if(s.getItem(Mt)!=null)return!1;let o=s.getItem(Pt);return o==null?!1:(s.setItem(Mt,o),!0)}catch{return!1}}t(I,"migrateWorkspaceViewPersist");function se(){return I(),(0,g.defineStore)({init:t(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:Mt,actions:{setGroupBy:t((n,s)=>{n.groupBy=s},"setGroupBy"),setOrderBy:t((n,s)=>{n.orderBy=s},"setOrderBy"),setShowArchived:t((n,s)=>{n.showArchived=s===!0},"setShowArchived"),setGroupExpanded:t((n,s,o)=>{n.groupExpansion[s]=o},"setGroupExpanded"),retainAccountKeys:t((n,s)=>{let o=new Set(s);n.groupExpansion=Object.fromEntries(Object.entries(n.groupExpansion).filter(([u])=>o.has(u))),n.sessionOrderByAccount=Object.fromEntries(Object.entries(n.sessionOrderByAccount).filter(([u])=>o.has(u))),n.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(n.sessionUpdatedAtByAccount).filter(([u])=>o.has(u)))},"retainAccountKeys"),syncSessionOrderAccount:t((n,s,o,u)=>{n.sessionOrderByAccount[s]=o,n.sessionUpdatedAtByAccount[s]=u},"syncSessionOrderAccount"),setSessionOrder:t((n,s,o)=>{n.sessionOrderByAccount[s]=o},"setSessionOrder")}})}t(se,"createWorkspaceViewStore");function ze(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,a.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}t(ze,"GithubMark16");function Lt(){let n=c.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}t(Lt,"FeedbackIcon");function Ut({archiveSessions:n,archiveSession:s,sessionStore:o,workspaceStore:u,unarchiveSession:m,deleteSession:f,unarchiveSessions:C,deleteArchivedSessions:N,archivedSessionMetadata:A,openConversation:B,focusSessionWorkspace:T,viewState:z,close:H,t:h,diagnoseOrphanSubagents:me,cleanOrphanSubagents:Re,diagnoseSessionCaches:ie,rebuildSessionCaches:Xe,refreshCacheLists:ft,searchSessionContent:Dt,searchArchivedContent:J,previewArchivedSession:xe,favoriteSessions:it,setSessionFavorite:$t,organizeBatch:vt,useSessionPendingInteraction:On,useSessionStatus:cn}){let et=(0,l.useSyncExternalStore)(o.subscribe,o.getSnapshot),be=(0,l.useSyncExternalStore)(u.subscribe,u.getSnapshot),[ot,Et]=(0,l.useState)("archived"),ge=ot==="archived",[yt,tt]=(0,l.useState)(null),[Gt,lt]=(0,l.useState)(null),[Ke,bt]=(0,l.useState)(null),It=t((d,k=null)=>{q(null),_e(null),Nt(!1),lt(k),tt(d)},"requestArchive"),dn=t(()=>{W||(tt(null),lt(null),q(null))},"closeArchive"),ct=(0,l.useRef)(!1),[ve,At]=(0,l.useState)(null),Kt=(0,l.useRef)(!1),[W,je]=(0,l.useState)(!1),[nt,q]=(0,l.useState)(null),[Yt,_e]=(0,l.useState)(null),Rt=t(d=>{q(null),_e(null),At(d)},"requestDelete"),[wt,Bt]=(0,l.useState)(z?.query??""),[p,w]=(0,l.useState)(z?.project??"all"),[D,ae]=(0,l.useState)(z?.sortBy??"updated"),[ke,de]=(0,l.useState)({}),[Oe,Ue]=(0,l.useState)(()=>new Set),oe=(0,l.useRef)(new Set),[we,Te]=(0,l.useState)([]),[dt,Ye]=(0,l.useState)([]),[Q,ne]=(0,l.useState)(!1),[O,re]=(0,l.useState)(!1),ye=(0,l.useRef)(!1),[he,Me]=(0,l.useState)(!1),[Pe,Be]=l.useState("content"),[Ze,Ne]=l.useState(""),[Ie,ue]=l.useState(""),[rt,ut]=(0,l.useState)(()=>new Set),[$e,Fe]=(0,l.useState)("30"),[Ge,Nt]=(0,l.useState)(!1),[Je,Mn]=(0,l.useState)(null),[Tr,un]=(0,l.useState)(null),[Pn,hn]=(0,l.useState)([]),St=(0,l.useRef)(!1),Ln=(0,l.useRef)(null),Un=Vs(On??Hs,cn??Ws,typeof cn=="function"),jr=(0,l.useRef)(Un.pending);jr.current=Un.pending;let _t=(0,l.useMemo)(()=>new Set(dt),[dt]),ha=t(async()=>{if(it)try{let d=await it();Ye(d.favoriteSessionIds),ne(!0)}catch(d){ne(!1),q(Ae(d))}},"loadFavorites");(0,l.useEffect)(()=>{let d=!0;return it&&it().then(k=>{d&&(Ye(k.favoriteSessionIds),ne(!0))}).catch(k=>{d&&q(Ae(k))}),()=>{d=!1}},[it]);let pa=t(async d=>{if(!(ye.current||W||!Q)){ye.current=!0,re(!0),q(null);try{let k=await $t({sessionId:d,favorite:!_t.has(d)});Ye(k.favoriteSessionIds)}catch(k){q(Ae(k))}finally{ye.current=!1,re(!1)}}},"toggleFavorite"),pn=t(async(d,k,{idle:V=!1,retry:le=!1}={})=>{if(!(St.current||ye.current||oe.current.size>0||!vt)){St.current=!0,je(!0),q(null),_e(null),un(null),d==="archive"&&!le&&hn([]);try{let _=await vt(d,k,{idleDays:V?Number($e):void 0,getPending:t(()=>jr.current,"getPending"),onProgress:t(ce=>{Mn(ce),d==="archive"&&ce.total>0&&ce.done>=ce.total&&(tt(null),lt(null),Nt(!1))},"onProgress")});return un({..._,kind:d,tab:ot}),Ln.current=_.remaining.length?{kind:d,ids:_.remaining,idle:V}:null,d==="archive"&&hn(ce=>[...new Set([...ce,..._.succeeded])]),(d==="undo"||d==="restore"||d==="delete")&&hn(ce=>ce.filter(He=>!_.succeeded.includes(He)&&!_.skipped.includes(He))),Te(ce=>ce.filter(He=>!_.succeeded.includes(He)&&!_.skipped.includes(He))),d==="delete"&&Ye(ce=>ce.filter(He=>!_.succeeded.includes(He))),_}catch(_){q(Ae(_))}finally{St.current=!1,je(!1),Mn(null)}}},"executeBatch"),[Dr,ma]=(0,l.useState)(null),[Nr,ga]=(0,l.useState)({diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null}),st=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!ie||!Xe||!ft)return;let d=gs({diagnose:ie,rebuild:Xe,refresh:ft});st.current=d;let k=d.subscribe(()=>{ga(d.snapshot())});return d.load(),()=>{k(),d.dispose(),st.current=null}},[ie,Xe,ft]),(0,l.useEffect)(()=>{st.current?.snapshot().busy||st.current?.load()},[be.archivedSessionIds]);let zr=t(async(d=!1)=>{if(!(W||St.current||!st.current||st.current.snapshot().busy)){St.current=!0,je(!0);try{await st.current.run(d)}finally{St.current=!1,ht.current&&je(!1)}}},"runCacheRebuild"),[Or,Mr]=(0,l.useState)(!1),Pr=t(()=>{typeof me=="function"&&me().then(ma).catch(d=>{console.warn("archive-manager: diagnose orphan subagents failed",d)})},"loadOrphans");(0,l.useEffect)(()=>{Pr()},[be.archivedSessionIds]);let fa=t(async()=>{if(!(Or||typeof Re!="function")){Mr(!0),q(null),_e(null);try{let d=await Re({});(d.cleanedSessionIds.length>0||d.skippedSessionIds.length>0)&&Pr(),d.failures.length>0?(_e(null),q(an(d.failures,h))):d.cleanedSessionIds.length>0&&(q(null),_e(h("organizer.orphanCleanSuccess",{n:d.cleanedSessionIds.length})))}catch(d){q(Ae(d))}finally{Mr(!1)}}},"cleanOrphans"),ht=(0,l.useRef)(!0),Bn=(0,l.useRef)(!1);(0,l.useEffect)(()=>(ht.current=!0,()=>{ht.current=!1}),[]);let mn=t(async(d,k=!1)=>{if(W||Bn.current)return;Bn.current=!0,je(!0),q(null);let V=!1;try{await vs({prepare:k?async le=>{await T?.(le)}:void 0,restore:t(async le=>{await m(le),V=!0},"restore"),open:t(async le=>{await B(le),ht.current&&H?.()},"open")},d.id,k,()=>ht.current)}catch(le){if(!ht.current)return;if(V){Et("unarchived");let _=Tt.find(ce=>ce.sessions.some(He=>He.id===d.id));_!==void 0&&w(_.key)}q(fs(le,h))}finally{Bn.current=!1,ht.current&&je(!1)}},"viewConversation");(0,l.useEffect)(()=>{z&&Object.assign(z,{query:wt,project:p,sortBy:D})},[wt,p,D,z]);let gn=(0,l.useMemo)(()=>ge?be.archivedSessionIds:kr(et.byId,be.archivedSessionIds),[ge,et.byId,be.archivedSessionIds]),Tt=(0,l.useMemo)(()=>Cr(et.byId,be.items,gn,h("group.ungrouped")),[et.byId,be,gn,h]),va=t(d=>{W||oe.current.size>0||(at.close(),Et(d),Te([]),tt(null),lt(null),q(null),_e(null),w("all"),Bt(""),d!=="archived"&&D==="archived"&&ae("updated"))},"switchTab"),Lr=t(async(d,k=!1)=>{if(!(ct.current||W||!d?.length)){if(vt){ct.current=!0;try{let V=await pn("archive",d,{idle:k}),le=V?.failures.map(_=>ir(_.sessionId,_.message)).find(_=>_!==void 0);if(le!==void 0&&typeof s=="function"){let _=et.byId[le.sessionId];bt({sessionId:le.sessionId,title:_===void 0?le.sessionId:Le(_,h),kinds:le.kinds.join(", ")}),tt(null),lt(null),q(null);return}V&&(tt(null),lt(null),Nt(!1))}finally{ct.current=!1}return}ct.current=!0,je(!0),q(null),_e(null);try{let V=await n(d);tt(null),lt(null),V.archivedSessionIdsAdded.length>0&&_e(h("archives.archiveSuccess",{n:V.archivedSessionIdsAdded.length})),V.failures&&V.failures.length>0?q(an(V.failures,h)):(Te([]),Et("archived"),w("all"),Bt(""))}catch(V){let le=ar(V);if(le!==void 0&&typeof s=="function"){let _=et.byId[le.sessionId];bt({sessionId:le.sessionId,title:_===void 0?le.sessionId:Le(_,h),kinds:le.kinds.join(", ")}),tt(null),lt(null),q(null)}else{let _=on(V);q(_===void 0?h("archives.archiveBatchFailed",{detail:V instanceof Error?V.message:String(V)}):h("archives.archiveActive",{kinds:_.join(", ")}))}}finally{ct.current=!1,je(!1)}}},"performArchive"),ya=t(()=>Lr(yt,Ge),"confirmArchive"),ba=t(async d=>{q(null),_e(null);try{await rs(d.id),ht.current&&_e(h("details.copied"))}catch(k){ht.current&&q(typeof vn(k)=="string"&&String(vn(k)).startsWith("copy.")?h(String(vn(k))):Ae(k))}},"copyId"),Fn=(0,l.useMemo)(()=>Er(Tt,D,ke,h,ge?be.archivedSessionIds:void 0),[Tt,D,ke,h,ge,be.archivedSessionIds]);(0,l.useEffect)(()=>{if(W)return;let d=!1;return A().then(k=>{d||de(Object.fromEntries(k.items.map(V=>[V.sessionId,V.createdAt])))}).catch(()=>{d||de({})}),()=>{d=!0}},[A,be.archivedSessionIds,W]),(0,l.useEffect)(()=>{p!=="all"&&!Tt.some(d=>d.key===p)&&w("all")},[Tt,p]);let Ur=!Yn(Ze,Ie),Br=Fn.filter(d=>p==="all"||p===d.key).map(d=>({...d,sessions:d.sessions.filter(k=>(!he||_t.has(k.id))&&is(k.updatedAt,Ze,Ie))})).filter(d=>d.sessions.length),Hn=Pe==="content"&&!Ur,Zt=j(Br.flatMap(d=>d.sessions.map(k=>k.id)),wt,Hn,Dt??J),Wn=new Map(Zt.items.map(d=>[d.sessionId,d])),at=L(xe,ge?be.archivedSessionIds:[]),Fr=wt.trim().toLocaleLowerCase(),Jt=Br.map(d=>({...d,sessions:d.sessions.filter(k=>!Fr||Le(k,h).toLocaleLowerCase().includes(Fr)||Wn.has(k.id))})).filter(d=>d.sessions.length),Hr=Q?Jt.flatMap(d=>d.sessions).filter(d=>nr(d,{days:Number($e),favorites:_t,currentId:pt(et),pending:Un.pending})).map(d=>d.id):[],Qt=(0,l.useMemo)(()=>wr(Jt),[Jt]),qn=(0,l.useMemo)(()=>new Set(we),[we]),wa=(0,l.useMemo)(()=>{let d=new Set(be.archivedSessionIds);return Pn.reduce((k,V)=>k+(d.has(V)?1:0),0)},[Pn,be.archivedSessionIds]),Vn=Qt.filter(d=>qn.has(d)).length,Sa=Qt.length>0&&Vn===Qt.length;(0,l.useEffect)(()=>{Te(d=>Sr(d,gn))},[gn]);let xa=t((d,k)=>{Te(V=>Dn(V,[d],k))},"toggleSessionSelection"),ka=t(d=>{Te(k=>Dn(k,Qt,d))},"toggleVisibleSelection"),Ca=t(d=>{W||oe.current.has(d)||(oe.current.add(d),Ue(new Set(oe.current)),q(null),_e(null),m(d).catch(k=>{q(rr(k,h))}).finally(()=>{oe.current.delete(d),Ue(new Set(oe.current))}))},"onUnarchive"),Wr=t(async d=>{if(!W){if(vt){let k=Vt(be.archivedSessionIds,be.items,d),V=await pn("restore",k);return V&&{unarchivedSessionIds:V.succeeded}}je(!0),q(null),_e(null);try{let k=await C(d);return k.unarchivedSessionIds.length>0&&_e(h("archives.restoreSuccess",{n:k.unarchivedSessionIds.length})),k.failures&&k.failures.length>0&&q(an(k.failures,h,rr)),k}catch(k){q(h("archives.restoreBatchFailed",{detail:k instanceof Error?k.message:String(k)}))}finally{je(!1)}}},"onBatchUnarchive"),Ea=t(async()=>{if(we.length===0)return;let d=await Wr({scope:"sessions",sessionIds:we});if(d!==void 0){let k=new Set(d.unarchivedSessionIds);Te(V=>V.filter(le=>!k.has(le)))}},"onSelectedUnarchive"),qr=t(()=>{W||At(null)},"closeDelete");(0,l.useEffect)(()=>{if(ve===null)return;let d=t(k=>{k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),"stopImmediatePropagation"in k&&typeof k.stopImmediatePropagation=="function"&&k.stopImmediatePropagation(),W||At(null))},"onKeyDown");return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[ve,W]);let Ia=t(async()=>{if(W||Kt.current||ve===null)return;if(ve.kind!=="batch"){Kt.current=!0,je(!0),q(null),_e(null);try{await f(ve.session.id),At(null)}catch(k){q(kn(k,h))}finally{Kt.current=!1,je(!1)}return}if(St.current||ye.current||oe.current.size>0)return;let{target:d}=ve;if(d.scope==="sessions"&&Vt(be.archivedSessionIds,be.items,d).length===0){At(null);return}St.current=!0,je(!0),q(null),_e(null),un(null),Mn(null);try{let k=await N(d),V=xr(k,h);V.kind==="error"?q(V.message):_e(V.message);let le=new Set([...k.deletedSessionIds,...k.skippedSessionIds]);hn(ce=>ce.filter(He=>!le.has(He))),Te(ce=>ce.filter(He=>!le.has(He))),Ye(ce=>ce.filter(He=>!le.has(He)));let _=k.failures.map(ce=>ce.sessionId);Ln.current=_.length>0?{kind:"delete",ids:_,idle:!1}:null,un({requested:k.requestedSessionIds,succeeded:k.deletedSessionIds,skipped:k.skippedSessionIds,failures:k.failures,remaining:_,refreshError:"refreshError"in k&&typeof k.refreshError=="string"?k.refreshError:null,kind:"delete",tab:ot}),At(null)}catch(k){q(kn(k,h))}finally{St.current=!1,je(!1)}},"confirmDelete"),xt=ve?.kind==="batch"?ve.target.scope:null,Aa=xt==="ungrouped"?h("archives.deleteUngroupedTitle"):xt==="workspace"?h("archives.deleteProjectTitle",{name:ve?.kind==="batch"?ve.title:""}):h(xt==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),Vr=ve===null?void 0:xt==="ungrouped"?h("archives.deleteUngroupedDesc",{n:ve.kind==="batch"?ve.count:0}):xt==="workspace"?h("archives.deleteProjectDesc",{name:ve?.kind==="batch"?ve.title:"",n:ve.kind==="batch"?ve.count:0}):xt==="sessions"?h("archives.deleteSelectedDesc",{n:ve.kind==="batch"?ve.count:0}):h("deleteSession.desc",{name:Le(ve.kind==="session"?ve.session:{},h)}),Ra=h(xt==="ungrouped"?"archives.deleteUngroupedConfirm":xt==="workspace"?"archives.deleteProjectConfirm":xt==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:Zs+Xs+ea+ta+na}),(0,a.jsxs)("div",{className:"dsham_settingsHeader",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"dsham_settingsTitleRow",children:[(0,a.jsx)("h2",{children:h("archives.title")}),(0,a.jsxs)("div",{className:"dsham_settingsLinks",children:[(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.viewProject"),icon:(0,a.jsx)(ze,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:h("archives.viewProject")}),(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.feedback"),icon:(0,a.jsx)(Lt,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:h("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:h("archives.description")})]}),l.createElement("div",v(W||Oe.size>0,(0,a.jsx)(c.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:ot==="unarchived"?"unarchived":"archived",onChange:t(d=>va(d==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconArchiveOutlineMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.archived")})]}),id:"dsham-tab-archived",panelId:"dsham-archive-panel"},{value:"unarchived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconFolderCloseMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.unarchived")})]}),id:"dsham-tab-unarchived",panelId:"dsham-archive-panel"}]})))]}),(0,a.jsxs)("div",{id:"dsham-archive-panel",role:"region","aria-label":h(ot==="unarchived"?"archives.tab.unarchived":"archives.tab.archived"),children:[(0,a.jsx)("div",{className:"dsham_settingsToolbar",children:(0,a.jsxs)("div",{className:"dsham_settingsSearch",children:[(0,a.jsx)(jn,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:he?"favorites":"all",options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:t(d=>typeof Me=="function"&&Me(d==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),(0,a.jsx)(jn,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:Pe,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}],onChange:t(d=>typeof Be=="function"&&Be(d),"onChange"),"aria-label":h("discovery.scope")}),(0,a.jsx)(c.Input,{id:"dsham-search-input",className:"dsham_searchField",type:"search",icon:(0,a.jsx)(c.IconSearchOutlineMedium,{size:16,"aria-hidden":!0}),autoComplete:"off",spellCheck:!1,maxLength:200,value:wt,onChange:t(d=>Bt(d.target.value),"onChange"),placeholder:h(Hn?"discovery.searchPlaceholder":ge?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(Hn?"discovery.searchPlaceholder":ge?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)(ra,{id:"dsham-sort-filter",t:h,disabled:W,favoritesOnly:he,setFavoritesOnly:Me,favoriteBusy:W||O||!Q,sortBy:!ge&&D==="archived"?"updated":D,setSortBy:ae,options:[...ge?[{value:"archived",label:h("archives.sortArchived")}]:[],{value:"updated",label:h("archives.sortUpdated")},{value:"created",label:h("archives.sortCreated")},{value:"alphabetical",label:h("archives.sortAlphabetical")}]}),(0,a.jsx)(jn,{id:"dsham-project-filter",className:"dsham_projectFilter",value:p,title:p==="all"?h("archives.allProjects"):Fn.find(d=>d.key===p)?.title??p,options:[{value:"all",label:h("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:h("archives.allProjects")},...Fn.map(d=>({value:d.key,label:d.title,title:d.title}))],onChange:w,"aria-label":h("archives.projectFilter")}),l.createElement(P,{t:h,from:Ze,to:Ie,onFrom:Ne,onTo:ue,invalid:Ur,onClear:t(()=>{Ne(""),ue("")},"onClear")})]})}),l.createElement("style",null,cs),l.createElement(F,{state:Zt,t:h}),vt&&(0,a.jsx)(S,{t:h,archived:ge,busy:W||O||Oe.size>0,ready:Q,days:$e,onDays:Fe,count:Hr.length,onPreview:t(()=>{It(Hr),Nt(!0)},"onPreview"),progress:Je,result:Tr?.tab===ot?Tr:null,onRetry:t(()=>{let d=Ln.current;d&&(d.kind==="delete"?Rt({kind:"batch",target:{scope:"sessions",sessionIds:d.ids},count:d.ids.length}):pn(d.kind,d.ids,{idle:d.idle,retry:!0}))},"onRetry"),undoCount:wa,onUndo:t(()=>pn("undo",Pn,{retry:!0}),"onUndo"),onReload:ha,orphanCount:Dr?.count??0,cacheCount:Nr.diagnosis.count,cacheRepair:Nr,onRebuildCaches:t(()=>zr(),"onRebuildCaches"),onRetryCaches:t(()=>zr(!0),"onRetryCaches"),onReloadCaches:t(async()=>{try{await ft?.(),await st.current?.load(),(st.current?.snapshot().diagnosis.count??0)===0&&st.current?.dismiss()}catch(d){ht.current&&q(Ae(d))}},"onReloadCaches"),onDismissCaches:t(()=>st.current?.dismiss(),"onDismissCaches"),orphanSizeBytes:Dr?.totalSizeBytes??0,orphanCleaning:Or,onCleanOrphans:fa}),Tt.length>0&&(0,a.jsx)(vr,{selectedCount:we.length,hiddenCount:we.length-Vn,allVisibleSelected:Sa,selectedVisibleCount:Vn,visibleCount:Qt.length,busy:W,t:h,onToggle:ka,onClear:t(()=>Te([]),"onClear"),onArchive:ge?void 0:()=>It([...we]),onRestore:Ea,onDelete:t(()=>Rt({kind:"batch",target:{scope:"sessions",sessionIds:we},count:we.length}),"onDelete")}),Tt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(ge?"archives.empty":"archives.emptyUnarchived")}):Jt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:Zt.status==="loading"||Zt.status==="error"||Zt.failures.length?null:h("archives.emptyFiltered")}):Jt.map(d=>{let k=ia(d.key),V=Tt.find(_=>_.key===d.key)?.sessions.map(_=>_.id)??[],le=ge?Vt(be.archivedSessionIds,be.items,k).length:V.length;return(0,a.jsxs)("section",{className:"dsham_settingsGroup",children:[(0,a.jsxs)("div",{className:"dsham_settingsGroupHeading",children:[(0,a.jsx)("h3",{className:"dsham_settingsGroupTitle",children:(0,a.jsxs)("button",{type:"button",className:"dsham_groupToggle","aria-expanded":!rt.has(d.key),"aria-controls":"dsham-group-"+encodeURIComponent(d.key),onClick:t(()=>ut(_=>{let ce=new Set(_);return ce.has(d.key)?ce.delete(d.key):ce.add(d.key),ce}),"onClick"),children:[(0,a.jsx)(rt.has(d.key)?c.IconChevronRightOutlineMedium:c.IconChevronDownOutlineMedium,{}),(0,a.jsx)(c.IconFolderOpenOutlineMedium,{}),(0,a.jsx)("span",{children:d.title})]})}),(0,a.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,a.jsx)("span",{className:"dsham_settingsCount",children:h("archives.sessionCount",{n:d.sessions.length})}),(0,a.jsx)(aa,{group:d,busy:W,onArchive:ge?void 0:()=>It(V,d),onRestore:t(()=>Wr(k),"onRestore"),onDelete:t(()=>Rt({kind:"batch",target:k,title:d.title,count:le}),"onDelete"),t:h})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(d.key),hidden:rt.has(d.key)||void 0,children:!rt.has(d.key)&&d.sessions.map(_=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":qn.has(_.id),children:[(0,a.jsx)(yr,{checked:qn.has(_.id),disabled:W,label:h("archives.selectSession",{name:Le(_,h)}),onChange:t(ce=>xa(_.id,ce.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:Le(_,h),"aria-label":h("archives.openSession")+h("common.separator")+Le(_,h),disabled:W||Oe.has(_.id),onClick:t(()=>mn(_),"onClick"),children:Le(_,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[Ys(_.updatedAt,h)]}),Wn.has(_.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:W,title:h(ge?"discovery.preview":"archives.openSession"),onClick:t(()=>ge?at.open(_,wt):mn(_),"onClick")},l.createElement(R,{text:Wn.get(_.id)?.snippet??"",query:wt}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof $t=="function"&&E({variant:"outline",className:"dsham_iconAction"+(_t.has(_.id)?" dsham_favoriteOn":""),title:h(_t.has(_.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":_t.has(_.id),"aria-label":h(_t.has(_.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+Le(_,h),disabled:W||O||!Q,onClick:t(()=>pa(_.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:_t.has(_.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:"M8 1.75l1.934 3.918 4.324.628-3.129 3.05.738 4.306L8 11.618l-3.867 2.034.738-4.306-3.129-3.05 4.324-.628L8 1.75z"})})}),E({variant:"outline",className:"dsham_iconAction",title:h(ge?"archives.restore":"archives.archiveSelected"),"aria-label":h(ge?"archives.restore":"archives.archiveSelected"),disabled:W||Oe.has(_.id),onClick:t(()=>ge?Ca(_.id):Lr([_.id]),"onClick"),icon:(0,a.jsx)(ge?c.IconRefreshOutlineMedium:c.IconArchiveOutlineMedium,{size:16})}),ge&&(0,a.jsx)(sa,{busy:W||Oe.has(_.id),t:h,title:Le(_,h),onCopyId:t(()=>ba(_),"onCopyId"),onPreview:typeof xe=="function"?()=>at.open(_,wt):void 0,onRestoreOpen:t(()=>mn(_,!0),"onRestoreOpen"),onDelete:t(()=>Rt({kind:"session",session:_}),"onDelete")})]})]},_.id))})]},d.key)}),l.createElement(x,{width:900,open:at.target!==null,onClose:at.close,title:at.target?Le(at.target.session,h):h("discovery.preview"),footer:b({variant:"primary",disabled:W,onClick:t(()=>{if(at.target){let d=at.target.session;return at.close(),mn(d)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(Ce,{preview:at,t:h,MarkdownText:c.MarkdownText})}),yt===null&&nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt}),Yt!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:Yt}),(0,a.jsx)(x,{open:yt!==null,onClose:dn,title:h("archives.archiveTitle",{n:yt?.length??0}),description:Gt===null?h("archives.archiveSelectedDesc"):h(Gt.key===ln?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:Gt.title,n:yt?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[b({disabled:W,onClick:dn,children:h("cancel")}),b({variant:"primary",disabled:W||!yt?.length,onClick:ya,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[vt&&(0,a.jsx)("p",{children:h(Ge?"organizer.idleConfirm":"organizer.manualConfirm")}),vt&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(yt??[]).map(d=>(0,a.jsxs)("label",{children:[(0,a.jsx)($n,{checked:!0,disabled:W,label:Le(et.byId[d]??{id:d},h),onChange:t(()=>tt(k=>(k??[]).filter(V=>V!==d)),"onChange")}),Le(et.byId[d]??{id:d},h)]},d))}),Je&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:Je.done,max:Math.max(1,Je.total)}),h("organizer.progressCount",{done:Je.done,total:Je.total})]}),nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt})]})}),(0,a.jsx)(x,{open:Ke!==null,onClose:t(()=>{W||(bt(null),q(null))},"onClose"),title:h("archiveActive.title"),...Ke===null?{}:{description:h("archiveActive.desc",{name:Ke.title,kinds:Ke.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[b({disabled:W,onClick:t(()=>{W||(bt(null),q(null))},"onClick"),children:h("cancel")}),b({danger:!0,disabled:W,onClick:t(async()=>{if(!(ct.current||W||Ke===null||typeof s!="function")){ct.current=!0,je(!0),q(null);try{await s(Ke.sessionId,{stopActivity:!0}),Te(d=>d.filter(k=>Ke===null||k!==Ke.sessionId)),Et("archived"),_e(h("archives.archiveSuccess",{n:1})),bt(null)}catch(d){q(d instanceof Error?d.message:String(d))}finally{ct.current=!1,je(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt})}),(0,a.jsx)(x,{open:ve!==null,onClose:qr,title:Aa,...Vr===void 0?{}:{description:Vr},footer:(0,a.jsxs)(a.Fragment,{children:[b({disabled:W,onClick:qr,children:h("cancel")}),b({danger:!0,disabled:W,onClick:Ia,children:Ra})]}),children:(0,a.jsxs)(a.Fragment,{children:[W&&(0,a.jsxs)("div",{role:"status",children:[ve?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),Je&&(0,a.jsx)("progress",{value:Je.done,max:Math.max(1,Je.total),"aria-label":h("organizer.progress")}),Je&&h("organizer.progressCount",{done:Je.done,total:Je.total})]}),nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt})]})})]})]})}t(Ut,"ArchivedSessionsSection");function sn(n){var s,o,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var m=n.length;for(s=0;s<m;s++)n[s]&&(o=sn(n[s]))&&(u&&(u+=" "),u+=o)}else for(o in n)n[o]&&(u&&(u+=" "),u+=o);return u}t(sn,"r");function kt(...n){for(var s,o,u=0,m="",f=arguments.length;u<f;u++)(s=arguments[u])&&(o=sn(s))&&(m&&(m+=" "),m+=o);return m}t(kt,"clsx");let qt="Ungrouped";function G(n,s=qt){if(n===void 0||n==="")return s;let o=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return o!==void 0&&o!==""?o:n}t(G,"workspaceLabel");function fe(n,s){return s.updatedAt!==n.updatedAt?s.updatedAt-n.updatedAt:n.id<s.id?-1:1}t(fe,"byRecency");function De(n,s,o,u){return n.origin!=="subagent"&&(!o.has(n.id)||u===!0)&&(!n.blank||n.id===s)}t(De,"sessionVisible");function Ct(n){let s=n instanceof Error?n.message:String(n);return s.includes("UNKNOWN_SESSION")||s.includes("no such session")}t(Ct,"isUnknownSessionError");function kn(n,s){if(Ct(n))return s("deleteSession.unknown");let o=n instanceof Error?n.message:String(n);return s("deleteSession.failed",{detail:o})}t(kn,"formatDeleteError");function rr(n,s){if(Ct(n))return s("archives.unarchiveUnknown");let o=n instanceof Error?n.message:String(n);return s("archives.unarchiveFailed",{detail:o})}t(rr,"formatUnarchiveError");function an(n,s,o=sr){return n.map(u=>u.sessionId+s("common.separator")+o(new Error(u.message),s)).join(`
|
|
22
|
-
`)}t(an,"formatBatchFailures");function sr(n,s){if(Ct(n))return s("archives.archiveUnknown");let o=n instanceof Error?n.message:String(n);return s("archives.archiveFailed",{detail:o})}t(sr,"formatArchiveError");function on(n){if(n===null||typeof n!="object")return;let s=ee(n),o=s.rpcError!==null&&typeof s.rpcError=="object"?ee(s.rpcError):void 0,u=s.name==="WorkspaceActiveSessionError"?s.activity:void 0,m=o?.details,f=s.name==="WorkspaceArchiveError"&&o?.code==="workspace/session-active"&&m!==null&&typeof m=="object"?ee(m).activity:void 0,C=Array.isArray(u)?u:Array.isArray(f)?f:void 0;if(C===void 0)return;let N=C.flatMap(A=>{if(A===null||typeof A!="object")return[];let B=ee(A).kind;return typeof B=="string"&&B.length>0?[B]:[]});return N.length>0?N:void 0}t(on,"activeSessionActivity");function ar(n){let s=on(n);if(s===void 0||n===null||typeof n!="object")return;let o=ee(n),u=o.rpcError!==null&&typeof o.rpcError=="object"?ee(o.rpcError).details:void 0,m=u!==null&&typeof u=="object"?ee(u).sessionId:void 0,f=typeof o.sessionId=="string"?o.sessionId:typeof m=="string"?m:void 0;return f===void 0?void 0:{sessionId:f,kinds:s}}t(ar,"activeSessionRefusal");function ir(n,s){let o=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(s);if(o===null)return;let u=o[1].split(", ").filter(m=>m.length>0);return u.length>0?{sessionId:n,kinds:u}:void 0}t(ir,"activeArchiveFromMessage");function Ls(n,s){let o=n instanceof Error?n.message:String(n);return s("archives.forkFailed",{detail:o})}t(Ls,"formatForkError");function Cn(n){return n.blank?"New Session":n.displayTitle}t(Cn,"sessionTitle");function or(n,s,o,u,m,f,C){let N=[...f];return C==="recency"&&N.sort(fe),{key:n,workspaceId:s,cwd:o,createdAt:u,label:m,sessions:N}}t(or,"buildGroup");function Us(n,s){let o=new Map(n.map(f=>[f.id,f])),u=new Set,m=[];for(let f of s){let C=o.get(f);C===void 0||u.has(f)||(m.push(C),u.add(f))}for(let f of[...n].sort(fe))u.has(f.id)||m.push(f);return m}t(Us,"orderedUngrouped");function lr(n,s,o,u,m){let f=[],C=new Set;for(let A of s){let B=[];for(let T of A.sessionIds){let z=n.byId[T];z!==void 0&&(C.add(T),De(z,pt(n),o,m)&&B.push(z))}f.push(or(A.workspaceId,A.workspaceId,A.path,Date.parse(A.createdAt),A.title,B,"account"))}let N=n.ids.map(A=>n.byId[A]).filter(A=>A!==void 0&&!C.has(A.id)&&De(A,pt(n),o,m));return N.length>0&&f.push(or("",void 0,void 0,void 0,qt,u===void 0?N:Us(N,u),u===void 0?"recency":"account")),f}t(lr,"groupByWorkspace");function En(n,s,o){if(!n||o.has(n))return!1;let u=s?.[n];return!(u===void 0||u.origin==="subagent"||u.blank)}t(En,"isWorkspaceTaskCandidate");function cr(n){let s=n?.closest("[data-row-key]")??null;if(s===null)return null;let o=s.getAttribute("data-row-key")??"";if(!o.startsWith("workspace:"))return null;let u=o.slice(10);if(!u)return null;let m=s.querySelector(".title")??s.querySelector("[class*='title']");return{workspaceId:u,title:m?.textContent?.trim()||u}}t(cr,"workspaceMenuTriggerFrom");function In(n,s=!0){let o=(n.textContent??"").toLowerCase();return o.includes("\u5220\u9664\u5DE5\u4F5C\u533A")||o.includes("delete workspace")||o.includes("\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435")?!0:s&&/(?:^|[_\s-])danger(?:$|[_\s-])/i.test(n.className)}t(In,"isWorkspaceDeleteMenuItem");function Bs(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}t(Bs,"visiblePendingKind");function dr(n,s){let o=s.get(n.id),u=o===void 0?n.pendingInteraction:o.kind;return Bs(u)}t(dr,"pendingInteractionForSession");let An=new Map,Rn=new Set,Fs=new Map;function Hs(n){return n(An)}t(Hs,"useEmptySessionPendingInteraction");function Ws(n){return n(Fs)}t(Ws,"useEmptySessionStatus");function ur(n){return n instanceof Map||n==null?{pending:n??An,completed:Rn}:{pending:n.pending??An,completed:n.completed??Rn}}t(ur,"pendingFacts");function qs(n){let s=new Map,o=new Set;if(n instanceof Map)for(let[u,m]of n)m?.pendingInteraction!==void 0&&s.set(u,m.pendingInteraction),m?.completionUnread===!0&&o.add(u);return{pending:s,completed:o}}t(qs,"factsFromSessionStatus");function Vs(n,s,o){let u=n(f=>f),m=s(f=>f);return o?qs(m):{pending:u,completed:Rn}}t(Vs,"useSessionUiFacts");function hr(n,s,o,u){let m=ur(u),f=dr(n,m.pending);return{id:n.id,title:Cn(n),blank:n.blank,running:n.running,runningSubagentCount:s.get(n.id)?.runningCount??0,completed:n.completed===!0||m.completed.has(n.id),updatedAt:n.updatedAt,archived:o.has(n.id),...f===void 0?{}:{pendingInteraction:f}}}t(hr,"sessionNode");function $s(n,s,o,u,m){let f=new Set(o),C=new Set(m.expandedGroups),N=Qe(n.byId),A=pt(n),B=A===void 0?void 0:s.find(z=>z.sessionIds.includes(A))?.workspaceId??"",T=[];for(let z of lr(n,s,f,m.ungroupedOrder,m.showArchived)){let H=C.has(z.key);T.push({key:z.key,workspaceId:z.workspaceId,cwd:z.cwd,createdAt:z.createdAt,label:z.label,sessionCount:z.sessions.length,expanded:H,containsCurrent:z.key===B,sessions:H?z.sessions.map(h=>hr(h,N,f,u)):[]})}return T}t($s,"deriveGroups");function Gs(n,s,o,u){let m=new Set(s),f=Qe(n.byId),C=[];for(let N of n.ids){let A=n.byId[N];A===void 0||!De(A,pt(n),m,u)||C.push(A)}return C.sort(fe),C.map(N=>hr(N,f,m,o))}t(Gs,"deriveFlat");function Ks(n,s,o,u,m,f,C,N,A=qt){let B=o.trim().toLowerCase();if(B==="")return{items:[],hasMore:!1};let T=new Set(u),z=Qe(n.byId),H=new Map;for(let J of s)for(let xe of J.sessionIds)H.has(xe)||H.set(xe,J.title);let h=t(J=>H.get(J.id)??G(J.cwd,A),"labelOf"),me=new Map;for(let J of f.items)me.has(J.sessionId)||me.set(J.sessionId,J);let Re=[];for(let J of n.ids){let xe=n.byId[J];xe===void 0||xe.blank||!De(xe,pt(n),T,N)||(Cn(xe).toLowerCase().includes(B)||h(xe).toLowerCase().includes(B))&&Re.push(xe)}Re.sort(fe);let ie=[],Xe=new Set,ft=t(J=>{Xe.has(J.id)||(Xe.add(J.id),ie.push(J))},"include");for(let J of Re)ft(J);for(let J of f.items){let xe=n.byId[J.sessionId];xe!==void 0&&!xe.blank&&De(xe,pt(n),T,N)&&ft(xe)}let Dt=ur(m);return{items:ie.slice(0,C).map(J=>{let xe=me.get(J.id),it=dr(J,Dt.pending);return{id:J.id,title:Cn(J),workspace:h(J),running:J.running,runningSubagentCount:z.get(J.id)?.runningCount??0,archived:T.has(J.id),...it===void 0?{}:{pendingInteraction:it},completed:J.completed===!0||Dt.completed.has(J.id),...xe===void 0?{}:{snippet:xe.snippet}}}),hasMore:f.hasMore||ie.length>C}}t(Ks,"deriveSearchResults");function ci(n,s){let f=Math.max(0,s-n);return f<6e4?{unit:"now",n:0}:f<36e5?{unit:"minutes",n:Math.floor(f/6e4)}:f<864e5?{unit:"hours",n:Math.floor(f/36e5)}:f<30*864e5?{unit:"days",n:Math.floor(f/864e5)}:f<365*864e5?{unit:"months",n:Math.floor(f/(30*864e5))}:{unit:"years",n:Math.floor(f/(365*864e5))}}t(ci,"relativeTime");let pr={listeners:new Set,request(n){for(let s of this.listeners)s(n)},subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}};function Le(n,s){return n.blank?s("session.new"):n.title??n.displayTitle??""}t(Le,"displayTitle");function Ys(n,s){let o=new Date(n),u=`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}`;return s("archives.timestamp",{date:s("date.ymd",{y:o.getFullYear(),m:o.getMonth()+1,d:o.getDate()}),time:u})}t(Ys,"archiveTimeLabel");let Zs=[".dsham_archiveTabsLocked{opacity:.5}",".dsham_archiveTabs{display:grid!important;box-sizing:border-box!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:2px!important;border:0!important;border-radius:var(--dsw-radius-sm,8px)!important;box-shadow:inset 0 0 0 .5px var(--dsw-alias-border-l2)!important;background:var(--dsw-alias-bg-layer-1)!important}",'.dsham_archiveTabs>span[aria-hidden="true"],.dsham_archiveTabs>[class*="indicator"]{inset:2px auto 2px 2px!important;width:calc((100% - 4px)/2)!important;border-radius:6px!important;border:0.5px solid var(--dsw-alias-border-l3,rgba(255,255,255,.12))!important;background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.08))!important;box-shadow:none!important}',".dsham_archiveTabs [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:28px!important;padding:0 12px!important;border-radius:6px!important;font-size:13px!important;line-height:20px!important;color:var(--dsw-alias-label-secondary)!important;text-align:center!important;box-sizing:border-box!important;transition:color 150ms ease!important}",".dsham_archiveTabs [role=tab]:hover{color:var(--dsw-alias-label-primary)!important}",'.dsham_archiveTabs [role=tab][aria-selected="true"]{color:var(--dsw-alias-label-primary)!important;font-weight:600!important}',".dsham_tabLabel{display:inline-flex;align-items:center;justify-content:center;gap:6px}",".dsham_tabLabel svg{flex:none;display:block}"].join(""),gt="data-dsham-nav-icon",Js='[role="dialog"] nav button',_n=[`[${gt}] > svg { display: none !important; }`,`[${gt}]::before {`," content: '';"," flex: none;"," width: 16px;"," height: 16px;"," background-color: currentColor;",' -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%202.5H2.5C1.94772%202.5%201.5%202.94772%201.5%203.5V4.5C1.5%205.05228%201.94772%205.5%202.5%205.5H13.5C14.0523%205.5%2014.5%205.05228%2014.5%204.5V3.5C14.5%202.94772%2014.0523%202.5%2013.5%202.5Z%22%2F%3E%3Cpath%20d%3D%22M2.5%205.5V13.5C2.5%2013.7652%202.60536%2014.0196%202.79289%2014.2071C2.98043%2014.3946%203.23478%2014.5%203.5%2014.5H12.5C12.7652%2014.5%2013.0196%2014.3946%2013.2071%2014.2071C13.3946%2014.0196%2013.5%2013.7652%2013.5%2013.5V5.5%22%2F%3E%3Cpath%20d%3D%22M6.5%209.5H9.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;',' mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%202.5H2.5C1.94772%202.5%201.5%202.94772%201.5%203.5V4.5C1.5%205.05228%201.94772%205.5%202.5%205.5H13.5C14.0523%205.5%2014.5%205.05228%2014.5%204.5V3.5C14.5%202.94772%2014.0523%202.5%2013.5%202.5Z%22%2F%3E%3Cpath%20d%3D%22M2.5%205.5V13.5C2.5%2013.7652%202.60536%2014.0196%202.79289%2014.2071C2.98043%2014.3946%203.23478%2014.5%203.5%2014.5H12.5C12.7652%2014.5%2013.0196%2014.3946%2013.2071%2014.2071C13.3946%2014.0196%2013.5%2013.7652%2013.5%2013.5V5.5%22%2F%3E%3Cpath%20d%3D%22M6.5%209.5H9.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;'," -webkit-mask-repeat: no-repeat;"," mask-repeat: no-repeat;"," -webkit-mask-position: center;"," mask-position: center;"," -webkit-mask-size: 16px 16px;"," mask-size: 16px 16px;","}"].join(`
|
|
23
|
-
`);function Qs(n,s){let o=String(s??"").trim();return o.length>0&&String(n??"").trim()===o}t(Qs,"isOwnSettingsNavRow");function Tn(n,s){for(let o of n){if(o.type==="characterData"){let u=o.target.parentElement;if(u!==null&&u.closest(s)!==null)return!0;continue}for(let u of o.addedNodes){if(u.nodeType!==1)continue;let m=u;if(m.matches(s)||m.querySelector(s)!==null||m.closest(s)!==null)return!0}}return!1}t(Tn,"mutationTouches");function mr(n,s){return Qs(n.textContent,s)?n.getAttribute(gt)===""?!1:(n.setAttribute(gt,""),!0):n.hasAttribute(gt)?(n.removeAttribute(gt),!0):!1}t(mr,"applySettingsNavIcon");function gr(n){return n.hasAttribute(gt)?(n.removeAttribute(gt),!0):!1}t(gr,"restoreSettingsNavIcon");function fr(n){typeof document>"u"||typeof MutationObserver>"u"||n.effect(()=>{let s="dsham-nav-icon-style",o=document.getElementById(s);o===null?(o=document.createElement("style"),o.id=s,o.textContent=_n,(document.head??document.documentElement).append(o)):o.textContent!==_n&&(o.textContent=_n);let u=!1,m=!1,f=t(()=>{if(m=!1,u)return;let A=n.locale.bind(Ve)("archived.badge");for(let B of document.querySelectorAll(Js))mr(B,A)},"sync"),C=t(()=>{m||u||(m=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(f):setTimeout(f,16))},"schedule");f();let N=new MutationObserver(A=>{Tn(A,'[role="dialog"] nav')&&C()});return N.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{u=!0,N.disconnect();for(let A of document.querySelectorAll(`[${gt}]`))gr(A);o?.remove()}},"archive-manager: settings nav icon")}t(fr,"installSettingsNavIcon");let Xs=[".dsham_settings{container-type:inline-size;min-width:0;box-sizing:border-box;width:100%;padding:0 0 32px;color:var(--dsw-alias-label-primary)}",".dsham_settingsHeader{display:flex;flex-direction:column;align-items:stretch;gap:16px;margin-bottom:16px}",".dsham_settings h2{margin:0;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.4px;white-space:nowrap}",".dsham_settingsIntro{margin:12px 0 0;max-width:42em;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:22px}",".dsham_settingsToolbar{display:flex;align-items:center;gap:8px;margin-bottom:16px;width:100%;min-width:0}",".dsham_settingsSearch{display:flex;align-items:center;gap:8px;min-width:0;width:100%;flex-wrap:nowrap}","@container(max-width:520px){.dsham_settingsSearch{flex-wrap:wrap}}",".dsham_settingsSearch .dsham_searchField{flex:1 1 0;min-width:120px;width:auto;box-sizing:border-box}",".dsham_viewSortContainer{flex:0 0 auto;position:relative;box-sizing:border-box}",".dsham_viewSortBtn{height:32px!important;padding:0 8px!important;font-size:13px!important;box-sizing:border-box}",".dsham_viewSortBtn.has-filter{border-color:var(--dsw-alias-state-business-primary)!important;color:var(--dsw-alias-state-business-primary)!important}",".dsham_settingsFilter{display:inline-flex;position:relative}",".dsham_settingsSearch .dsham_projectFilter{flex:0 0 auto;max-width:120px;min-width:0;box-sizing:border-box}",".dsham_settingsSearch .dsham_projectFilter > span{display:inline-block;max-width:100%;box-sizing:border-box}",".dsham_settingsSearch .dsham_projectFilter .dsham_menuSelectBtn{display:inline-flex!important;width:100%;max-width:120px;padding:0 8px;box-sizing:border-box;overflow:hidden}",".dsham_settingsSearch .dsham_projectFilter .dsham_selectLabel{flex:1 1 auto;min-width:0;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}",".dsham_settingsSearch .dsham_dateFilter{flex:0 0 125px;width:125px;min-width:125px;position:relative;box-sizing:border-box}",".dsham_dateRange{width:100%;box-sizing:border-box}",".dsham_dateTrigger{height:32px!important;padding:0 8px!important;gap:5px!important;border:0.5px solid var(--dsw-alias-border-l2)!important;border-radius:var(--dsw-radius-sm,8px)!important;background:var(--dsw-alias-bg-layer-1)!important;box-sizing:border-box}",".dsham_dateTrigger .dsham_dateText{font-size:12px!important;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".dsham_srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;opacity:0;pointer-events:none}",".dsham_menuSelectBtn{display:inline-flex!important;align-items:center;justify-content:space-between;gap:6px;width:auto!important;max-width:100%;min-width:0!important;height:32px!important;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);box-sizing:border-box;font:inherit;font-size:13px;cursor:pointer}",".dsham_selectLabel{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:normal;text-align:left}",".dsham_settingsGroup{margin:0 0 20px}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}",".dsham_settingsGroupTitle{display:flex;align-items:center;gap:8px;min-width:0;margin:0;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}",".dsham_settingsGroupTitle svg{flex:none;color:var(--dsw-alias-label-secondary)}",".dsham_settingsCount{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px}",".dsham_settingsList{display:grid;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill))}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:64px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_settingsRow:last-child{border-bottom:0}",".dsham_settingsContent{min-width:0;flex:1}",".dsham_settingsTitle{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px}",".dsham_settingsActions{display:flex;align-items:center;gap:4px;flex:none}",".dsham_settingsEmpty{padding:28px 8px;color:var(--dsw-alias-label-secondary);text-align:center}",".dsham_settingsError{margin-top:10px;color:var(--dsw-alias-state-error-primary);font-size:12px;white-space:pre-line}","@container(max-width:520px){.dsham_settingsHeader{margin-bottom:16px}.dsham_settingsGroup{margin-bottom:32px}.dsham_settingsRow{padding:10px 12px}.dsham_settingsActions{gap:4px}}"].join(""),ea=".dsham_settingsTitleLink{display:block;max-width:100%;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;font-weight:600;line-height:20px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.dsham_settingsTitleLink:hover:not(:disabled){text-decoration:underline;text-underline-offset:3px}.dsham_settingsTitleLink:disabled{cursor:default;opacity:.6}.dsham_groupToggle{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:4px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsham_groupToggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dsham_settingsRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsRow[data-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsTitleLink:focus-visible,.dsham_groupToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#3b82f6);outline-offset:2px}@container(max-width:400px){.dsham_settingsRow{gap:8px;padding:10px 8px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:11px}}.dsham_settingsGroupMeta{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap}.dsham_settingsStatus{margin-top:10px;color:var(--dsw-alias-label-secondary);font-size:12px}.dsham_checkbox{width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);flex:none}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",ta=".dsham_settingsTitleRow{display:flex;align-items:center;gap:8px 12px;min-width:0;flex-wrap:wrap}.dsham_settingsLinks{display:flex;align-items:center;gap:8px;flex-wrap:wrap}@media(max-width:720px){.dsham_settingsTitleRow{flex-wrap:wrap}}",na=".dsham_settingsSelection{margin:-8px 0 16px;padding:4px 0 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}.dsham_settingsSelectionMain{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;min-height:36px}.dsham_settingsSelectionSummary{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0;max-width:100%}.dsham_settingsSelectionToggle{display:inline-flex;flex:none;white-space:nowrap;align-items:center;gap:12px;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;cursor:pointer}.dsham_settingsSelectionActions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;max-width:100%;margin-left:auto}.dsham_settingsSelectionScope{margin:8px 0 0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow-wrap:anywhere}";function jn({id:n,className:s,value:o,options:u,onChange:m,disabled:f=!1,"aria-label":C,title:N,tabIndex:A,"aria-hidden":B}){let[T,z]=l.useState(!1),H=l.useMemo(()=>u.map(Re=>({id:Re.value,label:Re.label})),[u]),h=u.find(Re=>Re.value===o),me=h?.label??C;return(0,a.jsx)("div",{id:n,tabIndex:A,"aria-hidden":B,className:s===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${s}`,children:(0,a.jsx)(c.Menu,{open:T,onClose:t(()=>z(!1),"onClose"),onSelect:t(Re=>{f||m(Re),z(!1)},"onSelect"),selectedId:o,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":C,"aria-expanded":T,disabled:f,tabIndex:A,"aria-hidden":B,title:N??h?.title??h?.label??C,className:"dsham_menuSelectBtn"+(T?" is-open":""),onClick:t(()=>{f||z(Re=>!Re)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:me}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:T?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:H})})}t(jn,"ArchiveProjectSelect");function ra({id:n,t:s,disabled:o=!1,favoritesOnly:u,setFavoritesOnly:m,favoriteBusy:f=!1,sortBy:C,setSortBy:N,options:A}){let[B,T]=l.useState(!1),z=l.useMemo(()=>{let ie=[];typeof m=="function"&&(ie.push({type:"label",id:"lbl_view_filter",text:s("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),ie.push({id:"filter:all",label:s("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),ie.push({id:"filter:favorites",label:s("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),ie.push({type:"separator",id:"sep_view_filter"})),ie.push({type:"label",id:"lbl_view_sort",text:s("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let Xe of A)ie.push({id:`sort:${Xe.value}`,label:Xe.label});return ie},[s,m,A]),H=t(ie=>{ie.startsWith("filter:")?typeof m=="function"&&!f&&m(ie==="filter:favorites"):ie.startsWith("sort:")&&N(ie.slice(5)),T(!1)},"onSelect"),h=A.find(ie=>ie.value===C),me=u?s("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":s("organizer.allChats")||"\u5168\u90E8\u804A\u5929",Re=`${me} \xB7 ${h?.label??C}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(c.Menu,{open:B,onClose:t(()=>T(!1),"onClose"),onSelect:H,selectedIds:[u?"filter:favorites":"filter:all",`sort:${C}`],align:"end",portal:!0,dense:!0,listClassName:"dsham_viewSortDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":s("archives.viewOptions")||"\u89C6\u56FE\u9009\u9879","aria-expanded":B,disabled:o,title:Re,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(B?" is-open":"")+(u?" has-filter":""),onClick:t(()=>{o||T(ie=>!ie)},"onClick"),children:[(0,a.jsxs)("svg",{viewBox:"0 0 16 16",width:13,height:13,fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none",marginRight:4},children:[(0,a.jsx)("line",{x1:2.5,y1:4.5,x2:13.5,y2:4.5}),(0,a.jsx)("circle",{cx:5,cy:4.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"}),(0,a.jsx)("line",{x1:2.5,y1:11.5,x2:13.5,y2:11.5}),(0,a.jsx)("circle",{cx:11,cy:11.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"})]}),(0,a.jsx)("span",{className:"dsham_selectLabel",children:me}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:11,height:11,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:3,transition:"transform 150ms ease",transform:B?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:z})]})}t(ra,"ArchiveViewSortMenu");function vr({selectedCount:n,hiddenCount:s,allVisibleSelected:o,selectedVisibleCount:u,visibleCount:m,busy:f,t:C,onToggle:N,onClear:A,onRestore:B,onDelete:T,onArchive:z}){let H=n>0;return(0,a.jsxs)("div",{className:"dsham_settingsSelection",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionMain",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionSummary",children:[(0,a.jsxs)("label",{className:"dsham_settingsSelectionToggle",title:C("archives.selectAllFiltered"),children:[(0,a.jsx)(yr,{checked:o,indeterminate:u>0&&!o,disabled:f||m===0,label:C("archives.selectAllFiltered"),onChange:t(h=>N(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:H?C("archives.selectedCount",{n}):C("archives.selectAllFiltered")})]}),H&&E({disabled:f,"aria-label":C("archives.clearSelection"),onClick:A,children:C("archives.clearSelectionShort")})]}),H&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:z?[E({disabled:f,onClick:z,children:C("archives.archiveSelected")})]:[E({disabled:f,"aria-label":C("archives.restoreSelected"),onClick:B,children:C("archives.restore")}),E({disabled:f,className:"dsham_btnDanger","aria-label":C("archives.deleteSelected"),onClick:T,children:C("archives.deleteSelectionShort")})]})]}),s>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:C("archives.selectionHiddenHint",{hidden:s})})]})}t(vr,"ArchiveSelectionToolbar");function yr({checked:n,indeterminate:s=!1,disabled:o=!1,label:u,onChange:m}){return(0,a.jsx)($n,{checked:n,indeterminate:s,disabled:o,label:u,onChange:m})}t(yr,"ArchiveSelectionCheckbox");function br(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:[3.5,8,12.5].map(n=>(0,a.jsx)("circle",{cx:n,cy:8,r:1.15,fill:"none",stroke:"currentColor",strokeWidth:1.5},n))})}t(br,"moreIcon");function sa({busy:n,title:s,t:o,onPreview:u,onRestoreOpen:m,onDelete:f,onCopyId:C}){let[N,A]=(0,l.useState)(!1),B=t(z=>{if(!n){if(A(!1),z==="copyId")return C?.();if(z==="preview")return u?.();if(z==="restoreOpen")return m?.();z==="delete"&&f?.()}},"choose"),T=[...u?[{id:"preview",label:o("discovery.preview"),icon:(0,a.jsx)(c.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"restoreOpen",label:o("archives.restoreOpen"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...C?[{id:"copyId",label:o("details.copyId"),icon:(0,a.jsx)(c.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...f?[{id:"delete",label:o("menu.deleteSession"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(c.Menu,{open:!n&&N,align:"end",portal:!0,dense:!0,items:T,onSelect:B,onClose:t(()=>A(!1),"onClose"),anchor:E({variant:"outline",className:"dsham_iconAction",disabled:n,title:o("archives.moreActions"),"aria-label":o("archives.moreActions")+o("common.separator")+s,"aria-haspopup":"menu","aria-expanded":N&&!n,icon:br(),onClick:t(()=>{n||A(z=>!z)},"onClick")})})}t(sa,"ArchivedSessionMenu");function aa({group:n,busy:s,onArchive:o,onRestore:u,onDelete:m,t:f}){let C=n.key===ln,N=o?[{id:"archive",label:f(C?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(c.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:f(C?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:f(C?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}],[A,B]=(0,l.useState)(!1),T=f(C?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),z=t(H=>{s||(H==="archive"?o?.():H==="restore"?u?.():H==="delete"&&m?.())},"choose");return(0,a.jsx)(c.Menu,{open:!s&&A,align:"end",portal:!0,dense:!0,items:N,onSelect:t(H=>{B(!1),z(H)},"onSelect"),onClose:t(()=>B(!1),"onClose"),anchor:E({variant:"outline",className:"dsham_iconAction",disabled:s,"aria-label":T,"aria-haspopup":"menu","aria-expanded":A&&!s,icon:br(),onClick:t(()=>{s||B(H=>!H)},"onClick")})})}t(aa,"ArchivedGroupActions");let ln="__ungrouped__";function ia(n){return n===ln?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}t(ia,"archivedBatchTargetForGroup");function Vt(n,s,o){let u=[...new Set(n??[])];if(o.scope==="all")return u;if(o.scope==="sessions"){let f=new Set(o.sessionIds??[]);return u.filter(C=>f.has(C))}if(o.scope==="workspace"){let f=new Set(s.find(C=>C.workspaceId===o.workspaceId)?.sessionIds??[]);return u.filter(C=>f.has(C))}let m=new Set(s.flatMap(f=>f.sessionIds));return u.filter(f=>!m.has(f))}t(Vt,"deriveArchivedBatchIds");function wr(n){return[...new Set(n.flatMap(s=>s.sessions.map(o=>o.id)))]}t(wr,"archivedSessionIdsInGroups");function Sr(n,s){let o=new Set(s);return[...new Set(n)].filter(u=>o.has(u))}t(Sr,"pruneArchivedSelection");function Dn(n,s,o){let u=new Set(n);for(let m of s)o?u.add(m):u.delete(m);return[...u]}t(Dn,"toggleArchivedSelection");function xr(n,s){let o=n.deletedSessionIds.length,u=n.skippedSessionIds.length;return n.failures.length>0?{kind:"error",message:s("archives.deletePartial",{deleted:o,skipped:u,failed:n.failures.length,detail:n.failures[0].message})}:u>0&&o>0?{kind:"notice",message:s("archives.deleteSuccessWithSkipped",{deleted:o,skipped:u})}:u>0?{kind:"notice",message:s("archives.deleteSkipped",{n:u})}:{kind:"notice",message:s("archives.deleteSuccess",{n:o})}}t(xr,"archivedDeleteFeedback");function kr(n,s){let o=new Set(s);return Object.values(n).filter(u=>u.origin!=="subagent"&&!u.blank&&!o.has(u.id)).map(u=>u.id)}t(kr,"unarchivedSessionIds");function Cr(n,s,o,u){let m=s.map(N=>({key:N.workspaceId,title:N.title,ids:new Set(N.sessionIds),sessions:[]})),f=[];for(let N of o){let A=n[N];if(A===void 0||A.origin==="subagent")continue;let B=m.find(T=>T.ids?.has(N));(B===void 0?f:B.sessions).push(A)}let C=m.filter(N=>N.sessions.length>0);return f.length>0&&C.push({key:ln,title:u,sessions:f}),C}t(Cr,"deriveArchivedGroups");function Er(n,s,o,u,m=[]){let f=t((T,z)=>String(T).localeCompare(String(z),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),C=new Map;if(Array.isArray(m))for(let T=0;T<m.length;T++)C.set(m[T],T);let N=t(T=>{let z=s==="created"?o[T.id]:T.updatedAt;return typeof z=="number"&&Number.isFinite(z)?z:Number.NEGATIVE_INFINITY},"timestampOf"),A=t((T,z)=>{if(s==="archived"){let H=C.get(T.id)??-1,me=(C.get(z.id)??-1)-H;if(me!==0)return me}if(s!=="alphabetical"){let H=N(z)-N(T);if(Number.isFinite(H)&&H!==0)return H}return f(Le(T,u),Le(z,u))||f(T.id,z.id)},"compareSessions");return n.map(T=>({...T,sessions:[...T.sessions].sort(A)})).sort((T,z)=>{if(s==="archived"){let H=T.sessions[0]?.id,h=z.sessions[0]?.id,me=H!==void 0?C.get(H)??-1:-1,ie=(h!==void 0?C.get(h)??-1:-1)-me;if(ie!==0)return ie}if(s!=="alphabetical"){let H=N(z.sessions[0])-N(T.sessions[0]);if(Number.isFinite(H)&&H!==0)return H}return f(T.title,z.title)||f(T.key,z.key)})}t(Er,"sortArchivedGroups");let Ir={...Ns,...ds,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","sidebar.entry.title":"\u4FA7\u8FB9\u680F\u5165\u53E3","sidebar.entry.desc":"\u5728\u5DE6\u4FA7\u4E3B\u5BFC\u822A\u680F\u663E\u793A\u5F52\u6863\u7BA1\u7406\u5668\u3002\u8BBE\u7F6E\u91CC\u7684\u5165\u53E3\u4E0D\u53D8\u3002","sidebar.entry.toggle":"\u5207\u6362\u4FA7\u8FB9\u680F\u5165\u53E3","update.entry.title":"\u5728\u7EBF\u66F4\u65B0","update.entry.desc":"\u5141\u8BB8\u68C0\u67E5\u5E76\u5728\u7EBF\u5B89\u88C5\u5F52\u6863\u7BA1\u7406\u5668\u7684\u65B0\u7248\u672C\u3002\u5173\u95ED\u540E\u9690\u85CF\u66F4\u65B0\u5165\u53E3\u3002","update.entry.toggle":"\u5207\u6362\u5728\u7EBF\u66F4\u65B0","update.entry.locked":"\u5728\u7EBF\u66F4\u65B0\u5DF2\u88AB\u5BBF\u4E3B\u914D\u7F6E\u9501\u5B9A\u7981\u7528","archives.archiveProject":"\u5F52\u6863\u8BE5\u9879\u76EE\u7684\u5168\u90E8\u804A\u5929","archives.archiveUngrouped":"\u5F52\u6863\u5168\u90E8\u672A\u5206\u7EC4\u804A\u5929","archives.archiveProjectDesc":"\u5C06\u201C{name}\u201D\u4E2D\u5168\u90E8 {n} \u6761\u672A\u5F52\u6863\u4F1A\u8BDD\u5F52\u6863\uFF0C\u4E0D\u53D7\u5F53\u524D\u641C\u7D22\u7B5B\u9009\u5F71\u54CD\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u6062\u590D\u3002","archives.archiveUngroupedDesc":"\u5C06\u5168\u90E8 {n} \u6761\u672A\u5206\u7EC4\u7684\u672A\u5F52\u6863\u4F1A\u8BDD\u5F52\u6863\uFF0C\u4E0D\u53D7\u5F53\u524D\u641C\u7D22\u7B5B\u9009\u5F71\u54CD\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u6062\u590D\u3002","archives.tab.archived":"\u5DF2\u5F52\u6863","archives.tab.unarchived":"\u672A\u5F52\u6863","archives.searchUnarchived":"\u641C\u7D22\u672A\u5F52\u6863\u804A\u5929","archives.emptyUnarchived":"\u6682\u65E0\u672A\u5F52\u6863\u4F1A\u8BDD\u3002","archives.archiveSelected":"\u5F52\u6863","archives.openSession":"\u6253\u5F00","archives.moreActions":"\u66F4\u591A\u64CD\u4F5C","archives.archiveSelectedDesc":"\u5C06\u9009\u4E2D\u7684\u4F1A\u8BDD\u5F52\u6863\uFF0C\u5305\u542B\u5F53\u524D\u7B5B\u9009\u9690\u85CF\u7684\u5DF2\u9009\u9879\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u67E5\u770B\u548C\u6062\u590D\u3002","archives.archiveSuccess":"\u5DF2\u5F52\u6863 {n} \u6761\u4F1A\u8BDD\u3002","archives.archiveBatchFailed":"\u6279\u91CF\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.navigationUnavailable":"\u5F53\u524D\u5BBF\u4E3B\u65E0\u6CD5\u4FDD\u6301\u5F52\u6863\u5BF9\u8BDD\uFF0C\u8BF7\u4F7F\u7528\u201C\u6062\u590D\u5E76\u6253\u5F00\u201D\u3002","archives.sessionNotRetained":"\u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u6216\u6062\u590D\u540E\u518D\u8BD5\u3002","archives.restoreOpen":"\u6062\u590D\u6253\u5F00","archives.selectedCount":"\u5DF2\u9009 {n} \u6761","archives.selectionHiddenHint":"\u542B\u5F53\u524D\u672A\u663E\u793A\u7684 {hidden} \u6761\uFF0C\u4E5F\u5C06\u53C2\u4E0E\u64CD\u4F5C","archives.clearSelectionShort":"\u6E05\u7A7A","archives.restore":"\u6062\u590D","archives.archiveTitle":"\u5F52\u6863 {n} \u4E2A\u804A\u5929\uFF1F","archives.deleteSelectionShort":"\u5220\u9664","archives.clearSelection":"\u6E05\u7A7A\u9009\u62E9","group.ungrouped":"\u672A\u5206\u7EC4","session.new":"\u65B0\u4F1A\u8BDD","section.workspaces":"\u5DE5\u4F5C\u533A","section.sessions":"\u4F1A\u8BDD","viewOptions.label":"\u89C6\u56FE\u9009\u9879","groupBy.label":"\u5206\u7EC4\u65B9\u5F0F","groupBy.workspace":"\u6309\u5DE5\u4F5C\u533A","groupBy.flat":"\u5355\u5217\u8868","orderBy.label":"\u6392\u5E8F\u65B9\u5F0F","orderBy.manual":"\u624B\u52A8\u6392\u5E8F","orderBy.updated":"\u6700\u8FD1\u66F4\u65B0","sessions.expand":"\u5C55\u5F00\u5176\u4F59 {n} \u4E2A\u4F1A\u8BDD","sessions.collapse":"\u6536\u8D77","empty.none":"\u6682\u65E0\u4F1A\u8BDD","workspace.add":"\u6DFB\u52A0\u5DE5\u4F5C\u533A","search.sessions.aria":"\u641C\u7D22\u4F1A\u8BDD","search.placeholder":"\u641C\u7D22\u4F1A\u8BDD\u2026","search.clear":"\u6E05\u9664\u641C\u7D22","search.results.aria":"\u641C\u7D22\u7ED3\u679C","search.pending":"\u6B63\u5728\u641C\u7D22\u4F1A\u8BDD\u5386\u53F2\u2026","search.unavailable":"\u5185\u5BB9\u641C\u7D22\u6682\u4E0D\u53EF\u7528\uFF0C\u4EC5\u663E\u793A\u540D\u79F0\u5339\u914D\u3002","search.noMatches":"\u65E0\u5339\u914D\u4F1A\u8BDD","search.hasMore":"\u4EC5\u663E\u793A\u524D {n} \u6761\u7ED3\u679C\uFF0C\u8BF7\u7F29\u5C0F\u641C\u7D22\u8303\u56F4\u3002","menu.addWorkspace":"\u6DFB\u52A0\u5DE5\u4F5C\u533A\u2026","menu.unarchive":"\u53D6\u6D88\u5F52\u6863","menu.deleteSession":"\u5220\u9664\u4F1A\u8BDD","archived.badge":"\u5F52\u6863\u4F1A\u8BDD","archived.notOpenable":"\u5DF2\u5F52\u6863\uFF0C\u53D6\u6D88\u5F52\u6863\u540E\u53EF\u7EE7\u7EED\u5BF9\u8BDD","archives.title":"\u5F52\u6863\u4F1A\u8BDD","archives.description":"\u7BA1\u7406\u5DF2\u5F52\u6863\u4F1A\u8BDD\uFF0C\u6216\u9009\u62E9\u672A\u5F52\u6863\u4F1A\u8BDD\u8FDB\u884C\u6279\u91CF\u5F52\u6863\u3002","archives.viewProject":"GitHub","archives.feedback":"\u95EE\u9898\u53CD\u9988","archives.empty":"\u6682\u65E0\u5DF2\u5F52\u6863\u4F1A\u8BDD","archives.emptyFiltered":"\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u804A\u5929","archives.searchPlaceholder":"\u641C\u7D22\u5DF2\u5F52\u6863\u804A\u5929","archives.sortBy":"\u6392\u5E8F\u65B9\u5F0F","archives.sortLabel":"\u6392\u5E8F\u65B9\u5F0F","archives.viewOptions":"\u89C6\u56FE\u9009\u9879","archives.sortArchived":"\u6700\u8FD1\u5F52\u6863","archives.sortUpdated":"\u66F4\u65B0\u65F6\u95F4","archives.sortCreated":"\u521B\u5EFA\u65F6\u95F4","archives.sortAlphabetical":"\u6309\u5B57\u6BCD\u987A\u5E8F","archives.projectFilter":"\u6309\u9879\u76EE\u7B5B\u9009","archives.allProjects":"\u6240\u6709\u9879\u76EE","discovery.timeRange":"\u65F6\u95F4\u8303\u56F4","organizer.allChats":"\u5168\u90E8\u804A\u5929","archives.sessionCount":"{n} \u4E2A\u804A\u5929","archives.selectAllFiltered":"\u5168\u9009\u5F53\u524D\u7B5B\u9009\u7ED3\u679C","archives.selectSession":"\u9009\u62E9\u4F1A\u8BDD\u201C{name}\u201D","archives.restoreSelected":"\u6062\u590D\u6240\u9009","archives.deleteSelected":"\u5220\u9664\u6240\u9009","archives.timestamp":"{date}\uFF0C{time}","archives.restoreProject":"\u6062\u590D\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.restoreUngrouped":"\u5168\u90E8\u6062\u590D","archives.deleteProject":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngrouped":"\u5168\u90E8\u5220\u9664","archives.projectActions":"\u9879\u76EE\u201C{name}\u201D\u7684\u5F52\u6863\u64CD\u4F5C","archives.ungroupedActions":"\u672A\u5206\u7EC4\u804A\u5929\u7684\u5F52\u6863\u64CD\u4F5C","archives.restoreSuccess":"\u5DF2\u6062\u590D {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.restoreBatchFailed":"\u6279\u91CF\u6062\u590D\u5931\u8D25\uFF1A{detail}","archives.deleteSelectedTitle":"\u5220\u9664\u6240\u9009\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteSelectedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u6240\u9009\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteSelectedConfirm":"\u5220\u9664\u6240\u9009\u804A\u5929","archives.deleteProjectTitle":"\u5220\u9664\u201C{name}\u201D\u4E2D\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteProjectDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u201C{name}\u201D\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u9879\u76EE\u76EE\u5F55\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteProjectConfirm":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngroupedTitle":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteUngroupedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u672A\u5206\u7EC4\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u9879\u76EE\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteUngroupedConfirm":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5168\u90E8\u804A\u5929","archives.deleteBatchPending":"\u6B63\u5728\u5220\u9664\u5DF2\u5F52\u6863\u804A\u5929\u2026","archives.deleteSuccess":"\u5DF2\u5220\u9664 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.deleteSuccessWithSkipped":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\uFF1B\u53E6\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deleteSkipped":"\u5DF2\u6E05\u7406 {n} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deletePartial":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u804A\u5929\uFF0C\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\uFF1B{failed} \u4E2A\u5220\u9664\u5931\u8D25\uFF1A{detail}","archives.unarchiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u53D6\u6D88\u5F52\u6863\u3002","archives.unarchiveFailed":"\u53D6\u6D88\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F52\u6863\u3002","archives.archiveFailed":"\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveActive":"\u4F1A\u8BDD\u4ECD\u5728\u8FD0\u884C\uFF08{kinds}\uFF09\u3002","archiveActive.title":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.desc":"\u201C{name}\u201D\u4ECD\u6709\u6B63\u5728\u8FDB\u884C\u7684\u5DE5\u4F5C\uFF1A{kinds}\u3002\u5F52\u6863\u524D\u4F1A\u505C\u6B62\u8FD9\u4E9B\u5DE5\u4F5C\u3002","archiveActive.confirm":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.pending":"\u6B63\u5728\u505C\u6B62\u5E76\u5F52\u6863\u2026","archives.forkFailed":"\u5206\u53C9\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","deleteSession.title":"\u5220\u9664\u4F1A\u8BDD","deleteSession.confirmTitle":"\u5220\u9664\u4F1A\u8BDD\uFF1F","deleteSession.desc":"\u5C06\u6C38\u4E45\u5220\u9664\u4F1A\u8BDD\u201C{name}\u201D\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u5168\u90E8\u8BB0\u5F55\uFF08\u5BF9\u8BDD\u5185\u5BB9\u3001\u7EDF\u8BA1\u3001\u7F13\u5B58\uFF09\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","deleteSession.pending":"\u6B63\u5728\u5220\u9664\u4F1A\u8BDD\u2026","deleteSession.unknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\u3002","deleteSession.failed":"\u5220\u9664\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","picker.loading":"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026","conflict.named":"\u5DF2\u5B58\u5728\u540D\u4E3A\u201C{name}\u201D\u7684\u5DE5\u4F5C\u533A\u3002","folderError.title":"\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6\u5939","folderError.retry":"\u91CD\u65B0\u9009\u62E9",rename:"\u91CD\u547D\u540D","rename.workspace.title":"\u91CD\u547D\u540D\u5DE5\u4F5C\u533A","rename.session.title":"\u91CD\u547D\u540D\u4F1A\u8BDD","field.workspaceName":"\u5DE5\u4F5C\u533A\u540D\u79F0","field.sessionName":"\u4F1A\u8BDD\u540D\u79F0","delete.workspace":"\u5220\u9664\u5DE5\u4F5C\u533A","delete.desc":"\u5C06\u628A\u201C{name}\u201D\u4ECE\u5DE5\u4F5C\u533A\u5217\u8868\u4E2D\u79FB\u9664\u3002\u6587\u4EF6\u5939\u4E0E\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\uFF0C\u5176\u4F1A\u8BDD\u5C06\u663E\u793A\u5728\u201C\u672A\u5206\u7EC4\u201D\u4E0B\u3002","delete.pending":"\u6B63\u5728\u5220\u9664\u5DE5\u4F5C\u533A\u2026","menu.fork":"\u5206\u53C9\u4F1A\u8BDD","menu.archiveSession":"\u5F52\u6863\u4F1A\u8BDD","menu.archiveWorkspace":"\u5F52\u6863\u5168\u90E8\u4F1A\u8BDD","archiveWorkspace.title":"\u5F52\u6863 {n} \u4E2A\u4F1A\u8BDD\uFF1F","archiveWorkspace.desc":"\u8FD9\u4F1A\u5C06\u201C{name}\u201D\u4E2D\u7684\u4F1A\u8BDD\u5F52\u6863\u3002\u4E4B\u540E\u53EF\u4EE5\u5728\u201C\u8BBE\u7F6E \u2192 \u5F52\u6863\u4F1A\u8BDD\u201D\u4E2D\u627E\u5230\u5B83\u4EEC\u3002","archiveWorkspace.confirm":"\u5168\u90E8\u5F52\u6863","archiveWorkspace.pending":"\u6B63\u5728\u5F52\u6863\u4F1A\u8BDD\u2026","actions.workspace.aria":"\u5DE5\u4F5C\u533A\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.session.aria":"\u4F1A\u8BDD\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.newSession.aria":"\u5728\u201C{name}\u201D\u4E2D\u65B0\u5EFA\u4F1A\u8BDD","status.running":"\u8FDB\u884C\u4E2D","status.subagentsRunning.one":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.subagentsRunning.other":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.idle":"\u7A7A\u95F2","status.waitingApproval":"\u7B49\u5F85\u5BA1\u6279","status.planReview":"\u8BA1\u5212\u5F85\u5BA1","status.waitingAnswer":"\u7B49\u5F85\u56DE\u7B54","status.completed":"\u5DF2\u5B8C\u6210","hover.created":"\u521B\u5EFA\u4E8E {time}","hover.copied":"\u5DF2\u590D\u5236","date.ymd":"{y}\u5E74{m}\u6708{d}\u65E5","time.now":"\u521A\u521A","time.minutes":"{n}\u5206\u949F","time.hours":"{n}\u5C0F\u65F6","time.days":"{n}\u5929","time.months":"{n}\u4E2A\u6708","time.years":"{n}\u5E74","time.ago":"{t}\u524D"},Ar={...zs,...us,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","sidebar.entry.title":"Sidebar entry","sidebar.entry.desc":"Show Archived Sessions in the left sidebar. The Settings entry stays either way.","sidebar.entry.toggle":"Toggle sidebar entry","update.entry.title":"Online updates","update.entry.desc":"Allow checking and installing new versions online. Hides the update entry when disabled.","update.entry.toggle":"Toggle online updates","update.entry.locked":"Online updates are disabled by the host configuration.","archives.moreActions":"More actions","archives.archiveProject":"Archive all chats in this project","archives.archiveUngrouped":"Archive all ungrouped chats","archives.archiveProjectDesc":"Archive all {n} unarchived sessions in \u201C{name}\u201D, regardless of the current search filter. You can restore them in Archived.","archives.archiveUngroupedDesc":"Archive all {n} ungrouped, unarchived sessions, regardless of the current search filter. You can restore them in Archived.","archives.tab.archived":"Archived","archives.tab.unarchived":"Unarchived","archives.searchUnarchived":"Search unarchived chats","archives.emptyUnarchived":"No unarchived sessions.","archives.archiveSelected":"Archive","archives.openSession":"Open session","archives.archiveSelectedDesc":"Archive the selected sessions, including selections hidden by the current filter. You can view and restore them in Archived.","archives.archiveSuccess":"Archived {n} sessions.","archives.archiveBatchFailed":"Batch archive failed: {detail}","archives.navigationUnavailable":"This host cannot keep the conversation archived while opening it. Use \u201CRestore and open\u201D instead.","archives.sessionNotRetained":"The host did not keep the requested conversation open. Try again, or restore it before opening.","archives.restoreOpen":"Restore and open","archives.selectedCount":"{n} selected","archives.selectionHiddenHint":"Includes {hidden} hidden by the current filter; actions apply to them too.","archives.clearSelectionShort":"Clear","archives.restore":"Restore","archives.archiveTitle":"Archive {n} chats?","archives.deleteSelectionShort":"Delete","archives.clearSelection":"Clear selection","group.ungrouped":"Ungrouped","session.new":"New Session","section.workspaces":"Workspaces","section.sessions":"Sessions","viewOptions.label":"View options","groupBy.label":"Group by","groupBy.workspace":"Workspace","groupBy.flat":"In one list","orderBy.label":"Order by","orderBy.manual":"Manual","orderBy.updated":"Last updated","sessions.expand":"Show {n} more sessions","sessions.collapse":"Show less","empty.none":"No sessions yet","workspace.add":"Add workspace","search.sessions.aria":"Search sessions","search.placeholder":"Search sessions...","search.clear":"Clear search","search.results.aria":"Search results","search.pending":"Searching session history\u2026","search.unavailable":"Content search is temporarily unavailable. Showing name matches.","search.noMatches":"No matching sessions","search.hasMore":"Showing the first {n} results. Narrow your search.","menu.addWorkspace":"Add workspace\u2026","menu.unarchive":"Unarchive","menu.deleteSession":"Delete session","archived.badge":"Archived sessions","archived.notOpenable":"This session is archived. Unarchive it to continue the conversation.","archives.title":"Archived sessions","archives.description":"Manage archived sessions or select unarchived sessions to archive in bulk.","archives.viewProject":"GitHub","archives.feedback":"Issues","archives.empty":"No archived sessions.","archives.emptyFiltered":"No chats match your filters.","archives.searchPlaceholder":"Search archived chats","archives.sortBy":"Sort archived chats","archives.sortLabel":"Sort order","archives.viewOptions":"View options","archives.sortArchived":"Recently archived","archives.sortUpdated":"Last updated","archives.sortCreated":"Created","archives.sortAlphabetical":"Alphabetical","archives.projectFilter":"Filter by project","archives.allProjects":"All projects","discovery.timeRange":"Date range","organizer.allChats":"All chats","archives.sessionCount":"{n} chats","archives.selectAllFiltered":"Select all results","archives.selectSession":"Select chat {name}","archives.restoreSelected":"Restore selected","archives.deleteSelected":"Delete selected","archives.timestamp":"{date}, {time}","archives.restoreProject":"Restore all chats in this project","archives.restoreUngrouped":"Restore all","archives.deleteProject":"Delete all chats in this project","archives.deleteUngrouped":"Delete all","archives.projectActions":"Archive actions for project {name}","archives.ungroupedActions":"Archive actions for ungrouped chats","archives.restoreSuccess":"Restored {n} archived chats.","archives.restoreBatchFailed":"Could not restore the archived chats: {detail}","archives.deleteSelectedTitle":"Delete selected archived chats","archives.deleteSelectedDesc":"This permanently deletes the selected {n} archived chats, their child agents (including any that are still running), and their records. Other chats are not affected. This cannot be undone.","archives.deleteSelectedConfirm":"Delete selected chats","archives.deleteProjectTitle":"Delete archived chats in {name}","archives.deleteProjectDesc":"This permanently deletes the {n} archived chats in {name}, their child agents, and their records. The project directory and unarchived chats are not affected. This cannot be undone.","archives.deleteProjectConfirm":"Delete all project chats","archives.deleteUngroupedTitle":"Delete ungrouped archived chats","archives.deleteUngroupedDesc":"This permanently deletes the {n} ungrouped archived chats, their child agents, and their records. Other projects and unarchived chats are not affected. This cannot be undone.","archives.deleteUngroupedConfirm":"Delete all ungrouped chats","archives.deleteBatchPending":"Deleting archived chats\u2026","archives.deleteSuccess":"Deleted {n} archived chats.","archives.deleteSuccessWithSkipped":"Deleted {deleted} archived chats and cleared {skipped} stale archive entries for sessions that no longer exist.","archives.deleteSkipped":"Cleared {n} stale archive entries for sessions that no longer exist.","archives.deletePartial":"Deleted {deleted} chats and cleared {skipped} stale archive entries; {failed} could not be deleted: {detail}","archives.unarchiveUnknown":"This session no longer exists, so it cannot be unarchived.","archives.unarchiveFailed":"Could not unarchive the session: {detail}","archives.archiveUnknown":"This session no longer exists, so it cannot be archived.","archives.archiveFailed":"Could not archive the session: {detail}","archives.archiveActive":"This conversation is still running ({kinds}).","archiveActive.title":"Stop and archive","archiveActive.desc":"\u201C{name}\u201D still has work in progress: {kinds}. Archiving stops that work first.","archiveActive.confirm":"Stop and archive","archiveActive.pending":"Stopping and archiving\u2026","archives.forkFailed":"Could not fork the session: {detail}","deleteSession.title":"Delete session","deleteSession.confirmTitle":"Delete session?","deleteSession.desc":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","deleteSession.pending":"Deleting session\u2026","deleteSession.unknown":"This session no longer exists or was already deleted.","deleteSession.failed":"Could not delete the session: {detail}","picker.loading":"Loading workspaces\u2026","conflict.named":"A workspace named \u201C{name}\u201D already exists.","folderError.title":"Couldn\u2019t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes \u201C{name}\u201D from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace\u2026","menu.fork":"Fork session","menu.archiveSession":"Archive session","menu.archiveWorkspace":"Archive all conversations","archiveWorkspace.title":"Archive {n} conversations?","archiveWorkspace.desc":"This archives all conversations in \u201C{name}\u201D. You can find them later in Archived sessions.","archiveWorkspace.confirm":"Archive all","archiveWorkspace.pending":"Archiving conversations\u2026","actions.workspace.aria":"Workspace actions for {name}","actions.session.aria":"Session actions for {name}","actions.newSession.aria":"New session in {name}","status.running":"Running","status.subagentsRunning.one":"{n} subagent running","status.subagentsRunning.other":"{n} subagents running","status.idle":"Idle","status.waitingApproval":"Waiting for approval","status.planReview":"Plan awaiting review","status.waitingAnswer":"Waiting for answer","status.completed":"Completed","hover.created":"Created {time}","hover.copied":"Copied","date.ymd":"{y}-{m}-{d}","time.now":"now","time.minutes":"{n}min","time.hours":"{n}h","time.days":"{n}d","time.months":"{n}mo","time.years":"{n}y","time.ago":"{t} ago"},oa={...Os,...hs,"locale.language":"ru","service.unavailable":"\u0421\u0435\u0440\u0432\u0438\u0441 \u0435\u0449\u0451 \u043D\u0435 \u0433\u043E\u0442\u043E\u0432. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","sidebar.entry.title":"\u041F\u0443\u043D\u043A\u0442 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","sidebar.entry.desc":"\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0430\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439 \u043D\u0430 \u043B\u0435\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438. \u041F\u0443\u043D\u043A\u0442 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F.","sidebar.entry.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0443\u043D\u043A\u0442 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","update.entry.title":"\u041E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","update.entry.desc":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443 \u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0443 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0439 \u043E\u043D\u043B\u0430\u0439\u043D. \u0421\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u043F\u0443\u043D\u043A\u0442 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438.","update.entry.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","update.entry.locked":"\u041E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0445\u043E\u0441\u0442\u0430.","archives.moreActions":"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E","archives.archiveProject":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.archiveUngrouped":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.archiveProjectDesc":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 {n} \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432 \xAB{name}\xBB, \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043F\u043E\u0438\u0441\u043A\u0430. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.archiveUngroupedDesc":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439, \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043F\u043E\u0438\u0441\u043A\u0430. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.tab.archived":"\u0410\u0440\u0445\u0438\u0432","archives.tab.unarchived":"\u041D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435","archives.searchUnarchived":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u0447\u0430\u0442\u0430\u043C","archives.emptyUnarchived":"\u041D\u0435\u0442 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.archiveSelected":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archives.openSession":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","archives.archiveSelectedDesc":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0441\u043A\u0440\u044B\u0442\u044B\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.archiveSuccess":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0441\u0435\u0441\u0441\u0438\u0439: {n}.","archives.archiveBatchFailed":"\u041F\u0430\u043A\u0435\u0442\u043D\u0430\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C: {detail}","archives.navigationUnavailable":"\u042D\u0442\u043E\u0442 \u0445\u043E\u0441\u0442 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \xAB\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C\xBB.","archives.sessionNotRetained":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u043C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0438\u043B\u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0435\u0433\u043E \u043F\u0435\u0440\u0435\u0434 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0435\u043C.","archives.restoreOpen":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C","archives.selectedCount":"\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {n}","archives.selectionHiddenHint":"\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 {hidden}, \u0441\u043A\u0440\u044B\u0442\u044B\u0445 \u0442\u0435\u043A\u0443\u0449\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C; \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F \u0438 \u043A \u043D\u0438\u043C.","archives.clearSelectionShort":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C","archives.restore":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C","archives.archiveTitle":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0447\u0430\u0442\u043E\u0432?","archives.deleteSelectionShort":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","archives.clearSelection":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440","group.ungrouped":"\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B","session.new":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F","section.workspaces":"\u0420\u0430\u0431\u043E\u0447\u0438\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","section.sessions":"\u0421\u0435\u0441\u0441\u0438\u0438","viewOptions.label":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430","groupBy.label":"\u0413\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E","groupBy.workspace":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","groupBy.flat":"\u0412 \u043E\u0434\u043D\u043E\u043C \u0441\u043F\u0438\u0441\u043A\u0435","orderBy.label":"\u041F\u043E\u0440\u044F\u0434\u043E\u043A","orderBy.manual":"\u0412\u0440\u0443\u0447\u043D\u0443\u044E","orderBy.updated":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","sessions.expand":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {n} \u0441\u0435\u0441\u0441\u0438\u0439","sessions.collapse":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435","empty.none":"\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0439","workspace.add":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","search.sessions.aria":"\u041F\u043E\u0438\u0441\u043A \u0441\u0435\u0441\u0441\u0438\u0439","search.placeholder":"\u041F\u043E\u0438\u0441\u043A \u0441\u0435\u0441\u0441\u0438\u0439...","search.clear":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0438\u0441\u043A","search.results.aria":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430","search.pending":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0439\u2026","search.unavailable":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u043C.","search.noMatches":"\u041D\u0435\u0442 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439","search.hasMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043F\u0435\u0440\u0432\u044B\u0435 {n} \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432. \u0421\u0443\u0437\u044C\u0442\u0435 \u043F\u043E\u0438\u0441\u043A.","menu.addWorkspace":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E\u2026","menu.unarchive":"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430","menu.deleteSession":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","archived.badge":"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439","archived.notOpenable":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0432 \u0430\u0440\u0445\u0438\u0432\u0435. \u0412\u0435\u0440\u043D\u0438\u0442\u0435 \u0435\u0451 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440.","archives.title":"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439","archives.description":"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C\u0438 \u0441\u0435\u0441\u0441\u0438\u044F\u043C\u0438 \u0438\u043B\u0438 \u0432\u044B\u0431\u043E\u0440 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F \u043F\u0430\u043A\u0435\u0442\u043D\u043E\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438.","archives.viewProject":"GitHub","archives.feedback":"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B","archives.empty":"\u041D\u0435\u0442 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.emptyFiltered":"\u041D\u0438 \u043E\u0434\u0438\u043D \u0447\u0430\u0442 \u043D\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0448\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u043C.","archives.searchPlaceholder":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u0447\u0430\u0442\u0430\u043C","archives.sortBy":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.sortLabel":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430","archives.viewOptions":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0432\u0438\u0434\u0430","archives.sortArchived":"\u041D\u0435\u0434\u0430\u0432\u043D\u043E \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435","archives.sortUpdated":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","archives.sortCreated":"\u0414\u0430\u0442\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F","archives.sortAlphabetical":"\u041F\u043E \u0430\u043B\u0444\u0430\u0432\u0438\u0442\u0443","archives.projectFilter":"\u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0443","archives.allProjects":"\u0412\u0441\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B","discovery.timeRange":"\u041F\u0435\u0440\u0438\u043E\u0434","organizer.allChats":"\u0412\u0441\u0435 \u0447\u0430\u0442\u044B","archives.sessionCount":"{n} \u0447\u0430\u0442\u043E\u0432","archives.selectAllFiltered":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B","archives.selectSession":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0447\u0430\u0442 {name}","archives.restoreSelected":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.deleteSelected":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.timestamp":"{date}, {time}","archives.restoreProject":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.restoreUngrouped":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435","archives.deleteProject":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngrouped":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435","archives.projectActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0435\u043A\u0442\u0430 {name}","archives.ungroupedActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.restoreSuccess":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.restoreBatchFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B: {detail}","archives.deleteSelectedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteSelectedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteSelectedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteProjectTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u0432 {name}","archives.deleteProjectDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0432 {name}, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteProjectConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngroupedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteUngroupedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteUngroupedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteBatchPending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432\u2026","archives.deleteSuccess":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.deleteSuccessWithSkipped":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deleteSkipped":"\u041E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deletePartial":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430; {failed} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C: {detail}","archives.unarchiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430.","archives.unarchiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430: {detail}","archives.archiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C.","archives.archiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","archives.archiveActive":"\u042D\u0442\u043E\u0442 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F ({kinds}).","archiveActive.title":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.desc":"\u0412 \xAB{name}\xBB \u0435\u0449\u0451 \u0438\u0434\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0430: {kinds}. \u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442 \u0435\u0451.","archiveActive.confirm":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.pending":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0438 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F\u2026","archives.forkFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438: {detail}","deleteSession.title":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","deleteSession.confirmTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E?","deleteSession.desc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0441\u0435\u0441\u0441\u0438\u044E \xAB{name}\xBB, \u0435\u0451 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0432\u0441\u0435 \u0435\u0451 \u0437\u0430\u043F\u0438\u0441\u0438 (\u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0443, \u043A\u044D\u0448). \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","deleteSession.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u2026","deleteSession.unknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0430.","deleteSession.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","picker.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u2026","conflict.named":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u0441 \u0438\u043C\u0435\u043D\u0435\u043C \xAB{name}\xBB \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.","folderError.title":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0443","folderError.retry":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430",rename:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C","rename.workspace.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","rename.session.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","field.workspaceName":"\u0418\u043C\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","field.sessionName":"\u0418\u043C\u044F \u0441\u0435\u0441\u0441\u0438\u0438","delete.workspace":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","delete.desc":"\u042D\u0442\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \xAB{name}\xBB \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432. \u041F\u0430\u043F\u043A\u0430 \u0438 \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0441\u0435\u0441\u0441\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u0443\u0442\u0441\u044F. \u0415\u0433\u043E \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B\xBB.","delete.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430\u2026","menu.fork":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438","menu.archiveSession":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","menu.archiveWorkspace":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","archiveWorkspace.title":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0441\u0435\u0441\u0441\u0438\u0439?","archiveWorkspace.desc":"\u042D\u0442\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432 \xAB{name}\xBB. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archiveWorkspace.confirm":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435","archiveWorkspace.pending":"\u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0439\u2026","actions.workspace.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430 \u0434\u043B\u044F {name}","actions.session.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043B\u044F {name}","actions.newSession.aria":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u0432 {name}","status.running":"\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F","status.subagentsRunning.one":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442","status.subagentsRunning.other":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442","status.idle":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435","status.waitingApproval":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F","status.planReview":"\u041F\u043B\u0430\u043D \u043E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438","status.waitingAnswer":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u0432\u0435\u0442\u0430","status.completed":"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E","hover.created":"\u0421\u043E\u0437\u0434\u0430\u043D\u043E {time}","hover.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","date.ymd":"{y}-{m}-{d}","time.now":"\u0441\u0435\u0439\u0447\u0430\u0441","time.minutes":"{n}\u043C\u0438\u043D","time.hours":"{n}\u0447","time.days":"{n}\u0434","time.months":"{n}\u043C\u0435\u0441","time.years":"{n}\u0433","time.ago":"{t} \u043D\u0430\u0437\u0430\u0434"},Ve="archive-manager-workspace",la=["slots","sessions","workspaces","locale","remote","typert"];function Nn(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}t(Nn,"bindObservable");function Rr(n){return async s=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(s)}}t(Rr,"createUnarchiveSession");async function zn(n,s,o){let u=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=await Sn(s,async C=>{try{await n.archiveSession(C)}catch(N){throw N!==null&&typeof N=="object"&&on(N)!==void 0&&typeof ee(N).sessionId!="string"&&Object.assign(N,{sessionId:C}),N}return!0},{refresh:o}),f=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:f,archivedSessionIdsAdded:f.filter(C=>!u.has(C)),failures:m.failures}}t(zn,"archiveSessionsViaOfficial");async function _r(n,s,o,u){let m=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),f=typeof u=="function"?u:A=>n.unarchiveSession?.(A),C=await Sn(s,async A=>(await f(A),!0),{refresh:o}),N=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:N,unarchivedSessionIds:[...m].filter(A=>!N.includes(A)),failures:C.failures}}t(_r,"unarchiveSessionsViaOfficial");async function ca(n){da(n);let s=n.get("remote"),o=t(()=>{},"disposeRemote");return s!==void 0&&(o=await s.$mount(U)),async()=>{await o()}}t(ca,"apply");function da(n){n.effect(()=>n.locale.register(Ve,{zh:Ir,en:Ar,ru:oa}),"dsh-archive-manager: dictionaries");let s=t(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),o={},u,m=t(p=>(u=ys(p,n.sessions,n.workspaces,{onOpened:t(()=>n.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:t(()=>n.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>u?.dispose()),"attachArchiveNavigation");n.effect(()=>m(s()),"archive-manager: explicit archived navigation");let f=t(p=>{if(u===void 0)throw new jt("navigationUnavailable");return pr.request(p),u.open(p)},"openConversation"),C=t(async p=>{n.get("layout")?.beginNavigation?.(),pr.request(p)},"focusSessionWorkspace"),N=t(async(p,w)=>{let D=await n.sessions.search(p,w);if(!D.ok)throw new Error(D.error.message);return D.value},"searchSessions"),A=t(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await me(),null}catch(p){return console.warn("archive-manager: restored archived sessions but session list refresh failed:",p),p instanceof Error?p.message:String(p)}},"refreshSessionList"),B=Rr(n.workspaces),T=t(async(p,...w)=>{let D=n.get("remote.workspaceRegistry");if(!D||typeof D[p]!="function")throw new Error(n.locale.bind(Ve)("service.unavailable"));let ke=await D[p].apply(D,w);if(!ke.ok)throw new Error(ke.error.message);return ke.value},"registryCall"),z=t(()=>T("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),H=t(()=>T("diagnoseSessionCaches"),"diagnoseSessionCaches"),h=t(p=>T("rebuildSessionCaches",p),"rebuildSessionCaches"),me=t(async()=>{if(typeof n.sessions.refresh!="function")throw new Error("Official session list refresh is unavailable");let p=await n.sessions.refresh(),w=n.sessions,D=w.manager;if(D?.listState==="error"&&D.listError)throw new Error(Ae(D.listError));if(w.listState==="error"&&w.listError)throw new Error(Ae(w.listError));let ae=w.list?.getSnapshot?.();if(ae?.state==="error"&&ae.error)throw new Error(Ae(ae.error));if(p&&typeof p=="object"&&"ok"in p&&p.ok===!1)throw new Error(Ae(p.error??"Session list refresh failed"))},"refreshCacheLists"),Re=t((p={})=>T("cleanOrphanSubagents",p??{}),"cleanOrphanSubagents"),ie=t(p=>T("searchArchivedContent",p),"searchArchivedContent"),Xe=t(p=>T("searchSessionContent",p),"searchSessionContent"),ft=t(p=>T("previewArchivedSession",p),"previewArchivedSession"),Dt=t(()=>T("favoriteSessions"),"favoriteSessions"),J=t(p=>T("setSessionFavorite",p),"setSessionFavorite"),xe=js({workspaces:n.workspaces.list,sessions:n.sessions.list,archive:t(p=>n.workspaces.archiveSession(p),"archive"),restore:t(async p=>{await B(p)},"restore"),deleteOne:t(async p=>{let w=n.get("remote.workspaceRegistry");if(!w)throw new Error(n.locale.bind(Ve)("service.unavailable"));let D=await w.deleteSession(p);if(!D.ok)throw new Error(D.error.message)},"deleteOne"),getFavorites:Dt,refresh:t(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:pt}),it=t(async p=>{await B(p),await A()},"unarchiveSession"),$t=t(async p=>{let w=n.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let D=await w.deleteSession(p);if(!D.ok)throw new Error(D.error.message);await A()},"deleteSession"),vt=t(async p=>zn(n.workspaces,p,A),"archiveSessions"),On=t(async p=>{let w=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},D=Vt(w.archivedSessionIds,w.items,p);return _r(n.workspaces,D,A,B)},"unarchiveSessions"),cn=t(async p=>{let w=n.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let D=await w.deleteArchivedSessions(p);if(!D.ok)throw new Error(D.error.message);let ae=await A();return{...D.value,refreshError:ae}},"deleteArchivedSessions"),et=t(async()=>{let p=n.get("remote.workspaceRegistry");if(p===void 0)throw new Error("archive-manager remote service is unavailable");let w=await p.archivedSessionMetadata();if(!w.ok)throw new Error(w.error.message);return w.value},"archivedSessionMetadata"),be="sidebar.workspaces.session.menu.item",ot=null,Et=new Set,ge=t(p=>{ot=p;for(let w of Et)w()},"publishDeleteTarget");function yt(){return l.useSyncExternalStore(p=>(Et.add(p),()=>{Et.delete(p)}),()=>ot,()=>ot)}t(yt,"useDeleteRequest");function tt({sessionId:p,displayTitle:w,useMenuOpenState:D,t:ae}){let[,ke]=D(),de=c.MenuItemButton,Oe=(0,a.jsx)(c.IconTrashOutlineRegular,{size:14}),Ue=t(()=>{ke(!1),ge({sessionId:p,title:w})},"onSelect");return typeof de=="function"?(0,a.jsx)(de,{danger:!0,icon:Oe,onSelect:Ue,children:ae("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Ue,children:ae("menu.deleteSession")})}t(tt,"DeleteSessionMenuItem");function Gt(p){try{let w=document.querySelector(`[data-row-key="session:${CSS.escape(p)}"]`);return w?(w.hasAttribute("tabindex")||(w.setAttribute("tabindex","-1"),w.addEventListener("blur",()=>w.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}t(Gt,"focusSessionRow");function lt({t:p}){let w=yt(),[D,ae]=(0,l.useState)(!1),[ke,de]=(0,l.useState)(null),[Oe,Ue]=(0,l.useState)(null),oe=(0,l.useRef)(null),we=(0,l.useRef)(null),Te=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){Ue(null);return}let Q=null,ne=t(()=>{if(Q&&Q.isConnected)return Q;try{Q=document.querySelector(`[data-row-key="session:${CSS.escape(w.sessionId)}"]`)}catch{Q=null}return Q},"getTargetRow"),O=t(()=>{let ye=oe.current,he=ye?.offsetWidth||290,Me=ye?.offsetHeight||160,Pe=8,Be=ne();if(!Be){let ue=window.innerWidth,rt=window.innerHeight,ut=Math.max(16,(rt-Me)/2),$e=Math.max(16,(ue-he)/2);Ue(Fe=>Fe!==null&&Fe.top===ut&&Fe.left===$e?Fe:{top:ut,left:$e});return}let Ze=Be.getBoundingClientRect(),Ne=Ze.top-4;Ne+Me>window.innerHeight-16&&(Ne=window.innerHeight-16-Me),Ne<16&&(Ne=16);let Ie=Ze.right+Pe;Ie+he>window.innerWidth-16&&(Ie=Ze.left-he-Pe),Ie<16&&(Ie=16),Ue(ue=>ue!==null&&ue.top===Ne&&ue.left===Ie?ue:{top:Ne,left:Ie})},"updatePosition");O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O);let re=null;return typeof ResizeObserver<"u"&&oe.current&&(re=new ResizeObserver(O),re.observe(oe.current)),()=>{re?.disconnect(),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[w]),(0,l.useEffect)(()=>{if(w===null)return;we.current&&!we.current.disabled?we.current.focus():oe.current?.focus();let Q=w.sessionId;return()=>{if(!Gt(Q)){let O=document.querySelector('[role="treeitem"][aria-selected="true"]');O&&(O.hasAttribute("tabindex")||(O.setAttribute("tabindex","-1"),O.addEventListener("blur",()=>O.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(O):O.focus())}}},[w]),(0,l.useEffect)(()=>{w!==null&&D&&oe.current?.focus()},[w,D]),(0,l.useEffect)(()=>{if(w===null)return;let Q=t(ne=>{if(ne.key==="Escape"){ne.preventDefault(),ne.stopPropagation(),"stopImmediatePropagation"in ne&&typeof ne.stopImmediatePropagation=="function"&&ne.stopImmediatePropagation(),D||(de(null),ge(null));return}if(ne.key==="Tab"){if(ne.preventDefault(),D){oe.current?.focus();return}let O=we.current,re=Te.current;if(!O||!re)return;ne.shiftKey?document.activeElement===O?re.focus():O.focus():document.activeElement===re?O.focus():re.focus()}},"onKey");return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[w,D]),w===null)return null;let dt=t(()=>{D||(de(null),ge(null))},"close"),Ye=t(()=>{ae(!0),de(null),$t(w.sessionId).then(()=>{ae(!1),ge(null)}).catch(Q=>{ae(!1),de(kn(Q,p))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:dt}),(0,a.jsxs)("div",{ref:oe,role:"dialog","aria-modal":!0,"aria-label":p("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:Oe?{top:Oe.top,left:Oe.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:p("deleteSession.confirmTitle")}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:p("deleteSession.desc",{name:w.title})}),D&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:p("deleteSession.pending")}),ke!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:ke}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:we,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:D,onClick:dt,children:p("cancel")}),(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:D,onClick:Ye,children:p("deleteSession.title")})]})]})]})}t(lt,"DeleteSessionOverlay");let Ke=null,bt=new Set,It=t(p=>{Ke=p;for(let w of bt)w()},"publishArchiveWsTarget");function dn(){return l.useSyncExternalStore(p=>(bt.add(p),()=>{bt.delete(p)}),()=>Ke,()=>Ke)}t(dn,"useArchiveWsRequest");function ct(p){try{let w=document.querySelector(`[data-row-key="workspace:${CSS.escape(p)}"]`);return w?(w.hasAttribute("tabindex")||(w.setAttribute("tabindex","-1"),w.addEventListener("blur",()=>w.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}t(ct,"focusWorkspaceRow");function ve({t:p}){let w=dn(),[D,ae]=(0,l.useState)(!1),[ke,de]=(0,l.useState)(null),[Oe,Ue]=(0,l.useState)(null),oe=(0,l.useRef)(null),we=(0,l.useRef)(null),Te=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){Ue(null);return}let Q=null,ne=t(()=>{if(Q&&Q.isConnected)return Q;try{Q=document.querySelector(`[data-row-key="workspace:${CSS.escape(w.workspaceId)}"]`)}catch{Q=null}return Q},"getTargetRow"),O=t(()=>{let ye=oe.current,he=ye?.offsetWidth||290,Me=ye?.offsetHeight||160,Pe=8,Be=ne();if(!Be){let ue=window.innerWidth,rt=window.innerHeight,ut=Math.max(16,(rt-Me)/2),$e=Math.max(16,(ue-he)/2);Ue(Fe=>Fe!==null&&Fe.top===ut&&Fe.left===$e?Fe:{top:ut,left:$e});return}let Ze=Be.getBoundingClientRect(),Ne=Ze.top-4;Ne+Me>window.innerHeight-16&&(Ne=window.innerHeight-16-Me),Ne<16&&(Ne=16);let Ie=Ze.right+Pe;Ie+he>window.innerWidth-16&&(Ie=Ze.left-he-Pe),Ie<16&&(Ie=16),Ue(ue=>ue!==null&&ue.top===Ne&&ue.left===Ie?ue:{top:Ne,left:Ie})},"updatePosition");O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O);let re=null;return typeof ResizeObserver<"u"&&oe.current&&(re=new ResizeObserver(O),re.observe(oe.current)),()=>{re?.disconnect(),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[w]),(0,l.useEffect)(()=>{if(w===null)return;we.current&&!we.current.disabled?we.current.focus():oe.current?.focus();let Q=w.workspaceId;return()=>{ct(Q)}},[w]),(0,l.useEffect)(()=>{w!==null&&D&&oe.current?.focus()},[w,D]),(0,l.useEffect)(()=>{if(w===null)return;let Q=t(ne=>{if(ne.key==="Escape"){ne.preventDefault(),ne.stopPropagation(),"stopImmediatePropagation"in ne&&typeof ne.stopImmediatePropagation=="function"&&ne.stopImmediatePropagation(),D||(de(null),It(null));return}if(ne.key==="Tab"){if(ne.preventDefault(),D){oe.current?.focus();return}let O=we.current,re=Te.current;if(!O||!re)return;ne.shiftKey?document.activeElement===O?re.focus():O.focus():document.activeElement===re?O.focus():re.focus()}},"onKey");return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[w,D]),w===null)return null;let dt=t(()=>{D||(de(null),It(null))},"close"),Ye=t(()=>{ae(!0),de(null);let ne=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(he=>he.workspaceId===w.workspaceId),O=n.sessions.list?.getSnapshot?.()?.byId??{},re=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),ye=(ne?.sessionIds??[]).filter(he=>En(he,O,re));zn(n.workspaces,ye,A).then(he=>{if(ae(!1),he.failures.length>0){de(an(he.failures,p));return}It(null)}).catch(he=>{ae(!1),de(sr(he,p))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:dt}),(0,a.jsxs)("div",{ref:oe,role:"dialog","aria-modal":!0,"aria-label":p("menu.archiveWorkspace"),tabIndex:-1,className:"dsham_sidebarCard",style:Oe?{top:Oe.top,left:Oe.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:p("archiveWorkspace.title",{n:w.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:p("archiveWorkspace.desc",{name:w.title})}),D&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:p("archiveWorkspace.pending")}),ke!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:ke}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:we,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:D,onClick:dt,children:p("cancel")}),(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:D,onClick:Ye,children:p("archiveWorkspace.confirm")})]})]})]})}t(ve,"ArchiveWorkspaceOverlay");function At(p){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let w=null,D=!1,ae=new Map,ke=!1,de=t(O=>{let ye=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(Pe=>Pe.workspaceId===O);if(ye===void 0)return[];let he=n.sessions.list?.getSnapshot?.()?.byId??{},Me=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return ye.sessionIds.filter(Pe=>En(Pe,he,Me))},"workspaceCandidateIds"),Oe=t(()=>{if(ke=!1,!D)for(let[O,re]of ae){if(!O.isConnected){ae.delete(O);continue}let ye=de(re.workspaceId).length===0;O.disabled=ye,O.style.opacity=ye?"0.5":"",O.style.cursor=ye?"not-allowed":""}},"revalidateItems"),Ue=t(()=>{if(ae.size===0||ke||D)return;ke=!0;let O=t(()=>Oe(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16)},"scheduleRevalidate"),oe=t(O=>{w=cr(O.target)},"rememberWorkspace");document.addEventListener("pointerdown",oe,!0),document.addEventListener("click",oe,!0);let we=t(()=>{if(D)return;for(let[re]of ae)re.isConnected||ae.delete(re);let O=document.querySelectorAll('[role="menu"]');for(let re of O){if(re.querySelector('[data-dsham-archive-workspace="true"]'))continue;let ye=Array.from(re.querySelectorAll('button[role="menuitem"]'));if(ye.length===0)continue;let he=ye.find(Ge=>In(Ge,!1))??ye.find(Ge=>In(Ge,!0));if(!he)continue;let Me=ye.find(Ge=>Ge!==he)??he,Pe=he.parentElement;if(!Pe)continue;let Be=w;if(!Be)continue;let Ne=de(Be.workspaceId).length,Ie=document.createElement("div");Ie.className=Pe.className;let ue=document.createElement("button");ue.type="button",ue.setAttribute("role","menuitem"),ue.dataset.dshamArchiveWorkspace="true",ue.className=Me.className.split(/\s+/).filter(Ge=>!/(?:^|[_-])danger(?:$|[_-])/i.test(Ge)).join(" ");let rt=Me.querySelector("span"),ut=Me.querySelectorAll("span")[1],$e=document.createElement("span");$e.setAttribute("aria-hidden","true"),rt?.className&&($e.className=rt.className),$e.innerHTML='<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 2.5H2.5C1.94772 2.5 1.5 2.94772 1.5 3.5V4.5C1.5 5.05228 1.94772 5.5 2.5 5.5H13.5C14.0523 5.5 14.5 5.05228 14.5 4.5V3.5C14.5 2.94772 14.0523 2.5 13.5 2.5Z"/><path d="M2.5 5.5V13.5C2.5 13.7652 2.60536 14.0196 2.79289 14.2071C2.98043 14.3946 3.23478 14.5 3.5 14.5H12.5C12.7652 14.5 13.0196 14.3946 13.2071 14.2071C13.3946 14.0196 13.5 13.7652 13.5 13.5V5.5"/><path d="M6.5 9.5H9.5"/></svg>';let Fe=document.createElement("span");ut?.className&&(Fe.className=ut.className),Fe.textContent=p("menu.archiveWorkspace"),ue.append($e,Fe),Ie.append(ue),Ne===0&&(ue.disabled=!0,ue.style.opacity="0.5",ue.style.cursor="not-allowed"),ue.addEventListener("click",Ge=>{Ge.preventDefault(),Ge.stopPropagation();let Nt=de(Be.workspaceId).length;Nt!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),It({workspaceId:Be.workspaceId,title:Be.title,count:Nt}))}),Pe.parentNode?.insertBefore(Ie,Pe),ae.set(ue,{workspaceId:Be.workspaceId})}},"checkAndInject"),Te=!1,dt=t(()=>{if(Te||D)return;Te=!0;let O=t(()=>{Te=!1,!D&&we()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16)},"scheduleInject"),Ye=new MutationObserver(O=>{Tn(O,'[role="menu"]')&&dt()});Ye.observe(document.body,{childList:!0,subtree:!0});let Q=n.sessions.list?.subscribe?.(Ue),ne=n.workspaces.list?.subscribe?.(Ue);return()=>{D=!0,document.removeEventListener("pointerdown",oe,!0),document.removeEventListener("click",oe,!0),Ye.disconnect(),Q?.(),ne?.(),ae.clear();for(let O of document.querySelectorAll('[data-dsham-archive-workspace="true"]'))O.parentElement?.remove()}}t(At,"setupWorkspaceMenuInjector");function Kt(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(p=>p.children?.[be]!==void 0)}t(Kt,"hostSidebarDeclaresSessionMenu");let W,je,nt,q,Yt=t(()=>{let p=Kt()?"menu":"waiting";p!==W&&(W=p,p==="menu"&&(je??=n.slots.inject(be,()=>n.slots.register({name:be,id:"archive-manager.delete-session",order:500,locale:Ve,inject:t(()=>({}),"inject")},tt)),nt??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:Ve,inject:t(()=>({t:n.locale.bind(Ve)}),"inject")},lt)),q??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:Ve,inject:t(()=>({t:n.locale.bind(Ve)}),"inject")},ve))))},"reconcileSidebar");Yt(),n.effect(()=>At(n.locale.bind(Ve)),"archive-manager: workspace menu injector"),fr(n);let _e=typeof n.on=="function"?n.on("slots/changed",p=>{if(p==="sidebar.workspaces")try{Yt()}catch(w){console.warn("archive-manager: sidebar mode switch failed",w)}}):void 0;n.effect(()=>()=>{_e?.(),je?.(),nt?.(),q?.()},"archive-manager: sidebar mode");let Rt=t(()=>({archiveSessions:vt,archiveSession:t((p,w)=>n.workspaces.archiveSession(p,w),"archiveSession"),sessionStore:Nn(n.sessions.list),workspaceStore:Nn(n.workspaces.list),unarchiveSession:it,deleteSession:$t,unarchiveSessions:On,deleteArchivedSessions:cn,archivedSessionMetadata:et,openConversation:f,focusSessionWorkspace:C,viewState:o,favoriteSessions:Dt,setSessionFavorite:J,organizeBatch:xe,diagnoseOrphanSubagents:z,cleanOrphanSubagents:Re,diagnoseSessionCaches:H,rebuildSessionCaches:h,refreshCacheLists:me,searchSessionContent:Xe,searchArchivedContent:ie,previewArchivedSession:ft,t:n.locale.bind(Ve)}),"buildArchivedSectionProps"),Bt=er(n,{callApi:t(async(p,w)=>{let D=wn(`/api/michengai/dsh-archive-manager${p}`),ae=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},w?.headers),ke=await fetch(D,Object.assign({},w,{headers:ae})),de=await ke.json();if(!ke.ok||!de||de.ok===!1)throw new Error((de&&typeof de=="object"&&typeof de.error=="string"?de.error:void 0)||`HTTP ${ke.status}`);return de},"callSettingsApi"),renderPanel:t(p=>(0,a.jsx)(Ut,Object.assign({},Rt(),p)),"renderPanel"),injectProps:Rt,ns:Ve,onOnlineUpdateChange:t(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange")});n.effect(()=>()=>Bt.destroy(),"archive-manager: sidebar entry"),n.effect(()=>As({endpoint:"/api/michengai/dsh-archive-manager/update",packageName:"@michengai/dsh-archive-manager",titleRowSelector:".dsham_settingsTitleRow",linksSelector:".dsham_settingsLinks",zhName:"\u5F52\u6863\u4F1A\u8BDD",enName:"Archived sessions",ruName:"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439",createIcon:Y,isEnabled:t(()=>Bt.isOnlineUpdateEnabled(),"isEnabled")}),"dsh-archive-manager: plugin update ui"),n.slots.inject("settings.section",()=>n.slots.register({name:"settings.section",id:"archived-sessions",order:45,label:t(()=>n.locale.bind(Ve)("archived.badge"),"label"),icon:"archive",locale:Ve,inject:Rt},Ut))}t(da,"applyWorkspaceBrowser");async function ua(n,s,o,u){try{await s(n)}catch(m){o(Ls(m,u))}}return t(ua,"forkWithFeedback"),i.__test={forkWithFeedback:ua,unarchivedSessionIds:kr,ArchiveSelectionToolbar:vr,ArchivedSessionsSection:Ut,zh:Ir,en:Ar,displayTitle:Le,sessionVisible:De,indexSubagentDescendants:Qe,isUnknownSessionError:Ct,deriveGroups:$s,deriveFlat:Gs,deriveSearchResults:Ks,deriveArchivedGroups:Cr,sortArchivedGroups:Er,deriveArchivedBatchIds:Vt,archivedSessionIdsInGroups:wr,pruneArchivedSelection:Sr,toggleArchivedSelection:Dn,archivedDeleteFeedback:xr,isWorkspaceTaskCandidate:En,isWorkspaceDeleteMenuItem:In,workspaceMenuTriggerFrom:cr,applySettingsNavIcon:mr,restoreSettingsNavIcon:gr,installSettingsNavIcon:fr,mutationTouches:Tn,activeSessionActivity:on,activeSessionRefusal:ar,activeArchiveFromMessage:ir,archiveSessionsViaOfficial:zn,unarchiveSessionsViaOfficial:_r,createUnarchiveSession:Rr,createWorkspaceViewStore:se,migrateWorkspaceViewPersist:I,WORKSPACE_VIEW_PERSIST_KEY:Mt,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:Pt,bindObservable:Nn,groupByWorkspace:lr,byRecency:fe,ARCHIVE_MANAGER_REMOTE:U,currentSessionId:pt,setupSidebarEntry:er},i.apply=ca,i.inject=la,r.exports}t(oi,"startArchiveClient");
|
|
21
|
+
`;function Us(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(Bs)!==null||typeof document.createElement!="function")return;let t=document.createElement("style");t.id=Bs,t.textContent=vi,(document.head??document.documentElement)?.appendChild?.(t)}e(Us,"ensureSidebarEntryStyle");function yi(t){let s=t&&typeof t.size=="number"?t.size:16;return tt(cn.IconArchiveOutlineMedium,{size:s})}e(yi,"ArchiveSidebarIcon");function bi(t){Us();let{t:s,enabled:o,onToggle:f,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:c,onlineUpdateDisabled:E,onlineUpdateLocked:y=!1}=t,R=[tt("div",{key:"sidebar-entry",className:"dsham_bundle_row"},tt("div",{className:"dsham_bundle_label_box"},tt("span",{className:"dsham_bundle_title"},s("sidebar.entry.title")),tt("span",{className:"dsham_bundle_desc"},s("sidebar.entry.desc"))),tt(cn.Switch,{checked:o,onChange:f,label:s("sidebar.entry.toggle"),disabled:a}))];if(typeof c=="function"){let w=y?`${s("update.entry.desc")} (${s("update.entry.locked")})`:s("update.entry.desc");R.push(tt("div",{key:"online-update",className:"dsham_bundle_row"},tt("div",{className:"dsham_bundle_label_box"},tt("span",{className:"dsham_bundle_title"},s("update.entry.title")),tt("span",{className:"dsham_bundle_desc"},w)),tt(cn.Switch,{checked:l,onChange:c,label:s("update.entry.toggle"),disabled:E||y,title:y?s("update.entry.locked"):void 0})))}return tt(as,null,R)}e(bi,"ArchiveBundleConfigCard");function wi(t){let[s,o]=qt(t.getEnabled),[f,a]=qt(t.getOnlineUpdateEnabled?t.getOnlineUpdateEnabled:()=>!0),[l,c]=qt(t.getOnlineUpdateLocked?t.getOnlineUpdateLocked:()=>!1),[E,y]=qt(!1),[R,w]=qt(!1);os(()=>{let T=e(()=>{o(t.getEnabled()),t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled()),t.getOnlineUpdateLocked&&c(t.getOnlineUpdateLocked())},"syncState");return T(),t.subscribe(T)},[t]);let v=e(T=>{y(!0),o(T),t.setSidebar(T).catch(()=>{o(t.getEnabled())}).finally(()=>{y(!1)})},"onToggleSidebar"),x=t.setOnlineUpdate?T=>{t.getOnlineUpdateLocked?.()||(w(!0),a(T),t.setOnlineUpdate(T).catch(()=>{t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled())}).finally(()=>{w(!1)}))}:void 0;return tt(bi,{t:t.t,enabled:s,disabled:E,onToggle:v,onlineUpdateEnabled:f,onlineUpdateDisabled:R||l,onlineUpdateLocked:l,onToggleOnlineUpdate:x})}e(wi,"ArchiveBundleConfigCardWrapper");function cr(t,s){if(Us(),!t.locale)return{isEnabled:e(()=>!1,"isEnabled"),isSupported:e(()=>!1,"isSupported"),setEnabled:e(async()=>!1,"setEnabled"),isOnlineUpdateEnabled:e(()=>!0,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:e(()=>!1,"isOnlineUpdateLocked"),setOnlineUpdate:e(async()=>!1,"setOnlineUpdate"),destroy:e(()=>{},"destroy")};let{callApi:o,renderPanel:f,ns:a}=s,l=!1,c=!1,E=!1,y=null,R=null,w=0,v=!1,x,T=new Set,N=e(()=>{if(!v)for(let U of T)try{U()}catch{}},"notify"),B=e(()=>{if(v||!E||!l||y)return;let U=t.slots.register({name:"main",key:lr,locale:a,inject:e(()=>{let de=typeof s.injectProps=="function"?s.injectProps():{};return Object.assign({t:t.locale?.bind?t.locale.bind(a):void 0},de)},"inject")},de=>tt("div",{className:"dsham_mainPanel"},f(de)));y=typeof U=="function"?U:()=>{}},"mountMain"),F=e(()=>{if(y){try{y()}catch{}y=null}},"unmountMain"),H=e(()=>{if(v||!c||!l||R)return;let U=t.slots.register({name:"sidebar.panellist",id:lr,order:gi,label:e(()=>t.locale.bind(a)("archives.title"),"label"),locale:a},de=>yi(de&&typeof de=="object"&&"size"in de?de:void 0));R=typeof U=="function"?U:()=>{}},"mountRow"),De=e(()=>{if(R){try{R()}catch{}R=null}},"unmountRow"),ne=e(()=>{if(!v)if(l)B(),H();else{if(x?.panelInfo&&typeof x.selectPanel=="function")try{x.panelInfo.getSnapshot().activePanelId===lr&&x.selectPanel(null)}catch{}De(),F()}},"sync"),re=e(async U=>{if(v)return l;let de=++w;l=U,ne(),N();try{return await o("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),U}catch(at){throw de===w&&(l=!U,ne(),N()),at}},"setEnabled"),se=!0,ie=!1,Ne=0,ce=e(async U=>{if(v||ie)return se;let de=++Ne;if(se=U,N(),typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(U)}catch{}try{if(await o("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),de===Ne&&typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(U)}catch{}return U}catch(at){if(de===Ne&&(se=!U,N(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(!U)}catch{}throw at}},"setOnlineUpdate"),Z=w;o("/sidebar-entry").then(U=>{!v&&w===Z&&U&&typeof U.enabled=="boolean"&&(l=U.enabled,ne(),N())}).catch(()=>{});let xt=Ne;o("/online-update").then(U=>{if(!v&&Ne===xt&&U&&typeof U.enabled=="boolean"&&(se=U.enabled,U.locked===!0&&(ie=!0),N(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(se)}catch{}}).catch(()=>{});let Re=t;return typeof Re.inject=="function"&&Re.inject(["layout"],U=>{!v&&U.layout&&(x=U.layout)}),t.slots.inject("main",()=>{if(!v)return E=!0,B(),()=>{E=!1,F()}}),t.slots.inject("sidebar.panellist",()=>{if(!v)return c=!0,H(),()=>{c=!1,De()}}),t.slots.inject("plugins.bundle.config",()=>{if(!v)return t.slots.register({name:"plugins.bundle.config",key:fi,locale:a},U=>U&&U.view==="summary"?null:tt(wi,{t:t.locale.bind(a),getEnabled:e(()=>l,"getEnabled"),setSidebar:re,getOnlineUpdateEnabled:e(()=>se,"getOnlineUpdateEnabled"),setOnlineUpdate:ce,getOnlineUpdateLocked:e(()=>ie,"getOnlineUpdateLocked"),subscribe:e(de=>(T.add(de),()=>{T.delete(de)}),"subscribe")}))}),{isEnabled:e(()=>l,"isEnabled"),isSupported:e(()=>c,"isSupported"),setEnabled:re,isOnlineUpdateEnabled:e(()=>se,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:e(()=>ie,"isOnlineUpdateLocked"),setOnlineUpdate:ce,destroy:e(()=>{v||(v=!0,w++,Ne++,x=void 0,T.clear(),De(),F())},"destroy")}}e(cr,"setupSidebarEntry");function dr(t){if(typeof t!="string"||t.length===0||t.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u957F\u5EA6\u987B\u4E3A 1\uFF5E1024 \u4E2A\u5B57\u7B26");return t}e(dr,"checkedId");var Si={parse(t){let s=le(t);if(!s||typeof s!="object"||typeof s.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:dr(s.sessionId),favorite:s.favorite}}},ki={parse(t){let s=le(t);if(!s||!Array.isArray(s.favoriteSessionIds)||s.favoriteSessionIds.length>1e5)throw new TypeError("\u6536\u85CF\u96C6\u5408\u65E0\u6548");return{favoriteSessionIds:[...new Set(s.favoriteSessionIds.map(dr))]}},safeParse(t){try{return{success:!0,data:this.parse(t)}}catch(s){return{success:!1,error:s}}}};function Hs(){let t=e((s,o)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${s}`,create:e(()=>o,"create"),schema:o}),"codec");return["favoriteSessions","setSessionFavorite"].map(s=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${s}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:s,invocation:{kind:"direct"},parameters:s==="favoriteSessions"?[]:[{name:"input",wire:"input",source:"json",codec:t("FavoriteInput",Si)}],result:t("FavoriteState",ki),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(Hs,"favoriteInvocations");function ur(t,{days:s,now:o=Date.now(),favorites:f=new Set,currentId:a,pending:l=new Map}){if(!t||!Number.isInteger(s)||s<1||s>36500||f.has(t.id)||t.id===a||(t.retainedBy?.mainView??0)>0||t.running||(t.runningSubagentCount??0)>0||t.pendingInteraction!=null||l.has(t.id))return!1;let c=typeof t.updatedAt=="number"?t.updatedAt:Date.parse(t.updatedAt??"");return Number.isFinite(c)&&c<=o-s*864e5}e(ur,"idleArchiveCandidate");async function _n(t,s,{onProgress:o,refresh:f}={}){let a=[...new Set(t.map(dr))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},c=e(()=>o?.({total:a.length,done:l.succeeded.length+l.skipped.length+l.failures.length,succeeded:l.succeeded.length,skipped:l.skipped.length,failed:l.failures.length}),"report");c();for(let E of a){try{(await s(E)?l.succeeded:l.skipped).push(E)}catch(y){l.failures.push({sessionId:E,message:y instanceof Error?y.message:String(y)}),l.remaining.push(E)}c()}try{await f?.()}catch(E){l.refreshError=E instanceof Error?E.message:String(E)}return l}e(_n,"runSessionBatch");function Ws({workspaces:t,sessions:s,archive:o,restore:f,deleteOne:a,getFavorites:l,refresh:c,currentSessionId:E}){return async(y,R,w={})=>{if(!["archive","restore","undo","delete"].includes(y))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return _n(R,async v=>{let T=t.getSnapshot().archivedSessionIds.includes(v);if(y==="archive"){if(T||!s.getSnapshot().byId[v])return!1;if(w.idleDays!==void 0){let De=new Set((await l()).favoriteSessionIds),ne=s.getSnapshot();if(!ur(ne.byId[v],{days:w.idleDays,favorites:De,currentId:E(ne),pending:w.getPending?.()??w.pending}))return!1}return await o(v),t.getSnapshot().archivedSessionIds.includes(v)}return T?y==="delete"?(await a(v),!0):!((await f(v))?.archivedSessionIds??t.getSnapshot().archivedSessionIds).includes(v):!1},{onProgress:w.onProgress,refresh:c})}}e(Ws,"createSessionOrganizer");function xi(t){return!t||t<=0?"0 B":t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/(1024*1024)).toFixed(1)+" MB"}e(xi,"formatBytes");function qs(t,s){let o=t.createElement;function f(l,c){return o(s??(y=>o("button",{type:"button",disabled:y.disabled,onClick:y.onClick},y.children)),{variant:"outline",size:"sm",...c},l)}e(f,"textButton");function a({title:l,failures:c,separator:E}){let[y,R]=t.useState(!1),w=o("ul",null,c.map(v=>o("li",{key:v.sessionId},v.sessionId,E,v.message)));return o(An,{title:l,open:y,onToggle:e(()=>R(v=>!v),"onToggle")},w)}return e(a,"FailureDetails"),e(function({t:c,archived:E,busy:y,ready:R,days:w,onDays:v,count:x,onPreview:T,progress:N,result:B,onRetry:F,undoCount:H,onUndo:De,onReload:ne,orphanCount:re=0,orphanSizeBytes:se=0,orphanCleaning:ie=!1,onCleanOrphans:Ne,cacheCount:ce=0,cacheRepair:Z,onRebuildCaches:xt,onRetryCaches:Re,onReloadCaches:U,onDismissCaches:de}){return o(t.Fragment,null,o("style",null,".dsham_organizer,.dsham_batchFeedback{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}.dsham_organizerControls{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.dsham_organizer label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--dsw-alias-label-primary)}.dsham_number{width:88px;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.dsham_number:hover{border-color:var(--dsw-alias-border-l3)}.dsham_number:focus{outline:none;border-color:var(--dsw-alias-state-business-primary)}.dsham_disclosure{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer}.dsham_foldChevron{transition:transform 150ms ease}.dsham_foldChevron.is-open{transform:rotate(180deg)}.dsham_organizer p,.dsham_batchFeedback p{margin:0;font-size:12px;color:var(--dsw-alias-label-secondary)}.dsham_batchFeedback progress{width:100%}.dsham_batchFeedback details{font-size:12px;overflow-wrap:anywhere}.dsham_archivePreview{max-height:260px;overflow:auto;display:grid;gap:8px;padding:8px 0}.dsham_archivePreview label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere}"),(!E||!R)&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},!R&&f(c("organizer.reloadFavorites"),{disabled:y,onClick:ne}),!E&&o(t.Fragment,null,o("label",null,c("organizer.idleDays"),o(cs,{min:1,max:36500,value:w===""?null:Number(w),disabled:y,"aria-label":c("organizer.idleDays"),onChange:e(at=>v(at==null?"":String(at)),"onChange")})),f(c("organizer.preview",{n:x}),{disabled:y||!R||x===0,onClick:T}))),!E&&o("p",null,c("organizer.rules"))),re>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,c("organizer.orphanTitle",{n:re})),Ne&&f(c(ie?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:y||ie,onClick:Ne})),o("p",null,c("organizer.orphanDesc",{size:xi(se)}))),ce>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,c("organizer.cacheTitle",{n:ce})),xt&&f(c(Z?.busy?"organizer.cacheRebuilding":"organizer.cacheRebuild"),{disabled:y||Z?.busy,onClick:xt})),o("p",null,c("organizer.cacheDesc"))),Z&&(Z.result||Z.progress||Z.error||Z.refreshError)&&o("section",{className:"dsham_batchFeedback","aria-label":c("organizer.cacheRebuild")},Z.progress&&o("div",{role:"status"},o("progress",{value:Z.progress.done,max:Math.max(1,Z.progress.total)}),c("organizer.progressCount",Z.progress)),Z.result&&o("div",{role:"status"},o("p",null,c("organizer.result",{succeeded:Z.result.rebuiltSessionIds.length,skipped:Z.result.skippedSessionIds.length,failed:Z.result.failures.length})),Z.result.failures.length>0&&o(a,{title:c("organizer.failureDetails"),failures:Z.result.failures,separator:c("common.separator")}),Z.result.failures.length>0&&Re&&f(c("organizer.cacheRetry",{n:Z.result.failures.length}),{disabled:y||Z.busy,onClick:Re})),Z.error&&o("p",{role:"alert"},c("organizer.cacheError",{detail:Z.error})),Z.refreshError&&o("p",{role:"alert"},c("organizer.refreshError",{detail:Z.refreshError})),o("div",{className:"dsham_organizerControls"},U&&f(c("organizer.cacheCheck"),{disabled:y||Z.busy,onClick:U}),de&&f(c("organizer.dismiss"),{disabled:y||Z.busy,onClick:de}))),(N||B||H>0)&&o("section",{className:"dsham_batchFeedback","aria-label":c("organizer.feedback")},N&&o("div",{role:"status","aria-live":"polite"},o("progress",{value:N.done,max:Math.max(1,N.total),"aria-label":c("organizer.progress")}),c("organizer.progressCount",{done:N.done,total:N.total})),B&&o("div",{role:"status"},o("strong",null,c(`organizer.${B.kind??"archive"}Result`)),o("p",null,c("organizer.result",{succeeded:B.succeeded.length,skipped:B.skipped.length,failed:B.failures.length})),B.failures.length>0&&o(a,{title:c("organizer.failureDetails"),failures:B.failures,separator:c("common.separator")}),B.refreshError&&o("p",{role:"alert"},c("organizer.refreshError",{detail:B.refreshError})),B.remaining.length>0&&f(c("organizer.retry",{n:B.remaining.length}),{disabled:y,onClick:F})),H>0&&o("div",{className:"dsham_organizerControls"},f(c("organizer.undo",{n:H}),{disabled:y,onClick:De}),o("p",null,c("organizer.undoHint")))))},"OrganizerPanel")}e(qs,"createOrganizerPanel");var Vs={"organizer.cacheTitle":"\u53D1\u73B0 {n} \u4E2A\u4F1A\u8BDD\u7F3A\u5C11\u53EF\u7528\u5217\u8868\u7F13\u5B58","organizer.cacheDesc":"\u68C0\u67E5\u5DE5\u4F5C\u533A\u3001\u672A\u5206\u7EC4\u53CA\u5F52\u6863\u666E\u901A\u4F1A\u8BDD\u7684\u5934\u90E8\u4E0E\u5B98\u65B9\u7F13\u5B58\u3002\u70B9\u51FB\u540E\u9010\u6761\u53EA\u8BFB\u65E5\u5FD7\u5E76\u91CD\u5EFA\u5B98\u65B9\u5217\u8868\u7F13\u5B58\uFF1B\u8DF3\u8FC7\u6D3B\u52A8\u4F1A\u8BDD\uFF0C\u4E0D\u6253\u5F00\u4F1A\u8BDD\u3001\u4E0D\u8C03\u7528\u6A21\u578B\uFF0C\u4E5F\u4E0D\u6539\u53D8\u5F52\u6863\u6216\u5B9A\u65F6\u4EFB\u52A1\u3002\u8D85\u65F6\u8868\u793A\u4FDD\u5B58\u672A\u786E\u8BA4\uFF0C\u53EF\u91CD\u8BD5\u3002","organizer.cacheRebuild":"\u91CD\u5EFA\u5217\u8868\u7F13\u5B58","organizer.cacheRebuilding":"\u91CD\u5EFA\u4E2D\u2026","organizer.cacheRetry":"\u91CD\u8BD5\u5931\u8D25 {n} \u6761","organizer.cacheCheck":"\u5237\u65B0\u5217\u8868\u5E76\u91CD\u65B0\u68C0\u6D4B","organizer.cacheError":"\u7F13\u5B58\u68C0\u6D4B\u5931\u8D25\uFF1A{detail}","organizer.dismiss":"\u5B8C\u6210","organizer.feedback":"\u64CD\u4F5C\u53CD\u9988","organizer.allSessions":"\u5168\u90E8\u4F1A\u8BDD","organizer.favoriteFilter":"\u6536\u85CF\u7B5B\u9009","organizer.archiveResult":"\u5F52\u6863\u7ED3\u679C","organizer.restoreResult":"\u6062\u590D\u7ED3\u679C","organizer.deleteResult":"\u5220\u9664\u7ED3\u679C","organizer.undoResult":"\u64A4\u56DE\u7ED3\u679C","organizer.favorite":"\u6536\u85CF","organizer.unfavorite":"\u53D6\u6D88\u6536\u85CF","organizer.favoritesOnly":"\u53EA\u770B\u6536\u85CF","organizer.reloadFavorites":"\u91CD\u65B0\u52A0\u8F7D\u6536\u85CF","organizer.idleDays":"\u95F2\u7F6E\u5929\u6570","organizer.preview":"\u9884\u89C8\u95F2\u7F6E\u5F52\u6863\uFF08{n}\uFF09","organizer.rules":"\u6309\u6700\u540E\u6D3B\u52A8\u65F6\u95F4\u7B5B\u9009\uFF0C\u9075\u5FAA\u5F53\u524D\u5217\u8868\u7B5B\u9009\u6761\u4EF6\uFF1B\u6392\u9664\u6536\u85CF\u3001\u5F53\u524D\u6253\u5F00\u3001\u6B63\u5728\u6267\u884C\u53CA\u7B49\u5F85\u4EA4\u4E92\u7684\u4F1A\u8BDD\u3002","organizer.progress":"\u6279\u91CF\u64CD\u4F5C\u8FDB\u5EA6","organizer.progressCount":"\u5DF2\u5904\u7406 {done} / {total}","organizer.result":"\u6210\u529F {succeeded} \xB7 \u8DF3\u8FC7 {skipped} \xB7 \u5931\u8D25 {failed}","organizer.failureDetails":"\u67E5\u770B\u5931\u8D25\u8BE6\u60C5","organizer.refreshError":"\u64CD\u4F5C\u7ED3\u679C\u5DF2\u4FDD\u7559\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF1A{detail}","organizer.retry":"\u91CD\u8BD5\u5269\u4F59 {n} \u6761","organizer.undo":"\u64A4\u56DE\u672C\u6B21\u5F52\u6863\uFF08{n}\uFF09","organizer.undoHint":"\u4EC5\u4FDD\u7559\u672C\u6B21\u6253\u5F00\u7BA1\u7406\u9875\u671F\u95F4\u6700\u8FD1\u4E00\u6279\u5F52\u6863\uFF1B\u5173\u95ED\u9875\u9762\u6216\u5237\u65B0\u540E\u6E05\u9664\u3002\u64A4\u56DE\u4E0D\u4F1A\u6062\u590D\u5DF2\u5220\u9664\u7684\u4F1A\u8BDD\u3002","organizer.idleConfirm":"\u8BF7\u68C0\u67E5\u4EE5\u4E0B\u5019\u9009\uFF0C\u53EF\u53D6\u6D88\u52FE\u9009\uFF1B\u6267\u884C\u524D\u518D\u6B21\u6392\u9664\u6536\u85CF\u53CA\u6D3B\u8DC3\u4F1A\u8BDD\u3002","organizer.manualConfirm":"\u4EC5\u5F52\u6863\u4EE5\u4E0B\u52FE\u9009\u4F1A\u8BDD\uFF1B\u53EF\u9010\u6761\u53D6\u6D88\u3002\u5F52\u6863\u540E\u53EF\u64A4\u56DE\u672C\u6279\u64CD\u4F5C\u3002","organizer.orphanTitle":"\u53D1\u73B0 {n} \u4E2A\u65E0\u4E3B\u5B64\u513F\u5B50\u4EE3\u7406","organizer.orphanDesc":"\u6BCD\u4F1A\u8BDD\u5DF2\u88AB\u5916\u90E8\u5220\u9664\uFF0C\u8FD9\u4E9B\u5B50\u4EE3\u7406\u5728\u65E5\u5E38\u804A\u5929\u5217\u8868\u4E2D\u4E0D\u53EF\u89C1\uFF0C\u5171\u5360\u7528\u7EA6 {size} \u78C1\u76D8\u7A7A\u95F4\u3002\u6E05\u7406\u4E0D\u53EF\u64A4\u9500\u3002","organizer.cleanOrphans":"\u6E05\u7406\u5168\u90E8\u5B64\u513F","organizer.cleaning":"\u6E05\u7406\u4E2D\u2026","organizer.orphanCleanSuccess":"\u5DF2\u6210\u529F\u6E05\u7406 {n} \u4E2A\u65E0\u4E3B\u5B50\u4EE3\u7406\u4F1A\u8BDD\u3002"},Gs={"organizer.cacheTitle":"Found {n} sessions without usable list caches","organizer.cacheDesc":"Checks headers and official caches for workspace, ungrouped, and archived ordinary sessions. On click, reads logs one at a time and rebuilds official caches. Skips active sessions; never opens sessions, calls models or changes archives or schedules. Timeout means persistence is unconfirmed and can be retried.","organizer.cacheRebuild":"Rebuild list caches","organizer.cacheRebuilding":"Rebuilding\u2026","organizer.cacheRetry":"Retry {n} failed","organizer.cacheCheck":"Refresh lists and check again","organizer.cacheError":"Cache check failed: {detail}","organizer.dismiss":"Done","organizer.feedback":"Operation feedback","organizer.allSessions":"All sessions","organizer.favoriteFilter":"Favorites filter","organizer.archiveResult":"Archive results","organizer.restoreResult":"Restore results","organizer.deleteResult":"Delete results","organizer.undoResult":"Undo results","organizer.favorite":"Favorite","organizer.unfavorite":"Unfavorite","organizer.favoritesOnly":"Favorites only","organizer.reloadFavorites":"Reload favorites","organizer.idleDays":"Idle days","organizer.preview":"Preview idle archives ({n})","organizer.rules":"Uses last activity, the current list filters. Excludes favorites, open, running and waiting sessions.","organizer.progress":"Batch progress","organizer.progressCount":"Processed {done} / {total}","organizer.result":"Succeeded {succeeded} \xB7 Skipped {skipped} \xB7 Failed {failed}","organizer.failureDetails":"Failure details","organizer.refreshError":"Results retained, but refresh failed: {detail}","organizer.retry":"Retry remaining {n}","organizer.undo":"Undo this archive batch ({n})","organizer.undoHint":"Only the latest archive batch while this page is open is retained. Closing or refreshing clears undo. Deleted sessions cannot be restored.","organizer.idleConfirm":"Review and deselect candidates. Favorites and active sessions are checked again before archiving.","organizer.manualConfirm":"Only checked sessions below will be archived. You can undo this batch afterward.","organizer.orphanTitle":"Found {n} orphan subagents","organizer.orphanDesc":"Parent sessions were deleted externally. These subagents are hidden from normal chat lists and occupy ~{size} disk space. Removal cannot be undone.","organizer.cleanOrphans":"Clean up all orphans","organizer.cleaning":"Cleaning up\u2026","organizer.orphanCleanSuccess":"Successfully cleaned up {n} orphan subagent sessions."},$s={"organizer.cacheTitle":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E {n} \u0441\u0435\u0441\u0441\u0438\u0439 \u0431\u0435\u0437 \u043F\u0440\u0438\u0433\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u0435\u0448\u0430 \u0441\u043F\u0438\u0441\u043A\u0430","organizer.cacheDesc":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E\u0442\u0441\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0438 \u0438 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043A\u0435\u0448 \u0441\u0435\u0441\u0441\u0438\u0439 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439, \u0431\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B \u0438 \u0430\u0440\u0445\u0438\u0432\u0430. \u041F\u043E \u043D\u0430\u0436\u0430\u0442\u0438\u044E \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u043F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u0435\u0448\u0430. \u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F; \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F, \u043C\u043E\u0434\u0435\u043B\u0438 \u043D\u0435 \u0432\u044B\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F, \u0430\u0440\u0445\u0438\u0432\u044B \u0438 \u0440\u0430\u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043D\u0435 \u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F. \u0422\u0430\u0439\u043C-\u0430\u0443\u0442 \u043E\u0437\u043D\u0430\u0447\u0430\u0435\u0442 \u043D\u0435\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D\u043D\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435; \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u0432\u0442\u043E\u0440.","organizer.cacheRebuild":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u0435\u0448 \u0441\u043F\u0438\u0441\u043A\u043E\u0432","organizer.cacheRebuilding":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435\u2026","organizer.cacheRetry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C {n} \u043E\u0448\u0438\u0431\u043E\u043A","organizer.cacheCheck":"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043A\u0438 \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C","organizer.cacheError":"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0435\u0448\u0430: {detail}","organizer.dismiss":"\u0413\u043E\u0442\u043E\u0432\u043E","organizer.feedback":"\u041E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438","organizer.allSessions":"\u0412\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","organizer.favoriteFilter":"\u0424\u0438\u043B\u044C\u0442\u0440 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E","organizer.archiveResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438","organizer.restoreResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F","organizer.deleteResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F","organizer.undoResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043E\u0442\u043C\u0435\u043D\u044B","organizer.favorite":"\u0412 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.unfavorite":"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E","organizer.favoritesOnly":"\u0422\u043E\u043B\u044C\u043A\u043E \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.reloadFavorites":"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.idleDays":"\u0414\u043D\u0438 \u043F\u0440\u043E\u0441\u0442\u043E\u044F","organizer.preview":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0430\u0440\u0445\u0438\u0432\u0430 \u043F\u0440\u043E\u0441\u0442\u043E\u044F ({n})","organizer.rules":"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044E\u044E \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C \u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B \u0441\u043F\u0438\u0441\u043A\u0430. \u0418\u0441\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435, \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435, \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0435 \u0438 \u043E\u0436\u0438\u0434\u0430\u044E\u0449\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438.","organizer.progress":"\u0425\u043E\u0434 \u043F\u0430\u043A\u0435\u0442\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438","organizer.progressCount":"\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E {done} / {total}","organizer.result":"\u0423\u0441\u043F\u0435\u0448\u043D\u043E {succeeded} \xB7 \u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E {skipped} \xB7 \u041E\u0448\u0438\u0431\u043E\u043A {failed}","organizer.failureDetails":"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u043E\u0448\u0438\u0431\u043E\u043A","organizer.refreshError":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B, \u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043F\u0438\u0441\u043A\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C: {detail}","organizer.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044F {n}","organizer.undo":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u0442\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044E ({n})","organizer.undoHint":"\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u043F\u0430\u043A\u0435\u0442\u043D\u0430\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F, \u043F\u043E\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430 \u044D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430. \u0417\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u0438\u043B\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0431\u0440\u0430\u0441\u044B\u0432\u0430\u0435\u0442 \u043E\u0442\u043C\u0435\u043D\u0443. \u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.","organizer.idleConfirm":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u0430\u043D\u0434\u0438\u0434\u0430\u0442\u043E\u0432, \u043C\u043E\u0436\u043D\u043E \u0441\u043D\u044F\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443. \u041F\u0435\u0440\u0435\u0434 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0435\u0439 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u044E\u0442\u0441\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E.","organizer.manualConfirm":"\u0411\u0443\u0434\u0443\u0442 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u0441\u0435\u0441\u0441\u0438\u0438. \u042D\u0442\u0443 \u043F\u0430\u043A\u0435\u0442\u043D\u0443\u044E \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E \u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0436\u0435.","organizer.orphanTitle":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E {n} \u043E\u0441\u0438\u0440\u043E\u0442\u0435\u0432\u0448\u0438\u0445 \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432","organizer.orphanDesc":"\u0420\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0431\u044B\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0438\u0437\u0432\u043D\u0435. \u041F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u044B \u0441\u043A\u0440\u044B\u0442\u044B \u0438\u0437 \u043E\u0431\u044B\u0447\u043D\u044B\u0445 \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0447\u0430\u0442\u043E\u0432 \u0438 \u0437\u0430\u043D\u0438\u043C\u0430\u044E\u0442 ~{size} \u0434\u0438\u0441\u043A\u043E\u0432\u043E\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","organizer.cleanOrphans":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435\u0445 \u0441\u0438\u0440\u043E\u0442","organizer.cleaning":"\u041E\u0447\u0438\u0441\u0442\u043A\u0430\u2026","organizer.orphanCleanSuccess":"\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u043E\u0441\u0438\u0440\u043E\u0442\u0435\u0432\u0448\u0438\u0445 \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432."};var Gt=Function("return globalThis.__dshArchiveReactDOM")(),Ks=Function("return globalThis.__dshArchiveReactDOMClient")(),Ys=Gt.createPortal,Go=Gt.flushSync,$o=Ks?.createRoot,Ko=Ks?.hydrateRoot,Yo=Gt.findDOMNode,Zo=Gt.unmountComponentAtNode,Jo=Gt.unstable_batchedUpdates,Qo=Gt.version;function Ci(t){var s={exports:{}},o=s.exports;Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});let f=t("@deepseek-ai/dsh-client-store"),a=t("react/jsx-runtime"),l=t("react"),c=t("@deepseek-ai/dsh-client-ui-primitives");function E({open:n,onClose:r,title:i,description:u,footer:m,children:p,className:k,width:b}){let A=l.useRef(null),z=l.useCallback(()=>A.current?.closest(".dsham_settings")??document.body,[]),[I,D]=l.useState(null);l.useEffect(()=>{if(!n){D(null);return}D(z())},[n,z]),l.useEffect(()=>{if(!n)return;let h=e(ue=>{ue.key==="Escape"&&(ue.preventDefault(),ue.stopPropagation(),"stopImmediatePropagation"in ue&&typeof ue.stopImmediatePropagation=="function"&&ue.stopImmediatePropagation(),r())},"onKey");return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[n,r]);let P=(0,a.jsxs)("div",{className:"dsham_modalRoot",role:"presentation",children:[(0,a.jsx)("div",{className:"dsham_modalMask",onClick:r}),(0,a.jsxs)("div",{role:"dialog","aria-modal":!0,"aria-label":typeof i=="string"?i:void 0,className:Xs("dsham_modalDialog",k),style:{width:b??560},children:[(0,a.jsx)("h2",{children:i}),u!=null&&(0,a.jsx)("p",{children:u}),p!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:p}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:m})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{refObject:A,getContainer:z}),n&&I?Ys(P,I):null]})}e(E,"SettingsModal");function y({refObject:n,getContainer:r}){return(0,a.jsx)("span",{hidden:!0,ref:n,"data-get-container":r})}e(y,"SettingsModalAnchor");function R({variant:n="outline",icon:r,children:i,className:u,disabled:m,title:p,onClick:k,"aria-label":b,"aria-pressed":A,"aria-expanded":z,"aria-haspopup":I}){return(0,a.jsx)(c.Button,{variant:n,size:"sm",className:u,disabled:m,title:p,onClick:k,"aria-label":b,"aria-pressed":A,"aria-expanded":z,"aria-haspopup":I,icon:r,children:i})}e(R,"settingsButton");function w({variant:n="outline",danger:r=!1,disabled:i,onClick:u,children:m}){return(0,a.jsx)(c.Button,{variant:r?"outline":n,className:r?"dsham_btnDanger":void 0,disabled:i,onClick:u,children:m})}e(w,"modalFooterButton");function v(n,r){let i={className:n?"dsham_archiveTabsLocked":void 0,children:r};return n&&(i.inert=""),i}e(v,"tabsShell");let x=qs(l,c.Button),{HighlightedText:T,useArchiveSearch:N,useArchivePreview:B,DiscoveryFilters:F,SearchStatus:H,PreviewContent:De}=ws(l,{Button:c.Button,SegmentedControl:c.SegmentedControl}),ne={refresh:["M13.5 5.5V2.5m0 0h-3m3 0-2.1 2.1A5.5 5.5 0 1 0 13.2 12"],download:["M8 2v8m0 0 3-3m-3 3-3-3M3 13v2h10v-2"],copy:["M5 5h8v8H5z","M3 3h8"],close:["m4 4 8 8M12 4 4 12"]};function re(n){let r=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 16 16"),i.setAttribute("width","16"),i.setAttribute("height","16"),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","1.5"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-linejoin","round"),i.setAttribute("aria-hidden","true");for(let u of ne[n]){let m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",u),i.append(m)}return r.append(i),r}e(re,"createPluginUpdateIcon");let se={parse(n){if(typeof n!="string"||n.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(n)}`);return n}},ie={parse(n){let r=le(n);if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError("result must be an object");let i=r.archivedSessionIds;if(!Array.isArray(i)||i.some(u=>typeof u!="string"))throw new TypeError("archivedSessionIds must be a string array");return r}},Ne={parse(n){let r=le(n);if(typeof r!="object"||r===null||Array.isArray(r)||r.deleted!==!0)throw new TypeError("deleted must be true");return r}},ce={parse(n){let r=le(n);if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError("target must be an object");if(r.scope==="all"||r.scope==="ungrouped"||r.scope==="workspace"&&typeof r.workspaceId=="string"&&r.workspaceId.length>0||r.scope==="sessions"&&Array.isArray(r.sessionIds)&&r.sessionIds.length>0&&r.sessionIds.every(i=>typeof i=="string"&&i.length>0))return r;throw new TypeError("target.scope must be all, ungrouped, workspace with a non-empty workspaceId, or sessions with non-empty sessionIds")}},Z={parse(n){let r=le(n);if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError("result must be an object");for(let i of["requestedSessionIds","deletedSessionIds","skippedSessionIds"])if(!Array.isArray(r[i])||r[i].some(u=>typeof u!="string"))throw new TypeError(`${i} must be a string array`);if(!Array.isArray(r.failures)||r.failures.some(i=>typeof i!="object"||i===null||typeof i.sessionId!="string"||typeof i.message!="string"))throw new TypeError("failures must contain sessionId/message objects");return r}},xt={parse(n){let r=le(n);if(typeof r!="object"||r===null||Array.isArray(r)||!Array.isArray(r.items))throw new TypeError("result.items must be an array");if(r.items.some(i=>typeof i!="object"||i===null||typeof i.sessionId!="string"||typeof i.createdAt!="number"||!Number.isFinite(i.createdAt)))throw new TypeError("items must contain sessionId/createdAt objects");return r}};function Re(n,r){return{mode:"strict",typeSymbol:n,create:e(()=>r,"create"),schema:r}}e(Re,"strictCodec");let U={package:"@michengai/dsh-archive-manager",descriptors:[...Hs(),...gs(),...As(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Re("@deepseek-ai/dsh-session/types#SessionId",se)}],result:Re("@michengai/dsh-archive-manager/types#ArchivedSessionIds",ie),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Re("@deepseek-ai/dsh-session/types#SessionId",se)}],result:Re("@michengai/dsh-archive-manager/types#Deleted",Ne),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteArchivedSessions",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteArchivedSessions",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",codec:Re("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",ce)}],result:Re("@michengai/dsh-archive-manager/types#DeletedBatch",Z),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/archivedSessionMetadata",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"archivedSessionMetadata",invocation:{kind:"direct"},parameters:[],result:Re("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",xt),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/diagnoseOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"diagnoseOrphanSubagents",invocation:{kind:"direct"},parameters:[],result:Re("@michengai/dsh-archive-manager/types#OrphanSubagentDiagnosis",{parse(n){let r=le(n);if(!r||typeof r.count!="number"||!Array.isArray(r.items)||typeof r.totalSizeBytes!="number")throw new TypeError("invalid orphan subagent diagnosis");return r}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/cleanOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"cleanOrphanSubagents",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",acceptsUndefined:!0,codec:Re("@michengai/dsh-archive-manager/types#CleanOrphanTarget",{parse(n){if(n==null)return{};let r=le(n);if(!r)throw new TypeError("target must be an object");if(r.sessionIds!==void 0&&(!Array.isArray(r.sessionIds)||r.sessionIds.some(i=>typeof i!="string")))throw new TypeError("sessionIds must be an array of strings");return r}})}],result:Re("@michengai/dsh-archive-manager/types#CleanOrphanResult",{parse(n){let r=le(n);if(!r||!Array.isArray(r.cleanedSessionIds)||!Array.isArray(r.skippedSessionIds)||!Array.isArray(r.failures))throw new TypeError("invalid orphan subagent clean result");return r}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]};function de(n,r){if(typeof document>"u"||document.querySelector("style[data-plugin-css="+JSON.stringify(n)+"]")!==null)return;let i=document.createElement("style");i.dataset.plugin="@michengai/dsh-archive-manager",i.dataset.pluginCss=n,i.textContent=r,document.head.appendChild(i)}e(de,"ensurePluginStyle"),de("dsh-archive-manager/DangerButton.css",".dsham_btnDanger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272);border-color:var(--dsw-alias-state-error-primary,#ef7272)}"),de("dsh-archive-manager/IconAction.css",".dsham_iconAction{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:22px!important;min-width:22px!important;height:22px!important;padding:0!important;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px)!important;background:transparent;color:var(--dsw-alias-label-secondary)}.dsham_iconAction:not(:disabled):hover{color:var(--dsw-alias-link,#4176e6)!important;border-color:var(--dsw-alias-link,#4176e6)!important}.dsham_iconAction.dsham_iconDanger{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction.dsham_iconDanger:not(:disabled):hover{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction svg{width:16px!important;height:16px!important;flex:none!important}"),de("dsh-archive-manager/Modal.css",".dsham_modalRoot{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.dsham_modalMask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1,rgb(0 0 0 / 45%))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;max-width:calc(100vw - 48px);max-height:min(80vh,720px);padding:22px 24px 20px;overflow:hidden;border:0;border-radius:var(--dsw-radius-panel,28px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px}.dsham_modalDialog>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dsham_modalBody{display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}.dsham_modalFooter{display:flex;flex:none;align-items:center;justify-content:flex-end;gap:8px}"),de("dsh-archive-manager/SidebarPopover.css",".dsham_sidebarCardRoot{position:fixed;inset:0;z-index:1200;pointer-events:none}.dsham_sidebarCardBackdrop{position:fixed;inset:0;pointer-events:auto;background:transparent}.dsham_sidebarCard{position:fixed;pointer-events:auto;box-sizing:border-box;width:290px;max-height:calc(100vh - 32px);overflow-y:auto;padding:16px 18px 14px;border-radius:var(--dsw-radius-lg,14px);background:var(--dsw-menu-surface-fill);backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));border:none;box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:8px}.dsham_sidebarCardTitle{margin:0;font-size:14px;font-weight:600;line-height:20px;color:var(--dsw-alias-label-primary)}.dsham_sidebarCardDesc{margin:0;font-size:13px;line-height:18px;color:var(--dsw-alias-label-secondary)}.dsham_sidebarCardError{margin-top:2px;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary,#ef7272);white-space:pre-line}.dsham_sidebarCardFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.dsham_sidebarCardBtn{border:none;background:transparent;padding:5px 12px;border-radius:var(--dsw-radius-sm,6px);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:background-color .15s ease,opacity .15s ease}.dsham_sidebarCardBtnCancel{color:var(--dsw-alias-label-primary)}.dsham_sidebarCardBtnCancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dsham_sidebarCardBtnDanger{color:var(--dsw-alias-state-error-primary,#ef7272)}.dsham_sidebarCardBtnDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,#f25a5a26)}.dsham_sidebarCardBtn:disabled{opacity:.4;cursor:default}");let Nt="M8 1.75l1.934 3.918 4.324.628-3.129 3.05.738 4.306L8 11.618l-3.867 2.034.738-4.306-3.129-3.05 4.324-.628L8 1.75z";function dn(n){return n?'<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="'+Nt+'"/></svg>':'<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round" aria-hidden="true"><path d="'+Nt+'"/></svg>'}e(dn,"starSvg"),de("dsh-archive-manager/RowFavorite.css",".dsham_starSlot{display:none;align-items:center;justify-content:center;box-sizing:border-box;width:16px;min-width:16px;height:20px;flex:none;margin:0 3px 0 0}[data-row-key^='session:']:hover .dsham_starSlot,.dsham_starSlot[data-favorited='true']{display:inline-flex}.dsham_rowStar{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:16px;height:16px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;border-radius:var(--dsw-radius-xs,4px)}.dsham_starSlot[data-favorited='true'] .dsham_rowStar{color:#e8b931}.dsham_rowStar svg{display:block;width:14px;height:14px;flex:none}");let _="dsh-archive-manager:workspace-favorites-only",J="data-dsham-favorites-hidden",Le="data-dsham-favorites-only",zt="dsham_rowStar",Bt="dsham_starSlot",jn=["\u4EC5\u663E\u793A\u5DF2\u5F52\u6863","Archived only","\u0422\u043E\u043B\u044C\u043A\u043E \u0430\u0440\u0445\u0438\u0432\u043D\u044B\u0435"];de("dsh-archive-manager/FavoritesFilter.css",`[data-dsham-favorites-hidden='true']{display:none!important}button[data-dsham-favorites-only='true'][data-active='true']::after{content:"\\2713";margin-left:auto;padding-left:12px;font-size:12px;line-height:1;color:var(--dsw-alias-state-business-primary,#3b82f6)}`);function Dn(){try{return window.localStorage.getItem(_)==="1"}catch{return!1}}e(Dn,"readWorkspaceFavoritesOnly");function X(n){try{window.localStorage.setItem(_,n?"1":"0")}catch{}}e(X,"writeWorkspaceFavoritesOnly");function _e(n,r){let i=e(p=>r.favorites.has(p)||r.sessions?.[p]?.blank===!0,"visibleSession"),u=new Map,m=null;for(let p of n){if(p.startsWith("workspace:")){m=p,u.set(p,!1);continue}p.startsWith("session:")&&m!==null&&i(p.slice(8))&&u.set(m,!0)}return n.map(p=>p.startsWith("session:")?i(p.slice(8)):p.startsWith("workspace:")?u.get(p)===!0||r.groupHasFavorite?.(p.slice(10))===!0:!p.startsWith("overflow:"))}e(_e,"favoritesOnlyVisibility");function nt(n,r){let i=new Map,u=new Set;for(let p of r){let k=!1;for(let b of p.sessionIds)u.add(b),n.has(b)&&(k=!0);i.set(p.workspaceId,k)}let m=!1;for(let p of n)if(!u.has(p)){m=!0;break}return p=>p===""||p==="ungrouped"?m:i.get(p)===!0}e(nt,"favoriteGroupPredicate");function Kt(n,r,i){let u={dispose:e(()=>{},"dispose")};if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return u;let m=Dn(),p=!1,k=!1,b=0,A=200,z=null,I=new Set,D=e(V=>{let ze=r.getSnapshot();for(let Ie of V){let fe=Ie.getAttribute("data-row-key")??"";if(!fe.startsWith("session:"))continue;let rt=fe.slice(8),Ke=Array.from(Ie.children).find(ee=>ee.tagName==="SPAN"&&Array.from(ee.classList).some(Je=>Je==="slot"||Je.endsWith("_slot")))??null;if(Ke===null)continue;let W=Array.from(Ie.children).find(ee=>ee.classList.contains(Bt))??null;if(!ze.ready){W?.remove();continue}W!==null&&W.previousElementSibling!==Ke&&(W.remove(),W=null),W===null&&(W=document.createElement("span"),W.className=Bt,Ke.after(W)),W.dataset.sessionId=rt;let q=W.querySelector("."+zt);q===null&&(q=document.createElement("button"),q.type="button",q.className=zt,q.addEventListener("click",ee=>{ee.preventDefault(),ee.stopPropagation(),r.toggle(W?.dataset.sessionId??"")}),W.appendChild(q));let Oe=ze.ids.has(rt);if(W.dataset.favorited===String(Oe))continue;let Ze=i()(Oe?"organizer.unfavorite":"organizer.favorite");W.dataset.favorited=String(Oe),q.setAttribute("aria-pressed",String(Oe)),q.setAttribute("aria-label",Ze),q.title=Ze,q.innerHTML=dn(Oe)}},"ensureRowStars"),P=e(V=>{let ze=r.getSnapshot();if(!m||!ze.ready){for(let W of V)W.hasAttribute(J)&&W.removeAttribute(J);b=0,z=null,I.clear();return}let Ie=V.map(W=>W.getAttribute("data-row-key")??""),fe=nt(ze.ids,n.workspaces.list?.getSnapshot?.()?.items??[]),rt=_e(Ie,{favorites:ze.ids,sessions:n.sessions.list?.getSnapshot?.()?.byId,groupHasFavorite:fe});z!==null&&(V.length<=z.rows&&I.add(z.key),z=null);let Ke=!1;if(b<A)for(let W=0;W<V.length;W+=1){let q=V[W],Oe=Ie[W];if(!Oe.startsWith("overflow:")||q.getAttribute("aria-expanded")!=="false")continue;let Ze=Oe.slice(9);if(!(I.has(Ze)||!fe(Ze))){try{q.click(),b+=1,z={key:Ze,rows:V.length},Ke=!0}catch(ee){console.warn("archive-manager: favorites-only expand failed",ee)}break}}for(let W=0;W<V.length;W+=1){let q=V[W];rt[W]?q.hasAttribute(J)&&q.removeAttribute(J):q.setAttribute(J,"true")}Ke&&me()},"applyVisibility"),h=e(V=>{let ze=V.parentElement;if(ze===null)return null;let Ie=ze.cloneNode(!0),fe=Ie.querySelector('button[role="menuitem"]');if(fe===null)return null;let rt=Array.from(fe.querySelectorAll("span")),Ke=rt[0]??null,W=rt[rt.length-1]??null;Ke!==null&&(Ke.innerHTML=dn(!1)),W!==null&&(W.textContent=i()("organizer.favoritesOnly"));for(let q of Array.from(fe.querySelectorAll("svg")))q.closest("span")===null&&q.remove();return fe.setAttribute(Le,"true"),fe.setAttribute("role","menuitemcheckbox"),fe.dataset.active=String(m),fe.setAttribute("aria-checked",String(m)),fe.setAttribute("aria-label",i()("organizer.favoritesOnly")),fe.onclick=q=>{q.preventDefault(),q.stopPropagation(),he(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0}))},Ie},"buildMenuRow"),ue=e(()=>{if(!p){for(let V of Array.from(document.querySelectorAll("button["+Le+"]")))V.dataset.active=String(m),V.setAttribute("aria-checked",String(m));for(let V of Array.from(document.querySelectorAll('[role="menu"]'))){let ze=Array.from(V.querySelectorAll('button[role="menuitem"]')).find(rt=>jn.some(Ke=>(rt.textContent??"").includes(Ke)));if(ze===void 0||V.querySelector("["+Le+"]")!==null)continue;let Ie=ze.parentElement;if(Ie===null)continue;let fe=h(ze);fe!==null&&Ie.parentElement?.insertBefore(fe,Ie.nextSibling)}}},"injectMenuRows"),me=e(()=>{if(k||p)return;k=!0;let V=e(()=>{if(k=!1,p)return;let ze=Array.from(document.querySelectorAll("[data-row-key]"));ue(),D(ze),P(ze),r.getSnapshot().ready||gt()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(V):setTimeout(V,16)},"schedulePass"),he=e(()=>{m=!m,it=20,b=0,z=null,I.clear(),X(m),me()},"toggle"),Ue=null,it=20,gt=e(()=>{Ue!==null||p||it<=0||(it-=1,Ue=setTimeout(()=>{Ue=null,r.ensure(),me()},600))},"scheduleRetry"),Y=new MutationObserver(V=>{vn(V,'[data-row-key], [role="menu"]')&&me()});Y.observe(document.body,{childList:!0,subtree:!0}),r.ensure().catch(()=>{});let be=[r.subscribe(()=>me()),typeof n.sessions.list?.subscribe=="function"?n.sessions.list.subscribe(()=>me()):null,typeof n.workspaces.list?.subscribe=="function"?n.workspaces.list.subscribe(()=>me()):null].filter(V=>typeof V=="function");return me(),{dispose(){p=!0,Y.disconnect();for(let V of be)V();for(let V of Array.from(document.querySelectorAll("["+J+"]")))V.removeAttribute(J);for(let V of Array.from(document.querySelectorAll("["+Le+"]")))V.parentElement?.remove();for(let V of Array.from(document.querySelectorAll("."+Bt)))V.remove();Ue!==null&&(clearTimeout(Ue),Ue=null)}}}e(Kt,"setupWorkspaceFavoritesOnly");function hr(){let n,r={ready:!1,ids:new Set,pending:new Set},i,u=0,m=new Set,p=e(b=>{r=b;for(let A of m)try{A()}catch(z){console.warn("archive-manager: favorite listener failed",z)}},"publish"),k=e((b,A)=>{let z=new Set(b);for(let h of r.pending)h!==A&&(r.ids.has(h)?z.add(h):z.delete(h));let I=new Set(r.pending);A!==void 0?I.delete(A):r.pending.size===0&&I.clear();let D=r.ids.size===z.size&&[...z].every(h=>r.ids.has(h)),P=r.pending.size===I.size&&[...I].every(h=>r.pending.has(h));D&&P&&r.ready||p({ready:!0,ids:z,pending:I})},"adopt");return{bind(b){n=b},subscribe(b){return m.add(b),()=>{m.delete(b)}},getSnapshot:e(()=>r,"getSnapshot"),adopt:e(b=>k(b),"adopt"),ensure(){return n===void 0||r.ready?Promise.resolve():i!==void 0?i:Date.now()<u?Promise.resolve():(i=n.favoriteSessions().then(b=>{k(b.favoriteSessionIds)}).catch(b=>{console.warn("archive-manager: load favorites failed, will retry",b),u=Date.now()+600}).finally(()=>{i=void 0}),i)},async toggle(b){if(n===void 0||!r.ready||r.pending.has(b))return;let A=r.ids.has(b),z=!A,I=new Set(r.ids);z?I.add(b):I.delete(b);let D=new Set(r.pending);D.add(b),p({ready:!0,ids:I,pending:D});try{let P=await n.setSessionFavorite({sessionId:b,favorite:z});if(!Array.isArray(P?.favoriteSessionIds))throw new TypeError("favorite response is missing favoriteSessionIds");k(P.favoriteSessionIds,b)}catch(P){console.warn("archive-manager: sidebar favorite toggle failed",P);let h=new Set(r.ids);A?h.add(b):h.delete(b);let ue=new Set(r.pending);ue.delete(b),p({ready:!0,ids:h,pending:ue})}}}}e(hr,"createFavoriteRowStore");function hn(n){let r=new Map;for(let i of Object.values(n)){if(i.origin!=="subagent")continue;let u=new Set,m=i;for(;m?.origin==="subagent"&&m.parentId!==void 0&&!u.has(m.id);){u.add(m.id);let p=r.get(m.parentId);p===void 0?r.set(m.parentId,{count:1,runningCount:i.running?1:0}):(p.count+=1,i.running&&(p.runningCount+=1)),m=n[m.parentId]}}return r}e(hn,"indexSubagentDescendants");let Ai="__flat_session_order__",pn="dsh.archive-manager.workspace.view.v1",pr="dsh.workspace.view.v5";function mr(n){let r=n??globalThis.localStorage;if(r==null||typeof r.getItem!="function"||typeof r.setItem!="function")return!1;try{if(r.getItem(pn)!=null)return!1;let i=r.getItem(pr);return i==null?!1:(r.setItem(pn,i),!0)}catch{return!1}}e(mr,"migrateWorkspaceViewPersist");function Zs(){return mr(),(0,f.defineStore)({init:e(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:pn,actions:{setGroupBy:e((n,r)=>{n.groupBy=r},"setGroupBy"),setOrderBy:e((n,r)=>{n.orderBy=r},"setOrderBy"),setShowArchived:e((n,r)=>{n.showArchived=r===!0},"setShowArchived"),setGroupExpanded:e((n,r,i)=>{n.groupExpansion[r]=i},"setGroupExpanded"),retainAccountKeys:e((n,r)=>{let i=new Set(r);n.groupExpansion=Object.fromEntries(Object.entries(n.groupExpansion).filter(([u])=>i.has(u))),n.sessionOrderByAccount=Object.fromEntries(Object.entries(n.sessionOrderByAccount).filter(([u])=>i.has(u))),n.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(n.sessionUpdatedAtByAccount).filter(([u])=>i.has(u)))},"retainAccountKeys"),syncSessionOrderAccount:e((n,r,i,u)=>{n.sessionOrderByAccount[r]=i,n.sessionUpdatedAtByAccount[r]=u},"syncSessionOrderAccount"),setSessionOrder:e((n,r,i)=>{n.sessionOrderByAccount[r]=i},"setSessionOrder")}})}e(Zs,"createWorkspaceViewStore");function Js(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,a.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}e(Js,"GithubMark16");function Qs(){let n=c.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}e(Qs,"FeedbackIcon");function Nn({archiveSessions:n,archiveSession:r,sessionStore:i,workspaceStore:u,unarchiveSession:m,deleteSession:p,unarchiveSessions:k,deleteArchivedSessions:b,archivedSessionMetadata:A,openConversation:z,focusSessionWorkspace:I,viewState:D,close:P,t:h,diagnoseOrphanSubagents:ue,cleanOrphanSubagents:me,diagnoseSessionCaches:he,rebuildSessionCaches:Ue,refreshCacheLists:it,searchSessionContent:gt,searchArchivedContent:Y,previewArchivedSession:be,favoriteSessions:V,setSessionFavorite:ze,favoriteSync:Ie,organizeBatch:fe,useSessionPendingInteraction:rt,useSessionStatus:Ke}){let W=(0,l.useSyncExternalStore)(i.subscribe,i.getSnapshot),q=(0,l.useSyncExternalStore)(u.subscribe,u.getSnapshot),[Oe,Ze]=(0,l.useState)("archived"),ee=Oe==="archived",[Je,ct]=(0,l.useState)(null),[Jt,vt]=(0,l.useState)(null),[yt,Mt]=(0,l.useState)(null),Pt=e((d,C=null)=>{G(null),Me(null),Xe(!1),vt(C),ct(d)},"requestArchive"),Ht=e(()=>{K||(ct(null),vt(null),G(null))},"closeArchive"),ot=(0,l.useRef)(!1),[Ce,It]=(0,l.useState)(null),Qt=(0,l.useRef)(!1),[K,He]=(0,l.useState)(!1),[dt,G]=(0,l.useState)(null),[Xt,Me]=(0,l.useState)(null),Lt=e(d=>{G(null),Me(null),It(d)},"requestDelete"),[ut,en]=(0,l.useState)(D?.query??""),[Qe,Wt]=(0,l.useState)(D?.project??"all"),[bt,g]=(0,l.useState)(D?.sortBy??"updated"),[S,O]=(0,l.useState)({}),[te,Ee]=(0,l.useState)(()=>new Set),Q=(0,l.useRef)(new Set),[Ae,we]=(0,l.useState)([]),[Se,Te]=(0,l.useState)([]),[We,lt]=(0,l.useState)(!1),[wt,pe]=(0,l.useState)(!1),ae=(0,l.useRef)(!1),[M,oe]=(0,l.useState)(!1),[je,ke]=l.useState("content"),[qe,Ve]=l.useState(""),[Ye,ht]=l.useState(""),[Fe,Be]=(0,l.useState)(()=>new Set),[ge,Rt]=(0,l.useState)("30"),[pt,Xe]=(0,l.useState)(!1),[xe,st]=(0,l.useState)(null),[tn,bn]=(0,l.useState)(null),[Gn,wn]=(0,l.useState)([]),Et=(0,l.useRef)(!1),$n=(0,l.useRef)(null),Kn=la(rt??aa,Ke??ia,typeof Ke=="function"),Wr=(0,l.useRef)(Kn.pending);Wr.current=Kn.pending;let _t=(0,l.useMemo)(()=>new Set(Se),[Se]),_a=e(async()=>{if(V)try{let d=await V();Te(d.favoriteSessionIds),lt(!0),Ie?.adopt(d.favoriteSessionIds)}catch(d){lt(!1),G(Pe(d))}},"loadFavorites");(0,l.useEffect)(()=>{let d=!0;return V&&V().then(C=>{d&&(Te(C.favoriteSessionIds),lt(!0),Ie?.adopt(C.favoriteSessionIds))}).catch(C=>{d&&G(Pe(C))}),()=>{d=!1}},[V]),(0,l.useEffect)(()=>{if(Ie)return Ie.subscribe(()=>{let d=Ie.getSnapshot();d.ready&&(Te([...d.ids]),lt(!0))})},[Ie]);let Ta=e(async d=>{if(!(ae.current||K||!We)){ae.current=!0,pe(!0),G(null);try{let C=await ze({sessionId:d,favorite:!_t.has(d)});Te(C.favoriteSessionIds),Ie?.adopt(C.favoriteSessionIds)}catch(C){G(Pe(C))}finally{ae.current=!1,pe(!1)}}},"toggleFavorite"),Sn=e(async(d,C,{idle:$=!1,retry:ve=!1}={})=>{if(!(Et.current||ae.current||Q.current.size>0||!fe)){Et.current=!0,He(!0),G(null),Me(null),bn(null),d==="archive"&&!ve&&wn([]);try{let j=await fe(d,C,{idleDays:$?Number(ge):void 0,getPending:e(()=>Wr.current,"getPending"),onProgress:e(ye=>{st(ye),d==="archive"&&ye.total>0&&ye.done>=ye.total&&(ct(null),vt(null),Xe(!1))},"onProgress")});return bn({...j,kind:d,tab:Oe}),$n.current=j.remaining.length?{kind:d,ids:j.remaining,idle:$}:null,d==="archive"&&wn(ye=>[...new Set([...ye,...j.succeeded])]),(d==="undo"||d==="restore"||d==="delete")&&wn(ye=>ye.filter(et=>!j.succeeded.includes(et)&&!j.skipped.includes(et))),we(ye=>ye.filter(et=>!j.succeeded.includes(et)&&!j.skipped.includes(et))),d==="delete"&&Te(ye=>ye.filter(et=>!j.succeeded.includes(et))),j}catch(j){G(Pe(j))}finally{Et.current=!1,He(!1),st(null)}}},"executeBatch"),[qr,ja]=(0,l.useState)(null),[Vr,Da]=(0,l.useState)({diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null}),mt=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!he||!Ue||!it)return;let d=Is({diagnose:he,rebuild:Ue,refresh:it});mt.current=d;let C=d.subscribe(()=>{Da(d.snapshot())});return d.load(),()=>{C(),d.dispose(),mt.current=null}},[he,Ue,it]),(0,l.useEffect)(()=>{mt.current?.snapshot().busy||mt.current?.load()},[q.archivedSessionIds]);let Gr=e(async(d=!1)=>{if(!(K||Et.current||!mt.current||mt.current.snapshot().busy)){Et.current=!0,He(!0);try{await mt.current.run(d)}finally{Et.current=!1,St.current&&He(!1)}}},"runCacheRebuild"),[$r,Kr]=(0,l.useState)(!1),Yr=e(()=>{typeof ue=="function"&&ue().then(ja).catch(d=>{console.warn("archive-manager: diagnose orphan subagents failed",d)})},"loadOrphans");(0,l.useEffect)(()=>{Yr()},[q.archivedSessionIds]);let Na=e(async()=>{if(!($r||typeof me!="function")){Kr(!0),G(null),Me(null);try{let d=await me({});(d.cleanedSessionIds.length>0||d.skippedSessionIds.length>0)&&Yr(),d.failures.length>0?(Me(null),G(fn(d.failures,h))):d.cleanedSessionIds.length>0&&(G(null),Me(h("organizer.orphanCleanSuccess",{n:d.cleanedSessionIds.length})))}catch(d){G(Pe(d))}finally{Kr(!1)}}},"cleanOrphans"),St=(0,l.useRef)(!0),Yn=(0,l.useRef)(!1);(0,l.useEffect)(()=>(St.current=!0,()=>{St.current=!1}),[]);let kn=e(async(d,C=!1)=>{if(K||Yn.current)return;Yn.current=!0,He(!0),G(null);let $=!1;try{await _s({prepare:C?async ve=>{await I?.(ve)}:void 0,restore:e(async ve=>{await m(ve),$=!0},"restore"),open:e(async ve=>{await z(ve),St.current&&P?.()},"open")},d.id,C,()=>St.current)}catch(ve){if(!St.current)return;if($){Ze("unarchived");let j=Tt.find(ye=>ye.sessions.some(et=>et.id===d.id));j!==void 0&&Wt(j.key)}G(Rs(ve,h))}finally{Yn.current=!1,St.current&&He(!1)}},"viewConversation");(0,l.useEffect)(()=>{D&&Object.assign(D,{query:ut,project:Qe,sortBy:bt})},[ut,Qe,bt,D]);let xn=(0,l.useMemo)(()=>ee?q.archivedSessionIds:Mr(W.byId,q.archivedSessionIds),[ee,W.byId,q.archivedSessionIds]),Tt=(0,l.useMemo)(()=>Pr(W.byId,q.items,xn,h("group.ungrouped")),[W.byId,q,xn,h]),za=e(d=>{K||Q.current.size>0||(ft.close(),Ze(d),we([]),ct(null),vt(null),G(null),Me(null),Wt("all"),en(""),d!=="archived"&&bt==="archived"&&g("updated"))},"switchTab"),Zr=e(async(d,C=!1)=>{if(!(ot.current||K||!d?.length)){if(fe){ot.current=!0;try{let $=await Sn("archive",d,{idle:C}),ve=$?.failures.map(j=>br(j.sessionId,j.message)).find(j=>j!==void 0);if(ve!==void 0&&typeof r=="function"){let j=W.byId[ve.sessionId];Mt({sessionId:ve.sessionId,title:j===void 0?ve.sessionId:Ge(j,h),kinds:ve.kinds.join(", ")}),ct(null),vt(null),G(null);return}$&&(ct(null),vt(null),Xe(!1))}finally{ot.current=!1}return}ot.current=!0,He(!0),G(null),Me(null);try{let $=await n(d);ct(null),vt(null),$.archivedSessionIdsAdded.length>0&&Me(h("archives.archiveSuccess",{n:$.archivedSessionIdsAdded.length})),$.failures&&$.failures.length>0?G(fn($.failures,h)):(we([]),Ze("archived"),Wt("all"),en(""))}catch($){let ve=yr($);if(ve!==void 0&&typeof r=="function"){let j=W.byId[ve.sessionId];Mt({sessionId:ve.sessionId,title:j===void 0?ve.sessionId:Ge(j,h),kinds:ve.kinds.join(", ")}),ct(null),vt(null),G(null)}else{let j=gn($);G(j===void 0?h("archives.archiveBatchFailed",{detail:$ instanceof Error?$.message:String($)}):h("archives.archiveActive",{kinds:j.join(", ")}))}}finally{ot.current=!1,He(!1)}}},"performArchive"),Oa=e(()=>Zr(Je,pt),"confirmArchive"),Ma=e(async d=>{G(null),Me(null);try{await fs(d.id),St.current&&Me(h("details.copied"))}catch(C){St.current&&G(typeof En(C)=="string"&&String(En(C)).startsWith("copy.")?h(String(En(C))):Pe(C))}},"copyId"),Zn=(0,l.useMemo)(()=>Lr(Tt,bt,S,h,ee?q.archivedSessionIds:void 0),[Tt,bt,S,h,ee,q.archivedSessionIds]);(0,l.useEffect)(()=>{if(K)return;let d=!1;return A().then(C=>{d||O(Object.fromEntries(C.items.map($=>[$.sessionId,$.createdAt])))}).catch(()=>{d||O({})}),()=>{d=!0}},[A,q.archivedSessionIds,K]),(0,l.useEffect)(()=>{Qe!=="all"&&!Tt.some(d=>d.key===Qe)&&Wt("all")},[Tt,Qe]);let Jr=!sr(qe,Ye),Qr=Zn.filter(d=>Qe==="all"||Qe===d.key).map(d=>({...d,sessions:d.sessions.filter(C=>(!M||_t.has(C.id))&&ys(C.updatedAt,qe,Ye))})).filter(d=>d.sessions.length),Jn=je==="content"&&!Jr,nn=N(Qr.flatMap(d=>d.sessions.map(C=>C.id)),ut,Jn,gt??Y),Qn=new Map(nn.items.map(d=>[d.sessionId,d])),ft=B(be,ee?q.archivedSessionIds:[]),Xr=ut.trim().toLocaleLowerCase(),rn=Qr.map(d=>({...d,sessions:d.sessions.filter(C=>!Xr||Ge(C,h).toLocaleLowerCase().includes(Xr)||Qn.has(C.id))})).filter(d=>d.sessions.length),es=We?rn.flatMap(d=>d.sessions).filter(d=>ur(d,{days:Number(ge),favorites:_t,currentId:kt(W),pending:Kn.pending})).map(d=>d.id):[],sn=(0,l.useMemo)(()=>Nr(rn),[rn]),Xn=(0,l.useMemo)(()=>new Set(Ae),[Ae]),Pa=(0,l.useMemo)(()=>{let d=new Set(q.archivedSessionIds);return Gn.reduce((C,$)=>C+(d.has($)?1:0),0)},[Gn,q.archivedSessionIds]),er=sn.filter(d=>Xn.has(d)).length,La=sn.length>0&&er===sn.length;(0,l.useEffect)(()=>{we(d=>zr(d,xn))},[xn]);let Fa=e((d,C)=>{we($=>Wn($,[d],C))},"toggleSessionSelection"),Ba=e(d=>{we(C=>Wn(C,sn,d))},"toggleVisibleSelection"),Ua=e(d=>{K||Q.current.has(d)||(Q.current.add(d),Ee(new Set(Q.current)),G(null),Me(null),m(d).catch(C=>{G(gr(C,h))}).finally(()=>{Q.current.delete(d),Ee(new Set(Q.current))}))},"onUnarchive"),ts=e(async d=>{if(!K){if(fe){let C=Zt(q.archivedSessionIds,q.items,d),$=await Sn("restore",C);return $&&{unarchivedSessionIds:$.succeeded}}He(!0),G(null),Me(null);try{let C=await k(d);return C.unarchivedSessionIds.length>0&&Me(h("archives.restoreSuccess",{n:C.unarchivedSessionIds.length})),C.failures&&C.failures.length>0&&G(fn(C.failures,h,gr)),C}catch(C){G(h("archives.restoreBatchFailed",{detail:C instanceof Error?C.message:String(C)}))}finally{He(!1)}}},"onBatchUnarchive"),Ha=e(async()=>{if(Ae.length===0)return;let d=await ts({scope:"sessions",sessionIds:Ae});if(d!==void 0){let C=new Set(d.unarchivedSessionIds);we($=>$.filter(ve=>!C.has(ve)))}},"onSelectedUnarchive"),ns=e(()=>{K||It(null)},"closeDelete");(0,l.useEffect)(()=>{if(Ce===null)return;let d=e(C=>{C.key==="Escape"&&(C.preventDefault(),C.stopPropagation(),"stopImmediatePropagation"in C&&typeof C.stopImmediatePropagation=="function"&&C.stopImmediatePropagation(),K||It(null))},"onKeyDown");return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[Ce,K]);let Wa=e(async()=>{if(K||Qt.current||Ce===null)return;if(Ce.kind!=="batch"){Qt.current=!0,He(!0),G(null),Me(null);try{await p(Ce.session.id),It(null)}catch(C){G(On(C,h))}finally{Qt.current=!1,He(!1)}return}if(Et.current||ae.current||Q.current.size>0)return;let{target:d}=Ce;if(d.scope==="sessions"&&Zt(q.archivedSessionIds,q.items,d).length===0){It(null);return}Et.current=!0,He(!0),G(null),Me(null),bn(null),st(null);try{let C=await b(d),$=Or(C,h);$.kind==="error"?G($.message):Me($.message);let ve=new Set([...C.deletedSessionIds,...C.skippedSessionIds]);wn(ye=>ye.filter(et=>!ve.has(et))),we(ye=>ye.filter(et=>!ve.has(et))),Te(ye=>ye.filter(et=>!ve.has(et)));let j=C.failures.map(ye=>ye.sessionId);$n.current=j.length>0?{kind:"delete",ids:j,idle:!1}:null,bn({requested:C.requestedSessionIds,succeeded:C.deletedSessionIds,skipped:C.skippedSessionIds,failures:C.failures,remaining:j,refreshError:"refreshError"in C&&typeof C.refreshError=="string"?C.refreshError:null,kind:"delete",tab:Oe}),It(null)}catch(C){G(On(C,h))}finally{Et.current=!1,He(!1)}},"confirmDelete"),At=Ce?.kind==="batch"?Ce.target.scope:null,qa=At==="ungrouped"?h("archives.deleteUngroupedTitle"):At==="workspace"?h("archives.deleteProjectTitle",{name:Ce?.kind==="batch"?Ce.title:""}):h(At==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),rs=Ce===null?void 0:At==="ungrouped"?h("archives.deleteUngroupedDesc",{n:Ce.kind==="batch"?Ce.count:0}):At==="workspace"?h("archives.deleteProjectDesc",{name:Ce?.kind==="batch"?Ce.title:"",n:Ce.kind==="batch"?Ce.count:0}):At==="sessions"?h("archives.deleteSelectedDesc",{n:Ce.kind==="batch"?Ce.count:0}):h("deleteSession.desc",{name:Ge(Ce.kind==="session"?Ce.session:{},h)}),Va=h(At==="ungrouped"?"archives.deleteUngroupedConfirm":At==="workspace"?"archives.deleteProjectConfirm":At==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:pa+ga+va+ya+ba}),(0,a.jsxs)("div",{className:"dsham_settingsHeader",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"dsham_settingsTitleRow",children:[(0,a.jsx)("h2",{children:h("archives.title")}),(0,a.jsxs)("div",{className:"dsham_settingsLinks",children:[(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.viewProject"),icon:(0,a.jsx)(Js,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:h("archives.viewProject")}),(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.feedback"),icon:(0,a.jsx)(Qs,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:h("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:h("archives.description")})]}),l.createElement("div",v(K||te.size>0,(0,a.jsx)(c.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:Oe==="unarchived"?"unarchived":"archived",onChange:e(d=>za(d==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconArchiveOutlineMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.archived")})]}),id:"dsham-tab-archived",panelId:"dsham-archive-panel"},{value:"unarchived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconFolderCloseMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.unarchived")})]}),id:"dsham-tab-unarchived",panelId:"dsham-archive-panel"}]})))]}),(0,a.jsxs)("div",{id:"dsham-archive-panel",role:"region","aria-label":h(Oe==="unarchived"?"archives.tab.unarchived":"archives.tab.archived"),children:[(0,a.jsx)("div",{className:"dsham_settingsToolbar",children:(0,a.jsxs)("div",{className:"dsham_settingsSearch",children:[(0,a.jsx)(Hn,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:M?"favorites":"all",options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:e(d=>typeof oe=="function"&&oe(d==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),(0,a.jsx)(Hn,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:je,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}],onChange:e(d=>typeof ke=="function"&&ke(d),"onChange"),"aria-label":h("discovery.scope")}),(0,a.jsx)(c.Input,{id:"dsham-search-input",className:"dsham_searchField",type:"search",icon:(0,a.jsx)(c.IconSearchOutlineMedium,{size:16,"aria-hidden":!0}),autoComplete:"off",spellCheck:!1,maxLength:200,value:ut,onChange:e(d=>en(d.target.value),"onChange"),placeholder:h(Jn?"discovery.searchPlaceholder":ee?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(Jn?"discovery.searchPlaceholder":ee?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)(wa,{id:"dsham-sort-filter",t:h,disabled:K,favoritesOnly:M,setFavoritesOnly:oe,favoriteBusy:K||wt||!We,sortBy:!ee&&bt==="archived"?"updated":bt,setSortBy:g,options:[...ee?[{value:"archived",label:h("archives.sortArchived")}]:[],{value:"updated",label:h("archives.sortUpdated")},{value:"created",label:h("archives.sortCreated")},{value:"alphabetical",label:h("archives.sortAlphabetical")}]}),(0,a.jsx)(Hn,{id:"dsham-project-filter",className:"dsham_projectFilter",value:Qe,title:Qe==="all"?h("archives.allProjects"):Zn.find(d=>d.key===Qe)?.title??Qe,options:[{value:"all",label:h("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:h("archives.allProjects")},...Zn.map(d=>({value:d.key,label:d.title,title:d.title}))],onChange:Wt,"aria-label":h("archives.projectFilter")}),l.createElement(F,{t:h,from:qe,to:Ye,onFrom:Ve,onTo:ht,invalid:Jr,onClear:e(()=>{Ve(""),ht("")},"onClear")})]})}),l.createElement("style",null,Ss),l.createElement(H,{state:nn,t:h}),fe&&(0,a.jsx)(x,{t:h,archived:ee,busy:K||wt||te.size>0,ready:We,days:ge,onDays:Rt,count:es.length,onPreview:e(()=>{Pt(es),Xe(!0)},"onPreview"),progress:xe,result:tn?.tab===Oe?tn:null,onRetry:e(()=>{let d=$n.current;d&&(d.kind==="delete"?Lt({kind:"batch",target:{scope:"sessions",sessionIds:d.ids},count:d.ids.length}):Sn(d.kind,d.ids,{idle:d.idle,retry:!0}))},"onRetry"),undoCount:Pa,onUndo:e(()=>Sn("undo",Gn,{retry:!0}),"onUndo"),onReload:_a,orphanCount:qr?.count??0,cacheCount:Vr.diagnosis.count,cacheRepair:Vr,onRebuildCaches:e(()=>Gr(),"onRebuildCaches"),onRetryCaches:e(()=>Gr(!0),"onRetryCaches"),onReloadCaches:e(async()=>{try{await it?.(),await mt.current?.load(),(mt.current?.snapshot().diagnosis.count??0)===0&&mt.current?.dismiss()}catch(d){St.current&&G(Pe(d))}},"onReloadCaches"),onDismissCaches:e(()=>mt.current?.dismiss(),"onDismissCaches"),orphanSizeBytes:qr?.totalSizeBytes??0,orphanCleaning:$r,onCleanOrphans:Na}),Tt.length>0&&(0,a.jsx)(Tr,{selectedCount:Ae.length,hiddenCount:Ae.length-er,allVisibleSelected:La,selectedVisibleCount:er,visibleCount:sn.length,busy:K,t:h,onToggle:Ba,onClear:e(()=>we([]),"onClear"),onArchive:ee?void 0:()=>Pt([...Ae]),onRestore:Ha,onDelete:e(()=>Lt({kind:"batch",target:{scope:"sessions",sessionIds:Ae},count:Ae.length}),"onDelete")}),Tt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(ee?"archives.empty":"archives.emptyUnarchived")}):rn.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:nn.status==="loading"||nn.status==="error"||nn.failures.length?null:h("archives.emptyFiltered")}):rn.map(d=>{let C=xa(d.key),$=Tt.find(j=>j.key===d.key)?.sessions.map(j=>j.id)??[],ve=ee?Zt(q.archivedSessionIds,q.items,C).length:$.length;return(0,a.jsxs)("section",{className:"dsham_settingsGroup",children:[(0,a.jsxs)("div",{className:"dsham_settingsGroupHeading",children:[(0,a.jsx)("h3",{className:"dsham_settingsGroupTitle",children:(0,a.jsxs)("button",{type:"button",className:"dsham_groupToggle","aria-expanded":!Fe.has(d.key),"aria-controls":"dsham-group-"+encodeURIComponent(d.key),onClick:e(()=>Be(j=>{let ye=new Set(j);return ye.has(d.key)?ye.delete(d.key):ye.add(d.key),ye}),"onClick"),children:[(0,a.jsx)(Fe.has(d.key)?c.IconChevronRightOutlineMedium:c.IconChevronDownOutlineMedium,{}),(0,a.jsx)(c.IconFolderOpenOutlineMedium,{}),(0,a.jsx)("span",{children:d.title})]})}),(0,a.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,a.jsx)("span",{className:"dsham_settingsCount",children:h("archives.sessionCount",{n:d.sessions.length})}),(0,a.jsx)(ka,{group:d,busy:K,onArchive:ee?void 0:()=>Pt($,d),onRestore:e(()=>ts(C),"onRestore"),onDelete:e(()=>Lt({kind:"batch",target:C,title:d.title,count:ve}),"onDelete"),t:h})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(d.key),hidden:Fe.has(d.key)||void 0,children:!Fe.has(d.key)&&d.sessions.map(j=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":Xn.has(j.id),children:[(0,a.jsx)(jr,{checked:Xn.has(j.id),disabled:K,label:h("archives.selectSession",{name:Ge(j,h)}),onChange:e(ye=>Fa(j.id,ye.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:Ge(j,h),"aria-label":h("archives.openSession")+h("common.separator")+Ge(j,h),disabled:K||te.has(j.id),onClick:e(()=>kn(j),"onClick"),children:Ge(j,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[ha(j.updatedAt,h)]}),Qn.has(j.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:K,title:h(ee?"discovery.preview":"archives.openSession"),onClick:e(()=>ee?ft.open(j,ut):kn(j),"onClick")},l.createElement(T,{text:Qn.get(j.id)?.snippet??"",query:ut}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof ze=="function"&&R({variant:"outline",className:"dsham_iconAction"+(_t.has(j.id)?" dsham_favoriteOn":""),title:h(_t.has(j.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":_t.has(j.id),"aria-label":h(_t.has(j.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+Ge(j,h),disabled:K||wt||!We,onClick:e(()=>Ta(j.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:_t.has(j.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:Nt})})}),R({variant:"outline",className:"dsham_iconAction",title:h(ee?"archives.restore":"archives.archiveSelected"),"aria-label":h(ee?"archives.restore":"archives.archiveSelected"),disabled:K||te.has(j.id),onClick:e(()=>ee?Ua(j.id):Zr([j.id]),"onClick"),icon:(0,a.jsx)(ee?c.IconRefreshOutlineMedium:c.IconArchiveOutlineMedium,{size:16})}),ee&&(0,a.jsx)(Sa,{busy:K||te.has(j.id),t:h,title:Ge(j,h),onCopyId:e(()=>Ma(j),"onCopyId"),onPreview:typeof be=="function"?()=>ft.open(j,ut):void 0,onRestoreOpen:e(()=>kn(j,!0),"onRestoreOpen"),onDelete:e(()=>Lt({kind:"session",session:j}),"onDelete")})]})]},j.id))})]},d.key)}),l.createElement(E,{width:900,open:ft.target!==null,onClose:ft.close,title:ft.target?Ge(ft.target.session,h):h("discovery.preview"),footer:w({variant:"primary",disabled:K,onClick:e(()=>{if(ft.target){let d=ft.target.session;return ft.close(),kn(d)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(De,{preview:ft,t:h,MarkdownText:c.MarkdownText})}),Je===null&&dt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:dt}),Xt!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:Xt}),(0,a.jsx)(E,{open:Je!==null,onClose:Ht,title:h("archives.archiveTitle",{n:Je?.length??0}),description:Jt===null?h("archives.archiveSelectedDesc"):h(Jt.key===yn?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:Jt.title,n:Je?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[w({disabled:K,onClick:Ht,children:h("cancel")}),w({variant:"primary",disabled:K||!Je?.length,onClick:Oa,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[fe&&(0,a.jsx)("p",{children:h(pt?"organizer.idleConfirm":"organizer.manualConfirm")}),fe&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(Je??[]).map(d=>(0,a.jsxs)("label",{children:[(0,a.jsx)(tr,{checked:!0,disabled:K,label:Ge(W.byId[d]??{id:d},h),onChange:e(()=>ct(C=>(C??[]).filter($=>$!==d)),"onChange")}),Ge(W.byId[d]??{id:d},h)]},d))}),xe&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:xe.done,max:Math.max(1,xe.total)}),h("organizer.progressCount",{done:xe.done,total:xe.total})]}),dt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:dt})]})}),(0,a.jsx)(E,{open:yt!==null,onClose:e(()=>{K||(Mt(null),G(null))},"onClose"),title:h("archiveActive.title"),...yt===null?{}:{description:h("archiveActive.desc",{name:yt.title,kinds:yt.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[w({disabled:K,onClick:e(()=>{K||(Mt(null),G(null))},"onClick"),children:h("cancel")}),w({danger:!0,disabled:K,onClick:e(async()=>{if(!(ot.current||K||yt===null||typeof r!="function")){ot.current=!0,He(!0),G(null);try{await r(yt.sessionId,{stopActivity:!0}),we(d=>d.filter(C=>yt===null||C!==yt.sessionId)),Ze("archived"),Me(h("archives.archiveSuccess",{n:1})),Mt(null)}catch(d){G(d instanceof Error?d.message:String(d))}finally{ot.current=!1,He(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:dt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:dt})}),(0,a.jsx)(E,{open:Ce!==null,onClose:ns,title:qa,...rs===void 0?{}:{description:rs},footer:(0,a.jsxs)(a.Fragment,{children:[w({disabled:K,onClick:ns,children:h("cancel")}),w({danger:!0,disabled:K,onClick:Wa,children:Va})]}),children:(0,a.jsxs)(a.Fragment,{children:[K&&(0,a.jsxs)("div",{role:"status",children:[Ce?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),xe&&(0,a.jsx)("progress",{value:xe.done,max:Math.max(1,xe.total),"aria-label":h("organizer.progress")}),xe&&h("organizer.progressCount",{done:xe.done,total:xe.total})]}),dt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:dt})]})})]})]})}e(Nn,"ArchivedSessionsSection");function fr(n){var r,i,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var m=n.length;for(r=0;r<m;r++)n[r]&&(i=fr(n[r]))&&(u&&(u+=" "),u+=i)}else for(i in n)n[i]&&(u&&(u+=" "),u+=i);return u}e(fr,"r");function Xs(...n){for(var r,i,u=0,m="",p=arguments.length;u<p;u++)(r=arguments[u])&&(i=fr(r))&&(m&&(m+=" "),m+=i);return m}e(Xs,"clsx");let zn="Ungrouped";function ea(n,r=zn){if(n===void 0||n==="")return r;let i=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return i!==void 0&&i!==""?i:n}e(ea,"workspaceLabel");function Yt(n,r){return r.updatedAt!==n.updatedAt?r.updatedAt-n.updatedAt:n.id<r.id?-1:1}e(Yt,"byRecency");function Ut(n,r,i,u){return n.origin!=="subagent"&&(!i.has(n.id)||u===!0)&&(!n.blank||n.id===r)}e(Ut,"sessionVisible");function mn(n){let r=n instanceof Error?n.message:String(n);return r.includes("UNKNOWN_SESSION")||r.includes("no such session")}e(mn,"isUnknownSessionError");function On(n,r){if(mn(n))return r("deleteSession.unknown");let i=n instanceof Error?n.message:String(n);return r("deleteSession.failed",{detail:i})}e(On,"formatDeleteError");function gr(n,r){if(mn(n))return r("archives.unarchiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.unarchiveFailed",{detail:i})}e(gr,"formatUnarchiveError");function fn(n,r,i=vr){return n.map(u=>u.sessionId+r("common.separator")+i(new Error(u.message),r)).join(`
|
|
22
|
+
`)}e(fn,"formatBatchFailures");function vr(n,r){if(mn(n))return r("archives.archiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.archiveFailed",{detail:i})}e(vr,"formatArchiveError");function gn(n){if(n===null||typeof n!="object")return;let r=le(n),i=r.rpcError!==null&&typeof r.rpcError=="object"?le(r.rpcError):void 0,u=r.name==="WorkspaceActiveSessionError"?r.activity:void 0,m=i?.details,p=r.name==="WorkspaceArchiveError"&&i?.code==="workspace/session-active"&&m!==null&&typeof m=="object"?le(m).activity:void 0,k=Array.isArray(u)?u:Array.isArray(p)?p:void 0;if(k===void 0)return;let b=k.flatMap(A=>{if(A===null||typeof A!="object")return[];let z=le(A).kind;return typeof z=="string"&&z.length>0?[z]:[]});return b.length>0?b:void 0}e(gn,"activeSessionActivity");function yr(n){let r=gn(n);if(r===void 0||n===null||typeof n!="object")return;let i=le(n),u=i.rpcError!==null&&typeof i.rpcError=="object"?le(i.rpcError).details:void 0,m=u!==null&&typeof u=="object"?le(u).sessionId:void 0,p=typeof i.sessionId=="string"?i.sessionId:typeof m=="string"?m:void 0;return p===void 0?void 0:{sessionId:p,kinds:r}}e(yr,"activeSessionRefusal");function br(n,r){let i=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(r);if(i===null)return;let u=i[1].split(", ").filter(m=>m.length>0);return u.length>0?{sessionId:n,kinds:u}:void 0}e(br,"activeArchiveFromMessage");function ta(n,r){let i=n instanceof Error?n.message:String(n);return r("archives.forkFailed",{detail:i})}e(ta,"formatForkError");function Mn(n){return n.blank?"New Session":n.displayTitle}e(Mn,"sessionTitle");function wr(n,r,i,u,m,p,k){let b=[...p];return k==="recency"&&b.sort(Yt),{key:n,workspaceId:r,cwd:i,createdAt:u,label:m,sessions:b}}e(wr,"buildGroup");function na(n,r){let i=new Map(n.map(p=>[p.id,p])),u=new Set,m=[];for(let p of r){let k=i.get(p);k===void 0||u.has(p)||(m.push(k),u.add(p))}for(let p of[...n].sort(Yt))u.has(p.id)||m.push(p);return m}e(na,"orderedUngrouped");function Sr(n,r,i,u,m){let p=[],k=new Set;for(let A of r){let z=[];for(let I of A.sessionIds){let D=n.byId[I];D!==void 0&&(k.add(I),Ut(D,kt(n),i,m)&&z.push(D))}p.push(wr(A.workspaceId,A.workspaceId,A.path,Date.parse(A.createdAt),A.title,z,"account"))}let b=n.ids.map(A=>n.byId[A]).filter(A=>A!==void 0&&!k.has(A.id)&&Ut(A,kt(n),i,m));return b.length>0&&p.push(wr("",void 0,void 0,void 0,zn,u===void 0?b:na(b,u),u===void 0?"recency":"account")),p}e(Sr,"groupByWorkspace");function Pn(n,r,i){if(!n||i.has(n))return!1;let u=r?.[n];return!(u===void 0||u.origin==="subagent"||u.blank)}e(Pn,"isWorkspaceTaskCandidate");function kr(n){let r=n?.closest("[data-row-key]")??null;if(r===null)return null;let i=r.getAttribute("data-row-key")??"";if(!i.startsWith("workspace:"))return null;let u=i.slice(10);if(!u)return null;let m=r.querySelector(".title")??r.querySelector("[class*='title']");return{workspaceId:u,title:m?.textContent?.trim()||u}}e(kr,"workspaceMenuTriggerFrom");function Ln(n,r=!0){let i=(n.textContent??"").toLowerCase();return i.includes("\u5220\u9664\u5DE5\u4F5C\u533A")||i.includes("delete workspace")||i.includes("\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435")?!0:r&&/(?:^|[_\s-])danger(?:$|[_\s-])/i.test(n.className)}e(Ln,"isWorkspaceDeleteMenuItem");function ra(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}e(ra,"visiblePendingKind");function xr(n,r){let i=r.get(n.id),u=i===void 0?n.pendingInteraction:i.kind;return ra(u)}e(xr,"pendingInteractionForSession");let Fn=new Map,Bn=new Set,sa=new Map;function aa(n){return n(Fn)}e(aa,"useEmptySessionPendingInteraction");function ia(n){return n(sa)}e(ia,"useEmptySessionStatus");function Cr(n){return n instanceof Map||n==null?{pending:n??Fn,completed:Bn}:{pending:n.pending??Fn,completed:n.completed??Bn}}e(Cr,"pendingFacts");function oa(n){let r=new Map,i=new Set;if(n instanceof Map)for(let[u,m]of n)m?.pendingInteraction!==void 0&&r.set(u,m.pendingInteraction),m?.completionUnread===!0&&i.add(u);return{pending:r,completed:i}}e(oa,"factsFromSessionStatus");function la(n,r,i){let u=n(p=>p),m=r(p=>p);return i?oa(m):{pending:u,completed:Bn}}e(la,"useSessionUiFacts");function Er(n,r,i,u){let m=Cr(u),p=xr(n,m.pending);return{id:n.id,title:Mn(n),blank:n.blank,running:n.running,runningSubagentCount:r.get(n.id)?.runningCount??0,completed:n.completed===!0||m.completed.has(n.id),updatedAt:n.updatedAt,archived:i.has(n.id),...p===void 0?{}:{pendingInteraction:p}}}e(Er,"sessionNode");function ca(n,r,i,u,m){let p=new Set(i),k=new Set(m.expandedGroups),b=hn(n.byId),A=kt(n),z=A===void 0?void 0:r.find(D=>D.sessionIds.includes(A))?.workspaceId??"",I=[];for(let D of Sr(n,r,p,m.ungroupedOrder,m.showArchived)){let P=k.has(D.key);I.push({key:D.key,workspaceId:D.workspaceId,cwd:D.cwd,createdAt:D.createdAt,label:D.label,sessionCount:D.sessions.length,expanded:P,containsCurrent:D.key===z,sessions:P?D.sessions.map(h=>Er(h,b,p,u)):[]})}return I}e(ca,"deriveGroups");function da(n,r,i,u){let m=new Set(r),p=hn(n.byId),k=[];for(let b of n.ids){let A=n.byId[b];A===void 0||!Ut(A,kt(n),m,u)||k.push(A)}return k.sort(Yt),k.map(b=>Er(b,p,m,i))}e(da,"deriveFlat");function ua(n,r,i,u,m,p,k,b,A=zn){let z=i.trim().toLowerCase();if(z==="")return{items:[],hasMore:!1};let I=new Set(u),D=hn(n.byId),P=new Map;for(let Y of r)for(let be of Y.sessionIds)P.has(be)||P.set(be,Y.title);let h=e(Y=>P.get(Y.id)??ea(Y.cwd,A),"labelOf"),ue=new Map;for(let Y of p.items)ue.has(Y.sessionId)||ue.set(Y.sessionId,Y);let me=[];for(let Y of n.ids){let be=n.byId[Y];be===void 0||be.blank||!Ut(be,kt(n),I,b)||(Mn(be).toLowerCase().includes(z)||h(be).toLowerCase().includes(z))&&me.push(be)}me.sort(Yt);let he=[],Ue=new Set,it=e(Y=>{Ue.has(Y.id)||(Ue.add(Y.id),he.push(Y))},"include");for(let Y of me)it(Y);for(let Y of p.items){let be=n.byId[Y.sessionId];be!==void 0&&!be.blank&&Ut(be,kt(n),I,b)&&it(be)}let gt=Cr(m);return{items:he.slice(0,k).map(Y=>{let be=ue.get(Y.id),V=xr(Y,gt.pending);return{id:Y.id,title:Mn(Y),workspace:h(Y),running:Y.running,runningSubagentCount:D.get(Y.id)?.runningCount??0,archived:I.has(Y.id),...V===void 0?{}:{pendingInteraction:V},completed:Y.completed===!0||gt.completed.has(Y.id),...be===void 0?{}:{snippet:be.snippet}}}),hasMore:p.hasMore||he.length>k}}e(ua,"deriveSearchResults");function Ii(n,r){let p=Math.max(0,r-n);return p<6e4?{unit:"now",n:0}:p<36e5?{unit:"minutes",n:Math.floor(p/6e4)}:p<864e5?{unit:"hours",n:Math.floor(p/36e5)}:p<30*864e5?{unit:"days",n:Math.floor(p/864e5)}:p<365*864e5?{unit:"months",n:Math.floor(p/(30*864e5))}:{unit:"years",n:Math.floor(p/(365*864e5))}}e(Ii,"relativeTime");let Ar={listeners:new Set,request(n){for(let r of this.listeners)r(n)},subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}};function Ge(n,r){return n.blank?r("session.new"):n.title??n.displayTitle??""}e(Ge,"displayTitle");function ha(n,r){let i=new Date(n),u=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`;return r("archives.timestamp",{date:r("date.ymd",{y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate()}),time:u})}e(ha,"archiveTimeLabel");let pa=[".dsham_archiveTabsLocked{opacity:.5}",".dsham_archiveTabs{display:grid!important;box-sizing:border-box!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:2px!important;border:0!important;border-radius:var(--dsw-radius-sm,8px)!important;box-shadow:inset 0 0 0 .5px var(--dsw-alias-border-l2)!important;background:var(--dsw-alias-bg-layer-1)!important}",'.dsham_archiveTabs>span[aria-hidden="true"],.dsham_archiveTabs>[class*="indicator"]{inset:2px auto 2px 2px!important;width:calc((100% - 4px)/2)!important;border-radius:6px!important;border:0.5px solid var(--dsw-alias-border-l3,rgba(255,255,255,.12))!important;background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.08))!important;box-shadow:none!important}',".dsham_archiveTabs [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:28px!important;padding:0 12px!important;border-radius:6px!important;font-size:13px!important;line-height:20px!important;color:var(--dsw-alias-label-secondary)!important;text-align:center!important;box-sizing:border-box!important;transition:color 150ms ease!important}",".dsham_archiveTabs [role=tab]:hover{color:var(--dsw-alias-label-primary)!important}",'.dsham_archiveTabs [role=tab][aria-selected="true"]{color:var(--dsw-alias-label-primary)!important;font-weight:600!important}',".dsham_tabLabel{display:inline-flex;align-items:center;justify-content:center;gap:6px}",".dsham_tabLabel svg{flex:none;display:block}"].join(""),Ct="data-dsham-nav-icon",ma='[role="dialog"] nav button',Un=[`[${Ct}] > svg { display: none !important; }`,`[${Ct}]::before {`," content: '';"," flex: none;"," width: 16px;"," height: 16px;"," background-color: currentColor;",' -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%202.5H2.5C1.94772%202.5%201.5%202.94772%201.5%203.5V4.5C1.5%205.05228%201.94772%205.5%202.5%205.5H13.5C14.0523%205.5%2014.5%205.05228%2014.5%204.5V3.5C14.5%202.94772%2014.0523%202.5%2013.5%202.5Z%22%2F%3E%3Cpath%20d%3D%22M2.5%205.5V13.5C2.5%2013.7652%202.60536%2014.0196%202.79289%2014.2071C2.98043%2014.3946%203.23478%2014.5%203.5%2014.5H12.5C12.7652%2014.5%2013.0196%2014.3946%2013.2071%2014.2071C13.3946%2014.0196%2013.5%2013.7652%2013.5%2013.5V5.5%22%2F%3E%3Cpath%20d%3D%22M6.5%209.5H9.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;',' mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%202.5H2.5C1.94772%202.5%201.5%202.94772%201.5%203.5V4.5C1.5%205.05228%201.94772%205.5%202.5%205.5H13.5C14.0523%205.5%2014.5%205.05228%2014.5%204.5V3.5C14.5%202.94772%2014.0523%202.5%2013.5%202.5Z%22%2F%3E%3Cpath%20d%3D%22M2.5%205.5V13.5C2.5%2013.7652%202.60536%2014.0196%202.79289%2014.2071C2.98043%2014.3946%203.23478%2014.5%203.5%2014.5H12.5C12.7652%2014.5%2013.0196%2014.3946%2013.2071%2014.2071C13.3946%2014.0196%2013.5%2013.7652%2013.5%2013.5V5.5%22%2F%3E%3Cpath%20d%3D%22M6.5%209.5H9.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;'," -webkit-mask-repeat: no-repeat;"," mask-repeat: no-repeat;"," -webkit-mask-position: center;"," mask-position: center;"," -webkit-mask-size: 16px 16px;"," mask-size: 16px 16px;","}"].join(`
|
|
23
|
+
`);function fa(n,r){let i=String(r??"").trim();return i.length>0&&String(n??"").trim()===i}e(fa,"isOwnSettingsNavRow");function vn(n,r){for(let i of n){if(i.type==="characterData"){let u=i.target.parentElement;if(u!==null&&u.closest(r)!==null)return!0;continue}for(let u of i.addedNodes){if(u.nodeType!==1)continue;let m=u;if(m.matches(r)||m.querySelector(r)!==null||m.closest(r)!==null)return!0}}return!1}e(vn,"mutationTouches");function Ir(n,r){return fa(n.textContent,r)?n.getAttribute(Ct)===""?!1:(n.setAttribute(Ct,""),!0):n.hasAttribute(Ct)?(n.removeAttribute(Ct),!0):!1}e(Ir,"applySettingsNavIcon");function Rr(n){return n.hasAttribute(Ct)?(n.removeAttribute(Ct),!0):!1}e(Rr,"restoreSettingsNavIcon");function _r(n){typeof document>"u"||typeof MutationObserver>"u"||n.effect(()=>{let r="dsham-nav-icon-style",i=document.getElementById(r);i===null?(i=document.createElement("style"),i.id=r,i.textContent=Un,(document.head??document.documentElement).append(i)):i.textContent!==Un&&(i.textContent=Un);let u=!1,m=!1,p=e(()=>{if(m=!1,u)return;let A=n.locale.bind($e)("archived.badge");for(let z of document.querySelectorAll(ma))Ir(z,A)},"sync"),k=e(()=>{m||u||(m=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(p):setTimeout(p,16))},"schedule");p();let b=new MutationObserver(A=>{vn(A,'[role="dialog"] nav')&&k()});return b.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{u=!0,b.disconnect();for(let A of document.querySelectorAll(`[${Ct}]`))Rr(A);i?.remove()}},"archive-manager: settings nav icon")}e(_r,"installSettingsNavIcon");let ga=[".dsham_settings{container-type:inline-size;min-width:0;box-sizing:border-box;width:100%;padding:0 0 32px;color:var(--dsw-alias-label-primary)}",".dsham_settingsHeader{display:flex;flex-direction:column;align-items:stretch;gap:16px;margin-bottom:16px}",".dsham_settings h2{margin:0;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.4px;white-space:nowrap}",".dsham_settingsIntro{margin:12px 0 0;max-width:42em;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:22px}",".dsham_settingsToolbar{display:flex;align-items:center;gap:8px;margin-bottom:16px;width:100%;min-width:0}",".dsham_settingsSearch{display:flex;align-items:center;gap:8px;min-width:0;width:100%;flex-wrap:nowrap}","@container(max-width:520px){.dsham_settingsSearch{flex-wrap:wrap}}",".dsham_settingsSearch .dsham_searchField{flex:1 1 0;min-width:120px;width:auto;box-sizing:border-box}",".dsham_viewSortContainer{flex:0 0 auto;position:relative;box-sizing:border-box}",".dsham_viewSortBtn{height:32px!important;padding:0 8px!important;font-size:13px!important;box-sizing:border-box}",".dsham_viewSortBtn.has-filter{border-color:var(--dsw-alias-state-business-primary)!important;color:var(--dsw-alias-state-business-primary)!important}",".dsham_settingsFilter{display:inline-flex;position:relative}",".dsham_settingsSearch .dsham_projectFilter{flex:0 0 auto;max-width:120px;min-width:0;box-sizing:border-box}",".dsham_settingsSearch .dsham_projectFilter > span{display:inline-block;max-width:100%;box-sizing:border-box}",".dsham_settingsSearch .dsham_projectFilter .dsham_menuSelectBtn{display:inline-flex!important;width:100%;max-width:120px;padding:0 8px;box-sizing:border-box;overflow:hidden}",".dsham_settingsSearch .dsham_projectFilter .dsham_selectLabel{flex:1 1 auto;min-width:0;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}",".dsham_settingsSearch .dsham_dateFilter{flex:0 0 125px;width:125px;min-width:125px;position:relative;box-sizing:border-box}",".dsham_dateRange{width:100%;box-sizing:border-box}",".dsham_dateTrigger{height:32px!important;padding:0 8px!important;gap:5px!important;border:0.5px solid var(--dsw-alias-border-l2)!important;border-radius:var(--dsw-radius-sm,8px)!important;background:var(--dsw-alias-bg-layer-1)!important;box-sizing:border-box}",".dsham_dateTrigger .dsham_dateText{font-size:12px!important;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".dsham_srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;opacity:0;pointer-events:none}",".dsham_menuSelectBtn{display:inline-flex!important;align-items:center;justify-content:space-between;gap:6px;width:auto!important;max-width:100%;min-width:0!important;height:32px!important;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);box-sizing:border-box;font:inherit;font-size:13px;cursor:pointer}",".dsham_selectLabel{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:normal;text-align:left}",".dsham_settingsGroup{margin:0 0 20px}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}",".dsham_settingsGroupTitle{display:flex;align-items:center;gap:8px;min-width:0;margin:0;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}",".dsham_settingsGroupTitle svg{flex:none;color:var(--dsw-alias-label-secondary)}",".dsham_settingsCount{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px}",".dsham_settingsList{display:grid;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill))}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:64px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_settingsRow:last-child{border-bottom:0}",".dsham_settingsContent{min-width:0;flex:1}",".dsham_settingsTitle{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px}",".dsham_settingsActions{display:flex;align-items:center;gap:4px;flex:none}",".dsham_settingsEmpty{padding:28px 8px;color:var(--dsw-alias-label-secondary);text-align:center}",".dsham_settingsError{margin-top:10px;color:var(--dsw-alias-state-error-primary);font-size:12px;white-space:pre-line}","@container(max-width:520px){.dsham_settingsHeader{margin-bottom:16px}.dsham_settingsGroup{margin-bottom:32px}.dsham_settingsRow{padding:10px 12px}.dsham_settingsActions{gap:4px}}"].join(""),va=".dsham_settingsTitleLink{display:block;max-width:100%;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;font-weight:600;line-height:20px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.dsham_settingsTitleLink:hover:not(:disabled){text-decoration:underline;text-underline-offset:3px}.dsham_settingsTitleLink:disabled{cursor:default;opacity:.6}.dsham_groupToggle{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:4px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsham_groupToggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dsham_settingsRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsRow[data-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsTitleLink:focus-visible,.dsham_groupToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#3b82f6);outline-offset:2px}@container(max-width:400px){.dsham_settingsRow{gap:8px;padding:10px 8px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:11px}}.dsham_settingsGroupMeta{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap}.dsham_settingsStatus{margin-top:10px;color:var(--dsw-alias-label-secondary);font-size:12px}.dsham_checkbox{width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);flex:none}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",ya=".dsham_settingsTitleRow{display:flex;align-items:center;gap:8px 12px;min-width:0;flex-wrap:wrap}.dsham_settingsLinks{display:flex;align-items:center;gap:8px;flex-wrap:wrap}@media(max-width:720px){.dsham_settingsTitleRow{flex-wrap:wrap}}",ba=".dsham_settingsSelection{margin:-8px 0 16px;padding:4px 0 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}.dsham_settingsSelectionMain{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;min-height:36px}.dsham_settingsSelectionSummary{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0;max-width:100%}.dsham_settingsSelectionToggle{display:inline-flex;flex:none;white-space:nowrap;align-items:center;gap:12px;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;cursor:pointer}.dsham_settingsSelectionActions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;max-width:100%;margin-left:auto}.dsham_settingsSelectionScope{margin:8px 0 0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow-wrap:anywhere}";function Hn({id:n,className:r,value:i,options:u,onChange:m,disabled:p=!1,"aria-label":k,title:b,tabIndex:A,"aria-hidden":z}){let[I,D]=l.useState(!1),P=l.useMemo(()=>u.map(me=>({id:me.value,label:me.label})),[u]),h=u.find(me=>me.value===i),ue=h?.label??k;return(0,a.jsx)("div",{id:n,tabIndex:A,"aria-hidden":z,className:r===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${r}`,children:(0,a.jsx)(c.Menu,{open:I,onClose:e(()=>D(!1),"onClose"),onSelect:e(me=>{p||m(me),D(!1)},"onSelect"),selectedId:i,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":k,"aria-expanded":I,disabled:p,tabIndex:A,"aria-hidden":z,title:b??h?.title??h?.label??k,className:"dsham_menuSelectBtn"+(I?" is-open":""),onClick:e(()=>{p||D(me=>!me)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:ue}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:I?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:P})})}e(Hn,"ArchiveProjectSelect");function wa({id:n,t:r,disabled:i=!1,favoritesOnly:u,setFavoritesOnly:m,favoriteBusy:p=!1,sortBy:k,setSortBy:b,options:A}){let[z,I]=l.useState(!1),D=l.useMemo(()=>{let he=[];typeof m=="function"&&(he.push({type:"label",id:"lbl_view_filter",text:r("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),he.push({id:"filter:all",label:r("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),he.push({id:"filter:favorites",label:r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),he.push({type:"separator",id:"sep_view_filter"})),he.push({type:"label",id:"lbl_view_sort",text:r("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let Ue of A)he.push({id:`sort:${Ue.value}`,label:Ue.label});return he},[r,m,A]),P=e(he=>{he.startsWith("filter:")?typeof m=="function"&&!p&&m(he==="filter:favorites"):he.startsWith("sort:")&&b(he.slice(5)),I(!1)},"onSelect"),h=A.find(he=>he.value===k),ue=u?r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":r("organizer.allChats")||"\u5168\u90E8\u804A\u5929",me=`${ue} \xB7 ${h?.label??k}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(c.Menu,{open:z,onClose:e(()=>I(!1),"onClose"),onSelect:P,selectedIds:[u?"filter:favorites":"filter:all",`sort:${k}`],align:"end",portal:!0,dense:!0,listClassName:"dsham_viewSortDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":r("archives.viewOptions")||"\u89C6\u56FE\u9009\u9879","aria-expanded":z,disabled:i,title:me,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(z?" is-open":"")+(u?" has-filter":""),onClick:e(()=>{i||I(he=>!he)},"onClick"),children:[(0,a.jsxs)("svg",{viewBox:"0 0 16 16",width:13,height:13,fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none",marginRight:4},children:[(0,a.jsx)("line",{x1:2.5,y1:4.5,x2:13.5,y2:4.5}),(0,a.jsx)("circle",{cx:5,cy:4.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"}),(0,a.jsx)("line",{x1:2.5,y1:11.5,x2:13.5,y2:11.5}),(0,a.jsx)("circle",{cx:11,cy:11.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"})]}),(0,a.jsx)("span",{className:"dsham_selectLabel",children:ue}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:11,height:11,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:3,transition:"transform 150ms ease",transform:z?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:D})]})}e(wa,"ArchiveViewSortMenu");function Tr({selectedCount:n,hiddenCount:r,allVisibleSelected:i,selectedVisibleCount:u,visibleCount:m,busy:p,t:k,onToggle:b,onClear:A,onRestore:z,onDelete:I,onArchive:D}){let P=n>0;return(0,a.jsxs)("div",{className:"dsham_settingsSelection",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionMain",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionSummary",children:[(0,a.jsxs)("label",{className:"dsham_settingsSelectionToggle",title:k("archives.selectAllFiltered"),children:[(0,a.jsx)(jr,{checked:i,indeterminate:u>0&&!i,disabled:p||m===0,label:k("archives.selectAllFiltered"),onChange:e(h=>b(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:P?k("archives.selectedCount",{n}):k("archives.selectAllFiltered")})]}),P&&R({disabled:p,"aria-label":k("archives.clearSelection"),onClick:A,children:k("archives.clearSelectionShort")})]}),P&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:D?[R({disabled:p,onClick:D,children:k("archives.archiveSelected")})]:[R({disabled:p,"aria-label":k("archives.restoreSelected"),onClick:z,children:k("archives.restore")}),R({disabled:p,className:"dsham_btnDanger","aria-label":k("archives.deleteSelected"),onClick:I,children:k("archives.deleteSelectionShort")})]})]}),r>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:k("archives.selectionHiddenHint",{hidden:r})})]})}e(Tr,"ArchiveSelectionToolbar");function jr({checked:n,indeterminate:r=!1,disabled:i=!1,label:u,onChange:m}){return(0,a.jsx)(tr,{checked:n,indeterminate:r,disabled:i,label:u,onChange:m})}e(jr,"ArchiveSelectionCheckbox");function Dr(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:[3.5,8,12.5].map(n=>(0,a.jsx)("circle",{cx:n,cy:8,r:1.15,fill:"none",stroke:"currentColor",strokeWidth:1.5},n))})}e(Dr,"moreIcon");function Sa({busy:n,title:r,t:i,onPreview:u,onRestoreOpen:m,onDelete:p,onCopyId:k}){let[b,A]=(0,l.useState)(!1),z=e(D=>{if(!n){if(A(!1),D==="copyId")return k?.();if(D==="preview")return u?.();if(D==="restoreOpen")return m?.();D==="delete"&&p?.()}},"choose"),I=[...u?[{id:"preview",label:i("discovery.preview"),icon:(0,a.jsx)(c.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"restoreOpen",label:i("archives.restoreOpen"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...k?[{id:"copyId",label:i("details.copyId"),icon:(0,a.jsx)(c.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...p?[{id:"delete",label:i("menu.deleteSession"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(c.Menu,{open:!n&&b,align:"end",portal:!0,dense:!0,items:I,onSelect:z,onClose:e(()=>A(!1),"onClose"),anchor:R({variant:"outline",className:"dsham_iconAction",disabled:n,title:i("archives.moreActions"),"aria-label":i("archives.moreActions")+i("common.separator")+r,"aria-haspopup":"menu","aria-expanded":b&&!n,icon:Dr(),onClick:e(()=>{n||A(D=>!D)},"onClick")})})}e(Sa,"ArchivedSessionMenu");function ka({group:n,busy:r,onArchive:i,onRestore:u,onDelete:m,t:p}){let k=n.key===yn,b=i?[{id:"archive",label:p(k?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(c.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:p(k?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:p(k?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}],[A,z]=(0,l.useState)(!1),I=p(k?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),D=e(P=>{r||(P==="archive"?i?.():P==="restore"?u?.():P==="delete"&&m?.())},"choose");return(0,a.jsx)(c.Menu,{open:!r&&A,align:"end",portal:!0,dense:!0,items:b,onSelect:e(P=>{z(!1),D(P)},"onSelect"),onClose:e(()=>z(!1),"onClose"),anchor:R({variant:"outline",className:"dsham_iconAction",disabled:r,"aria-label":I,"aria-haspopup":"menu","aria-expanded":A&&!r,icon:Dr(),onClick:e(()=>{r||z(P=>!P)},"onClick")})})}e(ka,"ArchivedGroupActions");let yn="__ungrouped__";function xa(n){return n===yn?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}e(xa,"archivedBatchTargetForGroup");function Zt(n,r,i){let u=[...new Set(n??[])];if(i.scope==="all")return u;if(i.scope==="sessions"){let p=new Set(i.sessionIds??[]);return u.filter(k=>p.has(k))}if(i.scope==="workspace"){let p=new Set(r.find(k=>k.workspaceId===i.workspaceId)?.sessionIds??[]);return u.filter(k=>p.has(k))}let m=new Set(r.flatMap(p=>p.sessionIds));return u.filter(p=>!m.has(p))}e(Zt,"deriveArchivedBatchIds");function Nr(n){return[...new Set(n.flatMap(r=>r.sessions.map(i=>i.id)))]}e(Nr,"archivedSessionIdsInGroups");function zr(n,r){let i=new Set(r);return[...new Set(n)].filter(u=>i.has(u))}e(zr,"pruneArchivedSelection");function Wn(n,r,i){let u=new Set(n);for(let m of r)i?u.add(m):u.delete(m);return[...u]}e(Wn,"toggleArchivedSelection");function Or(n,r){let i=n.deletedSessionIds.length,u=n.skippedSessionIds.length;return n.failures.length>0?{kind:"error",message:r("archives.deletePartial",{deleted:i,skipped:u,failed:n.failures.length,detail:n.failures[0].message})}:u>0&&i>0?{kind:"notice",message:r("archives.deleteSuccessWithSkipped",{deleted:i,skipped:u})}:u>0?{kind:"notice",message:r("archives.deleteSkipped",{n:u})}:{kind:"notice",message:r("archives.deleteSuccess",{n:i})}}e(Or,"archivedDeleteFeedback");function Mr(n,r){let i=new Set(r);return Object.values(n).filter(u=>u.origin!=="subagent"&&!u.blank&&!i.has(u.id)).map(u=>u.id)}e(Mr,"unarchivedSessionIds");function Pr(n,r,i,u){let m=r.map(b=>({key:b.workspaceId,title:b.title,ids:new Set(b.sessionIds),sessions:[]})),p=[];for(let b of i){let A=n[b];if(A===void 0||A.origin==="subagent")continue;let z=m.find(I=>I.ids?.has(b));(z===void 0?p:z.sessions).push(A)}let k=m.filter(b=>b.sessions.length>0);return p.length>0&&k.push({key:yn,title:u,sessions:p}),k}e(Pr,"deriveArchivedGroups");function Lr(n,r,i,u,m=[]){let p=e((I,D)=>String(I).localeCompare(String(D),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),k=new Map;if(Array.isArray(m))for(let I=0;I<m.length;I++)k.set(m[I],I);let b=e(I=>{let D=r==="created"?i[I.id]:I.updatedAt;return typeof D=="number"&&Number.isFinite(D)?D:Number.NEGATIVE_INFINITY},"timestampOf"),A=e((I,D)=>{if(r==="archived"){let P=k.get(I.id)??-1,ue=(k.get(D.id)??-1)-P;if(ue!==0)return ue}if(r!=="alphabetical"){let P=b(D)-b(I);if(Number.isFinite(P)&&P!==0)return P}return p(Ge(I,u),Ge(D,u))||p(I.id,D.id)},"compareSessions");return n.map(I=>({...I,sessions:[...I.sessions].sort(A)})).sort((I,D)=>{if(r==="archived"){let P=I.sessions[0]?.id,h=D.sessions[0]?.id,ue=P!==void 0?k.get(P)??-1:-1,he=(h!==void 0?k.get(h)??-1:-1)-ue;if(he!==0)return he}if(r!=="alphabetical"){let P=b(D.sessions[0])-b(I.sessions[0]);if(Number.isFinite(P)&&P!==0)return P}return p(I.title,D.title)||p(I.key,D.key)})}e(Lr,"sortArchivedGroups");let Fr={...Vs,...ks,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","sidebar.entry.title":"\u4FA7\u8FB9\u680F\u5165\u53E3","sidebar.entry.desc":"\u5728\u5DE6\u4FA7\u4E3B\u5BFC\u822A\u680F\u663E\u793A\u5F52\u6863\u7BA1\u7406\u5668\u3002\u8BBE\u7F6E\u91CC\u7684\u5165\u53E3\u4E0D\u53D8\u3002","sidebar.entry.toggle":"\u5207\u6362\u4FA7\u8FB9\u680F\u5165\u53E3","update.entry.title":"\u5728\u7EBF\u66F4\u65B0","update.entry.desc":"\u5141\u8BB8\u68C0\u67E5\u5E76\u5728\u7EBF\u5B89\u88C5\u5F52\u6863\u7BA1\u7406\u5668\u7684\u65B0\u7248\u672C\u3002\u5173\u95ED\u540E\u9690\u85CF\u66F4\u65B0\u5165\u53E3\u3002","update.entry.toggle":"\u5207\u6362\u5728\u7EBF\u66F4\u65B0","update.entry.locked":"\u5728\u7EBF\u66F4\u65B0\u5DF2\u88AB\u5BBF\u4E3B\u914D\u7F6E\u9501\u5B9A\u7981\u7528","archives.archiveProject":"\u5F52\u6863\u8BE5\u9879\u76EE\u7684\u5168\u90E8\u804A\u5929","archives.archiveUngrouped":"\u5F52\u6863\u5168\u90E8\u672A\u5206\u7EC4\u804A\u5929","archives.archiveProjectDesc":"\u5C06\u201C{name}\u201D\u4E2D\u5168\u90E8 {n} \u6761\u672A\u5F52\u6863\u4F1A\u8BDD\u5F52\u6863\uFF0C\u4E0D\u53D7\u5F53\u524D\u641C\u7D22\u7B5B\u9009\u5F71\u54CD\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u6062\u590D\u3002","archives.archiveUngroupedDesc":"\u5C06\u5168\u90E8 {n} \u6761\u672A\u5206\u7EC4\u7684\u672A\u5F52\u6863\u4F1A\u8BDD\u5F52\u6863\uFF0C\u4E0D\u53D7\u5F53\u524D\u641C\u7D22\u7B5B\u9009\u5F71\u54CD\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u6062\u590D\u3002","archives.tab.archived":"\u5DF2\u5F52\u6863","archives.tab.unarchived":"\u672A\u5F52\u6863","archives.searchUnarchived":"\u641C\u7D22\u672A\u5F52\u6863\u804A\u5929","archives.emptyUnarchived":"\u6682\u65E0\u672A\u5F52\u6863\u4F1A\u8BDD\u3002","archives.archiveSelected":"\u5F52\u6863","archives.openSession":"\u6253\u5F00","archives.moreActions":"\u66F4\u591A\u64CD\u4F5C","archives.archiveSelectedDesc":"\u5C06\u9009\u4E2D\u7684\u4F1A\u8BDD\u5F52\u6863\uFF0C\u5305\u542B\u5F53\u524D\u7B5B\u9009\u9690\u85CF\u7684\u5DF2\u9009\u9879\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u67E5\u770B\u548C\u6062\u590D\u3002","archives.archiveSuccess":"\u5DF2\u5F52\u6863 {n} \u6761\u4F1A\u8BDD\u3002","archives.archiveBatchFailed":"\u6279\u91CF\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.navigationUnavailable":"\u5F53\u524D\u5BBF\u4E3B\u65E0\u6CD5\u4FDD\u6301\u5F52\u6863\u5BF9\u8BDD\uFF0C\u8BF7\u4F7F\u7528\u201C\u6062\u590D\u5E76\u6253\u5F00\u201D\u3002","archives.sessionNotRetained":"\u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u6216\u6062\u590D\u540E\u518D\u8BD5\u3002","archives.restoreOpen":"\u6062\u590D\u6253\u5F00","archives.selectedCount":"\u5DF2\u9009 {n} \u6761","archives.selectionHiddenHint":"\u542B\u5F53\u524D\u672A\u663E\u793A\u7684 {hidden} \u6761\uFF0C\u4E5F\u5C06\u53C2\u4E0E\u64CD\u4F5C","archives.clearSelectionShort":"\u6E05\u7A7A","archives.restore":"\u6062\u590D","archives.archiveTitle":"\u5F52\u6863 {n} \u4E2A\u804A\u5929\uFF1F","archives.deleteSelectionShort":"\u5220\u9664","archives.clearSelection":"\u6E05\u7A7A\u9009\u62E9","group.ungrouped":"\u672A\u5206\u7EC4","session.new":"\u65B0\u4F1A\u8BDD","section.workspaces":"\u5DE5\u4F5C\u533A","section.sessions":"\u4F1A\u8BDD","viewOptions.label":"\u89C6\u56FE\u9009\u9879","groupBy.label":"\u5206\u7EC4\u65B9\u5F0F","groupBy.workspace":"\u6309\u5DE5\u4F5C\u533A","groupBy.flat":"\u5355\u5217\u8868","orderBy.label":"\u6392\u5E8F\u65B9\u5F0F","orderBy.manual":"\u624B\u52A8\u6392\u5E8F","orderBy.updated":"\u6700\u8FD1\u66F4\u65B0","sessions.expand":"\u5C55\u5F00\u5176\u4F59 {n} \u4E2A\u4F1A\u8BDD","sessions.collapse":"\u6536\u8D77","empty.none":"\u6682\u65E0\u4F1A\u8BDD","workspace.add":"\u6DFB\u52A0\u5DE5\u4F5C\u533A","search.sessions.aria":"\u641C\u7D22\u4F1A\u8BDD","search.placeholder":"\u641C\u7D22\u4F1A\u8BDD\u2026","search.clear":"\u6E05\u9664\u641C\u7D22","search.results.aria":"\u641C\u7D22\u7ED3\u679C","search.pending":"\u6B63\u5728\u641C\u7D22\u4F1A\u8BDD\u5386\u53F2\u2026","search.unavailable":"\u5185\u5BB9\u641C\u7D22\u6682\u4E0D\u53EF\u7528\uFF0C\u4EC5\u663E\u793A\u540D\u79F0\u5339\u914D\u3002","search.noMatches":"\u65E0\u5339\u914D\u4F1A\u8BDD","search.hasMore":"\u4EC5\u663E\u793A\u524D {n} \u6761\u7ED3\u679C\uFF0C\u8BF7\u7F29\u5C0F\u641C\u7D22\u8303\u56F4\u3002","menu.addWorkspace":"\u6DFB\u52A0\u5DE5\u4F5C\u533A\u2026","menu.unarchive":"\u53D6\u6D88\u5F52\u6863","menu.deleteSession":"\u5220\u9664\u4F1A\u8BDD","archived.badge":"\u5F52\u6863\u4F1A\u8BDD","archived.notOpenable":"\u5DF2\u5F52\u6863\uFF0C\u53D6\u6D88\u5F52\u6863\u540E\u53EF\u7EE7\u7EED\u5BF9\u8BDD","archives.title":"\u5F52\u6863\u4F1A\u8BDD","archives.description":"\u7BA1\u7406\u5DF2\u5F52\u6863\u4F1A\u8BDD\uFF0C\u6216\u9009\u62E9\u672A\u5F52\u6863\u4F1A\u8BDD\u8FDB\u884C\u6279\u91CF\u5F52\u6863\u3002","archives.viewProject":"GitHub","archives.feedback":"\u95EE\u9898\u53CD\u9988","archives.empty":"\u6682\u65E0\u5DF2\u5F52\u6863\u4F1A\u8BDD","archives.emptyFiltered":"\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u804A\u5929","archives.searchPlaceholder":"\u641C\u7D22\u5DF2\u5F52\u6863\u804A\u5929","archives.sortBy":"\u6392\u5E8F\u65B9\u5F0F","archives.sortLabel":"\u6392\u5E8F\u65B9\u5F0F","archives.viewOptions":"\u89C6\u56FE\u9009\u9879","archives.sortArchived":"\u6700\u8FD1\u5F52\u6863","archives.sortUpdated":"\u66F4\u65B0\u65F6\u95F4","archives.sortCreated":"\u521B\u5EFA\u65F6\u95F4","archives.sortAlphabetical":"\u6309\u5B57\u6BCD\u987A\u5E8F","archives.projectFilter":"\u6309\u9879\u76EE\u7B5B\u9009","archives.allProjects":"\u6240\u6709\u9879\u76EE","discovery.timeRange":"\u65F6\u95F4\u8303\u56F4","organizer.allChats":"\u5168\u90E8\u804A\u5929","archives.sessionCount":"{n} \u4E2A\u804A\u5929","archives.selectAllFiltered":"\u5168\u9009\u5F53\u524D\u7B5B\u9009\u7ED3\u679C","archives.selectSession":"\u9009\u62E9\u4F1A\u8BDD\u201C{name}\u201D","archives.restoreSelected":"\u6062\u590D\u6240\u9009","archives.deleteSelected":"\u5220\u9664\u6240\u9009","archives.timestamp":"{date}\uFF0C{time}","archives.restoreProject":"\u6062\u590D\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.restoreUngrouped":"\u5168\u90E8\u6062\u590D","archives.deleteProject":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngrouped":"\u5168\u90E8\u5220\u9664","archives.projectActions":"\u9879\u76EE\u201C{name}\u201D\u7684\u5F52\u6863\u64CD\u4F5C","archives.ungroupedActions":"\u672A\u5206\u7EC4\u804A\u5929\u7684\u5F52\u6863\u64CD\u4F5C","archives.restoreSuccess":"\u5DF2\u6062\u590D {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.restoreBatchFailed":"\u6279\u91CF\u6062\u590D\u5931\u8D25\uFF1A{detail}","archives.deleteSelectedTitle":"\u5220\u9664\u6240\u9009\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteSelectedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u6240\u9009\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteSelectedConfirm":"\u5220\u9664\u6240\u9009\u804A\u5929","archives.deleteProjectTitle":"\u5220\u9664\u201C{name}\u201D\u4E2D\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteProjectDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u201C{name}\u201D\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u9879\u76EE\u76EE\u5F55\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteProjectConfirm":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngroupedTitle":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteUngroupedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u672A\u5206\u7EC4\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u9879\u76EE\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteUngroupedConfirm":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5168\u90E8\u804A\u5929","archives.deleteBatchPending":"\u6B63\u5728\u5220\u9664\u5DF2\u5F52\u6863\u804A\u5929\u2026","archives.deleteSuccess":"\u5DF2\u5220\u9664 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.deleteSuccessWithSkipped":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\uFF1B\u53E6\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deleteSkipped":"\u5DF2\u6E05\u7406 {n} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deletePartial":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u804A\u5929\uFF0C\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\uFF1B{failed} \u4E2A\u5220\u9664\u5931\u8D25\uFF1A{detail}","archives.unarchiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u53D6\u6D88\u5F52\u6863\u3002","archives.unarchiveFailed":"\u53D6\u6D88\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F52\u6863\u3002","archives.archiveFailed":"\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveActive":"\u4F1A\u8BDD\u4ECD\u5728\u8FD0\u884C\uFF08{kinds}\uFF09\u3002","archiveActive.title":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.desc":"\u201C{name}\u201D\u4ECD\u6709\u6B63\u5728\u8FDB\u884C\u7684\u5DE5\u4F5C\uFF1A{kinds}\u3002\u5F52\u6863\u524D\u4F1A\u505C\u6B62\u8FD9\u4E9B\u5DE5\u4F5C\u3002","archiveActive.confirm":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.pending":"\u6B63\u5728\u505C\u6B62\u5E76\u5F52\u6863\u2026","archives.forkFailed":"\u5206\u53C9\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","deleteSession.title":"\u5220\u9664\u4F1A\u8BDD","deleteSession.confirmTitle":"\u5220\u9664\u4F1A\u8BDD\uFF1F","deleteSession.desc":"\u5C06\u6C38\u4E45\u5220\u9664\u4F1A\u8BDD\u201C{name}\u201D\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u5168\u90E8\u8BB0\u5F55\uFF08\u5BF9\u8BDD\u5185\u5BB9\u3001\u7EDF\u8BA1\u3001\u7F13\u5B58\uFF09\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","deleteSession.pending":"\u6B63\u5728\u5220\u9664\u4F1A\u8BDD\u2026","deleteSession.unknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\u3002","deleteSession.failed":"\u5220\u9664\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","picker.loading":"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026","conflict.named":"\u5DF2\u5B58\u5728\u540D\u4E3A\u201C{name}\u201D\u7684\u5DE5\u4F5C\u533A\u3002","folderError.title":"\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6\u5939","folderError.retry":"\u91CD\u65B0\u9009\u62E9",rename:"\u91CD\u547D\u540D","rename.workspace.title":"\u91CD\u547D\u540D\u5DE5\u4F5C\u533A","rename.session.title":"\u91CD\u547D\u540D\u4F1A\u8BDD","field.workspaceName":"\u5DE5\u4F5C\u533A\u540D\u79F0","field.sessionName":"\u4F1A\u8BDD\u540D\u79F0","delete.workspace":"\u5220\u9664\u5DE5\u4F5C\u533A","delete.desc":"\u5C06\u628A\u201C{name}\u201D\u4ECE\u5DE5\u4F5C\u533A\u5217\u8868\u4E2D\u79FB\u9664\u3002\u6587\u4EF6\u5939\u4E0E\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\uFF0C\u5176\u4F1A\u8BDD\u5C06\u663E\u793A\u5728\u201C\u672A\u5206\u7EC4\u201D\u4E0B\u3002","delete.pending":"\u6B63\u5728\u5220\u9664\u5DE5\u4F5C\u533A\u2026","menu.fork":"\u5206\u53C9\u4F1A\u8BDD","menu.archiveSession":"\u5F52\u6863\u4F1A\u8BDD","menu.archiveWorkspace":"\u5F52\u6863\u5168\u90E8\u4F1A\u8BDD","archiveWorkspace.title":"\u5F52\u6863 {n} \u4E2A\u4F1A\u8BDD\uFF1F","archiveWorkspace.desc":"\u8FD9\u4F1A\u5C06\u201C{name}\u201D\u4E2D\u7684\u4F1A\u8BDD\u5F52\u6863\u3002\u4E4B\u540E\u53EF\u4EE5\u5728\u201C\u8BBE\u7F6E \u2192 \u5F52\u6863\u4F1A\u8BDD\u201D\u4E2D\u627E\u5230\u5B83\u4EEC\u3002","archiveWorkspace.confirm":"\u5168\u90E8\u5F52\u6863","archiveWorkspace.pending":"\u6B63\u5728\u5F52\u6863\u4F1A\u8BDD\u2026","actions.workspace.aria":"\u5DE5\u4F5C\u533A\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.session.aria":"\u4F1A\u8BDD\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.newSession.aria":"\u5728\u201C{name}\u201D\u4E2D\u65B0\u5EFA\u4F1A\u8BDD","status.running":"\u8FDB\u884C\u4E2D","status.subagentsRunning.one":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.subagentsRunning.other":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.idle":"\u7A7A\u95F2","status.waitingApproval":"\u7B49\u5F85\u5BA1\u6279","status.planReview":"\u8BA1\u5212\u5F85\u5BA1","status.waitingAnswer":"\u7B49\u5F85\u56DE\u7B54","status.completed":"\u5DF2\u5B8C\u6210","hover.created":"\u521B\u5EFA\u4E8E {time}","hover.copied":"\u5DF2\u590D\u5236","date.ymd":"{y}\u5E74{m}\u6708{d}\u65E5","time.now":"\u521A\u521A","time.minutes":"{n}\u5206\u949F","time.hours":"{n}\u5C0F\u65F6","time.days":"{n}\u5929","time.months":"{n}\u4E2A\u6708","time.years":"{n}\u5E74","time.ago":"{t}\u524D"},Br={...Gs,...xs,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","sidebar.entry.title":"Sidebar entry","sidebar.entry.desc":"Show Archived Sessions in the left sidebar. The Settings entry stays either way.","sidebar.entry.toggle":"Toggle sidebar entry","update.entry.title":"Online updates","update.entry.desc":"Allow checking and installing new versions online. Hides the update entry when disabled.","update.entry.toggle":"Toggle online updates","update.entry.locked":"Online updates are disabled by the host configuration.","archives.moreActions":"More actions","archives.archiveProject":"Archive all chats in this project","archives.archiveUngrouped":"Archive all ungrouped chats","archives.archiveProjectDesc":"Archive all {n} unarchived sessions in \u201C{name}\u201D, regardless of the current search filter. You can restore them in Archived.","archives.archiveUngroupedDesc":"Archive all {n} ungrouped, unarchived sessions, regardless of the current search filter. You can restore them in Archived.","archives.tab.archived":"Archived","archives.tab.unarchived":"Unarchived","archives.searchUnarchived":"Search unarchived chats","archives.emptyUnarchived":"No unarchived sessions.","archives.archiveSelected":"Archive","archives.openSession":"Open session","archives.archiveSelectedDesc":"Archive the selected sessions, including selections hidden by the current filter. You can view and restore them in Archived.","archives.archiveSuccess":"Archived {n} sessions.","archives.archiveBatchFailed":"Batch archive failed: {detail}","archives.navigationUnavailable":"This host cannot keep the conversation archived while opening it. Use \u201CRestore and open\u201D instead.","archives.sessionNotRetained":"The host did not keep the requested conversation open. Try again, or restore it before opening.","archives.restoreOpen":"Restore and open","archives.selectedCount":"{n} selected","archives.selectionHiddenHint":"Includes {hidden} hidden by the current filter; actions apply to them too.","archives.clearSelectionShort":"Clear","archives.restore":"Restore","archives.archiveTitle":"Archive {n} chats?","archives.deleteSelectionShort":"Delete","archives.clearSelection":"Clear selection","group.ungrouped":"Ungrouped","session.new":"New Session","section.workspaces":"Workspaces","section.sessions":"Sessions","viewOptions.label":"View options","groupBy.label":"Group by","groupBy.workspace":"Workspace","groupBy.flat":"In one list","orderBy.label":"Order by","orderBy.manual":"Manual","orderBy.updated":"Last updated","sessions.expand":"Show {n} more sessions","sessions.collapse":"Show less","empty.none":"No sessions yet","workspace.add":"Add workspace","search.sessions.aria":"Search sessions","search.placeholder":"Search sessions...","search.clear":"Clear search","search.results.aria":"Search results","search.pending":"Searching session history\u2026","search.unavailable":"Content search is temporarily unavailable. Showing name matches.","search.noMatches":"No matching sessions","search.hasMore":"Showing the first {n} results. Narrow your search.","menu.addWorkspace":"Add workspace\u2026","menu.unarchive":"Unarchive","menu.deleteSession":"Delete session","archived.badge":"Archived sessions","archived.notOpenable":"This session is archived. Unarchive it to continue the conversation.","archives.title":"Archived sessions","archives.description":"Manage archived sessions or select unarchived sessions to archive in bulk.","archives.viewProject":"GitHub","archives.feedback":"Issues","archives.empty":"No archived sessions.","archives.emptyFiltered":"No chats match your filters.","archives.searchPlaceholder":"Search archived chats","archives.sortBy":"Sort archived chats","archives.sortLabel":"Sort order","archives.viewOptions":"View options","archives.sortArchived":"Recently archived","archives.sortUpdated":"Last updated","archives.sortCreated":"Created","archives.sortAlphabetical":"Alphabetical","archives.projectFilter":"Filter by project","archives.allProjects":"All projects","discovery.timeRange":"Date range","organizer.allChats":"All chats","archives.sessionCount":"{n} chats","archives.selectAllFiltered":"Select all results","archives.selectSession":"Select chat {name}","archives.restoreSelected":"Restore selected","archives.deleteSelected":"Delete selected","archives.timestamp":"{date}, {time}","archives.restoreProject":"Restore all chats in this project","archives.restoreUngrouped":"Restore all","archives.deleteProject":"Delete all chats in this project","archives.deleteUngrouped":"Delete all","archives.projectActions":"Archive actions for project {name}","archives.ungroupedActions":"Archive actions for ungrouped chats","archives.restoreSuccess":"Restored {n} archived chats.","archives.restoreBatchFailed":"Could not restore the archived chats: {detail}","archives.deleteSelectedTitle":"Delete selected archived chats","archives.deleteSelectedDesc":"This permanently deletes the selected {n} archived chats, their child agents (including any that are still running), and their records. Other chats are not affected. This cannot be undone.","archives.deleteSelectedConfirm":"Delete selected chats","archives.deleteProjectTitle":"Delete archived chats in {name}","archives.deleteProjectDesc":"This permanently deletes the {n} archived chats in {name}, their child agents, and their records. The project directory and unarchived chats are not affected. This cannot be undone.","archives.deleteProjectConfirm":"Delete all project chats","archives.deleteUngroupedTitle":"Delete ungrouped archived chats","archives.deleteUngroupedDesc":"This permanently deletes the {n} ungrouped archived chats, their child agents, and their records. Other projects and unarchived chats are not affected. This cannot be undone.","archives.deleteUngroupedConfirm":"Delete all ungrouped chats","archives.deleteBatchPending":"Deleting archived chats\u2026","archives.deleteSuccess":"Deleted {n} archived chats.","archives.deleteSuccessWithSkipped":"Deleted {deleted} archived chats and cleared {skipped} stale archive entries for sessions that no longer exist.","archives.deleteSkipped":"Cleared {n} stale archive entries for sessions that no longer exist.","archives.deletePartial":"Deleted {deleted} chats and cleared {skipped} stale archive entries; {failed} could not be deleted: {detail}","archives.unarchiveUnknown":"This session no longer exists, so it cannot be unarchived.","archives.unarchiveFailed":"Could not unarchive the session: {detail}","archives.archiveUnknown":"This session no longer exists, so it cannot be archived.","archives.archiveFailed":"Could not archive the session: {detail}","archives.archiveActive":"This conversation is still running ({kinds}).","archiveActive.title":"Stop and archive","archiveActive.desc":"\u201C{name}\u201D still has work in progress: {kinds}. Archiving stops that work first.","archiveActive.confirm":"Stop and archive","archiveActive.pending":"Stopping and archiving\u2026","archives.forkFailed":"Could not fork the session: {detail}","deleteSession.title":"Delete session","deleteSession.confirmTitle":"Delete session?","deleteSession.desc":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","deleteSession.pending":"Deleting session\u2026","deleteSession.unknown":"This session no longer exists or was already deleted.","deleteSession.failed":"Could not delete the session: {detail}","picker.loading":"Loading workspaces\u2026","conflict.named":"A workspace named \u201C{name}\u201D already exists.","folderError.title":"Couldn\u2019t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes \u201C{name}\u201D from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace\u2026","menu.fork":"Fork session","menu.archiveSession":"Archive session","menu.archiveWorkspace":"Archive all conversations","archiveWorkspace.title":"Archive {n} conversations?","archiveWorkspace.desc":"This archives all conversations in \u201C{name}\u201D. You can find them later in Archived sessions.","archiveWorkspace.confirm":"Archive all","archiveWorkspace.pending":"Archiving conversations\u2026","actions.workspace.aria":"Workspace actions for {name}","actions.session.aria":"Session actions for {name}","actions.newSession.aria":"New session in {name}","status.running":"Running","status.subagentsRunning.one":"{n} subagent running","status.subagentsRunning.other":"{n} subagents running","status.idle":"Idle","status.waitingApproval":"Waiting for approval","status.planReview":"Plan awaiting review","status.waitingAnswer":"Waiting for answer","status.completed":"Completed","hover.created":"Created {time}","hover.copied":"Copied","date.ymd":"{y}-{m}-{d}","time.now":"now","time.minutes":"{n}min","time.hours":"{n}h","time.days":"{n}d","time.months":"{n}mo","time.years":"{n}y","time.ago":"{t} ago"},Ca={...$s,...Cs,"locale.language":"ru","service.unavailable":"\u0421\u0435\u0440\u0432\u0438\u0441 \u0435\u0449\u0451 \u043D\u0435 \u0433\u043E\u0442\u043E\u0432. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","sidebar.entry.title":"\u041F\u0443\u043D\u043A\u0442 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","sidebar.entry.desc":"\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0430\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439 \u043D\u0430 \u043B\u0435\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438. \u041F\u0443\u043D\u043A\u0442 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F.","sidebar.entry.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0443\u043D\u043A\u0442 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","update.entry.title":"\u041E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","update.entry.desc":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443 \u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0443 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0439 \u043E\u043D\u043B\u0430\u0439\u043D. \u0421\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u043F\u0443\u043D\u043A\u0442 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438.","update.entry.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","update.entry.locked":"\u041E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0445\u043E\u0441\u0442\u0430.","archives.moreActions":"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E","archives.archiveProject":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.archiveUngrouped":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.archiveProjectDesc":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 {n} \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432 \xAB{name}\xBB, \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043F\u043E\u0438\u0441\u043A\u0430. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.archiveUngroupedDesc":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439, \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043F\u043E\u0438\u0441\u043A\u0430. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.tab.archived":"\u0410\u0440\u0445\u0438\u0432","archives.tab.unarchived":"\u041D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435","archives.searchUnarchived":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u0447\u0430\u0442\u0430\u043C","archives.emptyUnarchived":"\u041D\u0435\u0442 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.archiveSelected":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archives.openSession":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","archives.archiveSelectedDesc":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0441\u043A\u0440\u044B\u0442\u044B\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.archiveSuccess":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0441\u0435\u0441\u0441\u0438\u0439: {n}.","archives.archiveBatchFailed":"\u041F\u0430\u043A\u0435\u0442\u043D\u0430\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C: {detail}","archives.navigationUnavailable":"\u042D\u0442\u043E\u0442 \u0445\u043E\u0441\u0442 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \xAB\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C\xBB.","archives.sessionNotRetained":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u043C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0438\u043B\u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0435\u0433\u043E \u043F\u0435\u0440\u0435\u0434 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0435\u043C.","archives.restoreOpen":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C","archives.selectedCount":"\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {n}","archives.selectionHiddenHint":"\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 {hidden}, \u0441\u043A\u0440\u044B\u0442\u044B\u0445 \u0442\u0435\u043A\u0443\u0449\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C; \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F \u0438 \u043A \u043D\u0438\u043C.","archives.clearSelectionShort":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C","archives.restore":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C","archives.archiveTitle":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0447\u0430\u0442\u043E\u0432?","archives.deleteSelectionShort":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","archives.clearSelection":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440","group.ungrouped":"\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B","session.new":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F","section.workspaces":"\u0420\u0430\u0431\u043E\u0447\u0438\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","section.sessions":"\u0421\u0435\u0441\u0441\u0438\u0438","viewOptions.label":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430","groupBy.label":"\u0413\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E","groupBy.workspace":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","groupBy.flat":"\u0412 \u043E\u0434\u043D\u043E\u043C \u0441\u043F\u0438\u0441\u043A\u0435","orderBy.label":"\u041F\u043E\u0440\u044F\u0434\u043E\u043A","orderBy.manual":"\u0412\u0440\u0443\u0447\u043D\u0443\u044E","orderBy.updated":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","sessions.expand":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {n} \u0441\u0435\u0441\u0441\u0438\u0439","sessions.collapse":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435","empty.none":"\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0439","workspace.add":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","search.sessions.aria":"\u041F\u043E\u0438\u0441\u043A \u0441\u0435\u0441\u0441\u0438\u0439","search.placeholder":"\u041F\u043E\u0438\u0441\u043A \u0441\u0435\u0441\u0441\u0438\u0439...","search.clear":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0438\u0441\u043A","search.results.aria":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430","search.pending":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0439\u2026","search.unavailable":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u043C.","search.noMatches":"\u041D\u0435\u0442 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439","search.hasMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043F\u0435\u0440\u0432\u044B\u0435 {n} \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432. \u0421\u0443\u0437\u044C\u0442\u0435 \u043F\u043E\u0438\u0441\u043A.","menu.addWorkspace":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E\u2026","menu.unarchive":"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430","menu.deleteSession":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","archived.badge":"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439","archived.notOpenable":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0432 \u0430\u0440\u0445\u0438\u0432\u0435. \u0412\u0435\u0440\u043D\u0438\u0442\u0435 \u0435\u0451 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440.","archives.title":"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439","archives.description":"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C\u0438 \u0441\u0435\u0441\u0441\u0438\u044F\u043C\u0438 \u0438\u043B\u0438 \u0432\u044B\u0431\u043E\u0440 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F \u043F\u0430\u043A\u0435\u0442\u043D\u043E\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438.","archives.viewProject":"GitHub","archives.feedback":"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B","archives.empty":"\u041D\u0435\u0442 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.emptyFiltered":"\u041D\u0438 \u043E\u0434\u0438\u043D \u0447\u0430\u0442 \u043D\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0448\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u043C.","archives.searchPlaceholder":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u0447\u0430\u0442\u0430\u043C","archives.sortBy":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.sortLabel":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430","archives.viewOptions":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0432\u0438\u0434\u0430","archives.sortArchived":"\u041D\u0435\u0434\u0430\u0432\u043D\u043E \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435","archives.sortUpdated":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","archives.sortCreated":"\u0414\u0430\u0442\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F","archives.sortAlphabetical":"\u041F\u043E \u0430\u043B\u0444\u0430\u0432\u0438\u0442\u0443","archives.projectFilter":"\u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0443","archives.allProjects":"\u0412\u0441\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B","discovery.timeRange":"\u041F\u0435\u0440\u0438\u043E\u0434","organizer.allChats":"\u0412\u0441\u0435 \u0447\u0430\u0442\u044B","archives.sessionCount":"{n} \u0447\u0430\u0442\u043E\u0432","archives.selectAllFiltered":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B","archives.selectSession":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0447\u0430\u0442 {name}","archives.restoreSelected":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.deleteSelected":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.timestamp":"{date}, {time}","archives.restoreProject":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.restoreUngrouped":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435","archives.deleteProject":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngrouped":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435","archives.projectActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0435\u043A\u0442\u0430 {name}","archives.ungroupedActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.restoreSuccess":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.restoreBatchFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B: {detail}","archives.deleteSelectedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteSelectedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteSelectedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteProjectTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u0432 {name}","archives.deleteProjectDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0432 {name}, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteProjectConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngroupedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteUngroupedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteUngroupedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteBatchPending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432\u2026","archives.deleteSuccess":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.deleteSuccessWithSkipped":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deleteSkipped":"\u041E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deletePartial":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430; {failed} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C: {detail}","archives.unarchiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430.","archives.unarchiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430: {detail}","archives.archiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C.","archives.archiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","archives.archiveActive":"\u042D\u0442\u043E\u0442 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F ({kinds}).","archiveActive.title":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.desc":"\u0412 \xAB{name}\xBB \u0435\u0449\u0451 \u0438\u0434\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0430: {kinds}. \u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442 \u0435\u0451.","archiveActive.confirm":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.pending":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0438 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F\u2026","archives.forkFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438: {detail}","deleteSession.title":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","deleteSession.confirmTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E?","deleteSession.desc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0441\u0435\u0441\u0441\u0438\u044E \xAB{name}\xBB, \u0435\u0451 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0432\u0441\u0435 \u0435\u0451 \u0437\u0430\u043F\u0438\u0441\u0438 (\u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0443, \u043A\u044D\u0448). \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","deleteSession.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u2026","deleteSession.unknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0430.","deleteSession.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","picker.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u2026","conflict.named":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u0441 \u0438\u043C\u0435\u043D\u0435\u043C \xAB{name}\xBB \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.","folderError.title":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0443","folderError.retry":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430",rename:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C","rename.workspace.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","rename.session.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","field.workspaceName":"\u0418\u043C\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","field.sessionName":"\u0418\u043C\u044F \u0441\u0435\u0441\u0441\u0438\u0438","delete.workspace":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","delete.desc":"\u042D\u0442\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \xAB{name}\xBB \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432. \u041F\u0430\u043F\u043A\u0430 \u0438 \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0441\u0435\u0441\u0441\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u0443\u0442\u0441\u044F. \u0415\u0433\u043E \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B\xBB.","delete.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430\u2026","menu.fork":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438","menu.archiveSession":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","menu.archiveWorkspace":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","archiveWorkspace.title":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0441\u0435\u0441\u0441\u0438\u0439?","archiveWorkspace.desc":"\u042D\u0442\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432 \xAB{name}\xBB. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archiveWorkspace.confirm":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435","archiveWorkspace.pending":"\u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0439\u2026","actions.workspace.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430 \u0434\u043B\u044F {name}","actions.session.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043B\u044F {name}","actions.newSession.aria":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u0432 {name}","status.running":"\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F","status.subagentsRunning.one":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442","status.subagentsRunning.other":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442","status.idle":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435","status.waitingApproval":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F","status.planReview":"\u041F\u043B\u0430\u043D \u043E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438","status.waitingAnswer":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u0432\u0435\u0442\u0430","status.completed":"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E","hover.created":"\u0421\u043E\u0437\u0434\u0430\u043D\u043E {time}","hover.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","date.ymd":"{y}-{m}-{d}","time.now":"\u0441\u0435\u0439\u0447\u0430\u0441","time.minutes":"{n}\u043C\u0438\u043D","time.hours":"{n}\u0447","time.days":"{n}\u0434","time.months":"{n}\u043C\u0435\u0441","time.years":"{n}\u0433","time.ago":"{t} \u043D\u0430\u0437\u0430\u0434"},$e="archive-manager-workspace",Ea=["slots","sessions","workspaces","locale","remote","typert"];function qn(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}e(qn,"bindObservable");function Ur(n){return async r=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(r)}}e(Ur,"createUnarchiveSession");async function Vn(n,r,i){let u=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=await _n(r,async k=>{try{await n.archiveSession(k)}catch(b){throw b!==null&&typeof b=="object"&&gn(b)!==void 0&&typeof le(b).sessionId!="string"&&Object.assign(b,{sessionId:k}),b}return!0},{refresh:i}),p=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:p,archivedSessionIdsAdded:p.filter(k=>!u.has(k)),failures:m.failures}}e(Vn,"archiveSessionsViaOfficial");async function Hr(n,r,i,u){let m=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),p=typeof u=="function"?u:A=>n.unarchiveSession?.(A),k=await _n(r,async A=>(await p(A),!0),{refresh:i}),b=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:b,unarchivedSessionIds:[...m].filter(A=>!b.includes(A)),failures:k.failures}}e(Hr,"unarchiveSessionsViaOfficial");async function Aa(n){Ia(n);let r=n.get("remote"),i=e(()=>{},"disposeRemote");return r!==void 0&&(i=await r.$mount(U)),async()=>{await i()}}e(Aa,"apply");function Ia(n){n.effect(()=>n.locale.register($e,{zh:Fr,en:Br,ru:Ca}),"dsh-archive-manager: dictionaries");let r=e(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),i={},u,m=e(g=>(u=Ts(g,n.sessions,n.workspaces,{onOpened:e(()=>n.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:e(()=>n.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>u?.dispose()),"attachArchiveNavigation");n.effect(()=>m(r()),"archive-manager: explicit archived navigation");let p=e(g=>{if(u===void 0)throw new jt("navigationUnavailable");return Ar.request(g),u.open(g)},"openConversation"),k=e(async g=>{n.get("layout")?.beginNavigation?.(),Ar.request(g)},"focusSessionWorkspace"),b=e(async(g,S)=>{let O=await n.sessions.search(g,S);if(!O.ok)throw new Error(O.error.message);return O.value},"searchSessions"),A=e(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await ue(),null}catch(g){return console.warn("archive-manager: restored archived sessions but session list refresh failed:",g),g instanceof Error?g.message:String(g)}},"refreshSessionList"),z=Ur(n.workspaces),I=e(async(g,...S)=>{let O=n.get("remote.workspaceRegistry");if(!O||typeof O[g]!="function")throw new Error(n.locale.bind($e)("service.unavailable"));let Ee=await O[g].apply(O,S);if(!Ee.ok)throw new Error(Ee.error.message);return Ee.value},"registryCall"),D=e(()=>I("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),P=e(()=>I("diagnoseSessionCaches"),"diagnoseSessionCaches"),h=e(g=>I("rebuildSessionCaches",g),"rebuildSessionCaches"),ue=e(async()=>{if(typeof n.sessions.refresh!="function")throw new Error("Official session list refresh is unavailable");let g=await n.sessions.refresh(),S=n.sessions,O=S.manager;if(O?.listState==="error"&&O.listError)throw new Error(Pe(O.listError));if(S.listState==="error"&&S.listError)throw new Error(Pe(S.listError));let te=S.list?.getSnapshot?.();if(te?.state==="error"&&te.error)throw new Error(Pe(te.error));if(g&&typeof g=="object"&&"ok"in g&&g.ok===!1)throw new Error(Pe(g.error??"Session list refresh failed"))},"refreshCacheLists"),me=e((g={})=>I("cleanOrphanSubagents",g??{}),"cleanOrphanSubagents"),he=e(g=>I("searchArchivedContent",g),"searchArchivedContent"),Ue=e(g=>I("searchSessionContent",g),"searchSessionContent"),it=e(g=>I("previewArchivedSession",g),"previewArchivedSession"),gt=e(()=>I("favoriteSessions"),"favoriteSessions"),Y=e(g=>I("setSessionFavorite",g),"setSessionFavorite"),be=hr();be.bind({favoriteSessions:gt,setSessionFavorite:Y});let V=Kt(n,be,()=>n.locale.bind($e));n.effect(()=>()=>V.dispose(),"archive-manager: favorites only filter");let ze=Ws({workspaces:n.workspaces.list,sessions:n.sessions.list,archive:e(g=>n.workspaces.archiveSession(g),"archive"),restore:e(async g=>{await z(g)},"restore"),deleteOne:e(async g=>{let S=n.get("remote.workspaceRegistry");if(!S)throw new Error(n.locale.bind($e)("service.unavailable"));let O=await S.deleteSession(g);if(!O.ok)throw new Error(O.error.message)},"deleteOne"),getFavorites:gt,refresh:e(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:kt}),Ie=e(async g=>{await z(g),await A()},"unarchiveSession"),fe=e(async g=>{let S=n.get("remote.workspaceRegistry");if(S===void 0)throw new Error("archive-manager remote service is unavailable");let O=await S.deleteSession(g);if(!O.ok)throw new Error(O.error.message);await A()},"deleteSession"),rt=e(async g=>Vn(n.workspaces,g,A),"archiveSessions"),Ke=e(async g=>{let S=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},O=Zt(S.archivedSessionIds,S.items,g);return Hr(n.workspaces,O,A,z)},"unarchiveSessions"),W=e(async g=>{let S=n.get("remote.workspaceRegistry");if(S===void 0)throw new Error("archive-manager remote service is unavailable");let O=await S.deleteArchivedSessions(g);if(!O.ok)throw new Error(O.error.message);let te=await A();return{...O.value,refreshError:te}},"deleteArchivedSessions"),q=e(async()=>{let g=n.get("remote.workspaceRegistry");if(g===void 0)throw new Error("archive-manager remote service is unavailable");let S=await g.archivedSessionMetadata();if(!S.ok)throw new Error(S.error.message);return S.value},"archivedSessionMetadata"),Oe="sidebar.workspaces.session.menu.item",Ze=null,ee=new Set,Je=e(g=>{Ze=g;for(let S of ee)S()},"publishDeleteTarget");function ct(){return l.useSyncExternalStore(g=>(ee.add(g),()=>{ee.delete(g)}),()=>Ze,()=>Ze)}e(ct,"useDeleteRequest");function Jt({sessionId:g,displayTitle:S,useMenuOpenState:O,t:te}){let[,Ee]=O(),Q=c.MenuItemButton,Ae=(0,a.jsx)(c.IconTrashOutlineRegular,{size:14}),we=e(()=>{Ee(!1),Je({sessionId:g,title:S})},"onSelect");return typeof Q=="function"?(0,a.jsx)(Q,{danger:!0,icon:Ae,onSelect:we,children:te("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:we,children:te("menu.deleteSession")})}e(Jt,"DeleteSessionMenuItem");function vt({sessionId:g,favoriteRow:S,useMenuOpenState:O,t:te}){let[,Ee]=O(),Q=(0,l.useSyncExternalStore)(S.subscribe,S.getSnapshot),Ae=Q.ready&&Q.ids.has(g),we=e(()=>{Ee(!1),S.toggle(g)},"onSelect"),Se=c.MenuItemButton,Te=(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:Ae?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,children:(0,a.jsx)("path",{d:Nt})}),We=te(Ae?"organizer.unfavorite":"organizer.favorite");return typeof Se=="function"?(0,a.jsx)(Se,{icon:Te,onSelect:we,children:We}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:we,children:We})}e(vt,"FavoriteMenuItem");function yt(g){try{let S=document.querySelector(`[data-row-key="session:${CSS.escape(g)}"]`);return S?(S.hasAttribute("tabindex")||(S.setAttribute("tabindex","-1"),S.addEventListener("blur",()=>S.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(S):S.focus(),!0):!1}catch{return!1}}e(yt,"focusSessionRow");function Mt({t:g}){let S=ct(),[O,te]=(0,l.useState)(!1),[Ee,Q]=(0,l.useState)(null),[Ae,we]=(0,l.useState)(null),Se=(0,l.useRef)(null),Te=(0,l.useRef)(null),We=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(S===null||typeof document>"u"){we(null);return}let pe=null,ae=e(()=>{if(pe&&pe.isConnected)return pe;try{pe=document.querySelector(`[data-row-key="session:${CSS.escape(S.sessionId)}"]`)}catch{pe=null}return pe},"getTargetRow"),M=e(()=>{let je=Se.current,ke=je?.offsetWidth||290,qe=je?.offsetHeight||160,Ve=8,Ye=ae();if(!Ye){let ge=window.innerWidth,Rt=window.innerHeight,pt=Math.max(16,(Rt-qe)/2),Xe=Math.max(16,(ge-ke)/2);we(xe=>xe!==null&&xe.top===pt&&xe.left===Xe?xe:{top:pt,left:Xe});return}let ht=Ye.getBoundingClientRect(),Fe=ht.top-4;Fe+qe>window.innerHeight-16&&(Fe=window.innerHeight-16-qe),Fe<16&&(Fe=16);let Be=ht.right+Ve;Be+ke>window.innerWidth-16&&(Be=ht.left-ke-Ve),Be<16&&(Be=16),we(ge=>ge!==null&&ge.top===Fe&&ge.left===Be?ge:{top:Fe,left:Be})},"updatePosition");M(),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M);let oe=null;return typeof ResizeObserver<"u"&&Se.current&&(oe=new ResizeObserver(M),oe.observe(Se.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M)}},[S]),(0,l.useEffect)(()=>{if(S===null)return;Te.current&&!Te.current.disabled?Te.current.focus():Se.current?.focus();let pe=S.sessionId;return()=>{if(!yt(pe)){let M=document.querySelector('[role="treeitem"][aria-selected="true"]');M&&(M.hasAttribute("tabindex")||(M.setAttribute("tabindex","-1"),M.addEventListener("blur",()=>M.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(M):M.focus())}}},[S]),(0,l.useEffect)(()=>{S!==null&&O&&Se.current?.focus()},[S,O]),(0,l.useEffect)(()=>{if(S===null)return;let pe=e(ae=>{if(ae.key==="Escape"){ae.preventDefault(),ae.stopPropagation(),"stopImmediatePropagation"in ae&&typeof ae.stopImmediatePropagation=="function"&&ae.stopImmediatePropagation(),O||(Q(null),Je(null));return}if(ae.key==="Tab"){if(ae.preventDefault(),O){Se.current?.focus();return}let M=Te.current,oe=We.current;if(!M||!oe)return;ae.shiftKey?document.activeElement===M?oe.focus():M.focus():document.activeElement===oe?M.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[S,O]),S===null)return null;let lt=e(()=>{O||(Q(null),Je(null))},"close"),wt=e(()=>{te(!0),Q(null),fe(S.sessionId).then(()=>{te(!1),Je(null)}).catch(pe=>{te(!1),Q(On(pe,g))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:lt}),(0,a.jsxs)("div",{ref:Se,role:"dialog","aria-modal":!0,"aria-label":g("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:Ae?{top:Ae.top,left:Ae.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:g("deleteSession.confirmTitle")}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:g("deleteSession.desc",{name:S.title})}),O&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:g("deleteSession.pending")}),Ee!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Ee}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:O,onClick:lt,children:g("cancel")}),(0,a.jsx)("button",{ref:We,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:O,onClick:wt,children:g("deleteSession.title")})]})]})]})}e(Mt,"DeleteSessionOverlay");let Pt=null,Ht=new Set,ot=e(g=>{Pt=g;for(let S of Ht)S()},"publishArchiveWsTarget");function Ce(){return l.useSyncExternalStore(g=>(Ht.add(g),()=>{Ht.delete(g)}),()=>Pt,()=>Pt)}e(Ce,"useArchiveWsRequest");function It(g){try{let S=document.querySelector(`[data-row-key="workspace:${CSS.escape(g)}"]`);return S?(S.hasAttribute("tabindex")||(S.setAttribute("tabindex","-1"),S.addEventListener("blur",()=>S.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(S):S.focus(),!0):!1}catch{return!1}}e(It,"focusWorkspaceRow");function Qt({t:g}){let S=Ce(),[O,te]=(0,l.useState)(!1),[Ee,Q]=(0,l.useState)(null),[Ae,we]=(0,l.useState)(null),Se=(0,l.useRef)(null),Te=(0,l.useRef)(null),We=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(S===null||typeof document>"u"){we(null);return}let pe=null,ae=e(()=>{if(pe&&pe.isConnected)return pe;try{pe=document.querySelector(`[data-row-key="workspace:${CSS.escape(S.workspaceId)}"]`)}catch{pe=null}return pe},"getTargetRow"),M=e(()=>{let je=Se.current,ke=je?.offsetWidth||290,qe=je?.offsetHeight||160,Ve=8,Ye=ae();if(!Ye){let ge=window.innerWidth,Rt=window.innerHeight,pt=Math.max(16,(Rt-qe)/2),Xe=Math.max(16,(ge-ke)/2);we(xe=>xe!==null&&xe.top===pt&&xe.left===Xe?xe:{top:pt,left:Xe});return}let ht=Ye.getBoundingClientRect(),Fe=ht.top-4;Fe+qe>window.innerHeight-16&&(Fe=window.innerHeight-16-qe),Fe<16&&(Fe=16);let Be=ht.right+Ve;Be+ke>window.innerWidth-16&&(Be=ht.left-ke-Ve),Be<16&&(Be=16),we(ge=>ge!==null&&ge.top===Fe&&ge.left===Be?ge:{top:Fe,left:Be})},"updatePosition");M(),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M);let oe=null;return typeof ResizeObserver<"u"&&Se.current&&(oe=new ResizeObserver(M),oe.observe(Se.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M)}},[S]),(0,l.useEffect)(()=>{if(S===null)return;Te.current&&!Te.current.disabled?Te.current.focus():Se.current?.focus();let pe=S.workspaceId;return()=>{It(pe)}},[S]),(0,l.useEffect)(()=>{S!==null&&O&&Se.current?.focus()},[S,O]),(0,l.useEffect)(()=>{if(S===null)return;let pe=e(ae=>{if(ae.key==="Escape"){ae.preventDefault(),ae.stopPropagation(),"stopImmediatePropagation"in ae&&typeof ae.stopImmediatePropagation=="function"&&ae.stopImmediatePropagation(),O||(Q(null),ot(null));return}if(ae.key==="Tab"){if(ae.preventDefault(),O){Se.current?.focus();return}let M=Te.current,oe=We.current;if(!M||!oe)return;ae.shiftKey?document.activeElement===M?oe.focus():M.focus():document.activeElement===oe?M.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[S,O]),S===null)return null;let lt=e(()=>{O||(Q(null),ot(null))},"close"),wt=e(()=>{te(!0),Q(null);let ae=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(ke=>ke.workspaceId===S.workspaceId),M=n.sessions.list?.getSnapshot?.()?.byId??{},oe=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),je=(ae?.sessionIds??[]).filter(ke=>Pn(ke,M,oe));Vn(n.workspaces,je,A).then(ke=>{if(te(!1),ke.failures.length>0){Q(fn(ke.failures,g));return}ot(null)}).catch(ke=>{te(!1),Q(vr(ke,g))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:lt}),(0,a.jsxs)("div",{ref:Se,role:"dialog","aria-modal":!0,"aria-label":g("menu.archiveWorkspace"),tabIndex:-1,className:"dsham_sidebarCard",style:Ae?{top:Ae.top,left:Ae.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:g("archiveWorkspace.title",{n:S.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:g("archiveWorkspace.desc",{name:S.title})}),O&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:g("archiveWorkspace.pending")}),Ee!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Ee}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:O,onClick:lt,children:g("cancel")}),(0,a.jsx)("button",{ref:We,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:O,onClick:wt,children:g("archiveWorkspace.confirm")})]})]})]})}e(Qt,"ArchiveWorkspaceOverlay");function K(g){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let S=null,O=!1,te=new Map,Ee=!1,Q=e(M=>{let je=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(Ve=>Ve.workspaceId===M);if(je===void 0)return[];let ke=n.sessions.list?.getSnapshot?.()?.byId??{},qe=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return je.sessionIds.filter(Ve=>Pn(Ve,ke,qe))},"workspaceCandidateIds"),Ae=e(()=>{if(Ee=!1,!O)for(let[M,oe]of te){if(!M.isConnected){te.delete(M);continue}let je=Q(oe.workspaceId).length===0;M.disabled=je,M.style.opacity=je?"0.5":"",M.style.cursor=je?"not-allowed":""}},"revalidateItems"),we=e(()=>{if(te.size===0||Ee||O)return;Ee=!0;let M=e(()=>Ae(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(M):setTimeout(M,16)},"scheduleRevalidate"),Se=e(M=>{S=kr(M.target)},"rememberWorkspace");document.addEventListener("pointerdown",Se,!0),document.addEventListener("click",Se,!0);let Te=e(()=>{if(O)return;for(let[oe]of te)oe.isConnected||te.delete(oe);let M=document.querySelectorAll('[role="menu"]');for(let oe of M){if(oe.querySelector('[data-dsham-archive-workspace="true"]'))continue;let je=Array.from(oe.querySelectorAll('button[role="menuitem"]'));if(je.length===0)continue;let ke=je.find(st=>Ln(st,!1))??je.find(st=>Ln(st,!0));if(!ke)continue;let qe=je.find(st=>st!==ke)??ke,Ve=ke.parentElement;if(!Ve)continue;let Ye=S;if(!Ye)continue;let Fe=Q(Ye.workspaceId).length,Be=document.createElement("div");Be.className=Ve.className;let ge=document.createElement("button");ge.type="button",ge.setAttribute("role","menuitem"),ge.dataset.dshamArchiveWorkspace="true",ge.className=qe.className.split(/\s+/).filter(st=>!/(?:^|[_-])danger(?:$|[_-])/i.test(st)).join(" ");let Rt=qe.querySelector("span"),pt=qe.querySelectorAll("span")[1],Xe=document.createElement("span");Xe.setAttribute("aria-hidden","true"),Rt?.className&&(Xe.className=Rt.className),Xe.innerHTML='<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 2.5H2.5C1.94772 2.5 1.5 2.94772 1.5 3.5V4.5C1.5 5.05228 1.94772 5.5 2.5 5.5H13.5C14.0523 5.5 14.5 5.05228 14.5 4.5V3.5C14.5 2.94772 14.0523 2.5 13.5 2.5Z"/><path d="M2.5 5.5V13.5C2.5 13.7652 2.60536 14.0196 2.79289 14.2071C2.98043 14.3946 3.23478 14.5 3.5 14.5H12.5C12.7652 14.5 13.0196 14.3946 13.2071 14.2071C13.3946 14.0196 13.5 13.7652 13.5 13.5V5.5"/><path d="M6.5 9.5H9.5"/></svg>';let xe=document.createElement("span");pt?.className&&(xe.className=pt.className),xe.textContent=g("menu.archiveWorkspace"),ge.append(Xe,xe),Be.append(ge),Fe===0&&(ge.disabled=!0,ge.style.opacity="0.5",ge.style.cursor="not-allowed"),ge.addEventListener("click",st=>{st.preventDefault(),st.stopPropagation();let tn=Q(Ye.workspaceId).length;tn!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),ot({workspaceId:Ye.workspaceId,title:Ye.title,count:tn}))}),Ve.parentNode?.insertBefore(Be,Ve),te.set(ge,{workspaceId:Ye.workspaceId})}},"checkAndInject"),We=!1,lt=e(()=>{if(We||O)return;We=!0;let M=e(()=>{We=!1,!O&&Te()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(M):setTimeout(M,16)},"scheduleInject"),wt=new MutationObserver(M=>{vn(M,'[role="menu"]')&<()});wt.observe(document.body,{childList:!0,subtree:!0});let pe=n.sessions.list?.subscribe?.(we),ae=n.workspaces.list?.subscribe?.(we);return()=>{O=!0,document.removeEventListener("pointerdown",Se,!0),document.removeEventListener("click",Se,!0),wt.disconnect(),pe?.(),ae?.(),te.clear();for(let M of document.querySelectorAll('[data-dsham-archive-workspace="true"]'))M.parentElement?.remove()}}e(K,"setupWorkspaceMenuInjector");function He(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(g=>g.children?.[Oe]!==void 0)}e(He,"hostSidebarDeclaresSessionMenu");let dt,G,Xt,Me,Lt,ut=e(()=>{let g=He()?"menu":"waiting";g!==dt&&(dt=g,g==="menu"&&(G??=n.slots.inject(Oe,()=>n.slots.register({name:Oe,id:"archive-manager.delete-session",order:500,locale:$e,inject:e(()=>({}),"inject")},Jt)),Xt??=n.slots.inject(Oe,()=>n.slots.register({name:Oe,id:"archive-manager.favorite",order:350,locale:$e,inject:e(()=>({favoriteRow:be}),"inject")},vt)),Me??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:$e,inject:e(()=>({t:n.locale.bind($e)}),"inject")},Mt)),Lt??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:$e,inject:e(()=>({t:n.locale.bind($e)}),"inject")},Qt))))},"reconcileSidebar");ut(),n.effect(()=>K(n.locale.bind($e)),"archive-manager: workspace menu injector"),_r(n);let en=typeof n.on=="function"?n.on("slots/changed",g=>{if(g==="sidebar.workspaces")try{ut()}catch(S){console.warn("archive-manager: sidebar mode switch failed",S)}}):void 0;n.effect(()=>()=>{en?.(),G?.(),Xt?.(),Me?.(),Lt?.()},"archive-manager: sidebar mode");let Qe=e(()=>({archiveSessions:rt,archiveSession:e((g,S)=>n.workspaces.archiveSession(g,S),"archiveSession"),sessionStore:qn(n.sessions.list),workspaceStore:qn(n.workspaces.list),unarchiveSession:Ie,deleteSession:fe,unarchiveSessions:Ke,deleteArchivedSessions:W,archivedSessionMetadata:q,openConversation:p,focusSessionWorkspace:k,viewState:i,favoriteSessions:gt,setSessionFavorite:Y,favoriteSync:be,organizeBatch:ze,diagnoseOrphanSubagents:D,cleanOrphanSubagents:me,diagnoseSessionCaches:P,rebuildSessionCaches:h,refreshCacheLists:ue,searchSessionContent:Ue,searchArchivedContent:he,previewArchivedSession:it,t:n.locale.bind($e)}),"buildArchivedSectionProps"),bt=cr(n,{callApi:e(async(g,S)=>{let O=Rn(`/api/michengai/dsh-archive-manager${g}`),te=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},S?.headers),Ee=await fetch(O,Object.assign({},S,{headers:te})),Q=await Ee.json();if(!Ee.ok||!Q||Q.ok===!1)throw new Error((Q&&typeof Q=="object"&&typeof Q.error=="string"?Q.error:void 0)||`HTTP ${Ee.status}`);return Q},"callSettingsApi"),renderPanel:e(g=>(0,a.jsx)(Nn,Object.assign({},Qe(),g)),"renderPanel"),injectProps:Qe,ns:$e,onOnlineUpdateChange:e(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange")});n.effect(()=>()=>bt.destroy(),"archive-manager: sidebar entry"),n.effect(()=>Fs({endpoint:"/api/michengai/dsh-archive-manager/update",packageName:"@michengai/dsh-archive-manager",titleRowSelector:".dsham_settingsTitleRow",linksSelector:".dsham_settingsLinks",zhName:"\u5F52\u6863\u4F1A\u8BDD",enName:"Archived sessions",ruName:"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439",createIcon:re,isEnabled:e(()=>bt.isOnlineUpdateEnabled(),"isEnabled")}),"dsh-archive-manager: plugin update ui"),n.slots.inject("settings.section",()=>n.slots.register({name:"settings.section",id:"archived-sessions",order:45,label:e(()=>n.locale.bind($e)("archived.badge"),"label"),icon:"archive",locale:$e,inject:Qe},Nn))}e(Ia,"applyWorkspaceBrowser");async function Ra(n,r,i,u){try{await r(n)}catch(m){i(ta(m,u))}}return e(Ra,"forkWithFeedback"),o.__test={forkWithFeedback:Ra,favoritesOnlyVisibility:_e,favoriteGroupPredicate:nt,createFavoriteRowStore:hr,unarchivedSessionIds:Mr,ArchiveSelectionToolbar:Tr,ArchivedSessionsSection:Nn,zh:Fr,en:Br,displayTitle:Ge,sessionVisible:Ut,indexSubagentDescendants:hn,isUnknownSessionError:mn,deriveGroups:ca,deriveFlat:da,deriveSearchResults:ua,deriveArchivedGroups:Pr,sortArchivedGroups:Lr,deriveArchivedBatchIds:Zt,archivedSessionIdsInGroups:Nr,pruneArchivedSelection:zr,toggleArchivedSelection:Wn,archivedDeleteFeedback:Or,isWorkspaceTaskCandidate:Pn,isWorkspaceDeleteMenuItem:Ln,workspaceMenuTriggerFrom:kr,applySettingsNavIcon:Ir,restoreSettingsNavIcon:Rr,installSettingsNavIcon:_r,mutationTouches:vn,activeSessionActivity:gn,activeSessionRefusal:yr,activeArchiveFromMessage:br,archiveSessionsViaOfficial:Vn,unarchiveSessionsViaOfficial:Hr,createUnarchiveSession:Ur,createWorkspaceViewStore:Zs,migrateWorkspaceViewPersist:mr,WORKSPACE_VIEW_PERSIST_KEY:pn,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:pr,bindObservable:qn,groupByWorkspace:Sr,byRecency:Yt,ARCHIVE_MANAGER_REMOTE:U,currentSessionId:kt,setupSidebarEntry:cr},o.apply=Aa,o.inject=Ea,s.exports}e(Ci,"startArchiveClient");
|
|
24
24
|
|
|
25
25
|
return module.exports.startArchiveClient(require);
|
|
26
26
|
}
|