@michengai/dsh-archive-manager 1.1.11 → 1.1.13

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/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 pn=Object.defineProperty;var va=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var ba=Object.prototype.hasOwnProperty;var t=(e,s)=>pn(e,"name",{value:s,configurable:!0});var wa=(e,s)=>{for(var o in s)pn(e,o,{get:s[o],enumerable:!0})},Sa=(e,s,o,v)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of ya(s))!ba.call(e,a)&&a!==o&&pn(e,a,{get:()=>s[a],enumerable:!(v=va(s,a))||v.enumerable});return e};var xa=e=>Sa(pn({},"__esModule",{value:!0}),e);var Ya={};wa(Ya,{startArchiveClient:()=>Ka});module.exports=xa(Ya);function ce(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return e}t(ce,"record");function Ye(e){return String(e&&typeof e=="object"&&"message"in e?e.message??e:e)}t(Ye,"errorMessage");function mn(e){return e&&typeof e=="object"&&"code"in e?e.code:void 0}t(mn,"errorCode");var Lr=Function("return globalThis.__dshArchiveReact")(),{Children:ei,Component:ti,Fragment:Ur,Profiler:ni,PureComponent:ri,StrictMode:si,Suspense:ai,cloneElement:ii,createContext:oi,createElement:Br,createRef:li,forwardRef:ci,isValidElement:di,lazy:ui,memo:hi,startTransition:pi,useCallback:mi,useContext:gi,useDebugValue:fi,useDeferredValue:vi,useEffect:Fr,useId:yi,useImperativeHandle:bi,useInsertionEffect:wi,useLayoutEffect:Si,useMemo:xi,useReducer:ki,useRef:Ci,useState:Ut,useSyncExternalStore:Ei,useTransition:Ii,version:Ai}=Lr,M=Lr;function Wr(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(s=>{let o=s.target.value;if(o===""){e.onChange(null);return}let v=Number(o);e.onChange(Number.isNaN(v)?null:v)},"onChange")})}t(Wr,"NumberField");function Ca(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(Ca,"CalendarIcon");function Zt(e,s,o){let v=String(s+1).padStart(2,"0"),a=String(o).padStart(2,"0");return`${e}-${v}-${a}`}t(Zt,"formatYmd");function Bt(e){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return s?{year:Number(s[1]),monthIndex:Number(s[2])-1,day:Number(s[3])}:null}t(Bt,"parseYmd");function Ea(e,s){let o=new Date(e,s,1).getDay(),v=(o===0?7:o)-1,a=new Date(e,s+1,0).getDate(),l=new Date(e,s,0).getDate(),c=[];for(let x=0;x<42;x++){let b=e,_=s,S=0,f=!1;x<v?(S=l-v+x+1,_=s-1,_<0&&(_=11,b--),f=!0):x<v+a?S=x-v+1:(S=x-v-a+1,_=s+1,_>11&&(_=0,b++),f=!0),c.push({year:b,monthIndex:_,day:S,dateStr:Zt(b,_,S),isOutside:f})}return c}t(Ea,"buildMonthGrid");function Ia(e,s=new Date){if(e==="all")return{from:"",to:""};let o=Zt(s.getFullYear(),s.getMonth(),s.getDate());if(e==="today")return{from:o,to:o};let v=e==="7d"?6:e==="30d"?29:89,a=new Date(s.getTime()-v*864e5);return{from:Zt(a.getFullYear(),a.getMonth(),a.getDate()),to:o}}t(Ia,"getPresetRange");function Hr(e,s,o,v){let a=s+v,l=new Date(e,a+1,0).getDate();return new Date(e,a,Math.min(o,l))}t(Hr,"shiftMonthClamped");function qr(e){let s=e.React||M;function o(E,ne){let je=E==="from"?ne:e.from,Ot=E==="to"?ne:e.to;if(je===""&&Ot===""){e.onClear();return}E==="from"?e.onFrom(ne):e.onTo(ne)}t(o,"change");let v=!!(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=(s.useRef??(E=>{let[ne]=s.useState({current:E});return ne}))(null),[x,b]=s.useState(!1),_=Bt(e.from||e.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[S,f]=s.useState(_.year),[k,D]=s.useState(_.monthIndex),[z,U]=s.useState(null),[B,V]=s.useState(null),[xe,K]=s.useState(null);s.useEffect(()=>{if(!x)return;let E=t(je=>{c.current&&!c.current.contains(je.target)&&(b(!1),U(null))},"onPointerDown"),ne=t(je=>{je.key==="Escape"&&(je.preventDefault(),je.stopPropagation(),b(!1),U(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",E,!0),typeof window<"u"&&window.addEventListener("keydown",ne,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",E,!0),typeof window<"u"&&window.removeEventListener("keydown",ne,!0)}},[x]),s.useEffect(()=>{if(!x||!xe||!c.current)return;c.current.querySelector(`[data-date="${xe}"]`)?.focus()},[x,xe]);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,Q=Y?"en-US":Z?"ru-RU":"zh-CN",ke=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 X(E){E.stopPropagation(),k<=0?(D(11),f(ne=>ne-1)):D(ne=>ne-1)}t(X,"prevMonth");function rt(E){E.stopPropagation(),k>=11?(D(0),f(ne=>ne+1)):D(ne=>ne+1)}t(rt,"nextMonth");function Rt(E){z?(E>=z?(e.onFrom(z),e.onTo(E)):(e.onFrom(E),e.onTo(z)),U(null),b(!1)):(U(E),V(E))}t(Rt,"handleDayClick");function _e(E){let ne=Ia(E);E==="all"?e.onClear():(e.onFrom(ne.from),e.onTo(ne.to)),U(null),b(!1)}t(_e,"applyPreset");function L(E){let ne=Zt(E.getFullYear(),E.getMonth(),E.getDate());K(ne),z&&V(ne),(E.getFullYear()!==S||E.getMonth()!==k)&&(f(E.getFullYear()),D(E.getMonth()))}t(L,"moveFocusToDate");function ye(E,ne){let je=Bt(E);je&&L(new Date(je.year,je.monthIndex,je.day+ne))}t(ye,"moveFocus");let Ze=e.from,jt=e.to;z&&B&&(Ze=z<=B?z:B,jt=z<=B?B:z);let en=Ea(S,k),Je=new Date,bn=xe||Ze||Zt(Je.getFullYear(),Je.getMonth(),Je.getDate()),Nt=en.map((E,ne)=>{let je=Ze===E.dateStr,Ot=jt===E.dateStr,zt=!!(Ze&&jt&&E.dateStr>Ze&&E.dateStr<jt),tn=E.year===Je.getFullYear()&&E.monthIndex===Je.getMonth()&&E.day===Je.getDate(),vt="dsham_dateDay";E.isOutside&&(vt+=" is-outside"),tn&&(vt+=" is-today"),je&&(vt+=" is-start"),Ot&&(vt+=" is-end"),zt&&(vt+=" is-in-range");let Ht=!E.isOutside&&(E.dateStr===bn||E.day===1&&!en.some(G=>!G.isOutside&&G.dateStr===bn));return s.createElement("div",{key:ne,className:vt,role:"button",tabIndex:Ht?0:-1,"data-date":E.dateStr,"aria-label":E.dateStr,"aria-pressed":!!(je||Ot||zt),onClick:t(G=>{G.stopPropagation(),Rt(E.dateStr)},"onClick"),onKeyDown:t(G=>{if(G.key==="Enter"||G.key===" ")G.preventDefault(),G.stopPropagation(),Rt(E.dateStr);else if(G.key==="ArrowLeft")G.preventDefault(),G.stopPropagation(),ye(E.dateStr,-1);else if(G.key==="ArrowRight")G.preventDefault(),G.stopPropagation(),ye(E.dateStr,1);else if(G.key==="ArrowUp")G.preventDefault(),G.stopPropagation(),ye(E.dateStr,-7);else if(G.key==="ArrowDown")G.preventDefault(),G.stopPropagation(),ye(E.dateStr,7);else if(G.key==="Home"){G.preventDefault(),G.stopPropagation();let me=Bt(E.dateStr);if(me){let Te=new Date(me.year,me.monthIndex,me.day),yt=(Te.getDay()===0?7:Te.getDay())-1;Te.setDate(Te.getDate()-yt),L(Te)}}else if(G.key==="End"){G.preventDefault(),G.stopPropagation();let me=Bt(E.dateStr);if(me){let Te=new Date(me.year,me.monthIndex,me.day),yt=(Te.getDay()===0?7:Te.getDay())-1;Te.setDate(Te.getDate()+(6-yt)),L(Te)}}else if(G.key==="PageUp"){G.preventDefault(),G.stopPropagation();let me=Bt(E.dateStr);me&&L(Hr(me.year,me.monthIndex,me.day,-1))}else if(G.key==="PageDown"){G.preventDefault(),G.stopPropagation();let me=Bt(E.dateStr);me&&L(Hr(me.year,me.monthIndex,me.day,1))}},"onKeyDown"),onMouseEnter:t(()=>{z&&V(E.dateStr)},"onMouseEnter")},E.day)}),Dt=`${S}\u5E74 ${k+1}\u6708`;try{Dt=new Intl.DateTimeFormat(Q,{year:"numeric",month:"long"}).format(new Date(S,k,1))}catch{Dt=Y||Z?`${S}-${String(k+1).padStart(2,"0")}`:`${S}\u5E74 ${k+1}\u6708`}return s.createElement("div",{ref:c,className:"dsham_dateRange",role:"group","aria-label":e.label},s.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(E=>o("from",E.target.value),"onChange")}),s.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(E=>o("to",E.target.value),"onChange")}),s.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&&U(null),b(!x)},"onClick"),onKeyDown:t(E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),x&&U(null),b(!x))},"onKeyDown")},Ca(s.createElement),s.createElement("span",{className:"dsham_dateText"+(v?"":" placeholder")},a),v?s.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:t(E=>{E.stopPropagation(),e.onClear(),U(null)},"onClick"),children:"\xD7"}):null,s.createElement("span",{className:"dsham_dateChevron"},Vr(s.createElement,x))),x&&s.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":e.label,onClick:t(E=>E.stopPropagation(),"onClick")},s.createElement("div",{className:"dsham_datePresets"},s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>_e("all"),"onClick")},e.t?e.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>_e("today"),"onClick")},e.t?e.t("discovery.today"):"\u4ECA\u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>_e("7d"),"onClick")},e.t?e.t("discovery.last7Days"):"\u8FD1 7 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>_e("30d"),"onClick")},e.t?e.t("discovery.last30Days"):"\u8FD1 30 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>_e("90d"),"onClick")},e.t?e.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:X,"aria-label":"prev month"},"\u2039"),s.createElement("span",{className:"dsham_dateMonthTitle"},Dt),s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:rt,"aria-label":"next month"},"\u203A")),s.createElement("div",{className:"dsham_dateGrid"},ke.map((E,ne)=>s.createElement("div",{key:ne,className:"dsham_dateWeekday"},E))),s.createElement("div",{className:"dsham_dateGrid"},Nt))))}t(qr,"DateRange");function gn(e){return M.createElement("div",{className:e.className},M.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":e.open,onClick:e.onToggle},Vr(M.createElement,e.open),e.title),e.open?M.createElement("div",null,e.children):null)}t(gn,"Disclosure");function Vr(e,s){return e("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},e("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}t(Vr,"foldChevron");function Hn(e){let s=M.useRef(null);return M.useEffect(()=>{s.current&&(s.current.indeterminate=!!e.indeterminate&&!e.checked)},[e.indeterminate,e.checked]),M.createElement("input",{ref:s,className:"dsham_checkbox",type:"checkbox",checked:e.checked,disabled:e.disabled,"aria-label":e.label,onChange:t(o=>e.onChange({target:{checked:o.target.checked}}),"onChange")})}t(Hn,"SelectionCheckbox");var Jt=t(e=>{if(typeof e!="string"||!e.length||e.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return e},"id"),Gr=t((e,s=!1)=>{if(typeof e!="string"||e.length>200||s&&!e.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return e.trim()},"queryText"),$r={parse(e){let s=ce(e);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(Jt))],query:Gr(s.query,!0)}}},Aa={parse(e){let s=ce(e);if(!s)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:Jt(s.sessionId),query:Gr(s.query??"")}}},Wn=t((e,s)=>{if(typeof e!="string"||e.length>s)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return e},"boundedString"),Kr=t(e=>{if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return e},"sequence"),qn={parse(e){let s=ce(e);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(ce).map(o=>({sessionId:Jt(o.sessionId),seq:Kr(o.seq),snippet:Wn(o.snippet,400)})),failures:s.failures.map(ce).map(o=>({sessionId:Jt(o.sessionId),message:Wn(o.message,500)}))}}},_a={parse(e){let s=ce(e);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:Jt(s.sessionId),hasEarlier:s.hasEarlier,hasLater:s.hasLater,messages:s.messages.map(ce).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:Kr(o.seq),role:o.role,text:Wn(o.text,2e3),truncated:o.truncated}})}}};async function Yr(e,s=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(!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(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(Yr,"copySessionText");function Zr(){let e=t((o,v)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:t(()=>v,"create"),schema:v}),"codec");return[["searchSessionContent",$r,qn],["searchArchivedContent",$r,qn],["previewArchivedSession",Aa,_a]].map(([o,v,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:e(o+"Input",v)}],result:e(o+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(Zr,"discoveryInvocations");function Jr(e,s){let o=s?.trim().toLowerCase();if(!o)return null;let v=e.toLowerCase().indexOf(o);if(v<0)return null;let a=0,l=0,c;for(let x of e){let b=l+x.toLowerCase().length;if(c===void 0&&b>v&&(c=a),a+=x.length,b>=v+o.length)return{start:c??a,end:a};l=b}return null}t(Jr,"findTextRange");function fn(e,s=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return NaN;let[o,v,a]=e.split("-").map(Number),l=new Date(o,v-1,a);return l.getFullYear()!==o||l.getMonth()!==v-1||l.getDate()!==a?NaN:(s&&l.setDate(l.getDate()+1),l.getTime())}t(fn,"dayBoundary");function Vn(e,s){return(!e||Number.isFinite(fn(e)))&&(!s||Number.isFinite(fn(s)))&&(!e||!s||e<=s)}t(Vn,"validUpdatedRange");function Qr(e,s,o){if(!Vn(s,o))return!1;if(!s&&!o)return!0;let v=typeof e=="number"?e:Date.parse(e??"");return Number.isFinite(v)&&(!s||v>=fn(s))&&(!o||v<fn(o,!0))}t(Qr,"matchesUpdatedRange");async function Xr(e,s,o,{signal:v,onProgress:a}={}){let l=[],c=[],x=[...new Set(e)],b=t(()=>{if(v?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let _=0;_<x.length;_+=20){b();let S=qn.parse(await o({sessionIds:x.slice(_,_+20),query:s}));b(),l.push(...S.items),c.push(...S.failures),a?.({done:Math.min(_+20,x.length),total:x.length,items:[...l],failures:[...c]})}return b(),{items:l,failures:c}}t(Xr,"searchArchiveBatches");function es(e,s={}){let o=e.createElement;function v({text:f,query:k=""}){let D=Jr(f,k);return D?o(e.Fragment,null,f.slice(0,D.start),o("mark",null,f.slice(D.start,D.end)),f.slice(D.end)):f}t(v,"HighlightedText");function a(f,k,D,z){let U=JSON.stringify(f),B=JSON.stringify([U,k]),[V,xe]=e.useState(0),[K,Y]=e.useState({key:"",status:"idle",items:[],failures:[]});return e.useEffect(()=>{if(!D||!k.trim()||!z)return;let Q=new AbortController;Y({key:B,status:"loading",items:[],failures:[],done:0,total:f.length});let ke=setTimeout(()=>{Xr(JSON.parse(U),k,z,{signal:Q.signal,onProgress:t(X=>{Q.signal.aborted||Y({key:B,status:"loading",...X})},"onProgress")}).then(X=>{Q.signal.aborted||Y({key:B,status:"ready",done:f.length,total:f.length,...X})}).catch(X=>{Q.signal.aborted||Y(rt=>({...rt,key:B,status:"error",error:Ye(X)}))})},350);return()=>{Q.abort(),clearTimeout(ke)}},[U,k,D,z,V]),{...D&&k.trim()&&z?K.key===B?K:{key:B,status:"loading",items:[],failures:[],done:0,total:f.length}:{status:"idle",items:[],failures:[]},retry:t(()=>xe(Q=>Q+1),"retry")}}t(a,"useArchiveSearch");function l(f,k){let[D,z]=e.useState(null),[U,B]=e.useState({status:"idle"}),[V,xe]=e.useState(0),K=D,Y=D&&k.includes(D.session.id);return e.useEffect(()=>{D&&!Y&&z(null)},[D,Y]),e.useEffect(()=>{if(!Y||typeof window>"u")return;let Z=t(Q=>{Q.key==="Escape"&&(Q.preventDefault(),Q.stopPropagation(),Q.stopImmediatePropagation(),z(null))},"onKeyDown");return window.addEventListener("keydown",Z,!0),()=>window.removeEventListener("keydown",Z,!0)},[Y]),e.useEffect(()=>{if(!D||!Y||!f)return;let Z=!0;return B({key:K,status:"loading"}),Promise.resolve().then(()=>f({sessionId:D.session.id,query:D.query})).then(Q=>{Z&&B({key:K,status:"ready",value:Q})}).catch(Q=>{Z&&B({key:K,status:"error",error:Ye(Q)})}),()=>{Z=!1}},[K,Y,f,V]),{target:Y?D:null,...U.key===K?U:{status:"loading"},open:t((Z,Q="")=>z({session:Z,query:Q}),"open"),close:t(()=>z(null),"close"),retry:t(()=>xe(Z=>Z+1),"retry")}}t(l,"useArchivePreview");function c({title:f,failures:k,separator:D}){let[z,U]=e.useState(!1),B=o("ul",null,k.map(V=>o("li",{key:V.sessionId},V.sessionId,D,V.message)));return o(gn,{title:f,open:z,onToggle:t(()=>U(V=>!V),"onToggle")},B)}t(c,"FailureDetails");function x(f,k){let D=s.Button??(z=>o("button",{type:"button",disabled:z.disabled,onClick:z.onClick},z.children));return o(D,{variant:"outline",size:"sm",...k},f)}t(x,"textButton");function b({t:f,from:k,to:D,onFrom:z,onTo:U,invalid:B,onClear:V}){return o("div",{className:"dsham_dateFilter"},o(qr,{React:e,from:k,to:D,invalid:B,label:f("discovery.date"),fromLabel:f("discovery.from"),toLabel:f("discovery.to"),onFrom:z,onTo:U,onClear:V,t:f}),B?o("p",{className:"dsham_dateAlert",role:"alert"},f("discovery.invalidDate")):null)}t(b,"DiscoveryFilters");function _({state:f,t:k}){return f.status==="idle"?null:o("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},o("p",null,k(f.status==="loading"?"discovery.searching":f.status==="error"?"discovery.searchError":"discovery.searched",{done:f.done??0,total:f.total??0})),f.status==="error"&&o("p",null,f.error),f.failures.length>0&&o(c,{title:k("discovery.failed",{n:f.failures.length}),failures:f.failures,separator:k("common.separator")}),(f.status==="error"||f.status==="ready"&&f.failures.length>0)&&x(k("discovery.retry"),{onClick:f.retry}))}t(_,"SearchStatus");function S({preview:f,t:k,MarkdownText:D}){let[z,U]=e.useState(!1);if(f.status==="loading")return o("p",{role:"status"},k("discovery.loading"));if(f.status==="error")return o("div",null,o("p",{role:"alert"},f.error),x(k("discovery.retry"),{onClick:f.retry}));let B=f.value;return B?o("div",{className:"dsham_previewMessages"},o("div",{className:"dsham_previewToolbar"},o("span",{title:k("discovery.previewHint")},k("discovery.readOnly")," \xB7 ",k("discovery.messageCount",{n:B.messages.length})),D&&o(s.SegmentedControl??"div",{id:"dsham-preview-mode",label:k("discovery.displayMode"),value:z?"raw":"formatted",options:[{value:"formatted",label:k("discovery.formatted")},{value:"raw",label:k("discovery.raw")}],onChange:t(V=>U(V==="raw"),"onChange")})),B.hasEarlier&&o("p",null,k("discovery.earlier")),!B.messages.length&&o("p",null,k("discovery.empty")),B.messages.map(V=>o("article",{key:V.seq,className:"dsham_previewMessage"},o("div",{className:"dsham_previewRole","data-role":V.role},o("span",{"aria-hidden":!0},k(V.role==="user"?"discovery.you":"discovery.ai")),o("strong",null,k("discovery."+V.role))),z||!D?o("pre",{className:"dsham_previewRaw"},o(v,{text:V.text,query:f.target?.query})):o(D,{text:V.text,streaming:!1,labels:{code:{copyLabel:k("discovery.copyCode"),copiedLabel:k("details.copied")},footnotes:k("discovery.footnotes")}}),V.truncated&&o("small",null,k("discovery.truncated")))),B.hasLater&&o("p",null,k("discovery.later"))):null}return t(S,"PreviewContent"),{HighlightedText:v,useArchiveSearch:a,useArchivePreview:l,DiscoveryFilters:b,SearchStatus:_,PreviewContent:S}}t(es,"createDiscoveryTools");var ts=[".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(""),ns={"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"},rs={"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"},ss={"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 It=class extends Error{static{t(this,"ArchiveNavigationError")}code;constructor(s){super(s),this.name="ArchiveNavigationError",this.code=s}};function as(e,s){return e instanceof It?s(`archives.${e.code}`):Ye(e)}t(as,"formatArchiveNavigationError");function Ta(e,s){if(typeof e?.retainInfo!="function")return;let o=e.retainInfo(s),v=o&&typeof o=="object"&&"getSnapshot"in o&&typeof o.getSnapshot=="function"?o.getSnapshot():o;if(!v||typeof v!="object"||!("retainedBy"in v))return;let a=v.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}t(Ta,"retainInfoSnapshot");function Ra(e){let s=e?.byId;if(s!==void 0){for(let o of Object.values(s))if(o&&(o.retainedBy?.mainView??0)>0)return o.id}}t(Ra,"mainViewSessionId");function dt(e){return Ra(e)}t(dt,"currentSessionId");function ja(e,s,o){return s===void 0||s===""?!1:(e?.byId?.[s]?.retainedBy?.mainView??0)>0||(Ta(o,s)?.retainedBy?.mainView??0)>0}t(ja,"sessionIsCurrent");async function is(e,s,o,v=()=>!0){if(o){if(typeof e.prepare=="function"&&await e.prepare(s),!v())return;await e.restore(s)}v()&&await e.open(s)}t(is,"openArchivedConversation");function os(e,s,o,{onOpened:v=t(()=>{},"onOpened"),beginNavigation:a,warn:l=t((...c)=>console.warn(...c),"warn")}={}){let c,x=e?.clearArchivedCurrent,b=e&&Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent"),_=t(k=>ja(s.list.getSnapshot(),k,s),"viewing"),S=t(function(...k){return c!==void 0&&_(c)&&o.list.getSnapshot().archivedSessionIds.includes(c)?!1:(c=void 0,x?.apply(this,k))},"wrapped"),f=t(()=>e&&Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent")?.value===S,"ownsWrapper");if(e&&typeof x=="function")try{if(e.clearArchivedCurrent=S,!f())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(k){l("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",k)}return{open(k){c=k;try{if(typeof x=="function"&&!f()&&o.list.getSnapshot().archivedSessionIds.includes(k))throw l("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new It("navigationUnavailable");if(a?.(),typeof e?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new It("navigationUnavailable");if(e.openSession(k),!_(k))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof x=="function"}),new It("sessionNotRetained");v()}catch(D){throw c=void 0,D}},dispose(){c=void 0,!(!e||Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent")?.value!==S)&&(b?Object.defineProperty(e,"clearArchivedCurrent",b):delete e.clearArchivedCurrent,x?.call(e))}}}t(os,"allowArchivedNavigation");var Tt=require("@deepseek-ai/dsh-client-ui-primitives");var ls={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"},cs={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 Qt(e){return e.toLowerCase().startsWith("zh")?ls:cs}t(Qt,"pluginUpdateCopy");function Na(e,s,o,v){let a=Qt(e),l=s?.restartDesktop===!0||s?.profileName==="desktop",c=l?{...a,manualHint:a.manualHintDesktop}:a,x=o!=="idle",b=c.checking,_="";return o==="checking"?b=c.checking:o==="updating"?b=c.updating:v.type==="error"?(b=v.message||c.failed,_="error"):v.type==="restart"?(b=l?c.restartDesktop:c.restart,_="success"):v.type==="restarting"?(b=c.restarting,_="success"):s===void 0?b=c.checking:s.latestCheckFailed?(b=c.failed,_="error"):!s.canAutoUpdate&&s.updateAvailable?(b=c.unavailable,_="update"):s.updateAvailable?(b=`${c.found}: v${s.latestVersion??c.unknown}`,_="update"):(b=c.latest,_="success"),{copy:c,busy:x,message:b,kind:_,loading:o==="updating",updateLabel:o==="updating"?c.updating:c.auto,disabled:x||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"}}t(Na,"describePluginUpdate");function ds(e,s,o){let v="idle",a=s,l={type:"status"},c=0,x=new Set,b=t(()=>{for(let S of x)S()},"emit"),_=t(S=>{a=S,o?.(S)},"assign");return{get posts(){return c},subscribe(S){return x.add(S),()=>{x.delete(S)}},view(S){return Na(S,a,v,l)},async check(){if(v==="idle"){v="checking",l={type:"status"},b();try{_(await e("GET")),l={type:"status"}}catch(S){l={type:"error",message:S instanceof Error?S.message:""}}finally{v="idle",b()}}},async update(){if(v==="idle"){v="updating",l={type:"status"},c+=1,b();try{let S=await e("POST");_(S),l={type:S.autoReload===!0?"restarting":"restart"}}catch(S){l={type:"error",message:S instanceof Error?S.message:""}}finally{v="idle",b()}}}}}t(ds,"createUpdateFlow");function us(e,s,o){return`dsh plugin${e.trim()===""?"":` --profile ${e.trim()}`} add ${s}@${o} --registry=https://registry.npmjs.org/`}t(us,"manualPluginUpdateCommand");function hs(e,s){return e.key!=="Escape"?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),s(),!0)}t(hs,"handlePluginUpdateEscape");function Da(){let e=globalThis.document;if(typeof e>"u"||e===null)return;let s=e.baseURI;if(!(typeof s!="string"||s===""))try{let o=new URL(s),v=o.pathname.lastIndexOf("/"),a=o.pathname.slice(v+1);return/\.(html?|php|aspx?|jsp)$/i.test(a)?o.pathname=o.pathname.slice(0,v+1):o.pathname.endsWith("/")||(o.pathname+="/"),o.href}catch{return}}t(Da,"pageBaseHref");function vn(e){if(typeof e!="string"||e.charAt(0)!=="/"||e.charAt(1)==="/")return e;let s=Da();if(s===void 0)return e;try{return new URL(e.slice(1),s).href}catch{return e}}t(vn,"resolveApiUrl");function ps(e){let o=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(o===void 0)throw new Error("createRoot unavailable");return o(e)}t(ps,"mountRoot");var Oa="x-michengai-plugin-update",ms="michengai-plugin-update-ui",$n=`
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=`
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 za(){let e=document.getElementById(ms);if(e!==null){e.textContent!==$n&&(e.textContent=$n);return}let s=document.createElement("style");s.id=ms,s.textContent=$n,(document.head??document.documentElement).append(s)}t(za,"ensureStyle");function Ma(e){if(e===null||typeof e!="object")return!1;let s=e;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")}t(Ma,"validPayload");async function gs(e,s,o){let v=o===void 0?{}:{signal:o},a=await fetch(e,s==="GET"?{cache:"no-store",...v}:{method:"POST",headers:{"content-type":"application/json",[Oa]:"1"},body:"{}",...v}),l=await a.json();if(!a.ok||!Ma(l))throw new Error(l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:Qt(document.documentElement.lang).failed);return l}t(gs,"requestStatus");function Pa(e){let s=M.useRef(null);return M.useLayoutEffect(()=>{s.current?.replaceChildren(e.node)},[e.node]),M.createElement("span",{ref:s,className:"mpi-icon","aria-hidden":!0})}t(Pa,"HostIcon");function La(e){let s=M.useRef(null),[,o]=M.useState(0),[v,a]=M.useState("idle");M.useEffect(()=>e.flow.subscribe(()=>o(S=>S+1)),[e.flow]),M.useEffect(()=>{let S=document.documentElement,f=new MutationObserver(()=>o(k=>k+1));return f.observe(S,{attributes:!0,attributeFilter:["lang"]}),()=>f.disconnect()},[]),M.useEffect(()=>{e.flow.check()},[e.flow]),M.useEffect(()=>{function S(f){hs(f,e.onClose)}return t(S,"onKey"),document.addEventListener("keydown",S,!0),()=>document.removeEventListener("keydown",S,!0)},[e.onClose]);let l=document.documentElement.lang,c=e.flow.view(l),x=l.toLowerCase().startsWith("zh")?e.zhName:l.toLowerCase().startsWith("ru")?e.ruName:e.enName,b=us(c.profileRaw,e.packageName,c.latestRaw),_=v==="copied"?c.copy.copied:v==="failed"?c.copy.copyFailed:c.copy.copy;return M.createElement(Tt.Modal,{open:!0,className:"mpi-dialog",title:`${x} ${c.copy.update}`,closeLabel:"Close",onClose:e.onClose,footer:[M.createElement(Tt.Button,{key:"check",variant:"outline",disabled:c.busy,onClick:t(()=>{e.flow.check()},"onClick")},c.copy.recheck),M.createElement(Tt.Button,{key:"update",variant:"primary",disabled:c.disabled,onClick:t(()=>{e.flow.update()},"onClick")},c.updateLabel)]},M.createElement("div",{ref:s},M.createElement("p",{className:"mpi-intro"},c.copy.intro),M.createElement("dl",{className:"mpi-meta"},M.createElement("dt",null,c.copy.current),M.createElement("dd",null,M.createElement("span",{className:"mpi-mono"},c.currentVersion)),M.createElement("dt",null,c.copy.latestLabel),M.createElement("dd",{className:"mpi-latest"},M.createElement("span",{className:"mpi-mono"},c.latestVersion),M.createElement("span",{className:"mpi-status",role:"status","data-kind":c.kind,...c.kind==="update"?{style:{color:"#e8b15a"}}:{}},c.message)),M.createElement("dt",null,c.copy.profile),M.createElement("dd",null,M.createElement("span",{className:"mpi-mono"},c.profileName))),c.busy?M.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},M.createElement("div",{className:"dssm-update-progress-bar"})):null,M.createElement("section",{className:"mpi-manual"},M.createElement("h3",null,c.copy.manual),M.createElement("p",null,c.copy.manualHint),M.createElement("div",{className:"mpi-command"},M.createElement("code",null,b),M.createElement(Tt.Button,{variant:"outline",size:"sm",disabled:c.busy,onClick:t(()=>{let S=navigator.clipboard?.writeText(b);if(S===void 0){a("failed");return}S.then(()=>{a("copied"),window.setTimeout(()=>a("idle"),1400)}).catch(()=>a("failed"))},"onClick")},_)))))}t(La,"UpdateDialog");function fs(e){if(typeof document>"u"||document.body===null)return()=>{};let s=vn(e.endpoint);za();let o=new AbortController,v,a,l,c,x,b,_;function S(){l?.unmount(),l=void 0,a=void 0,c=void 0}t(S,"unmountCheck");function f(){if(l===void 0)return;c===void 0&&(c=e.createIcon("refresh"));let K=c;l.render(M.createElement(Tt.Button,{variant:"outline",size:"sm",onClick:D,icon:M.createElement(Pa,{node:K})},M.createElement("span",{"data-mpi-label":""},Qt(document.documentElement.lang).check)))}t(f,"renderCheck");function k(){b?.unmount(),b=void 0,x?.remove(),x=void 0}t(k,"closeDialog");function D(){k();let K=document.createElement("div");K.className="mpi-dialog-root",document.body.append(K),x=K,b=ps(K),b.render(M.createElement(La,{flow:ds(Y=>gs(s,Y,o.signal),v,Y=>{v=Y,z()}),packageName:e.packageName,zhName:e.zhName,enName:e.enName,ruName:e.ruName,onClose:k}))}t(D,"openDialog");function z(){let K=document.querySelector(e.titleRowSelector);if(K===null)return;let Y=K.querySelector("h1,h2"),Z=K.querySelector(e.linksSelector);if(e.isEnabled&&!e.isEnabled()){if(x!==void 0&&k(),Z!==null){let X=Z.querySelector(`[data-mpi-check="${e.packageName}"]`);X!==null&&(S(),X.remove())}if(Y!==null){let X=Y.querySelector(`.mpi-version[data-package="${e.packageName}"]`);X!==null&&X.remove()}return}if(Y!==null&&v!==void 0){let X=Y.querySelector(`.mpi-version[data-package="${e.packageName}"]`);X===null&&(X=document.createElement("span"),X.className="mpi-version",X.dataset.package=e.packageName,Y.append(X));let rt=`v${v.currentVersion}`;X.textContent!==rt&&(X.textContent=rt)}if(a!==void 0&&!a.isConnected&&S(),Z===null)return;let Q=Z.querySelector(`[data-mpi-check="${e.packageName}"]`);if(Q!==null){let X=Q.querySelector("[data-mpi-label]");(X===null||X.textContent!==Qt(document.documentElement.lang).check)&&f();return}let ke=document.createElement("span");ke.dataset.mpiCheck=e.packageName,ke.className="mpi-check-host",Z.append(ke),a=ke,l=ps(ke),f()}t(z,"applyControls");let U=new MutationObserver(()=>{_===void 0&&(_=window.requestAnimationFrame(()=>{_=void 0,z()}))});U.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]});let B,V=t(async()=>B||(B=(async()=>{try{return v=await gs(s,"GET",o.signal),z(),v}finally{B=void 0}})(),B),"load"),xe=t(()=>{z(),(!e.isEnabled||e.isEnabled())&&V().catch(()=>{})},"onToggle");return typeof window<"u"&&window.addEventListener("dsham-update-toggle",xe),z(),V().catch(()=>{}),()=>{o.abort(),U.disconnect(),k(),S(),typeof window<"u"&&window.removeEventListener("dsham-update-toggle",xe),_!==void 0&&window.cancelAnimationFrame(_),document.querySelectorAll(`[data-mpi-check="${e.packageName}"],.mpi-version[data-package="${e.packageName}"]`).forEach(K=>K.remove())}}t(fs,"observePluginUpdate");var Xt=require("@deepseek-ai/dsh-client-ui-primitives");var Fe=Br,Ua="@michengai/dsh-archive-manager",Gn="archived-sessions",Ba=4,vs="dsham-sidebar-entry-style",Fa=`
14
+ `;function Ka(){let e=document.getElementById(Es);if(e!==null){e.textContent!==Qn&&(e.textContent=Qn);return}let r=document.createElement("style");r.id=Es,r.textContent=Qn,(document.head??document.documentElement).append(r)}t(Ka,"ensureStyle");function Ya(e){if(e===null||typeof e!="object")return!1;let r=e;return typeof r.packageName=="string"&&typeof r.currentVersion=="string"&&typeof r.updateAvailable=="boolean"&&typeof r.profileName=="string"&&typeof r.canAutoUpdate=="boolean"&&typeof r.latestCheckFailed=="boolean"&&(r.latestVersion===void 0||typeof r.latestVersion=="string")}t(Ya,"validPayload");async function Is(e,r,i){let g=i===void 0?{}:{signal:i},a=await fetch(e,r==="GET"?{cache:"no-store",...g}:{method:"POST",headers:{"content-type":"application/json",[Ga]:"1"},body:"{}",...g}),l=await a.json();if(!a.ok||!Ya(l))throw new Error(l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:tn(document.documentElement.lang).failed);return l}t(Is,"requestStatus");function Za(e){let r=M.useRef(null);return M.useLayoutEffect(()=>{r.current?.replaceChildren(e.node)},[e.node]),M.createElement("span",{ref:r,className:"mpi-icon","aria-hidden":!0})}t(Za,"HostIcon");function Ja(e){let r=M.useRef(null),[,i]=M.useState(0),[g,a]=M.useState("idle");M.useEffect(()=>e.flow.subscribe(()=>i(b=>b+1)),[e.flow]),M.useEffect(()=>{let b=document.documentElement,v=new MutationObserver(()=>i(S=>S+1));return v.observe(b,{attributes:!0,attributeFilter:["lang"]}),()=>v.disconnect()},[]),M.useEffect(()=>{e.flow.check()},[e.flow]),M.useEffect(()=>{function b(v){ks(v,e.onClose)}return t(b,"onKey"),document.addEventListener("keydown",b,!0),()=>document.removeEventListener("keydown",b,!0)},[e.onClose]);let l=document.documentElement.lang,c=e.flow.view(l),x=l.toLowerCase().startsWith("zh")?e.zhName:l.toLowerCase().startsWith("ru")?e.ruName:e.enName,y=xs(c.profileRaw,e.packageName,c.latestRaw),E=g==="copied"?c.copy.copied:g==="failed"?c.copy.copyFailed:c.copy.copy;return M.createElement(zt.Modal,{open:!0,className:"mpi-dialog",title:`${x} ${c.copy.update}`,closeLabel:"Close",onClose:e.onClose,footer:[M.createElement(zt.Button,{key:"check",variant:"outline",disabled:c.busy,onClick:t(()=>{e.flow.check()},"onClick")},c.copy.recheck),M.createElement(zt.Button,{key:"update",variant:"primary",disabled:c.disabled,onClick:t(()=>{e.flow.update()},"onClick")},c.updateLabel)]},M.createElement("div",{ref:r},M.createElement("p",{className:"mpi-intro"},c.copy.intro),M.createElement("dl",{className:"mpi-meta"},M.createElement("dt",null,c.copy.current),M.createElement("dd",null,M.createElement("span",{className:"mpi-mono"},c.currentVersion)),M.createElement("dt",null,c.copy.latestLabel),M.createElement("dd",{className:"mpi-latest"},M.createElement("span",{className:"mpi-mono"},c.latestVersion),M.createElement("span",{className:"mpi-status",role:"status","data-kind":c.kind,...c.kind==="update"?{style:{color:"#e8b15a"}}:{}},c.message)),M.createElement("dt",null,c.copy.profile),M.createElement("dd",null,M.createElement("span",{className:"mpi-mono"},c.profileName))),c.busy?M.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},M.createElement("div",{className:"dssm-update-progress-bar"})):null,M.createElement("section",{className:"mpi-manual"},M.createElement("h3",null,c.copy.manual),M.createElement("p",null,c.copy.manualHint),M.createElement("div",{className:"mpi-command"},M.createElement("code",null,y),M.createElement(zt.Button,{variant:"outline",size:"sm",disabled:c.busy,onClick:t(()=>{let b=navigator.clipboard?.writeText(y);if(b===void 0){a("failed");return}b.then(()=>{a("copied"),window.setTimeout(()=>a("idle"),1400)}).catch(()=>a("failed"))},"onClick")},E)))))}t(Ja,"UpdateDialog");function As(e){if(typeof document>"u"||document.body===null)return()=>{};let r=wn(e.endpoint);Ka();let i=new AbortController,g,a,l,c,x,y,E;function b(){l?.unmount(),l=void 0,a=void 0,c=void 0}t(b,"unmountCheck");function v(){if(l===void 0)return;c===void 0&&(c=e.createIcon("refresh"));let K=c;l.render(M.createElement(zt.Button,{variant:"outline",size:"sm",onClick:R,icon:M.createElement(Za,{node:K})},M.createElement("span",{"data-mpi-label":""},tn(document.documentElement.lang).check)))}t(v,"renderCheck");function S(){y?.unmount(),y=void 0,x?.remove(),x=void 0}t(S,"closeDialog");function R(){S();let K=document.createElement("div");K.className="mpi-dialog-root",document.body.append(K),x=K,y=Cs(K),y.render(M.createElement(Ja,{flow:Ss(Y=>Is(r,Y,i.signal),g,Y=>{g=Y,j()}),packageName:e.packageName,zhName:e.zhName,enName:e.enName,ruName:e.ruName,onClose:S}))}t(R,"openDialog");function j(){let K=document.querySelector(e.titleRowSelector);if(K===null)return;let Y=K.querySelector("h1,h2"),Z=K.querySelector(e.linksSelector);if(e.isEnabled&&!e.isEnabled()){if(x!==void 0&&S(),Z!==null){let te=Z.querySelector(`[data-mpi-check="${e.packageName}"]`);te!==null&&(b(),te.remove())}if(Y!==null){let te=Y.querySelector(`.mpi-version[data-package="${e.packageName}"]`);te!==null&&te.remove()}return}if(Y!==null&&g!==void 0){let te=Y.querySelector(`.mpi-version[data-package="${e.packageName}"]`);te===null&&(te=document.createElement("span"),te.className="mpi-version",te.dataset.package=e.packageName,Y.append(te));let $=`v${g.currentVersion}`;te.textContent!==$&&(te.textContent=$)}if(a!==void 0&&!a.isConnected&&b(),Z===null)return;let X=Z.querySelector(`[data-mpi-check="${e.packageName}"]`);if(X!==null){let te=X.querySelector("[data-mpi-label]");(te===null||te.textContent!==tn(document.documentElement.lang).check)&&v();return}let Ee=document.createElement("span");Ee.dataset.mpiCheck=e.packageName,Ee.className="mpi-check-host",Z.append(Ee),a=Ee,l=Cs(Ee),v()}t(j,"applyControls");let L=new MutationObserver(()=>{E===void 0&&(E=window.requestAnimationFrame(()=>{E=void 0,j()}))});L.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]});let P,F=t(async()=>P||(P=(async()=>{try{return g=await Is(r,"GET",i.signal),j(),g}finally{P=void 0}})(),P),"load"),Ce=t(()=>{j(),(!e.isEnabled||e.isEnabled())&&F().catch(()=>{})},"onToggle");return typeof window<"u"&&window.addEventListener("dsham-update-toggle",Ce),j(),F().catch(()=>{}),()=>{i.abort(),L.disconnect(),S(),b(),typeof window<"u"&&window.removeEventListener("dsham-update-toggle",Ce),E!==void 0&&window.cancelAnimationFrame(E),document.querySelectorAll(`[data-mpi-check="${e.packageName}"],.mpi-version[data-package="${e.packageName}"]`).forEach(K=>K.remove())}}t(As,"observePluginUpdate");var nn=require("@deepseek-ai/dsh-client-ui-primitives");var We=Kr,Qa="@michengai/dsh-archive-manager",Xn="archived-sessions",Xa=4,Rs="dsham-sidebar-entry-style",ei=`
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 ys(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(vs)!==null||typeof document.createElement!="function")return;let e=document.createElement("style");e.id=vs,e.textContent=Fa,(document.head??document.documentElement)?.appendChild?.(e)}t(ys,"ensureSidebarEntryStyle");function Ha(e){let s=e&&typeof e.size=="number"?e.size:16;return Fe(Xt.IconArchiveOutlineMedium,{size:s})}t(Ha,"ArchiveSidebarIcon");function Wa(e){ys();let{t:s,enabled:o,onToggle:v,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:c,onlineUpdateDisabled:x,onlineUpdateLocked:b=!1}=e,_=[Fe("div",{key:"sidebar-entry",className:"dsham_bundle_row"},Fe("div",{className:"dsham_bundle_label_box"},Fe("span",{className:"dsham_bundle_title"},s("sidebar.entry.title")),Fe("span",{className:"dsham_bundle_desc"},s("sidebar.entry.desc"))),Fe(Xt.Switch,{checked:o,onChange:v,label:s("sidebar.entry.toggle"),disabled:a}))];if(typeof c=="function"){let S=b?`${s("update.entry.desc")} (${s("update.entry.locked")})`:s("update.entry.desc");_.push(Fe("div",{key:"online-update",className:"dsham_bundle_row"},Fe("div",{className:"dsham_bundle_label_box"},Fe("span",{className:"dsham_bundle_title"},s("update.entry.title")),Fe("span",{className:"dsham_bundle_desc"},S)),Fe(Xt.Switch,{checked:l,onChange:c,label:s("update.entry.toggle"),disabled:x||b,title:b?s("update.entry.locked"):void 0})))}return Fe(Ur,null,_)}t(Wa,"ArchiveBundleConfigCard");function qa(e){let[s,o]=Ut(e.getEnabled),[v,a]=Ut(e.getOnlineUpdateEnabled?e.getOnlineUpdateEnabled:()=>!0),[l,c]=Ut(e.getOnlineUpdateLocked?e.getOnlineUpdateLocked:()=>!1),[x,b]=Ut(!1),[_,S]=Ut(!1);Fr(()=>{let D=t(()=>{o(e.getEnabled()),e.getOnlineUpdateEnabled&&a(e.getOnlineUpdateEnabled()),e.getOnlineUpdateLocked&&c(e.getOnlineUpdateLocked())},"syncState");return D(),e.subscribe(D)},[e]);let f=t(D=>{b(!0),o(D),e.setSidebar(D).catch(()=>{o(e.getEnabled())}).finally(()=>{b(!1)})},"onToggleSidebar"),k=e.setOnlineUpdate?D=>{e.getOnlineUpdateLocked?.()||(S(!0),a(D),e.setOnlineUpdate(D).catch(()=>{e.getOnlineUpdateEnabled&&a(e.getOnlineUpdateEnabled())}).finally(()=>{S(!1)}))}:void 0;return Fe(Wa,{t:e.t,enabled:s,disabled:x,onToggle:f,onlineUpdateEnabled:v,onlineUpdateDisabled:_||l,onlineUpdateLocked:l,onToggleOnlineUpdate:k})}t(qa,"ArchiveBundleConfigCardWrapper");function Kn(e,s){if(ys(),!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:o,renderPanel:v,ns:a}=s,l=!1,c=!1,x=!1,b=null,_=null,S=0,f=!1,k,D=new Set,z=t(()=>{if(!f)for(let L of D)try{L()}catch{}},"notify"),U=t(()=>{if(f||!x||!l||b)return;let L=e.slots.register({name:"main",key:Gn,locale:a,inject:t(()=>{let ye=typeof s.injectProps=="function"?s.injectProps():{};return Object.assign({t:e.locale?.bind?e.locale.bind(a):void 0},ye)},"inject")},ye=>Fe("div",{className:"dsham_mainPanel"},v(ye)));b=typeof L=="function"?L:()=>{}},"mountMain"),B=t(()=>{if(b){try{b()}catch{}b=null}},"unmountMain"),V=t(()=>{if(f||!c||!l||_)return;let L=e.slots.register({name:"sidebar.panellist",id:Gn,order:Ba,label:t(()=>e.locale.bind(a)("archives.title"),"label"),locale:a},ye=>Ha(ye&&typeof ye=="object"&&"size"in ye?ye:void 0));_=typeof L=="function"?L:()=>{}},"mountRow"),xe=t(()=>{if(_){try{_()}catch{}_=null}},"unmountRow"),K=t(()=>{if(!f)if(l)U(),V();else{if(k?.panelInfo&&typeof k.selectPanel=="function")try{k.panelInfo.getSnapshot().activePanelId===Gn&&k.selectPanel(null)}catch{}xe(),B()}},"sync"),Y=t(async L=>{if(f)return l;let ye=++S;l=L,K(),z();try{return await o("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:L})}),L}catch(Ze){throw ye===S&&(l=!L,K(),z()),Ze}},"setEnabled"),Z=!0,Q=!1,ke=0,X=t(async L=>{if(f||Q)return Z;let ye=++ke;if(Z=L,z(),typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(L)}catch{}try{if(await o("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:L})}),ye===ke&&typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(L)}catch{}return L}catch(Ze){if(ye===ke&&(Z=!L,z(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(!L)}catch{}throw Ze}},"setOnlineUpdate"),rt=S;o("/sidebar-entry").then(L=>{!f&&S===rt&&L&&typeof L.enabled=="boolean"&&(l=L.enabled,K(),z())}).catch(()=>{});let Rt=ke;o("/online-update").then(L=>{if(!f&&ke===Rt&&L&&typeof L.enabled=="boolean"&&(Z=L.enabled,L.locked===!0&&(Q=!0),z(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(Z)}catch{}}).catch(()=>{});let _e=e;return typeof _e.inject=="function"&&_e.inject(["layout"],L=>{!f&&L.layout&&(k=L.layout)}),e.slots.inject("main",()=>{if(!f)return x=!0,U(),()=>{x=!1,B()}}),e.slots.inject("sidebar.panellist",()=>{if(!f)return c=!0,V(),()=>{c=!1,xe()}}),e.slots.inject("plugins.bundle.config",()=>{if(!f)return e.slots.register({name:"plugins.bundle.config",key:Ua,locale:a},L=>L&&L.view==="summary"?null:Fe(qa,{t:e.locale.bind(a),getEnabled:t(()=>l,"getEnabled"),setSidebar:Y,getOnlineUpdateEnabled:t(()=>Z,"getOnlineUpdateEnabled"),setOnlineUpdate:X,getOnlineUpdateLocked:t(()=>Q,"getOnlineUpdateLocked"),subscribe:t(ye=>(D.add(ye),()=>{D.delete(ye)}),"subscribe")}))}),{isEnabled:t(()=>l,"isEnabled"),isSupported:t(()=>c,"isSupported"),setEnabled:Y,isOnlineUpdateEnabled:t(()=>Z,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:t(()=>Q,"isOnlineUpdateLocked"),setOnlineUpdate:X,destroy:t(()=>{f||(f=!0,S++,ke++,k=void 0,D.clear(),xe(),B())},"destroy")}}t(Kn,"setupSidebarEntry");function Yn(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(Yn,"checkedId");var Va={parse(e){let s=ce(e);if(!s||typeof s!="object"||typeof s.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:Yn(s.sessionId),favorite:s.favorite}}},$a={parse(e){let s=ce(e);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(Yn))]}},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(s){return{success:!1,error:s}}}};function bs(){let e=t((s,o)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${s}`,create:t(()=>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:e("FavoriteInput",Va)}],result:e("FavoriteState",$a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(bs,"favoriteInvocations");function Zn(e,{days:s,now:o=Date.now(),favorites:v=new Set,currentId:a,pending:l=new Map}){if(!e||!Number.isInteger(s)||s<1||s>36500||v.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<=o-s*864e5}t(Zn,"idleArchiveCandidate");async function yn(e,s,{onProgress:o,refresh:v}={}){let a=[...new Set(e.map(Yn))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},c=t(()=>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 x of a){try{(await s(x)?l.succeeded:l.skipped).push(x)}catch(b){l.failures.push({sessionId:x,message:b instanceof Error?b.message:String(b)}),l.remaining.push(x)}c()}try{await v?.()}catch(x){l.refreshError=x instanceof Error?x.message:String(x)}return l}t(yn,"runSessionBatch");function ws({workspaces:e,sessions:s,archive:o,restore:v,deleteOne:a,getFavorites:l,refresh:c,currentSessionId:x}){return async(b,_,S={})=>{if(!["archive","restore","undo","delete"].includes(b))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return yn(_,async f=>{let D=e.getSnapshot().archivedSessionIds.includes(f);if(b==="archive"){if(D||!s.getSnapshot().byId[f])return!1;if(S.idleDays!==void 0){let xe=new Set((await l()).favoriteSessionIds),K=s.getSnapshot();if(!Zn(K.byId[f],{days:S.idleDays,favorites:xe,currentId:x(K),pending:S.getPending?.()??S.pending}))return!1}return await o(f),e.getSnapshot().archivedSessionIds.includes(f)}return D?b==="delete"?(await a(f),!0):!((await v(f))?.archivedSessionIds??e.getSnapshot().archivedSessionIds).includes(f):!1},{onProgress:S.onProgress,refresh:c})}}t(ws,"createSessionOrganizer");function Ga(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(Ga,"formatBytes");function Ss(e,s){let o=e.createElement;function v(l,c){return o(s??(b=>o("button",{type:"button",disabled:b.disabled,onClick:b.onClick},b.children)),{variant:"outline",size:"sm",...c},l)}t(v,"textButton");function a({title:l,failures:c,separator:x}){let[b,_]=e.useState(!1),S=o("ul",null,c.map(f=>o("li",{key:f.sessionId},f.sessionId,x,f.message)));return o(gn,{title:l,open:b,onToggle:t(()=>_(f=>!f),"onToggle")},S)}return t(a,"FailureDetails"),t(function({t:c,archived:x,busy:b,ready:_,days:S,onDays:f,count:k,onPreview:D,progress:z,result:U,onRetry:B,undoCount:V,onUndo:xe,onReload:K,orphanCount:Y=0,orphanSizeBytes:Z=0,orphanCleaning:Q=!1,onCleanOrphans:ke}){return o(e.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}"),(!x||!_)&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},!_&&v(c("organizer.reloadFavorites"),{disabled:b,onClick:K}),!x&&o(e.Fragment,null,o("label",null,c("organizer.idleDays"),o(Wr,{min:1,max:36500,value:S===""?null:Number(S),disabled:b,"aria-label":c("organizer.idleDays"),onChange:t(X=>f(X==null?"":String(X)),"onChange")})),v(c("organizer.preview",{n:k}),{disabled:b||!_||k===0,onClick:D}))),!x&&o("p",null,c("organizer.rules"))),Y>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,c("organizer.orphanTitle",{n:Y})),ke&&v(c(Q?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:b||Q,onClick:ke})),o("p",null,c("organizer.orphanDesc",{size:Ga(Z)}))),(z||U||V>0)&&o("section",{className:"dsham_batchFeedback","aria-label":c("organizer.feedback")},z&&o("div",{role:"status","aria-live":"polite"},o("progress",{value:z.done,max:Math.max(1,z.total),"aria-label":c("organizer.progress")}),c("organizer.progressCount",{done:z.done,total:z.total})),U&&o("div",{role:"status"},o("strong",null,c(`organizer.${U.kind??"archive"}Result`)),o("p",null,c("organizer.result",{succeeded:U.succeeded.length,skipped:U.skipped.length,failed:U.failures.length})),U.failures.length>0&&o(a,{title:c("organizer.failureDetails"),failures:U.failures,separator:c("common.separator")}),U.refreshError&&o("p",{role:"alert"},c("organizer.refreshError",{detail:U.refreshError})),U.remaining.length>0&&v(c("organizer.retry",{n:U.remaining.length}),{disabled:b,onClick:B})),V>0&&o("div",{className:"dsham_organizerControls"},v(c("organizer.undo",{n:V}),{disabled:b,onClick:xe}),o("p",null,c("organizer.undoHint")))))},"OrganizerPanel")}t(Ss,"createOrganizerPanel");var xs={"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"},ks={"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."},Cs={"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 Ft=Function("return globalThis.__dshArchiveReactDOM")(),Es=Function("return globalThis.__dshArchiveReactDOMClient")(),Is=Ft.createPortal,oo=Ft.flushSync,lo=Es?.createRoot,co=Es?.hydrateRoot,uo=Ft.findDOMNode,ho=Ft.unmountComponentAtNode,po=Ft.unstable_batchedUpdates,mo=Ft.version;function Ka(e){var s={exports:{}},o=s.exports;Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});let v=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:r,title:i,description:u,footer:p,children:m,className:C,width:R}){let I=l.useRef(null),P=l.useCallback(()=>I.current?.closest(".dsham_settings")??document.body,[]),[T,j]=l.useState(null);l.useEffect(()=>{if(!n){j(null);return}j(P())},[n,P]),l.useEffect(()=>{if(!n)return;let h=t(ge=>{ge.key==="Escape"&&(ge.preventDefault(),ge.stopPropagation(),"stopImmediatePropagation"in ge&&typeof ge.stopImmediatePropagation=="function"&&ge.stopImmediatePropagation(),r())},"onKey");return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[n,r]);let F=(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:vt("dsham_modalDialog",C),style:{width:R??560},children:[(0,a.jsx)("h2",{children:i}),u!=null&&(0,a.jsx)("p",{children:u}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:m}),p!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:p})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b,{refObject:I,getContainer:P}),n&&T?Is(F,T):null]})}t(x,"SettingsModal");function b({refObject:n,getContainer:r}){return(0,a.jsx)("span",{hidden:!0,ref:n,"data-get-container":r})}t(b,"SettingsModalAnchor");function _({variant:n="outline",icon:r,children:i,className:u,disabled:p,title:m,onClick:C,"aria-label":R,"aria-pressed":I,"aria-expanded":P,"aria-haspopup":T}){return(0,a.jsx)(c.Button,{variant:n,size:"sm",className:u,disabled:p,title:m,onClick:C,"aria-label":R,"aria-pressed":I,"aria-expanded":P,"aria-haspopup":T,icon:r,children:i})}t(_,"settingsButton");function S({variant:n="outline",danger:r=!1,disabled:i,onClick:u,children:p}){return(0,a.jsx)(c.Button,{variant:r?"outline":n,className:r?"dsham_btnDanger":void 0,disabled:i,onClick:u,children:p})}t(S,"modalFooterButton");function f(n,r){let i={className:n?"dsham_archiveTabsLocked":void 0,children:r};return n&&(i.inert=""),i}t(f,"tabsShell");let k=Ss(l,c.Button),{HighlightedText:D,useArchiveSearch:z,useArchivePreview:U,DiscoveryFilters:B,SearchStatus:V,PreviewContent:xe}=es(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 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 K[n]){let p=document.createElementNS("http://www.w3.org/2000/svg","path");p.setAttribute("d",u),i.append(p)}return r.append(i),r}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}},Q={parse(n){let r=ce(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}},ke={parse(n){let r=ce(n);if(typeof r!="object"||r===null||Array.isArray(r)||r.deleted!==!0)throw new TypeError("deleted must be true");return r}},X={parse(n){let r=ce(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")}},rt={parse(n){let r=ce(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}},Rt={parse(n){let r=ce(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 _e(n,r){return{mode:"strict",typeSymbol:n,create:t(()=>r,"create"),schema:r}}t(_e,"strictCodec");let L={package:"@michengai/dsh-archive-manager",descriptors:[...bs(),...Zr(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:_e("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:_e("@michengai/dsh-archive-manager/types#ArchivedSessionIds",Q),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:_e("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:_e("@michengai/dsh-archive-manager/types#Deleted",ke),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:_e("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",X)}],result:_e("@michengai/dsh-archive-manager/types#DeletedBatch",rt),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:_e("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",Rt),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:_e("@michengai/dsh-archive-manager/types#OrphanSubagentDiagnosis",{parse(n){let r=ce(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:_e("@michengai/dsh-archive-manager/types#CleanOrphanTarget",{parse(n){if(n==null)return{};let r=ce(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:_e("@michengai/dsh-archive-manager/types#CleanOrphanResult",{parse(n){let r=ce(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}}]},ye=".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=ye,document.head.appendChild(n)}let Ze=".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=Ze,document.head.appendChild(n)}let jt=".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=jt,document.head.appendChild(n)}let en=".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=en,document.head.appendChild(n)}function Je(n){let r=new Map;for(let i of Object.values(n)){if(i.origin!=="subagent")continue;let u=new Set,p=i;for(;p?.origin==="subagent"&&p.parentId!==void 0&&!u.has(p.id);){u.add(p.id);let m=r.get(p.parentId);m===void 0?r.set(p.parentId,{count:1,runningCount:i.running?1:0}):(m.count+=1,i.running&&(m.runningCount+=1)),p=n[p.parentId]}}return r}t(Je,"indexSubagentDescendants");let bn="__flat_session_order__",Nt="dsh.archive-manager.workspace.view.v1",Dt="dsh.workspace.view.v5";function E(n){let r=n??globalThis.localStorage;if(r==null||typeof r.getItem!="function"||typeof r.setItem!="function")return!1;try{if(r.getItem(Nt)!=null)return!1;let i=r.getItem(Dt);return i==null?!1:(r.setItem(Nt,i),!0)}catch{return!1}}t(E,"migrateWorkspaceViewPersist");function ne(){return E(),(0,v.defineStore)({init:t(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:Nt,actions:{setGroupBy:t((n,r)=>{n.groupBy=r},"setGroupBy"),setOrderBy:t((n,r)=>{n.orderBy=r},"setOrderBy"),setShowArchived:t((n,r)=>{n.showArchived=r===!0},"setShowArchived"),setGroupExpanded:t((n,r,i)=>{n.groupExpansion[r]=i},"setGroupExpanded"),retainAccountKeys:t((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:t((n,r,i,u)=>{n.sessionOrderByAccount[r]=i,n.sessionUpdatedAtByAccount[r]=u},"syncSessionOrderAccount"),setSessionOrder:t((n,r,i)=>{n.sessionOrderByAccount[r]=i},"setSessionOrder")}})}t(ne,"createWorkspaceViewStore");function je(){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(je,"GithubMark16");function Ot(){let n=c.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}t(Ot,"FeedbackIcon");function zt({archiveSessions:n,archiveSession:r,sessionStore:i,workspaceStore:u,unarchiveSession:p,deleteSession:m,unarchiveSessions:C,deleteArchivedSessions:R,archivedSessionMetadata:I,openConversation:P,focusSessionWorkspace:T,viewState:j,close:F,t:h,diagnoseOrphanSubagents:ge,cleanOrphanSubagents:Ee,searchSessionContent:ie,searchArchivedContent:ht,previewArchivedSession:At,favoriteSessions:st,setSessionFavorite:$,organizeBatch:de,useSessionPendingInteraction:Mt,useSessionStatus:an}){let Qe=(0,l.useSyncExternalStore)(i.subscribe,i.getSnapshot),we=(0,l.useSyncExternalStore)(u.subscribe,u.getSnapshot),[at,bt]=(0,l.useState)("archived"),he=at==="archived",[pt,Xe]=(0,l.useState)(null),[qt,it]=(0,l.useState)(null),[Ve,mt]=(0,l.useState)(null),wt=t((d,w=null)=>{q(null),Ie(null),_t(!1),it(w),Xe(d)},"requestArchive"),on=t(()=>{W||(Xe(null),it(null),q(null))},"closeArchive"),ot=(0,l.useRef)(!1),[fe,St]=(0,l.useState)(null),Vt=(0,l.useRef)(!1),[W,Ne]=(0,l.useState)(!1),[et,q]=(0,l.useState)(null),[$t,Ie]=(0,l.useState)(null),xt=t(d=>{q(null),Ie(null),St(d)},"requestDelete"),[gt,Pt]=(0,l.useState)(j?.query??""),[g,y]=(0,l.useState)(j?.project??"all"),[N,pe]=(0,l.useState)(j?.sortBy??"updated"),[Se,oe]=(0,l.useState)({}),[De,Pe]=(0,l.useState)(()=>new Set),re=(0,l.useRef)(new Set),[be,Ae]=(0,l.useState)([]),[lt,$e]=(0,l.useState)([]),[J,ee]=(0,l.useState)(!1),[O,te]=(0,l.useState)(!1),ve=(0,l.useRef)(!1),[ue,Oe]=(0,l.useState)(!1),[ze,Le]=l.useState("content"),[Ge,Re]=l.useState(""),[Ce,le]=l.useState(""),[tt,ct]=(0,l.useState)(()=>new Set),[We,Ue]=(0,l.useState)("30"),[qe,_t]=(0,l.useState)(!1),[Ke,Nn]=(0,l.useState)(null),[Cr,ln]=(0,l.useState)(null),[Dn,cn]=(0,l.useState)([]),Lt=(0,l.useRef)(!1),On=(0,l.useRef)(null),zn=Os(Mt??js,an??Ns,typeof an=="function"),Er=(0,l.useRef)(zn.pending);Er.current=zn.pending;let kt=(0,l.useMemo)(()=>new Set(lt),[lt]),ta=t(async()=>{if(st)try{let d=await st();$e(d.favoriteSessionIds),ee(!0)}catch(d){ee(!1),q(Ye(d))}},"loadFavorites");(0,l.useEffect)(()=>{let d=!0;return st&&st().then(w=>{d&&($e(w.favoriteSessionIds),ee(!0))}).catch(w=>{d&&q(Ye(w))}),()=>{d=!1}},[st]);let na=t(async d=>{if(!(ve.current||W||!J)){ve.current=!0,te(!0),q(null);try{let w=await $({sessionId:d,favorite:!kt.has(d)});$e(w.favoriteSessionIds)}catch(w){q(Ye(w))}finally{ve.current=!1,te(!1)}}},"toggleFavorite"),dn=t(async(d,w,{idle:H=!1,retry:se=!1}={})=>{if(!(Lt.current||ve.current||re.current.size>0||!de)){Lt.current=!0,Ne(!0),q(null),Ie(null),ln(null),d==="archive"&&!se&&cn([]);try{let A=await de(d,w,{idleDays:H?Number(We):void 0,getPending:t(()=>Er.current,"getPending"),onProgress:t(ae=>{Nn(ae),d==="archive"&&ae.total>0&&ae.done>=ae.total&&(Xe(null),it(null),_t(!1))},"onProgress")});return ln({...A,kind:d,tab:at}),On.current=A.remaining.length?{kind:d,ids:A.remaining,idle:H}:null,d==="archive"&&cn(ae=>[...new Set([...ae,...A.succeeded])]),(d==="undo"||d==="restore"||d==="delete")&&cn(ae=>ae.filter(Be=>!A.succeeded.includes(Be)&&!A.skipped.includes(Be))),Ae(ae=>ae.filter(Be=>!A.succeeded.includes(Be)&&!A.skipped.includes(Be))),d==="delete"&&$e(ae=>ae.filter(Be=>!A.succeeded.includes(Be))),A}catch(A){q(Ye(A))}finally{Lt.current=!1,Ne(!1),Nn(null)}}},"executeBatch"),[Ir,ra]=(0,l.useState)(null),[Ar,_r]=(0,l.useState)(!1),Tr=t(()=>{typeof ge=="function"&&ge().then(ra).catch(d=>{console.warn("archive-manager: diagnose orphan subagents failed",d)})},"loadOrphans");(0,l.useEffect)(()=>{Tr()},[we.archivedSessionIds]);let sa=t(async()=>{if(!(Ar||typeof Ee!="function")){_r(!0),q(null),Ie(null);try{let d=await Ee({});(d.cleanedSessionIds.length>0||d.skippedSessionIds.length>0)&&Tr(),d.failures.length>0?(Ie(null),q(nn(d.failures,h))):d.cleanedSessionIds.length>0&&(q(null),Ie(h("organizer.orphanCleanSuccess",{n:d.cleanedSessionIds.length})))}catch(d){q(Ye(d))}finally{_r(!1)}}},"cleanOrphans"),Ct=(0,l.useRef)(!0),Mn=(0,l.useRef)(!1);(0,l.useEffect)(()=>(Ct.current=!0,()=>{Ct.current=!1}),[]);let un=t(async(d,w=!1)=>{if(W||Mn.current)return;Mn.current=!0,Ne(!0),q(null);let H=!1;try{await is({prepare:w?async se=>{await T?.(se)}:void 0,restore:t(async se=>{await p(se),H=!0},"restore"),open:t(async se=>{await P(se),Ct.current&&F?.()},"open")},d.id,w,()=>Ct.current)}catch(se){if(!Ct.current)return;if(H){bt("unarchived");let A=Et.find(ae=>ae.sessions.some(Be=>Be.id===d.id));A!==void 0&&y(A.key)}q(as(se,h))}finally{Mn.current=!1,Ct.current&&Ne(!1)}},"viewConversation");(0,l.useEffect)(()=>{j&&Object.assign(j,{query:gt,project:g,sortBy:N})},[gt,g,N,j]);let hn=(0,l.useMemo)(()=>he?we.archivedSessionIds:vr(Qe.byId,we.archivedSessionIds),[he,Qe.byId,we.archivedSessionIds]),Et=(0,l.useMemo)(()=>yr(Qe.byId,we.items,hn,h("group.ungrouped")),[Qe.byId,we,hn,h]),aa=t(d=>{W||re.current.size>0||(nt.close(),bt(d),Ae([]),Xe(null),it(null),q(null),Ie(null),y("all"),Pt(""),d!=="archived"&&N==="archived"&&pe("updated"))},"switchTab"),Rr=t(async(d,w=!1)=>{if(!(ot.current||W||!d?.length)){if(de){ot.current=!0;try{let H=await dn("archive",d,{idle:w}),se=H?.failures.map(A=>er(A.sessionId,A.message)).find(A=>A!==void 0);if(se!==void 0&&typeof r=="function"){let A=Qe.byId[se.sessionId];mt({sessionId:se.sessionId,title:A===void 0?se.sessionId:Me(A,h),kinds:se.kinds.join(", ")}),Xe(null),it(null),q(null);return}H&&(Xe(null),it(null),_t(!1))}finally{ot.current=!1}return}ot.current=!0,Ne(!0),q(null),Ie(null);try{let H=await n(d);Xe(null),it(null),H.archivedSessionIdsAdded.length>0&&Ie(h("archives.archiveSuccess",{n:H.archivedSessionIdsAdded.length})),H.failures&&H.failures.length>0?q(nn(H.failures,h)):(Ae([]),bt("archived"),y("all"),Pt(""))}catch(H){let se=Xn(H);if(se!==void 0&&typeof r=="function"){let A=Qe.byId[se.sessionId];mt({sessionId:se.sessionId,title:A===void 0?se.sessionId:Me(A,h),kinds:se.kinds.join(", ")}),Xe(null),it(null),q(null)}else{let A=rn(H);q(A===void 0?h("archives.archiveBatchFailed",{detail:H instanceof Error?H.message:String(H)}):h("archives.archiveActive",{kinds:A.join(", ")}))}}finally{ot.current=!1,Ne(!1)}}},"performArchive"),ia=t(()=>Rr(pt,qe),"confirmArchive"),oa=t(async d=>{q(null),Ie(null);try{await Yr(d.id),Ct.current&&Ie(h("details.copied"))}catch(w){Ct.current&&q(typeof mn(w)=="string"&&String(mn(w)).startsWith("copy.")?h(String(mn(w))):Ye(w))}},"copyId"),Pn=(0,l.useMemo)(()=>br(Et,N,Se,h,he?we.archivedSessionIds:void 0),[Et,N,Se,h,he,we.archivedSessionIds]);(0,l.useEffect)(()=>{if(W)return;let d=!1;return I().then(w=>{d||oe(Object.fromEntries(w.items.map(H=>[H.sessionId,H.createdAt])))}).catch(()=>{d||oe({})}),()=>{d=!0}},[I,we.archivedSessionIds,W]),(0,l.useEffect)(()=>{g!=="all"&&!Et.some(d=>d.key===g)&&y("all")},[Et,g]);let jr=!Vn(Ge,Ce),Nr=Pn.filter(d=>g==="all"||g===d.key).map(d=>({...d,sessions:d.sessions.filter(w=>(!ue||kt.has(w.id))&&Qr(w.updatedAt,Ge,Ce))})).filter(d=>d.sessions.length),Ln=ze==="content"&&!jr,Gt=z(Nr.flatMap(d=>d.sessions.map(w=>w.id)),gt,Ln,ie??ht),Un=new Map(Gt.items.map(d=>[d.sessionId,d])),nt=U(At,he?we.archivedSessionIds:[]),Dr=gt.trim().toLocaleLowerCase(),Kt=Nr.map(d=>({...d,sessions:d.sessions.filter(w=>!Dr||Me(w,h).toLocaleLowerCase().includes(Dr)||Un.has(w.id))})).filter(d=>d.sessions.length),Or=J?Kt.flatMap(d=>d.sessions).filter(d=>Zn(d,{days:Number(We),favorites:kt,currentId:dt(Qe),pending:zn.pending})).map(d=>d.id):[],Yt=(0,l.useMemo)(()=>mr(Kt),[Kt]),Bn=(0,l.useMemo)(()=>new Set(be),[be]),la=(0,l.useMemo)(()=>{let d=new Set(we.archivedSessionIds);return Dn.reduce((w,H)=>w+(d.has(H)?1:0),0)},[Dn,we.archivedSessionIds]),Fn=Yt.filter(d=>Bn.has(d)).length,ca=Yt.length>0&&Fn===Yt.length;(0,l.useEffect)(()=>{Ae(d=>gr(d,hn))},[hn]);let da=t((d,w)=>{Ae(H=>Tn(H,[d],w))},"toggleSessionSelection"),ua=t(d=>{Ae(w=>Tn(w,Yt,d))},"toggleVisibleSelection"),ha=t(d=>{W||re.current.has(d)||(re.current.add(d),Pe(new Set(re.current)),q(null),Ie(null),p(d).catch(w=>{q(Jn(w,h))}).finally(()=>{re.current.delete(d),Pe(new Set(re.current))}))},"onUnarchive"),zr=t(async d=>{if(!W){if(de){let w=Wt(we.archivedSessionIds,we.items,d),H=await dn("restore",w);return H&&{unarchivedSessionIds:H.succeeded}}Ne(!0),q(null),Ie(null);try{let w=await C(d);return w.unarchivedSessionIds.length>0&&Ie(h("archives.restoreSuccess",{n:w.unarchivedSessionIds.length})),w.failures&&w.failures.length>0&&q(nn(w.failures,h,Jn)),w}catch(w){q(h("archives.restoreBatchFailed",{detail:w instanceof Error?w.message:String(w)}))}finally{Ne(!1)}}},"onBatchUnarchive"),pa=t(async()=>{if(be.length===0)return;let d=await zr({scope:"sessions",sessionIds:be});if(d!==void 0){let w=new Set(d.unarchivedSessionIds);Ae(H=>H.filter(se=>!w.has(se)))}},"onSelectedUnarchive"),Mr=t(()=>{W||St(null)},"closeDelete");(0,l.useEffect)(()=>{if(fe===null)return;let d=t(w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),"stopImmediatePropagation"in w&&typeof w.stopImmediatePropagation=="function"&&w.stopImmediatePropagation(),W||St(null))},"onKeyDown");return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[fe,W]);let ma=t(async()=>{if(W||Vt.current||fe===null)return;if(fe.kind!=="batch"){Vt.current=!0,Ne(!0),q(null),Ie(null);try{await m(fe.session.id),St(null)}catch(w){q(wn(w,h))}finally{Vt.current=!1,Ne(!1)}return}if(Lt.current||ve.current||re.current.size>0)return;let{target:d}=fe;if(d.scope==="sessions"&&Wt(we.archivedSessionIds,we.items,d).length===0){St(null);return}Lt.current=!0,Ne(!0),q(null),Ie(null),ln(null),Nn(null);try{let w=await R(d),H=fr(w,h);H.kind==="error"?q(H.message):Ie(H.message);let se=new Set([...w.deletedSessionIds,...w.skippedSessionIds]);cn(ae=>ae.filter(Be=>!se.has(Be))),Ae(ae=>ae.filter(Be=>!se.has(Be))),$e(ae=>ae.filter(Be=>!se.has(Be)));let A=w.failures.map(ae=>ae.sessionId);On.current=A.length>0?{kind:"delete",ids:A,idle:!1}:null,ln({requested:w.requestedSessionIds,succeeded:w.deletedSessionIds,skipped:w.skippedSessionIds,failures:w.failures,remaining:A,refreshError:"refreshError"in w&&typeof w.refreshError=="string"?w.refreshError:null,kind:"delete",tab:at}),St(null)}catch(w){q(wn(w,h))}finally{Lt.current=!1,Ne(!1)}},"confirmDelete"),ft=fe?.kind==="batch"?fe.target.scope:null,ga=ft==="ungrouped"?h("archives.deleteUngroupedTitle"):ft==="workspace"?h("archives.deleteProjectTitle",{name:fe?.kind==="batch"?fe.title:""}):h(ft==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),Pr=fe===null?void 0:ft==="ungrouped"?h("archives.deleteUngroupedDesc",{n:fe.kind==="batch"?fe.count:0}):ft==="workspace"?h("archives.deleteProjectDesc",{name:fe?.kind==="batch"?fe.title:"",n:fe.kind==="batch"?fe.count:0}):ft==="sessions"?h("archives.deleteSelectedDesc",{n:fe.kind==="batch"?fe.count:0}):h("deleteSession.desc",{name:Me(fe.kind==="session"?fe.session:{},h)}),fa=h(ft==="ungrouped"?"archives.deleteUngroupedConfirm":ft==="workspace"?"archives.deleteProjectConfirm":ft==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:Us+Hs+Ws+qs+Vs}),(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)(je,{}),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)(Ot,{}),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",f(W||De.size>0,(0,a.jsx)(c.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:at==="unarchived"?"unarchived":"archived",onChange:t(d=>aa(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(at==="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)(_n,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:ue?"favorites":"all",options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:t(d=>typeof Oe=="function"&&Oe(d==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),(0,a.jsx)(_n,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:ze,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}],onChange:t(d=>typeof Le=="function"&&Le(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:gt,onChange:t(d=>Pt(d.target.value),"onChange"),placeholder:h(Ln?"discovery.searchPlaceholder":he?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(Ln?"discovery.searchPlaceholder":he?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)($s,{id:"dsham-sort-filter",t:h,disabled:W,favoritesOnly:ue,setFavoritesOnly:Oe,favoriteBusy:W||O||!J,sortBy:!he&&N==="archived"?"updated":N,setSortBy:pe,options:[...he?[{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)(_n,{id:"dsham-project-filter",className:"dsham_projectFilter",value:g,title:g==="all"?h("archives.allProjects"):Pn.find(d=>d.key===g)?.title??g,options:[{value:"all",label:h("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:h("archives.allProjects")},...Pn.map(d=>({value:d.key,label:d.title,title:d.title}))],onChange:y,"aria-label":h("archives.projectFilter")}),l.createElement(B,{t:h,from:Ge,to:Ce,onFrom:Re,onTo:le,invalid:jr,onClear:t(()=>{Re(""),le("")},"onClear")})]})}),l.createElement("style",null,ts),l.createElement(V,{state:Gt,t:h}),de&&(0,a.jsx)(k,{t:h,archived:he,busy:W||O||De.size>0,ready:J,days:We,onDays:Ue,count:Or.length,onPreview:t(()=>{wt(Or),_t(!0)},"onPreview"),progress:Ke,result:Cr?.tab===at?Cr:null,onRetry:t(()=>{let d=On.current;d&&(d.kind==="delete"?xt({kind:"batch",target:{scope:"sessions",sessionIds:d.ids},count:d.ids.length}):dn(d.kind,d.ids,{idle:d.idle,retry:!0}))},"onRetry"),undoCount:la,onUndo:t(()=>dn("undo",Dn,{retry:!0}),"onUndo"),onReload:ta,orphanCount:Ir?.count??0,orphanSizeBytes:Ir?.totalSizeBytes??0,orphanCleaning:Ar,onCleanOrphans:sa}),Et.length>0&&(0,a.jsx)(ur,{selectedCount:be.length,hiddenCount:be.length-Fn,allVisibleSelected:ca,selectedVisibleCount:Fn,visibleCount:Yt.length,busy:W,t:h,onToggle:ua,onClear:t(()=>Ae([]),"onClear"),onArchive:he?void 0:()=>wt([...be]),onRestore:pa,onDelete:t(()=>xt({kind:"batch",target:{scope:"sessions",sessionIds:be},count:be.length}),"onDelete")}),Et.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(he?"archives.empty":"archives.emptyUnarchived")}):Kt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:Gt.status==="loading"||Gt.status==="error"||Gt.failures.length?null:h("archives.emptyFiltered")}):Kt.map(d=>{let w=Ys(d.key),H=Et.find(A=>A.key===d.key)?.sessions.map(A=>A.id)??[],se=he?Wt(we.archivedSessionIds,we.items,w).length:H.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":!tt.has(d.key),"aria-controls":"dsham-group-"+encodeURIComponent(d.key),onClick:t(()=>ct(A=>{let ae=new Set(A);return ae.has(d.key)?ae.delete(d.key):ae.add(d.key),ae}),"onClick"),children:[(0,a.jsx)(tt.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)(Ks,{group:d,busy:W,onArchive:he?void 0:()=>wt(H,d),onRestore:t(()=>zr(w),"onRestore"),onDelete:t(()=>xt({kind:"batch",target:w,title:d.title,count:se}),"onDelete"),t:h})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(d.key),hidden:tt.has(d.key)||void 0,children:!tt.has(d.key)&&d.sessions.map(A=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":Bn.has(A.id),children:[(0,a.jsx)(hr,{checked:Bn.has(A.id),disabled:W,label:h("archives.selectSession",{name:Me(A,h)}),onChange:t(ae=>da(A.id,ae.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:Me(A,h),"aria-label":h("archives.openSession")+h("common.separator")+Me(A,h),disabled:W||De.has(A.id),onClick:t(()=>un(A),"onClick"),children:Me(A,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[Ls(A.updatedAt,h)]}),Un.has(A.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:W,title:h(he?"discovery.preview":"archives.openSession"),onClick:t(()=>he?nt.open(A,gt):un(A),"onClick")},l.createElement(D,{text:Un.get(A.id)?.snippet??"",query:gt}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof $=="function"&&_({variant:"outline",className:"dsham_iconAction"+(kt.has(A.id)?" dsham_favoriteOn":""),title:h(kt.has(A.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":kt.has(A.id),"aria-label":h(kt.has(A.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+Me(A,h),disabled:W||O||!J,onClick:t(()=>na(A.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:kt.has(A.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"})})}),_({variant:"outline",className:"dsham_iconAction",title:h(he?"archives.restore":"archives.archiveSelected"),"aria-label":h(he?"archives.restore":"archives.archiveSelected"),disabled:W||De.has(A.id),onClick:t(()=>he?ha(A.id):Rr([A.id]),"onClick"),icon:(0,a.jsx)(he?c.IconRefreshOutlineMedium:c.IconArchiveOutlineMedium,{size:16})}),he&&(0,a.jsx)(Gs,{busy:W||De.has(A.id),t:h,title:Me(A,h),onCopyId:t(()=>oa(A),"onCopyId"),onPreview:typeof At=="function"?()=>nt.open(A,gt):void 0,onRestoreOpen:t(()=>un(A,!0),"onRestoreOpen"),onDelete:t(()=>xt({kind:"session",session:A}),"onDelete")})]})]},A.id))})]},d.key)}),l.createElement(x,{width:900,open:nt.target!==null,onClose:nt.close,title:nt.target?Me(nt.target.session,h):h("discovery.preview"),footer:S({variant:"primary",disabled:W,onClick:t(()=>{if(nt.target){let d=nt.target.session;return nt.close(),un(d)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(xe,{preview:nt,t:h,MarkdownText:c.MarkdownText})}),pt===null&&et!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:et}),$t!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:$t}),(0,a.jsx)(x,{open:pt!==null,onClose:on,title:h("archives.archiveTitle",{n:pt?.length??0}),description:qt===null?h("archives.archiveSelectedDesc"):h(qt.key===sn?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:qt.title,n:pt?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[S({disabled:W,onClick:on,children:h("cancel")}),S({variant:"primary",disabled:W||!pt?.length,onClick:ia,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[de&&(0,a.jsx)("p",{children:h(qe?"organizer.idleConfirm":"organizer.manualConfirm")}),de&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(pt??[]).map(d=>(0,a.jsxs)("label",{children:[(0,a.jsx)(Hn,{checked:!0,disabled:W,label:Me(Qe.byId[d]??{id:d},h),onChange:t(()=>Xe(w=>(w??[]).filter(H=>H!==d)),"onChange")}),Me(Qe.byId[d]??{id:d},h)]},d))}),Ke&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:Ke.done,max:Math.max(1,Ke.total)}),h("organizer.progressCount",{done:Ke.done,total:Ke.total})]}),et!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:et})]})}),(0,a.jsx)(x,{open:Ve!==null,onClose:t(()=>{W||(mt(null),q(null))},"onClose"),title:h("archiveActive.title"),...Ve===null?{}:{description:h("archiveActive.desc",{name:Ve.title,kinds:Ve.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[S({disabled:W,onClick:t(()=>{W||(mt(null),q(null))},"onClick"),children:h("cancel")}),S({danger:!0,disabled:W,onClick:t(async()=>{if(!(ot.current||W||Ve===null||typeof r!="function")){ot.current=!0,Ne(!0),q(null);try{await r(Ve.sessionId,{stopActivity:!0}),Ae(d=>d.filter(w=>Ve===null||w!==Ve.sessionId)),bt("archived"),Ie(h("archives.archiveSuccess",{n:1})),mt(null)}catch(d){q(d instanceof Error?d.message:String(d))}finally{ot.current=!1,Ne(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:et!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:et})}),(0,a.jsx)(x,{open:fe!==null,onClose:Mr,title:ga,...Pr===void 0?{}:{description:Pr},footer:(0,a.jsxs)(a.Fragment,{children:[S({disabled:W,onClick:Mr,children:h("cancel")}),S({danger:!0,disabled:W,onClick:ma,children:fa})]}),children:(0,a.jsxs)(a.Fragment,{children:[W&&(0,a.jsxs)("div",{role:"status",children:[fe?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),Ke&&(0,a.jsx)("progress",{value:Ke.done,max:Math.max(1,Ke.total),"aria-label":h("organizer.progress")}),Ke&&h("organizer.progressCount",{done:Ke.done,total:Ke.total})]}),et!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:et})]})})]})]})}t(zt,"ArchivedSessionsSection");function tn(n){var r,i,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var p=n.length;for(r=0;r<p;r++)n[r]&&(i=tn(n[r]))&&(u&&(u+=" "),u+=i)}else for(i in n)n[i]&&(u&&(u+=" "),u+=i);return u}t(tn,"r");function vt(...n){for(var r,i,u=0,p="",m=arguments.length;u<m;u++)(r=arguments[u])&&(i=tn(r))&&(p&&(p+=" "),p+=i);return p}t(vt,"clsx");let Ht="Ungrouped";function G(n,r=Ht){if(n===void 0||n==="")return r;let i=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return i!==void 0&&i!==""?i:n}t(G,"workspaceLabel");function me(n,r){return r.updatedAt!==n.updatedAt?r.updatedAt-n.updatedAt:n.id<r.id?-1:1}t(me,"byRecency");function Te(n,r,i,u){return n.origin!=="subagent"&&(!i.has(n.id)||u===!0)&&(!n.blank||n.id===r)}t(Te,"sessionVisible");function yt(n){let r=n instanceof Error?n.message:String(n);return r.includes("UNKNOWN_SESSION")||r.includes("no such session")}t(yt,"isUnknownSessionError");function wn(n,r){if(yt(n))return r("deleteSession.unknown");let i=n instanceof Error?n.message:String(n);return r("deleteSession.failed",{detail:i})}t(wn,"formatDeleteError");function Jn(n,r){if(yt(n))return r("archives.unarchiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.unarchiveFailed",{detail:i})}t(Jn,"formatUnarchiveError");function nn(n,r,i=Qn){return n.map(u=>u.sessionId+r("common.separator")+i(new Error(u.message),r)).join(`
22
- `)}t(nn,"formatBatchFailures");function Qn(n,r){if(yt(n))return r("archives.archiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.archiveFailed",{detail:i})}t(Qn,"formatArchiveError");function rn(n){if(n===null||typeof n!="object")return;let r=ce(n),i=r.rpcError!==null&&typeof r.rpcError=="object"?ce(r.rpcError):void 0,u=r.name==="WorkspaceActiveSessionError"?r.activity:void 0,p=i?.details,m=r.name==="WorkspaceArchiveError"&&i?.code==="workspace/session-active"&&p!==null&&typeof p=="object"?ce(p).activity:void 0,C=Array.isArray(u)?u:Array.isArray(m)?m:void 0;if(C===void 0)return;let R=C.flatMap(I=>{if(I===null||typeof I!="object")return[];let P=ce(I).kind;return typeof P=="string"&&P.length>0?[P]:[]});return R.length>0?R:void 0}t(rn,"activeSessionActivity");function Xn(n){let r=rn(n);if(r===void 0||n===null||typeof n!="object")return;let i=ce(n),u=i.rpcError!==null&&typeof i.rpcError=="object"?ce(i.rpcError).details:void 0,p=u!==null&&typeof u=="object"?ce(u).sessionId:void 0,m=typeof i.sessionId=="string"?i.sessionId:typeof p=="string"?p:void 0;return m===void 0?void 0:{sessionId:m,kinds:r}}t(Xn,"activeSessionRefusal");function er(n,r){let i=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(r);if(i===null)return;let u=i[1].split(", ").filter(p=>p.length>0);return u.length>0?{sessionId:n,kinds:u}:void 0}t(er,"activeArchiveFromMessage");function As(n,r){let i=n instanceof Error?n.message:String(n);return r("archives.forkFailed",{detail:i})}t(As,"formatForkError");function Sn(n){return n.blank?"New Session":n.displayTitle}t(Sn,"sessionTitle");function tr(n,r,i,u,p,m,C){let R=[...m];return C==="recency"&&R.sort(me),{key:n,workspaceId:r,cwd:i,createdAt:u,label:p,sessions:R}}t(tr,"buildGroup");function _s(n,r){let i=new Map(n.map(m=>[m.id,m])),u=new Set,p=[];for(let m of r){let C=i.get(m);C===void 0||u.has(m)||(p.push(C),u.add(m))}for(let m of[...n].sort(me))u.has(m.id)||p.push(m);return p}t(_s,"orderedUngrouped");function nr(n,r,i,u,p){let m=[],C=new Set;for(let I of r){let P=[];for(let T of I.sessionIds){let j=n.byId[T];j!==void 0&&(C.add(T),Te(j,dt(n),i,p)&&P.push(j))}m.push(tr(I.workspaceId,I.workspaceId,I.path,Date.parse(I.createdAt),I.title,P,"account"))}let R=n.ids.map(I=>n.byId[I]).filter(I=>I!==void 0&&!C.has(I.id)&&Te(I,dt(n),i,p));return R.length>0&&m.push(tr("",void 0,void 0,void 0,Ht,u===void 0?R:_s(R,u),u===void 0?"recency":"account")),m}t(nr,"groupByWorkspace");function xn(n,r,i){if(!n||i.has(n))return!1;let u=r?.[n];return!(u===void 0||u.origin==="subagent"||u.blank)}t(xn,"isWorkspaceTaskCandidate");function rr(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 p=r.querySelector(".title")??r.querySelector("[class*='title']");return{workspaceId:u,title:p?.textContent?.trim()||u}}t(rr,"workspaceMenuTriggerFrom");function kn(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)}t(kn,"isWorkspaceDeleteMenuItem");function Ts(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}t(Ts,"visiblePendingKind");function sr(n,r){let i=r.get(n.id),u=i===void 0?n.pendingInteraction:i.kind;return Ts(u)}t(sr,"pendingInteractionForSession");let Cn=new Map,En=new Set,Rs=new Map;function js(n){return n(Cn)}t(js,"useEmptySessionPendingInteraction");function Ns(n){return n(Rs)}t(Ns,"useEmptySessionStatus");function ar(n){return n instanceof Map||n==null?{pending:n??Cn,completed:En}:{pending:n.pending??Cn,completed:n.completed??En}}t(ar,"pendingFacts");function Ds(n){let r=new Map,i=new Set;if(n instanceof Map)for(let[u,p]of n)p?.pendingInteraction!==void 0&&r.set(u,p.pendingInteraction),p?.completionUnread===!0&&i.add(u);return{pending:r,completed:i}}t(Ds,"factsFromSessionStatus");function Os(n,r,i){let u=n(m=>m),p=r(m=>m);return i?Ds(p):{pending:u,completed:En}}t(Os,"useSessionUiFacts");function ir(n,r,i,u){let p=ar(u),m=sr(n,p.pending);return{id:n.id,title:Sn(n),blank:n.blank,running:n.running,runningSubagentCount:r.get(n.id)?.runningCount??0,completed:n.completed===!0||p.completed.has(n.id),updatedAt:n.updatedAt,archived:i.has(n.id),...m===void 0?{}:{pendingInteraction:m}}}t(ir,"sessionNode");function zs(n,r,i,u,p){let m=new Set(i),C=new Set(p.expandedGroups),R=Je(n.byId),I=dt(n),P=I===void 0?void 0:r.find(j=>j.sessionIds.includes(I))?.workspaceId??"",T=[];for(let j of nr(n,r,m,p.ungroupedOrder,p.showArchived)){let F=C.has(j.key);T.push({key:j.key,workspaceId:j.workspaceId,cwd:j.cwd,createdAt:j.createdAt,label:j.label,sessionCount:j.sessions.length,expanded:F,containsCurrent:j.key===P,sessions:F?j.sessions.map(h=>ir(h,R,m,u)):[]})}return T}t(zs,"deriveGroups");function Ms(n,r,i,u){let p=new Set(r),m=Je(n.byId),C=[];for(let R of n.ids){let I=n.byId[R];I===void 0||!Te(I,dt(n),p,u)||C.push(I)}return C.sort(me),C.map(R=>ir(R,m,p,i))}t(Ms,"deriveFlat");function Ps(n,r,i,u,p,m,C,R,I=Ht){let P=i.trim().toLowerCase();if(P==="")return{items:[],hasMore:!1};let T=new Set(u),j=Je(n.byId),F=new Map;for(let $ of r)for(let de of $.sessionIds)F.has(de)||F.set(de,$.title);let h=t($=>F.get($.id)??G($.cwd,I),"labelOf"),ge=new Map;for(let $ of m.items)ge.has($.sessionId)||ge.set($.sessionId,$);let Ee=[];for(let $ of n.ids){let de=n.byId[$];de===void 0||de.blank||!Te(de,dt(n),T,R)||(Sn(de).toLowerCase().includes(P)||h(de).toLowerCase().includes(P))&&Ee.push(de)}Ee.sort(me);let ie=[],ht=new Set,At=t($=>{ht.has($.id)||(ht.add($.id),ie.push($))},"include");for(let $ of Ee)At($);for(let $ of m.items){let de=n.byId[$.sessionId];de!==void 0&&!de.blank&&Te(de,dt(n),T,R)&&At(de)}let st=ar(p);return{items:ie.slice(0,C).map($=>{let de=ge.get($.id),Mt=sr($,st.pending);return{id:$.id,title:Sn($),workspace:h($),running:$.running,runningSubagentCount:j.get($.id)?.runningCount??0,archived:T.has($.id),...Mt===void 0?{}:{pendingInteraction:Mt},completed:$.completed===!0||st.completed.has($.id),...de===void 0?{}:{snippet:de.snippet}}}),hasMore:m.hasMore||ie.length>C}}t(Ps,"deriveSearchResults");function Za(n,r){let m=Math.max(0,r-n);return m<6e4?{unit:"now",n:0}:m<36e5?{unit:"minutes",n:Math.floor(m/6e4)}:m<864e5?{unit:"hours",n:Math.floor(m/36e5)}:m<30*864e5?{unit:"days",n:Math.floor(m/864e5)}:m<365*864e5?{unit:"months",n:Math.floor(m/(30*864e5))}:{unit:"years",n:Math.floor(m/(365*864e5))}}t(Za,"relativeTime");let or={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 Me(n,r){return n.blank?r("session.new"):n.title??n.displayTitle??""}t(Me,"displayTitle");function Ls(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})}t(Ls,"archiveTimeLabel");let Us=[".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(""),ut="data-dsham-nav-icon",Bs='[role="dialog"] nav button',In=[`[${ut}] > svg { display: none !important; }`,`[${ut}]::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 Fs(n,r){let i=String(r??"").trim();return i.length>0&&String(n??"").trim()===i}t(Fs,"isOwnSettingsNavRow");function An(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 p=u;if(p.matches(r)||p.querySelector(r)!==null||p.closest(r)!==null)return!0}}return!1}t(An,"mutationTouches");function lr(n,r){return Fs(n.textContent,r)?n.getAttribute(ut)===""?!1:(n.setAttribute(ut,""),!0):n.hasAttribute(ut)?(n.removeAttribute(ut),!0):!1}t(lr,"applySettingsNavIcon");function cr(n){return n.hasAttribute(ut)?(n.removeAttribute(ut),!0):!1}t(cr,"restoreSettingsNavIcon");function dr(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=In,(document.head??document.documentElement).append(i)):i.textContent!==In&&(i.textContent=In);let u=!1,p=!1,m=t(()=>{if(p=!1,u)return;let I=n.locale.bind(He)("archived.badge");for(let P of document.querySelectorAll(Bs))lr(P,I)},"sync"),C=t(()=>{p||u||(p=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(m):setTimeout(m,16))},"schedule");m();let R=new MutationObserver(I=>{An(I,'[role="dialog"] nav')&&C()});return R.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{u=!0,R.disconnect();for(let I of document.querySelectorAll(`[${ut}]`))cr(I);i?.remove()}},"archive-manager: settings nav icon")}t(dr,"installSettingsNavIcon");let Hs=[".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(""),Ws=".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}",qs=".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}}",Vs=".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 _n({id:n,className:r,value:i,options:u,onChange:p,disabled:m=!1,"aria-label":C,title:R,tabIndex:I,"aria-hidden":P}){let[T,j]=l.useState(!1),F=l.useMemo(()=>u.map(Ee=>({id:Ee.value,label:Ee.label})),[u]),h=u.find(Ee=>Ee.value===i),ge=h?.label??C;return(0,a.jsx)("div",{id:n,tabIndex:I,"aria-hidden":P,className:r===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${r}`,children:(0,a.jsx)(c.Menu,{open:T,onClose:t(()=>j(!1),"onClose"),onSelect:t(Ee=>{m||p(Ee),j(!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":C,"aria-expanded":T,disabled:m,tabIndex:I,"aria-hidden":P,title:R??h?.title??h?.label??C,className:"dsham_menuSelectBtn"+(T?" is-open":""),onClick:t(()=>{m||j(Ee=>!Ee)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:ge}),(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:F})})}t(_n,"ArchiveProjectSelect");function $s({id:n,t:r,disabled:i=!1,favoritesOnly:u,setFavoritesOnly:p,favoriteBusy:m=!1,sortBy:C,setSortBy:R,options:I}){let[P,T]=l.useState(!1),j=l.useMemo(()=>{let ie=[];typeof p=="function"&&(ie.push({type:"label",id:"lbl_view_filter",text:r("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),ie.push({id:"filter:all",label:r("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),ie.push({id:"filter:favorites",label:r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),ie.push({type:"separator",id:"sep_view_filter"})),ie.push({type:"label",id:"lbl_view_sort",text:r("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let ht of I)ie.push({id:`sort:${ht.value}`,label:ht.label});return ie},[r,p,I]),F=t(ie=>{ie.startsWith("filter:")?typeof p=="function"&&!m&&p(ie==="filter:favorites"):ie.startsWith("sort:")&&R(ie.slice(5)),T(!1)},"onSelect"),h=I.find(ie=>ie.value===C),ge=u?r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":r("organizer.allChats")||"\u5168\u90E8\u804A\u5929",Ee=`${ge} \xB7 ${h?.label??C}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(c.Menu,{open:P,onClose:t(()=>T(!1),"onClose"),onSelect:F,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":r("archives.viewOptions")||"\u89C6\u56FE\u9009\u9879","aria-expanded":P,disabled:i,title:Ee,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(P?" is-open":"")+(u?" has-filter":""),onClick:t(()=>{i||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:ge}),(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:P?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:j})]})}t($s,"ArchiveViewSortMenu");function ur({selectedCount:n,hiddenCount:r,allVisibleSelected:i,selectedVisibleCount:u,visibleCount:p,busy:m,t:C,onToggle:R,onClear:I,onRestore:P,onDelete:T,onArchive:j}){let F=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)(hr,{checked:i,indeterminate:u>0&&!i,disabled:m||p===0,label:C("archives.selectAllFiltered"),onChange:t(h=>R(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:F?C("archives.selectedCount",{n}):C("archives.selectAllFiltered")})]}),F&&_({disabled:m,"aria-label":C("archives.clearSelection"),onClick:I,children:C("archives.clearSelectionShort")})]}),F&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:j?[_({disabled:m,onClick:j,children:C("archives.archiveSelected")})]:[_({disabled:m,"aria-label":C("archives.restoreSelected"),onClick:P,children:C("archives.restore")}),_({disabled:m,className:"dsham_btnDanger","aria-label":C("archives.deleteSelected"),onClick:T,children:C("archives.deleteSelectionShort")})]})]}),r>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:C("archives.selectionHiddenHint",{hidden:r})})]})}t(ur,"ArchiveSelectionToolbar");function hr({checked:n,indeterminate:r=!1,disabled:i=!1,label:u,onChange:p}){return(0,a.jsx)(Hn,{checked:n,indeterminate:r,disabled:i,label:u,onChange:p})}t(hr,"ArchiveSelectionCheckbox");function pr(){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(pr,"moreIcon");function Gs({busy:n,title:r,t:i,onPreview:u,onRestoreOpen:p,onDelete:m,onCopyId:C}){let[R,I]=(0,l.useState)(!1),P=t(j=>{if(!n){if(I(!1),j==="copyId")return C?.();if(j==="preview")return u?.();if(j==="restoreOpen")return p?.();j==="delete"&&m?.()}},"choose"),T=[...u?[{id:"preview",label:i("discovery.preview"),icon:(0,a.jsx)(c.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...p?[{id:"restoreOpen",label:i("archives.restoreOpen"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...C?[{id:"copyId",label:i("details.copyId"),icon:(0,a.jsx)(c.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"delete",label:i("menu.deleteSession"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(c.Menu,{open:!n&&R,align:"end",portal:!0,dense:!0,items:T,onSelect:P,onClose:t(()=>I(!1),"onClose"),anchor:_({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":R&&!n,icon:pr(),onClick:t(()=>{n||I(j=>!j)},"onClick")})})}t(Gs,"ArchivedSessionMenu");function Ks({group:n,busy:r,onArchive:i,onRestore:u,onDelete:p,t:m}){let C=n.key===sn,R=i?[{id:"archive",label:m(C?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(c.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:m(C?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:m(C?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}],[I,P]=(0,l.useState)(!1),T=m(C?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),j=t(F=>{r||(F==="archive"?i?.():F==="restore"?u?.():F==="delete"&&p?.())},"choose");return(0,a.jsx)(c.Menu,{open:!r&&I,align:"end",portal:!0,dense:!0,items:R,onSelect:t(F=>{P(!1),j(F)},"onSelect"),onClose:t(()=>P(!1),"onClose"),anchor:_({variant:"outline",className:"dsham_iconAction",disabled:r,"aria-label":T,"aria-haspopup":"menu","aria-expanded":I&&!r,icon:pr(),onClick:t(()=>{r||P(F=>!F)},"onClick")})})}t(Ks,"ArchivedGroupActions");let sn="__ungrouped__";function Ys(n){return n===sn?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}t(Ys,"archivedBatchTargetForGroup");function Wt(n,r,i){let u=[...new Set(n??[])];if(i.scope==="all")return u;if(i.scope==="sessions"){let m=new Set(i.sessionIds??[]);return u.filter(C=>m.has(C))}if(i.scope==="workspace"){let m=new Set(r.find(C=>C.workspaceId===i.workspaceId)?.sessionIds??[]);return u.filter(C=>m.has(C))}let p=new Set(r.flatMap(m=>m.sessionIds));return u.filter(m=>!p.has(m))}t(Wt,"deriveArchivedBatchIds");function mr(n){return[...new Set(n.flatMap(r=>r.sessions.map(i=>i.id)))]}t(mr,"archivedSessionIdsInGroups");function gr(n,r){let i=new Set(r);return[...new Set(n)].filter(u=>i.has(u))}t(gr,"pruneArchivedSelection");function Tn(n,r,i){let u=new Set(n);for(let p of r)i?u.add(p):u.delete(p);return[...u]}t(Tn,"toggleArchivedSelection");function fr(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})}}t(fr,"archivedDeleteFeedback");function vr(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)}t(vr,"unarchivedSessionIds");function yr(n,r,i,u){let p=r.map(R=>({key:R.workspaceId,title:R.title,ids:new Set(R.sessionIds),sessions:[]})),m=[];for(let R of i){let I=n[R];if(I===void 0||I.origin==="subagent")continue;let P=p.find(T=>T.ids?.has(R));(P===void 0?m:P.sessions).push(I)}let C=p.filter(R=>R.sessions.length>0);return m.length>0&&C.push({key:sn,title:u,sessions:m}),C}t(yr,"deriveArchivedGroups");function br(n,r,i,u,p=[]){let m=t((T,j)=>String(T).localeCompare(String(j),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),C=new Map;if(Array.isArray(p))for(let T=0;T<p.length;T++)C.set(p[T],T);let R=t(T=>{let j=r==="created"?i[T.id]:T.updatedAt;return typeof j=="number"&&Number.isFinite(j)?j:Number.NEGATIVE_INFINITY},"timestampOf"),I=t((T,j)=>{if(r==="archived"){let F=C.get(T.id)??-1,ge=(C.get(j.id)??-1)-F;if(ge!==0)return ge}if(r!=="alphabetical"){let F=R(j)-R(T);if(Number.isFinite(F)&&F!==0)return F}return m(Me(T,u),Me(j,u))||m(T.id,j.id)},"compareSessions");return n.map(T=>({...T,sessions:[...T.sessions].sort(I)})).sort((T,j)=>{if(r==="archived"){let F=T.sessions[0]?.id,h=j.sessions[0]?.id,ge=F!==void 0?C.get(F)??-1:-1,ie=(h!==void 0?C.get(h)??-1:-1)-ge;if(ie!==0)return ie}if(r!=="alphabetical"){let F=R(j.sessions[0])-R(T.sessions[0]);if(Number.isFinite(F)&&F!==0)return F}return m(T.title,j.title)||m(T.key,j.key)})}t(br,"sortArchivedGroups");let wr={...xs,...ns,"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"},Sr={...ks,...rs,"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"},Zs={...Cs,...ss,"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"},He="archive-manager-workspace",Js=["slots","sessions","workspaces","locale","remote","typert"];function Rn(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}t(Rn,"bindObservable");function xr(n){return async r=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(r)}}t(xr,"createUnarchiveSession");async function jn(n,r,i){let u=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),p=await yn(r,async C=>{try{await n.archiveSession(C)}catch(R){throw R!==null&&typeof R=="object"&&rn(R)!==void 0&&typeof ce(R).sessionId!="string"&&Object.assign(R,{sessionId:C}),R}return!0},{refresh:i}),m=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:m,archivedSessionIdsAdded:m.filter(C=>!u.has(C)),failures:p.failures}}t(jn,"archiveSessionsViaOfficial");async function kr(n,r,i,u){let p=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=typeof u=="function"?u:I=>n.unarchiveSession?.(I),C=await yn(r,async I=>(await m(I),!0),{refresh:i}),R=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:R,unarchivedSessionIds:[...p].filter(I=>!R.includes(I)),failures:C.failures}}t(kr,"unarchiveSessionsViaOfficial");async function Qs(n){Xs(n);let r=n.get("remote"),i=t(()=>{},"disposeRemote");return r!==void 0&&(i=await r.$mount(L)),async()=>{await i()}}t(Qs,"apply");function Xs(n){n.effect(()=>n.locale.register(He,{zh:wr,en:Sr,ru:Zs}),"dsh-archive-manager: dictionaries");let r=t(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),i={},u,p=t(g=>(u=os(g,n.sessions,n.workspaces,{onOpened:t(()=>n.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:t(()=>n.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>u?.dispose()),"attachArchiveNavigation");n.effect(()=>p(r()),"archive-manager: explicit archived navigation");let m=t(g=>{if(u===void 0)throw new It("navigationUnavailable");return or.request(g),u.open(g)},"openConversation"),C=t(async g=>{n.get("layout")?.beginNavigation?.(),or.request(g)},"focusSessionWorkspace"),R=t(async(g,y)=>{let N=await n.sessions.search(g,y);if(!N.ok)throw new Error(N.error.message);return N.value},"searchSessions"),I=t(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await n.sessions.refresh(),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"),P=xr(n.workspaces),T=t(async(g,...y)=>{let N=n.get("remote.workspaceRegistry");if(!N||typeof N[g]!="function")throw new Error(n.locale.bind(He)("service.unavailable"));let Se=await N[g].apply(N,y);if(!Se.ok)throw new Error(Se.error.message);return Se.value},"registryCall"),j=t(()=>T("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),F=t((g={})=>T("cleanOrphanSubagents",g??{}),"cleanOrphanSubagents"),h=t(g=>T("searchArchivedContent",g),"searchArchivedContent"),ge=t(g=>T("searchSessionContent",g),"searchSessionContent"),Ee=t(g=>T("previewArchivedSession",g),"previewArchivedSession"),ie=t(()=>T("favoriteSessions"),"favoriteSessions"),ht=t(g=>T("setSessionFavorite",g),"setSessionFavorite"),At=ws({workspaces:n.workspaces.list,sessions:n.sessions.list,archive:t(g=>n.workspaces.archiveSession(g),"archive"),restore:t(async g=>{await P(g)},"restore"),deleteOne:t(async g=>{let y=n.get("remote.workspaceRegistry");if(!y)throw new Error(n.locale.bind(He)("service.unavailable"));let N=await y.deleteSession(g);if(!N.ok)throw new Error(N.error.message)},"deleteOne"),getFavorites:ie,refresh:t(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:dt}),st=t(async g=>{await P(g),await I()},"unarchiveSession"),$=t(async g=>{let y=n.get("remote.workspaceRegistry");if(y===void 0)throw new Error("archive-manager remote service is unavailable");let N=await y.deleteSession(g);if(!N.ok)throw new Error(N.error.message);await I()},"deleteSession"),de=t(async g=>jn(n.workspaces,g,I),"archiveSessions"),Mt=t(async g=>{let y=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},N=Wt(y.archivedSessionIds,y.items,g);return kr(n.workspaces,N,I,P)},"unarchiveSessions"),an=t(async g=>{let y=n.get("remote.workspaceRegistry");if(y===void 0)throw new Error("archive-manager remote service is unavailable");let N=await y.deleteArchivedSessions(g);if(!N.ok)throw new Error(N.error.message);let pe=await I();return{...N.value,refreshError:pe}},"deleteArchivedSessions"),Qe=t(async()=>{let g=n.get("remote.workspaceRegistry");if(g===void 0)throw new Error("archive-manager remote service is unavailable");let y=await g.archivedSessionMetadata();if(!y.ok)throw new Error(y.error.message);return y.value},"archivedSessionMetadata"),we="sidebar.workspaces.session.menu.item",at=null,bt=new Set,he=t(g=>{at=g;for(let y of bt)y()},"publishDeleteTarget");function pt(){return l.useSyncExternalStore(g=>(bt.add(g),()=>{bt.delete(g)}),()=>at,()=>at)}t(pt,"useDeleteRequest");function Xe({sessionId:g,displayTitle:y,useMenuOpenState:N,t:pe}){let[,Se]=N(),oe=c.MenuItemButton,De=(0,a.jsx)(c.IconTrashOutlineRegular,{size:14}),Pe=t(()=>{Se(!1),he({sessionId:g,title:y})},"onSelect");return typeof oe=="function"?(0,a.jsx)(oe,{danger:!0,icon:De,onSelect:Pe,children:pe("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Pe,children:pe("menu.deleteSession")})}t(Xe,"DeleteSessionMenuItem");function qt(g){try{let y=document.querySelector(`[data-row-key="session:${CSS.escape(g)}"]`);return y?(y.hasAttribute("tabindex")||(y.setAttribute("tabindex","-1"),y.addEventListener("blur",()=>y.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(y):y.focus(),!0):!1}catch{return!1}}t(qt,"focusSessionRow");function it({t:g}){let y=pt(),[N,pe]=(0,l.useState)(!1),[Se,oe]=(0,l.useState)(null),[De,Pe]=(0,l.useState)(null),re=(0,l.useRef)(null),be=(0,l.useRef)(null),Ae=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(y===null||typeof document>"u"){Pe(null);return}let J=null,ee=t(()=>{if(J&&J.isConnected)return J;try{J=document.querySelector(`[data-row-key="session:${CSS.escape(y.sessionId)}"]`)}catch{J=null}return J},"getTargetRow"),O=t(()=>{let ve=re.current,ue=ve?.offsetWidth||290,Oe=ve?.offsetHeight||160,ze=8,Le=ee();if(!Le){let le=window.innerWidth,tt=window.innerHeight,ct=Math.max(16,(tt-Oe)/2),We=Math.max(16,(le-ue)/2);Pe(Ue=>Ue!==null&&Ue.top===ct&&Ue.left===We?Ue:{top:ct,left:We});return}let Ge=Le.getBoundingClientRect(),Re=Ge.top-4;Re+Oe>window.innerHeight-16&&(Re=window.innerHeight-16-Oe),Re<16&&(Re=16);let Ce=Ge.right+ze;Ce+ue>window.innerWidth-16&&(Ce=Ge.left-ue-ze),Ce<16&&(Ce=16),Pe(le=>le!==null&&le.top===Re&&le.left===Ce?le:{top:Re,left:Ce})},"updatePosition");O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O);let te=null;return typeof ResizeObserver<"u"&&re.current&&(te=new ResizeObserver(O),te.observe(re.current)),()=>{te?.disconnect(),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[y]),(0,l.useEffect)(()=>{if(y===null)return;be.current&&!be.current.disabled?be.current.focus():re.current?.focus();let J=y.sessionId;return()=>{if(!qt(J)){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())}}},[y]),(0,l.useEffect)(()=>{y!==null&&N&&re.current?.focus()},[y,N]),(0,l.useEffect)(()=>{if(y===null)return;let J=t(ee=>{if(ee.key==="Escape"){ee.preventDefault(),ee.stopPropagation(),"stopImmediatePropagation"in ee&&typeof ee.stopImmediatePropagation=="function"&&ee.stopImmediatePropagation(),N||(oe(null),he(null));return}if(ee.key==="Tab"){if(ee.preventDefault(),N){re.current?.focus();return}let O=be.current,te=Ae.current;if(!O||!te)return;ee.shiftKey?document.activeElement===O?te.focus():O.focus():document.activeElement===te?O.focus():te.focus()}},"onKey");return window.addEventListener("keydown",J,!0),()=>window.removeEventListener("keydown",J,!0)},[y,N]),y===null)return null;let lt=t(()=>{N||(oe(null),he(null))},"close"),$e=t(()=>{pe(!0),oe(null),$(y.sessionId).then(()=>{pe(!1),he(null)}).catch(J=>{pe(!1),oe(wn(J,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:re,role:"dialog","aria-modal":!0,"aria-label":g("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:De?{top:De.top,left:De.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:y.title})}),N&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:g("deleteSession.pending")}),Se!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Se}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:be,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:N,onClick:lt,children:g("cancel")}),(0,a.jsx)("button",{ref:Ae,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:N,onClick:$e,children:g("deleteSession.title")})]})]})]})}t(it,"DeleteSessionOverlay");let Ve=null,mt=new Set,wt=t(g=>{Ve=g;for(let y of mt)y()},"publishArchiveWsTarget");function on(){return l.useSyncExternalStore(g=>(mt.add(g),()=>{mt.delete(g)}),()=>Ve,()=>Ve)}t(on,"useArchiveWsRequest");function ot(g){try{let y=document.querySelector(`[data-row-key="workspace:${CSS.escape(g)}"]`);return y?(y.hasAttribute("tabindex")||(y.setAttribute("tabindex","-1"),y.addEventListener("blur",()=>y.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(y):y.focus(),!0):!1}catch{return!1}}t(ot,"focusWorkspaceRow");function fe({t:g}){let y=on(),[N,pe]=(0,l.useState)(!1),[Se,oe]=(0,l.useState)(null),[De,Pe]=(0,l.useState)(null),re=(0,l.useRef)(null),be=(0,l.useRef)(null),Ae=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(y===null||typeof document>"u"){Pe(null);return}let J=null,ee=t(()=>{if(J&&J.isConnected)return J;try{J=document.querySelector(`[data-row-key="workspace:${CSS.escape(y.workspaceId)}"]`)}catch{J=null}return J},"getTargetRow"),O=t(()=>{let ve=re.current,ue=ve?.offsetWidth||290,Oe=ve?.offsetHeight||160,ze=8,Le=ee();if(!Le){let le=window.innerWidth,tt=window.innerHeight,ct=Math.max(16,(tt-Oe)/2),We=Math.max(16,(le-ue)/2);Pe(Ue=>Ue!==null&&Ue.top===ct&&Ue.left===We?Ue:{top:ct,left:We});return}let Ge=Le.getBoundingClientRect(),Re=Ge.top-4;Re+Oe>window.innerHeight-16&&(Re=window.innerHeight-16-Oe),Re<16&&(Re=16);let Ce=Ge.right+ze;Ce+ue>window.innerWidth-16&&(Ce=Ge.left-ue-ze),Ce<16&&(Ce=16),Pe(le=>le!==null&&le.top===Re&&le.left===Ce?le:{top:Re,left:Ce})},"updatePosition");O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O);let te=null;return typeof ResizeObserver<"u"&&re.current&&(te=new ResizeObserver(O),te.observe(re.current)),()=>{te?.disconnect(),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[y]),(0,l.useEffect)(()=>{if(y===null)return;be.current&&!be.current.disabled?be.current.focus():re.current?.focus();let J=y.workspaceId;return()=>{ot(J)}},[y]),(0,l.useEffect)(()=>{y!==null&&N&&re.current?.focus()},[y,N]),(0,l.useEffect)(()=>{if(y===null)return;let J=t(ee=>{if(ee.key==="Escape"){ee.preventDefault(),ee.stopPropagation(),"stopImmediatePropagation"in ee&&typeof ee.stopImmediatePropagation=="function"&&ee.stopImmediatePropagation(),N||(oe(null),wt(null));return}if(ee.key==="Tab"){if(ee.preventDefault(),N){re.current?.focus();return}let O=be.current,te=Ae.current;if(!O||!te)return;ee.shiftKey?document.activeElement===O?te.focus():O.focus():document.activeElement===te?O.focus():te.focus()}},"onKey");return window.addEventListener("keydown",J,!0),()=>window.removeEventListener("keydown",J,!0)},[y,N]),y===null)return null;let lt=t(()=>{N||(oe(null),wt(null))},"close"),$e=t(()=>{pe(!0),oe(null);let ee=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(ue=>ue.workspaceId===y.workspaceId),O=n.sessions.list?.getSnapshot?.()?.byId??{},te=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),ve=(ee?.sessionIds??[]).filter(ue=>xn(ue,O,te));jn(n.workspaces,ve,I).then(ue=>{if(pe(!1),ue.failures.length>0){oe(nn(ue.failures,g));return}wt(null)}).catch(ue=>{pe(!1),oe(Qn(ue,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:re,role:"dialog","aria-modal":!0,"aria-label":g("menu.archiveWorkspace"),tabIndex:-1,className:"dsham_sidebarCard",style:De?{top:De.top,left:De.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:g("archiveWorkspace.title",{n:y.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:g("archiveWorkspace.desc",{name:y.title})}),N&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:g("archiveWorkspace.pending")}),Se!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Se}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:be,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:N,onClick:lt,children:g("cancel")}),(0,a.jsx)("button",{ref:Ae,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:N,onClick:$e,children:g("archiveWorkspace.confirm")})]})]})]})}t(fe,"ArchiveWorkspaceOverlay");function St(g){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let y=null,N=!1,pe=new Map,Se=!1,oe=t(O=>{let ve=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(ze=>ze.workspaceId===O);if(ve===void 0)return[];let ue=n.sessions.list?.getSnapshot?.()?.byId??{},Oe=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return ve.sessionIds.filter(ze=>xn(ze,ue,Oe))},"workspaceCandidateIds"),De=t(()=>{if(Se=!1,!N)for(let[O,te]of pe){if(!O.isConnected){pe.delete(O);continue}let ve=oe(te.workspaceId).length===0;O.disabled=ve,O.style.opacity=ve?"0.5":"",O.style.cursor=ve?"not-allowed":""}},"revalidateItems"),Pe=t(()=>{if(pe.size===0||Se||N)return;Se=!0;let O=t(()=>De(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16)},"scheduleRevalidate"),re=t(O=>{y=rr(O.target)},"rememberWorkspace");document.addEventListener("pointerdown",re,!0),document.addEventListener("click",re,!0);let be=t(()=>{if(N)return;for(let[te]of pe)te.isConnected||pe.delete(te);let O=document.querySelectorAll('[role="menu"]');for(let te of O){if(te.querySelector('[data-dsham-archive-workspace="true"]'))continue;let ve=Array.from(te.querySelectorAll('button[role="menuitem"]'));if(ve.length===0)continue;let ue=ve.find(qe=>kn(qe,!1))??ve.find(qe=>kn(qe,!0));if(!ue)continue;let Oe=ve.find(qe=>qe!==ue)??ue,ze=ue.parentElement;if(!ze)continue;let Le=y;if(!Le)continue;let Re=oe(Le.workspaceId).length,Ce=document.createElement("div");Ce.className=ze.className;let le=document.createElement("button");le.type="button",le.setAttribute("role","menuitem"),le.dataset.dshamArchiveWorkspace="true",le.className=Oe.className.split(/\s+/).filter(qe=>!/(?:^|[_-])danger(?:$|[_-])/i.test(qe)).join(" ");let tt=Oe.querySelector("span"),ct=Oe.querySelectorAll("span")[1],We=document.createElement("span");We.setAttribute("aria-hidden","true"),tt?.className&&(We.className=tt.className),We.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 Ue=document.createElement("span");ct?.className&&(Ue.className=ct.className),Ue.textContent=g("menu.archiveWorkspace"),le.append(We,Ue),Ce.append(le),Re===0&&(le.disabled=!0,le.style.opacity="0.5",le.style.cursor="not-allowed"),le.addEventListener("click",qe=>{qe.preventDefault(),qe.stopPropagation();let _t=oe(Le.workspaceId).length;_t!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),wt({workspaceId:Le.workspaceId,title:Le.title,count:_t}))}),ze.parentNode?.insertBefore(Ce,ze),pe.set(le,{workspaceId:Le.workspaceId})}},"checkAndInject"),Ae=!1,lt=t(()=>{if(Ae||N)return;Ae=!0;let O=t(()=>{Ae=!1,!N&&be()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16)},"scheduleInject"),$e=new MutationObserver(O=>{An(O,'[role="menu"]')&&lt()});$e.observe(document.body,{childList:!0,subtree:!0});let J=n.sessions.list?.subscribe?.(Pe),ee=n.workspaces.list?.subscribe?.(Pe);return()=>{N=!0,document.removeEventListener("pointerdown",re,!0),document.removeEventListener("click",re,!0),$e.disconnect(),J?.(),ee?.(),pe.clear();for(let O of document.querySelectorAll('[data-dsham-archive-workspace="true"]'))O.parentElement?.remove()}}t(St,"setupWorkspaceMenuInjector");function Vt(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(g=>g.children?.[we]!==void 0)}t(Vt,"hostSidebarDeclaresSessionMenu");let W,Ne,et,q,$t=t(()=>{let g=Vt()?"menu":"waiting";g!==W&&(W=g,g==="menu"&&(Ne??=n.slots.inject(we,()=>n.slots.register({name:we,id:"archive-manager.delete-session",order:500,locale:He,inject:t(()=>({}),"inject")},Xe)),et??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:He,inject:t(()=>({t:n.locale.bind(He)}),"inject")},it)),q??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:He,inject:t(()=>({t:n.locale.bind(He)}),"inject")},fe))))},"reconcileSidebar");$t(),n.effect(()=>St(n.locale.bind(He)),"archive-manager: workspace menu injector"),dr(n);let Ie=typeof n.on=="function"?n.on("slots/changed",g=>{if(g==="sidebar.workspaces")try{$t()}catch(y){console.warn("archive-manager: sidebar mode switch failed",y)}}):void 0;n.effect(()=>()=>{Ie?.(),Ne?.(),et?.(),q?.()},"archive-manager: sidebar mode");let xt=t(()=>({archiveSessions:de,archiveSession:t((g,y)=>n.workspaces.archiveSession(g,y),"archiveSession"),sessionStore:Rn(n.sessions.list),workspaceStore:Rn(n.workspaces.list),unarchiveSession:st,deleteSession:$,unarchiveSessions:Mt,deleteArchivedSessions:an,archivedSessionMetadata:Qe,openConversation:m,focusSessionWorkspace:C,viewState:i,favoriteSessions:ie,setSessionFavorite:ht,organizeBatch:At,diagnoseOrphanSubagents:j,cleanOrphanSubagents:F,searchSessionContent:ge,searchArchivedContent:h,previewArchivedSession:Ee,t:n.locale.bind(He)}),"buildArchivedSectionProps"),Pt=Kn(n,{callApi:t(async(g,y)=>{let N=vn(`/api/michengai/dsh-archive-manager${g}`),pe=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},y?.headers),Se=await fetch(N,Object.assign({},y,{headers:pe})),oe=await Se.json();if(!Se.ok||!oe||oe.ok===!1)throw new Error((oe&&typeof oe=="object"&&typeof oe.error=="string"?oe.error:void 0)||`HTTP ${Se.status}`);return oe},"callSettingsApi"),renderPanel:t(g=>(0,a.jsx)(zt,Object.assign({},xt(),g)),"renderPanel"),injectProps:xt,ns:He,onOnlineUpdateChange:t(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange")});n.effect(()=>()=>Pt.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:Y,isEnabled:t(()=>Pt.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(He)("archived.badge"),"label"),icon:"archive",locale:He,inject:xt},zt))}t(Xs,"applyWorkspaceBrowser");async function ea(n,r,i,u){try{await r(n)}catch(p){i(As(p,u))}}return t(ea,"forkWithFeedback"),o.__test={forkWithFeedback:ea,unarchivedSessionIds:vr,ArchiveSelectionToolbar:ur,ArchivedSessionsSection:zt,zh:wr,en:Sr,displayTitle:Me,sessionVisible:Te,indexSubagentDescendants:Je,isUnknownSessionError:yt,deriveGroups:zs,deriveFlat:Ms,deriveSearchResults:Ps,deriveArchivedGroups:yr,sortArchivedGroups:br,deriveArchivedBatchIds:Wt,archivedSessionIdsInGroups:mr,pruneArchivedSelection:gr,toggleArchivedSelection:Tn,archivedDeleteFeedback:fr,isWorkspaceTaskCandidate:xn,isWorkspaceDeleteMenuItem:kn,workspaceMenuTriggerFrom:rr,applySettingsNavIcon:lr,restoreSettingsNavIcon:cr,installSettingsNavIcon:dr,mutationTouches:An,activeSessionActivity:rn,activeSessionRefusal:Xn,activeArchiveFromMessage:er,archiveSessionsViaOfficial:jn,unarchiveSessionsViaOfficial:kr,createUnarchiveSession:xr,createWorkspaceViewStore:ne,migrateWorkspaceViewPersist:E,WORKSPACE_VIEW_PERSIST_KEY:Nt,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:Dt,bindObservable:Rn,groupByWorkspace:nr,byRecency:me,ARCHIVE_MANAGER_REMOTE:L,currentSessionId:dt,setupSidebarEntry:Kn},o.apply=Qs,o.inject=Js,s.exports}t(Ka,"startArchiveClient");
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");
24
24
 
25
25
  return module.exports.startArchiveClient(require);
26
26
  }