@michengai/dsh-archive-manager 1.1.13 → 1.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/CHANGELOG.zh-CN.md +41 -0
- package/lib/client.js +5 -5
- package/lib/explorer-path-policy.js +29 -0
- package/lib/index.js +42 -1
- package/lib/native-explorer.js +34 -0
- package/lib/session-move.js +346 -0
- package/lib/workspace.js +60 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -7,20 +7,20 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
globalThis.__dshArchiveReactDOMClient = require("react-dom/client");
|
|
8
8
|
var module = { exports: {} };
|
|
9
9
|
var exports = module.exports;
|
|
10
|
-
"use strict";var fn=Object.defineProperty;var _a=Object.getOwnPropertyDescriptor;var Ta=Object.getOwnPropertyNames;var ja=Object.prototype.hasOwnProperty;var t=(e,r)=>fn(e,"name",{value:r,configurable:!0});var Da=(e,r)=>{for(var i in r)fn(e,i,{get:r[i],enumerable:!0})},Na=(e,r,i,g)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ta(r))!ja.call(e,a)&&a!==i&&fn(e,a,{get:()=>r[a],enumerable:!(g=_a(r,a))||g.enumerable});return e};var za=e=>Na(fn({},"__esModule",{value:!0}),e);var li={};Da(li,{startArchiveClient:()=>oi});module.exports=za(li);function ee(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return e}t(ee,"record");function Ae(e){return String(e&&typeof e=="object"&&"message"in e?e.message??e:e)}t(Ae,"errorMessage");function vn(e){return e&&typeof e=="object"&&"code"in e?e.code:void 0}t(vn,"errorCode");var $r=Function("return globalThis.__dshArchiveReact")(),{Children:pi,Component:mi,Fragment:Gr,Profiler:gi,PureComponent:fi,StrictMode:vi,Suspense:yi,cloneElement:bi,createContext:wi,createElement:Kr,createRef:Si,forwardRef:xi,isValidElement:ki,lazy:Ci,memo:Ei,startTransition:Ii,useCallback:Ai,useContext:Ri,useDebugValue:_i,useDeferredValue:Ti,useEffect:Yr,useId:ji,useImperativeHandle:Di,useInsertionEffect:Ni,useLayoutEffect:zi,useMemo:Oi,useReducer:Mi,useRef:Pi,useState:Ft,useSyncExternalStore:Li,useTransition:Ui,version:Bi}=$r,M=$r;function Jr(e){return M.createElement("input",{className:"dsham_number",type:"number",min:e.min,max:e.max,value:e.value??"",disabled:e.disabled,"aria-label":e["aria-label"],onChange:t(r=>{let i=r.target.value;if(i===""){e.onChange(null);return}let g=Number(i);e.onChange(Number.isNaN(g)?null:g)},"onChange")})}t(Jr,"NumberField");function Ma(e=M.createElement){return e("svg",{className:"dsham_dateIcon",width:14,height:14,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e("rect",{x:2,y:3,width:12,height:11,rx:2}),e("line",{x1:2,y1:6.5,x2:14,y2:6.5}),e("line",{x1:5.5,y1:1.5,x2:5.5,y2:3.5}),e("line",{x1:10.5,y1:1.5,x2:10.5,y2:3.5}))}t(Ma,"CalendarIcon");function Xt(e,r,i){let g=String(r+1).padStart(2,"0"),a=String(i).padStart(2,"0");return`${e}-${g}-${a}`}t(Xt,"formatYmd");function Ht(e){let r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return r?{year:Number(r[1]),monthIndex:Number(r[2])-1,day:Number(r[3])}:null}t(Ht,"parseYmd");function Pa(e,r){let i=new Date(e,r,1).getDay(),g=(i===0?7:i)-1,a=new Date(e,r+1,0).getDate(),l=new Date(e,r,0).getDate(),c=[];for(let x=0;x<42;x++){let y=e,E=r,b=0,v=!1;x<g?(b=l-g+x+1,E=r-1,E<0&&(E=11,y--),v=!0):x<g+a?b=x-g+1:(b=x-g-a+1,E=r+1,E>11&&(E=0,y++),v=!0),c.push({year:y,monthIndex:E,day:b,dateStr:Xt(y,E,b),isOutside:v})}return c}t(Pa,"buildMonthGrid");function La(e,r=new Date){if(e==="all")return{from:"",to:""};let i=Xt(r.getFullYear(),r.getMonth(),r.getDate());if(e==="today")return{from:i,to:i};let g=e==="7d"?6:e==="30d"?29:89,a=new Date(r.getTime()-g*864e5);return{from:Xt(a.getFullYear(),a.getMonth(),a.getDate()),to:i}}t(La,"getPresetRange");function Zr(e,r,i,g){let a=r+g,l=new Date(e,a+1,0).getDate();return new Date(e,a,Math.min(i,l))}t(Zr,"shiftMonthClamped");function Qr(e){let r=e.React||M;function i(I,se){let ze=I==="from"?se:e.from,Lt=I==="to"?se:e.to;if(ze===""&&Lt===""){e.onClear();return}I==="from"?e.onFrom(se):e.onTo(se)}t(i,"change");let g=!!(e.from||e.to),a="";e.from&&e.to?a=`${e.from} \u2013 ${e.to}`:e.from?a=`${e.from} \u2013`:e.to?a=`\u2013 ${e.to}`:a=e.t?e.t("discovery.timeRange")||`${e.fromLabel} \u2013 ${e.toLabel}`:`${e.fromLabel} \u2013 ${e.toLabel}`;let c=(r.useRef??(I=>{let[se]=r.useState({current:I});return se}))(null),[x,y]=r.useState(!1),E=Ht(e.from||e.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[b,v]=r.useState(E.year),[S,R]=r.useState(E.monthIndex),[j,L]=r.useState(null),[P,F]=r.useState(null),[Ce,K]=r.useState(null);r.useEffect(()=>{if(!x)return;let I=t(ze=>{c.current&&!c.current.contains(ze.target)&&(y(!1),L(null))},"onPointerDown"),se=t(ze=>{ze.key==="Escape"&&(ze.preventDefault(),ze.stopPropagation(),y(!1),L(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",I,!0),typeof window<"u"&&window.addEventListener("keydown",se,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",I,!0),typeof window<"u"&&window.removeEventListener("keydown",se,!0)}},[x]),r.useEffect(()=>{if(!x||!Ce||!c.current)return;c.current.querySelector(`[data-date="${Ce}"]`)?.focus()},[x,Ce]);let Y=e.t?e.t("discovery.today")==="Today"||(e.t("locale.language")||"").startsWith("en"):!1,Z=e.t?e.t("discovery.today")==="\u0421\u0435\u0433\u043E\u0434\u043D\u044F"||(e.t("locale.language")||"").startsWith("ru"):!1,X=Y?"en-US":Z?"ru-RU":"zh-CN",Ee=Y?["Mo","Tu","We","Th","Fr","Sa","Su"]:Z?["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"]:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"];function te(I){I.stopPropagation(),S<=0?(R(11),v(se=>se-1)):R(se=>se-1)}t(te,"prevMonth");function $(I){I.stopPropagation(),S>=11?(R(0),v(se=>se+1)):R(se=>se+1)}t($,"nextMonth");function mt(I){j?(I>=j?(e.onFrom(j),e.onTo(I)):(e.onFrom(I),e.onTo(j)),L(null),y(!1)):(L(I),F(I))}t(mt,"handleDayClick");function Se(I){let se=La(I);I==="all"?e.onClear():(e.onFrom(se.from),e.onTo(se.to)),L(null),y(!1)}t(Se,"applyPreset");function U(I){let se=Xt(I.getFullYear(),I.getMonth(),I.getDate());K(se),j&&F(se),(I.getFullYear()!==b||I.getMonth()!==S)&&(v(I.getFullYear()),R(I.getMonth()))}t(U,"moveFocusToDate");function pe(I,se){let ze=Ht(I);ze&&U(new Date(ze.year,ze.monthIndex,ze.day+se))}t(pe,"moveFocus");let qe=e.from,Ot=e.to;j&&P&&(qe=j<=P?j:P,Ot=j<=P?P:j);let rn=Pa(b,S),Qe=new Date,xn=Ce||qe||Xt(Qe.getFullYear(),Qe.getMonth(),Qe.getDate()),Mt=rn.map((I,se)=>{let ze=qe===I.dateStr,Lt=Ot===I.dateStr,Ut=!!(qe&&Ot&&I.dateStr>qe&&I.dateStr<Ot),sn=I.year===Qe.getFullYear()&&I.monthIndex===Qe.getMonth()&&I.day===Qe.getDate(),kt="dsham_dateDay";I.isOutside&&(kt+=" is-outside"),sn&&(kt+=" is-today"),ze&&(kt+=" is-start"),Lt&&(kt+=" is-end"),Ut&&(kt+=" is-in-range");let qt=!I.isOutside&&(I.dateStr===xn||I.day===1&&!rn.some(G=>!G.isOutside&&G.dateStr===xn));return r.createElement("div",{key:se,className:kt,role:"button",tabIndex:qt?0:-1,"data-date":I.dateStr,"aria-label":I.dateStr,"aria-pressed":!!(ze||Lt||Ut),onClick:t(G=>{G.stopPropagation(),mt(I.dateStr)},"onClick"),onKeyDown:t(G=>{if(G.key==="Enter"||G.key===" ")G.preventDefault(),G.stopPropagation(),mt(I.dateStr);else if(G.key==="ArrowLeft")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,-1);else if(G.key==="ArrowRight")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,1);else if(G.key==="ArrowUp")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,-7);else if(G.key==="ArrowDown")G.preventDefault(),G.stopPropagation(),pe(I.dateStr,7);else if(G.key==="Home"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);if(fe){let De=new Date(fe.year,fe.monthIndex,fe.day),Ct=(De.getDay()===0?7:De.getDay())-1;De.setDate(De.getDate()-Ct),U(De)}}else if(G.key==="End"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);if(fe){let De=new Date(fe.year,fe.monthIndex,fe.day),Ct=(De.getDay()===0?7:De.getDay())-1;De.setDate(De.getDate()+(6-Ct)),U(De)}}else if(G.key==="PageUp"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);fe&&U(Zr(fe.year,fe.monthIndex,fe.day,-1))}else if(G.key==="PageDown"){G.preventDefault(),G.stopPropagation();let fe=Ht(I.dateStr);fe&&U(Zr(fe.year,fe.monthIndex,fe.day,1))}},"onKeyDown"),onMouseEnter:t(()=>{j&&F(I.dateStr)},"onMouseEnter")},I.day)}),Pt=`${b}\u5E74 ${S+1}\u6708`;try{Pt=new Intl.DateTimeFormat(X,{year:"numeric",month:"long"}).format(new Date(b,S,1))}catch{Pt=Y||Z?`${b}-${String(S+1).padStart(2,"0")}`:`${b}\u5E74 ${S+1}\u6708`}return r.createElement("div",{ref:c,className:"dsham_dateRange",role:"group","aria-label":e.label},r.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:e.from,"aria-label":e.fromLabel,"aria-invalid":e.invalid||void 0,onChange:t(I=>i("from",I.target.value),"onChange")}),r.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:e.to,"aria-label":e.toLabel,"aria-invalid":e.invalid||void 0,onChange:t(I=>i("to",I.target.value),"onChange")}),r.createElement("div",{className:"dsham_dateTrigger"+(x?" is-open":""),role:"button",tabIndex:0,"aria-expanded":x,"aria-controls":x?"dsham-date-popover":void 0,onClick:t(()=>{x&&L(null),y(!x)},"onClick"),onKeyDown:t(I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),x&&L(null),y(!x))},"onKeyDown")},Ma(r.createElement),r.createElement("span",{className:"dsham_dateText"+(g?"":" placeholder")},a),g?r.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:t(I=>{I.stopPropagation(),e.onClear(),L(null)},"onClick"),children:"\xD7"}):null,r.createElement("span",{className:"dsham_dateChevron"},Xr(r.createElement,x))),x&&r.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":e.label,onClick:t(I=>I.stopPropagation(),"onClick")},r.createElement("div",{className:"dsham_datePresets"},r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("all"),"onClick")},e.t?e.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("today"),"onClick")},e.t?e.t("discovery.today"):"\u4ECA\u5929"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("7d"),"onClick")},e.t?e.t("discovery.last7Days"):"\u8FD1 7 \u5929"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("30d"),"onClick")},e.t?e.t("discovery.last30Days"):"\u8FD1 30 \u5929"),r.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:t(()=>Se("90d"),"onClick")},e.t?e.t("discovery.last90Days"):"\u8FD1 90 \u5929")),r.createElement("div",{className:"dsham_dateCalendar"},r.createElement("div",{className:"dsham_dateCalHeader"},r.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:te,"aria-label":"prev month"},"\u2039"),r.createElement("span",{className:"dsham_dateMonthTitle"},Pt),r.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:$,"aria-label":"next month"},"\u203A")),r.createElement("div",{className:"dsham_dateGrid"},Ee.map((I,se)=>r.createElement("div",{key:se,className:"dsham_dateWeekday"},I))),r.createElement("div",{className:"dsham_dateGrid"},Mt))))}t(Qr,"DateRange");function yn(e){return M.createElement("div",{className:e.className},M.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":e.open,onClick:e.onToggle},Xr(M.createElement,e.open),e.title),e.open?M.createElement("div",null,e.children):null)}t(yn,"Disclosure");function Xr(e,r){return e("svg",{className:"dsham_foldChevron"+(r?" is-open":""),viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0},e("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}t(Xr,"foldChevron");function $n(e){let r=M.useRef(null);return M.useEffect(()=>{r.current&&(r.current.indeterminate=!!e.indeterminate&&!e.checked)},[e.indeterminate,e.checked]),M.createElement("input",{ref:r,className:"dsham_checkbox",type:"checkbox",checked:e.checked,disabled:e.disabled,"aria-label":e.label,onChange:t(i=>e.onChange({target:{checked:i.target.checked}}),"onChange")})}t($n,"SelectionCheckbox");var en=t(e=>{if(typeof e!="string"||!e.length||e.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return e},"id"),ts=t((e,r=!1)=>{if(typeof e!="string"||e.length>200||r&&!e.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return e.trim()},"queryText"),es={parse(e){let r=ee(e);if(!r||!Array.isArray(r.sessionIds)||!r.sessionIds.length||r.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u68C0\u7D22\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(r.sessionIds.map(en))],query:ts(r.query,!0)}}},Ua={parse(e){let r=ee(e);if(!r)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:en(r.sessionId),query:ts(r.query??"")}}},Gn=t((e,r)=>{if(typeof e!="string"||e.length>r)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return e},"boundedString"),ns=t(e=>{if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return e},"sequence"),Kn={parse(e){let r=ee(e);if(!r||!Array.isArray(r.items)||!Array.isArray(r.failures)||r.items.length>20||r.failures.length>20)throw new TypeError("\u68C0\u7D22\u7ED3\u679C\u65E0\u6548");return{items:r.items.map(ee).map(i=>({sessionId:en(i.sessionId),seq:ns(i.seq),snippet:Gn(i.snippet,400)})),failures:r.failures.map(ee).map(i=>({sessionId:en(i.sessionId),message:Gn(i.message,500)}))}}},Ba={parse(e){let r=ee(e);if(!r||!Array.isArray(r.messages)||r.messages.length>8||typeof r.hasEarlier!="boolean"||typeof r.hasLater!="boolean")throw new TypeError("\u9884\u89C8\u7ED3\u679C\u65E0\u6548");return{sessionId:en(r.sessionId),hasEarlier:r.hasEarlier,hasLater:r.hasLater,messages:r.messages.map(ee).map(i=>{if(typeof i.role!="string"||!["user","assistant"].includes(i.role)||typeof i.truncated!="boolean")throw new TypeError("\u6D88\u606F\u89D2\u8272\u6216\u622A\u65AD\u72B6\u6001\u65E0\u6548");return{seq:ns(i.seq),role:i.role,text:Gn(i.text,2e3),truncated:i.truncated}})}}};async function rs(e,r=globalThis.navigator?.clipboard){if(typeof e!="string"||!e)throw Object.assign(new Error("\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9"),{code:"copy.empty"});if(!r?.writeText)throw Object.assign(new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762"),{code:"copy.unavailable"});try{await r.writeText(e)}catch{throw Object.assign(new Error("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5"),{code:"copy.denied"})}}t(rs,"copySessionText");function ss(){let e=t((i,g)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${i}`,create:t(()=>g,"create"),schema:g}),"codec");return[["searchSessionContent",es,Kn],["searchArchivedContent",es,Kn],["previewArchivedSession",Ua,Ba]].map(([i,g,a])=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${i}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:i,invocation:{kind:"direct"},parameters:[{name:"input",wire:"input",source:"json",codec:e(i+"Input",g)}],result:e(i+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(ss,"discoveryInvocations");function as(e,r){let i=r?.trim().toLowerCase();if(!i)return null;let g=e.toLowerCase().indexOf(i);if(g<0)return null;let a=0,l=0,c;for(let x of e){let y=l+x.toLowerCase().length;if(c===void 0&&y>g&&(c=a),a+=x.length,y>=g+i.length)return{start:c??a,end:a};l=y}return null}t(as,"findTextRange");function bn(e,r=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return NaN;let[i,g,a]=e.split("-").map(Number),l=new Date(i,g-1,a);return l.getFullYear()!==i||l.getMonth()!==g-1||l.getDate()!==a?NaN:(r&&l.setDate(l.getDate()+1),l.getTime())}t(bn,"dayBoundary");function Yn(e,r){return(!e||Number.isFinite(bn(e)))&&(!r||Number.isFinite(bn(r)))&&(!e||!r||e<=r)}t(Yn,"validUpdatedRange");function is(e,r,i){if(!Yn(r,i))return!1;if(!r&&!i)return!0;let g=typeof e=="number"?e:Date.parse(e??"");return Number.isFinite(g)&&(!r||g>=bn(r))&&(!i||g<bn(i,!0))}t(is,"matchesUpdatedRange");async function os(e,r,i,{signal:g,onProgress:a}={}){let l=[],c=[],x=[...new Set(e)],y=t(()=>{if(g?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let E=0;E<x.length;E+=20){y();let b=Kn.parse(await i({sessionIds:x.slice(E,E+20),query:r}));y(),l.push(...b.items),c.push(...b.failures),a?.({done:Math.min(E+20,x.length),total:x.length,items:[...l],failures:[...c]})}return y(),{items:l,failures:c}}t(os,"searchArchiveBatches");function ls(e,r={}){let i=e.createElement;function g({text:v,query:S=""}){let R=as(v,S);return R?i(e.Fragment,null,v.slice(0,R.start),i("mark",null,v.slice(R.start,R.end)),v.slice(R.end)):v}t(g,"HighlightedText");function a(v,S,R,j){let L=JSON.stringify(v),P=JSON.stringify([L,S]),[F,Ce]=e.useState(0),[K,Y]=e.useState({key:"",status:"idle",items:[],failures:[]});return e.useEffect(()=>{if(!R||!S.trim()||!j)return;let X=new AbortController;Y({key:P,status:"loading",items:[],failures:[],done:0,total:v.length});let Ee=setTimeout(()=>{os(JSON.parse(L),S,j,{signal:X.signal,onProgress:t(te=>{X.signal.aborted||Y({key:P,status:"loading",...te})},"onProgress")}).then(te=>{X.signal.aborted||Y({key:P,status:"ready",done:v.length,total:v.length,...te})}).catch(te=>{X.signal.aborted||Y($=>({...$,key:P,status:"error",error:Ae(te)}))})},350);return()=>{X.abort(),clearTimeout(Ee)}},[L,S,R,j,F]),{...R&&S.trim()&&j?K.key===P?K:{key:P,status:"loading",items:[],failures:[],done:0,total:v.length}:{status:"idle",items:[],failures:[]},retry:t(()=>Ce(X=>X+1),"retry")}}t(a,"useArchiveSearch");function l(v,S){let[R,j]=e.useState(null),[L,P]=e.useState({status:"idle"}),[F,Ce]=e.useState(0),K=R,Y=R&&S.includes(R.session.id);return e.useEffect(()=>{R&&!Y&&j(null)},[R,Y]),e.useEffect(()=>{if(!Y||typeof window>"u")return;let Z=t(X=>{X.key==="Escape"&&(X.preventDefault(),X.stopPropagation(),X.stopImmediatePropagation(),j(null))},"onKeyDown");return window.addEventListener("keydown",Z,!0),()=>window.removeEventListener("keydown",Z,!0)},[Y]),e.useEffect(()=>{if(!R||!Y||!v)return;let Z=!0;return P({key:K,status:"loading"}),Promise.resolve().then(()=>v({sessionId:R.session.id,query:R.query})).then(X=>{Z&&P({key:K,status:"ready",value:X})}).catch(X=>{Z&&P({key:K,status:"error",error:Ae(X)})}),()=>{Z=!1}},[K,Y,v,F]),{target:Y?R:null,...L.key===K?L:{status:"loading"},open:t((Z,X="")=>j({session:Z,query:X}),"open"),close:t(()=>j(null),"close"),retry:t(()=>Ce(Z=>Z+1),"retry")}}t(l,"useArchivePreview");function c({title:v,failures:S,separator:R}){let[j,L]=e.useState(!1),P=i("ul",null,S.map(F=>i("li",{key:F.sessionId},F.sessionId,R,F.message)));return i(yn,{title:v,open:j,onToggle:t(()=>L(F=>!F),"onToggle")},P)}t(c,"FailureDetails");function x(v,S){let R=r.Button??(j=>i("button",{type:"button",disabled:j.disabled,onClick:j.onClick},j.children));return i(R,{variant:"outline",size:"sm",...S},v)}t(x,"textButton");function y({t:v,from:S,to:R,onFrom:j,onTo:L,invalid:P,onClear:F}){return i("div",{className:"dsham_dateFilter"},i(Qr,{React:e,from:S,to:R,invalid:P,label:v("discovery.date"),fromLabel:v("discovery.from"),toLabel:v("discovery.to"),onFrom:j,onTo:L,onClear:F,t:v}),P?i("p",{className:"dsham_dateAlert",role:"alert"},v("discovery.invalidDate")):null)}t(y,"DiscoveryFilters");function E({state:v,t:S}){return v.status==="idle"?null:i("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},i("p",null,S(v.status==="loading"?"discovery.searching":v.status==="error"?"discovery.searchError":"discovery.searched",{done:v.done??0,total:v.total??0})),v.status==="error"&&i("p",null,v.error),v.failures.length>0&&i(c,{title:S("discovery.failed",{n:v.failures.length}),failures:v.failures,separator:S("common.separator")}),(v.status==="error"||v.status==="ready"&&v.failures.length>0)&&x(S("discovery.retry"),{onClick:v.retry}))}t(E,"SearchStatus");function b({preview:v,t:S,MarkdownText:R}){let[j,L]=e.useState(!1);if(v.status==="loading")return i("p",{role:"status"},S("discovery.loading"));if(v.status==="error")return i("div",null,i("p",{role:"alert"},v.error),x(S("discovery.retry"),{onClick:v.retry}));let P=v.value;return P?i("div",{className:"dsham_previewMessages"},i("div",{className:"dsham_previewToolbar"},i("span",{title:S("discovery.previewHint")},S("discovery.readOnly")," \xB7 ",S("discovery.messageCount",{n:P.messages.length})),R&&i(r.SegmentedControl??"div",{id:"dsham-preview-mode",label:S("discovery.displayMode"),value:j?"raw":"formatted",options:[{value:"formatted",label:S("discovery.formatted")},{value:"raw",label:S("discovery.raw")}],onChange:t(F=>L(F==="raw"),"onChange")})),P.hasEarlier&&i("p",null,S("discovery.earlier")),!P.messages.length&&i("p",null,S("discovery.empty")),P.messages.map(F=>i("article",{key:F.seq,className:"dsham_previewMessage"},i("div",{className:"dsham_previewRole","data-role":F.role},i("span",{"aria-hidden":!0},S(F.role==="user"?"discovery.you":"discovery.ai")),i("strong",null,S("discovery."+F.role))),j||!R?i("pre",{className:"dsham_previewRaw"},i(g,{text:F.text,query:v.target?.query})):i(R,{text:F.text,streaming:!1,labels:{code:{copyLabel:S("discovery.copyCode"),copiedLabel:S("details.copied")},footnotes:S("discovery.footnotes")}}),F.truncated&&i("small",null,S("discovery.truncated")))),P.hasLater&&i("p",null,S("discovery.later"))):null}return t(b,"PreviewContent"),{HighlightedText:g,useArchiveSearch:a,useArchivePreview:l,DiscoveryFilters:y,SearchStatus:E,PreviewContent:b}}t(ls,"createDiscoveryTools");var cs=[".dsham_dateFilter{display:flex;align-items:center;gap:8px;min-width:0;position:relative}",".dsham_dateAlert{position:absolute;top:calc(100% + 4px);right:0;margin:0;width:max-content;max-width:240px;padding:4px 8px;background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-state-error-primary);border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,0.25);z-index:1100;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary);pointer-events:none}",".dsham_dateRange{position:relative;display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;box-sizing:border-box}",".dsham_dateTrigger{display:inline-flex;align-items:center;gap:6px;width:100%;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;cursor:pointer;box-sizing:border-box;transition:all .15s ease}",".dsham_dateTrigger:hover{border-color:var(--dsw-alias-border-l3)}",".dsham_dateTrigger.is-open{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 1px var(--dsw-alias-state-business-primary)}",".dsham_dateIcon{flex:none;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center}",".dsham_dateText{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:var(--dsw-alias-label-primary)}",".dsham_dateText.placeholder{color:var(--dsw-alias-label-primary)}",".dsham_dateClearBtn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);border-radius:50%;cursor:pointer;font-size:13px;line-height:1}",".dsham_dateClearBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}",".dsham_dateChevron{flex:none;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center}",".dsham_dateInputSrOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}",".dsham_datePopover{position:absolute;top:calc(100% + 4px);right:0;left:auto;z-index:1000;display:flex;gap:10px;padding:10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md,10px);background:var(--dsw-alias-bg-layer-1);box-shadow:0 8px 24px rgba(0,0,0,0.12),0 2px 6px rgba(0,0,0,0.06);box-sizing:border-box}",".dsham_datePresets{width:84px;border-right:0.5px solid var(--dsw-alias-border-l2);padding-right:8px;display:flex;flex-direction:column;gap:3px;flex:none}",".dsham_datePresetBtn{border:0;background:transparent;padding:5px 6px;text-align:left;font:inherit;font-size:12px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm,6px);cursor:pointer;transition:all .15s ease;white-space:nowrap}",".dsham_datePresetBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}",".dsham_dateCalendar{width:224px;display:flex;flex-direction:column;gap:6px;flex:none}",".dsham_dateCalHeader{display:flex;justify-content:space-between;align-items:center;padding:0 2px}",".dsham_dateMonthTitle{font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary)}",".dsham_dateNavBtn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:4px;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:14px;line-height:1}",".dsham_dateNavBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}",".dsham_dateGrid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px}",".dsham_dateWeekday{font-size:11px;color:var(--dsw-alias-label-tertiary);text-align:center;padding:3px 0;font-weight:500}",".dsham_dateDay{position:relative;height:26px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:0}",".dsham_dateDay.is-outside{color:var(--dsw-alias-label-quaternary)}",".dsham_dateDay:not(.is-outside):hover{background:var(--dsw-alias-interactive-bg-hover);border-radius:4px}",".dsham_dateDay.is-start{background:var(--dsw-alias-state-business-primary)!important;color:#fff!important;border-top-left-radius:6px;border-bottom-left-radius:6px}",".dsham_dateDay.is-end{background:var(--dsw-alias-state-business-primary)!important;color:#fff!important;border-top-right-radius:6px;border-bottom-right-radius:6px}",".dsham_dateDay.is-start.is-end{border-radius:6px!important}",".dsham_dateDay.is-in-range{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-business-primary)}",".dsham_dateDay.is-today::after{content:'';position:absolute;bottom:2px;width:3px;height:3px;border-radius:50%;background:var(--dsw-alias-state-business-primary)}",".dsham_dateDay.is-start.is-today::after,.dsham_dateDay.is-end.is-today::after{background:#fff}",".dsham_discoveryStatus{font-size:12px;margin-bottom:12px;overflow-wrap:anywhere}",".dsham_settingsSnippet{display:block;width:100%;padding:0;margin:4px 0 0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}",".dsham_previewMessages{max-height:65vh;overflow:auto;overflow-wrap:anywhere;padding-right:8px}",".dsham_previewToolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;color:var(--dsw-alias-label-secondary);font-size:12px}",".dsham_previewRole{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-size:13px}",".dsham_previewRole>span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--dsw-alias-bg-layer-3);font-size:11px}",".dsham_previewRole[data-role=user]>span{color:var(--dsw-alias-state-business-primary)}",".dsham_previewRaw{white-space:pre-wrap;font:13px/1.8 ui-monospace,monospace;overflow-wrap:anywhere}",".dsham_previewMessage pre:not(.dsham_previewRaw){white-space:pre;overflow-x:auto;max-width:100%}",".dsham_previewMessage table{display:block;max-width:100%;overflow-x:auto}",".dsham_previewMessage img{max-width:100%}","@media(max-width:520px){.dsham_previewToolbar{align-items:flex-start;flex-wrap:wrap}}",".dsham_previewMessage{padding:18px 0;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_previewMessage p{font-size:14px;line-height:1.8}",".dsham_previewHint,.dsham_previewMessage small{color:var(--dsw-alias-label-secondary);font-size:12px}",".dsham_settings mark,.dsham_previewMessages mark{background:var(--dsw-alias-state-warn-tertiary);color:inherit;border-radius:2px}",".dsham_settingsSnippet:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}"].join(""),ds={"common.separator":"\uFF1A","copy.empty":"\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9","copy.unavailable":"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762","copy.denied":"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5","discovery.you":"\u4F60","discovery.ai":"AI","discovery.readOnly":"\u53EA\u8BFB\u9884\u89C8","discovery.messageCount":"\u672C\u6B21\u663E\u793A {n} \u6761\u6D88\u606F","discovery.displayMode":"\u663E\u793A\u65B9\u5F0F","discovery.formatted":"\u6392\u7248","discovery.raw":"\u539F\u6587\u4E0E\u9AD8\u4EAE","discovery.copyCode":"\u590D\u5236\u4EE3\u7801","discovery.footnotes":"\u6CE8\u91CA","details.copyId":"\u590D\u5236\u4F1A\u8BDD ID","details.copied":"\u5DF2\u590D\u5236","discovery.date":"\u65E5\u671F","discovery.timeRange":"\u65F6\u95F4\u8303\u56F4","discovery.allTime":"\u5168\u90E8\u65F6\u95F4","discovery.today":"\u4ECA\u5929","discovery.last7Days":"\u8FD1 7 \u5929","discovery.last30Days":"\u8FD1 30 \u5929","discovery.last90Days":"\u8FD1 90 \u5929","discovery.customRange":"\u81EA\u5B9A\u4E49\u2026","discovery.dateActive":"\u65E5\u671F\xB7\u5DF2\u9009","discovery.clearDate":"\u6E05\u9664\u65E5\u671F","discovery.active":"\u5DF2\u542F\u7528","discovery.scope":"\u67E5\u627E\u8303\u56F4","discovery.titleOnly":"\u4EC5\u6807\u9898","discovery.titleAndContent":"\u6807\u9898\u4E0E\u6B63\u6587","discovery.from":"\u66F4\u65B0\u65F6\u95F4\u4ECE","discovery.to":"\u81F3","discovery.clear":"\u6E05\u9664\u6761\u4EF6","discovery.invalidDate":"\u5F00\u59CB\u65E5\u671F\u4E0D\u80FD\u665A\u4E8E\u7ED3\u675F\u65E5\u671F\uFF0C\u8BF7\u68C0\u67E5\u65E5\u671F\u8303\u56F4\u3002","discovery.searching":"\u6B63\u5728\u68C0\u7D22\u6B63\u6587\uFF1A{done} / {total}","discovery.searched":"\u6B63\u6587\u68C0\u7D22\u5B8C\u6210\uFF1A{done} / {total}","discovery.searchError":"\u6B63\u6587\u68C0\u7D22\u672A\u5B8C\u6210\uFF0C\u5F53\u524D\u7ED3\u679C\u53EF\u80FD\u4E0D\u5B8C\u6574\u3002","discovery.failed":"{n} \u6761\u4F1A\u8BDD\u8BFB\u53D6\u5931\u8D25","discovery.retry":"\u91CD\u8BD5","discovery.preview":"\u5FEB\u901F\u9884\u89C8","discovery.loading":"\u6B63\u5728\u8BFB\u53D6\u4F1A\u8BDD\u2026","discovery.previewHint":"\u53EA\u8BFB\u9884\u89C8\u539F\u59CB\u5BF9\u8BDD\u6587\u672C\uFF0C\u4E0D\u6062\u590D\u4F1A\u8BDD\uFF1B\u4E0D\u542B\u5DE5\u5177\u8F93\u51FA\u3001\u9644\u4EF6\u3001\u63A8\u7406\u548C\u7CFB\u7EDF\u5185\u5BB9\u3002","discovery.earlier":"\u524D\u9762\u8FD8\u6709\u6D88\u606F\uFF0C\u53EF\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD\u67E5\u770B\u3002","discovery.later":"\u540E\u9762\u8FD8\u6709\u6D88\u606F\uFF0C\u53EF\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD\u67E5\u770B\u3002","discovery.empty":"\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u7528\u6237\u6216\u52A9\u624B\u6587\u672C\u3002","discovery.truncated":"\u672C\u6761\u4EC5\u663E\u793A\u90E8\u5206\u5185\u5BB9\u3002","discovery.user":"\u7528\u6237","discovery.assistant":"\u52A9\u624B","discovery.openFull":"\u6253\u5F00\u5B8C\u6574\u4F1A\u8BDD","discovery.searchPlaceholder":"\u641C\u7D22\u6807\u9898\u6216\u6B63\u6587"},us={"common.separator":": ","copy.empty":"Nothing to copy","copy.unavailable":"Clipboard unavailable. Open the page over HTTPS or localhost.","copy.denied":"Copy failed. Allow clipboard access and retry.","discovery.you":"You","discovery.ai":"AI","discovery.readOnly":"Read-only preview","discovery.messageCount":"Showing {n} messages","discovery.displayMode":"Display mode","discovery.formatted":"Formatted","discovery.raw":"Source and highlights","discovery.copyCode":"Copy code","discovery.footnotes":"Footnotes","details.copyId":"Copy session ID","details.copied":"Copied","discovery.date":"Date","discovery.timeRange":"Time range","discovery.allTime":"All time","discovery.today":"Today","discovery.last7Days":"Past 7 days","discovery.last30Days":"Past 30 days","discovery.last90Days":"Past 90 days","discovery.customRange":"Custom\u2026","discovery.dateActive":"Date \xB7 Set","discovery.clearDate":"Clear dates","discovery.active":"Active","discovery.scope":"Search in","discovery.titleOnly":"Titles","discovery.titleAndContent":"Titles and content","discovery.from":"Updated from","discovery.to":"To","discovery.clear":"Clear filters","discovery.invalidDate":"Check the date range: the start must not be after the end.","discovery.searching":"Searching content: {done} / {total}","discovery.searched":"Content search complete: {done} / {total}","discovery.searchError":"Content search is incomplete; results may be missing.","discovery.failed":"Could not read {n} conversations","discovery.retry":"Retry","discovery.preview":"Quick preview","discovery.loading":"Reading conversation\u2026","discovery.previewHint":"Read-only original conversation text; keeps the conversation archived. Excludes tools, attachments, reasoning and system content.","discovery.earlier":"More messages before this preview. Open the full conversation to read them.","discovery.later":"More messages after this preview. Open the full conversation to read them.","discovery.empty":"No user or assistant text to preview.","discovery.truncated":"Only part of this message is shown.","discovery.user":"User","discovery.assistant":"Assistant","discovery.openFull":"Open full conversation","discovery.searchPlaceholder":"Search titles or content"},hs={"common.separator":": ","copy.empty":"\u041D\u0435\u0447\u0435\u0433\u043E \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C","copy.unavailable":"\u0411\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u043E HTTPS \u0438\u043B\u0438 localhost.","copy.denied":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C. \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0431\u0443\u0444\u0435\u0440\u0443 \u043E\u0431\u043C\u0435\u043D\u0430 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","discovery.you":"\u0412\u044B","discovery.ai":"\u0418\u0418","discovery.readOnly":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F","discovery.messageCount":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439: {n}","discovery.displayMode":"\u0420\u0435\u0436\u0438\u043C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F","discovery.formatted":"\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043E","discovery.raw":"\u0418\u0441\u0445\u043E\u0434\u043D\u0438\u043A \u0438 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0430","discovery.copyCode":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u0434","discovery.footnotes":"\u0421\u043D\u043E\u0441\u043A\u0438","details.copyId":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID \u0441\u0435\u0441\u0441\u0438\u0438","details.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","discovery.date":"\u0414\u0430\u0442\u0430","discovery.timeRange":"\u041F\u0435\u0440\u0438\u043E\u0434","discovery.allTime":"\u0412\u0441\u0435 \u0432\u0440\u0435\u043C\u044F","discovery.today":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F","discovery.last7Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 7 \u0434\u043D\u0435\u0439","discovery.last30Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 30 \u0434\u043D\u0435\u0439","discovery.last90Days":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 90 \u0434\u043D\u0435\u0439","discovery.customRange":"\u0421\u0432\u043E\u0439 \u043F\u0435\u0440\u0438\u043E\u0434\u2026","discovery.dateActive":"\u0414\u0430\u0442\u0430 \xB7 \u0412\u044B\u0431\u0440\u0430\u043D\u0430","discovery.clearDate":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u0430\u0442\u044B","discovery.active":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E","discovery.scope":"\u0418\u0441\u043A\u0430\u0442\u044C \u0432","discovery.titleOnly":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u044F","discovery.titleAndContent":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435","discovery.from":"\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0441","discovery.to":"\u041F\u043E","discovery.clear":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B","discovery.invalidDate":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D \u0434\u0430\u0442: \u043D\u0430\u0447\u0430\u043B\u043E \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u043E\u0437\u0436\u0435 \u043A\u043E\u043D\u0446\u0430.","discovery.searching":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443: {done} / {total}","discovery.searched":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D: {done} / {total}","discovery.searchError":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u0439; \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u043C\u0438.","discovery.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C {n} \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u043E\u0432","discovery.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","discovery.preview":"\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440","discovery.loading":"\u0427\u0442\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430\u2026","discovery.previewHint":"\u0422\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u0435\u043D\u0438\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430; \u0441\u0435\u0441\u0441\u0438\u044F \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u0432 \u0430\u0440\u0445\u0438\u0432\u0435. \u0411\u0435\u0437 \u0432\u044B\u0432\u043E\u0434\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432, \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0439, \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u0439 \u0438 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u043E\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E.","discovery.earlier":"\u041F\u0435\u0440\u0435\u0434 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u043E\u043C \u0435\u0441\u0442\u044C \u0435\u0449\u0451 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0447\u0442\u043E\u0431\u044B \u0438\u0445 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C.","discovery.later":"\u041F\u043E\u0441\u043B\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0435\u0441\u0442\u044C \u0435\u0449\u0451 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0447\u0442\u043E\u0431\u044B \u0438\u0445 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C.","discovery.empty":"\u041D\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430.","discovery.truncated":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0430\u0441\u0442\u044C \u044D\u0442\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","discovery.user":"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C","discovery.assistant":"\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442","discovery.openFull":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440","discovery.searchPlaceholder":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u043C \u0438\u043B\u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443"};var ps=t(e=>{let r=ee(e);if(!r||typeof r.sessionId!="string"||!r.sessionId.length||r.sessionId.length>1024||typeof r.identity!="string"||!r.identity.length||r.identity.length>4096)throw new TypeError("invalid cache rebuild candidate");return{sessionId:r.sessionId,identity:r.identity}},"candidate"),Fa={parse(e){let r=ee(e);if(!r||!Array.isArray(r.items)||!r.items.length||r.items.length>20)throw new TypeError("invalid cache rebuild batch (1\u201320 items required)");return{items:r.items.map(ps)}}},Zn={parse(e){let r=ee(e);if(!r||!Array.isArray(r.items)||r.count!==r.items.length)throw new TypeError("invalid cache diagnosis");return{count:r.items.length,items:r.items.map(ps)}}},Jn={parse(e){let r=ee(e);for(let i of["rebuiltSessionIds","skippedSessionIds"])if(!Array.isArray(r?.[i])||r[i].some(g=>typeof g!="string"))throw new TypeError("invalid cache rebuild result");if(!Array.isArray(r.failures)||r.failures.some(i=>!i||typeof i.sessionId!="string"||typeof i.message!="string"))throw new TypeError("invalid cache rebuild failures");return r}};function ms(){let e=t((r,i)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${r}`,create:t(()=>i,"create"),schema:i}),"codec");return[{method:"diagnoseSessionCaches",parameters:[],result:e("CacheDiagnosis",Zn)},{method:"rebuildSessionCaches",parameters:[{name:"input",wire:"input",source:"json",codec:e("CacheRebuildInput",Fa)}],result:e("CacheRebuildResult",Jn)}].map(({method:r,...i})=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${r}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:r,invocation:{kind:"direct"},...i,sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(ms,"cacheRebuildInvocations");function gs(e,r={}){let{maxLoadRetries:i=3,retryDelayMs:g=200}=r,a={diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null},l=!0,c=0,x=[],y,E=new Set,b=t(S=>{if(l){a={...a,...S};for(let R of E)R()}},"update"),v=t(async(S=i)=>{if(!l)return;y!==void 0&&(clearTimeout(y),y=void 0);let R=++c;try{let j=Zn.parse(await e.diagnose());l&&R===c&&b({diagnosis:j,error:null})}catch(j){if(S>0&&l&&R===c){y=setTimeout(()=>{y=void 0,l&&R===c&&v(S-1)},g);return}l&&R===c&&b({error:Ae(j)})}},"load");return{snapshot:t(()=>a,"snapshot"),subscribe(S){return E.add(S),()=>{E.delete(S)}},load:v,async run(S=!1){if(!l||a.busy)return;++c,y!==void 0&&(clearTimeout(y),y=void 0);let R=S?[...x]:[...a.diagnosis.items],j={rebuiltSessionIds:[],skippedSessionIds:[],failures:[]};x=[],b({busy:!0,result:null,error:null,refreshError:null,progress:{done:0,total:R.length}});for(let[L,P]of R.entries()){if(!l)return;try{let F=Jn.parse(await e.rebuild({items:[P]}));if(!l)return;j.rebuiltSessionIds.push(...F.rebuiltSessionIds),j.skippedSessionIds.push(...F.skippedSessionIds),j.failures.push(...F.failures),F.failures.length&&x.push(P)}catch(F){if(!l)return;j.failures.push({sessionId:P.sessionId,message:Ae(F)}),x.push(P)}b({progress:{done:L+1,total:R.length}})}b({result:j});try{await e.refresh()}catch(L){b({refreshError:Ae(L)})}l&&(await v(),b({busy:!1,progress:null}))},dismiss(){l&&b({result:null,error:null,refreshError:null})},dispose(){l=!1,++c,y!==void 0&&(clearTimeout(y),y=void 0),E.clear()}}}t(gs,"createCacheRebuildController");var jt=class extends Error{static{t(this,"ArchiveNavigationError")}code;constructor(r){super(r),this.name="ArchiveNavigationError",this.code=r}};function fs(e,r){return e instanceof jt?r(`archives.${e.code}`):Ae(e)}t(fs,"formatArchiveNavigationError");function Ha(e,r){if(typeof e?.retainInfo!="function")return;let i=e.retainInfo(r),g=i&&typeof i=="object"&&"getSnapshot"in i&&typeof i.getSnapshot=="function"?i.getSnapshot():i;if(!g||typeof g!="object"||!("retainedBy"in g))return;let a=g.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}t(Ha,"retainInfoSnapshot");function Wa(e){let r=e?.byId;if(r!==void 0){for(let i of Object.values(r))if(i&&(i.retainedBy?.mainView??0)>0)return i.id}}t(Wa,"mainViewSessionId");function pt(e){return Wa(e)}t(pt,"currentSessionId");function qa(e,r,i){return r===void 0||r===""?!1:(e?.byId?.[r]?.retainedBy?.mainView??0)>0||(Ha(i,r)?.retainedBy?.mainView??0)>0}t(qa,"sessionIsCurrent");async function vs(e,r,i,g=()=>!0){if(i){if(typeof e.prepare=="function"&&await e.prepare(r),!g())return;await e.restore(r)}g()&&await e.open(r)}t(vs,"openArchivedConversation");function ys(e,r,i,{onOpened:g=t(()=>{},"onOpened"),beginNavigation:a,warn:l=t((...c)=>console.warn(...c),"warn")}={}){let c,x=e?.clearArchivedCurrent,y=e&&Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent"),E=t(S=>qa(r.list.getSnapshot(),S,r),"viewing"),b=t(function(...S){return c!==void 0&&E(c)&&i.list.getSnapshot().archivedSessionIds.includes(c)?!1:(c=void 0,x?.apply(this,S))},"wrapped"),v=t(()=>e&&Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent")?.value===b,"ownsWrapper");if(e&&typeof x=="function")try{if(e.clearArchivedCurrent=b,!v())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(S){l("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",S)}return{open(S){c=S;try{if(typeof x=="function"&&!v()&&i.list.getSnapshot().archivedSessionIds.includes(S))throw l("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new jt("navigationUnavailable");if(a?.(),typeof e?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new jt("navigationUnavailable");if(e.openSession(S),!E(S))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof x=="function"}),new jt("sessionNotRetained");g()}catch(R){throw c=void 0,R}},dispose(){c=void 0,!(!e||Object.getOwnPropertyDescriptor(e,"clearArchivedCurrent")?.value!==b)&&(y?Object.defineProperty(e,"clearArchivedCurrent",y):delete e.clearArchivedCurrent,x?.call(e))}}}t(ys,"allowArchivedNavigation");var zt=require("@deepseek-ai/dsh-client-ui-primitives");var bs={check:"\u68C0\u67E5\u66F4\u65B0",update:"\u66F4\u65B0",recheck:"\u91CD\u65B0\u68C0\u67E5",auto:"\u81EA\u52A8\u66F4\u65B0",updating:"\u6B63\u5728\u66F4\u65B0\u2026",copy:"\u590D\u5236\u547D\u4EE4",copied:"\u5DF2\u590D\u5236",copyFailed:"\u590D\u5236\u5931\u8D25",checking:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026",latest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C",found:"\u53D1\u73B0\u65B0\u7248\u672C",failed:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",current:"\u8FD0\u884C\u7248\u672C",latestLabel:"\u6700\u65B0\u7248\u672C",profile:"\u76EE\u6807 profile",unknown:"\u672A\u77E5",manual:"\u624B\u5DE5\u66F4\u65B0",manualHint:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u53EF\u5728\u5F53\u524D DSH \u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5B8C\u6210\u540E\u91CD\u542F DSH Web\u3002",manualHintDesktop:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u8BF7\u5148\u5B8C\u5168\u9000\u51FA DSH Desktop\uFF0C\u518D\u7528 Desktop \u81EA\u5E26\u7684 dsh \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u3002\u666E\u901A dsh \u4F1A\u62D2\u7EDD desktop profile\u3002",intro:"\u4EC5\u68C0\u67E5\u5E76\u66F4\u65B0\u5F53\u524D\u63D2\u4EF6\uFF0C\u4E0D\u4F1A\u8054\u52A8\u5B89\u88C5\u5176\u4ED6\u63D2\u4EF6\u3002",restart:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u91CD\u542F DSH Web\u3002",restartDesktop:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 DSH Desktop\u3002",restarting:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u6B63\u5728\u91CD\u542F DSH Desktop\u2026",unavailable:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u4F7F\u7528\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4\u3002"},ws={check:"Check for updates",update:"Update",recheck:"Check again",auto:"Update automatically",updating:"Updating\u2026",copy:"Copy command",copied:"Copied",copyFailed:"Copy failed",checking:"Checking for updates\u2026",latest:"You are up to date",found:"New version available",failed:"Could not check for updates. Try again later.",current:"Running version",latestLabel:"Latest version",profile:"Target profile",unknown:"Unknown",manual:"Manual update",manualHint:"If automatic update fails, run this command in the current DSH terminal, then restart DSH Web.",manualHintDesktop:"If automatic update fails, fully quit DSH Desktop, then run this command with Desktop's own dsh. A regular dsh rejects the desktop profile.",intro:"Only this plugin is checked and updated. Other plugins are not changed.",restart:"Update complete. Restart DSH Web.",restartDesktop:"Update complete. Fully quit and reopen DSH Desktop.",restarting:"Update complete. Restarting DSH Desktop\u2026",unavailable:"Automatic update is unavailable. Use the manual command."};function tn(e){return e.toLowerCase().startsWith("zh")?bs:ws}t(tn,"pluginUpdateCopy");function Va(e,r,i,g){let a=tn(e),l=r?.restartDesktop===!0||r?.profileName==="desktop",c=l?{...a,manualHint:a.manualHintDesktop}:a,x=i!=="idle",y=c.checking,E="";return i==="checking"?y=c.checking:i==="updating"?y=c.updating:g.type==="error"?(y=g.message||c.failed,E="error"):g.type==="restart"?(y=l?c.restartDesktop:c.restart,E="success"):g.type==="restarting"?(y=c.restarting,E="success"):r===void 0?y=c.checking:r.latestCheckFailed?(y=c.failed,E="error"):!r.canAutoUpdate&&r.updateAvailable?(y=c.unavailable,E="update"):r.updateAvailable?(y=`${c.found}: v${r.latestVersion??c.unknown}`,E="update"):(y=c.latest,E="success"),{copy:c,busy:x,message:y,kind:E,loading:i==="updating",updateLabel:i==="updating"?c.updating:c.auto,disabled:x||r?.canAutoUpdate!==!0||r.updateAvailable!==!0,currentVersion:r===void 0?c.unknown:`v${r.currentVersion}`,latestVersion:r?.latestVersion===void 0?c.unknown:`v${r.latestVersion}`,profileName:r?.profileName??c.unknown,profileRaw:r?.profileName??"",latestRaw:r?.latestVersion??"latest"}}t(Va,"describePluginUpdate");function Ss(e,r,i){let g="idle",a=r,l={type:"status"},c=0,x=new Set,y=t(()=>{for(let b of x)b()},"emit"),E=t(b=>{a=b,i?.(b)},"assign");return{get posts(){return c},subscribe(b){return x.add(b),()=>{x.delete(b)}},view(b){return Va(b,a,g,l)},async check(){if(g==="idle"){g="checking",l={type:"status"},y();try{E(await e("GET")),l={type:"status"}}catch(b){l={type:"error",message:b instanceof Error?b.message:""}}finally{g="idle",y()}}},async update(){if(g==="idle"){g="updating",l={type:"status"},c+=1,y();try{let b=await e("POST");E(b),l={type:b.autoReload===!0?"restarting":"restart"}}catch(b){l={type:"error",message:b instanceof Error?b.message:""}}finally{g="idle",y()}}}}}t(Ss,"createUpdateFlow");function xs(e,r,i){return`dsh plugin${e.trim()===""?"":` --profile ${e.trim()}`} add ${r}@${i} --registry=https://registry.npmjs.org/`}t(xs,"manualPluginUpdateCommand");function ks(e,r){return e.key!=="Escape"?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),r(),!0)}t(ks,"handlePluginUpdateEscape");function $a(){let e=globalThis.document;if(typeof e>"u"||e===null)return;let r=e.baseURI;if(!(typeof r!="string"||r===""))try{let i=new URL(r),g=i.pathname.lastIndexOf("/"),a=i.pathname.slice(g+1);return/\.(html?|php|aspx?|jsp)$/i.test(a)?i.pathname=i.pathname.slice(0,g+1):i.pathname.endsWith("/")||(i.pathname+="/"),i.href}catch{return}}t($a,"pageBaseHref");function wn(e){if(typeof e!="string"||e.charAt(0)!=="/"||e.charAt(1)==="/")return e;let r=$a();if(r===void 0)return e;try{return new URL(e.slice(1),r).href}catch{return e}}t(wn,"resolveApiUrl");function Cs(e){let i=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(i===void 0)throw new Error("createRoot unavailable");return i(e)}t(Cs,"mountRoot");var Ga="x-michengai-plugin-update",Es="michengai-plugin-update-ui",Qn=`
|
|
10
|
+
"use strict";var Bn=Object.defineProperty;var Za=Object.getOwnPropertyDescriptor;var Ja=Object.getOwnPropertyNames;var Xa=Object.prototype.hasOwnProperty;var e=(t,s)=>Bn(t,"name",{value:s,configurable:!0});var Qa=(t,s)=>{for(var o in s)Bn(t,o,{get:s[o],enumerable:!0})},ei=(t,s,o,y)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of Ja(s))!Xa.call(t,a)&&a!==o&&Bn(t,a,{get:()=>s[a],enumerable:!(y=Za(s,a))||y.enumerable});return t};var ti=t=>ei(Bn({},"__esModule",{value:!0}),t);var Ti={};Qa(Ti,{startArchiveClient:()=>Ri});module.exports=ti(Ti);function ne(t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return t}e(ne,"record");function We(t){return String(t&&typeof t=="object"&&"message"in t?t.message??t:t)}e(We,"errorMessage");function Un(t){return t&&typeof t=="object"&&"code"in t?t.code:void 0}e(Un,"errorCode");var us=Function("return globalThis.__dshArchiveReact")(),{Children:Oi,Component:zi,Fragment:hs,Profiler:Pi,PureComponent:Li,StrictMode:Fi,Suspense:Bi,cloneElement:Ui,createContext:Hi,createElement:ps,createRef:Wi,forwardRef:qi,isValidElement:Vi,lazy:Gi,memo:$i,startTransition:Ki,useCallback:Yi,useContext:Zi,useDebugValue:Ji,useDeferredValue:Xi,useEffect:ms,useId:Qi,useImperativeHandle:eo,useInsertionEffect:to,useLayoutEffect:no,useMemo:ro,useReducer:so,useRef:ao,useState:nn,useSyncExternalStore:io,useTransition:oo,version:lo}=us,L=us;function gs(t){return L.createElement("input",{className:"dsham_number",type:"number",min:t.min,max:t.max,value:t.value??"",disabled:t.disabled,"aria-label":t["aria-label"],onChange:e(s=>{let o=s.target.value;if(o===""){t.onChange(null);return}let y=Number(o);t.onChange(Number.isNaN(y)?null:y)},"onChange")})}e(gs,"NumberField");function ri(t=L.createElement){return t("svg",{className:"dsham_dateIcon",width:14,height:14,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},t("rect",{x:2,y:3,width:12,height:11,rx:2}),t("line",{x1:2,y1:6.5,x2:14,y2:6.5}),t("line",{x1:5.5,y1:1.5,x2:5.5,y2:3.5}),t("line",{x1:10.5,y1:1.5,x2:10.5,y2:3.5}))}e(ri,"CalendarIcon");function kn(t,s,o){let y=String(s+1).padStart(2,"0"),a=String(o).padStart(2,"0");return`${t}-${y}-${a}`}e(kn,"formatYmd");function rn(t){let s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);return s?{year:Number(s[1]),monthIndex:Number(s[2])-1,day:Number(s[3])}:null}e(rn,"parseYmd");function si(t,s){let o=new Date(t,s,1).getDay(),y=(o===0?7:o)-1,a=new Date(t,s+1,0).getDate(),l=new Date(t,s,0).getDate(),h=[];for(let f=0;f<42;f++){let w=t,D=s,k=0,v=!1;f<y?(k=l-y+f+1,D=s-1,D<0&&(D=11,w--),v=!0):f<y+a?k=f-y+1:(k=f-y-a+1,D=s+1,D>11&&(D=0,w++),v=!0),h.push({year:w,monthIndex:D,day:k,dateStr:kn(w,D,k),isOutside:v})}return h}e(si,"buildMonthGrid");function ai(t,s=new Date){if(t==="all")return{from:"",to:""};let o=kn(s.getFullYear(),s.getMonth(),s.getDate());if(t==="today")return{from:o,to:o};let y=t==="7d"?6:t==="30d"?29:89,a=new Date(s.getTime()-y*864e5);return{from:kn(a.getFullYear(),a.getMonth(),a.getDate()),to:o}}e(ai,"getPresetRange");function fs(t,s,o,y){let a=s+y,l=new Date(t,a+1,0).getDate();return new Date(t,a,Math.min(o,l))}e(fs,"shiftMonthClamped");function vs(t){let s=t.React||L;function o(T,ie){let $e=T==="from"?ie:t.from,an=T==="to"?ie:t.to;if($e===""&&an===""){t.onClear();return}T==="from"?t.onFrom(ie):t.onTo(ie)}e(o,"change");let y=!!(t.from||t.to),a="";t.from&&t.to?a=`${t.from} \u2013 ${t.to}`:t.from?a=`${t.from} \u2013`:t.to?a=`\u2013 ${t.to}`:a=t.t?t.t("discovery.timeRange")||`${t.fromLabel} \u2013 ${t.toLabel}`:`${t.fromLabel} \u2013 ${t.toLabel}`;let h=(s.useRef??(T=>{let[ie]=s.useState({current:T});return ie}))(null),[f,w]=s.useState(!1),D=rn(t.from||t.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[k,v]=s.useState(D.year),[C,_]=s.useState(D.monthIndex),[M,B]=s.useState(null),[F,H]=s.useState(null),[Pe,re]=s.useState(null);s.useEffect(()=>{if(!f)return;let T=e($e=>{h.current&&!h.current.contains($e.target)&&(w(!1),B(null))},"onPointerDown"),ie=e($e=>{$e.key==="Escape"&&($e.preventDefault(),$e.stopPropagation(),w(!1),B(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",T,!0),typeof window<"u"&&window.addEventListener("keydown",ie,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",T,!0),typeof window<"u"&&window.removeEventListener("keydown",ie,!0)}},[f]),s.useEffect(()=>{if(!f||!Pe||!h.current)return;h.current.querySelector(`[data-date="${Pe}"]`)?.focus()},[f,Pe]);let se=t.t?t.t("discovery.today")==="Today"||(t.t("locale.language")||"").startsWith("en"):!1,ce=t.t?t.t("discovery.today")==="\u0421\u0435\u0433\u043E\u0434\u043D\u044F"||(t.t("locale.language")||"").startsWith("ru"):!1,ae=se?"en-US":ce?"ru-RU":"zh-CN",Le=se?["Mo","Tu","We","Th","Fr","Sa","Su"]:ce?["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"]:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"];function ue(T){T.stopPropagation(),C<=0?(_(11),v(ie=>ie-1)):_(ie=>ie-1)}e(ue,"prevMonth");function X(T){T.stopPropagation(),C>=11?(_(0),v(ie=>ie+1)):_(ie=>ie+1)}e(X,"nextMonth");function Nt(T){M?(T>=M?(t.onFrom(M),t.onTo(T)):(t.onFrom(T),t.onTo(M)),B(null),w(!1)):(B(T),H(T))}e(Nt,"handleDayClick");function dt(T){let ie=ai(T);T==="all"?t.onClear():(t.onFrom(ie.from),t.onTo(ie.to)),B(null),w(!1)}e(dt,"applyPreset");function U(T){let ie=kn(T.getFullYear(),T.getMonth(),T.getDate());re(ie),M&&H(ie),(T.getFullYear()!==k||T.getMonth()!==C)&&(v(T.getFullYear()),_(T.getMonth()))}e(U,"moveFocusToDate");function Ae(T,ie){let $e=rn(T);$e&&U(new Date($e.year,$e.monthIndex,$e.day+ie))}e(Ae,"moveFocus");let _e=t.from,qt=t.to;M&&F&&(_e=M<=F?M:F,qt=M<=F?F:M);let xt=si(k,C),Vt=new Date,Vn=Pe||_e||kn(Vt.getFullYear(),Vt.getMonth(),Vt.getDate()),xr=xt.map((T,ie)=>{let $e=_e===T.dateStr,an=qt===T.dateStr,on=!!(_e&&qt&&T.dateStr>_e&&T.dateStr<qt),Dt=T.year===Vt.getFullYear()&&T.monthIndex===Vt.getMonth()&&T.day===Vt.getDate(),wt="dsham_dateDay";T.isOutside&&(wt+=" is-outside"),Dt&&(wt+=" is-today"),$e&&(wt+=" is-start"),an&&(wt+=" is-end"),on&&(wt+=" is-in-range");let Rn=!T.isOutside&&(T.dateStr===Vn||T.day===1&&!xt.some(Q=>!Q.isOutside&&Q.dateStr===Vn));return s.createElement("div",{key:ie,className:wt,role:"button",tabIndex:Rn?0:-1,"data-date":T.dateStr,"aria-label":T.dateStr,"aria-pressed":!!($e||an||on),onClick:e(Q=>{Q.stopPropagation(),Nt(T.dateStr)},"onClick"),onKeyDown:e(Q=>{if(Q.key==="Enter"||Q.key===" ")Q.preventDefault(),Q.stopPropagation(),Nt(T.dateStr);else if(Q.key==="ArrowLeft")Q.preventDefault(),Q.stopPropagation(),Ae(T.dateStr,-1);else if(Q.key==="ArrowRight")Q.preventDefault(),Q.stopPropagation(),Ae(T.dateStr,1);else if(Q.key==="ArrowUp")Q.preventDefault(),Q.stopPropagation(),Ae(T.dateStr,-7);else if(Q.key==="ArrowDown")Q.preventDefault(),Q.stopPropagation(),Ae(T.dateStr,7);else if(Q.key==="Home"){Q.preventDefault(),Q.stopPropagation();let Fe=rn(T.dateStr);if(Fe){let gt=new Date(Fe.year,Fe.monthIndex,Fe.day),ln=(gt.getDay()===0?7:gt.getDay())-1;gt.setDate(gt.getDate()-ln),U(gt)}}else if(Q.key==="End"){Q.preventDefault(),Q.stopPropagation();let Fe=rn(T.dateStr);if(Fe){let gt=new Date(Fe.year,Fe.monthIndex,Fe.day),ln=(gt.getDay()===0?7:gt.getDay())-1;gt.setDate(gt.getDate()+(6-ln)),U(gt)}}else if(Q.key==="PageUp"){Q.preventDefault(),Q.stopPropagation();let Fe=rn(T.dateStr);Fe&&U(fs(Fe.year,Fe.monthIndex,Fe.day,-1))}else if(Q.key==="PageDown"){Q.preventDefault(),Q.stopPropagation();let Fe=rn(T.dateStr);Fe&&U(fs(Fe.year,Fe.monthIndex,Fe.day,1))}},"onKeyDown"),onMouseEnter:e(()=>{M&&H(T.dateStr)},"onMouseEnter")},T.day)}),An=`${k}\u5E74 ${C+1}\u6708`;try{An=new Intl.DateTimeFormat(ae,{year:"numeric",month:"long"}).format(new Date(k,C,1))}catch{An=se||ce?`${k}-${String(C+1).padStart(2,"0")}`:`${k}\u5E74 ${C+1}\u6708`}return s.createElement("div",{ref:h,className:"dsham_dateRange",role:"group","aria-label":t.label},s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.from,"aria-label":t.fromLabel,"aria-invalid":t.invalid||void 0,onChange:e(T=>o("from",T.target.value),"onChange")}),s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.to,"aria-label":t.toLabel,"aria-invalid":t.invalid||void 0,onChange:e(T=>o("to",T.target.value),"onChange")}),s.createElement("div",{className:"dsham_dateTrigger"+(f?" is-open":""),role:"button",tabIndex:0,"aria-expanded":f,"aria-controls":f?"dsham-date-popover":void 0,onClick:e(()=>{f&&B(null),w(!f)},"onClick"),onKeyDown:e(T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),f&&B(null),w(!f))},"onKeyDown")},ri(s.createElement),s.createElement("span",{className:"dsham_dateText"+(y?"":" placeholder")},a),y?s.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:e(T=>{T.stopPropagation(),t.onClear(),B(null)},"onClick"),children:"\xD7"}):null,s.createElement("span",{className:"dsham_dateChevron"},ys(s.createElement,f))),f&&s.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":t.label,onClick:e(T=>T.stopPropagation(),"onClick")},s.createElement("div",{className:"dsham_datePresets"},s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>dt("all"),"onClick")},t.t?t.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>dt("today"),"onClick")},t.t?t.t("discovery.today"):"\u4ECA\u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>dt("7d"),"onClick")},t.t?t.t("discovery.last7Days"):"\u8FD1 7 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>dt("30d"),"onClick")},t.t?t.t("discovery.last30Days"):"\u8FD1 30 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>dt("90d"),"onClick")},t.t?t.t("discovery.last90Days"):"\u8FD1 90 \u5929")),s.createElement("div",{className:"dsham_dateCalendar"},s.createElement("div",{className:"dsham_dateCalHeader"},s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:ue,"aria-label":"prev month"},"\u2039"),s.createElement("span",{className:"dsham_dateMonthTitle"},An),s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:X,"aria-label":"next month"},"\u203A")),s.createElement("div",{className:"dsham_dateGrid"},Le.map((T,ie)=>s.createElement("div",{key:ie,className:"dsham_dateWeekday"},T))),s.createElement("div",{className:"dsham_dateGrid"},xr))))}e(vs,"DateRange");function Hn(t){return L.createElement("div",{className:t.className},L.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":t.open,onClick:t.onToggle},ys(L.createElement,t.open),t.title),t.open?L.createElement("div",null,t.children):null)}e(Hn,"Disclosure");function ys(t,s){return t("svg",{className:"dsham_foldChevron"+(s?" is-open":""),viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0},t("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}e(ys,"foldChevron");function ur(t){let s=L.useRef(null);return L.useEffect(()=>{s.current&&(s.current.indeterminate=!!t.indeterminate&&!t.checked)},[t.indeterminate,t.checked]),L.createElement("input",{ref:s,className:"dsham_checkbox",type:"checkbox",checked:t.checked,disabled:t.disabled,"aria-label":t.label,onChange:e(o=>t.onChange({target:{checked:o.target.checked}}),"onChange")})}e(ur,"SelectionCheckbox");var xn=e(t=>{if(typeof t!="string"||!t.length||t.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return t},"id"),ws=e((t,s=!1)=>{if(typeof t!="string"||t.length>200||s&&!t.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return t.trim()},"queryText"),bs={parse(t){let s=ne(t);if(!s||!Array.isArray(s.sessionIds)||!s.sessionIds.length||s.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u68C0\u7D22\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(s.sessionIds.map(xn))],query:ws(s.query,!0)}}},ii={parse(t){let s=ne(t);if(!s)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:xn(s.sessionId),query:ws(s.query??"")}}},hr=e((t,s)=>{if(typeof t!="string"||t.length>s)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return t},"boundedString"),Ss=e(t=>{if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return t},"sequence"),pr={parse(t){let s=ne(t);if(!s||!Array.isArray(s.items)||!Array.isArray(s.failures)||s.items.length>20||s.failures.length>20)throw new TypeError("\u68C0\u7D22\u7ED3\u679C\u65E0\u6548");return{items:s.items.map(ne).map(o=>({sessionId:xn(o.sessionId),seq:Ss(o.seq),snippet:hr(o.snippet,400)})),failures:s.failures.map(ne).map(o=>({sessionId:xn(o.sessionId),message:hr(o.message,500)}))}}},oi={parse(t){let s=ne(t);if(!s||!Array.isArray(s.messages)||s.messages.length>8||typeof s.hasEarlier!="boolean"||typeof s.hasLater!="boolean")throw new TypeError("\u9884\u89C8\u7ED3\u679C\u65E0\u6548");return{sessionId:xn(s.sessionId),hasEarlier:s.hasEarlier,hasLater:s.hasLater,messages:s.messages.map(ne).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:Ss(o.seq),role:o.role,text:hr(o.text,2e3),truncated:o.truncated}})}}};async function mr(t,s=globalThis.navigator?.clipboard){if(typeof t!="string"||!t)throw Object.assign(new Error("\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9"),{code:"copy.empty"});if(!s?.writeText)throw Object.assign(new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762"),{code:"copy.unavailable"});try{await s.writeText(t)}catch{throw Object.assign(new Error("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5"),{code:"copy.denied"})}}e(mr,"copySessionText");function ks(){let t=e((o,y)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:e(()=>y,"create"),schema:y}),"codec");return[["searchSessionContent",bs,pr],["searchArchivedContent",bs,pr],["previewArchivedSession",ii,oi]].map(([o,y,a])=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${o}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:o,invocation:{kind:"direct"},parameters:[{name:"input",wire:"input",source:"json",codec:t(o+"Input",y)}],result:t(o+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(ks,"discoveryInvocations");function xs(t,s){let o=s?.trim().toLowerCase();if(!o)return null;let y=t.toLowerCase().indexOf(o);if(y<0)return null;let a=0,l=0,h;for(let f of t){let w=l+f.toLowerCase().length;if(h===void 0&&w>y&&(h=a),a+=f.length,w>=y+o.length)return{start:h??a,end:a};l=w}return null}e(xs,"findTextRange");function Wn(t,s=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return NaN;let[o,y,a]=t.split("-").map(Number),l=new Date(o,y-1,a);return l.getFullYear()!==o||l.getMonth()!==y-1||l.getDate()!==a?NaN:(s&&l.setDate(l.getDate()+1),l.getTime())}e(Wn,"dayBoundary");function fr(t,s){return(!t||Number.isFinite(Wn(t)))&&(!s||Number.isFinite(Wn(s)))&&(!t||!s||t<=s)}e(fr,"validUpdatedRange");function Cs(t,s,o){if(!fr(s,o))return!1;if(!s&&!o)return!0;let y=typeof t=="number"?t:Date.parse(t??"");return Number.isFinite(y)&&(!s||y>=Wn(s))&&(!o||y<Wn(o,!0))}e(Cs,"matchesUpdatedRange");async function Es(t,s,o,{signal:y,onProgress:a}={}){let l=[],h=[],f=[...new Set(t)],w=e(()=>{if(y?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let D=0;D<f.length;D+=20){w();let k=pr.parse(await o({sessionIds:f.slice(D,D+20),query:s}));w(),l.push(...k.items),h.push(...k.failures),a?.({done:Math.min(D+20,f.length),total:f.length,items:[...l],failures:[...h]})}return w(),{items:l,failures:h}}e(Es,"searchArchiveBatches");function Is(t,s={}){let o=t.createElement;function y({text:v,query:C=""}){let _=xs(v,C);return _?o(t.Fragment,null,v.slice(0,_.start),o("mark",null,v.slice(_.start,_.end)),v.slice(_.end)):v}e(y,"HighlightedText");function a(v,C,_,M){let B=JSON.stringify(v),F=JSON.stringify([B,C]),[H,Pe]=t.useState(0),[re,se]=t.useState({key:"",status:"idle",items:[],failures:[]});return t.useEffect(()=>{if(!_||!C.trim()||!M)return;let ae=new AbortController;se({key:F,status:"loading",items:[],failures:[],done:0,total:v.length});let Le=setTimeout(()=>{Es(JSON.parse(B),C,M,{signal:ae.signal,onProgress:e(ue=>{ae.signal.aborted||se({key:F,status:"loading",...ue})},"onProgress")}).then(ue=>{ae.signal.aborted||se({key:F,status:"ready",done:v.length,total:v.length,...ue})}).catch(ue=>{ae.signal.aborted||se(X=>({...X,key:F,status:"error",error:We(ue)}))})},350);return()=>{ae.abort(),clearTimeout(Le)}},[B,C,_,M,H]),{..._&&C.trim()&&M?re.key===F?re:{key:F,status:"loading",items:[],failures:[],done:0,total:v.length}:{status:"idle",items:[],failures:[]},retry:e(()=>Pe(ae=>ae+1),"retry")}}e(a,"useArchiveSearch");function l(v,C){let[_,M]=t.useState(null),[B,F]=t.useState({status:"idle"}),[H,Pe]=t.useState(0),re=_,se=_&&C.includes(_.session.id);return t.useEffect(()=>{_&&!se&&M(null)},[_,se]),t.useEffect(()=>{if(!se||typeof window>"u")return;let ce=e(ae=>{ae.key==="Escape"&&(ae.preventDefault(),ae.stopPropagation(),ae.stopImmediatePropagation(),M(null))},"onKeyDown");return window.addEventListener("keydown",ce,!0),()=>window.removeEventListener("keydown",ce,!0)},[se]),t.useEffect(()=>{if(!_||!se||!v)return;let ce=!0;return F({key:re,status:"loading"}),Promise.resolve().then(()=>v({sessionId:_.session.id,query:_.query})).then(ae=>{ce&&F({key:re,status:"ready",value:ae})}).catch(ae=>{ce&&F({key:re,status:"error",error:We(ae)})}),()=>{ce=!1}},[re,se,v,H]),{target:se?_:null,...B.key===re?B:{status:"loading"},open:e((ce,ae="")=>M({session:ce,query:ae}),"open"),close:e(()=>M(null),"close"),retry:e(()=>Pe(ce=>ce+1),"retry")}}e(l,"useArchivePreview");function h({title:v,failures:C,separator:_}){let[M,B]=t.useState(!1),F=o("ul",null,C.map(H=>o("li",{key:H.sessionId},H.sessionId,_,H.message)));return o(Hn,{title:v,open:M,onToggle:e(()=>B(H=>!H),"onToggle")},F)}e(h,"FailureDetails");function f(v,C){let _=s.Button??(M=>o("button",{type:"button",disabled:M.disabled,onClick:M.onClick},M.children));return o(_,{variant:"outline",size:"sm",...C},v)}e(f,"textButton");function w({t:v,from:C,to:_,onFrom:M,onTo:B,invalid:F,onClear:H}){return o("div",{className:"dsham_dateFilter"},o(vs,{React:t,from:C,to:_,invalid:F,label:v("discovery.date"),fromLabel:v("discovery.from"),toLabel:v("discovery.to"),onFrom:M,onTo:B,onClear:H,t:v}),F?o("p",{className:"dsham_dateAlert",role:"alert"},v("discovery.invalidDate")):null)}e(w,"DiscoveryFilters");function D({state:v,t:C}){return v.status==="idle"?null:o("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},o("p",null,C(v.status==="loading"?"discovery.searching":v.status==="error"?"discovery.searchError":"discovery.searched",{done:v.done??0,total:v.total??0})),v.status==="error"&&o("p",null,v.error),v.failures.length>0&&o(h,{title:C("discovery.failed",{n:v.failures.length}),failures:v.failures,separator:C("common.separator")}),(v.status==="error"||v.status==="ready"&&v.failures.length>0)&&f(C("discovery.retry"),{onClick:v.retry}))}e(D,"SearchStatus");function k({preview:v,t:C,MarkdownText:_}){let[M,B]=t.useState(!1);if(v.status==="loading")return o("p",{role:"status"},C("discovery.loading"));if(v.status==="error")return o("div",null,o("p",{role:"alert"},v.error),f(C("discovery.retry"),{onClick:v.retry}));let F=v.value;return F?o("div",{className:"dsham_previewMessages"},o("div",{className:"dsham_previewToolbar"},o("span",{title:C("discovery.previewHint")},C("discovery.readOnly")," \xB7 ",C("discovery.messageCount",{n:F.messages.length})),_&&o(s.SegmentedControl??"div",{id:"dsham-preview-mode",label:C("discovery.displayMode"),value:M?"raw":"formatted",options:[{value:"formatted",label:C("discovery.formatted")},{value:"raw",label:C("discovery.raw")}],onChange:e(H=>B(H==="raw"),"onChange")})),F.hasEarlier&&o("p",null,C("discovery.earlier")),!F.messages.length&&o("p",null,C("discovery.empty")),F.messages.map(H=>o("article",{key:H.seq,className:"dsham_previewMessage"},o("div",{className:"dsham_previewRole","data-role":H.role},o("span",{"aria-hidden":!0},C(H.role==="user"?"discovery.you":"discovery.ai")),o("strong",null,C("discovery."+H.role))),M||!_?o("pre",{className:"dsham_previewRaw"},o(y,{text:H.text,query:v.target?.query})):o(_,{text:H.text,streaming:!1,labels:{code:{copyLabel:C("discovery.copyCode"),copiedLabel:C("details.copied")},footnotes:C("discovery.footnotes")}}),H.truncated&&o("small",null,C("discovery.truncated")))),F.hasLater&&o("p",null,C("discovery.later"))):null}return e(k,"PreviewContent"),{HighlightedText:y,useArchiveSearch:a,useArchivePreview:l,DiscoveryFilters:w,SearchStatus:D,PreviewContent:k}}e(Is,"createDiscoveryTools");var As=[".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(""),Rs={"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"},Ts={"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"},_s={"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 js=e(t=>{let s=ne(t);if(!s||typeof s.sessionId!="string"||!s.sessionId.length||s.sessionId.length>1024||typeof s.identity!="string"||!s.identity.length||s.identity.length>4096)throw new TypeError("invalid cache rebuild candidate");return{sessionId:s.sessionId,identity:s.identity}},"candidate"),li={parse(t){let s=ne(t);if(!s||!Array.isArray(s.items)||!s.items.length||s.items.length>20)throw new TypeError("invalid cache rebuild batch (1\u201320 items required)");return{items:s.items.map(js)}}},gr={parse(t){let s=ne(t);if(!s||!Array.isArray(s.items)||s.count!==s.items.length)throw new TypeError("invalid cache diagnosis");return{count:s.items.length,items:s.items.map(js)}}},vr={parse(t){let s=ne(t);for(let o of["rebuiltSessionIds","skippedSessionIds"])if(!Array.isArray(s?.[o])||s[o].some(y=>typeof y!="string"))throw new TypeError("invalid cache rebuild result");if(!Array.isArray(s.failures)||s.failures.some(o=>!o||typeof o.sessionId!="string"||typeof o.message!="string"))throw new TypeError("invalid cache rebuild failures");return s}};function Ns(){let t=e((s,o)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${s}`,create:e(()=>o,"create"),schema:o}),"codec");return[{method:"diagnoseSessionCaches",parameters:[],result:t("CacheDiagnosis",gr)},{method:"rebuildSessionCaches",parameters:[{name:"input",wire:"input",source:"json",codec:t("CacheRebuildInput",li)}],result:t("CacheRebuildResult",vr)}].map(({method:s,...o})=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${s}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:s,invocation:{kind:"direct"},...o,sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(Ns,"cacheRebuildInvocations");function Ds(t,s={}){let{maxLoadRetries:o=3,retryDelayMs:y=200}=s,a={diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null},l=!0,h=0,f=[],w,D=new Set,k=e(C=>{if(l){a={...a,...C};for(let _ of D)_()}},"update"),v=e(async(C=o)=>{if(!l)return;w!==void 0&&(clearTimeout(w),w=void 0);let _=++h;try{let M=gr.parse(await t.diagnose());l&&_===h&&k({diagnosis:M,error:null})}catch(M){if(C>0&&l&&_===h){w=setTimeout(()=>{w=void 0,l&&_===h&&v(C-1)},y);return}l&&_===h&&k({error:We(M)})}},"load");return{snapshot:e(()=>a,"snapshot"),subscribe(C){return D.add(C),()=>{D.delete(C)}},load:v,async run(C=!1){if(!l||a.busy)return;++h,w!==void 0&&(clearTimeout(w),w=void 0);let _=C?[...f]:[...a.diagnosis.items],M={rebuiltSessionIds:[],skippedSessionIds:[],failures:[]};f=[],k({busy:!0,result:null,error:null,refreshError:null,progress:{done:0,total:_.length}});for(let[B,F]of _.entries()){if(!l)return;try{let H=vr.parse(await t.rebuild({items:[F]}));if(!l)return;M.rebuiltSessionIds.push(...H.rebuiltSessionIds),M.skippedSessionIds.push(...H.skippedSessionIds),M.failures.push(...H.failures),H.failures.length&&f.push(F)}catch(H){if(!l)return;M.failures.push({sessionId:F.sessionId,message:We(H)}),f.push(F)}k({progress:{done:B+1,total:_.length}})}k({result:M});try{await t.refresh()}catch(B){k({refreshError:We(B)})}l&&(await v(),k({busy:!1,progress:null}))},dismiss(){l&&k({result:null,error:null,refreshError:null})},dispose(){l=!1,++h,w!==void 0&&(clearTimeout(w),w=void 0),D.clear()}}}e(Ds,"createCacheRebuildController");var Wt=class extends Error{static{e(this,"ArchiveNavigationError")}code;constructor(s){super(s),this.name="ArchiveNavigationError",this.code=s}};function Ms(t,s){return t instanceof Wt?s(`archives.${t.code}`):We(t)}e(Ms,"formatArchiveNavigationError");function ci(t,s){if(typeof t?.retainInfo!="function")return;let o=t.retainInfo(s),y=o&&typeof o=="object"&&"getSnapshot"in o&&typeof o.getSnapshot=="function"?o.getSnapshot():o;if(!y||typeof y!="object"||!("retainedBy"in y))return;let a=y.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}e(ci,"retainInfoSnapshot");function di(t){let s=t?.byId;if(s!==void 0){for(let o of Object.values(s))if(o&&(o.retainedBy?.mainView??0)>0)return o.id}}e(di,"mainViewSessionId");function jt(t){return di(t)}e(jt,"currentSessionId");function ui(t,s,o){return s===void 0||s===""?!1:(t?.byId?.[s]?.retainedBy?.mainView??0)>0||(ci(o,s)?.retainedBy?.mainView??0)>0}e(ui,"sessionIsCurrent");async function Os(t,s,o,y=()=>!0){if(o){if(typeof t.prepare=="function"&&await t.prepare(s),!y())return;await t.restore(s)}y()&&await t.open(s)}e(Os,"openArchivedConversation");function zs(t,s,o,{onOpened:y=e(()=>{},"onOpened"),beginNavigation:a,warn:l=e((...h)=>console.warn(...h),"warn")}={}){let h,f=t?.clearArchivedCurrent,w=t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent"),D=e(C=>ui(s.list.getSnapshot(),C,s),"viewing"),k=e(function(...C){return h!==void 0&&D(h)&&o.list.getSnapshot().archivedSessionIds.includes(h)?!1:(h=void 0,f?.apply(this,C))},"wrapped"),v=e(()=>t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value===k,"ownsWrapper");if(t&&typeof f=="function")try{if(t.clearArchivedCurrent=k,!v())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(C){l("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",C)}return{open(C){h=C;try{if(typeof f=="function"&&!v()&&o.list.getSnapshot().archivedSessionIds.includes(C))throw l("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new Wt("navigationUnavailable");if(a?.(),typeof t?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new Wt("navigationUnavailable");if(t.openSession(C),!D(C))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof f=="function"}),new Wt("sessionNotRetained");y()}catch(_){throw h=void 0,_}},dispose(){h=void 0,!(!t||Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value!==k)&&(w?Object.defineProperty(t,"clearArchivedCurrent",w):delete t.clearArchivedCurrent,f?.call(t))}}}e(zs,"allowArchivedNavigation");var Kt=require("@deepseek-ai/dsh-client-ui-primitives");var Ps={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"},Ls={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 Cn(t){return t.toLowerCase().startsWith("zh")?Ps:Ls}e(Cn,"pluginUpdateCopy");function hi(t,s,o,y){let a=Cn(t),l=s?.restartDesktop===!0||s?.profileName==="desktop",h=l?{...a,manualHint:a.manualHintDesktop}:a,f=o!=="idle",w=h.checking,D="";return o==="checking"?w=h.checking:o==="updating"?w=h.updating:y.type==="error"?(w=y.message||h.failed,D="error"):y.type==="restart"?(w=l?h.restartDesktop:h.restart,D="success"):y.type==="restarting"?(w=h.restarting,D="success"):s===void 0?w=h.checking:s.latestCheckFailed?(w=h.failed,D="error"):!s.canAutoUpdate&&s.updateAvailable?(w=h.unavailable,D="update"):s.updateAvailable?(w=`${h.found}: v${s.latestVersion??h.unknown}`,D="update"):(w=h.latest,D="success"),{copy:h,busy:f,message:w,kind:D,loading:o==="updating",updateLabel:o==="updating"?h.updating:h.auto,disabled:f||s?.canAutoUpdate!==!0||s.updateAvailable!==!0,currentVersion:s===void 0?h.unknown:`v${s.currentVersion}`,latestVersion:s?.latestVersion===void 0?h.unknown:`v${s.latestVersion}`,profileName:s?.profileName??h.unknown,profileRaw:s?.profileName??"",latestRaw:s?.latestVersion??"latest"}}e(hi,"describePluginUpdate");function Fs(t,s,o){let y="idle",a=s,l={type:"status"},h=0,f=new Set,w=e(()=>{for(let k of f)k()},"emit"),D=e(k=>{a=k,o?.(k)},"assign");return{get posts(){return h},subscribe(k){return f.add(k),()=>{f.delete(k)}},view(k){return hi(k,a,y,l)},async check(){if(y==="idle"){y="checking",l={type:"status"},w();try{D(await t("GET")),l={type:"status"}}catch(k){l={type:"error",message:k instanceof Error?k.message:""}}finally{y="idle",w()}}},async update(){if(y==="idle"){y="updating",l={type:"status"},h+=1,w();try{let k=await t("POST");D(k),l={type:k.autoReload===!0?"restarting":"restart"}}catch(k){l={type:"error",message:k instanceof Error?k.message:""}}finally{y="idle",w()}}}}}e(Fs,"createUpdateFlow");function Bs(t,s,o){return`dsh plugin${t.trim()===""?"":` --profile ${t.trim()}`} add ${s}@${o} --registry=https://registry.npmjs.org/`}e(Bs,"manualPluginUpdateCommand");function Us(t,s){return t.key!=="Escape"?!1:(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),s(),!0)}e(Us,"handlePluginUpdateEscape");function pi(){let t=globalThis.document;if(typeof t>"u"||t===null)return;let s=t.baseURI;if(!(typeof s!="string"||s===""))try{let o=new URL(s),y=o.pathname.lastIndexOf("/"),a=o.pathname.slice(y+1);return/\.(html?|php|aspx?|jsp)$/i.test(a)?o.pathname=o.pathname.slice(0,y+1):o.pathname.endsWith("/")||(o.pathname+="/"),o.href}catch{return}}e(pi,"pageBaseHref");function En(t){if(typeof t!="string"||t.charAt(0)!=="/"||t.charAt(1)==="/")return t;let s=pi();if(s===void 0)return t;try{return new URL(t.slice(1),s).href}catch{return t}}e(En,"resolveApiUrl");function Hs(t){let o=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(o===void 0)throw new Error("createRoot unavailable");return o(t)}e(Hs,"mountRoot");var mi="x-michengai-plugin-update",Ws="michengai-plugin-update-ui",yr=`
|
|
11
11
|
.mpi-version{margin-left:8px;color:var(--dsw-alias-label-tertiary,#a0a0a0);font-family:inherit;font-size:12px;font-weight:500;line-height:18px;letter-spacing:0;white-space:nowrap;vertical-align:baseline}.mpi-check-host{display:inline-flex;align-items:center}.mpi-icon{display:inline-flex;flex:0 0 auto;width:16px;height:16px;align-items:center;justify-content:center;pointer-events:none}.mpi-icon svg{display:block;width:16px;height:16px}
|
|
12
12
|
.mpi-intro{margin:0 0 16px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:13px;line-height:20px}.mpi-meta{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 18px;margin:0 0 16px;font-size:12px;line-height:18px}.mpi-meta dt{color:var(--dsw-alias-label-secondary,#b9b9b9)}.mpi-meta dd{margin:0}.mpi-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.mpi-latest{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}.mpi-status{font-size:13px;font-weight:600;line-height:18px}.mpi-status[data-kind=error]{color:var(--dsw-alias-state-error-primary,#ef7272)}.mpi-status[data-kind=success]{color:var(--dsw-alias-state-success-primary,#51b976)}.mpi-status[data-kind=update]{color:#e8b15a !important}.mpi-manual{border-top:1px solid var(--dsw-alias-border-l2,#494949);padding-top:16px}.mpi-manual h3{margin:0 0 6px;font-size:14px;line-height:20px}.mpi-manual p{margin:0 0 10px;color:var(--dsw-alias-label-secondary,#b9b9b9);font-size:12px;line-height:18px}.mpi-command{display:flex;align-items:flex-start;gap:8px;border:1px solid var(--dsw-alias-border-l2,#494949);border-radius:7px;padding:10px;background:var(--dsw-alias-bg-layer-3,var(--dsw-specific-menu-item-hover,#353638))}.mpi-command code{min-width:0;flex:1;overflow:visible;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:560px){.mpi-meta{grid-template-columns:1fr;gap:2px}.mpi-meta dd{margin-bottom:6px}}
|
|
13
13
|
.dssm-update-progress{height:4px;border-radius:2px;background:var(--dsw-alias-border-l1,#3a3a3a);overflow:hidden;margin:12px 0;position:relative}.dssm-update-progress-bar{height:100%;width:40%;background:var(--dsw-alias-button-primary-fill,#4176e6);border-radius:2px;animation:dssm-progress-slide 1.4s ease-in-out infinite}@keyframes dssm-progress-slide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}@media (prefers-reduced-motion:reduce){.dssm-update-progress-bar{animation:none;width:100%;opacity:.6}}
|
|
14
|
-
`;function
|
|
14
|
+
`;function fi(){let t=document.getElementById(Ws);if(t!==null){t.textContent!==yr&&(t.textContent=yr);return}let s=document.createElement("style");s.id=Ws,s.textContent=yr,(document.head??document.documentElement).append(s)}e(fi,"ensureStyle");function gi(t){if(t===null||typeof t!="object")return!1;let s=t;return typeof s.packageName=="string"&&typeof s.currentVersion=="string"&&typeof s.updateAvailable=="boolean"&&typeof s.profileName=="string"&&typeof s.canAutoUpdate=="boolean"&&typeof s.latestCheckFailed=="boolean"&&(s.latestVersion===void 0||typeof s.latestVersion=="string")}e(gi,"validPayload");async function qs(t,s,o){let y=o===void 0?{}:{signal:o},a=await fetch(t,s==="GET"?{cache:"no-store",...y}:{method:"POST",headers:{"content-type":"application/json",[mi]:"1"},body:"{}",...y}),l=await a.json();if(!a.ok||!gi(l))throw new Error(l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:Cn(document.documentElement.lang).failed);return l}e(qs,"requestStatus");function vi(t){let s=L.useRef(null);return L.useLayoutEffect(()=>{s.current?.replaceChildren(t.node)},[t.node]),L.createElement("span",{ref:s,className:"mpi-icon","aria-hidden":!0})}e(vi,"HostIcon");function yi(t){let s=L.useRef(null),[,o]=L.useState(0),[y,a]=L.useState("idle");L.useEffect(()=>t.flow.subscribe(()=>o(k=>k+1)),[t.flow]),L.useEffect(()=>{let k=document.documentElement,v=new MutationObserver(()=>o(C=>C+1));return v.observe(k,{attributes:!0,attributeFilter:["lang"]}),()=>v.disconnect()},[]),L.useEffect(()=>{t.flow.check()},[t.flow]),L.useEffect(()=>{function k(v){Us(v,t.onClose)}return e(k,"onKey"),document.addEventListener("keydown",k,!0),()=>document.removeEventListener("keydown",k,!0)},[t.onClose]);let l=document.documentElement.lang,h=t.flow.view(l),f=l.toLowerCase().startsWith("zh")?t.zhName:l.toLowerCase().startsWith("ru")?t.ruName:t.enName,w=Bs(h.profileRaw,t.packageName,h.latestRaw),D=y==="copied"?h.copy.copied:y==="failed"?h.copy.copyFailed:h.copy.copy;return L.createElement(Kt.Modal,{open:!0,className:"mpi-dialog",title:`${f} ${h.copy.update}`,closeLabel:"Close",onClose:t.onClose,footer:[L.createElement(Kt.Button,{key:"check",variant:"outline",disabled:h.busy,onClick:e(()=>{t.flow.check()},"onClick")},h.copy.recheck),L.createElement(Kt.Button,{key:"update",variant:"primary",disabled:h.disabled,onClick:e(()=>{t.flow.update()},"onClick")},h.updateLabel)]},L.createElement("div",{ref:s},L.createElement("p",{className:"mpi-intro"},h.copy.intro),L.createElement("dl",{className:"mpi-meta"},L.createElement("dt",null,h.copy.current),L.createElement("dd",null,L.createElement("span",{className:"mpi-mono"},h.currentVersion)),L.createElement("dt",null,h.copy.latestLabel),L.createElement("dd",{className:"mpi-latest"},L.createElement("span",{className:"mpi-mono"},h.latestVersion),L.createElement("span",{className:"mpi-status",role:"status","data-kind":h.kind,...h.kind==="update"?{style:{color:"#e8b15a"}}:{}},h.message)),L.createElement("dt",null,h.copy.profile),L.createElement("dd",null,L.createElement("span",{className:"mpi-mono"},h.profileName))),h.busy?L.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},L.createElement("div",{className:"dssm-update-progress-bar"})):null,L.createElement("section",{className:"mpi-manual"},L.createElement("h3",null,h.copy.manual),L.createElement("p",null,h.copy.manualHint),L.createElement("div",{className:"mpi-command"},L.createElement("code",null,w),L.createElement(Kt.Button,{variant:"outline",size:"sm",disabled:h.busy,onClick:e(()=>{let k=navigator.clipboard?.writeText(w);if(k===void 0){a("failed");return}k.then(()=>{a("copied"),window.setTimeout(()=>a("idle"),1400)}).catch(()=>a("failed"))},"onClick")},D)))))}e(yi,"UpdateDialog");function Vs(t){if(typeof document>"u"||document.body===null)return()=>{};let s=En(t.endpoint);fi();let o=new AbortController,y,a,l,h,f,w,D;function k(){l?.unmount(),l=void 0,a=void 0,h=void 0}e(k,"unmountCheck");function v(){if(l===void 0)return;h===void 0&&(h=t.createIcon("refresh"));let re=h;l.render(L.createElement(Kt.Button,{variant:"outline",size:"sm",onClick:_,icon:L.createElement(vi,{node:re})},L.createElement("span",{"data-mpi-label":""},Cn(document.documentElement.lang).check)))}e(v,"renderCheck");function C(){w?.unmount(),w=void 0,f?.remove(),f=void 0}e(C,"closeDialog");function _(){C();let re=document.createElement("div");re.className="mpi-dialog-root",document.body.append(re),f=re,w=Hs(re),w.render(L.createElement(yi,{flow:Fs(se=>qs(s,se,o.signal),y,se=>{y=se,M()}),packageName:t.packageName,zhName:t.zhName,enName:t.enName,ruName:t.ruName,onClose:C}))}e(_,"openDialog");function M(){let re=document.querySelector(t.titleRowSelector);if(re===null)return;let se=re.querySelector("h1,h2"),ce=re.querySelector(t.linksSelector);if(t.isEnabled&&!t.isEnabled()){if(f!==void 0&&C(),ce!==null){let ue=ce.querySelector(`[data-mpi-check="${t.packageName}"]`);ue!==null&&(k(),ue.remove())}if(se!==null){let ue=se.querySelector(`.mpi-version[data-package="${t.packageName}"]`);ue!==null&&ue.remove()}return}if(se!==null&&y!==void 0){let ue=se.querySelector(`.mpi-version[data-package="${t.packageName}"]`);ue===null&&(ue=document.createElement("span"),ue.className="mpi-version",ue.dataset.package=t.packageName,se.append(ue));let X=`v${y.currentVersion}`;ue.textContent!==X&&(ue.textContent=X)}if(a!==void 0&&!a.isConnected&&k(),ce===null)return;let ae=ce.querySelector(`[data-mpi-check="${t.packageName}"]`);if(ae!==null){let ue=ae.querySelector("[data-mpi-label]");(ue===null||ue.textContent!==Cn(document.documentElement.lang).check)&&v();return}let Le=document.createElement("span");Le.dataset.mpiCheck=t.packageName,Le.className="mpi-check-host",ce.append(Le),a=Le,l=Hs(Le),v()}e(M,"applyControls");let B=new MutationObserver(()=>{D===void 0&&(D=window.requestAnimationFrame(()=>{D=void 0,M()}))});B.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]});let F,H=e(async()=>F||(F=(async()=>{try{return y=await qs(s,"GET",o.signal),M(),y}finally{F=void 0}})(),F),"load"),Pe=e(()=>{M(),(!t.isEnabled||t.isEnabled())&&H().catch(()=>{})},"onToggle");return typeof window<"u"&&window.addEventListener("dsham-update-toggle",Pe),M(),H().catch(()=>{}),()=>{o.abort(),B.disconnect(),C(),k(),typeof window<"u"&&window.removeEventListener("dsham-update-toggle",Pe),D!==void 0&&window.cancelAnimationFrame(D),document.querySelectorAll(`[data-mpi-check="${t.packageName}"],.mpi-version[data-package="${t.packageName}"]`).forEach(re=>re.remove())}}e(Vs,"observePluginUpdate");var In=require("@deepseek-ai/dsh-client-ui-primitives");var at=ps,bi="@michengai/dsh-archive-manager",br="archived-sessions",wi=4,Gs="dsham-sidebar-entry-style",Si=`
|
|
15
15
|
.dsham_mainPanel{box-sizing:border-box;height:100%;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:28px clamp(24px,4vw,48px) 48px}
|
|
16
16
|
.dsham_mainPanel>*{width:100%;max-width:960px}
|
|
17
17
|
.dsham_bundle_row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:0.5px solid var(--dsw-alias-border-l2)}
|
|
18
18
|
.dsham_bundle_label_box{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;text-align:left}
|
|
19
19
|
.dsham_bundle_title{font-size:13px;font-weight:500;line-height:20px;color:var(--dsw-alias-label-primary)}
|
|
20
20
|
.dsham_bundle_desc{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}
|
|
21
|
-
`;function _s(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(Rs)!==null||typeof document.createElement!="function")return;let e=document.createElement("style");e.id=Rs,e.textContent=ei,(document.head??document.documentElement)?.appendChild?.(e)}t(_s,"ensureSidebarEntryStyle");function ti(e){let r=e&&typeof e.size=="number"?e.size:16;return We(nn.IconArchiveOutlineMedium,{size:r})}t(ti,"ArchiveSidebarIcon");function ni(e){_s();let{t:r,enabled:i,onToggle:g,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:c,onlineUpdateDisabled:x,onlineUpdateLocked:y=!1}=e,E=[We("div",{key:"sidebar-entry",className:"dsham_bundle_row"},We("div",{className:"dsham_bundle_label_box"},We("span",{className:"dsham_bundle_title"},r("sidebar.entry.title")),We("span",{className:"dsham_bundle_desc"},r("sidebar.entry.desc"))),We(nn.Switch,{checked:i,onChange:g,label:r("sidebar.entry.toggle"),disabled:a}))];if(typeof c=="function"){let b=y?`${r("update.entry.desc")} (${r("update.entry.locked")})`:r("update.entry.desc");E.push(We("div",{key:"online-update",className:"dsham_bundle_row"},We("div",{className:"dsham_bundle_label_box"},We("span",{className:"dsham_bundle_title"},r("update.entry.title")),We("span",{className:"dsham_bundle_desc"},b)),We(nn.Switch,{checked:l,onChange:c,label:r("update.entry.toggle"),disabled:x||y,title:y?r("update.entry.locked"):void 0})))}return We(Gr,null,E)}t(ni,"ArchiveBundleConfigCard");function ri(e){let[r,i]=Ft(e.getEnabled),[g,a]=Ft(e.getOnlineUpdateEnabled?e.getOnlineUpdateEnabled:()=>!0),[l,c]=Ft(e.getOnlineUpdateLocked?e.getOnlineUpdateLocked:()=>!1),[x,y]=Ft(!1),[E,b]=Ft(!1);Yr(()=>{let R=t(()=>{i(e.getEnabled()),e.getOnlineUpdateEnabled&&a(e.getOnlineUpdateEnabled()),e.getOnlineUpdateLocked&&c(e.getOnlineUpdateLocked())},"syncState");return R(),e.subscribe(R)},[e]);let v=t(R=>{y(!0),i(R),e.setSidebar(R).catch(()=>{i(e.getEnabled())}).finally(()=>{y(!1)})},"onToggleSidebar"),S=e.setOnlineUpdate?R=>{e.getOnlineUpdateLocked?.()||(b(!0),a(R),e.setOnlineUpdate(R).catch(()=>{e.getOnlineUpdateEnabled&&a(e.getOnlineUpdateEnabled())}).finally(()=>{b(!1)}))}:void 0;return We(ni,{t:e.t,enabled:r,disabled:x,onToggle:v,onlineUpdateEnabled:g,onlineUpdateDisabled:E||l,onlineUpdateLocked:l,onToggleOnlineUpdate:S})}t(ri,"ArchiveBundleConfigCardWrapper");function er(e,r){if(_s(),!e.locale)return{isEnabled:t(()=>!1,"isEnabled"),isSupported:t(()=>!1,"isSupported"),setEnabled:t(async()=>!1,"setEnabled"),isOnlineUpdateEnabled:t(()=>!0,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:t(()=>!1,"isOnlineUpdateLocked"),setOnlineUpdate:t(async()=>!1,"setOnlineUpdate"),destroy:t(()=>{},"destroy")};let{callApi:i,renderPanel:g,ns:a}=r,l=!1,c=!1,x=!1,y=null,E=null,b=0,v=!1,S,R=new Set,j=t(()=>{if(!v)for(let U of R)try{U()}catch{}},"notify"),L=t(()=>{if(v||!x||!l||y)return;let U=e.slots.register({name:"main",key:Xn,locale:a,inject:t(()=>{let pe=typeof r.injectProps=="function"?r.injectProps():{};return Object.assign({t:e.locale?.bind?e.locale.bind(a):void 0},pe)},"inject")},pe=>We("div",{className:"dsham_mainPanel"},g(pe)));y=typeof U=="function"?U:()=>{}},"mountMain"),P=t(()=>{if(y){try{y()}catch{}y=null}},"unmountMain"),F=t(()=>{if(v||!c||!l||E)return;let U=e.slots.register({name:"sidebar.panellist",id:Xn,order:Xa,label:t(()=>e.locale.bind(a)("archives.title"),"label"),locale:a},pe=>ti(pe&&typeof pe=="object"&&"size"in pe?pe:void 0));E=typeof U=="function"?U:()=>{}},"mountRow"),Ce=t(()=>{if(E){try{E()}catch{}E=null}},"unmountRow"),K=t(()=>{if(!v)if(l)L(),F();else{if(S?.panelInfo&&typeof S.selectPanel=="function")try{S.panelInfo.getSnapshot().activePanelId===Xn&&S.selectPanel(null)}catch{}Ce(),P()}},"sync"),Y=t(async U=>{if(v)return l;let pe=++b;l=U,K(),j();try{return await i("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),U}catch(qe){throw pe===b&&(l=!U,K(),j()),qe}},"setEnabled"),Z=!0,X=!1,Ee=0,te=t(async U=>{if(v||X)return Z;let pe=++Ee;if(Z=U,j(),typeof r.onOnlineUpdateChange=="function")try{r.onOnlineUpdateChange(U)}catch{}try{if(await i("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),pe===Ee&&typeof r.onOnlineUpdateChange=="function")try{r.onOnlineUpdateChange(U)}catch{}return U}catch(qe){if(pe===Ee&&(Z=!U,j(),typeof r.onOnlineUpdateChange=="function"))try{r.onOnlineUpdateChange(!U)}catch{}throw qe}},"setOnlineUpdate"),$=b;i("/sidebar-entry").then(U=>{!v&&b===$&&U&&typeof U.enabled=="boolean"&&(l=U.enabled,K(),j())}).catch(()=>{});let mt=Ee;i("/online-update").then(U=>{if(!v&&Ee===mt&&U&&typeof U.enabled=="boolean"&&(Z=U.enabled,U.locked===!0&&(X=!0),j(),typeof r.onOnlineUpdateChange=="function"))try{r.onOnlineUpdateChange(Z)}catch{}}).catch(()=>{});let Se=e;return typeof Se.inject=="function"&&Se.inject(["layout"],U=>{!v&&U.layout&&(S=U.layout)}),e.slots.inject("main",()=>{if(!v)return x=!0,L(),()=>{x=!1,P()}}),e.slots.inject("sidebar.panellist",()=>{if(!v)return c=!0,F(),()=>{c=!1,Ce()}}),e.slots.inject("plugins.bundle.config",()=>{if(!v)return e.slots.register({name:"plugins.bundle.config",key:Qa,locale:a},U=>U&&U.view==="summary"?null:We(ri,{t:e.locale.bind(a),getEnabled:t(()=>l,"getEnabled"),setSidebar:Y,getOnlineUpdateEnabled:t(()=>Z,"getOnlineUpdateEnabled"),setOnlineUpdate:te,getOnlineUpdateLocked:t(()=>X,"getOnlineUpdateLocked"),subscribe:t(pe=>(R.add(pe),()=>{R.delete(pe)}),"subscribe")}))}),{isEnabled:t(()=>l,"isEnabled"),isSupported:t(()=>c,"isSupported"),setEnabled:Y,isOnlineUpdateEnabled:t(()=>Z,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:t(()=>X,"isOnlineUpdateLocked"),setOnlineUpdate:te,destroy:t(()=>{v||(v=!0,b++,Ee++,S=void 0,R.clear(),Ce(),P())},"destroy")}}t(er,"setupSidebarEntry");function tr(e){if(typeof e!="string"||e.length===0||e.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u957F\u5EA6\u987B\u4E3A 1\uFF5E1024 \u4E2A\u5B57\u7B26");return e}t(tr,"checkedId");var si={parse(e){let r=ee(e);if(!r||typeof r!="object"||typeof r.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:tr(r.sessionId),favorite:r.favorite}}},ai={parse(e){let r=ee(e);if(!r||!Array.isArray(r.favoriteSessionIds)||r.favoriteSessionIds.length>1e5)throw new TypeError("\u6536\u85CF\u96C6\u5408\u65E0\u6548");return{favoriteSessionIds:[...new Set(r.favoriteSessionIds.map(tr))]}},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(r){return{success:!1,error:r}}}};function Ts(){let e=t((r,i)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${r}`,create:t(()=>i,"create"),schema:i}),"codec");return["favoriteSessions","setSessionFavorite"].map(r=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${r}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:r,invocation:{kind:"direct"},parameters:r==="favoriteSessions"?[]:[{name:"input",wire:"input",source:"json",codec:e("FavoriteInput",si)}],result:e("FavoriteState",ai),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(Ts,"favoriteInvocations");function nr(e,{days:r,now:i=Date.now(),favorites:g=new Set,currentId:a,pending:l=new Map}){if(!e||!Number.isInteger(r)||r<1||r>36500||g.has(e.id)||e.id===a||(e.retainedBy?.mainView??0)>0||e.running||(e.runningSubagentCount??0)>0||e.pendingInteraction!=null||l.has(e.id))return!1;let c=typeof e.updatedAt=="number"?e.updatedAt:Date.parse(e.updatedAt??"");return Number.isFinite(c)&&c<=i-r*864e5}t(nr,"idleArchiveCandidate");async function Sn(e,r,{onProgress:i,refresh:g}={}){let a=[...new Set(e.map(tr))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},c=t(()=>i?.({total:a.length,done:l.succeeded.length+l.skipped.length+l.failures.length,succeeded:l.succeeded.length,skipped:l.skipped.length,failed:l.failures.length}),"report");c();for(let x of a){try{(await r(x)?l.succeeded:l.skipped).push(x)}catch(y){l.failures.push({sessionId:x,message:y instanceof Error?y.message:String(y)}),l.remaining.push(x)}c()}try{await g?.()}catch(x){l.refreshError=x instanceof Error?x.message:String(x)}return l}t(Sn,"runSessionBatch");function js({workspaces:e,sessions:r,archive:i,restore:g,deleteOne:a,getFavorites:l,refresh:c,currentSessionId:x}){return async(y,E,b={})=>{if(!["archive","restore","undo","delete"].includes(y))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return Sn(E,async v=>{let R=e.getSnapshot().archivedSessionIds.includes(v);if(y==="archive"){if(R||!r.getSnapshot().byId[v])return!1;if(b.idleDays!==void 0){let Ce=new Set((await l()).favoriteSessionIds),K=r.getSnapshot();if(!nr(K.byId[v],{days:b.idleDays,favorites:Ce,currentId:x(K),pending:b.getPending?.()??b.pending}))return!1}return await i(v),e.getSnapshot().archivedSessionIds.includes(v)}return R?y==="delete"?(await a(v),!0):!((await g(v))?.archivedSessionIds??e.getSnapshot().archivedSessionIds).includes(v):!1},{onProgress:b.onProgress,refresh:c})}}t(js,"createSessionOrganizer");function ii(e){return!e||e<=0?"0 B":e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}t(ii,"formatBytes");function Ds(e,r){let i=e.createElement;function g(l,c){return i(r??(y=>i("button",{type:"button",disabled:y.disabled,onClick:y.onClick},y.children)),{variant:"outline",size:"sm",...c},l)}t(g,"textButton");function a({title:l,failures:c,separator:x}){let[y,E]=e.useState(!1),b=i("ul",null,c.map(v=>i("li",{key:v.sessionId},v.sessionId,x,v.message)));return i(yn,{title:l,open:y,onToggle:t(()=>E(v=>!v),"onToggle")},b)}return t(a,"FailureDetails"),t(function({t:c,archived:x,busy:y,ready:E,days:b,onDays:v,count:S,onPreview:R,progress:j,result:L,onRetry:P,undoCount:F,onUndo:Ce,onReload:K,orphanCount:Y=0,orphanSizeBytes:Z=0,orphanCleaning:X=!1,onCleanOrphans:Ee,cacheCount:te=0,cacheRepair:$,onRebuildCaches:mt,onRetryCaches:Se,onReloadCaches:U,onDismissCaches:pe}){return i(e.Fragment,null,i("style",null,".dsham_organizer,.dsham_batchFeedback{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}.dsham_organizerControls{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.dsham_organizer label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--dsw-alias-label-primary)}.dsham_number{width:88px;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.dsham_number:hover{border-color:var(--dsw-alias-border-l3)}.dsham_number:focus{outline:none;border-color:var(--dsw-alias-state-business-primary)}.dsham_disclosure{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer}.dsham_foldChevron{transition:transform 150ms ease}.dsham_foldChevron.is-open{transform:rotate(180deg)}.dsham_organizer p,.dsham_batchFeedback p{margin:0;font-size:12px;color:var(--dsw-alias-label-secondary)}.dsham_batchFeedback progress{width:100%}.dsham_batchFeedback details{font-size:12px;overflow-wrap:anywhere}.dsham_archivePreview{max-height:260px;overflow:auto;display:grid;gap:8px;padding:8px 0}.dsham_archivePreview label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere}"),(!x||!E)&&i("div",{className:"dsham_organizer"},i("div",{className:"dsham_organizerControls"},!E&&g(c("organizer.reloadFavorites"),{disabled:y,onClick:K}),!x&&i(e.Fragment,null,i("label",null,c("organizer.idleDays"),i(Jr,{min:1,max:36500,value:b===""?null:Number(b),disabled:y,"aria-label":c("organizer.idleDays"),onChange:t(qe=>v(qe==null?"":String(qe)),"onChange")})),g(c("organizer.preview",{n:S}),{disabled:y||!E||S===0,onClick:R}))),!x&&i("p",null,c("organizer.rules"))),Y>0&&i("div",{className:"dsham_organizer"},i("div",{className:"dsham_organizerControls"},i("strong",null,c("organizer.orphanTitle",{n:Y})),Ee&&g(c(X?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:y||X,onClick:Ee})),i("p",null,c("organizer.orphanDesc",{size:ii(Z)}))),te>0&&i("div",{className:"dsham_organizer"},i("div",{className:"dsham_organizerControls"},i("strong",null,c("organizer.cacheTitle",{n:te})),mt&&g(c($?.busy?"organizer.cacheRebuilding":"organizer.cacheRebuild"),{disabled:y||$?.busy,onClick:mt})),i("p",null,c("organizer.cacheDesc"))),$&&($.result||$.progress||$.error||$.refreshError)&&i("section",{className:"dsham_batchFeedback","aria-label":c("organizer.cacheRebuild")},$.progress&&i("div",{role:"status"},i("progress",{value:$.progress.done,max:Math.max(1,$.progress.total)}),c("organizer.progressCount",$.progress)),$.result&&i("div",{role:"status"},i("p",null,c("organizer.result",{succeeded:$.result.rebuiltSessionIds.length,skipped:$.result.skippedSessionIds.length,failed:$.result.failures.length})),$.result.failures.length>0&&i(a,{title:c("organizer.failureDetails"),failures:$.result.failures,separator:c("common.separator")}),$.result.failures.length>0&&Se&&g(c("organizer.cacheRetry",{n:$.result.failures.length}),{disabled:y||$.busy,onClick:Se})),$.error&&i("p",{role:"alert"},c("organizer.cacheError",{detail:$.error})),$.refreshError&&i("p",{role:"alert"},c("organizer.refreshError",{detail:$.refreshError})),i("div",{className:"dsham_organizerControls"},U&&g(c("organizer.cacheCheck"),{disabled:y||$.busy,onClick:U}),pe&&g(c("organizer.dismiss"),{disabled:y||$.busy,onClick:pe}))),(j||L||F>0)&&i("section",{className:"dsham_batchFeedback","aria-label":c("organizer.feedback")},j&&i("div",{role:"status","aria-live":"polite"},i("progress",{value:j.done,max:Math.max(1,j.total),"aria-label":c("organizer.progress")}),c("organizer.progressCount",{done:j.done,total:j.total})),L&&i("div",{role:"status"},i("strong",null,c(`organizer.${L.kind??"archive"}Result`)),i("p",null,c("organizer.result",{succeeded:L.succeeded.length,skipped:L.skipped.length,failed:L.failures.length})),L.failures.length>0&&i(a,{title:c("organizer.failureDetails"),failures:L.failures,separator:c("common.separator")}),L.refreshError&&i("p",{role:"alert"},c("organizer.refreshError",{detail:L.refreshError})),L.remaining.length>0&&g(c("organizer.retry",{n:L.remaining.length}),{disabled:y,onClick:P})),F>0&&i("div",{className:"dsham_organizerControls"},g(c("organizer.undo",{n:F}),{disabled:y,onClick:Ce}),i("p",null,c("organizer.undoHint")))))},"OrganizerPanel")}t(Ds,"createOrganizerPanel");var Ns={"organizer.cacheTitle":"\u53D1\u73B0 {n} \u4E2A\u4F1A\u8BDD\u7F3A\u5C11\u53EF\u7528\u5217\u8868\u7F13\u5B58","organizer.cacheDesc":"\u68C0\u67E5\u5DE5\u4F5C\u533A\u3001\u672A\u5206\u7EC4\u53CA\u5F52\u6863\u666E\u901A\u4F1A\u8BDD\u7684\u5934\u90E8\u4E0E\u5B98\u65B9\u7F13\u5B58\u3002\u70B9\u51FB\u540E\u9010\u6761\u53EA\u8BFB\u65E5\u5FD7\u5E76\u91CD\u5EFA\u5B98\u65B9\u5217\u8868\u7F13\u5B58\uFF1B\u8DF3\u8FC7\u6D3B\u52A8\u4F1A\u8BDD\uFF0C\u4E0D\u6253\u5F00\u4F1A\u8BDD\u3001\u4E0D\u8C03\u7528\u6A21\u578B\uFF0C\u4E5F\u4E0D\u6539\u53D8\u5F52\u6863\u6216\u5B9A\u65F6\u4EFB\u52A1\u3002\u8D85\u65F6\u8868\u793A\u4FDD\u5B58\u672A\u786E\u8BA4\uFF0C\u53EF\u91CD\u8BD5\u3002","organizer.cacheRebuild":"\u91CD\u5EFA\u5217\u8868\u7F13\u5B58","organizer.cacheRebuilding":"\u91CD\u5EFA\u4E2D\u2026","organizer.cacheRetry":"\u91CD\u8BD5\u5931\u8D25 {n} \u6761","organizer.cacheCheck":"\u5237\u65B0\u5217\u8868\u5E76\u91CD\u65B0\u68C0\u6D4B","organizer.cacheError":"\u7F13\u5B58\u68C0\u6D4B\u5931\u8D25\uFF1A{detail}","organizer.dismiss":"\u5B8C\u6210","organizer.feedback":"\u64CD\u4F5C\u53CD\u9988","organizer.allSessions":"\u5168\u90E8\u4F1A\u8BDD","organizer.favoriteFilter":"\u6536\u85CF\u7B5B\u9009","organizer.archiveResult":"\u5F52\u6863\u7ED3\u679C","organizer.restoreResult":"\u6062\u590D\u7ED3\u679C","organizer.deleteResult":"\u5220\u9664\u7ED3\u679C","organizer.undoResult":"\u64A4\u56DE\u7ED3\u679C","organizer.favorite":"\u6536\u85CF","organizer.unfavorite":"\u53D6\u6D88\u6536\u85CF","organizer.favoritesOnly":"\u53EA\u770B\u6536\u85CF","organizer.reloadFavorites":"\u91CD\u65B0\u52A0\u8F7D\u6536\u85CF","organizer.idleDays":"\u95F2\u7F6E\u5929\u6570","organizer.preview":"\u9884\u89C8\u95F2\u7F6E\u5F52\u6863\uFF08{n}\uFF09","organizer.rules":"\u6309\u6700\u540E\u6D3B\u52A8\u65F6\u95F4\u7B5B\u9009\uFF0C\u9075\u5FAA\u5F53\u524D\u5217\u8868\u7B5B\u9009\u6761\u4EF6\uFF1B\u6392\u9664\u6536\u85CF\u3001\u5F53\u524D\u6253\u5F00\u3001\u6B63\u5728\u6267\u884C\u53CA\u7B49\u5F85\u4EA4\u4E92\u7684\u4F1A\u8BDD\u3002","organizer.progress":"\u6279\u91CF\u64CD\u4F5C\u8FDB\u5EA6","organizer.progressCount":"\u5DF2\u5904\u7406 {done} / {total}","organizer.result":"\u6210\u529F {succeeded} \xB7 \u8DF3\u8FC7 {skipped} \xB7 \u5931\u8D25 {failed}","organizer.failureDetails":"\u67E5\u770B\u5931\u8D25\u8BE6\u60C5","organizer.refreshError":"\u64CD\u4F5C\u7ED3\u679C\u5DF2\u4FDD\u7559\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF1A{detail}","organizer.retry":"\u91CD\u8BD5\u5269\u4F59 {n} \u6761","organizer.undo":"\u64A4\u56DE\u672C\u6B21\u5F52\u6863\uFF08{n}\uFF09","organizer.undoHint":"\u4EC5\u4FDD\u7559\u672C\u6B21\u6253\u5F00\u7BA1\u7406\u9875\u671F\u95F4\u6700\u8FD1\u4E00\u6279\u5F52\u6863\uFF1B\u5173\u95ED\u9875\u9762\u6216\u5237\u65B0\u540E\u6E05\u9664\u3002\u64A4\u56DE\u4E0D\u4F1A\u6062\u590D\u5DF2\u5220\u9664\u7684\u4F1A\u8BDD\u3002","organizer.idleConfirm":"\u8BF7\u68C0\u67E5\u4EE5\u4E0B\u5019\u9009\uFF0C\u53EF\u53D6\u6D88\u52FE\u9009\uFF1B\u6267\u884C\u524D\u518D\u6B21\u6392\u9664\u6536\u85CF\u53CA\u6D3B\u8DC3\u4F1A\u8BDD\u3002","organizer.manualConfirm":"\u4EC5\u5F52\u6863\u4EE5\u4E0B\u52FE\u9009\u4F1A\u8BDD\uFF1B\u53EF\u9010\u6761\u53D6\u6D88\u3002\u5F52\u6863\u540E\u53EF\u64A4\u56DE\u672C\u6279\u64CD\u4F5C\u3002","organizer.orphanTitle":"\u53D1\u73B0 {n} \u4E2A\u65E0\u4E3B\u5B64\u513F\u5B50\u4EE3\u7406","organizer.orphanDesc":"\u6BCD\u4F1A\u8BDD\u5DF2\u88AB\u5916\u90E8\u5220\u9664\uFF0C\u8FD9\u4E9B\u5B50\u4EE3\u7406\u5728\u65E5\u5E38\u804A\u5929\u5217\u8868\u4E2D\u4E0D\u53EF\u89C1\uFF0C\u5171\u5360\u7528\u7EA6 {size} \u78C1\u76D8\u7A7A\u95F4\u3002\u6E05\u7406\u4E0D\u53EF\u64A4\u9500\u3002","organizer.cleanOrphans":"\u6E05\u7406\u5168\u90E8\u5B64\u513F","organizer.cleaning":"\u6E05\u7406\u4E2D\u2026","organizer.orphanCleanSuccess":"\u5DF2\u6210\u529F\u6E05\u7406 {n} \u4E2A\u65E0\u4E3B\u5B50\u4EE3\u7406\u4F1A\u8BDD\u3002"},zs={"organizer.cacheTitle":"Found {n} sessions without usable list caches","organizer.cacheDesc":"Checks headers and official caches for workspace, ungrouped, and archived ordinary sessions. On click, reads logs one at a time and rebuilds official caches. Skips active sessions; never opens sessions, calls models or changes archives or schedules. Timeout means persistence is unconfirmed and can be retried.","organizer.cacheRebuild":"Rebuild list caches","organizer.cacheRebuilding":"Rebuilding\u2026","organizer.cacheRetry":"Retry {n} failed","organizer.cacheCheck":"Refresh lists and check again","organizer.cacheError":"Cache check failed: {detail}","organizer.dismiss":"Done","organizer.feedback":"Operation feedback","organizer.allSessions":"All sessions","organizer.favoriteFilter":"Favorites filter","organizer.archiveResult":"Archive results","organizer.restoreResult":"Restore results","organizer.deleteResult":"Delete results","organizer.undoResult":"Undo results","organizer.favorite":"Favorite","organizer.unfavorite":"Unfavorite","organizer.favoritesOnly":"Favorites only","organizer.reloadFavorites":"Reload favorites","organizer.idleDays":"Idle days","organizer.preview":"Preview idle archives ({n})","organizer.rules":"Uses last activity, the current list filters. Excludes favorites, open, running and waiting sessions.","organizer.progress":"Batch progress","organizer.progressCount":"Processed {done} / {total}","organizer.result":"Succeeded {succeeded} \xB7 Skipped {skipped} \xB7 Failed {failed}","organizer.failureDetails":"Failure details","organizer.refreshError":"Results retained, but refresh failed: {detail}","organizer.retry":"Retry remaining {n}","organizer.undo":"Undo this archive batch ({n})","organizer.undoHint":"Only the latest archive batch while this page is open is retained. Closing or refreshing clears undo. Deleted sessions cannot be restored.","organizer.idleConfirm":"Review and deselect candidates. Favorites and active sessions are checked again before archiving.","organizer.manualConfirm":"Only checked sessions below will be archived. You can undo this batch afterward.","organizer.orphanTitle":"Found {n} orphan subagents","organizer.orphanDesc":"Parent sessions were deleted externally. These subagents are hidden from normal chat lists and occupy ~{size} disk space. Removal cannot be undone.","organizer.cleanOrphans":"Clean up all orphans","organizer.cleaning":"Cleaning up\u2026","organizer.orphanCleanSuccess":"Successfully cleaned up {n} orphan subagent sessions."},Os={"organizer.cacheTitle":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E {n} \u0441\u0435\u0441\u0441\u0438\u0439 \u0431\u0435\u0437 \u043F\u0440\u0438\u0433\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u0435\u0448\u0430 \u0441\u043F\u0438\u0441\u043A\u0430","organizer.cacheDesc":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E\u0442\u0441\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0438 \u0438 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043A\u0435\u0448 \u0441\u0435\u0441\u0441\u0438\u0439 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439, \u0431\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B \u0438 \u0430\u0440\u0445\u0438\u0432\u0430. \u041F\u043E \u043D\u0430\u0436\u0430\u0442\u0438\u044E \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u043F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u0435\u0448\u0430. \u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F; \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F, \u043C\u043E\u0434\u0435\u043B\u0438 \u043D\u0435 \u0432\u044B\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F, \u0430\u0440\u0445\u0438\u0432\u044B \u0438 \u0440\u0430\u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043D\u0435 \u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F. \u0422\u0430\u0439\u043C-\u0430\u0443\u0442 \u043E\u0437\u043D\u0430\u0447\u0430\u0435\u0442 \u043D\u0435\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D\u043D\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435; \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u043E\u0432\u0442\u043E\u0440.","organizer.cacheRebuild":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u0435\u0448 \u0441\u043F\u0438\u0441\u043A\u043E\u0432","organizer.cacheRebuilding":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435\u2026","organizer.cacheRetry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C {n} \u043E\u0448\u0438\u0431\u043E\u043A","organizer.cacheCheck":"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043A\u0438 \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C","organizer.cacheError":"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0435\u0448\u0430: {detail}","organizer.dismiss":"\u0413\u043E\u0442\u043E\u0432\u043E","organizer.feedback":"\u041E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438","organizer.allSessions":"\u0412\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","organizer.favoriteFilter":"\u0424\u0438\u043B\u044C\u0442\u0440 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E","organizer.archiveResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438","organizer.restoreResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F","organizer.deleteResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F","organizer.undoResult":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043E\u0442\u043C\u0435\u043D\u044B","organizer.favorite":"\u0412 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.unfavorite":"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E","organizer.favoritesOnly":"\u0422\u043E\u043B\u044C\u043A\u043E \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.reloadFavorites":"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435","organizer.idleDays":"\u0414\u043D\u0438 \u043F\u0440\u043E\u0441\u0442\u043E\u044F","organizer.preview":"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0430\u0440\u0445\u0438\u0432\u0430 \u043F\u0440\u043E\u0441\u0442\u043E\u044F ({n})","organizer.rules":"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044E\u044E \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C \u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B \u0441\u043F\u0438\u0441\u043A\u0430. \u0418\u0441\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435, \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435, \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0435 \u0438 \u043E\u0436\u0438\u0434\u0430\u044E\u0449\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438.","organizer.progress":"\u0425\u043E\u0434 \u043F\u0430\u043A\u0435\u0442\u043D\u043E\u0439 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438","organizer.progressCount":"\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E {done} / {total}","organizer.result":"\u0423\u0441\u043F\u0435\u0448\u043D\u043E {succeeded} \xB7 \u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E {skipped} \xB7 \u041E\u0448\u0438\u0431\u043E\u043A {failed}","organizer.failureDetails":"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u043E\u0448\u0438\u0431\u043E\u043A","organizer.refreshError":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B, \u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043F\u0438\u0441\u043A\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C: {detail}","organizer.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044F {n}","organizer.undo":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u0442\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044E ({n})","organizer.undoHint":"\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u043F\u0430\u043A\u0435\u0442\u043D\u0430\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F, \u043F\u043E\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430 \u044D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430. \u0417\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u0438\u043B\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0431\u0440\u0430\u0441\u044B\u0432\u0430\u0435\u0442 \u043E\u0442\u043C\u0435\u043D\u0443. \u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.","organizer.idleConfirm":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u0430\u043D\u0434\u0438\u0434\u0430\u0442\u043E\u0432, \u043C\u043E\u0436\u043D\u043E \u0441\u043D\u044F\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443. \u041F\u0435\u0440\u0435\u0434 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0435\u0439 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u044E\u0442\u0441\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E.","organizer.manualConfirm":"\u0411\u0443\u0434\u0443\u0442 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u0441\u0435\u0441\u0441\u0438\u0438. \u042D\u0442\u0443 \u043F\u0430\u043A\u0435\u0442\u043D\u0443\u044E \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E \u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0436\u0435.","organizer.orphanTitle":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E {n} \u043E\u0441\u0438\u0440\u043E\u0442\u0435\u0432\u0448\u0438\u0445 \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432","organizer.orphanDesc":"\u0420\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0431\u044B\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0438\u0437\u0432\u043D\u0435. \u041F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u044B \u0441\u043A\u0440\u044B\u0442\u044B \u0438\u0437 \u043E\u0431\u044B\u0447\u043D\u044B\u0445 \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0447\u0430\u0442\u043E\u0432 \u0438 \u0437\u0430\u043D\u0438\u043C\u0430\u044E\u0442 ~{size} \u0434\u0438\u0441\u043A\u043E\u0432\u043E\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","organizer.cleanOrphans":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435\u0445 \u0441\u0438\u0440\u043E\u0442","organizer.cleaning":"\u041E\u0447\u0438\u0441\u0442\u043A\u0430\u2026","organizer.orphanCleanSuccess":"\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u043E\u0441\u0438\u0440\u043E\u0442\u0435\u0432\u0448\u0438\u0445 \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432."};var Wt=Function("return globalThis.__dshArchiveReactDOM")(),Ms=Function("return globalThis.__dshArchiveReactDOMClient")(),Ps=Wt.createPortal,Ro=Wt.flushSync,_o=Ms?.createRoot,To=Ms?.hydrateRoot,jo=Wt.findDOMNode,Do=Wt.unmountComponentAtNode,No=Wt.unstable_batchedUpdates,zo=Wt.version;function oi(e){var r={exports:{}},i=r.exports;Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});let g=e("@deepseek-ai/dsh-client-store"),a=e("react/jsx-runtime"),l=e("react"),c=e("@deepseek-ai/dsh-client-ui-primitives");function x({open:n,onClose:s,title:o,description:u,footer:m,children:f,className:C,width:N}){let A=l.useRef(null),B=l.useCallback(()=>A.current?.closest(".dsham_settings")??document.body,[]),[T,z]=l.useState(null);l.useEffect(()=>{if(!n){z(null);return}z(B())},[n,B]),l.useEffect(()=>{if(!n)return;let h=t(me=>{me.key==="Escape"&&(me.preventDefault(),me.stopPropagation(),"stopImmediatePropagation"in me&&typeof me.stopImmediatePropagation=="function"&&me.stopImmediatePropagation(),s())},"onKey");return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[n,s]);let H=(0,a.jsxs)("div",{className:"dsham_modalRoot",role:"presentation",children:[(0,a.jsx)("div",{className:"dsham_modalMask",onClick:s}),(0,a.jsxs)("div",{role:"dialog","aria-modal":!0,"aria-label":typeof o=="string"?o:void 0,className:kt("dsham_modalDialog",C),style:{width:N??560},children:[(0,a.jsx)("h2",{children:o}),u!=null&&(0,a.jsx)("p",{children:u}),f!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:f}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:m})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{refObject:A,getContainer:B}),n&&T?Ps(H,T):null]})}t(x,"SettingsModal");function y({refObject:n,getContainer:s}){return(0,a.jsx)("span",{hidden:!0,ref:n,"data-get-container":s})}t(y,"SettingsModalAnchor");function E({variant:n="outline",icon:s,children:o,className:u,disabled:m,title:f,onClick:C,"aria-label":N,"aria-pressed":A,"aria-expanded":B,"aria-haspopup":T}){return(0,a.jsx)(c.Button,{variant:n,size:"sm",className:u,disabled:m,title:f,onClick:C,"aria-label":N,"aria-pressed":A,"aria-expanded":B,"aria-haspopup":T,icon:s,children:o})}t(E,"settingsButton");function b({variant:n="outline",danger:s=!1,disabled:o,onClick:u,children:m}){return(0,a.jsx)(c.Button,{variant:s?"outline":n,className:s?"dsham_btnDanger":void 0,disabled:o,onClick:u,children:m})}t(b,"modalFooterButton");function v(n,s){let o={className:n?"dsham_archiveTabsLocked":void 0,children:s};return n&&(o.inert=""),o}t(v,"tabsShell");let S=Ds(l,c.Button),{HighlightedText:R,useArchiveSearch:j,useArchivePreview:L,DiscoveryFilters:P,SearchStatus:F,PreviewContent:Ce}=ls(l,{Button:c.Button,SegmentedControl:c.SegmentedControl}),K={refresh:["M13.5 5.5V2.5m0 0h-3m3 0-2.1 2.1A5.5 5.5 0 1 0 13.2 12"],download:["M8 2v8m0 0 3-3m-3 3-3-3M3 13v2h10v-2"],copy:["M5 5h8v8H5z","M3 3h8"],close:["m4 4 8 8M12 4 4 12"]};function Y(n){let s=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 16 16"),o.setAttribute("width","16"),o.setAttribute("height","16"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.5"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("aria-hidden","true");for(let u of K[n]){let m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",u),o.append(m)}return s.append(o),s}t(Y,"createPluginUpdateIcon");let Z={parse(n){if(typeof n!="string"||n.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(n)}`);return n}},X={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");let o=s.archivedSessionIds;if(!Array.isArray(o)||o.some(u=>typeof u!="string"))throw new TypeError("archivedSessionIds must be a string array");return s}},Ee={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s)||s.deleted!==!0)throw new TypeError("deleted must be true");return s}},te={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("target must be an object");if(s.scope==="all"||s.scope==="ungrouped"||s.scope==="workspace"&&typeof s.workspaceId=="string"&&s.workspaceId.length>0||s.scope==="sessions"&&Array.isArray(s.sessionIds)&&s.sessionIds.length>0&&s.sessionIds.every(o=>typeof o=="string"&&o.length>0))return s;throw new TypeError("target.scope must be all, ungrouped, workspace with a non-empty workspaceId, or sessions with non-empty sessionIds")}},$={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");for(let o of["requestedSessionIds","deletedSessionIds","skippedSessionIds"])if(!Array.isArray(s[o])||s[o].some(u=>typeof u!="string"))throw new TypeError(`${o} must be a string array`);if(!Array.isArray(s.failures)||s.failures.some(o=>typeof o!="object"||o===null||typeof o.sessionId!="string"||typeof o.message!="string"))throw new TypeError("failures must contain sessionId/message objects");return s}},mt={parse(n){let s=ee(n);if(typeof s!="object"||s===null||Array.isArray(s)||!Array.isArray(s.items))throw new TypeError("result.items must be an array");if(s.items.some(o=>typeof o!="object"||o===null||typeof o.sessionId!="string"||typeof o.createdAt!="number"||!Number.isFinite(o.createdAt)))throw new TypeError("items must contain sessionId/createdAt objects");return s}};function Se(n,s){return{mode:"strict",typeSymbol:n,create:t(()=>s,"create"),schema:s}}t(Se,"strictCodec");let U={package:"@michengai/dsh-archive-manager",descriptors:[...Ts(),...ss(),...ms(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Se("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:Se("@michengai/dsh-archive-manager/types#ArchivedSessionIds",X),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Se("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:Se("@michengai/dsh-archive-manager/types#Deleted",Ee),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteArchivedSessions",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteArchivedSessions",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",codec:Se("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",te)}],result:Se("@michengai/dsh-archive-manager/types#DeletedBatch",$),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/archivedSessionMetadata",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"archivedSessionMetadata",invocation:{kind:"direct"},parameters:[],result:Se("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",mt),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/diagnoseOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"diagnoseOrphanSubagents",invocation:{kind:"direct"},parameters:[],result:Se("@michengai/dsh-archive-manager/types#OrphanSubagentDiagnosis",{parse(n){let s=ee(n);if(!s||typeof s.count!="number"||!Array.isArray(s.items)||typeof s.totalSizeBytes!="number")throw new TypeError("invalid orphan subagent diagnosis");return s}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/cleanOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"cleanOrphanSubagents",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",acceptsUndefined:!0,codec:Se("@michengai/dsh-archive-manager/types#CleanOrphanTarget",{parse(n){if(n==null)return{};let s=ee(n);if(!s)throw new TypeError("target must be an object");if(s.sessionIds!==void 0&&(!Array.isArray(s.sessionIds)||s.sessionIds.some(o=>typeof o!="string")))throw new TypeError("sessionIds must be an array of strings");return s}})}],result:Se("@michengai/dsh-archive-manager/types#CleanOrphanResult",{parse(n){let s=ee(n);if(!s||!Array.isArray(s.cleanedSessionIds)||!Array.isArray(s.skippedSessionIds)||!Array.isArray(s.failures))throw new TypeError("invalid orphan subagent clean result");return s}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]},pe=".dsham_btnDanger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272);border-color:var(--dsw-alias-state-error-primary,#ef7272)}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/DangerButton.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/DangerButton.css",n.textContent=pe,document.head.appendChild(n)}let qe=".dsham_iconAction{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:22px!important;min-width:22px!important;height:22px!important;padding:0!important;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px)!important;background:transparent;color:var(--dsw-alias-label-secondary)}.dsham_iconAction:not(:disabled):hover{color:var(--dsw-alias-link,#4176e6)!important;border-color:var(--dsw-alias-link,#4176e6)!important}.dsham_iconAction.dsham_iconDanger{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction.dsham_iconDanger:not(:disabled):hover{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction svg{width:16px!important;height:16px!important;flex:none!important}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/IconAction.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/IconAction.css",n.textContent=qe,document.head.appendChild(n)}let Ot=".dsham_modalRoot{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.dsham_modalMask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1,rgb(0 0 0 / 45%))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;max-width:calc(100vw - 48px);max-height:min(80vh,720px);padding:22px 24px 20px;overflow:hidden;border:0;border-radius:var(--dsw-radius-panel,28px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px}.dsham_modalDialog>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dsham_modalBody{display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}.dsham_modalFooter{display:flex;flex:none;align-items:center;justify-content:flex-end;gap:8px}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/Modal.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/Modal.css",n.textContent=Ot,document.head.appendChild(n)}let rn=".dsham_sidebarCardRoot{position:fixed;inset:0;z-index:1200;pointer-events:none}.dsham_sidebarCardBackdrop{position:fixed;inset:0;pointer-events:auto;background:transparent}.dsham_sidebarCard{position:fixed;pointer-events:auto;box-sizing:border-box;width:290px;max-height:calc(100vh - 32px);overflow-y:auto;padding:16px 18px 14px;border-radius:var(--dsw-radius-lg,14px);background:var(--dsw-menu-surface-fill);backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));border:none;box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:8px}.dsham_sidebarCardTitle{margin:0;font-size:14px;font-weight:600;line-height:20px;color:var(--dsw-alias-label-primary)}.dsham_sidebarCardDesc{margin:0;font-size:13px;line-height:18px;color:var(--dsw-alias-label-secondary)}.dsham_sidebarCardError{margin-top:2px;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary,#ef7272);white-space:pre-line}.dsham_sidebarCardFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.dsham_sidebarCardBtn{border:none;background:transparent;padding:5px 12px;border-radius:var(--dsw-radius-sm,6px);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:background-color .15s ease,opacity .15s ease}.dsham_sidebarCardBtnCancel{color:var(--dsw-alias-label-primary)}.dsham_sidebarCardBtnCancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dsham_sidebarCardBtnDanger{color:var(--dsw-alias-state-error-primary,#ef7272)}.dsham_sidebarCardBtnDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,#f25a5a26)}.dsham_sidebarCardBtn:disabled{opacity:.4;cursor:default}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/SidebarPopover.css")+"]")===null){let n=document.createElement("style");n.dataset.plugin="@michengai/dsh-archive-manager",n.dataset.pluginCss="dsh-archive-manager/SidebarPopover.css",n.textContent=rn,document.head.appendChild(n)}function Qe(n){let s=new Map;for(let o of Object.values(n)){if(o.origin!=="subagent")continue;let u=new Set,m=o;for(;m?.origin==="subagent"&&m.parentId!==void 0&&!u.has(m.id);){u.add(m.id);let f=s.get(m.parentId);f===void 0?s.set(m.parentId,{count:1,runningCount:o.running?1:0}):(f.count+=1,o.running&&(f.runningCount+=1)),m=n[m.parentId]}}return s}t(Qe,"indexSubagentDescendants");let xn="__flat_session_order__",Mt="dsh.archive-manager.workspace.view.v1",Pt="dsh.workspace.view.v5";function I(n){let s=n??globalThis.localStorage;if(s==null||typeof s.getItem!="function"||typeof s.setItem!="function")return!1;try{if(s.getItem(Mt)!=null)return!1;let o=s.getItem(Pt);return o==null?!1:(s.setItem(Mt,o),!0)}catch{return!1}}t(I,"migrateWorkspaceViewPersist");function se(){return I(),(0,g.defineStore)({init:t(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:Mt,actions:{setGroupBy:t((n,s)=>{n.groupBy=s},"setGroupBy"),setOrderBy:t((n,s)=>{n.orderBy=s},"setOrderBy"),setShowArchived:t((n,s)=>{n.showArchived=s===!0},"setShowArchived"),setGroupExpanded:t((n,s,o)=>{n.groupExpansion[s]=o},"setGroupExpanded"),retainAccountKeys:t((n,s)=>{let o=new Set(s);n.groupExpansion=Object.fromEntries(Object.entries(n.groupExpansion).filter(([u])=>o.has(u))),n.sessionOrderByAccount=Object.fromEntries(Object.entries(n.sessionOrderByAccount).filter(([u])=>o.has(u))),n.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(n.sessionUpdatedAtByAccount).filter(([u])=>o.has(u)))},"retainAccountKeys"),syncSessionOrderAccount:t((n,s,o,u)=>{n.sessionOrderByAccount[s]=o,n.sessionUpdatedAtByAccount[s]=u},"syncSessionOrderAccount"),setSessionOrder:t((n,s,o)=>{n.sessionOrderByAccount[s]=o},"setSessionOrder")}})}t(se,"createWorkspaceViewStore");function ze(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,a.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}t(ze,"GithubMark16");function Lt(){let n=c.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}t(Lt,"FeedbackIcon");function Ut({archiveSessions:n,archiveSession:s,sessionStore:o,workspaceStore:u,unarchiveSession:m,deleteSession:f,unarchiveSessions:C,deleteArchivedSessions:N,archivedSessionMetadata:A,openConversation:B,focusSessionWorkspace:T,viewState:z,close:H,t:h,diagnoseOrphanSubagents:me,cleanOrphanSubagents:Re,diagnoseSessionCaches:ie,rebuildSessionCaches:Xe,refreshCacheLists:ft,searchSessionContent:Dt,searchArchivedContent:J,previewArchivedSession:xe,favoriteSessions:it,setSessionFavorite:$t,organizeBatch:vt,useSessionPendingInteraction:On,useSessionStatus:cn}){let et=(0,l.useSyncExternalStore)(o.subscribe,o.getSnapshot),be=(0,l.useSyncExternalStore)(u.subscribe,u.getSnapshot),[ot,Et]=(0,l.useState)("archived"),ge=ot==="archived",[yt,tt]=(0,l.useState)(null),[Gt,lt]=(0,l.useState)(null),[Ke,bt]=(0,l.useState)(null),It=t((d,k=null)=>{q(null),_e(null),Nt(!1),lt(k),tt(d)},"requestArchive"),dn=t(()=>{W||(tt(null),lt(null),q(null))},"closeArchive"),ct=(0,l.useRef)(!1),[ve,At]=(0,l.useState)(null),Kt=(0,l.useRef)(!1),[W,je]=(0,l.useState)(!1),[nt,q]=(0,l.useState)(null),[Yt,_e]=(0,l.useState)(null),Rt=t(d=>{q(null),_e(null),At(d)},"requestDelete"),[wt,Bt]=(0,l.useState)(z?.query??""),[p,w]=(0,l.useState)(z?.project??"all"),[D,ae]=(0,l.useState)(z?.sortBy??"updated"),[ke,de]=(0,l.useState)({}),[Oe,Ue]=(0,l.useState)(()=>new Set),oe=(0,l.useRef)(new Set),[we,Te]=(0,l.useState)([]),[dt,Ye]=(0,l.useState)([]),[Q,ne]=(0,l.useState)(!1),[O,re]=(0,l.useState)(!1),ye=(0,l.useRef)(!1),[he,Me]=(0,l.useState)(!1),[Pe,Be]=l.useState("content"),[Ze,Ne]=l.useState(""),[Ie,ue]=l.useState(""),[rt,ut]=(0,l.useState)(()=>new Set),[$e,Fe]=(0,l.useState)("30"),[Ge,Nt]=(0,l.useState)(!1),[Je,Mn]=(0,l.useState)(null),[Tr,un]=(0,l.useState)(null),[Pn,hn]=(0,l.useState)([]),St=(0,l.useRef)(!1),Ln=(0,l.useRef)(null),Un=Vs(On??Hs,cn??Ws,typeof cn=="function"),jr=(0,l.useRef)(Un.pending);jr.current=Un.pending;let _t=(0,l.useMemo)(()=>new Set(dt),[dt]),ha=t(async()=>{if(it)try{let d=await it();Ye(d.favoriteSessionIds),ne(!0)}catch(d){ne(!1),q(Ae(d))}},"loadFavorites");(0,l.useEffect)(()=>{let d=!0;return it&&it().then(k=>{d&&(Ye(k.favoriteSessionIds),ne(!0))}).catch(k=>{d&&q(Ae(k))}),()=>{d=!1}},[it]);let pa=t(async d=>{if(!(ye.current||W||!Q)){ye.current=!0,re(!0),q(null);try{let k=await $t({sessionId:d,favorite:!_t.has(d)});Ye(k.favoriteSessionIds)}catch(k){q(Ae(k))}finally{ye.current=!1,re(!1)}}},"toggleFavorite"),pn=t(async(d,k,{idle:V=!1,retry:le=!1}={})=>{if(!(St.current||ye.current||oe.current.size>0||!vt)){St.current=!0,je(!0),q(null),_e(null),un(null),d==="archive"&&!le&&hn([]);try{let _=await vt(d,k,{idleDays:V?Number($e):void 0,getPending:t(()=>jr.current,"getPending"),onProgress:t(ce=>{Mn(ce),d==="archive"&&ce.total>0&&ce.done>=ce.total&&(tt(null),lt(null),Nt(!1))},"onProgress")});return un({..._,kind:d,tab:ot}),Ln.current=_.remaining.length?{kind:d,ids:_.remaining,idle:V}:null,d==="archive"&&hn(ce=>[...new Set([...ce,..._.succeeded])]),(d==="undo"||d==="restore"||d==="delete")&&hn(ce=>ce.filter(He=>!_.succeeded.includes(He)&&!_.skipped.includes(He))),Te(ce=>ce.filter(He=>!_.succeeded.includes(He)&&!_.skipped.includes(He))),d==="delete"&&Ye(ce=>ce.filter(He=>!_.succeeded.includes(He))),_}catch(_){q(Ae(_))}finally{St.current=!1,je(!1),Mn(null)}}},"executeBatch"),[Dr,ma]=(0,l.useState)(null),[Nr,ga]=(0,l.useState)({diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null}),st=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!ie||!Xe||!ft)return;let d=gs({diagnose:ie,rebuild:Xe,refresh:ft});st.current=d;let k=d.subscribe(()=>{ga(d.snapshot())});return d.load(),()=>{k(),d.dispose(),st.current=null}},[ie,Xe,ft]),(0,l.useEffect)(()=>{st.current?.snapshot().busy||st.current?.load()},[be.archivedSessionIds]);let zr=t(async(d=!1)=>{if(!(W||St.current||!st.current||st.current.snapshot().busy)){St.current=!0,je(!0);try{await st.current.run(d)}finally{St.current=!1,ht.current&&je(!1)}}},"runCacheRebuild"),[Or,Mr]=(0,l.useState)(!1),Pr=t(()=>{typeof me=="function"&&me().then(ma).catch(d=>{console.warn("archive-manager: diagnose orphan subagents failed",d)})},"loadOrphans");(0,l.useEffect)(()=>{Pr()},[be.archivedSessionIds]);let fa=t(async()=>{if(!(Or||typeof Re!="function")){Mr(!0),q(null),_e(null);try{let d=await Re({});(d.cleanedSessionIds.length>0||d.skippedSessionIds.length>0)&&Pr(),d.failures.length>0?(_e(null),q(an(d.failures,h))):d.cleanedSessionIds.length>0&&(q(null),_e(h("organizer.orphanCleanSuccess",{n:d.cleanedSessionIds.length})))}catch(d){q(Ae(d))}finally{Mr(!1)}}},"cleanOrphans"),ht=(0,l.useRef)(!0),Bn=(0,l.useRef)(!1);(0,l.useEffect)(()=>(ht.current=!0,()=>{ht.current=!1}),[]);let mn=t(async(d,k=!1)=>{if(W||Bn.current)return;Bn.current=!0,je(!0),q(null);let V=!1;try{await vs({prepare:k?async le=>{await T?.(le)}:void 0,restore:t(async le=>{await m(le),V=!0},"restore"),open:t(async le=>{await B(le),ht.current&&H?.()},"open")},d.id,k,()=>ht.current)}catch(le){if(!ht.current)return;if(V){Et("unarchived");let _=Tt.find(ce=>ce.sessions.some(He=>He.id===d.id));_!==void 0&&w(_.key)}q(fs(le,h))}finally{Bn.current=!1,ht.current&&je(!1)}},"viewConversation");(0,l.useEffect)(()=>{z&&Object.assign(z,{query:wt,project:p,sortBy:D})},[wt,p,D,z]);let gn=(0,l.useMemo)(()=>ge?be.archivedSessionIds:kr(et.byId,be.archivedSessionIds),[ge,et.byId,be.archivedSessionIds]),Tt=(0,l.useMemo)(()=>Cr(et.byId,be.items,gn,h("group.ungrouped")),[et.byId,be,gn,h]),va=t(d=>{W||oe.current.size>0||(at.close(),Et(d),Te([]),tt(null),lt(null),q(null),_e(null),w("all"),Bt(""),d!=="archived"&&D==="archived"&&ae("updated"))},"switchTab"),Lr=t(async(d,k=!1)=>{if(!(ct.current||W||!d?.length)){if(vt){ct.current=!0;try{let V=await pn("archive",d,{idle:k}),le=V?.failures.map(_=>ir(_.sessionId,_.message)).find(_=>_!==void 0);if(le!==void 0&&typeof s=="function"){let _=et.byId[le.sessionId];bt({sessionId:le.sessionId,title:_===void 0?le.sessionId:Le(_,h),kinds:le.kinds.join(", ")}),tt(null),lt(null),q(null);return}V&&(tt(null),lt(null),Nt(!1))}finally{ct.current=!1}return}ct.current=!0,je(!0),q(null),_e(null);try{let V=await n(d);tt(null),lt(null),V.archivedSessionIdsAdded.length>0&&_e(h("archives.archiveSuccess",{n:V.archivedSessionIdsAdded.length})),V.failures&&V.failures.length>0?q(an(V.failures,h)):(Te([]),Et("archived"),w("all"),Bt(""))}catch(V){let le=ar(V);if(le!==void 0&&typeof s=="function"){let _=et.byId[le.sessionId];bt({sessionId:le.sessionId,title:_===void 0?le.sessionId:Le(_,h),kinds:le.kinds.join(", ")}),tt(null),lt(null),q(null)}else{let _=on(V);q(_===void 0?h("archives.archiveBatchFailed",{detail:V instanceof Error?V.message:String(V)}):h("archives.archiveActive",{kinds:_.join(", ")}))}}finally{ct.current=!1,je(!1)}}},"performArchive"),ya=t(()=>Lr(yt,Ge),"confirmArchive"),ba=t(async d=>{q(null),_e(null);try{await rs(d.id),ht.current&&_e(h("details.copied"))}catch(k){ht.current&&q(typeof vn(k)=="string"&&String(vn(k)).startsWith("copy.")?h(String(vn(k))):Ae(k))}},"copyId"),Fn=(0,l.useMemo)(()=>Er(Tt,D,ke,h,ge?be.archivedSessionIds:void 0),[Tt,D,ke,h,ge,be.archivedSessionIds]);(0,l.useEffect)(()=>{if(W)return;let d=!1;return A().then(k=>{d||de(Object.fromEntries(k.items.map(V=>[V.sessionId,V.createdAt])))}).catch(()=>{d||de({})}),()=>{d=!0}},[A,be.archivedSessionIds,W]),(0,l.useEffect)(()=>{p!=="all"&&!Tt.some(d=>d.key===p)&&w("all")},[Tt,p]);let Ur=!Yn(Ze,Ie),Br=Fn.filter(d=>p==="all"||p===d.key).map(d=>({...d,sessions:d.sessions.filter(k=>(!he||_t.has(k.id))&&is(k.updatedAt,Ze,Ie))})).filter(d=>d.sessions.length),Hn=Pe==="content"&&!Ur,Zt=j(Br.flatMap(d=>d.sessions.map(k=>k.id)),wt,Hn,Dt??J),Wn=new Map(Zt.items.map(d=>[d.sessionId,d])),at=L(xe,ge?be.archivedSessionIds:[]),Fr=wt.trim().toLocaleLowerCase(),Jt=Br.map(d=>({...d,sessions:d.sessions.filter(k=>!Fr||Le(k,h).toLocaleLowerCase().includes(Fr)||Wn.has(k.id))})).filter(d=>d.sessions.length),Hr=Q?Jt.flatMap(d=>d.sessions).filter(d=>nr(d,{days:Number($e),favorites:_t,currentId:pt(et),pending:Un.pending})).map(d=>d.id):[],Qt=(0,l.useMemo)(()=>wr(Jt),[Jt]),qn=(0,l.useMemo)(()=>new Set(we),[we]),wa=(0,l.useMemo)(()=>{let d=new Set(be.archivedSessionIds);return Pn.reduce((k,V)=>k+(d.has(V)?1:0),0)},[Pn,be.archivedSessionIds]),Vn=Qt.filter(d=>qn.has(d)).length,Sa=Qt.length>0&&Vn===Qt.length;(0,l.useEffect)(()=>{Te(d=>Sr(d,gn))},[gn]);let xa=t((d,k)=>{Te(V=>Dn(V,[d],k))},"toggleSessionSelection"),ka=t(d=>{Te(k=>Dn(k,Qt,d))},"toggleVisibleSelection"),Ca=t(d=>{W||oe.current.has(d)||(oe.current.add(d),Ue(new Set(oe.current)),q(null),_e(null),m(d).catch(k=>{q(rr(k,h))}).finally(()=>{oe.current.delete(d),Ue(new Set(oe.current))}))},"onUnarchive"),Wr=t(async d=>{if(!W){if(vt){let k=Vt(be.archivedSessionIds,be.items,d),V=await pn("restore",k);return V&&{unarchivedSessionIds:V.succeeded}}je(!0),q(null),_e(null);try{let k=await C(d);return k.unarchivedSessionIds.length>0&&_e(h("archives.restoreSuccess",{n:k.unarchivedSessionIds.length})),k.failures&&k.failures.length>0&&q(an(k.failures,h,rr)),k}catch(k){q(h("archives.restoreBatchFailed",{detail:k instanceof Error?k.message:String(k)}))}finally{je(!1)}}},"onBatchUnarchive"),Ea=t(async()=>{if(we.length===0)return;let d=await Wr({scope:"sessions",sessionIds:we});if(d!==void 0){let k=new Set(d.unarchivedSessionIds);Te(V=>V.filter(le=>!k.has(le)))}},"onSelectedUnarchive"),qr=t(()=>{W||At(null)},"closeDelete");(0,l.useEffect)(()=>{if(ve===null)return;let d=t(k=>{k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),"stopImmediatePropagation"in k&&typeof k.stopImmediatePropagation=="function"&&k.stopImmediatePropagation(),W||At(null))},"onKeyDown");return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[ve,W]);let Ia=t(async()=>{if(W||Kt.current||ve===null)return;if(ve.kind!=="batch"){Kt.current=!0,je(!0),q(null),_e(null);try{await f(ve.session.id),At(null)}catch(k){q(kn(k,h))}finally{Kt.current=!1,je(!1)}return}if(St.current||ye.current||oe.current.size>0)return;let{target:d}=ve;if(d.scope==="sessions"&&Vt(be.archivedSessionIds,be.items,d).length===0){At(null);return}St.current=!0,je(!0),q(null),_e(null),un(null),Mn(null);try{let k=await N(d),V=xr(k,h);V.kind==="error"?q(V.message):_e(V.message);let le=new Set([...k.deletedSessionIds,...k.skippedSessionIds]);hn(ce=>ce.filter(He=>!le.has(He))),Te(ce=>ce.filter(He=>!le.has(He))),Ye(ce=>ce.filter(He=>!le.has(He)));let _=k.failures.map(ce=>ce.sessionId);Ln.current=_.length>0?{kind:"delete",ids:_,idle:!1}:null,un({requested:k.requestedSessionIds,succeeded:k.deletedSessionIds,skipped:k.skippedSessionIds,failures:k.failures,remaining:_,refreshError:"refreshError"in k&&typeof k.refreshError=="string"?k.refreshError:null,kind:"delete",tab:ot}),At(null)}catch(k){q(kn(k,h))}finally{St.current=!1,je(!1)}},"confirmDelete"),xt=ve?.kind==="batch"?ve.target.scope:null,Aa=xt==="ungrouped"?h("archives.deleteUngroupedTitle"):xt==="workspace"?h("archives.deleteProjectTitle",{name:ve?.kind==="batch"?ve.title:""}):h(xt==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),Vr=ve===null?void 0:xt==="ungrouped"?h("archives.deleteUngroupedDesc",{n:ve.kind==="batch"?ve.count:0}):xt==="workspace"?h("archives.deleteProjectDesc",{name:ve?.kind==="batch"?ve.title:"",n:ve.kind==="batch"?ve.count:0}):xt==="sessions"?h("archives.deleteSelectedDesc",{n:ve.kind==="batch"?ve.count:0}):h("deleteSession.desc",{name:Le(ve.kind==="session"?ve.session:{},h)}),Ra=h(xt==="ungrouped"?"archives.deleteUngroupedConfirm":xt==="workspace"?"archives.deleteProjectConfirm":xt==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:Zs+Xs+ea+ta+na}),(0,a.jsxs)("div",{className:"dsham_settingsHeader",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"dsham_settingsTitleRow",children:[(0,a.jsx)("h2",{children:h("archives.title")}),(0,a.jsxs)("div",{className:"dsham_settingsLinks",children:[(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.viewProject"),icon:(0,a.jsx)(ze,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:h("archives.viewProject")}),(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.feedback"),icon:(0,a.jsx)(Lt,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:h("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:h("archives.description")})]}),l.createElement("div",v(W||Oe.size>0,(0,a.jsx)(c.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:ot==="unarchived"?"unarchived":"archived",onChange:t(d=>va(d==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconArchiveOutlineMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.archived")})]}),id:"dsham-tab-archived",panelId:"dsham-archive-panel"},{value:"unarchived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconFolderCloseMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.unarchived")})]}),id:"dsham-tab-unarchived",panelId:"dsham-archive-panel"}]})))]}),(0,a.jsxs)("div",{id:"dsham-archive-panel",role:"region","aria-label":h(ot==="unarchived"?"archives.tab.unarchived":"archives.tab.archived"),children:[(0,a.jsx)("div",{className:"dsham_settingsToolbar",children:(0,a.jsxs)("div",{className:"dsham_settingsSearch",children:[(0,a.jsx)(jn,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:he?"favorites":"all",options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:t(d=>typeof Me=="function"&&Me(d==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),(0,a.jsx)(jn,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:Pe,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}],onChange:t(d=>typeof Be=="function"&&Be(d),"onChange"),"aria-label":h("discovery.scope")}),(0,a.jsx)(c.Input,{id:"dsham-search-input",className:"dsham_searchField",type:"search",icon:(0,a.jsx)(c.IconSearchOutlineMedium,{size:16,"aria-hidden":!0}),autoComplete:"off",spellCheck:!1,maxLength:200,value:wt,onChange:t(d=>Bt(d.target.value),"onChange"),placeholder:h(Hn?"discovery.searchPlaceholder":ge?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(Hn?"discovery.searchPlaceholder":ge?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)(ra,{id:"dsham-sort-filter",t:h,disabled:W,favoritesOnly:he,setFavoritesOnly:Me,favoriteBusy:W||O||!Q,sortBy:!ge&&D==="archived"?"updated":D,setSortBy:ae,options:[...ge?[{value:"archived",label:h("archives.sortArchived")}]:[],{value:"updated",label:h("archives.sortUpdated")},{value:"created",label:h("archives.sortCreated")},{value:"alphabetical",label:h("archives.sortAlphabetical")}]}),(0,a.jsx)(jn,{id:"dsham-project-filter",className:"dsham_projectFilter",value:p,title:p==="all"?h("archives.allProjects"):Fn.find(d=>d.key===p)?.title??p,options:[{value:"all",label:h("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:h("archives.allProjects")},...Fn.map(d=>({value:d.key,label:d.title,title:d.title}))],onChange:w,"aria-label":h("archives.projectFilter")}),l.createElement(P,{t:h,from:Ze,to:Ie,onFrom:Ne,onTo:ue,invalid:Ur,onClear:t(()=>{Ne(""),ue("")},"onClear")})]})}),l.createElement("style",null,cs),l.createElement(F,{state:Zt,t:h}),vt&&(0,a.jsx)(S,{t:h,archived:ge,busy:W||O||Oe.size>0,ready:Q,days:$e,onDays:Fe,count:Hr.length,onPreview:t(()=>{It(Hr),Nt(!0)},"onPreview"),progress:Je,result:Tr?.tab===ot?Tr:null,onRetry:t(()=>{let d=Ln.current;d&&(d.kind==="delete"?Rt({kind:"batch",target:{scope:"sessions",sessionIds:d.ids},count:d.ids.length}):pn(d.kind,d.ids,{idle:d.idle,retry:!0}))},"onRetry"),undoCount:wa,onUndo:t(()=>pn("undo",Pn,{retry:!0}),"onUndo"),onReload:ha,orphanCount:Dr?.count??0,cacheCount:Nr.diagnosis.count,cacheRepair:Nr,onRebuildCaches:t(()=>zr(),"onRebuildCaches"),onRetryCaches:t(()=>zr(!0),"onRetryCaches"),onReloadCaches:t(async()=>{try{await ft?.(),await st.current?.load(),(st.current?.snapshot().diagnosis.count??0)===0&&st.current?.dismiss()}catch(d){ht.current&&q(Ae(d))}},"onReloadCaches"),onDismissCaches:t(()=>st.current?.dismiss(),"onDismissCaches"),orphanSizeBytes:Dr?.totalSizeBytes??0,orphanCleaning:Or,onCleanOrphans:fa}),Tt.length>0&&(0,a.jsx)(vr,{selectedCount:we.length,hiddenCount:we.length-Vn,allVisibleSelected:Sa,selectedVisibleCount:Vn,visibleCount:Qt.length,busy:W,t:h,onToggle:ka,onClear:t(()=>Te([]),"onClear"),onArchive:ge?void 0:()=>It([...we]),onRestore:Ea,onDelete:t(()=>Rt({kind:"batch",target:{scope:"sessions",sessionIds:we},count:we.length}),"onDelete")}),Tt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(ge?"archives.empty":"archives.emptyUnarchived")}):Jt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:Zt.status==="loading"||Zt.status==="error"||Zt.failures.length?null:h("archives.emptyFiltered")}):Jt.map(d=>{let k=ia(d.key),V=Tt.find(_=>_.key===d.key)?.sessions.map(_=>_.id)??[],le=ge?Vt(be.archivedSessionIds,be.items,k).length:V.length;return(0,a.jsxs)("section",{className:"dsham_settingsGroup",children:[(0,a.jsxs)("div",{className:"dsham_settingsGroupHeading",children:[(0,a.jsx)("h3",{className:"dsham_settingsGroupTitle",children:(0,a.jsxs)("button",{type:"button",className:"dsham_groupToggle","aria-expanded":!rt.has(d.key),"aria-controls":"dsham-group-"+encodeURIComponent(d.key),onClick:t(()=>ut(_=>{let ce=new Set(_);return ce.has(d.key)?ce.delete(d.key):ce.add(d.key),ce}),"onClick"),children:[(0,a.jsx)(rt.has(d.key)?c.IconChevronRightOutlineMedium:c.IconChevronDownOutlineMedium,{}),(0,a.jsx)(c.IconFolderOpenOutlineMedium,{}),(0,a.jsx)("span",{children:d.title})]})}),(0,a.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,a.jsx)("span",{className:"dsham_settingsCount",children:h("archives.sessionCount",{n:d.sessions.length})}),(0,a.jsx)(aa,{group:d,busy:W,onArchive:ge?void 0:()=>It(V,d),onRestore:t(()=>Wr(k),"onRestore"),onDelete:t(()=>Rt({kind:"batch",target:k,title:d.title,count:le}),"onDelete"),t:h})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(d.key),hidden:rt.has(d.key)||void 0,children:!rt.has(d.key)&&d.sessions.map(_=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":qn.has(_.id),children:[(0,a.jsx)(yr,{checked:qn.has(_.id),disabled:W,label:h("archives.selectSession",{name:Le(_,h)}),onChange:t(ce=>xa(_.id,ce.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:Le(_,h),"aria-label":h("archives.openSession")+h("common.separator")+Le(_,h),disabled:W||Oe.has(_.id),onClick:t(()=>mn(_),"onClick"),children:Le(_,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[Ys(_.updatedAt,h)]}),Wn.has(_.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:W,title:h(ge?"discovery.preview":"archives.openSession"),onClick:t(()=>ge?at.open(_,wt):mn(_),"onClick")},l.createElement(R,{text:Wn.get(_.id)?.snippet??"",query:wt}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof $t=="function"&&E({variant:"outline",className:"dsham_iconAction"+(_t.has(_.id)?" dsham_favoriteOn":""),title:h(_t.has(_.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":_t.has(_.id),"aria-label":h(_t.has(_.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+Le(_,h),disabled:W||O||!Q,onClick:t(()=>pa(_.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:_t.has(_.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:"M8 1.75l1.934 3.918 4.324.628-3.129 3.05.738 4.306L8 11.618l-3.867 2.034.738-4.306-3.129-3.05 4.324-.628L8 1.75z"})})}),E({variant:"outline",className:"dsham_iconAction",title:h(ge?"archives.restore":"archives.archiveSelected"),"aria-label":h(ge?"archives.restore":"archives.archiveSelected"),disabled:W||Oe.has(_.id),onClick:t(()=>ge?Ca(_.id):Lr([_.id]),"onClick"),icon:(0,a.jsx)(ge?c.IconRefreshOutlineMedium:c.IconArchiveOutlineMedium,{size:16})}),ge&&(0,a.jsx)(sa,{busy:W||Oe.has(_.id),t:h,title:Le(_,h),onCopyId:t(()=>ba(_),"onCopyId"),onPreview:typeof xe=="function"?()=>at.open(_,wt):void 0,onRestoreOpen:t(()=>mn(_,!0),"onRestoreOpen"),onDelete:t(()=>Rt({kind:"session",session:_}),"onDelete")})]})]},_.id))})]},d.key)}),l.createElement(x,{width:900,open:at.target!==null,onClose:at.close,title:at.target?Le(at.target.session,h):h("discovery.preview"),footer:b({variant:"primary",disabled:W,onClick:t(()=>{if(at.target){let d=at.target.session;return at.close(),mn(d)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(Ce,{preview:at,t:h,MarkdownText:c.MarkdownText})}),yt===null&&nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt}),Yt!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:Yt}),(0,a.jsx)(x,{open:yt!==null,onClose:dn,title:h("archives.archiveTitle",{n:yt?.length??0}),description:Gt===null?h("archives.archiveSelectedDesc"):h(Gt.key===ln?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:Gt.title,n:yt?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[b({disabled:W,onClick:dn,children:h("cancel")}),b({variant:"primary",disabled:W||!yt?.length,onClick:ya,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[vt&&(0,a.jsx)("p",{children:h(Ge?"organizer.idleConfirm":"organizer.manualConfirm")}),vt&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(yt??[]).map(d=>(0,a.jsxs)("label",{children:[(0,a.jsx)($n,{checked:!0,disabled:W,label:Le(et.byId[d]??{id:d},h),onChange:t(()=>tt(k=>(k??[]).filter(V=>V!==d)),"onChange")}),Le(et.byId[d]??{id:d},h)]},d))}),Je&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:Je.done,max:Math.max(1,Je.total)}),h("organizer.progressCount",{done:Je.done,total:Je.total})]}),nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt})]})}),(0,a.jsx)(x,{open:Ke!==null,onClose:t(()=>{W||(bt(null),q(null))},"onClose"),title:h("archiveActive.title"),...Ke===null?{}:{description:h("archiveActive.desc",{name:Ke.title,kinds:Ke.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[b({disabled:W,onClick:t(()=>{W||(bt(null),q(null))},"onClick"),children:h("cancel")}),b({danger:!0,disabled:W,onClick:t(async()=>{if(!(ct.current||W||Ke===null||typeof s!="function")){ct.current=!0,je(!0),q(null);try{await s(Ke.sessionId,{stopActivity:!0}),Te(d=>d.filter(k=>Ke===null||k!==Ke.sessionId)),Et("archived"),_e(h("archives.archiveSuccess",{n:1})),bt(null)}catch(d){q(d instanceof Error?d.message:String(d))}finally{ct.current=!1,je(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt})}),(0,a.jsx)(x,{open:ve!==null,onClose:qr,title:Aa,...Vr===void 0?{}:{description:Vr},footer:(0,a.jsxs)(a.Fragment,{children:[b({disabled:W,onClick:qr,children:h("cancel")}),b({danger:!0,disabled:W,onClick:Ia,children:Ra})]}),children:(0,a.jsxs)(a.Fragment,{children:[W&&(0,a.jsxs)("div",{role:"status",children:[ve?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),Je&&(0,a.jsx)("progress",{value:Je.done,max:Math.max(1,Je.total),"aria-label":h("organizer.progress")}),Je&&h("organizer.progressCount",{done:Je.done,total:Je.total})]}),nt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:nt})]})})]})]})}t(Ut,"ArchivedSessionsSection");function sn(n){var s,o,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var m=n.length;for(s=0;s<m;s++)n[s]&&(o=sn(n[s]))&&(u&&(u+=" "),u+=o)}else for(o in n)n[o]&&(u&&(u+=" "),u+=o);return u}t(sn,"r");function kt(...n){for(var s,o,u=0,m="",f=arguments.length;u<f;u++)(s=arguments[u])&&(o=sn(s))&&(m&&(m+=" "),m+=o);return m}t(kt,"clsx");let qt="Ungrouped";function G(n,s=qt){if(n===void 0||n==="")return s;let o=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return o!==void 0&&o!==""?o:n}t(G,"workspaceLabel");function fe(n,s){return s.updatedAt!==n.updatedAt?s.updatedAt-n.updatedAt:n.id<s.id?-1:1}t(fe,"byRecency");function De(n,s,o,u){return n.origin!=="subagent"&&(!o.has(n.id)||u===!0)&&(!n.blank||n.id===s)}t(De,"sessionVisible");function Ct(n){let s=n instanceof Error?n.message:String(n);return s.includes("UNKNOWN_SESSION")||s.includes("no such session")}t(Ct,"isUnknownSessionError");function kn(n,s){if(Ct(n))return s("deleteSession.unknown");let o=n instanceof Error?n.message:String(n);return s("deleteSession.failed",{detail:o})}t(kn,"formatDeleteError");function rr(n,s){if(Ct(n))return s("archives.unarchiveUnknown");let o=n instanceof Error?n.message:String(n);return s("archives.unarchiveFailed",{detail:o})}t(rr,"formatUnarchiveError");function an(n,s,o=sr){return n.map(u=>u.sessionId+s("common.separator")+o(new Error(u.message),s)).join(`
|
|
22
|
-
`)}t(an,"formatBatchFailures");function sr(n,s){if(Ct(n))return s("archives.archiveUnknown");let o=n instanceof Error?n.message:String(n);return s("archives.archiveFailed",{detail:o})}t(sr,"formatArchiveError");function on(n){if(n===null||typeof n!="object")return;let s=ee(n),o=s.rpcError!==null&&typeof s.rpcError=="object"?ee(s.rpcError):void 0,u=s.name==="WorkspaceActiveSessionError"?s.activity:void 0,m=o?.details,f=s.name==="WorkspaceArchiveError"&&o?.code==="workspace/session-active"&&m!==null&&typeof m=="object"?ee(m).activity:void 0,C=Array.isArray(u)?u:Array.isArray(f)?f:void 0;if(C===void 0)return;let N=C.flatMap(A=>{if(A===null||typeof A!="object")return[];let B=ee(A).kind;return typeof B=="string"&&B.length>0?[B]:[]});return N.length>0?N:void 0}t(on,"activeSessionActivity");function ar(n){let s=on(n);if(s===void 0||n===null||typeof n!="object")return;let o=ee(n),u=o.rpcError!==null&&typeof o.rpcError=="object"?ee(o.rpcError).details:void 0,m=u!==null&&typeof u=="object"?ee(u).sessionId:void 0,f=typeof o.sessionId=="string"?o.sessionId:typeof m=="string"?m:void 0;return f===void 0?void 0:{sessionId:f,kinds:s}}t(ar,"activeSessionRefusal");function ir(n,s){let o=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(s);if(o===null)return;let u=o[1].split(", ").filter(m=>m.length>0);return u.length>0?{sessionId:n,kinds:u}:void 0}t(ir,"activeArchiveFromMessage");function Ls(n,s){let o=n instanceof Error?n.message:String(n);return s("archives.forkFailed",{detail:o})}t(Ls,"formatForkError");function Cn(n){return n.blank?"New Session":n.displayTitle}t(Cn,"sessionTitle");function or(n,s,o,u,m,f,C){let N=[...f];return C==="recency"&&N.sort(fe),{key:n,workspaceId:s,cwd:o,createdAt:u,label:m,sessions:N}}t(or,"buildGroup");function Us(n,s){let o=new Map(n.map(f=>[f.id,f])),u=new Set,m=[];for(let f of s){let C=o.get(f);C===void 0||u.has(f)||(m.push(C),u.add(f))}for(let f of[...n].sort(fe))u.has(f.id)||m.push(f);return m}t(Us,"orderedUngrouped");function lr(n,s,o,u,m){let f=[],C=new Set;for(let A of s){let B=[];for(let T of A.sessionIds){let z=n.byId[T];z!==void 0&&(C.add(T),De(z,pt(n),o,m)&&B.push(z))}f.push(or(A.workspaceId,A.workspaceId,A.path,Date.parse(A.createdAt),A.title,B,"account"))}let N=n.ids.map(A=>n.byId[A]).filter(A=>A!==void 0&&!C.has(A.id)&&De(A,pt(n),o,m));return N.length>0&&f.push(or("",void 0,void 0,void 0,qt,u===void 0?N:Us(N,u),u===void 0?"recency":"account")),f}t(lr,"groupByWorkspace");function En(n,s,o){if(!n||o.has(n))return!1;let u=s?.[n];return!(u===void 0||u.origin==="subagent"||u.blank)}t(En,"isWorkspaceTaskCandidate");function cr(n){let s=n?.closest("[data-row-key]")??null;if(s===null)return null;let o=s.getAttribute("data-row-key")??"";if(!o.startsWith("workspace:"))return null;let u=o.slice(10);if(!u)return null;let m=s.querySelector(".title")??s.querySelector("[class*='title']");return{workspaceId:u,title:m?.textContent?.trim()||u}}t(cr,"workspaceMenuTriggerFrom");function In(n,s=!0){let o=(n.textContent??"").toLowerCase();return o.includes("\u5220\u9664\u5DE5\u4F5C\u533A")||o.includes("delete workspace")||o.includes("\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435")?!0:s&&/(?:^|[_\s-])danger(?:$|[_\s-])/i.test(n.className)}t(In,"isWorkspaceDeleteMenuItem");function Bs(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}t(Bs,"visiblePendingKind");function dr(n,s){let o=s.get(n.id),u=o===void 0?n.pendingInteraction:o.kind;return Bs(u)}t(dr,"pendingInteractionForSession");let An=new Map,Rn=new Set,Fs=new Map;function Hs(n){return n(An)}t(Hs,"useEmptySessionPendingInteraction");function Ws(n){return n(Fs)}t(Ws,"useEmptySessionStatus");function ur(n){return n instanceof Map||n==null?{pending:n??An,completed:Rn}:{pending:n.pending??An,completed:n.completed??Rn}}t(ur,"pendingFacts");function qs(n){let s=new Map,o=new Set;if(n instanceof Map)for(let[u,m]of n)m?.pendingInteraction!==void 0&&s.set(u,m.pendingInteraction),m?.completionUnread===!0&&o.add(u);return{pending:s,completed:o}}t(qs,"factsFromSessionStatus");function Vs(n,s,o){let u=n(f=>f),m=s(f=>f);return o?qs(m):{pending:u,completed:Rn}}t(Vs,"useSessionUiFacts");function hr(n,s,o,u){let m=ur(u),f=dr(n,m.pending);return{id:n.id,title:Cn(n),blank:n.blank,running:n.running,runningSubagentCount:s.get(n.id)?.runningCount??0,completed:n.completed===!0||m.completed.has(n.id),updatedAt:n.updatedAt,archived:o.has(n.id),...f===void 0?{}:{pendingInteraction:f}}}t(hr,"sessionNode");function $s(n,s,o,u,m){let f=new Set(o),C=new Set(m.expandedGroups),N=Qe(n.byId),A=pt(n),B=A===void 0?void 0:s.find(z=>z.sessionIds.includes(A))?.workspaceId??"",T=[];for(let z of lr(n,s,f,m.ungroupedOrder,m.showArchived)){let H=C.has(z.key);T.push({key:z.key,workspaceId:z.workspaceId,cwd:z.cwd,createdAt:z.createdAt,label:z.label,sessionCount:z.sessions.length,expanded:H,containsCurrent:z.key===B,sessions:H?z.sessions.map(h=>hr(h,N,f,u)):[]})}return T}t($s,"deriveGroups");function Gs(n,s,o,u){let m=new Set(s),f=Qe(n.byId),C=[];for(let N of n.ids){let A=n.byId[N];A===void 0||!De(A,pt(n),m,u)||C.push(A)}return C.sort(fe),C.map(N=>hr(N,f,m,o))}t(Gs,"deriveFlat");function Ks(n,s,o,u,m,f,C,N,A=qt){let B=o.trim().toLowerCase();if(B==="")return{items:[],hasMore:!1};let T=new Set(u),z=Qe(n.byId),H=new Map;for(let J of s)for(let xe of J.sessionIds)H.has(xe)||H.set(xe,J.title);let h=t(J=>H.get(J.id)??G(J.cwd,A),"labelOf"),me=new Map;for(let J of f.items)me.has(J.sessionId)||me.set(J.sessionId,J);let Re=[];for(let J of n.ids){let xe=n.byId[J];xe===void 0||xe.blank||!De(xe,pt(n),T,N)||(Cn(xe).toLowerCase().includes(B)||h(xe).toLowerCase().includes(B))&&Re.push(xe)}Re.sort(fe);let ie=[],Xe=new Set,ft=t(J=>{Xe.has(J.id)||(Xe.add(J.id),ie.push(J))},"include");for(let J of Re)ft(J);for(let J of f.items){let xe=n.byId[J.sessionId];xe!==void 0&&!xe.blank&&De(xe,pt(n),T,N)&&ft(xe)}let Dt=ur(m);return{items:ie.slice(0,C).map(J=>{let xe=me.get(J.id),it=dr(J,Dt.pending);return{id:J.id,title:Cn(J),workspace:h(J),running:J.running,runningSubagentCount:z.get(J.id)?.runningCount??0,archived:T.has(J.id),...it===void 0?{}:{pendingInteraction:it},completed:J.completed===!0||Dt.completed.has(J.id),...xe===void 0?{}:{snippet:xe.snippet}}}),hasMore:f.hasMore||ie.length>C}}t(Ks,"deriveSearchResults");function ci(n,s){let f=Math.max(0,s-n);return f<6e4?{unit:"now",n:0}:f<36e5?{unit:"minutes",n:Math.floor(f/6e4)}:f<864e5?{unit:"hours",n:Math.floor(f/36e5)}:f<30*864e5?{unit:"days",n:Math.floor(f/864e5)}:f<365*864e5?{unit:"months",n:Math.floor(f/(30*864e5))}:{unit:"years",n:Math.floor(f/(365*864e5))}}t(ci,"relativeTime");let pr={listeners:new Set,request(n){for(let s of this.listeners)s(n)},subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}};function Le(n,s){return n.blank?s("session.new"):n.title??n.displayTitle??""}t(Le,"displayTitle");function Ys(n,s){let o=new Date(n),u=`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}`;return s("archives.timestamp",{date:s("date.ymd",{y:o.getFullYear(),m:o.getMonth()+1,d:o.getDate()}),time:u})}t(Ys,"archiveTimeLabel");let Zs=[".dsham_archiveTabsLocked{opacity:.5}",".dsham_archiveTabs{display:grid!important;box-sizing:border-box!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:2px!important;border:0!important;border-radius:var(--dsw-radius-sm,8px)!important;box-shadow:inset 0 0 0 .5px var(--dsw-alias-border-l2)!important;background:var(--dsw-alias-bg-layer-1)!important}",'.dsham_archiveTabs>span[aria-hidden="true"],.dsham_archiveTabs>[class*="indicator"]{inset:2px auto 2px 2px!important;width:calc((100% - 4px)/2)!important;border-radius:6px!important;border:0.5px solid var(--dsw-alias-border-l3,rgba(255,255,255,.12))!important;background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.08))!important;box-shadow:none!important}',".dsham_archiveTabs [role=tab]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:28px!important;padding:0 12px!important;border-radius:6px!important;font-size:13px!important;line-height:20px!important;color:var(--dsw-alias-label-secondary)!important;text-align:center!important;box-sizing:border-box!important;transition:color 150ms ease!important}",".dsham_archiveTabs [role=tab]:hover{color:var(--dsw-alias-label-primary)!important}",'.dsham_archiveTabs [role=tab][aria-selected="true"]{color:var(--dsw-alias-label-primary)!important;font-weight:600!important}',".dsham_tabLabel{display:inline-flex;align-items:center;justify-content:center;gap:6px}",".dsham_tabLabel svg{flex:none;display:block}"].join(""),gt="data-dsham-nav-icon",Js='[role="dialog"] nav button',_n=[`[${gt}] > svg { display: none !important; }`,`[${gt}]::before {`," content: '';"," flex: none;"," width: 16px;"," height: 16px;"," background-color: currentColor;",' -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%202.5H2.5C1.94772%202.5%201.5%202.94772%201.5%203.5V4.5C1.5%205.05228%201.94772%205.5%202.5%205.5H13.5C14.0523%205.5%2014.5%205.05228%2014.5%204.5V3.5C14.5%202.94772%2014.0523%202.5%2013.5%202.5Z%22%2F%3E%3Cpath%20d%3D%22M2.5%205.5V13.5C2.5%2013.7652%202.60536%2014.0196%202.79289%2014.2071C2.98043%2014.3946%203.23478%2014.5%203.5%2014.5H12.5C12.7652%2014.5%2013.0196%2014.3946%2013.2071%2014.2071C13.3946%2014.0196%2013.5%2013.7652%2013.5%2013.5V5.5%22%2F%3E%3Cpath%20d%3D%22M6.5%209.5H9.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;',' mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%202.5H2.5C1.94772%202.5%201.5%202.94772%201.5%203.5V4.5C1.5%205.05228%201.94772%205.5%202.5%205.5H13.5C14.0523%205.5%2014.5%205.05228%2014.5%204.5V3.5C14.5%202.94772%2014.0523%202.5%2013.5%202.5Z%22%2F%3E%3Cpath%20d%3D%22M2.5%205.5V13.5C2.5%2013.7652%202.60536%2014.0196%202.79289%2014.2071C2.98043%2014.3946%203.23478%2014.5%203.5%2014.5H12.5C12.7652%2014.5%2013.0196%2014.3946%2013.2071%2014.2071C13.3946%2014.0196%2013.5%2013.7652%2013.5%2013.5V5.5%22%2F%3E%3Cpath%20d%3D%22M6.5%209.5H9.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;'," -webkit-mask-repeat: no-repeat;"," mask-repeat: no-repeat;"," -webkit-mask-position: center;"," mask-position: center;"," -webkit-mask-size: 16px 16px;"," mask-size: 16px 16px;","}"].join(`
|
|
23
|
-
`);function Qs(n,s){let o=String(s??"").trim();return o.length>0&&String(n??"").trim()===o}t(Qs,"isOwnSettingsNavRow");function Tn(n,s){for(let o of n){if(o.type==="characterData"){let u=o.target.parentElement;if(u!==null&&u.closest(s)!==null)return!0;continue}for(let u of o.addedNodes){if(u.nodeType!==1)continue;let m=u;if(m.matches(s)||m.querySelector(s)!==null||m.closest(s)!==null)return!0}}return!1}t(Tn,"mutationTouches");function mr(n,s){return Qs(n.textContent,s)?n.getAttribute(gt)===""?!1:(n.setAttribute(gt,""),!0):n.hasAttribute(gt)?(n.removeAttribute(gt),!0):!1}t(mr,"applySettingsNavIcon");function gr(n){return n.hasAttribute(gt)?(n.removeAttribute(gt),!0):!1}t(gr,"restoreSettingsNavIcon");function fr(n){typeof document>"u"||typeof MutationObserver>"u"||n.effect(()=>{let s="dsham-nav-icon-style",o=document.getElementById(s);o===null?(o=document.createElement("style"),o.id=s,o.textContent=_n,(document.head??document.documentElement).append(o)):o.textContent!==_n&&(o.textContent=_n);let u=!1,m=!1,f=t(()=>{if(m=!1,u)return;let A=n.locale.bind(Ve)("archived.badge");for(let B of document.querySelectorAll(Js))mr(B,A)},"sync"),C=t(()=>{m||u||(m=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(f):setTimeout(f,16))},"schedule");f();let N=new MutationObserver(A=>{Tn(A,'[role="dialog"] nav')&&C()});return N.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{u=!0,N.disconnect();for(let A of document.querySelectorAll(`[${gt}]`))gr(A);o?.remove()}},"archive-manager: settings nav icon")}t(fr,"installSettingsNavIcon");let Xs=[".dsham_settings{container-type:inline-size;min-width:0;box-sizing:border-box;width:100%;padding:0 0 32px;color:var(--dsw-alias-label-primary)}",".dsham_settingsHeader{display:flex;flex-direction:column;align-items:stretch;gap:16px;margin-bottom:16px}",".dsham_settings h2{margin:0;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.4px;white-space:nowrap}",".dsham_settingsIntro{margin:12px 0 0;max-width:42em;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:22px}",".dsham_settingsToolbar{display:flex;align-items:center;gap:8px;margin-bottom:16px;width:100%;min-width:0}",".dsham_settingsSearch{display:flex;align-items:center;gap:8px;min-width:0;width:100%;flex-wrap:nowrap}","@container(max-width:520px){.dsham_settingsSearch{flex-wrap:wrap}}",".dsham_settingsSearch .dsham_searchField{flex:1 1 0;min-width:120px;width:auto;box-sizing:border-box}",".dsham_viewSortContainer{flex:0 0 auto;position:relative;box-sizing:border-box}",".dsham_viewSortBtn{height:32px!important;padding:0 8px!important;font-size:13px!important;box-sizing:border-box}",".dsham_viewSortBtn.has-filter{border-color:var(--dsw-alias-state-business-primary)!important;color:var(--dsw-alias-state-business-primary)!important}",".dsham_settingsFilter{display:inline-flex;position:relative}",".dsham_settingsSearch .dsham_projectFilter{flex:0 0 auto;max-width:120px;min-width:0;box-sizing:border-box}",".dsham_settingsSearch .dsham_projectFilter > span{display:inline-block;max-width:100%;box-sizing:border-box}",".dsham_settingsSearch .dsham_projectFilter .dsham_menuSelectBtn{display:inline-flex!important;width:100%;max-width:120px;padding:0 8px;box-sizing:border-box;overflow:hidden}",".dsham_settingsSearch .dsham_projectFilter .dsham_selectLabel{flex:1 1 auto;min-width:0;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}",".dsham_settingsSearch .dsham_dateFilter{flex:0 0 125px;width:125px;min-width:125px;position:relative;box-sizing:border-box}",".dsham_dateRange{width:100%;box-sizing:border-box}",".dsham_dateTrigger{height:32px!important;padding:0 8px!important;gap:5px!important;border:0.5px solid var(--dsw-alias-border-l2)!important;border-radius:var(--dsw-radius-sm,8px)!important;background:var(--dsw-alias-bg-layer-1)!important;box-sizing:border-box}",".dsham_dateTrigger .dsham_dateText{font-size:12px!important;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".dsham_srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;opacity:0;pointer-events:none}",".dsham_menuSelectBtn{display:inline-flex!important;align-items:center;justify-content:space-between;gap:6px;width:auto!important;max-width:100%;min-width:0!important;height:32px!important;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);box-sizing:border-box;font:inherit;font-size:13px;cursor:pointer}",".dsham_selectLabel{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:normal;text-align:left}",".dsham_settingsGroup{margin:0 0 20px}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}",".dsham_settingsGroupTitle{display:flex;align-items:center;gap:8px;min-width:0;margin:0;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}",".dsham_settingsGroupTitle svg{flex:none;color:var(--dsw-alias-label-secondary)}",".dsham_settingsCount{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px}",".dsham_settingsList{display:grid;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill))}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:64px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_settingsRow:last-child{border-bottom:0}",".dsham_settingsContent{min-width:0;flex:1}",".dsham_settingsTitle{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px}",".dsham_settingsActions{display:flex;align-items:center;gap:4px;flex:none}",".dsham_settingsEmpty{padding:28px 8px;color:var(--dsw-alias-label-secondary);text-align:center}",".dsham_settingsError{margin-top:10px;color:var(--dsw-alias-state-error-primary);font-size:12px;white-space:pre-line}","@container(max-width:520px){.dsham_settingsHeader{margin-bottom:16px}.dsham_settingsGroup{margin-bottom:32px}.dsham_settingsRow{padding:10px 12px}.dsham_settingsActions{gap:4px}}"].join(""),ea=".dsham_settingsTitleLink{display:block;max-width:100%;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;font-weight:600;line-height:20px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.dsham_settingsTitleLink:hover:not(:disabled){text-decoration:underline;text-underline-offset:3px}.dsham_settingsTitleLink:disabled{cursor:default;opacity:.6}.dsham_groupToggle{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:4px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsham_groupToggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dsham_settingsRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsRow[data-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsTitleLink:focus-visible,.dsham_groupToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#3b82f6);outline-offset:2px}@container(max-width:400px){.dsham_settingsRow{gap:8px;padding:10px 8px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:11px}}.dsham_settingsGroupMeta{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap}.dsham_settingsStatus{margin-top:10px;color:var(--dsw-alias-label-secondary);font-size:12px}.dsham_checkbox{width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);flex:none}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",ta=".dsham_settingsTitleRow{display:flex;align-items:center;gap:8px 12px;min-width:0;flex-wrap:wrap}.dsham_settingsLinks{display:flex;align-items:center;gap:8px;flex-wrap:wrap}@media(max-width:720px){.dsham_settingsTitleRow{flex-wrap:wrap}}",na=".dsham_settingsSelection{margin:-8px 0 16px;padding:4px 0 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}.dsham_settingsSelectionMain{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;min-height:36px}.dsham_settingsSelectionSummary{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0;max-width:100%}.dsham_settingsSelectionToggle{display:inline-flex;flex:none;white-space:nowrap;align-items:center;gap:12px;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;cursor:pointer}.dsham_settingsSelectionActions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;max-width:100%;margin-left:auto}.dsham_settingsSelectionScope{margin:8px 0 0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow-wrap:anywhere}";function jn({id:n,className:s,value:o,options:u,onChange:m,disabled:f=!1,"aria-label":C,title:N,tabIndex:A,"aria-hidden":B}){let[T,z]=l.useState(!1),H=l.useMemo(()=>u.map(Re=>({id:Re.value,label:Re.label})),[u]),h=u.find(Re=>Re.value===o),me=h?.label??C;return(0,a.jsx)("div",{id:n,tabIndex:A,"aria-hidden":B,className:s===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${s}`,children:(0,a.jsx)(c.Menu,{open:T,onClose:t(()=>z(!1),"onClose"),onSelect:t(Re=>{f||m(Re),z(!1)},"onSelect"),selectedId:o,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":C,"aria-expanded":T,disabled:f,tabIndex:A,"aria-hidden":B,title:N??h?.title??h?.label??C,className:"dsham_menuSelectBtn"+(T?" is-open":""),onClick:t(()=>{f||z(Re=>!Re)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:me}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:T?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:H})})}t(jn,"ArchiveProjectSelect");function ra({id:n,t:s,disabled:o=!1,favoritesOnly:u,setFavoritesOnly:m,favoriteBusy:f=!1,sortBy:C,setSortBy:N,options:A}){let[B,T]=l.useState(!1),z=l.useMemo(()=>{let ie=[];typeof m=="function"&&(ie.push({type:"label",id:"lbl_view_filter",text:s("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),ie.push({id:"filter:all",label:s("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),ie.push({id:"filter:favorites",label:s("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),ie.push({type:"separator",id:"sep_view_filter"})),ie.push({type:"label",id:"lbl_view_sort",text:s("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let Xe of A)ie.push({id:`sort:${Xe.value}`,label:Xe.label});return ie},[s,m,A]),H=t(ie=>{ie.startsWith("filter:")?typeof m=="function"&&!f&&m(ie==="filter:favorites"):ie.startsWith("sort:")&&N(ie.slice(5)),T(!1)},"onSelect"),h=A.find(ie=>ie.value===C),me=u?s("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":s("organizer.allChats")||"\u5168\u90E8\u804A\u5929",Re=`${me} \xB7 ${h?.label??C}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(c.Menu,{open:B,onClose:t(()=>T(!1),"onClose"),onSelect:H,selectedIds:[u?"filter:favorites":"filter:all",`sort:${C}`],align:"end",portal:!0,dense:!0,listClassName:"dsham_viewSortDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":s("archives.viewOptions")||"\u89C6\u56FE\u9009\u9879","aria-expanded":B,disabled:o,title:Re,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(B?" is-open":"")+(u?" has-filter":""),onClick:t(()=>{o||T(ie=>!ie)},"onClick"),children:[(0,a.jsxs)("svg",{viewBox:"0 0 16 16",width:13,height:13,fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none",marginRight:4},children:[(0,a.jsx)("line",{x1:2.5,y1:4.5,x2:13.5,y2:4.5}),(0,a.jsx)("circle",{cx:5,cy:4.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"}),(0,a.jsx)("line",{x1:2.5,y1:11.5,x2:13.5,y2:11.5}),(0,a.jsx)("circle",{cx:11,cy:11.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"})]}),(0,a.jsx)("span",{className:"dsham_selectLabel",children:me}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:11,height:11,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:3,transition:"transform 150ms ease",transform:B?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:z})]})}t(ra,"ArchiveViewSortMenu");function vr({selectedCount:n,hiddenCount:s,allVisibleSelected:o,selectedVisibleCount:u,visibleCount:m,busy:f,t:C,onToggle:N,onClear:A,onRestore:B,onDelete:T,onArchive:z}){let H=n>0;return(0,a.jsxs)("div",{className:"dsham_settingsSelection",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionMain",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionSummary",children:[(0,a.jsxs)("label",{className:"dsham_settingsSelectionToggle",title:C("archives.selectAllFiltered"),children:[(0,a.jsx)(yr,{checked:o,indeterminate:u>0&&!o,disabled:f||m===0,label:C("archives.selectAllFiltered"),onChange:t(h=>N(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:H?C("archives.selectedCount",{n}):C("archives.selectAllFiltered")})]}),H&&E({disabled:f,"aria-label":C("archives.clearSelection"),onClick:A,children:C("archives.clearSelectionShort")})]}),H&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:z?[E({disabled:f,onClick:z,children:C("archives.archiveSelected")})]:[E({disabled:f,"aria-label":C("archives.restoreSelected"),onClick:B,children:C("archives.restore")}),E({disabled:f,className:"dsham_btnDanger","aria-label":C("archives.deleteSelected"),onClick:T,children:C("archives.deleteSelectionShort")})]})]}),s>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:C("archives.selectionHiddenHint",{hidden:s})})]})}t(vr,"ArchiveSelectionToolbar");function yr({checked:n,indeterminate:s=!1,disabled:o=!1,label:u,onChange:m}){return(0,a.jsx)($n,{checked:n,indeterminate:s,disabled:o,label:u,onChange:m})}t(yr,"ArchiveSelectionCheckbox");function br(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:[3.5,8,12.5].map(n=>(0,a.jsx)("circle",{cx:n,cy:8,r:1.15,fill:"none",stroke:"currentColor",strokeWidth:1.5},n))})}t(br,"moreIcon");function sa({busy:n,title:s,t:o,onPreview:u,onRestoreOpen:m,onDelete:f,onCopyId:C}){let[N,A]=(0,l.useState)(!1),B=t(z=>{if(!n){if(A(!1),z==="copyId")return C?.();if(z==="preview")return u?.();if(z==="restoreOpen")return m?.();z==="delete"&&f?.()}},"choose"),T=[...u?[{id:"preview",label:o("discovery.preview"),icon:(0,a.jsx)(c.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"restoreOpen",label:o("archives.restoreOpen"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...C?[{id:"copyId",label:o("details.copyId"),icon:(0,a.jsx)(c.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...f?[{id:"delete",label:o("menu.deleteSession"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(c.Menu,{open:!n&&N,align:"end",portal:!0,dense:!0,items:T,onSelect:B,onClose:t(()=>A(!1),"onClose"),anchor:E({variant:"outline",className:"dsham_iconAction",disabled:n,title:o("archives.moreActions"),"aria-label":o("archives.moreActions")+o("common.separator")+s,"aria-haspopup":"menu","aria-expanded":N&&!n,icon:br(),onClick:t(()=>{n||A(z=>!z)},"onClick")})})}t(sa,"ArchivedSessionMenu");function aa({group:n,busy:s,onArchive:o,onRestore:u,onDelete:m,t:f}){let C=n.key===ln,N=o?[{id:"archive",label:f(C?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(c.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:f(C?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:f(C?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}],[A,B]=(0,l.useState)(!1),T=f(C?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),z=t(H=>{s||(H==="archive"?o?.():H==="restore"?u?.():H==="delete"&&m?.())},"choose");return(0,a.jsx)(c.Menu,{open:!s&&A,align:"end",portal:!0,dense:!0,items:N,onSelect:t(H=>{B(!1),z(H)},"onSelect"),onClose:t(()=>B(!1),"onClose"),anchor:E({variant:"outline",className:"dsham_iconAction",disabled:s,"aria-label":T,"aria-haspopup":"menu","aria-expanded":A&&!s,icon:br(),onClick:t(()=>{s||B(H=>!H)},"onClick")})})}t(aa,"ArchivedGroupActions");let ln="__ungrouped__";function ia(n){return n===ln?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}t(ia,"archivedBatchTargetForGroup");function Vt(n,s,o){let u=[...new Set(n??[])];if(o.scope==="all")return u;if(o.scope==="sessions"){let f=new Set(o.sessionIds??[]);return u.filter(C=>f.has(C))}if(o.scope==="workspace"){let f=new Set(s.find(C=>C.workspaceId===o.workspaceId)?.sessionIds??[]);return u.filter(C=>f.has(C))}let m=new Set(s.flatMap(f=>f.sessionIds));return u.filter(f=>!m.has(f))}t(Vt,"deriveArchivedBatchIds");function wr(n){return[...new Set(n.flatMap(s=>s.sessions.map(o=>o.id)))]}t(wr,"archivedSessionIdsInGroups");function Sr(n,s){let o=new Set(s);return[...new Set(n)].filter(u=>o.has(u))}t(Sr,"pruneArchivedSelection");function Dn(n,s,o){let u=new Set(n);for(let m of s)o?u.add(m):u.delete(m);return[...u]}t(Dn,"toggleArchivedSelection");function xr(n,s){let o=n.deletedSessionIds.length,u=n.skippedSessionIds.length;return n.failures.length>0?{kind:"error",message:s("archives.deletePartial",{deleted:o,skipped:u,failed:n.failures.length,detail:n.failures[0].message})}:u>0&&o>0?{kind:"notice",message:s("archives.deleteSuccessWithSkipped",{deleted:o,skipped:u})}:u>0?{kind:"notice",message:s("archives.deleteSkipped",{n:u})}:{kind:"notice",message:s("archives.deleteSuccess",{n:o})}}t(xr,"archivedDeleteFeedback");function kr(n,s){let o=new Set(s);return Object.values(n).filter(u=>u.origin!=="subagent"&&!u.blank&&!o.has(u.id)).map(u=>u.id)}t(kr,"unarchivedSessionIds");function Cr(n,s,o,u){let m=s.map(N=>({key:N.workspaceId,title:N.title,ids:new Set(N.sessionIds),sessions:[]})),f=[];for(let N of o){let A=n[N];if(A===void 0||A.origin==="subagent")continue;let B=m.find(T=>T.ids?.has(N));(B===void 0?f:B.sessions).push(A)}let C=m.filter(N=>N.sessions.length>0);return f.length>0&&C.push({key:ln,title:u,sessions:f}),C}t(Cr,"deriveArchivedGroups");function Er(n,s,o,u,m=[]){let f=t((T,z)=>String(T).localeCompare(String(z),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),C=new Map;if(Array.isArray(m))for(let T=0;T<m.length;T++)C.set(m[T],T);let N=t(T=>{let z=s==="created"?o[T.id]:T.updatedAt;return typeof z=="number"&&Number.isFinite(z)?z:Number.NEGATIVE_INFINITY},"timestampOf"),A=t((T,z)=>{if(s==="archived"){let H=C.get(T.id)??-1,me=(C.get(z.id)??-1)-H;if(me!==0)return me}if(s!=="alphabetical"){let H=N(z)-N(T);if(Number.isFinite(H)&&H!==0)return H}return f(Le(T,u),Le(z,u))||f(T.id,z.id)},"compareSessions");return n.map(T=>({...T,sessions:[...T.sessions].sort(A)})).sort((T,z)=>{if(s==="archived"){let H=T.sessions[0]?.id,h=z.sessions[0]?.id,me=H!==void 0?C.get(H)??-1:-1,ie=(h!==void 0?C.get(h)??-1:-1)-me;if(ie!==0)return ie}if(s!=="alphabetical"){let H=N(z.sessions[0])-N(T.sessions[0]);if(Number.isFinite(H)&&H!==0)return H}return f(T.title,z.title)||f(T.key,z.key)})}t(Er,"sortArchivedGroups");let Ir={...Ns,...ds,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","sidebar.entry.title":"\u4FA7\u8FB9\u680F\u5165\u53E3","sidebar.entry.desc":"\u5728\u5DE6\u4FA7\u4E3B\u5BFC\u822A\u680F\u663E\u793A\u5F52\u6863\u7BA1\u7406\u5668\u3002\u8BBE\u7F6E\u91CC\u7684\u5165\u53E3\u4E0D\u53D8\u3002","sidebar.entry.toggle":"\u5207\u6362\u4FA7\u8FB9\u680F\u5165\u53E3","update.entry.title":"\u5728\u7EBF\u66F4\u65B0","update.entry.desc":"\u5141\u8BB8\u68C0\u67E5\u5E76\u5728\u7EBF\u5B89\u88C5\u5F52\u6863\u7BA1\u7406\u5668\u7684\u65B0\u7248\u672C\u3002\u5173\u95ED\u540E\u9690\u85CF\u66F4\u65B0\u5165\u53E3\u3002","update.entry.toggle":"\u5207\u6362\u5728\u7EBF\u66F4\u65B0","update.entry.locked":"\u5728\u7EBF\u66F4\u65B0\u5DF2\u88AB\u5BBF\u4E3B\u914D\u7F6E\u9501\u5B9A\u7981\u7528","archives.archiveProject":"\u5F52\u6863\u8BE5\u9879\u76EE\u7684\u5168\u90E8\u804A\u5929","archives.archiveUngrouped":"\u5F52\u6863\u5168\u90E8\u672A\u5206\u7EC4\u804A\u5929","archives.archiveProjectDesc":"\u5C06\u201C{name}\u201D\u4E2D\u5168\u90E8 {n} \u6761\u672A\u5F52\u6863\u4F1A\u8BDD\u5F52\u6863\uFF0C\u4E0D\u53D7\u5F53\u524D\u641C\u7D22\u7B5B\u9009\u5F71\u54CD\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u6062\u590D\u3002","archives.archiveUngroupedDesc":"\u5C06\u5168\u90E8 {n} \u6761\u672A\u5206\u7EC4\u7684\u672A\u5F52\u6863\u4F1A\u8BDD\u5F52\u6863\uFF0C\u4E0D\u53D7\u5F53\u524D\u641C\u7D22\u7B5B\u9009\u5F71\u54CD\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u6062\u590D\u3002","archives.tab.archived":"\u5DF2\u5F52\u6863","archives.tab.unarchived":"\u672A\u5F52\u6863","archives.searchUnarchived":"\u641C\u7D22\u672A\u5F52\u6863\u804A\u5929","archives.emptyUnarchived":"\u6682\u65E0\u672A\u5F52\u6863\u4F1A\u8BDD\u3002","archives.archiveSelected":"\u5F52\u6863","archives.openSession":"\u6253\u5F00","archives.moreActions":"\u66F4\u591A\u64CD\u4F5C","archives.archiveSelectedDesc":"\u5C06\u9009\u4E2D\u7684\u4F1A\u8BDD\u5F52\u6863\uFF0C\u5305\u542B\u5F53\u524D\u7B5B\u9009\u9690\u85CF\u7684\u5DF2\u9009\u9879\u3002\u4E4B\u540E\u53EF\u5728\u201C\u5DF2\u5F52\u6863\u201D\u4E2D\u67E5\u770B\u548C\u6062\u590D\u3002","archives.archiveSuccess":"\u5DF2\u5F52\u6863 {n} \u6761\u4F1A\u8BDD\u3002","archives.archiveBatchFailed":"\u6279\u91CF\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.navigationUnavailable":"\u5F53\u524D\u5BBF\u4E3B\u65E0\u6CD5\u4FDD\u6301\u5F52\u6863\u5BF9\u8BDD\uFF0C\u8BF7\u4F7F\u7528\u201C\u6062\u590D\u5E76\u6253\u5F00\u201D\u3002","archives.sessionNotRetained":"\u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u6216\u6062\u590D\u540E\u518D\u8BD5\u3002","archives.restoreOpen":"\u6062\u590D\u6253\u5F00","archives.selectedCount":"\u5DF2\u9009 {n} \u6761","archives.selectionHiddenHint":"\u542B\u5F53\u524D\u672A\u663E\u793A\u7684 {hidden} \u6761\uFF0C\u4E5F\u5C06\u53C2\u4E0E\u64CD\u4F5C","archives.clearSelectionShort":"\u6E05\u7A7A","archives.restore":"\u6062\u590D","archives.archiveTitle":"\u5F52\u6863 {n} \u4E2A\u804A\u5929\uFF1F","archives.deleteSelectionShort":"\u5220\u9664","archives.clearSelection":"\u6E05\u7A7A\u9009\u62E9","group.ungrouped":"\u672A\u5206\u7EC4","session.new":"\u65B0\u4F1A\u8BDD","section.workspaces":"\u5DE5\u4F5C\u533A","section.sessions":"\u4F1A\u8BDD","viewOptions.label":"\u89C6\u56FE\u9009\u9879","groupBy.label":"\u5206\u7EC4\u65B9\u5F0F","groupBy.workspace":"\u6309\u5DE5\u4F5C\u533A","groupBy.flat":"\u5355\u5217\u8868","orderBy.label":"\u6392\u5E8F\u65B9\u5F0F","orderBy.manual":"\u624B\u52A8\u6392\u5E8F","orderBy.updated":"\u6700\u8FD1\u66F4\u65B0","sessions.expand":"\u5C55\u5F00\u5176\u4F59 {n} \u4E2A\u4F1A\u8BDD","sessions.collapse":"\u6536\u8D77","empty.none":"\u6682\u65E0\u4F1A\u8BDD","workspace.add":"\u6DFB\u52A0\u5DE5\u4F5C\u533A","search.sessions.aria":"\u641C\u7D22\u4F1A\u8BDD","search.placeholder":"\u641C\u7D22\u4F1A\u8BDD\u2026","search.clear":"\u6E05\u9664\u641C\u7D22","search.results.aria":"\u641C\u7D22\u7ED3\u679C","search.pending":"\u6B63\u5728\u641C\u7D22\u4F1A\u8BDD\u5386\u53F2\u2026","search.unavailable":"\u5185\u5BB9\u641C\u7D22\u6682\u4E0D\u53EF\u7528\uFF0C\u4EC5\u663E\u793A\u540D\u79F0\u5339\u914D\u3002","search.noMatches":"\u65E0\u5339\u914D\u4F1A\u8BDD","search.hasMore":"\u4EC5\u663E\u793A\u524D {n} \u6761\u7ED3\u679C\uFF0C\u8BF7\u7F29\u5C0F\u641C\u7D22\u8303\u56F4\u3002","menu.addWorkspace":"\u6DFB\u52A0\u5DE5\u4F5C\u533A\u2026","menu.unarchive":"\u53D6\u6D88\u5F52\u6863","menu.deleteSession":"\u5220\u9664\u4F1A\u8BDD","archived.badge":"\u5F52\u6863\u4F1A\u8BDD","archived.notOpenable":"\u5DF2\u5F52\u6863\uFF0C\u53D6\u6D88\u5F52\u6863\u540E\u53EF\u7EE7\u7EED\u5BF9\u8BDD","archives.title":"\u5F52\u6863\u4F1A\u8BDD","archives.description":"\u7BA1\u7406\u5DF2\u5F52\u6863\u4F1A\u8BDD\uFF0C\u6216\u9009\u62E9\u672A\u5F52\u6863\u4F1A\u8BDD\u8FDB\u884C\u6279\u91CF\u5F52\u6863\u3002","archives.viewProject":"GitHub","archives.feedback":"\u95EE\u9898\u53CD\u9988","archives.empty":"\u6682\u65E0\u5DF2\u5F52\u6863\u4F1A\u8BDD","archives.emptyFiltered":"\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u804A\u5929","archives.searchPlaceholder":"\u641C\u7D22\u5DF2\u5F52\u6863\u804A\u5929","archives.sortBy":"\u6392\u5E8F\u65B9\u5F0F","archives.sortLabel":"\u6392\u5E8F\u65B9\u5F0F","archives.viewOptions":"\u89C6\u56FE\u9009\u9879","archives.sortArchived":"\u6700\u8FD1\u5F52\u6863","archives.sortUpdated":"\u66F4\u65B0\u65F6\u95F4","archives.sortCreated":"\u521B\u5EFA\u65F6\u95F4","archives.sortAlphabetical":"\u6309\u5B57\u6BCD\u987A\u5E8F","archives.projectFilter":"\u6309\u9879\u76EE\u7B5B\u9009","archives.allProjects":"\u6240\u6709\u9879\u76EE","discovery.timeRange":"\u65F6\u95F4\u8303\u56F4","organizer.allChats":"\u5168\u90E8\u804A\u5929","archives.sessionCount":"{n} \u4E2A\u804A\u5929","archives.selectAllFiltered":"\u5168\u9009\u5F53\u524D\u7B5B\u9009\u7ED3\u679C","archives.selectSession":"\u9009\u62E9\u4F1A\u8BDD\u201C{name}\u201D","archives.restoreSelected":"\u6062\u590D\u6240\u9009","archives.deleteSelected":"\u5220\u9664\u6240\u9009","archives.timestamp":"{date}\uFF0C{time}","archives.restoreProject":"\u6062\u590D\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.restoreUngrouped":"\u5168\u90E8\u6062\u590D","archives.deleteProject":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngrouped":"\u5168\u90E8\u5220\u9664","archives.projectActions":"\u9879\u76EE\u201C{name}\u201D\u7684\u5F52\u6863\u64CD\u4F5C","archives.ungroupedActions":"\u672A\u5206\u7EC4\u804A\u5929\u7684\u5F52\u6863\u64CD\u4F5C","archives.restoreSuccess":"\u5DF2\u6062\u590D {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.restoreBatchFailed":"\u6279\u91CF\u6062\u590D\u5931\u8D25\uFF1A{detail}","archives.deleteSelectedTitle":"\u5220\u9664\u6240\u9009\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteSelectedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u6240\u9009\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteSelectedConfirm":"\u5220\u9664\u6240\u9009\u804A\u5929","archives.deleteProjectTitle":"\u5220\u9664\u201C{name}\u201D\u4E2D\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteProjectDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u201C{name}\u201D\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u9879\u76EE\u76EE\u5F55\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteProjectConfirm":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngroupedTitle":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteUngroupedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u672A\u5206\u7EC4\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u9879\u76EE\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteUngroupedConfirm":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5168\u90E8\u804A\u5929","archives.deleteBatchPending":"\u6B63\u5728\u5220\u9664\u5DF2\u5F52\u6863\u804A\u5929\u2026","archives.deleteSuccess":"\u5DF2\u5220\u9664 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.deleteSuccessWithSkipped":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\uFF1B\u53E6\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deleteSkipped":"\u5DF2\u6E05\u7406 {n} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deletePartial":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u804A\u5929\uFF0C\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\uFF1B{failed} \u4E2A\u5220\u9664\u5931\u8D25\uFF1A{detail}","archives.unarchiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u53D6\u6D88\u5F52\u6863\u3002","archives.unarchiveFailed":"\u53D6\u6D88\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F52\u6863\u3002","archives.archiveFailed":"\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveActive":"\u4F1A\u8BDD\u4ECD\u5728\u8FD0\u884C\uFF08{kinds}\uFF09\u3002","archiveActive.title":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.desc":"\u201C{name}\u201D\u4ECD\u6709\u6B63\u5728\u8FDB\u884C\u7684\u5DE5\u4F5C\uFF1A{kinds}\u3002\u5F52\u6863\u524D\u4F1A\u505C\u6B62\u8FD9\u4E9B\u5DE5\u4F5C\u3002","archiveActive.confirm":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.pending":"\u6B63\u5728\u505C\u6B62\u5E76\u5F52\u6863\u2026","archives.forkFailed":"\u5206\u53C9\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","deleteSession.title":"\u5220\u9664\u4F1A\u8BDD","deleteSession.confirmTitle":"\u5220\u9664\u4F1A\u8BDD\uFF1F","deleteSession.desc":"\u5C06\u6C38\u4E45\u5220\u9664\u4F1A\u8BDD\u201C{name}\u201D\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u5168\u90E8\u8BB0\u5F55\uFF08\u5BF9\u8BDD\u5185\u5BB9\u3001\u7EDF\u8BA1\u3001\u7F13\u5B58\uFF09\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","deleteSession.pending":"\u6B63\u5728\u5220\u9664\u4F1A\u8BDD\u2026","deleteSession.unknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\u3002","deleteSession.failed":"\u5220\u9664\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","picker.loading":"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026","conflict.named":"\u5DF2\u5B58\u5728\u540D\u4E3A\u201C{name}\u201D\u7684\u5DE5\u4F5C\u533A\u3002","folderError.title":"\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6\u5939","folderError.retry":"\u91CD\u65B0\u9009\u62E9",rename:"\u91CD\u547D\u540D","rename.workspace.title":"\u91CD\u547D\u540D\u5DE5\u4F5C\u533A","rename.session.title":"\u91CD\u547D\u540D\u4F1A\u8BDD","field.workspaceName":"\u5DE5\u4F5C\u533A\u540D\u79F0","field.sessionName":"\u4F1A\u8BDD\u540D\u79F0","delete.workspace":"\u5220\u9664\u5DE5\u4F5C\u533A","delete.desc":"\u5C06\u628A\u201C{name}\u201D\u4ECE\u5DE5\u4F5C\u533A\u5217\u8868\u4E2D\u79FB\u9664\u3002\u6587\u4EF6\u5939\u4E0E\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\uFF0C\u5176\u4F1A\u8BDD\u5C06\u663E\u793A\u5728\u201C\u672A\u5206\u7EC4\u201D\u4E0B\u3002","delete.pending":"\u6B63\u5728\u5220\u9664\u5DE5\u4F5C\u533A\u2026","menu.fork":"\u5206\u53C9\u4F1A\u8BDD","menu.archiveSession":"\u5F52\u6863\u4F1A\u8BDD","menu.archiveWorkspace":"\u5F52\u6863\u5168\u90E8\u4F1A\u8BDD","archiveWorkspace.title":"\u5F52\u6863 {n} \u4E2A\u4F1A\u8BDD\uFF1F","archiveWorkspace.desc":"\u8FD9\u4F1A\u5C06\u201C{name}\u201D\u4E2D\u7684\u4F1A\u8BDD\u5F52\u6863\u3002\u4E4B\u540E\u53EF\u4EE5\u5728\u201C\u8BBE\u7F6E \u2192 \u5F52\u6863\u4F1A\u8BDD\u201D\u4E2D\u627E\u5230\u5B83\u4EEC\u3002","archiveWorkspace.confirm":"\u5168\u90E8\u5F52\u6863","archiveWorkspace.pending":"\u6B63\u5728\u5F52\u6863\u4F1A\u8BDD\u2026","actions.workspace.aria":"\u5DE5\u4F5C\u533A\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.session.aria":"\u4F1A\u8BDD\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.newSession.aria":"\u5728\u201C{name}\u201D\u4E2D\u65B0\u5EFA\u4F1A\u8BDD","status.running":"\u8FDB\u884C\u4E2D","status.subagentsRunning.one":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.subagentsRunning.other":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.idle":"\u7A7A\u95F2","status.waitingApproval":"\u7B49\u5F85\u5BA1\u6279","status.planReview":"\u8BA1\u5212\u5F85\u5BA1","status.waitingAnswer":"\u7B49\u5F85\u56DE\u7B54","status.completed":"\u5DF2\u5B8C\u6210","hover.created":"\u521B\u5EFA\u4E8E {time}","hover.copied":"\u5DF2\u590D\u5236","date.ymd":"{y}\u5E74{m}\u6708{d}\u65E5","time.now":"\u521A\u521A","time.minutes":"{n}\u5206\u949F","time.hours":"{n}\u5C0F\u65F6","time.days":"{n}\u5929","time.months":"{n}\u4E2A\u6708","time.years":"{n}\u5E74","time.ago":"{t}\u524D"},Ar={...zs,...us,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","sidebar.entry.title":"Sidebar entry","sidebar.entry.desc":"Show Archived Sessions in the left sidebar. The Settings entry stays either way.","sidebar.entry.toggle":"Toggle sidebar entry","update.entry.title":"Online updates","update.entry.desc":"Allow checking and installing new versions online. Hides the update entry when disabled.","update.entry.toggle":"Toggle online updates","update.entry.locked":"Online updates are disabled by the host configuration.","archives.moreActions":"More actions","archives.archiveProject":"Archive all chats in this project","archives.archiveUngrouped":"Archive all ungrouped chats","archives.archiveProjectDesc":"Archive all {n} unarchived sessions in \u201C{name}\u201D, regardless of the current search filter. You can restore them in Archived.","archives.archiveUngroupedDesc":"Archive all {n} ungrouped, unarchived sessions, regardless of the current search filter. You can restore them in Archived.","archives.tab.archived":"Archived","archives.tab.unarchived":"Unarchived","archives.searchUnarchived":"Search unarchived chats","archives.emptyUnarchived":"No unarchived sessions.","archives.archiveSelected":"Archive","archives.openSession":"Open session","archives.archiveSelectedDesc":"Archive the selected sessions, including selections hidden by the current filter. You can view and restore them in Archived.","archives.archiveSuccess":"Archived {n} sessions.","archives.archiveBatchFailed":"Batch archive failed: {detail}","archives.navigationUnavailable":"This host cannot keep the conversation archived while opening it. Use \u201CRestore and open\u201D instead.","archives.sessionNotRetained":"The host did not keep the requested conversation open. Try again, or restore it before opening.","archives.restoreOpen":"Restore and open","archives.selectedCount":"{n} selected","archives.selectionHiddenHint":"Includes {hidden} hidden by the current filter; actions apply to them too.","archives.clearSelectionShort":"Clear","archives.restore":"Restore","archives.archiveTitle":"Archive {n} chats?","archives.deleteSelectionShort":"Delete","archives.clearSelection":"Clear selection","group.ungrouped":"Ungrouped","session.new":"New Session","section.workspaces":"Workspaces","section.sessions":"Sessions","viewOptions.label":"View options","groupBy.label":"Group by","groupBy.workspace":"Workspace","groupBy.flat":"In one list","orderBy.label":"Order by","orderBy.manual":"Manual","orderBy.updated":"Last updated","sessions.expand":"Show {n} more sessions","sessions.collapse":"Show less","empty.none":"No sessions yet","workspace.add":"Add workspace","search.sessions.aria":"Search sessions","search.placeholder":"Search sessions...","search.clear":"Clear search","search.results.aria":"Search results","search.pending":"Searching session history\u2026","search.unavailable":"Content search is temporarily unavailable. Showing name matches.","search.noMatches":"No matching sessions","search.hasMore":"Showing the first {n} results. Narrow your search.","menu.addWorkspace":"Add workspace\u2026","menu.unarchive":"Unarchive","menu.deleteSession":"Delete session","archived.badge":"Archived sessions","archived.notOpenable":"This session is archived. Unarchive it to continue the conversation.","archives.title":"Archived sessions","archives.description":"Manage archived sessions or select unarchived sessions to archive in bulk.","archives.viewProject":"GitHub","archives.feedback":"Issues","archives.empty":"No archived sessions.","archives.emptyFiltered":"No chats match your filters.","archives.searchPlaceholder":"Search archived chats","archives.sortBy":"Sort archived chats","archives.sortLabel":"Sort order","archives.viewOptions":"View options","archives.sortArchived":"Recently archived","archives.sortUpdated":"Last updated","archives.sortCreated":"Created","archives.sortAlphabetical":"Alphabetical","archives.projectFilter":"Filter by project","archives.allProjects":"All projects","discovery.timeRange":"Date range","organizer.allChats":"All chats","archives.sessionCount":"{n} chats","archives.selectAllFiltered":"Select all results","archives.selectSession":"Select chat {name}","archives.restoreSelected":"Restore selected","archives.deleteSelected":"Delete selected","archives.timestamp":"{date}, {time}","archives.restoreProject":"Restore all chats in this project","archives.restoreUngrouped":"Restore all","archives.deleteProject":"Delete all chats in this project","archives.deleteUngrouped":"Delete all","archives.projectActions":"Archive actions for project {name}","archives.ungroupedActions":"Archive actions for ungrouped chats","archives.restoreSuccess":"Restored {n} archived chats.","archives.restoreBatchFailed":"Could not restore the archived chats: {detail}","archives.deleteSelectedTitle":"Delete selected archived chats","archives.deleteSelectedDesc":"This permanently deletes the selected {n} archived chats, their child agents (including any that are still running), and their records. Other chats are not affected. This cannot be undone.","archives.deleteSelectedConfirm":"Delete selected chats","archives.deleteProjectTitle":"Delete archived chats in {name}","archives.deleteProjectDesc":"This permanently deletes the {n} archived chats in {name}, their child agents, and their records. The project directory and unarchived chats are not affected. This cannot be undone.","archives.deleteProjectConfirm":"Delete all project chats","archives.deleteUngroupedTitle":"Delete ungrouped archived chats","archives.deleteUngroupedDesc":"This permanently deletes the {n} ungrouped archived chats, their child agents, and their records. Other projects and unarchived chats are not affected. This cannot be undone.","archives.deleteUngroupedConfirm":"Delete all ungrouped chats","archives.deleteBatchPending":"Deleting archived chats\u2026","archives.deleteSuccess":"Deleted {n} archived chats.","archives.deleteSuccessWithSkipped":"Deleted {deleted} archived chats and cleared {skipped} stale archive entries for sessions that no longer exist.","archives.deleteSkipped":"Cleared {n} stale archive entries for sessions that no longer exist.","archives.deletePartial":"Deleted {deleted} chats and cleared {skipped} stale archive entries; {failed} could not be deleted: {detail}","archives.unarchiveUnknown":"This session no longer exists, so it cannot be unarchived.","archives.unarchiveFailed":"Could not unarchive the session: {detail}","archives.archiveUnknown":"This session no longer exists, so it cannot be archived.","archives.archiveFailed":"Could not archive the session: {detail}","archives.archiveActive":"This conversation is still running ({kinds}).","archiveActive.title":"Stop and archive","archiveActive.desc":"\u201C{name}\u201D still has work in progress: {kinds}. Archiving stops that work first.","archiveActive.confirm":"Stop and archive","archiveActive.pending":"Stopping and archiving\u2026","archives.forkFailed":"Could not fork the session: {detail}","deleteSession.title":"Delete session","deleteSession.confirmTitle":"Delete session?","deleteSession.desc":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","deleteSession.pending":"Deleting session\u2026","deleteSession.unknown":"This session no longer exists or was already deleted.","deleteSession.failed":"Could not delete the session: {detail}","picker.loading":"Loading workspaces\u2026","conflict.named":"A workspace named \u201C{name}\u201D already exists.","folderError.title":"Couldn\u2019t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes \u201C{name}\u201D from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace\u2026","menu.fork":"Fork session","menu.archiveSession":"Archive session","menu.archiveWorkspace":"Archive all conversations","archiveWorkspace.title":"Archive {n} conversations?","archiveWorkspace.desc":"This archives all conversations in \u201C{name}\u201D. You can find them later in Archived sessions.","archiveWorkspace.confirm":"Archive all","archiveWorkspace.pending":"Archiving conversations\u2026","actions.workspace.aria":"Workspace actions for {name}","actions.session.aria":"Session actions for {name}","actions.newSession.aria":"New session in {name}","status.running":"Running","status.subagentsRunning.one":"{n} subagent running","status.subagentsRunning.other":"{n} subagents running","status.idle":"Idle","status.waitingApproval":"Waiting for approval","status.planReview":"Plan awaiting review","status.waitingAnswer":"Waiting for answer","status.completed":"Completed","hover.created":"Created {time}","hover.copied":"Copied","date.ymd":"{y}-{m}-{d}","time.now":"now","time.minutes":"{n}min","time.hours":"{n}h","time.days":"{n}d","time.months":"{n}mo","time.years":"{n}y","time.ago":"{t} ago"},oa={...Os,...hs,"locale.language":"ru","service.unavailable":"\u0421\u0435\u0440\u0432\u0438\u0441 \u0435\u0449\u0451 \u043D\u0435 \u0433\u043E\u0442\u043E\u0432. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","sidebar.entry.title":"\u041F\u0443\u043D\u043A\u0442 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","sidebar.entry.desc":"\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0430\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439 \u043D\u0430 \u043B\u0435\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438. \u041F\u0443\u043D\u043A\u0442 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F.","sidebar.entry.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0443\u043D\u043A\u0442 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","update.entry.title":"\u041E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","update.entry.desc":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443 \u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0443 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0439 \u043E\u043D\u043B\u0430\u0439\u043D. \u0421\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u043F\u0443\u043D\u043A\u0442 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438.","update.entry.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","update.entry.locked":"\u041E\u043D\u043B\u0430\u0439\u043D-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0445\u043E\u0441\u0442\u0430.","archives.moreActions":"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E","archives.archiveProject":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.archiveUngrouped":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.archiveProjectDesc":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 {n} \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432 \xAB{name}\xBB, \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043F\u043E\u0438\u0441\u043A\u0430. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.archiveUngroupedDesc":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439, \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043F\u043E\u0438\u0441\u043A\u0430. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.tab.archived":"\u0410\u0440\u0445\u0438\u0432","archives.tab.unarchived":"\u041D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435","archives.searchUnarchived":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u0447\u0430\u0442\u0430\u043C","archives.emptyUnarchived":"\u041D\u0435\u0442 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.archiveSelected":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archives.openSession":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","archives.archiveSelectedDesc":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0441\u043A\u0440\u044B\u0442\u044B\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archives.archiveSuccess":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0441\u0435\u0441\u0441\u0438\u0439: {n}.","archives.archiveBatchFailed":"\u041F\u0430\u043A\u0435\u0442\u043D\u0430\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C: {detail}","archives.navigationUnavailable":"\u042D\u0442\u043E\u0442 \u0445\u043E\u0441\u0442 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \xAB\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C\xBB.","archives.sessionNotRetained":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0439 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u043C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0438\u043B\u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0435\u0433\u043E \u043F\u0435\u0440\u0435\u0434 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0435\u043C.","archives.restoreOpen":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C","archives.selectedCount":"\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {n}","archives.selectionHiddenHint":"\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 {hidden}, \u0441\u043A\u0440\u044B\u0442\u044B\u0445 \u0442\u0435\u043A\u0443\u0449\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C; \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F \u0438 \u043A \u043D\u0438\u043C.","archives.clearSelectionShort":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C","archives.restore":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C","archives.archiveTitle":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0447\u0430\u0442\u043E\u0432?","archives.deleteSelectionShort":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","archives.clearSelection":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440","group.ungrouped":"\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B","session.new":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F","section.workspaces":"\u0420\u0430\u0431\u043E\u0447\u0438\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","section.sessions":"\u0421\u0435\u0441\u0441\u0438\u0438","viewOptions.label":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430","groupBy.label":"\u0413\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E","groupBy.workspace":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","groupBy.flat":"\u0412 \u043E\u0434\u043D\u043E\u043C \u0441\u043F\u0438\u0441\u043A\u0435","orderBy.label":"\u041F\u043E\u0440\u044F\u0434\u043E\u043A","orderBy.manual":"\u0412\u0440\u0443\u0447\u043D\u0443\u044E","orderBy.updated":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","sessions.expand":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 {n} \u0441\u0435\u0441\u0441\u0438\u0439","sessions.collapse":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435","empty.none":"\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0439","workspace.add":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","search.sessions.aria":"\u041F\u043E\u0438\u0441\u043A \u0441\u0435\u0441\u0441\u0438\u0439","search.placeholder":"\u041F\u043E\u0438\u0441\u043A \u0441\u0435\u0441\u0441\u0438\u0439...","search.clear":"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0438\u0441\u043A","search.results.aria":"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430","search.pending":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0439\u2026","search.unavailable":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u043C.","search.noMatches":"\u041D\u0435\u0442 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439","search.hasMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043F\u0435\u0440\u0432\u044B\u0435 {n} \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432. \u0421\u0443\u0437\u044C\u0442\u0435 \u043F\u043E\u0438\u0441\u043A.","menu.addWorkspace":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E\u2026","menu.unarchive":"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430","menu.deleteSession":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","archived.badge":"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439","archived.notOpenable":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0432 \u0430\u0440\u0445\u0438\u0432\u0435. \u0412\u0435\u0440\u043D\u0438\u0442\u0435 \u0435\u0451 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440.","archives.title":"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439","archives.description":"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C\u0438 \u0441\u0435\u0441\u0441\u0438\u044F\u043C\u0438 \u0438\u043B\u0438 \u0432\u044B\u0431\u043E\u0440 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F \u043F\u0430\u043A\u0435\u0442\u043D\u043E\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438.","archives.viewProject":"GitHub","archives.feedback":"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B","archives.empty":"\u041D\u0435\u0442 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.emptyFiltered":"\u041D\u0438 \u043E\u0434\u0438\u043D \u0447\u0430\u0442 \u043D\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0448\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u043C.","archives.searchPlaceholder":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u0447\u0430\u0442\u0430\u043C","archives.sortBy":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.sortLabel":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430","archives.viewOptions":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0432\u0438\u0434\u0430","archives.sortArchived":"\u041D\u0435\u0434\u0430\u0432\u043D\u043E \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435","archives.sortUpdated":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435","archives.sortCreated":"\u0414\u0430\u0442\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F","archives.sortAlphabetical":"\u041F\u043E \u0430\u043B\u0444\u0430\u0432\u0438\u0442\u0443","archives.projectFilter":"\u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0443","archives.allProjects":"\u0412\u0441\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B","discovery.timeRange":"\u041F\u0435\u0440\u0438\u043E\u0434","organizer.allChats":"\u0412\u0441\u0435 \u0447\u0430\u0442\u044B","archives.sessionCount":"{n} \u0447\u0430\u0442\u043E\u0432","archives.selectAllFiltered":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B","archives.selectSession":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0447\u0430\u0442 {name}","archives.restoreSelected":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.deleteSelected":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.timestamp":"{date}, {time}","archives.restoreProject":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.restoreUngrouped":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435","archives.deleteProject":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngrouped":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435","archives.projectActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0435\u043A\u0442\u0430 {name}","archives.ungroupedActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.restoreSuccess":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.restoreBatchFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B: {detail}","archives.deleteSelectedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteSelectedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteSelectedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteProjectTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u0432 {name}","archives.deleteProjectDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0432 {name}, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteProjectConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngroupedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteUngroupedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteUngroupedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteBatchPending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432\u2026","archives.deleteSuccess":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.deleteSuccessWithSkipped":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deleteSkipped":"\u041E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deletePartial":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430; {failed} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C: {detail}","archives.unarchiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430.","archives.unarchiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430: {detail}","archives.archiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C.","archives.archiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","archives.archiveActive":"\u042D\u0442\u043E\u0442 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F ({kinds}).","archiveActive.title":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.desc":"\u0412 \xAB{name}\xBB \u0435\u0449\u0451 \u0438\u0434\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0430: {kinds}. \u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442 \u0435\u0451.","archiveActive.confirm":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.pending":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0438 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F\u2026","archives.forkFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438: {detail}","deleteSession.title":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","deleteSession.confirmTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E?","deleteSession.desc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0441\u0435\u0441\u0441\u0438\u044E \xAB{name}\xBB, \u0435\u0451 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0432\u0441\u0435 \u0435\u0451 \u0437\u0430\u043F\u0438\u0441\u0438 (\u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0443, \u043A\u044D\u0448). \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","deleteSession.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u2026","deleteSession.unknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0430.","deleteSession.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","picker.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u2026","conflict.named":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u0441 \u0438\u043C\u0435\u043D\u0435\u043C \xAB{name}\xBB \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.","folderError.title":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0443","folderError.retry":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430",rename:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C","rename.workspace.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","rename.session.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","field.workspaceName":"\u0418\u043C\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","field.sessionName":"\u0418\u043C\u044F \u0441\u0435\u0441\u0441\u0438\u0438","delete.workspace":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","delete.desc":"\u042D\u0442\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \xAB{name}\xBB \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432. \u041F\u0430\u043F\u043A\u0430 \u0438 \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0441\u0435\u0441\u0441\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u0443\u0442\u0441\u044F. \u0415\u0433\u043E \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B\xBB.","delete.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430\u2026","menu.fork":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438","menu.archiveSession":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","menu.archiveWorkspace":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","archiveWorkspace.title":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0441\u0435\u0441\u0441\u0438\u0439?","archiveWorkspace.desc":"\u042D\u0442\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432 \xAB{name}\xBB. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archiveWorkspace.confirm":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435","archiveWorkspace.pending":"\u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0439\u2026","actions.workspace.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430 \u0434\u043B\u044F {name}","actions.session.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043B\u044F {name}","actions.newSession.aria":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u0432 {name}","status.running":"\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F","status.subagentsRunning.one":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442","status.subagentsRunning.other":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442","status.idle":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435","status.waitingApproval":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F","status.planReview":"\u041F\u043B\u0430\u043D \u043E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438","status.waitingAnswer":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u0432\u0435\u0442\u0430","status.completed":"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E","hover.created":"\u0421\u043E\u0437\u0434\u0430\u043D\u043E {time}","hover.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","date.ymd":"{y}-{m}-{d}","time.now":"\u0441\u0435\u0439\u0447\u0430\u0441","time.minutes":"{n}\u043C\u0438\u043D","time.hours":"{n}\u0447","time.days":"{n}\u0434","time.months":"{n}\u043C\u0435\u0441","time.years":"{n}\u0433","time.ago":"{t} \u043D\u0430\u0437\u0430\u0434"},Ve="archive-manager-workspace",la=["slots","sessions","workspaces","locale","remote","typert"];function Nn(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}t(Nn,"bindObservable");function Rr(n){return async s=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(s)}}t(Rr,"createUnarchiveSession");async function zn(n,s,o){let u=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=await Sn(s,async C=>{try{await n.archiveSession(C)}catch(N){throw N!==null&&typeof N=="object"&&on(N)!==void 0&&typeof ee(N).sessionId!="string"&&Object.assign(N,{sessionId:C}),N}return!0},{refresh:o}),f=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:f,archivedSessionIdsAdded:f.filter(C=>!u.has(C)),failures:m.failures}}t(zn,"archiveSessionsViaOfficial");async function _r(n,s,o,u){let m=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),f=typeof u=="function"?u:A=>n.unarchiveSession?.(A),C=await Sn(s,async A=>(await f(A),!0),{refresh:o}),N=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:N,unarchivedSessionIds:[...m].filter(A=>!N.includes(A)),failures:C.failures}}t(_r,"unarchiveSessionsViaOfficial");async function ca(n){da(n);let s=n.get("remote"),o=t(()=>{},"disposeRemote");return s!==void 0&&(o=await s.$mount(U)),async()=>{await o()}}t(ca,"apply");function da(n){n.effect(()=>n.locale.register(Ve,{zh:Ir,en:Ar,ru:oa}),"dsh-archive-manager: dictionaries");let s=t(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),o={},u,m=t(p=>(u=ys(p,n.sessions,n.workspaces,{onOpened:t(()=>n.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:t(()=>n.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>u?.dispose()),"attachArchiveNavigation");n.effect(()=>m(s()),"archive-manager: explicit archived navigation");let f=t(p=>{if(u===void 0)throw new jt("navigationUnavailable");return pr.request(p),u.open(p)},"openConversation"),C=t(async p=>{n.get("layout")?.beginNavigation?.(),pr.request(p)},"focusSessionWorkspace"),N=t(async(p,w)=>{let D=await n.sessions.search(p,w);if(!D.ok)throw new Error(D.error.message);return D.value},"searchSessions"),A=t(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await me(),null}catch(p){return console.warn("archive-manager: restored archived sessions but session list refresh failed:",p),p instanceof Error?p.message:String(p)}},"refreshSessionList"),B=Rr(n.workspaces),T=t(async(p,...w)=>{let D=n.get("remote.workspaceRegistry");if(!D||typeof D[p]!="function")throw new Error(n.locale.bind(Ve)("service.unavailable"));let ke=await D[p].apply(D,w);if(!ke.ok)throw new Error(ke.error.message);return ke.value},"registryCall"),z=t(()=>T("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),H=t(()=>T("diagnoseSessionCaches"),"diagnoseSessionCaches"),h=t(p=>T("rebuildSessionCaches",p),"rebuildSessionCaches"),me=t(async()=>{if(typeof n.sessions.refresh!="function")throw new Error("Official session list refresh is unavailable");let p=await n.sessions.refresh(),w=n.sessions,D=w.manager;if(D?.listState==="error"&&D.listError)throw new Error(Ae(D.listError));if(w.listState==="error"&&w.listError)throw new Error(Ae(w.listError));let ae=w.list?.getSnapshot?.();if(ae?.state==="error"&&ae.error)throw new Error(Ae(ae.error));if(p&&typeof p=="object"&&"ok"in p&&p.ok===!1)throw new Error(Ae(p.error??"Session list refresh failed"))},"refreshCacheLists"),Re=t((p={})=>T("cleanOrphanSubagents",p??{}),"cleanOrphanSubagents"),ie=t(p=>T("searchArchivedContent",p),"searchArchivedContent"),Xe=t(p=>T("searchSessionContent",p),"searchSessionContent"),ft=t(p=>T("previewArchivedSession",p),"previewArchivedSession"),Dt=t(()=>T("favoriteSessions"),"favoriteSessions"),J=t(p=>T("setSessionFavorite",p),"setSessionFavorite"),xe=js({workspaces:n.workspaces.list,sessions:n.sessions.list,archive:t(p=>n.workspaces.archiveSession(p),"archive"),restore:t(async p=>{await B(p)},"restore"),deleteOne:t(async p=>{let w=n.get("remote.workspaceRegistry");if(!w)throw new Error(n.locale.bind(Ve)("service.unavailable"));let D=await w.deleteSession(p);if(!D.ok)throw new Error(D.error.message)},"deleteOne"),getFavorites:Dt,refresh:t(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:pt}),it=t(async p=>{await B(p),await A()},"unarchiveSession"),$t=t(async p=>{let w=n.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let D=await w.deleteSession(p);if(!D.ok)throw new Error(D.error.message);await A()},"deleteSession"),vt=t(async p=>zn(n.workspaces,p,A),"archiveSessions"),On=t(async p=>{let w=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},D=Vt(w.archivedSessionIds,w.items,p);return _r(n.workspaces,D,A,B)},"unarchiveSessions"),cn=t(async p=>{let w=n.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let D=await w.deleteArchivedSessions(p);if(!D.ok)throw new Error(D.error.message);let ae=await A();return{...D.value,refreshError:ae}},"deleteArchivedSessions"),et=t(async()=>{let p=n.get("remote.workspaceRegistry");if(p===void 0)throw new Error("archive-manager remote service is unavailable");let w=await p.archivedSessionMetadata();if(!w.ok)throw new Error(w.error.message);return w.value},"archivedSessionMetadata"),be="sidebar.workspaces.session.menu.item",ot=null,Et=new Set,ge=t(p=>{ot=p;for(let w of Et)w()},"publishDeleteTarget");function yt(){return l.useSyncExternalStore(p=>(Et.add(p),()=>{Et.delete(p)}),()=>ot,()=>ot)}t(yt,"useDeleteRequest");function tt({sessionId:p,displayTitle:w,useMenuOpenState:D,t:ae}){let[,ke]=D(),de=c.MenuItemButton,Oe=(0,a.jsx)(c.IconTrashOutlineRegular,{size:14}),Ue=t(()=>{ke(!1),ge({sessionId:p,title:w})},"onSelect");return typeof de=="function"?(0,a.jsx)(de,{danger:!0,icon:Oe,onSelect:Ue,children:ae("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Ue,children:ae("menu.deleteSession")})}t(tt,"DeleteSessionMenuItem");function Gt(p){try{let w=document.querySelector(`[data-row-key="session:${CSS.escape(p)}"]`);return w?(w.hasAttribute("tabindex")||(w.setAttribute("tabindex","-1"),w.addEventListener("blur",()=>w.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}t(Gt,"focusSessionRow");function lt({t:p}){let w=yt(),[D,ae]=(0,l.useState)(!1),[ke,de]=(0,l.useState)(null),[Oe,Ue]=(0,l.useState)(null),oe=(0,l.useRef)(null),we=(0,l.useRef)(null),Te=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){Ue(null);return}let Q=null,ne=t(()=>{if(Q&&Q.isConnected)return Q;try{Q=document.querySelector(`[data-row-key="session:${CSS.escape(w.sessionId)}"]`)}catch{Q=null}return Q},"getTargetRow"),O=t(()=>{let ye=oe.current,he=ye?.offsetWidth||290,Me=ye?.offsetHeight||160,Pe=8,Be=ne();if(!Be){let ue=window.innerWidth,rt=window.innerHeight,ut=Math.max(16,(rt-Me)/2),$e=Math.max(16,(ue-he)/2);Ue(Fe=>Fe!==null&&Fe.top===ut&&Fe.left===$e?Fe:{top:ut,left:$e});return}let Ze=Be.getBoundingClientRect(),Ne=Ze.top-4;Ne+Me>window.innerHeight-16&&(Ne=window.innerHeight-16-Me),Ne<16&&(Ne=16);let Ie=Ze.right+Pe;Ie+he>window.innerWidth-16&&(Ie=Ze.left-he-Pe),Ie<16&&(Ie=16),Ue(ue=>ue!==null&&ue.top===Ne&&ue.left===Ie?ue:{top:Ne,left:Ie})},"updatePosition");O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O);let re=null;return typeof ResizeObserver<"u"&&oe.current&&(re=new ResizeObserver(O),re.observe(oe.current)),()=>{re?.disconnect(),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[w]),(0,l.useEffect)(()=>{if(w===null)return;we.current&&!we.current.disabled?we.current.focus():oe.current?.focus();let Q=w.sessionId;return()=>{if(!Gt(Q)){let O=document.querySelector('[role="treeitem"][aria-selected="true"]');O&&(O.hasAttribute("tabindex")||(O.setAttribute("tabindex","-1"),O.addEventListener("blur",()=>O.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(O):O.focus())}}},[w]),(0,l.useEffect)(()=>{w!==null&&D&&oe.current?.focus()},[w,D]),(0,l.useEffect)(()=>{if(w===null)return;let Q=t(ne=>{if(ne.key==="Escape"){ne.preventDefault(),ne.stopPropagation(),"stopImmediatePropagation"in ne&&typeof ne.stopImmediatePropagation=="function"&&ne.stopImmediatePropagation(),D||(de(null),ge(null));return}if(ne.key==="Tab"){if(ne.preventDefault(),D){oe.current?.focus();return}let O=we.current,re=Te.current;if(!O||!re)return;ne.shiftKey?document.activeElement===O?re.focus():O.focus():document.activeElement===re?O.focus():re.focus()}},"onKey");return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[w,D]),w===null)return null;let dt=t(()=>{D||(de(null),ge(null))},"close"),Ye=t(()=>{ae(!0),de(null),$t(w.sessionId).then(()=>{ae(!1),ge(null)}).catch(Q=>{ae(!1),de(kn(Q,p))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:dt}),(0,a.jsxs)("div",{ref:oe,role:"dialog","aria-modal":!0,"aria-label":p("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:Oe?{top:Oe.top,left:Oe.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:p("deleteSession.confirmTitle")}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:p("deleteSession.desc",{name:w.title})}),D&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:p("deleteSession.pending")}),ke!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:ke}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:we,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:D,onClick:dt,children:p("cancel")}),(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:D,onClick:Ye,children:p("deleteSession.title")})]})]})]})}t(lt,"DeleteSessionOverlay");let Ke=null,bt=new Set,It=t(p=>{Ke=p;for(let w of bt)w()},"publishArchiveWsTarget");function dn(){return l.useSyncExternalStore(p=>(bt.add(p),()=>{bt.delete(p)}),()=>Ke,()=>Ke)}t(dn,"useArchiveWsRequest");function ct(p){try{let w=document.querySelector(`[data-row-key="workspace:${CSS.escape(p)}"]`);return w?(w.hasAttribute("tabindex")||(w.setAttribute("tabindex","-1"),w.addEventListener("blur",()=>w.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}t(ct,"focusWorkspaceRow");function ve({t:p}){let w=dn(),[D,ae]=(0,l.useState)(!1),[ke,de]=(0,l.useState)(null),[Oe,Ue]=(0,l.useState)(null),oe=(0,l.useRef)(null),we=(0,l.useRef)(null),Te=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){Ue(null);return}let Q=null,ne=t(()=>{if(Q&&Q.isConnected)return Q;try{Q=document.querySelector(`[data-row-key="workspace:${CSS.escape(w.workspaceId)}"]`)}catch{Q=null}return Q},"getTargetRow"),O=t(()=>{let ye=oe.current,he=ye?.offsetWidth||290,Me=ye?.offsetHeight||160,Pe=8,Be=ne();if(!Be){let ue=window.innerWidth,rt=window.innerHeight,ut=Math.max(16,(rt-Me)/2),$e=Math.max(16,(ue-he)/2);Ue(Fe=>Fe!==null&&Fe.top===ut&&Fe.left===$e?Fe:{top:ut,left:$e});return}let Ze=Be.getBoundingClientRect(),Ne=Ze.top-4;Ne+Me>window.innerHeight-16&&(Ne=window.innerHeight-16-Me),Ne<16&&(Ne=16);let Ie=Ze.right+Pe;Ie+he>window.innerWidth-16&&(Ie=Ze.left-he-Pe),Ie<16&&(Ie=16),Ue(ue=>ue!==null&&ue.top===Ne&&ue.left===Ie?ue:{top:Ne,left:Ie})},"updatePosition");O(),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O);let re=null;return typeof ResizeObserver<"u"&&oe.current&&(re=new ResizeObserver(O),re.observe(oe.current)),()=>{re?.disconnect(),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[w]),(0,l.useEffect)(()=>{if(w===null)return;we.current&&!we.current.disabled?we.current.focus():oe.current?.focus();let Q=w.workspaceId;return()=>{ct(Q)}},[w]),(0,l.useEffect)(()=>{w!==null&&D&&oe.current?.focus()},[w,D]),(0,l.useEffect)(()=>{if(w===null)return;let Q=t(ne=>{if(ne.key==="Escape"){ne.preventDefault(),ne.stopPropagation(),"stopImmediatePropagation"in ne&&typeof ne.stopImmediatePropagation=="function"&&ne.stopImmediatePropagation(),D||(de(null),It(null));return}if(ne.key==="Tab"){if(ne.preventDefault(),D){oe.current?.focus();return}let O=we.current,re=Te.current;if(!O||!re)return;ne.shiftKey?document.activeElement===O?re.focus():O.focus():document.activeElement===re?O.focus():re.focus()}},"onKey");return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[w,D]),w===null)return null;let dt=t(()=>{D||(de(null),It(null))},"close"),Ye=t(()=>{ae(!0),de(null);let ne=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(he=>he.workspaceId===w.workspaceId),O=n.sessions.list?.getSnapshot?.()?.byId??{},re=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),ye=(ne?.sessionIds??[]).filter(he=>En(he,O,re));zn(n.workspaces,ye,A).then(he=>{if(ae(!1),he.failures.length>0){de(an(he.failures,p));return}It(null)}).catch(he=>{ae(!1),de(sr(he,p))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:dt}),(0,a.jsxs)("div",{ref:oe,role:"dialog","aria-modal":!0,"aria-label":p("menu.archiveWorkspace"),tabIndex:-1,className:"dsham_sidebarCard",style:Oe?{top:Oe.top,left:Oe.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:p("archiveWorkspace.title",{n:w.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:p("archiveWorkspace.desc",{name:w.title})}),D&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:p("archiveWorkspace.pending")}),ke!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:ke}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:we,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:D,onClick:dt,children:p("cancel")}),(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:D,onClick:Ye,children:p("archiveWorkspace.confirm")})]})]})]})}t(ve,"ArchiveWorkspaceOverlay");function At(p){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let w=null,D=!1,ae=new Map,ke=!1,de=t(O=>{let ye=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(Pe=>Pe.workspaceId===O);if(ye===void 0)return[];let he=n.sessions.list?.getSnapshot?.()?.byId??{},Me=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return ye.sessionIds.filter(Pe=>En(Pe,he,Me))},"workspaceCandidateIds"),Oe=t(()=>{if(ke=!1,!D)for(let[O,re]of ae){if(!O.isConnected){ae.delete(O);continue}let ye=de(re.workspaceId).length===0;O.disabled=ye,O.style.opacity=ye?"0.5":"",O.style.cursor=ye?"not-allowed":""}},"revalidateItems"),Ue=t(()=>{if(ae.size===0||ke||D)return;ke=!0;let O=t(()=>Oe(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16)},"scheduleRevalidate"),oe=t(O=>{w=cr(O.target)},"rememberWorkspace");document.addEventListener("pointerdown",oe,!0),document.addEventListener("click",oe,!0);let we=t(()=>{if(D)return;for(let[re]of ae)re.isConnected||ae.delete(re);let O=document.querySelectorAll('[role="menu"]');for(let re of O){if(re.querySelector('[data-dsham-archive-workspace="true"]'))continue;let ye=Array.from(re.querySelectorAll('button[role="menuitem"]'));if(ye.length===0)continue;let he=ye.find(Ge=>In(Ge,!1))??ye.find(Ge=>In(Ge,!0));if(!he)continue;let Me=ye.find(Ge=>Ge!==he)??he,Pe=he.parentElement;if(!Pe)continue;let Be=w;if(!Be)continue;let Ne=de(Be.workspaceId).length,Ie=document.createElement("div");Ie.className=Pe.className;let ue=document.createElement("button");ue.type="button",ue.setAttribute("role","menuitem"),ue.dataset.dshamArchiveWorkspace="true",ue.className=Me.className.split(/\s+/).filter(Ge=>!/(?:^|[_-])danger(?:$|[_-])/i.test(Ge)).join(" ");let rt=Me.querySelector("span"),ut=Me.querySelectorAll("span")[1],$e=document.createElement("span");$e.setAttribute("aria-hidden","true"),rt?.className&&($e.className=rt.className),$e.innerHTML='<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 2.5H2.5C1.94772 2.5 1.5 2.94772 1.5 3.5V4.5C1.5 5.05228 1.94772 5.5 2.5 5.5H13.5C14.0523 5.5 14.5 5.05228 14.5 4.5V3.5C14.5 2.94772 14.0523 2.5 13.5 2.5Z"/><path d="M2.5 5.5V13.5C2.5 13.7652 2.60536 14.0196 2.79289 14.2071C2.98043 14.3946 3.23478 14.5 3.5 14.5H12.5C12.7652 14.5 13.0196 14.3946 13.2071 14.2071C13.3946 14.0196 13.5 13.7652 13.5 13.5V5.5"/><path d="M6.5 9.5H9.5"/></svg>';let Fe=document.createElement("span");ut?.className&&(Fe.className=ut.className),Fe.textContent=p("menu.archiveWorkspace"),ue.append($e,Fe),Ie.append(ue),Ne===0&&(ue.disabled=!0,ue.style.opacity="0.5",ue.style.cursor="not-allowed"),ue.addEventListener("click",Ge=>{Ge.preventDefault(),Ge.stopPropagation();let Nt=de(Be.workspaceId).length;Nt!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),It({workspaceId:Be.workspaceId,title:Be.title,count:Nt}))}),Pe.parentNode?.insertBefore(Ie,Pe),ae.set(ue,{workspaceId:Be.workspaceId})}},"checkAndInject"),Te=!1,dt=t(()=>{if(Te||D)return;Te=!0;let O=t(()=>{Te=!1,!D&&we()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16)},"scheduleInject"),Ye=new MutationObserver(O=>{Tn(O,'[role="menu"]')&&dt()});Ye.observe(document.body,{childList:!0,subtree:!0});let Q=n.sessions.list?.subscribe?.(Ue),ne=n.workspaces.list?.subscribe?.(Ue);return()=>{D=!0,document.removeEventListener("pointerdown",oe,!0),document.removeEventListener("click",oe,!0),Ye.disconnect(),Q?.(),ne?.(),ae.clear();for(let O of document.querySelectorAll('[data-dsham-archive-workspace="true"]'))O.parentElement?.remove()}}t(At,"setupWorkspaceMenuInjector");function Kt(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(p=>p.children?.[be]!==void 0)}t(Kt,"hostSidebarDeclaresSessionMenu");let W,je,nt,q,Yt=t(()=>{let p=Kt()?"menu":"waiting";p!==W&&(W=p,p==="menu"&&(je??=n.slots.inject(be,()=>n.slots.register({name:be,id:"archive-manager.delete-session",order:500,locale:Ve,inject:t(()=>({}),"inject")},tt)),nt??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:Ve,inject:t(()=>({t:n.locale.bind(Ve)}),"inject")},lt)),q??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:Ve,inject:t(()=>({t:n.locale.bind(Ve)}),"inject")},ve))))},"reconcileSidebar");Yt(),n.effect(()=>At(n.locale.bind(Ve)),"archive-manager: workspace menu injector"),fr(n);let _e=typeof n.on=="function"?n.on("slots/changed",p=>{if(p==="sidebar.workspaces")try{Yt()}catch(w){console.warn("archive-manager: sidebar mode switch failed",w)}}):void 0;n.effect(()=>()=>{_e?.(),je?.(),nt?.(),q?.()},"archive-manager: sidebar mode");let Rt=t(()=>({archiveSessions:vt,archiveSession:t((p,w)=>n.workspaces.archiveSession(p,w),"archiveSession"),sessionStore:Nn(n.sessions.list),workspaceStore:Nn(n.workspaces.list),unarchiveSession:it,deleteSession:$t,unarchiveSessions:On,deleteArchivedSessions:cn,archivedSessionMetadata:et,openConversation:f,focusSessionWorkspace:C,viewState:o,favoriteSessions:Dt,setSessionFavorite:J,organizeBatch:xe,diagnoseOrphanSubagents:z,cleanOrphanSubagents:Re,diagnoseSessionCaches:H,rebuildSessionCaches:h,refreshCacheLists:me,searchSessionContent:Xe,searchArchivedContent:ie,previewArchivedSession:ft,t:n.locale.bind(Ve)}),"buildArchivedSectionProps"),Bt=er(n,{callApi:t(async(p,w)=>{let D=wn(`/api/michengai/dsh-archive-manager${p}`),ae=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},w?.headers),ke=await fetch(D,Object.assign({},w,{headers:ae})),de=await ke.json();if(!ke.ok||!de||de.ok===!1)throw new Error((de&&typeof de=="object"&&typeof de.error=="string"?de.error:void 0)||`HTTP ${ke.status}`);return de},"callSettingsApi"),renderPanel:t(p=>(0,a.jsx)(Ut,Object.assign({},Rt(),p)),"renderPanel"),injectProps:Rt,ns:Ve,onOnlineUpdateChange:t(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange")});n.effect(()=>()=>Bt.destroy(),"archive-manager: sidebar entry"),n.effect(()=>As({endpoint:"/api/michengai/dsh-archive-manager/update",packageName:"@michengai/dsh-archive-manager",titleRowSelector:".dsham_settingsTitleRow",linksSelector:".dsham_settingsLinks",zhName:"\u5F52\u6863\u4F1A\u8BDD",enName:"Archived sessions",ruName:"\u0410\u0440\u0445\u0438\u0432 \u0441\u0435\u0441\u0441\u0438\u0439",createIcon:Y,isEnabled:t(()=>Bt.isOnlineUpdateEnabled(),"isEnabled")}),"dsh-archive-manager: plugin update ui"),n.slots.inject("settings.section",()=>n.slots.register({name:"settings.section",id:"archived-sessions",order:45,label:t(()=>n.locale.bind(Ve)("archived.badge"),"label"),icon:"archive",locale:Ve,inject:Rt},Ut))}t(da,"applyWorkspaceBrowser");async function ua(n,s,o,u){try{await s(n)}catch(m){o(Ls(m,u))}}return t(ua,"forkWithFeedback"),i.__test={forkWithFeedback:ua,unarchivedSessionIds:kr,ArchiveSelectionToolbar:vr,ArchivedSessionsSection:Ut,zh:Ir,en:Ar,displayTitle:Le,sessionVisible:De,indexSubagentDescendants:Qe,isUnknownSessionError:Ct,deriveGroups:$s,deriveFlat:Gs,deriveSearchResults:Ks,deriveArchivedGroups:Cr,sortArchivedGroups:Er,deriveArchivedBatchIds:Vt,archivedSessionIdsInGroups:wr,pruneArchivedSelection:Sr,toggleArchivedSelection:Dn,archivedDeleteFeedback:xr,isWorkspaceTaskCandidate:En,isWorkspaceDeleteMenuItem:In,workspaceMenuTriggerFrom:cr,applySettingsNavIcon:mr,restoreSettingsNavIcon:gr,installSettingsNavIcon:fr,mutationTouches:Tn,activeSessionActivity:on,activeSessionRefusal:ar,activeArchiveFromMessage:ir,archiveSessionsViaOfficial:zn,unarchiveSessionsViaOfficial:_r,createUnarchiveSession:Rr,createWorkspaceViewStore:se,migrateWorkspaceViewPersist:I,WORKSPACE_VIEW_PERSIST_KEY:Mt,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:Pt,bindObservable:Nn,groupByWorkspace:lr,byRecency:fe,ARCHIVE_MANAGER_REMOTE:U,currentSessionId:pt,setupSidebarEntry:er},i.apply=ca,i.inject=la,r.exports}t(oi,"startArchiveClient");
|
|
21
|
+
`;function $s(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(Gs)!==null||typeof document.createElement!="function")return;let t=document.createElement("style");t.id=Gs,t.textContent=Si,(document.head??document.documentElement)?.appendChild?.(t)}e($s,"ensureSidebarEntryStyle");function ki(t){let s=t&&typeof t.size=="number"?t.size:16;return at(In.IconArchiveOutlineMedium,{size:s})}e(ki,"ArchiveSidebarIcon");function xi(t){$s();let{t:s,enabled:o,onToggle:y,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:h,onlineUpdateDisabled:f,onlineUpdateLocked:w=!1}=t,D=[at("div",{key:"sidebar-entry",className:"dsham_bundle_row"},at("div",{className:"dsham_bundle_label_box"},at("span",{className:"dsham_bundle_title"},s("sidebar.entry.title")),at("span",{className:"dsham_bundle_desc"},s("sidebar.entry.desc"))),at(In.Switch,{checked:o,onChange:y,label:s("sidebar.entry.toggle"),disabled:a}))];if(typeof h=="function"){let k=w?`${s("update.entry.desc")} (${s("update.entry.locked")})`:s("update.entry.desc");D.push(at("div",{key:"online-update",className:"dsham_bundle_row"},at("div",{className:"dsham_bundle_label_box"},at("span",{className:"dsham_bundle_title"},s("update.entry.title")),at("span",{className:"dsham_bundle_desc"},k)),at(In.Switch,{checked:l,onChange:h,label:s("update.entry.toggle"),disabled:f||w,title:w?s("update.entry.locked"):void 0})))}return at(hs,null,D)}e(xi,"ArchiveBundleConfigCard");function Ci(t){let[s,o]=nn(t.getEnabled),[y,a]=nn(t.getOnlineUpdateEnabled?t.getOnlineUpdateEnabled:()=>!0),[l,h]=nn(t.getOnlineUpdateLocked?t.getOnlineUpdateLocked:()=>!1),[f,w]=nn(!1),[D,k]=nn(!1);ms(()=>{let _=e(()=>{o(t.getEnabled()),t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled()),t.getOnlineUpdateLocked&&h(t.getOnlineUpdateLocked())},"syncState");return _(),t.subscribe(_)},[t]);let v=e(_=>{w(!0),o(_),t.setSidebar(_).catch(()=>{o(t.getEnabled())}).finally(()=>{w(!1)})},"onToggleSidebar"),C=t.setOnlineUpdate?_=>{t.getOnlineUpdateLocked?.()||(k(!0),a(_),t.setOnlineUpdate(_).catch(()=>{t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled())}).finally(()=>{k(!1)}))}:void 0;return at(xi,{t:t.t,enabled:s,disabled:f,onToggle:v,onlineUpdateEnabled:y,onlineUpdateDisabled:D||l,onlineUpdateLocked:l,onToggleOnlineUpdate:C})}e(Ci,"ArchiveBundleConfigCardWrapper");function wr(t,s){if($s(),!t.locale)return{isEnabled:e(()=>!1,"isEnabled"),isSupported:e(()=>!1,"isSupported"),setEnabled:e(async()=>!1,"setEnabled"),isOnlineUpdateEnabled:e(()=>!0,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:e(()=>!1,"isOnlineUpdateLocked"),setOnlineUpdate:e(async()=>!1,"setOnlineUpdate"),destroy:e(()=>{},"destroy")};let{callApi:o,renderPanel:y,ns:a}=s,l=!1,h=!1,f=!1,w=null,D=null,k=0,v=!1,C,_=new Set,M=e(()=>{if(!v)for(let U of _)try{U()}catch{}},"notify"),B=e(()=>{if(v||!f||!l||w)return;let U=t.slots.register({name:"main",key:br,locale:a,inject:e(()=>{let Ae=typeof s.injectProps=="function"?s.injectProps():{};return Object.assign({t:t.locale?.bind?t.locale.bind(a):void 0},Ae)},"inject")},Ae=>at("div",{className:"dsham_mainPanel"},y(Ae)));w=typeof U=="function"?U:()=>{}},"mountMain"),F=e(()=>{if(w){try{w()}catch{}w=null}},"unmountMain"),H=e(()=>{if(v||!h||!l||D)return;let U=t.slots.register({name:"sidebar.panellist",id:br,order:wi,label:e(()=>t.locale.bind(a)("archives.title"),"label"),locale:a},Ae=>ki(Ae&&typeof Ae=="object"&&"size"in Ae?Ae:void 0));D=typeof U=="function"?U:()=>{}},"mountRow"),Pe=e(()=>{if(D){try{D()}catch{}D=null}},"unmountRow"),re=e(()=>{if(!v)if(l)B(),H();else{if(C?.panelInfo&&typeof C.selectPanel=="function")try{C.panelInfo.getSnapshot().activePanelId===br&&C.selectPanel(null)}catch{}Pe(),F()}},"sync"),se=e(async U=>{if(v)return l;let Ae=++k;l=U,re(),M();try{return await o("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),U}catch(_e){throw Ae===k&&(l=!U,re(),M()),_e}},"setEnabled"),ce=!0,ae=!1,Le=0,ue=e(async U=>{if(v||ae)return ce;let Ae=++Le;if(ce=U,M(),typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(U)}catch{}try{if(await o("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:U})}),Ae===Le&&typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(U)}catch{}return U}catch(_e){if(Ae===Le&&(ce=!U,M(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(!U)}catch{}throw _e}},"setOnlineUpdate"),X=k;o("/sidebar-entry").then(U=>{!v&&k===X&&U&&typeof U.enabled=="boolean"&&(l=U.enabled,re(),M())}).catch(()=>{});let Nt=Le;o("/online-update").then(U=>{if(!v&&Le===Nt&&U&&typeof U.enabled=="boolean"&&(ce=U.enabled,U.locked===!0&&(ae=!0),M(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(ce)}catch{}}).catch(()=>{});let dt=t;return typeof dt.inject=="function"&&dt.inject(["layout"],U=>{!v&&U.layout&&(C=U.layout)}),t.slots.inject("main",()=>{if(!v)return f=!0,B(),()=>{f=!1,F()}}),t.slots.inject("sidebar.panellist",()=>{if(!v)return h=!0,H(),()=>{h=!1,Pe()}}),t.slots.inject("plugins.bundle.config",()=>{if(!v)return t.slots.register({name:"plugins.bundle.config",key:bi,locale:a},U=>U&&U.view==="summary"?null:at(Ci,{t:t.locale.bind(a),getEnabled:e(()=>l,"getEnabled"),setSidebar:se,getOnlineUpdateEnabled:e(()=>ce,"getOnlineUpdateEnabled"),setOnlineUpdate:ue,getOnlineUpdateLocked:e(()=>ae,"getOnlineUpdateLocked"),subscribe:e(Ae=>(_.add(Ae),()=>{_.delete(Ae)}),"subscribe")}))}),{isEnabled:e(()=>l,"isEnabled"),isSupported:e(()=>h,"isSupported"),setEnabled:se,isOnlineUpdateEnabled:e(()=>ce,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:e(()=>ae,"isOnlineUpdateLocked"),setOnlineUpdate:ue,destroy:e(()=>{v||(v=!0,k++,Le++,C=void 0,_.clear(),Pe(),F())},"destroy")}}e(wr,"setupSidebarEntry");function Sr(t){if(typeof t!="string"||t.length===0||t.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u957F\u5EA6\u987B\u4E3A 1\uFF5E1024 \u4E2A\u5B57\u7B26");return t}e(Sr,"checkedId");var Ei={parse(t){let s=ne(t);if(!s||typeof s!="object"||typeof s.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:Sr(s.sessionId),favorite:s.favorite}}},Ii={parse(t){let s=ne(t);if(!s||!Array.isArray(s.favoriteSessionIds)||s.favoriteSessionIds.length>1e5)throw new TypeError("\u6536\u85CF\u96C6\u5408\u65E0\u6548");return{favoriteSessionIds:[...new Set(s.favoriteSessionIds.map(Sr))]}},safeParse(t){try{return{success:!0,data:this.parse(t)}}catch(s){return{success:!1,error:s}}}};function Ks(){let t=e((s,o)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${s}`,create:e(()=>o,"create"),schema:o}),"codec");return["favoriteSessions","setSessionFavorite"].map(s=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${s}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:s,invocation:{kind:"direct"},parameters:s==="favoriteSessions"?[]:[{name:"input",wire:"input",source:"json",codec:t("FavoriteInput",Ei)}],result:t("FavoriteState",Ii),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(Ks,"favoriteInvocations");function kr(t,{days:s,now:o=Date.now(),favorites:y=new Set,currentId:a,pending:l=new Map}){if(!t||!Number.isInteger(s)||s<1||s>36500||y.has(t.id)||t.id===a||(t.retainedBy?.mainView??0)>0||t.running||(t.runningSubagentCount??0)>0||t.pendingInteraction!=null||l.has(t.id))return!1;let h=typeof t.updatedAt=="number"?t.updatedAt:Date.parse(t.updatedAt??"");return Number.isFinite(h)&&h<=o-s*864e5}e(kr,"idleArchiveCandidate");async function qn(t,s,{onProgress:o,refresh:y}={}){let a=[...new Set(t.map(Sr))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},h=e(()=>o?.({total:a.length,done:l.succeeded.length+l.skipped.length+l.failures.length,succeeded:l.succeeded.length,skipped:l.skipped.length,failed:l.failures.length}),"report");h();for(let f of a){try{(await s(f)?l.succeeded:l.skipped).push(f)}catch(w){l.failures.push({sessionId:f,message:w instanceof Error?w.message:String(w)}),l.remaining.push(f)}h()}try{await y?.()}catch(f){l.refreshError=f instanceof Error?f.message:String(f)}return l}e(qn,"runSessionBatch");function Ys({workspaces:t,sessions:s,archive:o,restore:y,deleteOne:a,getFavorites:l,refresh:h,currentSessionId:f}){return async(w,D,k={})=>{if(!["archive","restore","undo","delete"].includes(w))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return qn(D,async v=>{let _=t.getSnapshot().archivedSessionIds.includes(v);if(w==="archive"){if(_||!s.getSnapshot().byId[v])return!1;if(k.idleDays!==void 0){let Pe=new Set((await l()).favoriteSessionIds),re=s.getSnapshot();if(!kr(re.byId[v],{days:k.idleDays,favorites:Pe,currentId:f(re),pending:k.getPending?.()??k.pending}))return!1}return await o(v),t.getSnapshot().archivedSessionIds.includes(v)}return _?w==="delete"?(await a(v),!0):!((await y(v))?.archivedSessionIds??t.getSnapshot().archivedSessionIds).includes(v):!1},{onProgress:k.onProgress,refresh:h})}}e(Ys,"createSessionOrganizer");function Ai(t){return!t||t<=0?"0 B":t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/(1024*1024)).toFixed(1)+" MB"}e(Ai,"formatBytes");function Zs(t,s){let o=t.createElement;function y(l,h){return o(s??(w=>o("button",{type:"button",disabled:w.disabled,onClick:w.onClick},w.children)),{variant:"outline",size:"sm",...h},l)}e(y,"textButton");function a({title:l,failures:h,separator:f}){let[w,D]=t.useState(!1),k=o("ul",null,h.map(v=>o("li",{key:v.sessionId},v.sessionId,f,v.message)));return o(Hn,{title:l,open:w,onToggle:e(()=>D(v=>!v),"onToggle")},k)}return e(a,"FailureDetails"),e(function({t:h,archived:f,busy:w,ready:D,days:k,onDays:v,count:C,onPreview:_,progress:M,result:B,onRetry:F,undoCount:H,onUndo:Pe,onReload:re,orphanCount:se=0,orphanSizeBytes:ce=0,orphanCleaning:ae=!1,onCleanOrphans:Le,cacheCount:ue=0,cacheRepair:X,onRebuildCaches:Nt,onRetryCaches:dt,onReloadCaches:U,onDismissCaches:Ae}){return o(t.Fragment,null,o("style",null,".dsham_organizer,.dsham_batchFeedback{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}.dsham_organizerControls{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.dsham_organizer label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--dsw-alias-label-primary)}.dsham_number{width:88px;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.dsham_number:hover{border-color:var(--dsw-alias-border-l3)}.dsham_number:focus{outline:none;border-color:var(--dsw-alias-state-business-primary)}.dsham_disclosure{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer}.dsham_foldChevron{transition:transform 150ms ease}.dsham_foldChevron.is-open{transform:rotate(180deg)}.dsham_organizer p,.dsham_batchFeedback p{margin:0;font-size:12px;color:var(--dsw-alias-label-secondary)}.dsham_batchFeedback progress{width:100%}.dsham_batchFeedback details{font-size:12px;overflow-wrap:anywhere}.dsham_archivePreview{max-height:260px;overflow:auto;display:grid;gap:8px;padding:8px 0}.dsham_archivePreview label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere}"),(!f||!D)&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},!D&&y(h("organizer.reloadFavorites"),{disabled:w,onClick:re}),!f&&o(t.Fragment,null,o("label",null,h("organizer.idleDays"),o(gs,{min:1,max:36500,value:k===""?null:Number(k),disabled:w,"aria-label":h("organizer.idleDays"),onChange:e(_e=>v(_e==null?"":String(_e)),"onChange")})),y(h("organizer.preview",{n:C}),{disabled:w||!D||C===0,onClick:_}))),!f&&o("p",null,h("organizer.rules"))),se>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,h("organizer.orphanTitle",{n:se})),Le&&y(h(ae?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:w||ae,onClick:Le})),o("p",null,h("organizer.orphanDesc",{size:Ai(ce)}))),ue>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,h("organizer.cacheTitle",{n:ue})),Nt&&y(h(X?.busy?"organizer.cacheRebuilding":"organizer.cacheRebuild"),{disabled:w||X?.busy,onClick:Nt})),o("p",null,h("organizer.cacheDesc"))),X&&(X.result||X.progress||X.error||X.refreshError)&&o("section",{className:"dsham_batchFeedback","aria-label":h("organizer.cacheRebuild")},X.progress&&o("div",{role:"status"},o("progress",{value:X.progress.done,max:Math.max(1,X.progress.total)}),h("organizer.progressCount",X.progress)),X.result&&o("div",{role:"status"},o("p",null,h("organizer.result",{succeeded:X.result.rebuiltSessionIds.length,skipped:X.result.skippedSessionIds.length,failed:X.result.failures.length})),X.result.failures.length>0&&o(a,{title:h("organizer.failureDetails"),failures:X.result.failures,separator:h("common.separator")}),X.result.failures.length>0&&dt&&y(h("organizer.cacheRetry",{n:X.result.failures.length}),{disabled:w||X.busy,onClick:dt})),X.error&&o("p",{role:"alert"},h("organizer.cacheError",{detail:X.error})),X.refreshError&&o("p",{role:"alert"},h("organizer.refreshError",{detail:X.refreshError})),o("div",{className:"dsham_organizerControls"},U&&y(h("organizer.cacheCheck"),{disabled:w||X.busy,onClick:U}),Ae&&y(h("organizer.dismiss"),{disabled:w||X.busy,onClick:Ae}))),(M||B||H>0)&&o("section",{className:"dsham_batchFeedback","aria-label":h("organizer.feedback")},M&&o("div",{role:"status","aria-live":"polite"},o("progress",{value:M.done,max:Math.max(1,M.total),"aria-label":h("organizer.progress")}),h("organizer.progressCount",{done:M.done,total:M.total})),B&&o("div",{role:"status"},o("strong",null,h(`organizer.${B.kind??"archive"}Result`)),o("p",null,h("organizer.result",{succeeded:B.succeeded.length,skipped:B.skipped.length,failed:B.failures.length})),B.failures.length>0&&o(a,{title:h("organizer.failureDetails"),failures:B.failures,separator:h("common.separator")}),B.refreshError&&o("p",{role:"alert"},h("organizer.refreshError",{detail:B.refreshError})),B.remaining.length>0&&y(h("organizer.retry",{n:B.remaining.length}),{disabled:w,onClick:F})),H>0&&o("div",{className:"dsham_organizerControls"},y(h("organizer.undo",{n:H}),{disabled:w,onClick:Pe}),o("p",null,h("organizer.undoHint")))))},"OrganizerPanel")}e(Zs,"createOrganizerPanel");var Js={"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"},Xs={"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."},Qs={"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 sn=Function("return globalThis.__dshArchiveReactDOM")(),ea=Function("return globalThis.__dshArchiveReactDOMClient")(),ta=sn.createPortal,Zo=sn.flushSync,Jo=ea?.createRoot,Xo=ea?.hydrateRoot,Qo=sn.findDOMNode,el=sn.unmountComponentAtNode,tl=sn.unstable_batchedUpdates,nl=sn.version;function Ri(t){var s={exports:{}},o=s.exports;Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});let y=t("@deepseek-ai/dsh-client-store"),a=t("react/jsx-runtime"),l=t("react"),h=t("react-dom"),f=t("@deepseek-ai/dsh-client-ui-primitives");function w({open:n,onClose:r,title:i,description:d,footer:m,children:p,className:x,width:S}){let I=l.useRef(null),O=l.useCallback(()=>I.current?.closest(".dsham_settings")??document.body,[]),[A,N]=l.useState(null);l.useEffect(()=>{if(!n){N(null);return}N(O())},[n,O]),l.useEffect(()=>{if(!n)return;let u=e(he=>{he.key==="Escape"&&(he.preventDefault(),he.stopPropagation(),"stopImmediatePropagation"in he&&typeof he.stopImmediatePropagation=="function"&&he.stopImmediatePropagation(),r())},"onKey");return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[n,r]);let P=(0,a.jsxs)("div",{className:"dsham_modalRoot",role:"presentation",children:[(0,a.jsx)("div",{className:"dsham_modalMask",onClick:r}),(0,a.jsxs)("div",{role:"dialog","aria-modal":!0,"aria-label":typeof i=="string"?i:void 0,className:oa("dsham_modalDialog",x),style:{width:S??560},children:[(0,a.jsx)("h2",{children:i}),d!=null&&(0,a.jsx)("p",{children:d}),p!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:p}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:m})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{refObject:I,getContainer:O}),n&&A?ta(P,A):null]})}e(w,"SettingsModal");function D({refObject:n,getContainer:r}){return(0,a.jsx)("span",{hidden:!0,ref:n,"data-get-container":r})}e(D,"SettingsModalAnchor");function k({variant:n="outline",icon:r,children:i,className:d,disabled:m,title:p,onClick:x,"aria-label":S,"aria-pressed":I,"aria-expanded":O,"aria-haspopup":A}){return(0,a.jsx)(f.Button,{variant:n,size:"sm",className:d,disabled:m,title:p,onClick:x,"aria-label":S,"aria-pressed":I,"aria-expanded":O,"aria-haspopup":A,icon:r,children:i})}e(k,"settingsButton");function v({variant:n="outline",danger:r=!1,disabled:i,onClick:d,children:m}){return(0,a.jsx)(f.Button,{variant:r?"outline":n,className:r?"dsham_btnDanger":void 0,disabled:i,onClick:d,children:m})}e(v,"modalFooterButton");function C(n,r){let i={className:n?"dsham_archiveTabsLocked":void 0,children:r};return n&&(i.inert=""),i}e(C,"tabsShell");let _=Zs(l,f.Button),{HighlightedText:M,useArchiveSearch:B,useArchivePreview:F,DiscoveryFilters:H,SearchStatus:Pe,PreviewContent:re}=Is(l,{Button:f.Button,SegmentedControl:f.SegmentedControl}),se={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 ce(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 d of se[n]){let m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",d),i.append(m)}return r.append(i),r}e(ce,"createPluginUpdateIcon");let ae={parse(n){if(typeof n!="string"||n.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(n)}`);return n}},Le={parse(n){let r=ne(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(d=>typeof d!="string"))throw new TypeError("archivedSessionIds must be a string array");return r}},ue={parse(n){let r=ne(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=ne(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")}},Nt={parse(n){let r=ne(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(d=>typeof d!="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}},dt={parse(n){let r=ne(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}},U={parse(n){let r=ne(n);if(!r||typeof r.sessionId!="string"||!r.sessionId||typeof r.targetWorkspaceId!="string"||!r.targetWorkspaceId)throw new TypeError("sessionId and targetWorkspaceId must be non-empty strings");return{sessionId:r.sessionId,targetWorkspaceId:r.targetWorkspaceId}}},Ae={parse(n){let r=ne(n);if(!r||r.ok!==!0)throw new TypeError("session move result must be ok: true");return r}};function _e(n,r){return{mode:"strict",typeSymbol:n,create:e(()=>r,"create"),schema:r}}e(_e,"strictCodec");let qt={package:"@michengai/dsh-archive-manager",descriptors:[...Ks(),...ks(),...Ns(),{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",ae)}],result:_e("@michengai/dsh-archive-manager/types#ArchivedSessionIds",Le),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",ae)}],result:_e("@michengai/dsh-archive-manager/types#Deleted",ue),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",Nt),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",dt),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=ne(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=ne(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=ne(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}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/moveSessionToWorkspace",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"moveSessionToWorkspace",invocation:{kind:"direct"},parameters:[{name:"input",wire:"input",source:"json",codec:_e("@michengai/dsh-archive-manager/types#SessionMoveInput",U)}],result:_e("@michengai/dsh-archive-manager/types#SessionMoveResult",Ae),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]};function xt(n,r){if(typeof document>"u"||document.querySelector("style[data-plugin-css="+JSON.stringify(n)+"]")!==null)return;let i=document.createElement("style");i.dataset.plugin="@michengai/dsh-archive-manager",i.dataset.pluginCss=n,i.textContent=r,document.head.appendChild(i)}e(xt,"ensurePluginStyle"),xt("dsh-archive-manager/DangerButton.css",".dsham_btnDanger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272);border-color:var(--dsw-alias-state-error-primary,#ef7272)}"),xt("dsh-archive-manager/IconAction.css",".dsham_iconAction{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:22px!important;min-width:22px!important;height:22px!important;padding:0!important;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px)!important;background:transparent;color:var(--dsw-alias-label-secondary)}.dsham_iconAction:not(:disabled):hover{color:var(--dsw-alias-link,#4176e6)!important;border-color:var(--dsw-alias-link,#4176e6)!important}.dsham_iconAction.dsham_iconDanger{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction.dsham_iconDanger:not(:disabled):hover{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction svg{width:16px!important;height:16px!important;flex:none!important}"),xt("dsh-archive-manager/Modal.css",".dsham_modalRoot{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.dsham_modalMask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1,rgb(0 0 0 / 45%))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;max-width:calc(100vw - 48px);max-height:min(80vh,720px);padding:22px 24px 20px;overflow:hidden;border:0;border-radius:var(--dsw-radius-panel,28px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px}.dsham_modalDialog>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dsham_modalBody{display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}.dsham_modalFooter{display:flex;flex:none;align-items:center;justify-content:flex-end;gap:8px}"),xt("dsh-archive-manager/SidebarPopover.css",".dsham_sidebarCardRoot{position:fixed;inset:0;z-index:1200;pointer-events:none}.dsham_sidebarCardBackdrop{position:fixed;inset:0;pointer-events:auto;background:transparent}.dsham_sidebarCard{position:fixed;pointer-events:auto;box-sizing:border-box;width:290px;max-height:calc(100vh - 32px);overflow-y:auto;padding:16px 18px 14px;border-radius:var(--dsw-radius-lg,14px);background:var(--dsw-menu-surface-fill);backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));border:none;box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:8px}.dsham_sidebarCardTitle{margin:0;font-size:14px;font-weight:600;line-height:20px;color:var(--dsw-alias-label-primary)}.dsham_sidebarCardDesc{margin:0;font-size:13px;line-height:18px;color:var(--dsw-alias-label-secondary)}.dsham_sidebarCardError{margin-top:2px;font-size:12px;line-height:16px;color:var(--dsw-alias-state-error-primary,#ef7272);white-space:pre-line}.dsham_sidebarCardFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.dsham_sidebarCardBtn{border:none;background:transparent;padding:5px 12px;border-radius:var(--dsw-radius-sm,6px);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:background-color .15s ease,opacity .15s ease}.dsham_sidebarCardBtnCancel{color:var(--dsw-alias-label-primary)}.dsham_sidebarCardBtnCancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dsham_sidebarCardBtnDanger{color:var(--dsw-alias-state-error-primary,#ef7272)}.dsham_sidebarCardBtnDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,#f25a5a26)}.dsham_sidebarCardBtn:disabled{opacity:.4;cursor:default}"),xt("dsh-archive-manager/MoveSubmenu.css",".dsham_moveSessionWrap{position:relative}.dsham_moveSubmenu{position:fixed;z-index:99999;min-width:160px;max-width:260px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.25) transparent;background:var(--dsw-menu-surface-fill,var(--dsw-alias-surface-overlay,#1e1e22));backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));border:1px solid var(--dsw-alias-border-l1,rgba(255,255,255,0.12));border-radius:var(--dsw-radius-md,8px);box-shadow:var(--dsw-elevation-prominent,0 6px 20px rgba(0,0,0,0.45));padding:4px;display:flex;flex-direction:column;gap:2px}.dsham_moveSubmenu::-webkit-scrollbar{width:6px}.dsham_moveSubmenu::-webkit-scrollbar-track{background:transparent}.dsham_moveSubmenu::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.2);border-radius:3px}.dsham_moveSubmenu::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.35)}.dsham_moveSubmenuBtn{display:flex;align-items:center;width:100%;padding:6px 10px;border:none;border-radius:var(--dsw-radius-sm,6px);background:transparent;color:var(--dsw-alias-label-primary,#ededed);font:inherit;font-size:13px;line-height:20px;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background-color .12s ease}.dsham_moveSubmenuBtn:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,0.08))}.dsham_moveSubmenuBtn:focus-visible:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,0.08));outline:none}");let ie="M8 1.75l1.934 3.918 4.324.628-3.129 3.05.738 4.306L8 11.618l-3.867 2.034.738-4.306-3.129-3.05 4.324-.628L8 1.75z";function $e(n){return n?'<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="'+ie+'"/></svg>':'<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round" aria-hidden="true"><path d="'+ie+'"/></svg>'}e($e,"starSvg"),xt("dsh-archive-manager/RowFavorite.css",".dsham_starSlot{display:none;align-items:center;justify-content:center;box-sizing:border-box;width:16px;min-width:16px;height:20px;flex:none;margin:0 3px 0 0;order:-1}[data-row-key^='session:']>span:first-child{order:-2}[data-row-key^='session:']:hover .dsham_starSlot,.dsham_starSlot[data-favorited='true']{display:inline-flex}.dsham_rowStar{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:16px;height:16px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;border-radius:var(--dsw-radius-xs,4px)}.dsham_starSlot[data-favorited='true'] .dsham_rowStar{color:#e8b931}.dsham_rowStar svg{display:block;width:14px;height:14px;flex:none}");let on="dsh-archive-manager:workspace-favorites-only",Dt="data-dsham-favorites-hidden",wt="data-dsham-favorites-only",Rn="dsham_rowStar",Q="dsham_starSlot",Fe=["\u4EC5\u663E\u793A\u5DF2\u5F52\u6863","Archived only","\u0422\u043E\u043B\u044C\u043A\u043E \u0430\u0440\u0445\u0438\u0432\u043D\u044B\u0435"];xt("dsh-archive-manager/FavoritesFilter.css",`[data-dsham-favorites-hidden='true']{display:none!important}button[data-dsham-favorites-only='true'][data-active='true']::after{content:"\\2713";margin-left:auto;padding-left:12px;font-size:12px;line-height:1;color:var(--dsw-alias-state-business-primary,#3b82f6)}`);function ln(){try{return window.localStorage.getItem(on)==="1"}catch{return!1}}e(ln,"readWorkspaceFavoritesOnly");function na(n){try{window.localStorage.setItem(on,n?"1":"0")}catch{}}e(na,"writeWorkspaceFavoritesOnly");function Cr(n,r){let i=e(p=>r.favorites.has(p)||r.sessions?.[p]?.blank===!0,"visibleSession"),d=new Map,m=null;for(let p of n){if(p.startsWith("workspace:")){m=p,d.set(p,!1);continue}p.startsWith("session:")&&m!==null&&i(p.slice(8))&&d.set(m,!0)}return n.map(p=>p.startsWith("session:")?i(p.slice(8)):p.startsWith("workspace:")?d.get(p)===!0||r.groupHasFavorite?.(p.slice(10))===!0:!p.startsWith("overflow:"))}e(Cr,"favoritesOnlyVisibility");function Er(n,r){let i=new Map,d=new Set;for(let p of r){let x=!1;for(let S of p.sessionIds)d.add(S),n.has(S)&&(x=!0);i.set(p.workspaceId,x)}let m=!1;for(let p of n)if(!d.has(p)){m=!0;break}return p=>p===""||p==="ungrouped"?m:i.get(p)===!0}e(Er,"favoriteGroupPredicate");function ra(n,r,i){let d={dispose:e(()=>{},"dispose")};if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return d;let m=ln(),p=!1,x=!1,S=0,I=200,O=null,A=new Set,N=e(V=>{let Be=r.getSnapshot();for(let Re of V){let ge=Re.getAttribute("data-row-key")??"";if(!ge.startsWith("session:"))continue;let it=ge.slice(8);if((Array.from(Re.children).find(ee=>ee.tagName==="SPAN"&&Array.from(ee.classList).some(ot=>ot==="slot"||ot.endsWith("_slot")))??null)===null)continue;let W=Array.from(Re.children).find(ee=>ee.classList.contains(Q))??null;if(!Be.ready){W?.remove();continue}W!==null&&(W.parentElement!==Re||W.nextElementSibling!==null)&&Re.appendChild(W),W===null&&(W=document.createElement("span"),W.className=Q,Re.appendChild(W)),W.dataset.sessionId=it;let q=W.querySelector("."+Rn);q===null&&(q=document.createElement("button"),q.type="button",q.className=Rn,q.addEventListener("click",ee=>{ee.preventDefault(),ee.stopPropagation(),r.toggle(W?.dataset.sessionId??"")}),W.appendChild(q));let Xe=Be.ids.has(it);if(W.dataset.favorited===String(Xe))continue;let Ge=i()(Xe?"organizer.unfavorite":"organizer.favorite");W.dataset.favorited=String(Xe),q.setAttribute("aria-pressed",String(Xe)),q.setAttribute("aria-label",Ge),q.title=Ge,q.innerHTML=$e(Xe)}},"ensureRowStars"),P=e(V=>{let Be=r.getSnapshot();if(!m||!Be.ready){for(let W of V)W.hasAttribute(Dt)&&W.removeAttribute(Dt);S=0,O=null,A.clear();return}let Re=V.map(W=>W.getAttribute("data-row-key")??""),ge=Er(Be.ids,n.workspaces.list?.getSnapshot?.()?.items??[]),it=Cr(Re,{favorites:Be.ids,sessions:n.sessions.list?.getSnapshot?.()?.byId,groupHasFavorite:ge});O!==null&&(V.length<=O.rows&&A.add(O.key),O=null);let ht=!1;if(S<I)for(let W=0;W<V.length;W+=1){let q=V[W],Xe=Re[W];if(!Xe.startsWith("overflow:")||q.getAttribute("aria-expanded")!=="false")continue;let Ge=Xe.slice(9);if(!(A.has(Ge)||!ge(Ge))){try{q.click(),S+=1,O={key:Ge,rows:V.length},ht=!0}catch(ee){console.warn("archive-manager: favorites-only expand failed",ee)}break}}for(let W=0;W<V.length;W+=1){let q=V[W];it[W]?q.hasAttribute(Dt)&&q.removeAttribute(Dt):q.setAttribute(Dt,"true")}ht&&fe()},"applyVisibility"),u=e(V=>{let Be=V.parentElement;if(Be===null)return null;let Re=Be.cloneNode(!0),ge=Re.querySelector('button[role="menuitem"]');if(ge===null)return null;let it=Array.from(ge.querySelectorAll("span")),ht=it[0]??null,W=it[it.length-1]??null;ht!==null&&(ht.innerHTML=$e(!1)),W!==null&&(W.textContent=i()("organizer.favoritesOnly"));for(let q of Array.from(ge.querySelectorAll("svg")))q.closest("span")===null&&q.remove();return ge.setAttribute(wt,"true"),ge.setAttribute("role","menuitemcheckbox"),ge.dataset.active=String(m),ge.setAttribute("aria-checked",String(m)),ge.setAttribute("aria-label",i()("organizer.favoritesOnly")),ge.onclick=q=>{q.preventDefault(),q.stopPropagation(),pe(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0}))},Re},"buildMenuRow"),he=e(()=>{if(!p){for(let V of Array.from(document.querySelectorAll("button["+wt+"]")))V.dataset.active=String(m),V.setAttribute("aria-checked",String(m));for(let V of Array.from(document.querySelectorAll('[role="menu"]'))){let Be=Array.from(V.querySelectorAll('button[role="menuitem"]')).find(it=>Fe.some(ht=>(it.textContent??"").includes(ht)));if(Be===void 0||V.querySelector("["+wt+"]")!==null)continue;let Re=Be.parentElement;if(Re===null)continue;let ge=u(Be);ge!==null&&Re.parentElement?.insertBefore(ge,Re.nextSibling)}}},"injectMenuRows"),fe=e(()=>{if(x||p)return;x=!0;let V=e(()=>{if(x=!1,p)return;let Be=Array.from(document.querySelectorAll("[data-row-key]"));he(),N(Be),P(Be),r.getSnapshot().ready||Ct()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(V):setTimeout(V,16)},"schedulePass"),pe=e(()=>{m=!m,ut=20,S=0,O=null,A.clear(),na(m),fe()},"toggle"),Ye=null,ut=20,Ct=e(()=>{Ye!==null||p||ut<=0||(ut-=1,Ye=setTimeout(()=>{Ye=null,r.ensure(),fe()},600))},"scheduleRetry"),Z=new MutationObserver(V=>{Mn(V,'[data-row-key], [role="menu"]')&&fe()});Z.observe(document.body,{childList:!0,subtree:!0}),r.ensure().catch(()=>{});let Ee=[r.subscribe(()=>fe()),typeof n.sessions.list?.subscribe=="function"?n.sessions.list.subscribe(()=>fe()):null,typeof n.workspaces.list?.subscribe=="function"?n.workspaces.list.subscribe(()=>fe()):null].filter(V=>typeof V=="function");return fe(),{dispose(){p=!0,Z.disconnect();for(let V of Ee)V();for(let V of Array.from(document.querySelectorAll("["+Dt+"]")))V.removeAttribute(Dt);for(let V of Array.from(document.querySelectorAll("["+wt+"]")))V.parentElement?.remove();for(let V of Array.from(document.querySelectorAll("."+Q)))V.remove();Ye!==null&&(clearTimeout(Ye),Ye=null)}}}e(ra,"setupWorkspaceFavoritesOnly");function Ir(){let n,r={ready:!1,ids:new Set,pending:new Set},i,d=0,m=new Set,p=e(S=>{r=S;for(let I of m)try{I()}catch(O){console.warn("archive-manager: favorite listener failed",O)}},"publish"),x=e((S,I)=>{let O=new Set(S);for(let u of r.pending)u!==I&&(r.ids.has(u)?O.add(u):O.delete(u));let A=new Set(r.pending);I!==void 0?A.delete(I):r.pending.size===0&&A.clear();let N=r.ids.size===O.size&&[...O].every(u=>r.ids.has(u)),P=r.pending.size===A.size&&[...A].every(u=>r.pending.has(u));N&&P&&r.ready||p({ready:!0,ids:O,pending:A})},"adopt");return{bind(S){n=S},subscribe(S){return m.add(S),()=>{m.delete(S)}},getSnapshot:e(()=>r,"getSnapshot"),adopt:e(S=>x(S),"adopt"),ensure(){return n===void 0||r.ready?Promise.resolve():i!==void 0?i:Date.now()<d?Promise.resolve():(i=n.favoriteSessions().then(S=>{x(S.favoriteSessionIds)}).catch(S=>{console.warn("archive-manager: load favorites failed, will retry",S),d=Date.now()+600}).finally(()=>{i=void 0}),i)},async toggle(S){if(n===void 0||!r.ready||r.pending.has(S))return;let I=r.ids.has(S),O=!I,A=new Set(r.ids);O?A.add(S):A.delete(S);let N=new Set(r.pending);N.add(S),p({ready:!0,ids:A,pending:N});try{let P=await n.setSessionFavorite({sessionId:S,favorite:O});if(!Array.isArray(P?.favoriteSessionIds))throw new TypeError("favorite response is missing favoriteSessionIds");x(P.favoriteSessionIds,S)}catch(P){console.warn("archive-manager: sidebar favorite toggle failed",P);let u=new Set(r.ids);I?u.add(S):u.delete(S);let he=new Set(r.pending);he.delete(S),p({ready:!0,ids:u,pending:he})}}}}e(Ir,"createFavoriteRowStore");function Tn(n){let r=new Map;for(let i of Object.values(n)){if(i.origin!=="subagent")continue;let d=new Set,m=i;for(;m?.origin==="subagent"&&m.parentId!==void 0&&!d.has(m.id);){d.add(m.id);let p=r.get(m.parentId);p===void 0?r.set(m.parentId,{count:1,runningCount:i.running?1:0}):(p.count+=1,i.running&&(p.runningCount+=1)),m=n[m.parentId]}}return r}e(Tn,"indexSubagentDescendants");let _i="__flat_session_order__",_n="dsh.archive-manager.workspace.view.v1",Ar="dsh.workspace.view.v5";function Rr(n){let r=n??globalThis.localStorage;if(r==null||typeof r.getItem!="function"||typeof r.setItem!="function")return!1;try{if(r.getItem(_n)!=null)return!1;let i=r.getItem(Ar);return i==null?!1:(r.setItem(_n,i),!0)}catch{return!1}}e(Rr,"migrateWorkspaceViewPersist");function sa(){return Rr(),(0,y.defineStore)({init:e(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:_n,actions:{setGroupBy:e((n,r)=>{n.groupBy=r},"setGroupBy"),setOrderBy:e((n,r)=>{n.orderBy=r},"setOrderBy"),setShowArchived:e((n,r)=>{n.showArchived=r===!0},"setShowArchived"),setGroupExpanded:e((n,r,i)=>{n.groupExpansion[r]=i},"setGroupExpanded"),retainAccountKeys:e((n,r)=>{let i=new Set(r);n.groupExpansion=Object.fromEntries(Object.entries(n.groupExpansion).filter(([d])=>i.has(d))),n.sessionOrderByAccount=Object.fromEntries(Object.entries(n.sessionOrderByAccount).filter(([d])=>i.has(d))),n.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(n.sessionUpdatedAtByAccount).filter(([d])=>i.has(d)))},"retainAccountKeys"),syncSessionOrderAccount:e((n,r,i,d)=>{n.sessionOrderByAccount[r]=i,n.sessionUpdatedAtByAccount[r]=d},"syncSessionOrderAccount"),setSessionOrder:e((n,r,i)=>{n.sessionOrderByAccount[r]=i},"setSessionOrder")}})}e(sa,"createWorkspaceViewStore");function aa(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,a.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}e(aa,"GithubMark16");function ia(){let n=f.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}e(ia,"FeedbackIcon");function Gn({archiveSessions:n,archiveSession:r,sessionStore:i,workspaceStore:d,unarchiveSession:m,deleteSession:p,unarchiveSessions:x,deleteArchivedSessions:S,archivedSessionMetadata:I,openConversation:O,focusSessionWorkspace:A,viewState:N,close:P,t:u,diagnoseOrphanSubagents:he,cleanOrphanSubagents:fe,diagnoseSessionCaches:pe,rebuildSessionCaches:Ye,refreshCacheLists:ut,searchSessionContent:Ct,searchArchivedContent:Z,previewArchivedSession:Ee,favoriteSessions:V,setSessionFavorite:Be,favoriteSync:Re,organizeBatch:ge,useSessionPendingInteraction:it,useSessionStatus:ht}){let W=(0,l.useSyncExternalStore)(i.subscribe,i.getSnapshot),q=(0,l.useSyncExternalStore)(d.subscribe,d.getSnapshot),[Xe,Ge]=(0,l.useState)("archived"),ee=Xe==="archived",[ot,lt]=(0,l.useState)(null),[un,Et]=(0,l.useState)(null),[It,St]=(0,l.useState)(null),Pt=e((c,E=null)=>{Y(null),Ve(null),xe(!1),Et(E),lt(c)},"requestArchive"),hn=e(()=>{G||(lt(null),Et(null),Y(null))},"closeArchive"),At=(0,l.useRef)(!1),[je,Lt]=(0,l.useState)(null),pn=(0,l.useRef)(!1),[G,qe]=(0,l.useState)(!1),[pt,Y]=(0,l.useState)(null),[zn,Ve]=(0,l.useState)(null),Zt=e(c=>{Y(null),Ve(null),Lt(c)},"requestDelete"),[Rt,Jt]=(0,l.useState)(N?.query??""),[ct,Ft]=(0,l.useState)(N?.project??"all"),[Tt,mn]=(0,l.useState)(N?.sortBy??"updated"),[fn,gn]=(0,l.useState)({}),[Bt,Pn]=(0,l.useState)(()=>new Set),vt=(0,l.useRef)(new Set),[yt,mt]=(0,l.useState)([]),[g,b]=(0,l.useState)([]),[R,$]=(0,l.useState)(!1),[Ie,de]=(0,l.useState)(!1),De=(0,l.useRef)(!1),[Ne,ve]=(0,l.useState)(!1),[Ue,Ze]=l.useState("content"),[nt,ft]=l.useState(""),[te,oe]=l.useState(""),[z,le]=(0,l.useState)(()=>new Set),[Te,ke]=(0,l.useState)("30"),[Je,xe]=(0,l.useState)(!1),[ye,be]=(0,l.useState)(null),[Ce,J]=(0,l.useState)(null),[Me,bt]=(0,l.useState)([]),Oe=(0,l.useRef)(!1),Qe=(0,l.useRef)(null),me=ga(it??pa,ht??ma,typeof ht=="function"),Ot=(0,l.useRef)(me.pending);Ot.current=me.pending;let rt=(0,l.useMemo)(()=>new Set(g),[g]),Xt=e(async()=>{if(V)try{let c=await V();b(c.favoriteSessionIds),$(!0),Re?.adopt(c.favoriteSessionIds)}catch(c){$(!1),Y(We(c))}},"loadFavorites");(0,l.useEffect)(()=>{let c=!0;return V&&V().then(E=>{c&&(b(E.favoriteSessionIds),$(!0),Re?.adopt(E.favoriteSessionIds))}).catch(E=>{c&&Y(We(E))}),()=>{c=!1}},[V]),(0,l.useEffect)(()=>{if(Re)return Re.subscribe(()=>{let c=Re.getSnapshot();c.ready&&(b([...c.ids]),$(!0))})},[Re]);let vn=e(async c=>{if(!(De.current||G||!R)){De.current=!0,de(!0),Y(null);try{let E=await Be({sessionId:c,favorite:!rt.has(c)});b(E.favoriteSessionIds),Re?.adopt(E.favoriteSessionIds)}catch(E){Y(We(E))}finally{De.current=!1,de(!1)}}},"toggleFavorite"),He=e(async(c,E,{idle:K=!1,retry:we=!1}={})=>{if(!(Oe.current||De.current||vt.current.size>0||!ge)){Oe.current=!0,qe(!0),Y(null),Ve(null),J(null),c==="archive"&&!we&&bt([]);try{let j=await ge(c,E,{idleDays:K?Number(Te):void 0,getPending:e(()=>Ot.current,"getPending"),onProgress:e(Se=>{be(Se),c==="archive"&&Se.total>0&&Se.done>=Se.total&&(lt(null),Et(null),xe(!1))},"onProgress")});return J({...j,kind:c,tab:Xe}),Qe.current=j.remaining.length?{kind:c,ids:j.remaining,idle:K}:null,c==="archive"&&bt(Se=>[...new Set([...Se,...j.succeeded])]),(c==="undo"||c==="restore"||c==="delete")&&bt(Se=>Se.filter(st=>!j.succeeded.includes(st)&&!j.skipped.includes(st))),mt(Se=>Se.filter(st=>!j.succeeded.includes(st)&&!j.skipped.includes(st))),c==="delete"&&b(Se=>Se.filter(st=>!j.succeeded.includes(st))),j}catch(j){Y(We(j))}finally{Oe.current=!1,qe(!1),be(null)}}},"executeBatch"),[tt,Qt]=(0,l.useState)(null),[en,yn]=(0,l.useState)({diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null}),ze=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!pe||!Ye||!ut)return;let c=Ds({diagnose:pe,rebuild:Ye,refresh:ut});ze.current=c;let E=c.subscribe(()=>{yn(c.snapshot())});return c.load(),()=>{E(),c.dispose(),ze.current=null}},[pe,Ye,ut]),(0,l.useEffect)(()=>{ze.current?.snapshot().busy||ze.current?.load()},[q.archivedSessionIds]);let Gt=e(async(c=!1)=>{if(!(G||Oe.current||!ze.current||ze.current.snapshot().busy)){Oe.current=!0,qe(!0);try{await ze.current.run(c)}finally{Oe.current=!1,_t.current&&qe(!1)}}},"runCacheRebuild"),[tn,Ut]=(0,l.useState)(!1),$t=e(()=>{typeof he=="function"&&he().then(Qt).catch(c=>{console.warn("archive-manager: diagnose orphan subagents failed",c)})},"loadOrphans");(0,l.useEffect)(()=>{$t()},[q.archivedSessionIds]);let Pa=e(async()=>{if(!(tn||typeof fe!="function")){Ut(!0),Y(null),Ve(null);try{let c=await fe({});(c.cleanedSessionIds.length>0||c.skippedSessionIds.length>0)&&$t(),c.failures.length>0?(Ve(null),Y(Nn(c.failures,u))):c.cleanedSessionIds.length>0&&(Y(null),Ve(u("organizer.orphanCleanSuccess",{n:c.cleanedSessionIds.length})))}catch(c){Y(We(c))}finally{Ut(!1)}}},"cleanOrphans"),_t=(0,l.useRef)(!0),ar=(0,l.useRef)(!1);(0,l.useEffect)(()=>(_t.current=!0,()=>{_t.current=!1}),[]);let Ln=e(async(c,E=!1)=>{if(G||ar.current)return;ar.current=!0,qe(!0),Y(null);let K=!1;try{await Os({prepare:E?async we=>{await A?.(we)}:void 0,restore:e(async we=>{await m(we),K=!0},"restore"),open:e(async we=>{await O(we),_t.current&&P?.()},"open")},c.id,E,()=>_t.current)}catch(we){if(!_t.current)return;if(K){Ge("unarchived");let j=Ht.find(Se=>Se.sessions.some(st=>st.id===c.id));j!==void 0&&Ft(j.key)}Y(Ms(we,u))}finally{ar.current=!1,_t.current&&qe(!1)}},"viewConversation");(0,l.useEffect)(()=>{N&&Object.assign(N,{query:Rt,project:ct,sortBy:Tt})},[Rt,ct,Tt,N]);let Fn=(0,l.useMemo)(()=>ee?q.archivedSessionIds:Zr(W.byId,q.archivedSessionIds),[ee,W.byId,q.archivedSessionIds]),Ht=(0,l.useMemo)(()=>Jr(W.byId,q.items,Fn,u("group.ungrouped")),[W.byId,q,Fn,u]),La=e(c=>{G||vt.current.size>0||(kt.close(),Ge(c),mt([]),lt(null),Et(null),Y(null),Ve(null),Ft("all"),Jt(""),c!=="archived"&&Tt==="archived"&&mn("updated"))},"switchTab"),rs=e(async(c,E=!1)=>{if(!(At.current||G||!c?.length)){if(ge){At.current=!0;try{let K=await He("archive",c,{idle:E}),we=K?.failures.map(j=>Dr(j.sessionId,j.message)).find(j=>j!==void 0);if(we!==void 0&&typeof r=="function"){let j=W.byId[we.sessionId];St({sessionId:we.sessionId,title:j===void 0?we.sessionId:et(j,u),kinds:we.kinds.join(", ")}),lt(null),Et(null),Y(null);return}K&&(lt(null),Et(null),xe(!1))}finally{At.current=!1}return}At.current=!0,qe(!0),Y(null),Ve(null);try{let K=await n(c);lt(null),Et(null),K.archivedSessionIdsAdded.length>0&&Ve(u("archives.archiveSuccess",{n:K.archivedSessionIdsAdded.length})),K.failures&&K.failures.length>0?Y(Nn(K.failures,u)):(mt([]),Ge("archived"),Ft("all"),Jt(""))}catch(K){let we=Nr(K);if(we!==void 0&&typeof r=="function"){let j=W.byId[we.sessionId];St({sessionId:we.sessionId,title:j===void 0?we.sessionId:et(j,u),kinds:we.kinds.join(", ")}),lt(null),Et(null),Y(null)}else{let j=Dn(K);Y(j===void 0?u("archives.archiveBatchFailed",{detail:K instanceof Error?K.message:String(K)}):u("archives.archiveActive",{kinds:j.join(", ")}))}}finally{At.current=!1,qe(!1)}}},"performArchive"),Fa=e(()=>rs(ot,Je),"confirmArchive"),Ba=e(async c=>{Y(null),Ve(null);try{await mr(c.id),_t.current&&Ve(u("details.copied"))}catch(E){_t.current&&Y(typeof Un(E)=="string"&&String(Un(E)).startsWith("copy.")?u(String(Un(E))):We(E))}},"copyId"),ir=(0,l.useMemo)(()=>Xr(Ht,Tt,fn,u,ee?q.archivedSessionIds:void 0),[Ht,Tt,fn,u,ee,q.archivedSessionIds]);(0,l.useEffect)(()=>{if(G)return;let c=!1;return I().then(E=>{c||gn(Object.fromEntries(E.items.map(K=>[K.sessionId,K.createdAt])))}).catch(()=>{c||gn({})}),()=>{c=!0}},[I,q.archivedSessionIds,G]),(0,l.useEffect)(()=>{ct!=="all"&&!Ht.some(c=>c.key===ct)&&Ft("all")},[Ht,ct]);let ss=!fr(nt,te),as=ir.filter(c=>ct==="all"||ct===c.key).map(c=>({...c,sessions:c.sessions.filter(E=>(!Ne||rt.has(E.id))&&Cs(E.updatedAt,nt,te))})).filter(c=>c.sessions.length),or=Ue==="content"&&!ss,bn=B(as.flatMap(c=>c.sessions.map(E=>E.id)),Rt,or,Ct??Z),lr=new Map(bn.items.map(c=>[c.sessionId,c])),kt=F(Ee,ee?q.archivedSessionIds:[]),is=Rt.trim().toLocaleLowerCase(),wn=as.map(c=>({...c,sessions:c.sessions.filter(E=>!is||et(E,u).toLocaleLowerCase().includes(is)||lr.has(E.id))})).filter(c=>c.sessions.length),os=R?wn.flatMap(c=>c.sessions).filter(c=>kr(c,{days:Number(Te),favorites:rt,currentId:jt(W),pending:me.pending})).map(c=>c.id):[],Sn=(0,l.useMemo)(()=>$r(wn),[wn]),cr=(0,l.useMemo)(()=>new Set(yt),[yt]),Ua=(0,l.useMemo)(()=>{let c=new Set(q.archivedSessionIds);return Me.reduce((E,K)=>E+(c.has(K)?1:0),0)},[Me,q.archivedSessionIds]),dr=Sn.filter(c=>cr.has(c)).length,Ha=Sn.length>0&&dr===Sn.length;(0,l.useEffect)(()=>{mt(c=>Kr(c,Fn))},[Fn]);let Wa=e((c,E)=>{mt(K=>nr(K,[c],E))},"toggleSessionSelection"),qa=e(c=>{mt(E=>nr(E,Sn,c))},"toggleVisibleSelection"),Va=e(c=>{G||vt.current.has(c)||(vt.current.add(c),Pn(new Set(vt.current)),Y(null),Ve(null),m(c).catch(E=>{Y(_r(E,u))}).finally(()=>{vt.current.delete(c),Pn(new Set(vt.current))}))},"onUnarchive"),ls=e(async c=>{if(!G){if(ge){let E=dn(q.archivedSessionIds,q.items,c),K=await He("restore",E);return K&&{unarchivedSessionIds:K.succeeded}}qe(!0),Y(null),Ve(null);try{let E=await x(c);return E.unarchivedSessionIds.length>0&&Ve(u("archives.restoreSuccess",{n:E.unarchivedSessionIds.length})),E.failures&&E.failures.length>0&&Y(Nn(E.failures,u,_r)),E}catch(E){Y(u("archives.restoreBatchFailed",{detail:E instanceof Error?E.message:String(E)}))}finally{qe(!1)}}},"onBatchUnarchive"),Ga=e(async()=>{if(yt.length===0)return;let c=await ls({scope:"sessions",sessionIds:yt});if(c!==void 0){let E=new Set(c.unarchivedSessionIds);mt(K=>K.filter(we=>!E.has(we)))}},"onSelectedUnarchive"),cs=e(()=>{G||Lt(null)},"closeDelete");(0,l.useEffect)(()=>{if(je===null)return;let c=e(E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),"stopImmediatePropagation"in E&&typeof E.stopImmediatePropagation=="function"&&E.stopImmediatePropagation(),G||Lt(null))},"onKeyDown");return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[je,G]);let $a=e(async()=>{if(G||pn.current||je===null)return;if(je.kind!=="batch"){pn.current=!0,qe(!0),Y(null),Ve(null);try{await p(je.session.id),Lt(null)}catch(E){Y(Kn(E,u))}finally{pn.current=!1,qe(!1)}return}if(Oe.current||De.current||vt.current.size>0)return;let{target:c}=je;if(c.scope==="sessions"&&dn(q.archivedSessionIds,q.items,c).length===0){Lt(null);return}Oe.current=!0,qe(!0),Y(null),Ve(null),J(null),be(null);try{let E=await S(c),K=Yr(E,u);K.kind==="error"?Y(K.message):Ve(K.message);let we=new Set([...E.deletedSessionIds,...E.skippedSessionIds]);bt(Se=>Se.filter(st=>!we.has(st))),mt(Se=>Se.filter(st=>!we.has(st))),b(Se=>Se.filter(st=>!we.has(st)));let j=E.failures.map(Se=>Se.sessionId);Qe.current=j.length>0?{kind:"delete",ids:j,idle:!1}:null,J({requested:E.requestedSessionIds,succeeded:E.deletedSessionIds,skipped:E.skippedSessionIds,failures:E.failures,remaining:j,refreshError:"refreshError"in E&&typeof E.refreshError=="string"?E.refreshError:null,kind:"delete",tab:Xe}),Lt(null)}catch(E){Y(Kn(E,u))}finally{Oe.current=!1,qe(!1)}},"confirmDelete"),zt=je?.kind==="batch"?je.target.scope:null,Ka=zt==="ungrouped"?u("archives.deleteUngroupedTitle"):zt==="workspace"?u("archives.deleteProjectTitle",{name:je?.kind==="batch"?je.title:""}):u(zt==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),ds=je===null?void 0:zt==="ungrouped"?u("archives.deleteUngroupedDesc",{n:je.kind==="batch"?je.count:0}):zt==="workspace"?u("archives.deleteProjectDesc",{name:je?.kind==="batch"?je.title:"",n:je.kind==="batch"?je.count:0}):zt==="sessions"?u("archives.deleteSelectedDesc",{n:je.kind==="batch"?je.count:0}):u("deleteSession.desc",{name:et(je.kind==="session"?je.session:{},u)}),Ya=u(zt==="ungrouped"?"archives.deleteUngroupedConfirm":zt==="workspace"?"archives.deleteProjectConfirm":zt==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":u("archives.title"),children:[(0,a.jsx)("style",{children:Sa+Ca+Ea+Ia+Aa}),(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:u("archives.title")}),(0,a.jsxs)("div",{className:"dsham_settingsLinks",children:[(0,a.jsx)(f.Button,{variant:"outline",size:"sm","aria-label":u("archives.viewProject"),icon:(0,a.jsx)(aa,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:u("archives.viewProject")}),(0,a.jsx)(f.Button,{variant:"outline",size:"sm","aria-label":u("archives.feedback"),icon:(0,a.jsx)(ia,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:u("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:u("archives.description")})]}),l.createElement("div",C(G||Bt.size>0,(0,a.jsx)(f.SegmentedTabs,{className:"dsham_archiveTabs",label:u("archives.title"),value:Xe==="unarchived"?"unarchived":"archived",onChange:e(c=>La(c==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(f.IconArchiveOutlineMedium,{size:14}),(0,a.jsx)("span",{children:u("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)(f.IconFolderCloseMedium,{size:14}),(0,a.jsx)("span",{children:u("archives.tab.unarchived")})]}),id:"dsham-tab-unarchived",panelId:"dsham-archive-panel"}]})))]}),(0,a.jsxs)("div",{id:"dsham-archive-panel",role:"region","aria-label":u(Xe==="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)(tr,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:Ne?"favorites":"all",options:[{value:"all",label:u("organizer.allSessions")},{value:"favorites",label:u("organizer.favoritesOnly")}],onChange:e(c=>typeof ve=="function"&&ve(c==="favorites"),"onChange"),"aria-label":u("organizer.favoriteFilter")}),(0,a.jsx)(tr,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:Ue,options:[{value:"title",label:u("discovery.titleOnly")},{value:"content",label:u("discovery.titleAndContent")}],onChange:e(c=>typeof Ze=="function"&&Ze(c),"onChange"),"aria-label":u("discovery.scope")}),(0,a.jsx)(f.Input,{id:"dsham-search-input",className:"dsham_searchField",type:"search",icon:(0,a.jsx)(f.IconSearchOutlineMedium,{size:16,"aria-hidden":!0}),autoComplete:"off",spellCheck:!1,maxLength:200,value:Rt,onChange:e(c=>Jt(c.target.value),"onChange"),placeholder:u(or?"discovery.searchPlaceholder":ee?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":u(or?"discovery.searchPlaceholder":ee?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)(Ra,{id:"dsham-sort-filter",t:u,disabled:G,favoritesOnly:Ne,setFavoritesOnly:ve,favoriteBusy:G||Ie||!R,sortBy:!ee&&Tt==="archived"?"updated":Tt,setSortBy:mn,options:[...ee?[{value:"archived",label:u("archives.sortArchived")}]:[],{value:"updated",label:u("archives.sortUpdated")},{value:"created",label:u("archives.sortCreated")},{value:"alphabetical",label:u("archives.sortAlphabetical")}]}),(0,a.jsx)(tr,{id:"dsham-project-filter",className:"dsham_projectFilter",value:ct,title:ct==="all"?u("archives.allProjects"):ir.find(c=>c.key===ct)?.title??ct,options:[{value:"all",label:u("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:u("archives.allProjects")},...ir.map(c=>({value:c.key,label:c.title,title:c.title}))],onChange:Ft,"aria-label":u("archives.projectFilter")}),l.createElement(H,{t:u,from:nt,to:te,onFrom:ft,onTo:oe,invalid:ss,onClear:e(()=>{ft(""),oe("")},"onClear")})]})}),l.createElement("style",null,As),l.createElement(Pe,{state:bn,t:u}),ge&&(0,a.jsx)(_,{t:u,archived:ee,busy:G||Ie||Bt.size>0,ready:R,days:Te,onDays:ke,count:os.length,onPreview:e(()=>{Pt(os),xe(!0)},"onPreview"),progress:ye,result:Ce?.tab===Xe?Ce:null,onRetry:e(()=>{let c=Qe.current;c&&(c.kind==="delete"?Zt({kind:"batch",target:{scope:"sessions",sessionIds:c.ids},count:c.ids.length}):He(c.kind,c.ids,{idle:c.idle,retry:!0}))},"onRetry"),undoCount:Ua,onUndo:e(()=>He("undo",Me,{retry:!0}),"onUndo"),onReload:Xt,orphanCount:tt?.count??0,cacheCount:en.diagnosis.count,cacheRepair:en,onRebuildCaches:e(()=>Gt(),"onRebuildCaches"),onRetryCaches:e(()=>Gt(!0),"onRetryCaches"),onReloadCaches:e(async()=>{try{await ut?.(),await ze.current?.load(),(ze.current?.snapshot().diagnosis.count??0)===0&&ze.current?.dismiss()}catch(c){_t.current&&Y(We(c))}},"onReloadCaches"),onDismissCaches:e(()=>ze.current?.dismiss(),"onDismissCaches"),orphanSizeBytes:tt?.totalSizeBytes??0,orphanCleaning:tn,onCleanOrphans:Pa}),Ht.length>0&&(0,a.jsx)(qr,{selectedCount:yt.length,hiddenCount:yt.length-dr,allVisibleSelected:Ha,selectedVisibleCount:dr,visibleCount:Sn.length,busy:G,t:u,onToggle:qa,onClear:e(()=>mt([]),"onClear"),onArchive:ee?void 0:()=>Pt([...yt]),onRestore:Ga,onDelete:e(()=>Zt({kind:"batch",target:{scope:"sessions",sessionIds:yt},count:yt.length}),"onDelete")}),Ht.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:u(ee?"archives.empty":"archives.emptyUnarchived")}):wn.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:bn.status==="loading"||bn.status==="error"||bn.failures.length?null:u("archives.emptyFiltered")}):wn.map(c=>{let E=ja(c.key),K=Ht.find(j=>j.key===c.key)?.sessions.map(j=>j.id)??[],we=ee?dn(q.archivedSessionIds,q.items,E).length:K.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":!z.has(c.key),"aria-controls":"dsham-group-"+encodeURIComponent(c.key),onClick:e(()=>le(j=>{let Se=new Set(j);return Se.has(c.key)?Se.delete(c.key):Se.add(c.key),Se}),"onClick"),children:[(0,a.jsx)(z.has(c.key)?f.IconChevronRightOutlineMedium:f.IconChevronDownOutlineMedium,{}),(0,a.jsx)(f.IconFolderOpenOutlineMedium,{}),(0,a.jsx)("span",{children:c.title})]})}),(0,a.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,a.jsx)("span",{className:"dsham_settingsCount",children:u("archives.sessionCount",{n:c.sessions.length})}),(0,a.jsx)(_a,{group:c,busy:G,onArchive:ee?void 0:()=>Pt(K,c),onRestore:e(()=>ls(E),"onRestore"),onDelete:e(()=>Zt({kind:"batch",target:E,title:c.title,count:we}),"onDelete"),t:u})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(c.key),hidden:z.has(c.key)||void 0,children:!z.has(c.key)&&c.sessions.map(j=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":cr.has(j.id),children:[(0,a.jsx)(Vr,{checked:cr.has(j.id),disabled:G,label:u("archives.selectSession",{name:et(j,u)}),onChange:e(Se=>Wa(j.id,Se.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:et(j,u),"aria-label":u("archives.openSession")+u("common.separator")+et(j,u),disabled:G||Bt.has(j.id),onClick:e(()=>Ln(j),"onClick"),children:et(j,u)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[wa(j.updatedAt,u)]}),lr.has(j.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:G,title:u(ee?"discovery.preview":"archives.openSession"),onClick:e(()=>ee?kt.open(j,Rt):Ln(j),"onClick")},l.createElement(M,{text:lr.get(j.id)?.snippet??"",query:Rt}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof Be=="function"&&k({variant:"outline",className:"dsham_iconAction"+(rt.has(j.id)?" dsham_favoriteOn":""),title:u(rt.has(j.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":rt.has(j.id),"aria-label":u(rt.has(j.id)?"organizer.unfavorite":"organizer.favorite")+u("common.separator")+et(j,u),disabled:G||Ie||!R,onClick:e(()=>vn(j.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:rt.has(j.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:ie})})}),k({variant:"outline",className:"dsham_iconAction",title:u(ee?"archives.restore":"archives.archiveSelected"),"aria-label":u(ee?"archives.restore":"archives.archiveSelected"),disabled:G||Bt.has(j.id),onClick:e(()=>ee?Va(j.id):rs([j.id]),"onClick"),icon:(0,a.jsx)(ee?f.IconRefreshOutlineMedium:f.IconArchiveOutlineMedium,{size:16})}),ee&&(0,a.jsx)(Ta,{busy:G||Bt.has(j.id),t:u,title:et(j,u),onCopyId:e(()=>Ba(j),"onCopyId"),onPreview:typeof Ee=="function"?()=>kt.open(j,Rt):void 0,onRestoreOpen:e(()=>Ln(j,!0),"onRestoreOpen"),onDelete:e(()=>Zt({kind:"session",session:j}),"onDelete")})]})]},j.id))})]},c.key)}),l.createElement(w,{width:900,open:kt.target!==null,onClose:kt.close,title:kt.target?et(kt.target.session,u):u("discovery.preview"),footer:v({variant:"primary",disabled:G,onClick:e(()=>{if(kt.target){let c=kt.target.session;return kt.close(),Ln(c)}},"onClick"),children:u("discovery.openFull")}),children:l.createElement(re,{preview:kt,t:u,MarkdownText:f.MarkdownText})}),ot===null&&pt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:pt}),zn!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:zn}),(0,a.jsx)(w,{open:ot!==null,onClose:hn,title:u("archives.archiveTitle",{n:ot?.length??0}),description:un===null?u("archives.archiveSelectedDesc"):u(un.key===On?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:un.title,n:ot?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:G,onClick:hn,children:u("cancel")}),v({variant:"primary",disabled:G||!ot?.length,onClick:Fa,children:u("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[ge&&(0,a.jsx)("p",{children:u(Je?"organizer.idleConfirm":"organizer.manualConfirm")}),ge&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(ot??[]).map(c=>(0,a.jsxs)("label",{children:[(0,a.jsx)(ur,{checked:!0,disabled:G,label:et(W.byId[c]??{id:c},u),onChange:e(()=>lt(E=>(E??[]).filter(K=>K!==c)),"onChange")}),et(W.byId[c]??{id:c},u)]},c))}),ye&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:ye.done,max:Math.max(1,ye.total)}),u("organizer.progressCount",{done:ye.done,total:ye.total})]}),pt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:pt})]})}),(0,a.jsx)(w,{open:It!==null,onClose:e(()=>{G||(St(null),Y(null))},"onClose"),title:u("archiveActive.title"),...It===null?{}:{description:u("archiveActive.desc",{name:It.title,kinds:It.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:G,onClick:e(()=>{G||(St(null),Y(null))},"onClick"),children:u("cancel")}),v({danger:!0,disabled:G,onClick:e(async()=>{if(!(At.current||G||It===null||typeof r!="function")){At.current=!0,qe(!0),Y(null);try{await r(It.sessionId,{stopActivity:!0}),mt(c=>c.filter(E=>It===null||E!==It.sessionId)),Ge("archived"),Ve(u("archives.archiveSuccess",{n:1})),St(null)}catch(c){Y(c instanceof Error?c.message:String(c))}finally{At.current=!1,qe(!1)}}},"onClick"),children:u("archiveActive.confirm")})]}),children:pt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:pt})}),(0,a.jsx)(w,{open:je!==null,onClose:cs,title:Ka,...ds===void 0?{}:{description:ds},footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:G,onClick:cs,children:u("cancel")}),v({danger:!0,disabled:G,onClick:$a,children:Ya})]}),children:(0,a.jsxs)(a.Fragment,{children:[G&&(0,a.jsxs)("div",{role:"status",children:[je?.kind==="batch"?u("archives.deleteBatchPending"):u("deleteSession.pending"),ye&&(0,a.jsx)("progress",{value:ye.done,max:Math.max(1,ye.total),"aria-label":u("organizer.progress")}),ye&&u("organizer.progressCount",{done:ye.done,total:ye.total})]}),pt!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:pt})]})})]})]})}e(Gn,"ArchivedSessionsSection");function Tr(n){var r,i,d="";if(typeof n=="string"||typeof n=="number")d+=n;else if(typeof n=="object")if(Array.isArray(n)){var m=n.length;for(r=0;r<m;r++)n[r]&&(i=Tr(n[r]))&&(d&&(d+=" "),d+=i)}else for(i in n)n[i]&&(d&&(d+=" "),d+=i);return d}e(Tr,"r");function oa(...n){for(var r,i,d=0,m="",p=arguments.length;d<p;d++)(r=arguments[d])&&(i=Tr(r))&&(m&&(m+=" "),m+=i);return m}e(oa,"clsx");let $n="Ungrouped";function la(n,r=$n){if(n===void 0||n==="")return r;let i=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return i!==void 0&&i!==""?i:n}e(la,"workspaceLabel");function cn(n,r){return r.updatedAt!==n.updatedAt?r.updatedAt-n.updatedAt:n.id<r.id?-1:1}e(cn,"byRecency");function Yt(n,r,i,d){return n.origin!=="subagent"&&(!i.has(n.id)||d===!0)&&(!n.blank||n.id===r)}e(Yt,"sessionVisible");function jn(n){let r=n instanceof Error?n.message:String(n);return r.includes("UNKNOWN_SESSION")||r.includes("no such session")}e(jn,"isUnknownSessionError");function Kn(n,r){if(jn(n))return r("deleteSession.unknown");let i=n instanceof Error?n.message:String(n);return r("deleteSession.failed",{detail:i})}e(Kn,"formatDeleteError");function _r(n,r){if(jn(n))return r("archives.unarchiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.unarchiveFailed",{detail:i})}e(_r,"formatUnarchiveError");function Nn(n,r,i=jr){return n.map(d=>d.sessionId+r("common.separator")+i(new Error(d.message),r)).join(`
|
|
22
|
+
`)}e(Nn,"formatBatchFailures");function jr(n,r){if(jn(n))return r("archives.archiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.archiveFailed",{detail:i})}e(jr,"formatArchiveError");function Dn(n){if(n===null||typeof n!="object")return;let r=ne(n),i=r.rpcError!==null&&typeof r.rpcError=="object"?ne(r.rpcError):void 0,d=r.name==="WorkspaceActiveSessionError"?r.activity:void 0,m=i?.details,p=r.name==="WorkspaceArchiveError"&&i?.code==="workspace/session-active"&&m!==null&&typeof m=="object"?ne(m).activity:void 0,x=Array.isArray(d)?d:Array.isArray(p)?p:void 0;if(x===void 0)return;let S=x.flatMap(I=>{if(I===null||typeof I!="object")return[];let O=ne(I).kind;return typeof O=="string"&&O.length>0?[O]:[]});return S.length>0?S:void 0}e(Dn,"activeSessionActivity");function Nr(n){let r=Dn(n);if(r===void 0||n===null||typeof n!="object")return;let i=ne(n),d=i.rpcError!==null&&typeof i.rpcError=="object"?ne(i.rpcError).details:void 0,m=d!==null&&typeof d=="object"?ne(d).sessionId:void 0,p=typeof i.sessionId=="string"?i.sessionId:typeof m=="string"?m:void 0;return p===void 0?void 0:{sessionId:p,kinds:r}}e(Nr,"activeSessionRefusal");function Dr(n,r){let i=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(r);if(i===null)return;let d=i[1].split(", ").filter(m=>m.length>0);return d.length>0?{sessionId:n,kinds:d}:void 0}e(Dr,"activeArchiveFromMessage");function ca(n,r){let i=n instanceof Error?n.message:String(n);return r("archives.forkFailed",{detail:i})}e(ca,"formatForkError");function Yn(n){return n.blank?"New Session":n.displayTitle}e(Yn,"sessionTitle");function Mr(n,r,i,d,m,p,x){let S=[...p];return x==="recency"&&S.sort(cn),{key:n,workspaceId:r,cwd:i,createdAt:d,label:m,sessions:S}}e(Mr,"buildGroup");function da(n,r){let i=new Map(n.map(p=>[p.id,p])),d=new Set,m=[];for(let p of r){let x=i.get(p);x===void 0||d.has(p)||(m.push(x),d.add(p))}for(let p of[...n].sort(cn))d.has(p.id)||m.push(p);return m}e(da,"orderedUngrouped");function Or(n,r,i,d,m){let p=[],x=new Set;for(let I of r){let O=[];for(let A of I.sessionIds){let N=n.byId[A];N!==void 0&&(x.add(A),Yt(N,jt(n),i,m)&&O.push(N))}p.push(Mr(I.workspaceId,I.workspaceId,I.path,Date.parse(I.createdAt),I.title,O,"account"))}let S=n.ids.map(I=>n.byId[I]).filter(I=>I!==void 0&&!x.has(I.id)&&Yt(I,jt(n),i,m));return S.length>0&&p.push(Mr("",void 0,void 0,void 0,$n,d===void 0?S:da(S,d),d===void 0?"recency":"account")),p}e(Or,"groupByWorkspace");function Zn(n,r,i){if(!n||i.has(n))return!1;let d=r?.[n];return!(d===void 0||d.origin==="subagent"||d.blank)}e(Zn,"isWorkspaceTaskCandidate");function zr(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 d=i.slice(10);if(!d)return null;let m=r.querySelector(".title")??r.querySelector("[class*='title']");return{workspaceId:d,title:m?.textContent?.trim()||d}}e(zr,"workspaceMenuTriggerFrom");function Jn(n,r=!0){let i=(n.textContent??"").toLowerCase();return i.includes("\u5220\u9664\u5DE5\u4F5C\u533A")||i.includes("delete workspace")||i.includes("\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435")?!0:r&&/(?:^|[_\s-])danger(?:$|[_\s-])/i.test(n.className)}e(Jn,"isWorkspaceDeleteMenuItem");function ua(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}e(ua,"visiblePendingKind");function Pr(n,r){let i=r.get(n.id),d=i===void 0?n.pendingInteraction:i.kind;return ua(d)}e(Pr,"pendingInteractionForSession");let Xn=new Map,Qn=new Set,ha=new Map;function pa(n){return n(Xn)}e(pa,"useEmptySessionPendingInteraction");function ma(n){return n(ha)}e(ma,"useEmptySessionStatus");function Lr(n){return n instanceof Map||n==null?{pending:n??Xn,completed:Qn}:{pending:n.pending??Xn,completed:n.completed??Qn}}e(Lr,"pendingFacts");function fa(n){let r=new Map,i=new Set;if(n instanceof Map)for(let[d,m]of n)m?.pendingInteraction!==void 0&&r.set(d,m.pendingInteraction),m?.completionUnread===!0&&i.add(d);return{pending:r,completed:i}}e(fa,"factsFromSessionStatus");function ga(n,r,i){let d=n(p=>p),m=r(p=>p);return i?fa(m):{pending:d,completed:Qn}}e(ga,"useSessionUiFacts");function Fr(n,r,i,d){let m=Lr(d),p=Pr(n,m.pending);return{id:n.id,title:Yn(n),blank:n.blank,running:n.running,runningSubagentCount:r.get(n.id)?.runningCount??0,completed:n.completed===!0||m.completed.has(n.id),updatedAt:n.updatedAt,archived:i.has(n.id),...p===void 0?{}:{pendingInteraction:p}}}e(Fr,"sessionNode");function va(n,r,i,d,m){let p=new Set(i),x=new Set(m.expandedGroups),S=Tn(n.byId),I=jt(n),O=I===void 0?void 0:r.find(N=>N.sessionIds.includes(I))?.workspaceId??"",A=[];for(let N of Or(n,r,p,m.ungroupedOrder,m.showArchived)){let P=x.has(N.key);A.push({key:N.key,workspaceId:N.workspaceId,cwd:N.cwd,createdAt:N.createdAt,label:N.label,sessionCount:N.sessions.length,expanded:P,containsCurrent:N.key===O,sessions:P?N.sessions.map(u=>Fr(u,S,p,d)):[]})}return A}e(va,"deriveGroups");function ya(n,r,i,d){let m=new Set(r),p=Tn(n.byId),x=[];for(let S of n.ids){let I=n.byId[S];I===void 0||!Yt(I,jt(n),m,d)||x.push(I)}return x.sort(cn),x.map(S=>Fr(S,p,m,i))}e(ya,"deriveFlat");function ba(n,r,i,d,m,p,x,S,I=$n){let O=i.trim().toLowerCase();if(O==="")return{items:[],hasMore:!1};let A=new Set(d),N=Tn(n.byId),P=new Map;for(let Z of r)for(let Ee of Z.sessionIds)P.has(Ee)||P.set(Ee,Z.title);let u=e(Z=>P.get(Z.id)??la(Z.cwd,I),"labelOf"),he=new Map;for(let Z of p.items)he.has(Z.sessionId)||he.set(Z.sessionId,Z);let fe=[];for(let Z of n.ids){let Ee=n.byId[Z];Ee===void 0||Ee.blank||!Yt(Ee,jt(n),A,S)||(Yn(Ee).toLowerCase().includes(O)||u(Ee).toLowerCase().includes(O))&&fe.push(Ee)}fe.sort(cn);let pe=[],Ye=new Set,ut=e(Z=>{Ye.has(Z.id)||(Ye.add(Z.id),pe.push(Z))},"include");for(let Z of fe)ut(Z);for(let Z of p.items){let Ee=n.byId[Z.sessionId];Ee!==void 0&&!Ee.blank&&Yt(Ee,jt(n),A,S)&&ut(Ee)}let Ct=Lr(m);return{items:pe.slice(0,x).map(Z=>{let Ee=he.get(Z.id),V=Pr(Z,Ct.pending);return{id:Z.id,title:Yn(Z),workspace:u(Z),running:Z.running,runningSubagentCount:N.get(Z.id)?.runningCount??0,archived:A.has(Z.id),...V===void 0?{}:{pendingInteraction:V},completed:Z.completed===!0||Ct.completed.has(Z.id),...Ee===void 0?{}:{snippet:Ee.snippet}}}),hasMore:p.hasMore||pe.length>x}}e(ba,"deriveSearchResults");function ji(n,r){let p=Math.max(0,r-n);return p<6e4?{unit:"now",n:0}:p<36e5?{unit:"minutes",n:Math.floor(p/6e4)}:p<864e5?{unit:"hours",n:Math.floor(p/36e5)}:p<30*864e5?{unit:"days",n:Math.floor(p/864e5)}:p<365*864e5?{unit:"months",n:Math.floor(p/(30*864e5))}:{unit:"years",n:Math.floor(p/(365*864e5))}}e(ji,"relativeTime");let Br={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 et(n,r){return n.blank?r("session.new"):n.title??n.displayTitle??""}e(et,"displayTitle");function wa(n,r){let i=new Date(n),d=`${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:d})}e(wa,"archiveTimeLabel");let Sa=[".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(""),Mt="data-dsham-nav-icon",ka='[role="dialog"] nav button',er=[`[${Mt}] > svg { display: none !important; }`,`[${Mt}]::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 xa(n,r){let i=String(r??"").trim();return i.length>0&&String(n??"").trim()===i}e(xa,"isOwnSettingsNavRow");function Mn(n,r){for(let i of n){if(i.type==="characterData"){let d=i.target.parentElement;if(d!==null&&d.closest(r)!==null)return!0;continue}for(let d of i.addedNodes){if(d.nodeType!==1)continue;let m=d;if(m.matches(r)||m.querySelector(r)!==null||m.closest(r)!==null)return!0}}return!1}e(Mn,"mutationTouches");function Ur(n,r){return xa(n.textContent,r)?n.getAttribute(Mt)===""?!1:(n.setAttribute(Mt,""),!0):n.hasAttribute(Mt)?(n.removeAttribute(Mt),!0):!1}e(Ur,"applySettingsNavIcon");function Hr(n){return n.hasAttribute(Mt)?(n.removeAttribute(Mt),!0):!1}e(Hr,"restoreSettingsNavIcon");function Wr(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=er,(document.head??document.documentElement).append(i)):i.textContent!==er&&(i.textContent=er);let d=!1,m=!1,p=e(()=>{if(m=!1,d)return;let I=n.locale.bind(Ke)("archived.badge");for(let O of document.querySelectorAll(ka))Ur(O,I)},"sync"),x=e(()=>{m||d||(m=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(p):setTimeout(p,16))},"schedule");p();let S=new MutationObserver(I=>{Mn(I,'[role="dialog"] nav')&&x()});return S.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{d=!0,S.disconnect();for(let I of document.querySelectorAll(`[${Mt}]`))Hr(I);i?.remove()}},"archive-manager: settings nav icon")}e(Wr,"installSettingsNavIcon");let Ca=[".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}",Ia=".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}}",Aa=".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 tr({id:n,className:r,value:i,options:d,onChange:m,disabled:p=!1,"aria-label":x,title:S,tabIndex:I,"aria-hidden":O}){let[A,N]=l.useState(!1),P=l.useMemo(()=>d.map(fe=>({id:fe.value,label:fe.label})),[d]),u=d.find(fe=>fe.value===i),he=u?.label??x;return(0,a.jsx)("div",{id:n,tabIndex:I,"aria-hidden":O,className:r===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${r}`,children:(0,a.jsx)(f.Menu,{open:A,onClose:e(()=>N(!1),"onClose"),onSelect:e(fe=>{p||m(fe),N(!1)},"onSelect"),selectedId:i,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,a.jsxs)(f.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":x,"aria-expanded":A,disabled:p,tabIndex:I,"aria-hidden":O,title:S??u?.title??u?.label??x,className:"dsham_menuSelectBtn"+(A?" is-open":""),onClick:e(()=>{p||N(fe=>!fe)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:he}),(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:A?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:P})})}e(tr,"ArchiveProjectSelect");function Ra({id:n,t:r,disabled:i=!1,favoritesOnly:d,setFavoritesOnly:m,favoriteBusy:p=!1,sortBy:x,setSortBy:S,options:I}){let[O,A]=l.useState(!1),N=l.useMemo(()=>{let pe=[];typeof m=="function"&&(pe.push({type:"label",id:"lbl_view_filter",text:r("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),pe.push({id:"filter:all",label:r("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),pe.push({id:"filter:favorites",label:r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),pe.push({type:"separator",id:"sep_view_filter"})),pe.push({type:"label",id:"lbl_view_sort",text:r("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let Ye of I)pe.push({id:`sort:${Ye.value}`,label:Ye.label});return pe},[r,m,I]),P=e(pe=>{pe.startsWith("filter:")?typeof m=="function"&&!p&&m(pe==="filter:favorites"):pe.startsWith("sort:")&&S(pe.slice(5)),A(!1)},"onSelect"),u=I.find(pe=>pe.value===x),he=d?r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":r("organizer.allChats")||"\u5168\u90E8\u804A\u5929",fe=`${he} \xB7 ${u?.label??x}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(f.Menu,{open:O,onClose:e(()=>A(!1),"onClose"),onSelect:P,selectedIds:[d?"filter:favorites":"filter:all",`sort:${x}`],align:"end",portal:!0,dense:!0,listClassName:"dsham_viewSortDropdown",anchor:(0,a.jsxs)(f.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":r("archives.viewOptions")||"\u89C6\u56FE\u9009\u9879","aria-expanded":O,disabled:i,title:fe,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(O?" is-open":"")+(d?" has-filter":""),onClick:e(()=>{i||A(pe=>!pe)},"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:he}),(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:O?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:N})]})}e(Ra,"ArchiveViewSortMenu");function qr({selectedCount:n,hiddenCount:r,allVisibleSelected:i,selectedVisibleCount:d,visibleCount:m,busy:p,t:x,onToggle:S,onClear:I,onRestore:O,onDelete:A,onArchive:N}){let P=n>0;return(0,a.jsxs)("div",{className:"dsham_settingsSelection",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionMain",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionSummary",children:[(0,a.jsxs)("label",{className:"dsham_settingsSelectionToggle",title:x("archives.selectAllFiltered"),children:[(0,a.jsx)(Vr,{checked:i,indeterminate:d>0&&!i,disabled:p||m===0,label:x("archives.selectAllFiltered"),onChange:e(u=>S(u.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:P?x("archives.selectedCount",{n}):x("archives.selectAllFiltered")})]}),P&&k({disabled:p,"aria-label":x("archives.clearSelection"),onClick:I,children:x("archives.clearSelectionShort")})]}),P&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:N?[k({disabled:p,onClick:N,children:x("archives.archiveSelected")})]:[k({disabled:p,"aria-label":x("archives.restoreSelected"),onClick:O,children:x("archives.restore")}),k({disabled:p,className:"dsham_btnDanger","aria-label":x("archives.deleteSelected"),onClick:A,children:x("archives.deleteSelectionShort")})]})]}),r>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:x("archives.selectionHiddenHint",{hidden:r})})]})}e(qr,"ArchiveSelectionToolbar");function Vr({checked:n,indeterminate:r=!1,disabled:i=!1,label:d,onChange:m}){return(0,a.jsx)(ur,{checked:n,indeterminate:r,disabled:i,label:d,onChange:m})}e(Vr,"ArchiveSelectionCheckbox");function Gr(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:[3.5,8,12.5].map(n=>(0,a.jsx)("circle",{cx:n,cy:8,r:1.15,fill:"none",stroke:"currentColor",strokeWidth:1.5},n))})}e(Gr,"moreIcon");function Ta({busy:n,title:r,t:i,onPreview:d,onRestoreOpen:m,onDelete:p,onCopyId:x}){let[S,I]=(0,l.useState)(!1),O=e(N=>{if(!n){if(I(!1),N==="copyId")return x?.();if(N==="preview")return d?.();if(N==="restoreOpen")return m?.();N==="delete"&&p?.()}},"choose"),A=[...d?[{id:"preview",label:i("discovery.preview"),icon:(0,a.jsx)(f.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"restoreOpen",label:i("archives.restoreOpen"),icon:(0,a.jsx)(f.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...x?[{id:"copyId",label:i("details.copyId"),icon:(0,a.jsx)(f.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...p?[{id:"delete",label:i("menu.deleteSession"),icon:(0,a.jsx)(f.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(f.Menu,{open:!n&&S,align:"end",portal:!0,dense:!0,items:A,onSelect:O,onClose:e(()=>I(!1),"onClose"),anchor:k({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":S&&!n,icon:Gr(),onClick:e(()=>{n||I(N=>!N)},"onClick")})})}e(Ta,"ArchivedSessionMenu");function _a({group:n,busy:r,onArchive:i,onRestore:d,onDelete:m,t:p}){let x=n.key===On,S=i?[{id:"archive",label:p(x?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(f.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:p(x?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(f.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:p(x?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(f.IconTrashOutlineMedium,{size:16}),danger:!0}],[I,O]=(0,l.useState)(!1),A=p(x?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),N=e(P=>{r||(P==="archive"?i?.():P==="restore"?d?.():P==="delete"&&m?.())},"choose");return(0,a.jsx)(f.Menu,{open:!r&&I,align:"end",portal:!0,dense:!0,items:S,onSelect:e(P=>{O(!1),N(P)},"onSelect"),onClose:e(()=>O(!1),"onClose"),anchor:k({variant:"outline",className:"dsham_iconAction",disabled:r,"aria-label":A,"aria-haspopup":"menu","aria-expanded":I&&!r,icon:Gr(),onClick:e(()=>{r||O(P=>!P)},"onClick")})})}e(_a,"ArchivedGroupActions");let On="__ungrouped__";function ja(n){return n===On?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}e(ja,"archivedBatchTargetForGroup");function dn(n,r,i){let d=[...new Set(n??[])];if(i.scope==="all")return d;if(i.scope==="sessions"){let p=new Set(i.sessionIds??[]);return d.filter(x=>p.has(x))}if(i.scope==="workspace"){let p=new Set(r.find(x=>x.workspaceId===i.workspaceId)?.sessionIds??[]);return d.filter(x=>p.has(x))}let m=new Set(r.flatMap(p=>p.sessionIds));return d.filter(p=>!m.has(p))}e(dn,"deriveArchivedBatchIds");function $r(n){return[...new Set(n.flatMap(r=>r.sessions.map(i=>i.id)))]}e($r,"archivedSessionIdsInGroups");function Kr(n,r){let i=new Set(r);return[...new Set(n)].filter(d=>i.has(d))}e(Kr,"pruneArchivedSelection");function nr(n,r,i){let d=new Set(n);for(let m of r)i?d.add(m):d.delete(m);return[...d]}e(nr,"toggleArchivedSelection");function Yr(n,r){let i=n.deletedSessionIds.length,d=n.skippedSessionIds.length;return n.failures.length>0?{kind:"error",message:r("archives.deletePartial",{deleted:i,skipped:d,failed:n.failures.length,detail:n.failures[0].message})}:d>0&&i>0?{kind:"notice",message:r("archives.deleteSuccessWithSkipped",{deleted:i,skipped:d})}:d>0?{kind:"notice",message:r("archives.deleteSkipped",{n:d})}:{kind:"notice",message:r("archives.deleteSuccess",{n:i})}}e(Yr,"archivedDeleteFeedback");function Zr(n,r){let i=new Set(r);return Object.values(n).filter(d=>d.origin!=="subagent"&&!d.blank&&!i.has(d.id)).map(d=>d.id)}e(Zr,"unarchivedSessionIds");function Jr(n,r,i,d){let m=r.map(S=>({key:S.workspaceId,title:S.title,ids:new Set(S.sessionIds),sessions:[]})),p=[];for(let S of i){let I=n[S];if(I===void 0||I.origin==="subagent")continue;let O=m.find(A=>A.ids?.has(S));(O===void 0?p:O.sessions).push(I)}let x=m.filter(S=>S.sessions.length>0);return p.length>0&&x.push({key:On,title:d,sessions:p}),x}e(Jr,"deriveArchivedGroups");function Xr(n,r,i,d,m=[]){let p=e((A,N)=>String(A).localeCompare(String(N),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),x=new Map;if(Array.isArray(m))for(let A=0;A<m.length;A++)x.set(m[A],A);let S=e(A=>{let N=r==="created"?i[A.id]:A.updatedAt;return typeof N=="number"&&Number.isFinite(N)?N:Number.NEGATIVE_INFINITY},"timestampOf"),I=e((A,N)=>{if(r==="archived"){let P=x.get(A.id)??-1,he=(x.get(N.id)??-1)-P;if(he!==0)return he}if(r!=="alphabetical"){let P=S(N)-S(A);if(Number.isFinite(P)&&P!==0)return P}return p(et(A,d),et(N,d))||p(A.id,N.id)},"compareSessions");return n.map(A=>({...A,sessions:[...A.sessions].sort(I)})).sort((A,N)=>{if(r==="archived"){let P=A.sessions[0]?.id,u=N.sessions[0]?.id,he=P!==void 0?x.get(P)??-1:-1,pe=(u!==void 0?x.get(u)??-1:-1)-he;if(pe!==0)return pe}if(r!=="alphabetical"){let P=S(N.sessions[0])-S(A.sessions[0]);if(Number.isFinite(P)&&P!==0)return P}return p(A.title,N.title)||p(A.key,N.key)})}e(Xr,"sortArchivedGroups");let Qr={...Js,...Rs,"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\u4F1A\u8BDD","menu.copyWorkspacePath":"\u590D\u5236\u76EE\u5F55","menu.openInExplorer":"\u6253\u5F00\u76EE\u5F55","menu.moveSession":"\u79FB\u52A8\u5230\u5DE5\u4F5C\u533A","moveSession.title":"\u79FB\u52A8\u4F1A\u8BDD\u5230\u5DE5\u4F5C\u533A","moveSession.desc":"\u5C06\u201C{name}\u201D\u79FB\u52A8\u5230\u76EE\u6807\u5DE5\u4F5C\u533A\uFF0C\u540E\u7EED\u5BF9\u8BDD\u5C06\u5728\u76EE\u6807\u5DE5\u4F5C\u533A\u73AF\u5883\u4E2D\u6267\u884C\u3002","moveSession.warning":"\u63D0\u793A\uFF1A\u79FB\u52A8\u540E\u8BE5\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u76EE\u5F55\u5C06\u53D8\u66F4\u4E3A\u76EE\u6807\u9879\u76EE\u76EE\u5F55\u3002","moveSession.currentWorkspace":"\u5F53\u524D\u5DE5\u4F5C\u533A\uFF1A{name}","moveSession.selectLabel":"\u9009\u62E9\u76EE\u6807\u5DE5\u4F5C\u533A","moveSession.noOtherWorkspaces":"\u6682\u65E0\u53EF\u79FB\u52A8\u7684\u5176\u4ED6\u5DE5\u4F5C\u533A","moveSession.confirm":"\u79FB\u52A8","moveSession.pending":"\u6B63\u5728\u79FB\u52A8\u4F1A\u8BDD\u2026","moveSession.success":"\u4F1A\u8BDD\u5DF2\u6210\u529F\u79FB\u52A8\u5230\u201C{name}\u201D","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"},es={...Xs,...Ts,"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 sessions","menu.copyWorkspacePath":"Copy folder path","menu.openInExplorer":"Open folder","menu.moveSession":"Move to workspace","moveSession.title":"Move session to workspace","moveSession.desc":"Move \u201C{name}\u201D to target workspace. Subsequent turns will execute within the destination context.","moveSession.warning":"Note: The session working directory will change to the destination project path.","moveSession.currentWorkspace":"Current workspace: {name}","moveSession.selectLabel":"Select destination workspace","moveSession.noOtherWorkspaces":"No other workspaces available","moveSession.confirm":"Move","moveSession.pending":"Moving session\u2026","moveSession.success":"Session successfully moved to \u201C{name}\u201D","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"},Na={...Qs,..._s,"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 \u0441\u0435\u0441\u0441\u0438\u0438","menu.copyWorkspacePath":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0443\u0442\u044C \u043A \u043F\u0430\u043F\u043A\u0435","menu.openInExplorer":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0443","menu.moveSession":"\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432 \u043F\u0440\u043E\u0435\u043A\u0442","moveSession.title":"\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","moveSession.desc":"\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \xAB{name}\xBB \u0432 \u0446\u0435\u043B\u0435\u0432\u043E\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E. \u0414\u0430\u043B\u044C\u043D\u0435\u0439\u0448\u0438\u0435 \u0440\u0435\u043F\u043B\u0438\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0442\u044C\u0441\u044F \u0432 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0435 \u0446\u0435\u043B\u0435\u0432\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430.","moveSession.warning":"\u041F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u0435: \u0440\u0430\u0431\u043E\u0447\u0438\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u0441\u0435\u0441\u0441\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D \u043D\u0430 \u043F\u0443\u0442\u044C \u0446\u0435\u043B\u0435\u0432\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430.","moveSession.currentWorkspace":"\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0440\u043E\u0435\u043A\u0442: {name}","moveSession.selectLabel":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442","moveSession.noOtherWorkspaces":"\u041D\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u0432","moveSession.confirm":"\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C","moveSession.pending":"\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u2026","moveSession.success":"\u0421\u0435\u0441\u0441\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0430 \u0432 \xAB{name}\xBB","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"},Ke="archive-manager-workspace",Da=["slots","sessions","workspaces","locale","remote","typert"];function rr(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}e(rr,"bindObservable");function ts(n){return async r=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(r)}}e(ts,"createUnarchiveSession");async function sr(n,r,i){let d=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=await qn(r,async x=>{try{await n.archiveSession(x)}catch(S){throw S!==null&&typeof S=="object"&&Dn(S)!==void 0&&typeof ne(S).sessionId!="string"&&Object.assign(S,{sessionId:x}),S}return!0},{refresh:i}),p=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:p,archivedSessionIdsAdded:p.filter(x=>!d.has(x)),failures:m.failures}}e(sr,"archiveSessionsViaOfficial");async function ns(n,r,i,d){let m=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),p=typeof d=="function"?d:I=>n.unarchiveSession?.(I),x=await qn(r,async I=>(await p(I),!0),{refresh:i}),S=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:S,unarchivedSessionIds:[...m].filter(I=>!S.includes(I)),failures:x.failures}}e(ns,"unarchiveSessionsViaOfficial");async function Ma(n){Oa(n);let r=n.get("remote"),i=e(()=>{},"disposeRemote");return r!==void 0&&(i=await r.$mount(qt)),async()=>{await i()}}e(Ma,"apply");function Oa(n){n.effect(()=>n.locale.register(Ke,{zh:Qr,en:es,ru:Na}),"dsh-archive-manager: dictionaries");let r=e(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),i={},d,m=e(g=>(d=zs(g,n.sessions,n.workspaces,{onOpened:e(()=>n.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:e(()=>n.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>d?.dispose()),"attachArchiveNavigation");n.effect(()=>m(r()),"archive-manager: explicit archived navigation");let p=e(g=>{if(d===void 0)throw new Wt("navigationUnavailable");return Br.request(g),d.open(g)},"openConversation"),x=e(async g=>{n.get("layout")?.beginNavigation?.(),Br.request(g)},"focusSessionWorkspace"),S=e(async(g,b)=>{let R=await n.sessions.search(g,b);if(!R.ok)throw new Error(R.error.message);return R.value},"searchSessions"),I=e(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await he(),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"),O=ts(n.workspaces),A=e(async(g,...b)=>{let R=n.get("remote.workspaceRegistry");if(!R||typeof R[g]!="function")throw new Error(n.locale.bind(Ke)("service.unavailable"));let Ie=await R[g].apply(R,b);if(!Ie.ok)throw new Error(Ie.error.message);return Ie.value},"registryCall"),N=e(()=>A("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),P=e(()=>A("diagnoseSessionCaches"),"diagnoseSessionCaches"),u=e(g=>A("rebuildSessionCaches",g),"rebuildSessionCaches"),he=e(async()=>{if(typeof n.sessions.refresh!="function")throw new Error("Official session list refresh is unavailable");let g=await n.sessions.refresh(),b=n.sessions,R=b.manager;if(R?.listState==="error"&&R.listError)throw new Error(We(R.listError));if(b.listState==="error"&&b.listError)throw new Error(We(b.listError));let $=b.list?.getSnapshot?.();if($?.state==="error"&&$.error)throw new Error(We($.error));if(g&&typeof g=="object"&&"ok"in g&&g.ok===!1)throw new Error(We(g.error??"Session list refresh failed"))},"refreshCacheLists"),fe=e((g={})=>A("cleanOrphanSubagents",g??{}),"cleanOrphanSubagents"),pe=e(g=>A("searchArchivedContent",g),"searchArchivedContent"),Ye=e(g=>A("searchSessionContent",g),"searchSessionContent"),ut=e(g=>A("previewArchivedSession",g),"previewArchivedSession"),Ct=e(()=>A("favoriteSessions"),"favoriteSessions"),Z=e(g=>A("setSessionFavorite",g),"setSessionFavorite"),Ee=Ir();Ee.bind({favoriteSessions:Ct,setSessionFavorite:Z});let V=ra(n,Ee,()=>n.locale.bind(Ke));n.effect(()=>()=>V.dispose(),"archive-manager: favorites only filter");let Be=Ys({workspaces:n.workspaces.list,sessions:n.sessions.list,archive:e(g=>n.workspaces.archiveSession(g),"archive"),restore:e(async g=>{await O(g)},"restore"),deleteOne:e(async g=>{let b=n.get("remote.workspaceRegistry");if(!b)throw new Error(n.locale.bind(Ke)("service.unavailable"));let R=await b.deleteSession(g);if(!R.ok)throw new Error(R.error.message)},"deleteOne"),getFavorites:Ct,refresh:e(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:jt}),Re=e(async g=>{await O(g),await I()},"unarchiveSession"),ge=e(async g=>{let b=n.get("remote.workspaceRegistry");if(b===void 0)throw new Error("archive-manager remote service is unavailable");let R=await b.deleteSession(g);if(!R.ok)throw new Error(R.error.message);await I()},"deleteSession"),it=e(async(g,b)=>{let R=n.get("remote.workspaceRegistry");if(R===void 0)throw new Error("archive-manager remote service is unavailable");let $=await R.moveSessionToWorkspace({sessionId:g,targetWorkspaceId:b});if(!$.ok)throw new Error($.error?.message||"move failed");return await I(),$.value},"moveSession"),ht=e(async g=>sr(n.workspaces,g,I),"archiveSessions"),W=e(async g=>{let b=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},R=dn(b.archivedSessionIds,b.items,g);return ns(n.workspaces,R,I,O)},"unarchiveSessions"),q=e(async g=>{let b=n.get("remote.workspaceRegistry");if(b===void 0)throw new Error("archive-manager remote service is unavailable");let R=await b.deleteArchivedSessions(g);if(!R.ok)throw new Error(R.error.message);let $=await I();return{...R.value,refreshError:$}},"deleteArchivedSessions"),Xe=e(async()=>{let g=n.get("remote.workspaceRegistry");if(g===void 0)throw new Error("archive-manager remote service is unavailable");let b=await g.archivedSessionMetadata();if(!b.ok)throw new Error(b.error.message);return b.value},"archivedSessionMetadata"),Ge="sidebar.workspaces.session.menu.item",ee=null,ot=new Set,lt=e(g=>{ee=g;for(let b of ot)b()},"publishDeleteTarget");function un(){return l.useSyncExternalStore(g=>(ot.add(g),()=>{ot.delete(g)}),()=>ee,()=>ee)}e(un,"useDeleteRequest");function Et({sessionId:g,displayTitle:b,useMenuOpenState:R,t:$}){let[,Ie]=R(),de=f.MenuItemButton,De=(0,a.jsx)(f.IconTrashOutlineRegular,{size:14}),Ne=e(()=>{Ie(!1),lt({sessionId:g,title:b})},"onSelect");return typeof de=="function"?(0,a.jsx)(de,{danger:!0,icon:De,onSelect:Ne,children:$("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Ne,children:$("menu.deleteSession")})}e(Et,"DeleteSessionMenuItem");function It({sessionId:g,favoriteRow:b,useMenuOpenState:R,t:$}){let[,Ie]=R(),de=(0,l.useSyncExternalStore)(b.subscribe,b.getSnapshot),De=de.ready&&de.ids.has(g),Ne=e(()=>{Ie(!1),b.toggle(g)},"onSelect"),ve=f.MenuItemButton,Ue=(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:De?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,children:(0,a.jsx)("path",{d:ie})}),Ze=$(De?"organizer.unfavorite":"organizer.favorite");return typeof ve=="function"?(0,a.jsx)(ve,{icon:Ue,onSelect:Ne,children:Ze}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Ne,children:Ze})}e(It,"FavoriteMenuItem");let St=null,Pt=new Set;function hn(g,b="success"){St={text:g,tone:b,seq:Date.now()};for(let R of Pt)R()}e(hn,"showToast");function At(){let g=l.useSyncExternalStore(R=>(Pt.add(R),()=>{Pt.delete(R)}),()=>St,()=>St);if(!g)return null;let b=f.Toast;return typeof b=="function"?(0,a.jsx)(b,{key:g.seq,text:g.text,tone:g.tone,holdMs:3e3,onDone:e(()=>{if(St?.seq===g.seq){St=null;for(let R of Pt)R()}},"onDone")}):(0,a.jsx)("div",{key:g.seq,style:{position:"fixed",top:16,left:"50%",transform:"translateX(-50%)",zIndex:99999,padding:"8px 16px",borderRadius:8,background:g.tone==="danger"?"#7f1d1d":"#14532d",color:"#fff",fontSize:13,boxShadow:"0 4px 16px rgba(0,0,0,0.4)"},children:g.text})}e(At,"GlobalToastOverlay");function je({sessionId:g,displayTitle:b,useMenuOpenState:R,t:$}){let[,Ie]=R(),[de,De]=l.useState(!1),[Ne,ve]=l.useState(null),[Ue,Ze]=l.useState(!1),nt=l.useRef(null),ft=l.useRef(null),te=n.workspaces.list?.getSnapshot?.()?.items??[],oe=f.MenuItemButton,z=e(()=>{if(ft.current&&clearTimeout(ft.current),nt.current){let be=nt.current.getBoundingClientRect(),Ce=typeof window<"u"?window.innerWidth:1024,J=typeof window<"u"?window.innerHeight:768,Me=220,bt=Math.max(140,J-20),Oe=Math.min(360,bt),Qe=be.right+2;Qe+Me>Ce-10&&(Qe=Math.max(10,be.left-Me-4));let me=be.top-4;me+Oe>J-10&&(me=Math.max(10,J-Oe-10)),me<10&&(me=10),ve({top:me,left:Qe,maxHeight:Oe})}De(!0)},"handleMouseEnter"),le=e(()=>{ft.current=setTimeout(()=>{De(!1)},180)},"handleMouseLeave"),Te=e(async(be,Ce)=>{if(!Ue){Ze(!0),De(!1),Ie(!1);try{await it(g,be),hn($("moveSession.success",{name:Ce})||`\u4F1A\u8BDD\u5DF2\u6210\u529F\u79FB\u52A8\u5230\u201C${Ce}\u201D`,"success")}catch(J){let Me=J instanceof Error?J.message:String(J);console.warn("archive-manager: move session failed",J),hn(Me,"danger")}finally{Ze(!1)}}},"handleSelectWorkspace"),ke=(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,a.jsx)("path",{d:"M2 3.5C2 2.67157 2.67157 2 3.5 2H6.5L8 4H12.5C13.3284 4 14 4.67157 14 5.5V12.5C14 13.3284 13.3284 14 12.5 14H3.5C2.67157 14 2 13.3284 2 12.5V3.5Z"}),(0,a.jsx)("path",{d:"M8 7.5L10.5 10L8 12.5"}),(0,a.jsx)("path",{d:"M5.5 10H10.5"})]}),Je=(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,style:{marginLeft:"auto",opacity:.65},children:(0,a.jsx)("path",{d:"M6 3.5L10.5 8L6 12.5"})}),xe=(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:8},children:[(0,a.jsx)("span",{children:$("menu.moveSession")}),Je]}),ye=typeof oe=="function"?(0,a.jsx)(oe,{icon:ke,onSelect:e(()=>z(),"onSelect"),children:xe}):(0,a.jsxs)("button",{type:"button",role:"menuitem",onClick:e(()=>z(),"onClick"),style:{display:"flex",alignItems:"center",gap:6,width:"100%",padding:"6px 8px",background:"transparent",border:"none",cursor:"pointer",color:"inherit",textAlign:"left"},children:[ke,xe]});return(0,a.jsxs)("div",{ref:nt,className:"dsham_moveSessionWrap",onMouseEnter:z,onMouseLeave:le,children:[ye,de&&Ne&&typeof document<"u"&&typeof h?.createPortal=="function"&&(0,h.createPortal)((0,a.jsxs)("div",{className:"dsham_moveSubmenu",role:"menu",onPointerDown:e(be=>{be.stopPropagation()},"onPointerDown"),onMouseDown:e(be=>{be.stopPropagation()},"onMouseDown"),onMouseEnter:z,onMouseLeave:le,style:{top:Ne.top,left:Ne.left,maxHeight:Ne.maxHeight},children:[(0,a.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:-6,width:8},"aria-hidden":!0}),te.length===0?(0,a.jsx)("div",{style:{padding:"8px 10px",fontSize:"12px",color:"var(--dsw-alias-label-tertiary, #888)"},children:$("moveSession.noOtherWorkspaces")}):te.map(be=>{let Ce=be.title||be.path||be.workspaceId;return(0,a.jsx)("button",{type:"button",role:"menuitem",className:"dsham_moveSubmenuBtn",disabled:Ue,onPointerDown:e(J=>{J.preventDefault(),J.stopPropagation(),Te(be.workspaceId,Ce)},"onPointerDown"),onClick:e(J=>{J.preventDefault(),J.stopPropagation(),Te(be.workspaceId,Ce)},"onClick"),children:(0,a.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",flex:1},children:Ce})},be.workspaceId)})]}),document.body)]})}e(je,"MoveSessionMenuItem");function Lt(g){try{let b=document.querySelector(`[data-row-key="session:${CSS.escape(g)}"]`);return b?(b.hasAttribute("tabindex")||(b.setAttribute("tabindex","-1"),b.addEventListener("blur",()=>b.removeAttribute("tabindex"),{once:!0})),typeof f.focusWithoutRing=="function"?f.focusWithoutRing(b):b.focus(),!0):!1}catch{return!1}}e(Lt,"focusSessionRow");function pn({t:g}){let b=un(),[R,$]=(0,l.useState)(!1),[Ie,de]=(0,l.useState)(null),[De,Ne]=(0,l.useState)(null),ve=(0,l.useRef)(null),Ue=(0,l.useRef)(null),Ze=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(b===null||typeof document>"u"){Ne(null);return}let te=null,oe=e(()=>{if(te&&te.isConnected)return te;try{te=document.querySelector(`[data-row-key="session:${CSS.escape(b.sessionId)}"]`)}catch{te=null}return te},"getTargetRow"),z=e(()=>{let Te=ve.current,ke=Te?.offsetWidth||290,Je=Te?.offsetHeight||160,xe=8,ye=oe();if(!ye){let Me=window.innerWidth,bt=window.innerHeight,Oe=Math.max(16,(bt-Je)/2),Qe=Math.max(16,(Me-ke)/2);Ne(me=>me!==null&&me.top===Oe&&me.left===Qe?me:{top:Oe,left:Qe});return}let be=ye.getBoundingClientRect(),Ce=be.top-4;Ce+Je>window.innerHeight-16&&(Ce=window.innerHeight-16-Je),Ce<16&&(Ce=16);let J=be.right+xe;J+ke>window.innerWidth-16&&(J=be.left-ke-xe),J<16&&(J=16),Ne(Me=>Me!==null&&Me.top===Ce&&Me.left===J?Me:{top:Ce,left:J})},"updatePosition");z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);let le=null;return typeof ResizeObserver<"u"&&ve.current&&(le=new ResizeObserver(z),le.observe(ve.current)),()=>{le?.disconnect(),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[b]),(0,l.useEffect)(()=>{if(b===null)return;Ue.current&&!Ue.current.disabled?Ue.current.focus():ve.current?.focus();let te=b.sessionId;return()=>{if(!Lt(te)){let z=document.querySelector('[role="treeitem"][aria-selected="true"]');z&&(z.hasAttribute("tabindex")||(z.setAttribute("tabindex","-1"),z.addEventListener("blur",()=>z.removeAttribute("tabindex"),{once:!0})),typeof f.focusWithoutRing=="function"?f.focusWithoutRing(z):z.focus())}}},[b]),(0,l.useEffect)(()=>{b!==null&&R&&ve.current?.focus()},[b,R]),(0,l.useEffect)(()=>{if(b===null)return;let te=e(oe=>{if(oe.key==="Escape"){oe.preventDefault(),oe.stopPropagation(),"stopImmediatePropagation"in oe&&typeof oe.stopImmediatePropagation=="function"&&oe.stopImmediatePropagation(),R||(de(null),lt(null));return}if(oe.key==="Tab"){if(oe.preventDefault(),R){ve.current?.focus();return}let z=Ue.current,le=Ze.current;if(!z||!le)return;oe.shiftKey?document.activeElement===z?le.focus():z.focus():document.activeElement===le?z.focus():le.focus()}},"onKey");return window.addEventListener("keydown",te,!0),()=>window.removeEventListener("keydown",te,!0)},[b,R]),b===null)return null;let nt=e(()=>{R||(de(null),lt(null))},"close"),ft=e(()=>{$(!0),de(null),ge(b.sessionId).then(()=>{$(!1),lt(null)}).catch(te=>{$(!1),de(Kn(te,g))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:nt}),(0,a.jsxs)("div",{ref:ve,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:b.title})}),R&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:g("deleteSession.pending")}),Ie!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Ie}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:Ue,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:R,onClick:nt,children:g("cancel")}),(0,a.jsx)("button",{ref:Ze,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:R,onClick:ft,children:g("deleteSession.title")})]})]})]})}e(pn,"DeleteSessionOverlay");let G=null,qe=new Set,pt=e(g=>{G=g;for(let b of qe)b()},"publishArchiveWsTarget");function Y(){return l.useSyncExternalStore(g=>(qe.add(g),()=>{qe.delete(g)}),()=>G,()=>G)}e(Y,"useArchiveWsRequest");function zn(g){try{let b=document.querySelector(`[data-row-key="workspace:${CSS.escape(g)}"]`);return b?(b.hasAttribute("tabindex")||(b.setAttribute("tabindex","-1"),b.addEventListener("blur",()=>b.removeAttribute("tabindex"),{once:!0})),typeof f.focusWithoutRing=="function"?f.focusWithoutRing(b):b.focus(),!0):!1}catch{return!1}}e(zn,"focusWorkspaceRow");function Ve({t:g}){let b=Y(),[R,$]=(0,l.useState)(!1),[Ie,de]=(0,l.useState)(null),[De,Ne]=(0,l.useState)(null),ve=(0,l.useRef)(null),Ue=(0,l.useRef)(null),Ze=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(b===null||typeof document>"u"){Ne(null);return}let te=null,oe=e(()=>{if(te&&te.isConnected)return te;try{te=document.querySelector(`[data-row-key="workspace:${CSS.escape(b.workspaceId)}"]`)}catch{te=null}return te},"getTargetRow"),z=e(()=>{let Te=ve.current,ke=Te?.offsetWidth||290,Je=Te?.offsetHeight||160,xe=8,ye=oe();if(!ye){let Me=window.innerWidth,bt=window.innerHeight,Oe=Math.max(16,(bt-Je)/2),Qe=Math.max(16,(Me-ke)/2);Ne(me=>me!==null&&me.top===Oe&&me.left===Qe?me:{top:Oe,left:Qe});return}let be=ye.getBoundingClientRect(),Ce=be.top-4;Ce+Je>window.innerHeight-16&&(Ce=window.innerHeight-16-Je),Ce<16&&(Ce=16);let J=be.right+xe;J+ke>window.innerWidth-16&&(J=be.left-ke-xe),J<16&&(J=16),Ne(Me=>Me!==null&&Me.top===Ce&&Me.left===J?Me:{top:Ce,left:J})},"updatePosition");z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);let le=null;return typeof ResizeObserver<"u"&&ve.current&&(le=new ResizeObserver(z),le.observe(ve.current)),()=>{le?.disconnect(),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[b]),(0,l.useEffect)(()=>{if(b===null)return;Ue.current&&!Ue.current.disabled?Ue.current.focus():ve.current?.focus();let te=b.workspaceId;return()=>{zn(te)}},[b]),(0,l.useEffect)(()=>{b!==null&&R&&ve.current?.focus()},[b,R]),(0,l.useEffect)(()=>{if(b===null)return;let te=e(oe=>{if(oe.key==="Escape"){oe.preventDefault(),oe.stopPropagation(),"stopImmediatePropagation"in oe&&typeof oe.stopImmediatePropagation=="function"&&oe.stopImmediatePropagation(),R||(de(null),pt(null));return}if(oe.key==="Tab"){if(oe.preventDefault(),R){ve.current?.focus();return}let z=Ue.current,le=Ze.current;if(!z||!le)return;oe.shiftKey?document.activeElement===z?le.focus():z.focus():document.activeElement===le?z.focus():le.focus()}},"onKey");return window.addEventListener("keydown",te,!0),()=>window.removeEventListener("keydown",te,!0)},[b,R]),b===null)return null;let nt=e(()=>{R||(de(null),pt(null))},"close"),ft=e(()=>{$(!0),de(null);let oe=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(ke=>ke.workspaceId===b.workspaceId),z=n.sessions.list?.getSnapshot?.()?.byId??{},le=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),Te=(oe?.sessionIds??[]).filter(ke=>Zn(ke,z,le));sr(n.workspaces,Te,I).then(ke=>{if($(!1),ke.failures.length>0){de(Nn(ke.failures,g));return}pt(null)}).catch(ke=>{$(!1),de(jr(ke,g))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:nt}),(0,a.jsxs)("div",{ref:ve,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:b.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:g("archiveWorkspace.desc",{name:b.title})}),R&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:g("archiveWorkspace.pending")}),Ie!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Ie}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:Ue,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:R,onClick:nt,children:g("cancel")}),(0,a.jsx)("button",{ref:Ze,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:R,onClick:ft,children:g("archiveWorkspace.confirm")})]})]})]})}e(Ve,"ArchiveWorkspaceOverlay");function Zt(g){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let b=null,R=!1,$=new Map,Ie=!1,de=e(z=>{let Te=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(xe=>xe.workspaceId===z);if(Te===void 0)return[];let ke=n.sessions.list?.getSnapshot?.()?.byId??{},Je=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return Te.sessionIds.filter(xe=>Zn(xe,ke,Je))},"workspaceCandidateIds"),De=e(()=>{if(Ie=!1,!R)for(let[z,le]of $){if(!z.isConnected){$.delete(z);continue}let Te=de(le.workspaceId).length===0;z.disabled=Te,z.style.opacity=Te?"0.5":"",z.style.cursor=Te?"not-allowed":""}},"revalidateItems"),Ne=e(()=>{if($.size===0||Ie||R)return;Ie=!0;let z=e(()=>De(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(z):setTimeout(z,16)},"scheduleRevalidate"),ve=e(z=>{b=zr(z.target)},"rememberWorkspace");document.addEventListener("pointerdown",ve,!0),document.addEventListener("click",ve,!0);let Ue=e(()=>{if(R)return;for(let[le]of $)le.isConnected||$.delete(le);let z=document.querySelectorAll('[role="menu"]');for(let le of z){if(le.querySelector('[data-dsham-archive-workspace="true"]'))continue;let Te=Array.from(le.querySelectorAll('button[role="menuitem"]'));if(Te.length===0)continue;let ke=Te.find(He=>Jn(He,!1))??Te.find(He=>Jn(He,!0));if(!ke)continue;let Je=Te.find(He=>He!==ke)??ke,xe=ke.parentElement;if(!xe)continue;let ye=b;if(!ye)continue;let Ce=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(He=>He.workspaceId===ye.workspaceId),J=Ce?.path??Ce?.cwd,bt=de(ye.workspaceId).length,Oe=document.createElement("div");Oe.className=xe.className;let Qe=Je.className.split(/\s+/).filter(He=>!/(?:^|[_-])danger(?:$|[_-])/i.test(He)).join(" "),me=document.createElement("button");me.type="button",me.setAttribute("role","menuitem"),me.dataset.dshamArchiveWorkspace="true",me.className=Qe;let Ot=Je.querySelector("span"),rt=Je.querySelectorAll("span")[1],Xt=document.createElement("span");Xt.setAttribute("aria-hidden","true"),Ot?.className&&(Xt.className=Ot.className),Xt.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 vn=document.createElement("span");if(rt?.className&&(vn.className=rt.className),vn.textContent=g("menu.archiveWorkspace"),me.append(Xt,vn),Oe.append(me),bt===0&&(me.disabled=!0,me.style.opacity="0.5",me.style.cursor="not-allowed"),me.addEventListener("click",He=>{He.preventDefault(),He.stopPropagation();let tt=de(ye.workspaceId).length;tt!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),pt({workspaceId:ye.workspaceId,title:ye.title,count:tt}))}),J){let He=document.createElement("div");He.className=xe.className;let tt=document.createElement("button");tt.type="button",tt.setAttribute("role","menuitem"),tt.dataset.dshamCopyWorkspacePath="true",tt.className=Qe,tt.disabled=!1,tt.style.opacity="",tt.style.cursor="";let Qt=document.createElement("span");Qt.setAttribute("aria-hidden","true"),Ot?.className&&(Qt.className=Ot.className),Qt.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"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 3.5V2.5C10.5 1.94772 10.0523 1.5 9.5 1.5H3.5C2.94772 1.5 2.5 1.94772 2.5 2.5V8.5C2.5 9.05228 2.94772 9.5 3.5 9.5H4.5"/></svg>';let en=document.createElement("span");rt?.className&&(en.className=rt.className),en.textContent=g("menu.copyWorkspacePath"),tt.append(Qt,en),He.append(tt),tt.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),mr(J).catch(()=>{})});let yn=document.createElement("div");yn.className=xe.className;let ze=document.createElement("button");ze.type="button",ze.setAttribute("role","menuitem"),ze.dataset.dshamOpenExplorer="true",ze.className=Qe,ze.disabled=!1,ze.style.opacity="",ze.style.cursor="";let Gt=document.createElement("span");Gt.setAttribute("aria-hidden","true"),Ot?.className&&(Gt.className=Ot.className),Gt.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="M1.5 3.5C1.5 2.94772 1.94772 2.5 2.5 2.5H6.5L8 4.5H13.5C14.0523 4.5 14.5 4.94772 14.5 5.5V12.5C14.5 13.0523 14.0523 13.5 13.5 13.5H2.5C1.94772 13.5 1.5 13.0523 1.5 12.5V3.5Z"/><path d="M10 8.5L12 10.5L10 12.5"/><path d="M6.5 10.5H12"/></svg>';let tn=document.createElement("span");rt?.className&&(tn.className=rt.className),tn.textContent=g("menu.openInExplorer"),ze.append(Gt,tn),yn.append(ze),ze.addEventListener("click",Ut=>{Ut.preventDefault(),Ut.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),(async()=>{try{let $t=await fetch(En("/open-in-app/open"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({app:"explorer",path:J})}).catch(()=>null);if($t&&$t.ok)return}catch{}try{await yt("/open-in-explorer",{method:"POST",body:JSON.stringify({path:J,workspaceId:ye.workspaceId})})}catch($t){console.warn("archive-manager: open in explorer failed",$t)}})()}),xe.parentNode?.insertBefore(He,xe),xe.parentNode?.insertBefore(yn,xe)}xe.parentNode?.insertBefore(Oe,xe),$.set(me,{workspaceId:ye.workspaceId})}},"checkAndInject"),Ze=!1,nt=e(()=>{if(Ze||R)return;Ze=!0;let z=e(()=>{Ze=!1,!R&&Ue()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(z):setTimeout(z,16)},"scheduleInject"),ft=new MutationObserver(z=>{Mn(z,'[role="menu"]')&&nt()});ft.observe(document.body,{childList:!0,subtree:!0});let te=n.sessions.list?.subscribe?.(Ne),oe=n.workspaces.list?.subscribe?.(Ne);return()=>{R=!0,document.removeEventListener("pointerdown",ve,!0),document.removeEventListener("click",ve,!0),ft.disconnect(),te?.(),oe?.(),$.clear();for(let z of document.querySelectorAll('[data-dsham-archive-workspace="true"], [data-dsham-copy-workspace-path="true"], [data-dsham-open-explorer="true"]'))z.parentElement?.remove()}}e(Zt,"setupWorkspaceMenuInjector");function Rt(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(g=>g.children?.[Ge]!==void 0)}e(Rt,"hostSidebarDeclaresSessionMenu");let Jt,ct,Ft,Tt,mn,fn,gn,Bt=e(()=>{let g=Rt()?"menu":"waiting";g!==Jt&&(Jt=g,g==="menu"&&(ct??=n.slots.inject(Ge,()=>n.slots.register({name:Ge,id:"archive-manager.delete-session",order:500,locale:Ke,inject:e(()=>({}),"inject")},Et)),Ft??=n.slots.inject(Ge,()=>n.slots.register({name:Ge,id:"archive-manager.favorite",order:50,locale:Ke,inject:e(()=>({favoriteRow:Ee}),"inject")},It)),Tt??=n.slots.inject(Ge,()=>n.slots.register({name:Ge,id:"archive-manager.move-session",order:480,locale:Ke,inject:e(()=>({}),"inject")},je)),mn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:Ke,inject:e(()=>({t:n.locale.bind(Ke)}),"inject")},pn)),fn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:Ke,inject:e(()=>({t:n.locale.bind(Ke)}),"inject")},Ve)),gn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.toast",locale:Ke,inject:e(()=>({}),"inject")},At))))},"reconcileSidebar");Bt(),n.effect(()=>Zt(n.locale.bind(Ke)),"archive-manager: workspace menu injector"),Wr(n);let Pn=typeof n.on=="function"?n.on("slots/changed",g=>{if(g==="sidebar.workspaces")try{Bt()}catch(b){console.warn("archive-manager: sidebar mode switch failed",b)}}):void 0;n.effect(()=>()=>{Pn?.(),ct?.(),Ft?.(),Tt?.(),mn?.(),fn?.(),gn?.()},"archive-manager: sidebar mode");let vt=e(()=>({archiveSessions:ht,archiveSession:e((g,b)=>n.workspaces.archiveSession(g,b),"archiveSession"),sessionStore:rr(n.sessions.list),workspaceStore:rr(n.workspaces.list),unarchiveSession:Re,deleteSession:ge,unarchiveSessions:W,deleteArchivedSessions:q,archivedSessionMetadata:Xe,openConversation:p,focusSessionWorkspace:x,viewState:i,favoriteSessions:Ct,setSessionFavorite:Z,favoriteSync:Ee,organizeBatch:Be,diagnoseOrphanSubagents:N,cleanOrphanSubagents:fe,diagnoseSessionCaches:P,rebuildSessionCaches:u,refreshCacheLists:he,searchSessionContent:Ye,searchArchivedContent:pe,previewArchivedSession:ut,t:n.locale.bind(Ke)}),"buildArchivedSectionProps"),yt=e(async(g,b)=>{let R=En(`/api/michengai/dsh-archive-manager${g}`),$=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},b?.headers),Ie=await fetch(R,Object.assign({},b,{headers:$})),de=await Ie.json();if(!Ie.ok||!de||de.ok===!1)throw new Error((de&&typeof de=="object"&&typeof de.error=="string"?de.error:void 0)||`HTTP ${Ie.status}`);return de},"callSettingsApi"),mt=wr(n,{callApi:yt,renderPanel:e(g=>(0,a.jsx)(Gn,Object.assign({},vt(),g)),"renderPanel"),injectProps:vt,ns:Ke,onOnlineUpdateChange:e(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange")});n.effect(()=>()=>mt.destroy(),"archive-manager: sidebar entry"),n.effect(()=>Vs({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:ce,isEnabled:e(()=>mt.isOnlineUpdateEnabled(),"isEnabled")}),"dsh-archive-manager: plugin update ui"),n.slots.inject("settings.section",()=>n.slots.register({name:"settings.section",id:"archived-sessions",order:45,label:e(()=>n.locale.bind(Ke)("archived.badge"),"label"),icon:"archive",locale:Ke,inject:vt},Gn))}e(Oa,"applyWorkspaceBrowser");async function za(n,r,i,d){try{await r(n)}catch(m){i(ca(m,d))}}return e(za,"forkWithFeedback"),o.__test={forkWithFeedback:za,favoritesOnlyVisibility:Cr,favoriteGroupPredicate:Er,createFavoriteRowStore:Ir,unarchivedSessionIds:Zr,ArchiveSelectionToolbar:qr,ArchivedSessionsSection:Gn,zh:Qr,en:es,displayTitle:et,sessionVisible:Yt,indexSubagentDescendants:Tn,isUnknownSessionError:jn,deriveGroups:va,deriveFlat:ya,deriveSearchResults:ba,deriveArchivedGroups:Jr,sortArchivedGroups:Xr,deriveArchivedBatchIds:dn,archivedSessionIdsInGroups:$r,pruneArchivedSelection:Kr,toggleArchivedSelection:nr,archivedDeleteFeedback:Yr,isWorkspaceTaskCandidate:Zn,isWorkspaceDeleteMenuItem:Jn,workspaceMenuTriggerFrom:zr,applySettingsNavIcon:Ur,restoreSettingsNavIcon:Hr,installSettingsNavIcon:Wr,mutationTouches:Mn,activeSessionActivity:Dn,activeSessionRefusal:Nr,activeArchiveFromMessage:Dr,archiveSessionsViaOfficial:sr,unarchiveSessionsViaOfficial:ns,createUnarchiveSession:ts,createWorkspaceViewStore:sa,migrateWorkspaceViewPersist:Rr,WORKSPACE_VIEW_PERSIST_KEY:_n,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:Ar,bindObservable:rr,groupByWorkspace:Or,byRecency:cn,ARCHIVE_MANAGER_REMOTE:qt,currentSessionId:jt,setupSidebarEntry:wr},o.apply=Ma,o.inject=Da,s.exports}e(Ri,"startArchiveClient");
|
|
24
24
|
|
|
25
25
|
return module.exports.startArchiveClient(require);
|
|
26
26
|
}
|