@michengai/dsh-archive-manager 1.1.18 → 1.1.19
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 +7 -0
- package/CHANGELOG.zh-CN.md +7 -0
- package/README.ru.md +1 -1
- package/lib/client.js +5 -5
- package/lib/index.js +35 -1
- package/lib/plugin-settings.js +22 -4
- package/lib/sidebar-entry.js +99 -2
- 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 Bn=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ni=Object.prototype.hasOwnProperty;var e=(t,s)=>Bn(t,"name",{value:s,configurable:!0});var ri=(t,s)=>{for(var o in s)Bn(t,o,{get:s[o],enumerable:!0})},si=(t,s,o,y)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of ti(s))!ni.call(t,a)&&a!==o&&Bn(t,a,{get:()=>s[a],enumerable:!(y=ei(s,a))||y.enumerable});return t};var ai=t=>si(Bn({},"__esModule",{value:!0}),t);var Di={};ri(Di,{startArchiveClient:()=>Ni});module.exports=ai(Di);function te(t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return t}e(te,"record");function Ge(t){return String(t&&typeof t=="object"&&"message"in t?t.message??t:t)}e(Ge,"errorMessage");function Fn(t){return t&&typeof t=="object"&&"code"in t?t.code:void 0}e(Fn,"errorCode");var ms=Function("return globalThis.__dshArchiveReact")(),{Children:Bi,Component:Fi,Fragment:fs,Profiler:Ui,PureComponent:Hi,StrictMode:Wi,Suspense:qi,cloneElement:Vi,createContext:Gi,createElement:gs,createRef:$i,forwardRef:Ki,isValidElement:Yi,lazy:Zi,memo:Ji,startTransition:Xi,useCallback:Qi,useContext:eo,useDebugValue:to,useDeferredValue:no,useEffect:vs,useId:ro,useImperativeHandle:so,useInsertionEffect:ao,useLayoutEffect:io,useMemo:oo,useReducer:lo,useRef:co,useState:rn,useSyncExternalStore:uo,useTransition:ho,version:po}=ms,L=ms;function bs(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(bs,"NumberField");function oi(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(oi,"CalendarIcon");function wn(t,s,o){let y=String(s+1).padStart(2,"0"),a=String(o).padStart(2,"0");return`${t}-${y}-${a}`}e(wn,"formatYmd");function sn(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(sn,"parseYmd");function li(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(),p=[];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),p.push({year:w,monthIndex:D,day:k,dateStr:wn(w,D,k),isOutside:v})}return p}e(li,"buildMonthGrid");function ci(t,s=new Date){if(t==="all")return{from:"",to:""};let o=wn(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:wn(a.getFullYear(),a.getMonth(),a.getDate()),to:o}}e(ci,"getPresetRange");function ys(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(ys,"shiftMonthClamped");function ws(t){let s=t.React||L;function o(_,ae){let Je=_==="from"?ae:t.from,Vt=_==="to"?ae:t.to;if(Je===""&&Vt===""){t.onClear();return}_==="from"?t.onFrom(ae):t.onTo(ae)}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 p=(s.useRef??(_=>{let[ae]=s.useState({current:_});return ae}))(null),[f,w]=s.useState(!1),D=sn(t.from||t.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[k,v]=s.useState(D.year),[C,R]=s.useState(D.monthIndex),[M,U]=s.useState(null),[B,W]=s.useState(null),[Fe,ne]=s.useState(null);s.useEffect(()=>{if(!f)return;let _=e(Je=>{p.current&&!p.current.contains(Je.target)&&(w(!1),U(null))},"onPointerDown"),ae=e(Je=>{Je.key==="Escape"&&(Je.preventDefault(),Je.stopPropagation(),w(!1),U(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",_,!0),typeof window<"u"&&window.addEventListener("keydown",ae,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",_,!0),typeof window<"u"&&window.removeEventListener("keydown",ae,!0)}},[f]),s.useEffect(()=>{if(!f||!Fe||!p.current)return;p.current.querySelector(`[data-date="${Fe}"]`)?.focus()},[f,Fe]);let re=t.t?t.t("discovery.today")==="Today"||(t.t("locale.language")||"").startsWith("en"):!1,le=t.t?t.t("discovery.today")==="\u0421\u0435\u0433\u043E\u0434\u043D\u044F"||(t.t("locale.language")||"").startsWith("ru"):!1,se=re?"en-US":le?"ru-RU":"zh-CN",Ue=re?["Mo","Tu","We","Th","Fr","Sa","Su"]:le?["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"]:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"];function he(_){_.stopPropagation(),C<=0?(R(11),v(ae=>ae-1)):R(ae=>ae-1)}e(he,"prevMonth");function J(_){_.stopPropagation(),C>=11?(R(0),v(ae=>ae+1)):R(ae=>ae+1)}e(J,"nextMonth");function Nt(_){M?(_>=M?(t.onFrom(M),t.onTo(_)):(t.onFrom(_),t.onTo(M)),U(null),w(!1)):(U(_),W(_))}e(Nt,"handleDayClick");function pt(_){let ae=ci(_);_==="all"?t.onClear():(t.onFrom(ae.from),t.onTo(ae.to)),U(null),w(!1)}e(pt,"applyPreset");function H(_){let ae=wn(_.getFullYear(),_.getMonth(),_.getDate());ne(ae),M&&W(ae),(_.getFullYear()!==k||_.getMonth()!==C)&&(v(_.getFullYear()),R(_.getMonth()))}e(H,"moveFocusToDate");function Te(_,ae){let Je=sn(_);Je&&H(new Date(Je.year,Je.monthIndex,Je.day+ae))}e(Te,"moveFocus");let Re=t.from,Wt=t.to;M&&B&&(Re=M<=B?M:B,Wt=M<=B?B:M);let kt=li(k,C),qt=new Date,qn=Fe||Re||wn(qt.getFullYear(),qt.getMonth(),qt.getDate()),Cr=kt.map((_,ae)=>{let Je=Re===_.dateStr,Vt=Wt===_.dateStr,Vn=!!(Re&&Wt&&_.dateStr>Re&&_.dateStr<Wt),An=_.year===qt.getFullYear()&&_.monthIndex===qt.getMonth()&&_.day===qt.getDate(),dt="dsham_dateDay";_.isOutside&&(dt+=" is-outside"),An&&(dt+=" is-today"),Je&&(dt+=" is-start"),Vt&&(dt+=" is-end"),Vn&&(dt+=" is-in-range");let Yt=!_.isOutside&&(_.dateStr===qn||_.day===1&&!kt.some(X=>!X.isOutside&&X.dateStr===qn));return s.createElement("div",{key:ae,className:dt,role:"button",tabIndex:Yt?0:-1,"data-date":_.dateStr,"aria-label":_.dateStr,"aria-pressed":!!(Je||Vt||Vn),onClick:e(X=>{X.stopPropagation(),Nt(_.dateStr)},"onClick"),onKeyDown:e(X=>{if(X.key==="Enter"||X.key===" ")X.preventDefault(),X.stopPropagation(),Nt(_.dateStr);else if(X.key==="ArrowLeft")X.preventDefault(),X.stopPropagation(),Te(_.dateStr,-1);else if(X.key==="ArrowRight")X.preventDefault(),X.stopPropagation(),Te(_.dateStr,1);else if(X.key==="ArrowUp")X.preventDefault(),X.stopPropagation(),Te(_.dateStr,-7);else if(X.key==="ArrowDown")X.preventDefault(),X.stopPropagation(),Te(_.dateStr,7);else if(X.key==="Home"){X.preventDefault(),X.stopPropagation();let Me=sn(_.dateStr);if(Me){let mt=new Date(Me.year,Me.monthIndex,Me.day),In=(mt.getDay()===0?7:mt.getDay())-1;mt.setDate(mt.getDate()-In),H(mt)}}else if(X.key==="End"){X.preventDefault(),X.stopPropagation();let Me=sn(_.dateStr);if(Me){let mt=new Date(Me.year,Me.monthIndex,Me.day),In=(mt.getDay()===0?7:mt.getDay())-1;mt.setDate(mt.getDate()+(6-In)),H(mt)}}else if(X.key==="PageUp"){X.preventDefault(),X.stopPropagation();let Me=sn(_.dateStr);Me&&H(ys(Me.year,Me.monthIndex,Me.day,-1))}else if(X.key==="PageDown"){X.preventDefault(),X.stopPropagation();let Me=sn(_.dateStr);Me&&H(ys(Me.year,Me.monthIndex,Me.day,1))}},"onKeyDown"),onMouseEnter:e(()=>{M&&W(_.dateStr)},"onMouseEnter")},_.day)}),En=`${k}\u5E74 ${C+1}\u6708`;try{En=new Intl.DateTimeFormat(se,{year:"numeric",month:"long"}).format(new Date(k,C,1))}catch{En=re||le?`${k}-${String(C+1).padStart(2,"0")}`:`${k}\u5E74 ${C+1}\u6708`}return s.createElement("div",{ref:p,className:"dsham_dateRange",role:"group","aria-label":t.label},s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.from,"aria-label":t.fromLabel,"aria-invalid":t.invalid||void 0,onChange:e(_=>o("from",_.target.value),"onChange")}),s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.to,"aria-label":t.toLabel,"aria-invalid":t.invalid||void 0,onChange:e(_=>o("to",_.target.value),"onChange")}),s.createElement("div",{className:"dsham_dateTrigger"+(f?" is-open":""),role:"button",tabIndex:0,"aria-expanded":f,"aria-controls":f?"dsham-date-popover":void 0,onClick:e(()=>{f&&U(null),w(!f)},"onClick"),onKeyDown:e(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),f&&U(null),w(!f))},"onKeyDown")},oi(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(_=>{_.stopPropagation(),t.onClear(),U(null)},"onClick"),children:"\xD7"}):null,s.createElement("span",{className:"dsham_dateChevron"},Ss(s.createElement,f))),f&&s.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":t.label,onClick:e(_=>_.stopPropagation(),"onClick")},s.createElement("div",{className:"dsham_datePresets"},s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>pt("all"),"onClick")},t.t?t.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>pt("today"),"onClick")},t.t?t.t("discovery.today"):"\u4ECA\u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>pt("7d"),"onClick")},t.t?t.t("discovery.last7Days"):"\u8FD1 7 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>pt("30d"),"onClick")},t.t?t.t("discovery.last30Days"):"\u8FD1 30 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>pt("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:he,"aria-label":"prev month"},"\u2039"),s.createElement("span",{className:"dsham_dateMonthTitle"},En),s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:J,"aria-label":"next month"},"\u203A")),s.createElement("div",{className:"dsham_dateGrid"},Ue.map((_,ae)=>s.createElement("div",{key:ae,className:"dsham_dateWeekday"},_))),s.createElement("div",{className:"dsham_dateGrid"},Cr))))}e(ws,"DateRange");function Un(t){return L.createElement("div",{className:t.className},L.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":t.open,onClick:t.onToggle},Ss(L.createElement,t.open),t.title),t.open?L.createElement("div",null,t.children):null)}e(Un,"Disclosure");function Ss(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(Ss,"foldChevron");function hr(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(hr,"SelectionCheckbox");var Sn=e(t=>{if(typeof t!="string"||!t.length||t.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return t},"id"),ks=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"),xs={parse(t){let s=te(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(Sn))],query:ks(s.query,!0)}}},di={parse(t){let s=te(t);if(!s)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:Sn(s.sessionId),query:ks(s.query??"")}}},pr=e((t,s)=>{if(typeof t!="string"||t.length>s)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return t},"boundedString"),Cs=e(t=>{if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return t},"sequence"),mr={parse(t){let s=te(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(te).map(o=>({sessionId:Sn(o.sessionId),seq:Cs(o.seq),snippet:pr(o.snippet,400)})),failures:s.failures.map(te).map(o=>({sessionId:Sn(o.sessionId),message:pr(o.message,500)}))}}},ui={parse(t){let s=te(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:Sn(s.sessionId),hasEarlier:s.hasEarlier,hasLater:s.hasLater,messages:s.messages.map(te).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:Cs(o.seq),role:o.role,text:pr(o.text,2e3),truncated:o.truncated}})}}};async function fr(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(fr,"copySessionText");function Es(){let t=e((o,y)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:e(()=>y,"create"),schema:y}),"codec");return[["searchSessionContent",xs,mr],["searchArchivedContent",xs,mr],["previewArchivedSession",di,ui]].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(Es,"discoveryInvocations");function As(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,p;for(let f of t){let w=l+f.toLowerCase().length;if(p===void 0&&w>y&&(p=a),a+=f.length,w>=y+o.length)return{start:p??a,end:a};l=w}return null}e(As,"findTextRange");function Hn(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(Hn,"dayBoundary");function gr(t,s){return(!t||Number.isFinite(Hn(t)))&&(!s||Number.isFinite(Hn(s)))&&(!t||!s||t<=s)}e(gr,"validUpdatedRange");function Is(t,s,o){if(!gr(s,o))return!1;if(!s&&!o)return!0;let y=typeof t=="number"?t:Date.parse(t??"");return Number.isFinite(y)&&(!s||y>=Hn(s))&&(!o||y<Hn(o,!0))}e(Is,"matchesUpdatedRange");async function Ts(t,s,o,{signal:y,onProgress:a}={}){let l=[],p=[],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=mr.parse(await o({sessionIds:f.slice(D,D+20),query:s}));w(),l.push(...k.items),p.push(...k.failures),a?.({done:Math.min(D+20,f.length),total:f.length,items:[...l],failures:[...p]})}return w(),{items:l,failures:p}}e(Ts,"searchArchiveBatches");function _s(t,s={}){let o=t.createElement;function y({text:v,query:C=""}){let R=As(v,C);return R?o(t.Fragment,null,v.slice(0,R.start),o("mark",null,v.slice(R.start,R.end)),v.slice(R.end)):v}e(y,"HighlightedText");function a(v,C,R,M){let U=JSON.stringify(v),B=JSON.stringify([U,C]),[W,Fe]=t.useState(0),[ne,re]=t.useState({key:"",status:"idle",items:[],failures:[]});return t.useEffect(()=>{if(!R||!C.trim()||!M)return;let se=new AbortController;re({key:B,status:"loading",items:[],failures:[],done:0,total:v.length});let Ue=setTimeout(()=>{Ts(JSON.parse(U),C,M,{signal:se.signal,onProgress:e(he=>{se.signal.aborted||re({key:B,status:"loading",...he})},"onProgress")}).then(he=>{se.signal.aborted||re({key:B,status:"ready",done:v.length,total:v.length,...he})}).catch(he=>{se.signal.aborted||re(J=>({...J,key:B,status:"error",error:Ge(he)}))})},350);return()=>{se.abort(),clearTimeout(Ue)}},[U,C,R,M,W]),{...R&&C.trim()&&M?ne.key===B?ne:{key:B,status:"loading",items:[],failures:[],done:0,total:v.length}:{status:"idle",items:[],failures:[]},retry:e(()=>Fe(se=>se+1),"retry")}}e(a,"useArchiveSearch");function l(v,C){let[R,M]=t.useState(null),[U,B]=t.useState({status:"idle"}),[W,Fe]=t.useState(0),ne=R,re=R&&C.includes(R.session.id);return t.useEffect(()=>{R&&!re&&M(null)},[R,re]),t.useEffect(()=>{if(!re||typeof window>"u")return;let le=e(se=>{se.key==="Escape"&&(se.preventDefault(),se.stopPropagation(),se.stopImmediatePropagation(),M(null))},"onKeyDown");return window.addEventListener("keydown",le,!0),()=>window.removeEventListener("keydown",le,!0)},[re]),t.useEffect(()=>{if(!R||!re||!v)return;let le=!0;return B({key:ne,status:"loading"}),Promise.resolve().then(()=>v({sessionId:R.session.id,query:R.query})).then(se=>{le&&B({key:ne,status:"ready",value:se})}).catch(se=>{le&&B({key:ne,status:"error",error:Ge(se)})}),()=>{le=!1}},[ne,re,v,W]),{target:re?R:null,...U.key===ne?U:{status:"loading"},open:e((le,se="")=>M({session:le,query:se}),"open"),close:e(()=>M(null),"close"),retry:e(()=>Fe(le=>le+1),"retry")}}e(l,"useArchivePreview");function p({title:v,failures:C,separator:R}){let[M,U]=t.useState(!1),B=o("ul",null,C.map(W=>o("li",{key:W.sessionId},W.sessionId,R,W.message)));return o(Un,{title:v,open:M,onToggle:e(()=>U(W=>!W),"onToggle")},B)}e(p,"FailureDetails");function f(v,C){let R=s.Button??(M=>o("button",{type:"button",disabled:M.disabled,onClick:M.onClick},M.children));return o(R,{variant:"outline",size:"sm",...C},v)}e(f,"textButton");function w({t:v,from:C,to:R,onFrom:M,onTo:U,invalid:B,onClear:W}){return o("div",{className:"dsham_dateFilter"},o(ws,{React:t,from:C,to:R,invalid:B,label:v("discovery.date"),fromLabel:v("discovery.from"),toLabel:v("discovery.to"),onFrom:M,onTo:U,onClear:W,t:v}),B?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(p,{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:R}){let[M,U]=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 B=v.value;return B?o("div",{className:"dsham_previewMessages"},o("div",{className:"dsham_previewToolbar"},o("span",{title:C("discovery.previewHint")},C("discovery.readOnly")," \xB7 ",C("discovery.messageCount",{n:B.messages.length})),R&&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(W=>U(W==="raw"),"onChange")})),B.hasEarlier&&o("p",null,C("discovery.earlier")),!B.messages.length&&o("p",null,C("discovery.empty")),B.messages.map(W=>o("article",{key:W.seq,className:"dsham_previewMessage"},o("div",{className:"dsham_previewRole","data-role":W.role},o("span",{"aria-hidden":!0},C(W.role==="user"?"discovery.you":"discovery.ai")),o("strong",null,C("discovery."+W.role))),M||!R?o("pre",{className:"dsham_previewRaw"},o(y,{text:W.text,query:v.target?.query})):o(R,{text:W.text,streaming:!1,labels:{code:{copyLabel:C("discovery.copyCode"),copiedLabel:C("details.copied")},footnotes:C("discovery.footnotes")}}),W.truncated&&o("small",null,C("discovery.truncated")))),B.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(_s,"createDiscoveryTools");var Rs=[".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(""),js={"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"},Ns={"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"},Ds={"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 Ms=e(t=>{let s=te(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"),hi={parse(t){let s=te(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(Ms)}}},vr={parse(t){let s=te(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(Ms)}}},yr={parse(t){let s=te(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 zs(){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",vr)},{method:"rebuildSessionCaches",parameters:[{name:"input",wire:"input",source:"json",codec:t("CacheRebuildInput",hi)}],result:t("CacheRebuildResult",yr)}].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(zs,"cacheRebuildInvocations");function Os(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,p=0,f=[],w,D=new Set,k=e(C=>{if(l){a={...a,...C};for(let R of D)R()}},"update"),v=e(async(C=o)=>{if(!l)return;w!==void 0&&(clearTimeout(w),w=void 0);let R=++p;try{let M=vr.parse(await t.diagnose());l&&R===p&&k({diagnosis:M,error:null})}catch(M){if(C>0&&l&&R===p){w=setTimeout(()=>{w=void 0,l&&R===p&&v(C-1)},y);return}l&&R===p&&k({error:Ge(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;++p,w!==void 0&&(clearTimeout(w),w=void 0);let R=C?[...f]:[...a.diagnosis.items],M={rebuiltSessionIds:[],skippedSessionIds:[],failures:[]};f=[],k({busy:!0,result:null,error:null,refreshError:null,progress:{done:0,total:R.length}});for(let[U,B]of R.entries()){if(!l)return;try{let W=yr.parse(await t.rebuild({items:[B]}));if(!l)return;M.rebuiltSessionIds.push(...W.rebuiltSessionIds),M.skippedSessionIds.push(...W.skippedSessionIds),M.failures.push(...W.failures),W.failures.length&&f.push(B)}catch(W){if(!l)return;M.failures.push({sessionId:B.sessionId,message:Ge(W)}),f.push(B)}k({progress:{done:U+1,total:R.length}})}k({result:M});try{await t.refresh()}catch(U){k({refreshError:Ge(U)})}l&&(await v(),k({busy:!1,progress:null}))},dismiss(){l&&k({result:null,error:null,refreshError:null})},dispose(){l=!1,++p,w!==void 0&&(clearTimeout(w),w=void 0),D.clear()}}}e(Os,"createCacheRebuildController");var Ht=class extends Error{static{e(this,"ArchiveNavigationError")}code;constructor(s){super(s),this.name="ArchiveNavigationError",this.code=s}};function Ps(t,s){return t instanceof Ht?s(`archives.${t.code}`):Ge(t)}e(Ps,"formatArchiveNavigationError");function pi(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(pi,"retainInfoSnapshot");function mi(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(mi,"mainViewSessionId");function jt(t){return mi(t)}e(jt,"currentSessionId");function fi(t,s,o){return s===void 0||s===""?!1:(t?.byId?.[s]?.retainedBy?.mainView??0)>0||(pi(o,s)?.retainedBy?.mainView??0)>0}e(fi,"sessionIsCurrent");async function Ls(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(Ls,"openArchivedConversation");function Bs(t,s,o,{onOpened:y=e(()=>{},"onOpened"),beginNavigation:a,warn:l=e((...p)=>console.warn(...p),"warn")}={}){let p,f=t?.clearArchivedCurrent,w=t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent"),D=e(C=>fi(s.list.getSnapshot(),C,s),"viewing"),k=e(function(...C){return p!==void 0&&D(p)&&o.list.getSnapshot().archivedSessionIds.includes(p)?!1:(p=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){p=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 Ht("navigationUnavailable");if(a?.(),typeof t?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new Ht("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 Ht("sessionNotRetained");y()}catch(R){throw p=void 0,R}},dispose(){p=void 0,!(!t||Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value!==k)&&(w?Object.defineProperty(t,"clearArchivedCurrent",w):delete t.clearArchivedCurrent,f?.call(t))}}}e(Bs,"allowArchivedNavigation");var Kt=require("@deepseek-ai/dsh-client-ui-primitives");var Fs={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"},Us={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 xn(t){return t.toLowerCase().startsWith("zh")?Fs:Us}e(xn,"pluginUpdateCopy");function gi(t,s,o,y){let a=xn(t),l=s?.restartDesktop===!0||s?.profileName==="desktop",p=l?{...a,manualHint:a.manualHintDesktop}:a,f=o!=="idle",w=p.checking,D="";return o==="checking"?w=p.checking:o==="updating"?w=p.updating:y.type==="error"?(w=y.message||p.failed,D="error"):y.type==="restart"?(w=l?p.restartDesktop:p.restart,D="success"):y.type==="restarting"?(w=p.restarting,D="success"):s===void 0?w=p.checking:s.latestCheckFailed?(w=p.failed,D="error"):!s.canAutoUpdate&&s.updateAvailable?(w=p.unavailable,D="update"):s.updateAvailable?(w=`${p.found}: v${s.latestVersion??p.unknown}`,D="update"):(w=p.latest,D="success"),{copy:p,busy:f,message:w,kind:D,loading:o==="updating",updateLabel:o==="updating"?p.updating:p.auto,disabled:f||s?.canAutoUpdate!==!0||s.updateAvailable!==!0,currentVersion:s===void 0?p.unknown:`v${s.currentVersion}`,latestVersion:s?.latestVersion===void 0?p.unknown:`v${s.latestVersion}`,profileName:s?.profileName??p.unknown,profileRaw:s?.profileName??"",latestRaw:s?.latestVersion??"latest"}}e(gi,"describePluginUpdate");function Hs(t,s,o){let y="idle",a=s,l={type:"status"},p=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 p},subscribe(k){return f.add(k),()=>{f.delete(k)}},view(k){return gi(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"},p+=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(Hs,"createUpdateFlow");function Ws(t,s,o){return`dsh plugin${t.trim()===""?"":` --profile ${t.trim()}`} add ${s}@${o} --registry=https://registry.npmjs.org/`}e(Ws,"manualPluginUpdateCommand");function qs(t,s){return t.key!=="Escape"?!1:(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),s(),!0)}e(qs,"handlePluginUpdateEscape");function vi(){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(vi,"pageBaseHref");function kn(t){if(typeof t!="string"||t.charAt(0)!=="/"||t.charAt(1)==="/")return t;let s=vi();if(s===void 0)return t;try{return new URL(t.slice(1),s).href}catch{return t}}e(kn,"resolveApiUrl");function Vs(t){let o=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(o===void 0)throw new Error("createRoot unavailable");return o(t)}e(Vs,"mountRoot");var yi="x-michengai-plugin-update",Gs="michengai-plugin-update-ui",br=`
|
|
10
|
+
"use strict";var Un=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ni=Object.prototype.hasOwnProperty;var e=(t,s)=>Un(t,"name",{value:s,configurable:!0});var ri=(t,s)=>{for(var o in s)Un(t,o,{get:s[o],enumerable:!0})},si=(t,s,o,b)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of ti(s))!ni.call(t,a)&&a!==o&&Un(t,a,{get:()=>s[a],enumerable:!(b=ei(s,a))||b.enumerable});return t};var ai=t=>si(Un({},"__esModule",{value:!0}),t);var Di={};ri(Di,{startArchiveClient:()=>ji});module.exports=ai(Di);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 qe(t){return String(t&&typeof t=="object"&&"message"in t?t.message??t:t)}e(qe,"errorMessage");function Hn(t){return t&&typeof t=="object"&&"code"in t?t.code:void 0}e(Hn,"errorCode");var fs=Function("return globalThis.__dshArchiveReact")(),{Children:Bi,Component:Ui,Fragment:gs,Profiler:Hi,PureComponent:Wi,StrictMode:qi,Suspense:Vi,cloneElement:Gi,createContext:$i,createElement:vs,createRef:Ki,forwardRef:Yi,isValidElement:Zi,lazy:Ji,memo:Xi,startTransition:Qi,useCallback:eo,useContext:to,useDebugValue:no,useDeferredValue:ro,useEffect:bs,useId:so,useImperativeHandle:ao,useInsertionEffect:io,useLayoutEffect:oo,useMemo:lo,useReducer:co,useRef:uo,useState:Gt,useSyncExternalStore:ho,useTransition:po,version:mo}=fs,U=fs;function ws(t){return U.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 b=Number(o);t.onChange(Number.isNaN(b)?null:b)},"onChange")})}e(ws,"NumberField");function oi(t=U.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(oi,"CalendarIcon");function En(t,s,o){let b=String(s+1).padStart(2,"0"),a=String(o).padStart(2,"0");return`${t}-${b}-${a}`}e(En,"formatYmd");function on(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(on,"parseYmd");function li(t,s){let o=new Date(t,s,1).getDay(),b=(o===0?7:o)-1,a=new Date(t,s+1,0).getDate(),l=new Date(t,s,0).getDate(),p=[];for(let g=0;g<42;g++){let y=t,D=s,x=0,v=!1;g<b?(x=l-b+g+1,D=s-1,D<0&&(D=11,y--),v=!0):g<b+a?x=g-b+1:(x=g-b-a+1,D=s+1,D>11&&(D=0,y++),v=!0),p.push({year:y,monthIndex:D,day:x,dateStr:En(y,D,x),isOutside:v})}return p}e(li,"buildMonthGrid");function di(t,s=new Date){if(t==="all")return{from:"",to:""};let o=En(s.getFullYear(),s.getMonth(),s.getDate());if(t==="today")return{from:o,to:o};let b=t==="7d"?6:t==="30d"?29:89,a=new Date(s.getTime()-b*864e5);return{from:En(a.getFullYear(),a.getMonth(),a.getDate()),to:o}}e(di,"getPresetRange");function ys(t,s,o,b){let a=s+b,l=new Date(t,a+1,0).getDate();return new Date(t,a,Math.min(o,l))}e(ys,"shiftMonthClamped");function Ss(t){let s=t.React||U;function o(_,fe){let Ve=_==="from"?fe:t.from,Kt=_==="to"?fe:t.to;if(Ve===""&&Kt===""){t.onClear();return}_==="from"?t.onFrom(fe):t.onTo(fe)}e(o,"change");let b=!!(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 p=(s.useRef??(_=>{let[fe]=s.useState({current:_});return fe}))(null),[g,y]=s.useState(!1),D=on(t.from||t.to)??{year:new Date().getFullYear(),monthIndex:new Date().getMonth(),day:new Date().getDate()},[x,v]=s.useState(D.year),[C,M]=s.useState(D.monthIndex),[N,H]=s.useState(null),[B,q]=s.useState(null),[le,re]=s.useState(null);s.useEffect(()=>{if(!g)return;let _=e(Ve=>{p.current&&!p.current.contains(Ve.target)&&(y(!1),H(null))},"onPointerDown"),fe=e(Ve=>{Ve.key==="Escape"&&(Ve.preventDefault(),Ve.stopPropagation(),y(!1),H(null))},"onKeyDown");return typeof document<"u"&&document.addEventListener("mousedown",_,!0),typeof window<"u"&&window.addEventListener("keydown",fe,!0),()=>{typeof document<"u"&&document.removeEventListener("mousedown",_,!0),typeof window<"u"&&window.removeEventListener("keydown",fe,!0)}},[g]),s.useEffect(()=>{if(!g||!le||!p.current)return;p.current.querySelector(`[data-date="${le}"]`)?.focus()},[g,le]);let se=t.t?t.t("discovery.today")==="Today"||(t.t("locale.language")||"").startsWith("en"):!1,de=t.t?t.t("discovery.today")==="\u0421\u0435\u0433\u043E\u0434\u043D\u044F"||(t.t("locale.language")||"").startsWith("ru"):!1,ae=se?"en-US":de?"ru-RU":"zh-CN",Be=se?["Mo","Tu","We","Th","Fr","Sa","Su"]:de?["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"]:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"];function he(_){_.stopPropagation(),C<=0?(M(11),v(fe=>fe-1)):M(fe=>fe-1)}e(he,"prevMonth");function V(_){_.stopPropagation(),C>=11?(M(0),v(fe=>fe+1)):M(fe=>fe+1)}e(V,"nextMonth");function mt(_){N?(_>=N?(t.onFrom(N),t.onTo(_)):(t.onFrom(_),t.onTo(N)),H(null),y(!1)):(H(_),q(_))}e(mt,"handleDayClick");function ft(_){let fe=di(_);_==="all"?t.onClear():(t.onFrom(fe.from),t.onTo(fe.to)),H(null),y(!1)}e(ft,"applyPreset");function yt(_){let fe=En(_.getFullYear(),_.getMonth(),_.getDate());re(fe),N&&q(fe),(_.getFullYear()!==x||_.getMonth()!==C)&&(v(_.getFullYear()),M(_.getMonth()))}e(yt,"moveFocusToDate");function xt(_,fe){let Ve=on(_);Ve&&yt(new Date(Ve.year,Ve.monthIndex,Ve.day+fe))}e(xt,"moveFocus");let ze=t.from,It=t.to;N&&B&&(ze=N<=B?N:B,It=N<=B?B:N);let L=li(x,C),Ee=new Date,Mt=le||ze||En(Ee.getFullYear(),Ee.getMonth(),Ee.getDate()),Cr=L.map((_,fe)=>{let Ve=ze===_.dateStr,Kt=It===_.dateStr,cn=!!(ze&&It&&_.dateStr>ze&&_.dateStr<It),Rn=_.year===Ee.getFullYear()&&_.monthIndex===Ee.getMonth()&&_.day===Ee.getDate(),zt="dsham_dateDay";_.isOutside&&(zt+=" is-outside"),Rn&&(zt+=" is-today"),Ve&&(zt+=" is-start"),Kt&&(zt+=" is-end"),cn&&(zt+=" is-in-range");let Ot=!_.isOutside&&(_.dateStr===Mt||_.day===1&&!L.some(X=>!X.isOutside&&X.dateStr===Mt));return s.createElement("div",{key:fe,className:zt,role:"button",tabIndex:Ot?0:-1,"data-date":_.dateStr,"aria-label":_.dateStr,"aria-pressed":!!(Ve||Kt||cn),onClick:e(X=>{X.stopPropagation(),mt(_.dateStr)},"onClick"),onKeyDown:e(X=>{if(X.key==="Enter"||X.key===" ")X.preventDefault(),X.stopPropagation(),mt(_.dateStr);else if(X.key==="ArrowLeft")X.preventDefault(),X.stopPropagation(),xt(_.dateStr,-1);else if(X.key==="ArrowRight")X.preventDefault(),X.stopPropagation(),xt(_.dateStr,1);else if(X.key==="ArrowUp")X.preventDefault(),X.stopPropagation(),xt(_.dateStr,-7);else if(X.key==="ArrowDown")X.preventDefault(),X.stopPropagation(),xt(_.dateStr,7);else if(X.key==="Home"){X.preventDefault(),X.stopPropagation();let Le=on(_.dateStr);if(Le){let at=new Date(Le.year,Le.monthIndex,Le.day),un=(at.getDay()===0?7:at.getDay())-1;at.setDate(at.getDate()-un),yt(at)}}else if(X.key==="End"){X.preventDefault(),X.stopPropagation();let Le=on(_.dateStr);if(Le){let at=new Date(Le.year,Le.monthIndex,Le.day),un=(at.getDay()===0?7:at.getDay())-1;at.setDate(at.getDate()+(6-un)),yt(at)}}else if(X.key==="PageUp"){X.preventDefault(),X.stopPropagation();let Le=on(_.dateStr);Le&&yt(ys(Le.year,Le.monthIndex,Le.day,-1))}else if(X.key==="PageDown"){X.preventDefault(),X.stopPropagation();let Le=on(_.dateStr);Le&&yt(ys(Le.year,Le.monthIndex,Le.day,1))}},"onKeyDown"),onMouseEnter:e(()=>{N&&q(_.dateStr)},"onMouseEnter")},_.day)}),_n=`${x}\u5E74 ${C+1}\u6708`;try{_n=new Intl.DateTimeFormat(ae,{year:"numeric",month:"long"}).format(new Date(x,C,1))}catch{_n=se||de?`${x}-${String(C+1).padStart(2,"0")}`:`${x}\u5E74 ${C+1}\u6708`}return s.createElement("div",{ref:p,className:"dsham_dateRange",role:"group","aria-label":t.label},s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.from,"aria-label":t.fromLabel,"aria-invalid":t.invalid||void 0,onChange:e(_=>o("from",_.target.value),"onChange")}),s.createElement("input",{className:"dsham_dateInputSrOnly",type:"date",tabIndex:-1,"aria-hidden":!0,value:t.to,"aria-label":t.toLabel,"aria-invalid":t.invalid||void 0,onChange:e(_=>o("to",_.target.value),"onChange")}),s.createElement("div",{className:"dsham_dateTrigger"+(g?" is-open":""),role:"button",tabIndex:0,"aria-expanded":g,"aria-controls":g?"dsham-date-popover":void 0,onClick:e(()=>{g&&H(null),y(!g)},"onClick"),onKeyDown:e(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),g&&H(null),y(!g))},"onKeyDown")},oi(s.createElement),s.createElement("span",{className:"dsham_dateText"+(b?"":" placeholder")},a),b?s.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:e(_=>{_.stopPropagation(),t.onClear(),H(null)},"onClick"),children:"\xD7"}):null,s.createElement("span",{className:"dsham_dateChevron"},ks(s.createElement,g))),g&&s.createElement("div",{id:"dsham-date-popover",className:"dsham_datePopover",role:"region","aria-label":t.label,onClick:e(_=>_.stopPropagation(),"onClick")},s.createElement("div",{className:"dsham_datePresets"},s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>ft("all"),"onClick")},t.t?t.t("discovery.allTime"):"\u5168\u90E8\u65F6\u95F4"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>ft("today"),"onClick")},t.t?t.t("discovery.today"):"\u4ECA\u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>ft("7d"),"onClick")},t.t?t.t("discovery.last7Days"):"\u8FD1 7 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>ft("30d"),"onClick")},t.t?t.t("discovery.last30Days"):"\u8FD1 30 \u5929"),s.createElement("button",{type:"button",className:"dsham_datePresetBtn",onClick:e(()=>ft("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:he,"aria-label":"prev month"},"\u2039"),s.createElement("span",{className:"dsham_dateMonthTitle"},_n),s.createElement("button",{type:"button",className:"dsham_dateNavBtn",onClick:V,"aria-label":"next month"},"\u203A")),s.createElement("div",{className:"dsham_dateGrid"},Be.map((_,fe)=>s.createElement("div",{key:fe,className:"dsham_dateWeekday"},_))),s.createElement("div",{className:"dsham_dateGrid"},Cr))))}e(Ss,"DateRange");function Wn(t){return U.createElement("div",{className:t.className},U.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":t.open,onClick:t.onToggle},ks(U.createElement,t.open),t.title),t.open?U.createElement("div",null,t.children):null)}e(Wn,"Disclosure");function ks(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(ks,"foldChevron");function hr(t){let s=U.useRef(null);return U.useEffect(()=>{s.current&&(s.current.indeterminate=!!t.indeterminate&&!t.checked)},[t.indeterminate,t.checked]),U.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(hr,"SelectionCheckbox");var An=e(t=>{if(typeof t!="string"||!t.length||t.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return t},"id"),Cs=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"),xs={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(An))],query:Cs(s.query,!0)}}},ci={parse(t){let s=ne(t);if(!s)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:An(s.sessionId),query:Cs(s.query??"")}}},pr=e((t,s)=>{if(typeof t!="string"||t.length>s)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return t},"boundedString"),Es=e(t=>{if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return t},"sequence"),mr={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:An(o.sessionId),seq:Es(o.seq),snippet:pr(o.snippet,400)})),failures:s.failures.map(ne).map(o=>({sessionId:An(o.sessionId),message:pr(o.message,500)}))}}},ui={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:An(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:Es(o.seq),role:o.role,text:pr(o.text,2e3),truncated:o.truncated}})}}};async function fr(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(fr,"copySessionText");function As(){let t=e((o,b)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:e(()=>b,"create"),schema:b}),"codec");return[["searchSessionContent",xs,mr],["searchArchivedContent",xs,mr],["previewArchivedSession",ci,ui]].map(([o,b,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",b)}],result:t(o+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(As,"discoveryInvocations");function Is(t,s){let o=s?.trim().toLowerCase();if(!o)return null;let b=t.toLowerCase().indexOf(o);if(b<0)return null;let a=0,l=0,p;for(let g of t){let y=l+g.toLowerCase().length;if(p===void 0&&y>b&&(p=a),a+=g.length,y>=b+o.length)return{start:p??a,end:a};l=y}return null}e(Is,"findTextRange");function qn(t,s=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return NaN;let[o,b,a]=t.split("-").map(Number),l=new Date(o,b-1,a);return l.getFullYear()!==o||l.getMonth()!==b-1||l.getDate()!==a?NaN:(s&&l.setDate(l.getDate()+1),l.getTime())}e(qn,"dayBoundary");function gr(t,s){return(!t||Number.isFinite(qn(t)))&&(!s||Number.isFinite(qn(s)))&&(!t||!s||t<=s)}e(gr,"validUpdatedRange");function Ts(t,s,o){if(!gr(s,o))return!1;if(!s&&!o)return!0;let b=typeof t=="number"?t:Date.parse(t??"");return Number.isFinite(b)&&(!s||b>=qn(s))&&(!o||b<qn(o,!0))}e(Ts,"matchesUpdatedRange");async function _s(t,s,o,{signal:b,onProgress:a}={}){let l=[],p=[],g=[...new Set(t)],y=e(()=>{if(b?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let D=0;D<g.length;D+=20){y();let x=mr.parse(await o({sessionIds:g.slice(D,D+20),query:s}));y(),l.push(...x.items),p.push(...x.failures),a?.({done:Math.min(D+20,g.length),total:g.length,items:[...l],failures:[...p]})}return y(),{items:l,failures:p}}e(_s,"searchArchiveBatches");function Rs(t,s={}){let o=t.createElement;function b({text:v,query:C=""}){let M=Is(v,C);return M?o(t.Fragment,null,v.slice(0,M.start),o("mark",null,v.slice(M.start,M.end)),v.slice(M.end)):v}e(b,"HighlightedText");function a(v,C,M,N){let H=JSON.stringify(v),B=JSON.stringify([H,C]),[q,le]=t.useState(0),[re,se]=t.useState({key:"",status:"idle",items:[],failures:[]});return t.useEffect(()=>{if(!M||!C.trim()||!N)return;let ae=new AbortController;se({key:B,status:"loading",items:[],failures:[],done:0,total:v.length});let Be=setTimeout(()=>{_s(JSON.parse(H),C,N,{signal:ae.signal,onProgress:e(he=>{ae.signal.aborted||se({key:B,status:"loading",...he})},"onProgress")}).then(he=>{ae.signal.aborted||se({key:B,status:"ready",done:v.length,total:v.length,...he})}).catch(he=>{ae.signal.aborted||se(V=>({...V,key:B,status:"error",error:qe(he)}))})},350);return()=>{ae.abort(),clearTimeout(Be)}},[H,C,M,N,q]),{...M&&C.trim()&&N?re.key===B?re:{key:B,status:"loading",items:[],failures:[],done:0,total:v.length}:{status:"idle",items:[],failures:[]},retry:e(()=>le(ae=>ae+1),"retry")}}e(a,"useArchiveSearch");function l(v,C){let[M,N]=t.useState(null),[H,B]=t.useState({status:"idle"}),[q,le]=t.useState(0),re=M,se=M&&C.includes(M.session.id);return t.useEffect(()=>{M&&!se&&N(null)},[M,se]),t.useEffect(()=>{if(!se||typeof window>"u")return;let de=e(ae=>{ae.key==="Escape"&&(ae.preventDefault(),ae.stopPropagation(),ae.stopImmediatePropagation(),N(null))},"onKeyDown");return window.addEventListener("keydown",de,!0),()=>window.removeEventListener("keydown",de,!0)},[se]),t.useEffect(()=>{if(!M||!se||!v)return;let de=!0;return B({key:re,status:"loading"}),Promise.resolve().then(()=>v({sessionId:M.session.id,query:M.query})).then(ae=>{de&&B({key:re,status:"ready",value:ae})}).catch(ae=>{de&&B({key:re,status:"error",error:qe(ae)})}),()=>{de=!1}},[re,se,v,q]),{target:se?M:null,...H.key===re?H:{status:"loading"},open:e((de,ae="")=>N({session:de,query:ae}),"open"),close:e(()=>N(null),"close"),retry:e(()=>le(de=>de+1),"retry")}}e(l,"useArchivePreview");function p({title:v,failures:C,separator:M}){let[N,H]=t.useState(!1),B=o("ul",null,C.map(q=>o("li",{key:q.sessionId},q.sessionId,M,q.message)));return o(Wn,{title:v,open:N,onToggle:e(()=>H(q=>!q),"onToggle")},B)}e(p,"FailureDetails");function g(v,C){let M=s.Button??(N=>o("button",{type:"button",disabled:N.disabled,onClick:N.onClick},N.children));return o(M,{variant:"outline",size:"sm",...C},v)}e(g,"textButton");function y({t:v,from:C,to:M,onFrom:N,onTo:H,invalid:B,onClear:q}){return o("div",{className:"dsham_dateFilter"},o(Ss,{React:t,from:C,to:M,invalid:B,label:v("discovery.date"),fromLabel:v("discovery.from"),toLabel:v("discovery.to"),onFrom:N,onTo:H,onClear:q,t:v}),B?o("p",{className:"dsham_dateAlert",role:"alert"},v("discovery.invalidDate")):null)}e(y,"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(p,{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)&&g(C("discovery.retry"),{onClick:v.retry}))}e(D,"SearchStatus");function x({preview:v,t:C,MarkdownText:M}){let[N,H]=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),g(C("discovery.retry"),{onClick:v.retry}));let B=v.value;return B?o("div",{className:"dsham_previewMessages"},o("div",{className:"dsham_previewToolbar"},o("span",{title:C("discovery.previewHint")},C("discovery.readOnly")," \xB7 ",C("discovery.messageCount",{n:B.messages.length})),M&&o(s.SegmentedControl??"div",{id:"dsham-preview-mode",label:C("discovery.displayMode"),value:N?"raw":"formatted",options:[{value:"formatted",label:C("discovery.formatted")},{value:"raw",label:C("discovery.raw")}],onChange:e(q=>H(q==="raw"),"onChange")})),B.hasEarlier&&o("p",null,C("discovery.earlier")),!B.messages.length&&o("p",null,C("discovery.empty")),B.messages.map(q=>o("article",{key:q.seq,className:"dsham_previewMessage"},o("div",{className:"dsham_previewRole","data-role":q.role},o("span",{"aria-hidden":!0},C(q.role==="user"?"discovery.you":"discovery.ai")),o("strong",null,C("discovery."+q.role))),N||!M?o("pre",{className:"dsham_previewRaw"},o(b,{text:q.text,query:v.target?.query})):o(M,{text:q.text,streaming:!1,labels:{code:{copyLabel:C("discovery.copyCode"),copiedLabel:C("details.copied")},footnotes:C("discovery.footnotes")}}),q.truncated&&o("small",null,C("discovery.truncated")))),B.hasLater&&o("p",null,C("discovery.later"))):null}return e(x,"PreviewContent"),{HighlightedText:b,useArchiveSearch:a,useArchivePreview:l,DiscoveryFilters:y,SearchStatus:D,PreviewContent:x}}e(Rs,"createDiscoveryTools");var Ns=[".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(""),js={"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"},Ds={"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"},Ms={"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 zs=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"),hi={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(zs)}}},vr={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(zs)}}},br={parse(t){let s=ne(t);for(let o of["rebuiltSessionIds","skippedSessionIds"])if(!Array.isArray(s?.[o])||s[o].some(b=>typeof b!="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 Os(){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",vr)},{method:"rebuildSessionCaches",parameters:[{name:"input",wire:"input",source:"json",codec:t("CacheRebuildInput",hi)}],result:t("CacheRebuildResult",br)}].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(Os,"cacheRebuildInvocations");function Ps(t,s={}){let{maxLoadRetries:o=3,retryDelayMs:b=200}=s,a={diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null},l=!0,p=0,g=[],y,D=new Set,x=e(C=>{if(l){a={...a,...C};for(let M of D)M()}},"update"),v=e(async(C=o)=>{if(!l)return;y!==void 0&&(clearTimeout(y),y=void 0);let M=++p;try{let N=vr.parse(await t.diagnose());l&&M===p&&x({diagnosis:N,error:null})}catch(N){if(C>0&&l&&M===p){y=setTimeout(()=>{y=void 0,l&&M===p&&v(C-1)},b);return}l&&M===p&&x({error:qe(N)})}},"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;++p,y!==void 0&&(clearTimeout(y),y=void 0);let M=C?[...g]:[...a.diagnosis.items],N={rebuiltSessionIds:[],skippedSessionIds:[],failures:[]};g=[],x({busy:!0,result:null,error:null,refreshError:null,progress:{done:0,total:M.length}});for(let[H,B]of M.entries()){if(!l)return;try{let q=br.parse(await t.rebuild({items:[B]}));if(!l)return;N.rebuiltSessionIds.push(...q.rebuiltSessionIds),N.skippedSessionIds.push(...q.skippedSessionIds),N.failures.push(...q.failures),q.failures.length&&g.push(B)}catch(q){if(!l)return;N.failures.push({sessionId:B.sessionId,message:qe(q)}),g.push(B)}x({progress:{done:H+1,total:M.length}})}x({result:N});try{await t.refresh()}catch(H){x({refreshError:qe(H)})}l&&(await v(),x({busy:!1,progress:null}))},dismiss(){l&&x({result:null,error:null,refreshError:null})},dispose(){l=!1,++p,y!==void 0&&(clearTimeout(y),y=void 0),D.clear()}}}e(Ps,"createCacheRebuildController");var $t=class extends Error{static{e(this,"ArchiveNavigationError")}code;constructor(s){super(s),this.name="ArchiveNavigationError",this.code=s}};function Ls(t,s){return t instanceof $t?s(`archives.${t.code}`):qe(t)}e(Ls,"formatArchiveNavigationError");function pi(t,s){if(typeof t?.retainInfo!="function")return;let o=t.retainInfo(s),b=o&&typeof o=="object"&&"getSnapshot"in o&&typeof o.getSnapshot=="function"?o.getSnapshot():o;if(!b||typeof b!="object"||!("retainedBy"in b))return;let a=b.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}e(pi,"retainInfoSnapshot");function mi(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(mi,"mainViewSessionId");function Dt(t){return mi(t)}e(Dt,"currentSessionId");function fi(t,s,o){return s===void 0||s===""?!1:(t?.byId?.[s]?.retainedBy?.mainView??0)>0||(pi(o,s)?.retainedBy?.mainView??0)>0}e(fi,"sessionIsCurrent");async function Fs(t,s,o,b=()=>!0){if(o){if(typeof t.prepare=="function"&&await t.prepare(s),!b())return;await t.restore(s)}b()&&await t.open(s)}e(Fs,"openArchivedConversation");function Bs(t,s,o,{onOpened:b=e(()=>{},"onOpened"),beginNavigation:a,warn:l=e((...p)=>console.warn(...p),"warn")}={}){let p,g=t?.clearArchivedCurrent,y=t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent"),D=e(C=>fi(s.list.getSnapshot(),C,s),"viewing"),x=e(function(...C){return p!==void 0&&D(p)&&o.list.getSnapshot().archivedSessionIds.includes(p)?!1:(p=void 0,g?.apply(this,C))},"wrapped"),v=e(()=>t&&Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value===x,"ownsWrapper");if(t&&typeof g=="function")try{if(t.clearArchivedCurrent=x,!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){p=C;try{if(typeof g=="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 $t("navigationUnavailable");if(a?.(),typeof t?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new $t("navigationUnavailable");if(t.openSession(C),!D(C))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof g=="function"}),new $t("sessionNotRetained");b()}catch(M){throw p=void 0,M}},dispose(){p=void 0,!(!t||Object.getOwnPropertyDescriptor(t,"clearArchivedCurrent")?.value!==x)&&(y?Object.defineProperty(t,"clearArchivedCurrent",y):delete t.clearArchivedCurrent,g?.call(t))}}}e(Bs,"allowArchivedNavigation");var Xt=require("@deepseek-ai/dsh-client-ui-primitives");var Us={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"},Hs={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 In(t){return t.toLowerCase().startsWith("zh")?Us:Hs}e(In,"pluginUpdateCopy");function gi(t,s,o,b){let a=In(t),l=s?.restartDesktop===!0||s?.profileName==="desktop",p=l?{...a,manualHint:a.manualHintDesktop}:a,g=o!=="idle",y=p.checking,D="";return o==="checking"?y=p.checking:o==="updating"?y=p.updating:b.type==="error"?(y=b.message||p.failed,D="error"):b.type==="restart"?(y=l?p.restartDesktop:p.restart,D="success"):b.type==="restarting"?(y=p.restarting,D="success"):s===void 0?y=p.checking:s.latestCheckFailed?(y=p.failed,D="error"):!s.canAutoUpdate&&s.updateAvailable?(y=p.unavailable,D="update"):s.updateAvailable?(y=`${p.found}: v${s.latestVersion??p.unknown}`,D="update"):(y=p.latest,D="success"),{copy:p,busy:g,message:y,kind:D,loading:o==="updating",updateLabel:o==="updating"?p.updating:p.auto,disabled:g||s?.canAutoUpdate!==!0||s.updateAvailable!==!0,currentVersion:s===void 0?p.unknown:`v${s.currentVersion}`,latestVersion:s?.latestVersion===void 0?p.unknown:`v${s.latestVersion}`,profileName:s?.profileName??p.unknown,profileRaw:s?.profileName??"",latestRaw:s?.latestVersion??"latest"}}e(gi,"describePluginUpdate");function Ws(t,s,o){let b="idle",a=s,l={type:"status"},p=0,g=new Set,y=e(()=>{for(let x of g)x()},"emit"),D=e(x=>{a=x,o?.(x)},"assign");return{get posts(){return p},subscribe(x){return g.add(x),()=>{g.delete(x)}},view(x){return gi(x,a,b,l)},async check(){if(b==="idle"){b="checking",l={type:"status"},y();try{D(await t("GET")),l={type:"status"}}catch(x){l={type:"error",message:x instanceof Error?x.message:""}}finally{b="idle",y()}}},async update(){if(b==="idle"){b="updating",l={type:"status"},p+=1,y();try{let x=await t("POST");D(x),l={type:x.autoReload===!0?"restarting":"restart"}}catch(x){l={type:"error",message:x instanceof Error?x.message:""}}finally{b="idle",y()}}}}}e(Ws,"createUpdateFlow");function qs(t,s,o){return`dsh plugin${t.trim()===""?"":` --profile ${t.trim()}`} add ${s}@${o} --registry=https://registry.npmjs.org/`}e(qs,"manualPluginUpdateCommand");function Vs(t,s){return t.key!=="Escape"?!1:(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),s(),!0)}e(Vs,"handlePluginUpdateEscape");function vi(){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),b=o.pathname.lastIndexOf("/"),a=o.pathname.slice(b+1);return/\.(html?|php|aspx?|jsp)$/i.test(a)?o.pathname=o.pathname.slice(0,b+1):o.pathname.endsWith("/")||(o.pathname+="/"),o.href}catch{return}}e(vi,"pageBaseHref");function Tn(t){if(typeof t!="string"||t.charAt(0)!=="/"||t.charAt(1)==="/")return t;let s=vi();if(s===void 0)return t;try{return new URL(t.slice(1),s).href}catch{return t}}e(Tn,"resolveApiUrl");function Gs(t){let o=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(o===void 0)throw new Error("createRoot unavailable");return o(t)}e(Gs,"mountRoot");var bi="x-michengai-plugin-update",$s="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 yi(){let t=document.getElementById($s);if(t!==null){t.textContent!==yr&&(t.textContent=yr);return}let s=document.createElement("style");s.id=$s,s.textContent=yr,(document.head??document.documentElement).append(s)}e(yi,"ensureStyle");function wi(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(wi,"validPayload");async function Ks(t,s,o){let b=o===void 0?{}:{signal:o},a=await fetch(t,s==="GET"?{cache:"no-store",...b}:{method:"POST",headers:{"content-type":"application/json",[bi]:"1"},body:"{}",...b}),l=await a.json();if(!a.ok||!wi(l))throw new Error(l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:In(document.documentElement.lang).failed);return l}e(Ks,"requestStatus");function Si(t){let s=U.useRef(null);return U.useLayoutEffect(()=>{s.current?.replaceChildren(t.node)},[t.node]),U.createElement("span",{ref:s,className:"mpi-icon","aria-hidden":!0})}e(Si,"HostIcon");function ki(t){let s=U.useRef(null),[,o]=U.useState(0),[b,a]=U.useState("idle");U.useEffect(()=>t.flow.subscribe(()=>o(x=>x+1)),[t.flow]),U.useEffect(()=>{let x=document.documentElement,v=new MutationObserver(()=>o(C=>C+1));return v.observe(x,{attributes:!0,attributeFilter:["lang"]}),()=>v.disconnect()},[]),U.useEffect(()=>{t.flow.check()},[t.flow]),U.useEffect(()=>{function x(v){Vs(v,t.onClose)}return e(x,"onKey"),document.addEventListener("keydown",x,!0),()=>document.removeEventListener("keydown",x,!0)},[t.onClose]);let l=document.documentElement.lang,p=t.flow.view(l),g=l.toLowerCase().startsWith("zh")?t.zhName:l.toLowerCase().startsWith("ru")?t.ruName:t.enName,y=qs(p.profileRaw,t.packageName,p.latestRaw),D=b==="copied"?p.copy.copied:b==="failed"?p.copy.copyFailed:p.copy.copy;return U.createElement(Xt.Modal,{open:!0,className:"mpi-dialog",title:`${g} ${p.copy.update}`,closeLabel:"Close",onClose:t.onClose,footer:[U.createElement(Xt.Button,{key:"check",variant:"outline",disabled:p.busy,onClick:e(()=>{t.flow.check()},"onClick")},p.copy.recheck),U.createElement(Xt.Button,{key:"update",variant:"primary",disabled:p.disabled,onClick:e(()=>{t.flow.update()},"onClick")},p.updateLabel)]},U.createElement("div",{ref:s},U.createElement("p",{className:"mpi-intro"},p.copy.intro),U.createElement("dl",{className:"mpi-meta"},U.createElement("dt",null,p.copy.current),U.createElement("dd",null,U.createElement("span",{className:"mpi-mono"},p.currentVersion)),U.createElement("dt",null,p.copy.latestLabel),U.createElement("dd",{className:"mpi-latest"},U.createElement("span",{className:"mpi-mono"},p.latestVersion),U.createElement("span",{className:"mpi-status",role:"status","data-kind":p.kind,...p.kind==="update"?{style:{color:"#e8b15a"}}:{}},p.message)),U.createElement("dt",null,p.copy.profile),U.createElement("dd",null,U.createElement("span",{className:"mpi-mono"},p.profileName))),p.busy?U.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},U.createElement("div",{className:"dssm-update-progress-bar"})):null,U.createElement("section",{className:"mpi-manual"},U.createElement("h3",null,p.copy.manual),U.createElement("p",null,p.copy.manualHint),U.createElement("div",{className:"mpi-command"},U.createElement("code",null,y),U.createElement(Xt.Button,{variant:"outline",size:"sm",disabled:p.busy,onClick:e(()=>{let x=navigator.clipboard?.writeText(y);if(x===void 0){a("failed");return}x.then(()=>{a("copied"),window.setTimeout(()=>a("idle"),1400)}).catch(()=>a("failed"))},"onClick")},D)))))}e(ki,"UpdateDialog");function Ys(t){if(typeof document>"u"||document.body===null)return()=>{};let s=Tn(t.endpoint);yi();let o=new AbortController,b,a,l,p,g,y,D;function x(){l?.unmount(),l=void 0,a=void 0,p=void 0}e(x,"unmountCheck");function v(){if(l===void 0)return;p===void 0&&(p=t.createIcon("refresh"));let re=p;l.render(U.createElement(Xt.Button,{variant:"outline",size:"sm",onClick:M,icon:U.createElement(Si,{node:re})},U.createElement("span",{"data-mpi-label":""},In(document.documentElement.lang).check)))}e(v,"renderCheck");function C(){y?.unmount(),y=void 0,g?.remove(),g=void 0}e(C,"closeDialog");function M(){C();let re=document.createElement("div");re.className="mpi-dialog-root",document.body.append(re),g=re,y=Gs(re),y.render(U.createElement(ki,{flow:Ws(se=>Ks(s,se,o.signal),b,se=>{b=se,N()}),packageName:t.packageName,zhName:t.zhName,enName:t.enName,ruName:t.ruName,onClose:C}))}e(M,"openDialog");function N(){let re=document.querySelector(t.titleRowSelector);if(re===null)return;let se=re.querySelector("h1,h2"),de=re.querySelector(t.linksSelector);if(t.isEnabled&&!t.isEnabled()){if(g!==void 0&&C(),de!==null){let he=de.querySelector(`[data-mpi-check="${t.packageName}"]`);he!==null&&(x(),he.remove())}if(se!==null){let he=se.querySelector(`.mpi-version[data-package="${t.packageName}"]`);he!==null&&he.remove()}return}if(se!==null&&b!==void 0){let he=se.querySelector(`.mpi-version[data-package="${t.packageName}"]`);he===null&&(he=document.createElement("span"),he.className="mpi-version",he.dataset.package=t.packageName,se.append(he));let V=`v${b.currentVersion}`;he.textContent!==V&&(he.textContent=V)}if(a!==void 0&&!a.isConnected&&x(),de===null)return;let ae=de.querySelector(`[data-mpi-check="${t.packageName}"]`);if(ae!==null){let he=ae.querySelector("[data-mpi-label]");(he===null||he.textContent!==In(document.documentElement.lang).check)&&v();return}let Be=document.createElement("span");Be.dataset.mpiCheck=t.packageName,Be.className="mpi-check-host",de.append(Be),a=Be,l=Gs(Be),v()}e(N,"applyControls");let H=new MutationObserver(()=>{D===void 0&&(D=window.requestAnimationFrame(()=>{D=void 0,N()}))});H.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]});let B,q=e(async()=>B||(B=(async()=>{try{return b=await Ks(s,"GET",o.signal),N(),b}finally{B=void 0}})(),B),"load"),le=e(()=>{N(),(!t.isEnabled||t.isEnabled())&&q().catch(()=>{})},"onToggle");return typeof window<"u"&&window.addEventListener("dsham-update-toggle",le),N(),q().catch(()=>{}),()=>{o.abort(),H.disconnect(),C(),x(),typeof window<"u"&&window.removeEventListener("dsham-update-toggle",le),D!==void 0&&window.cancelAnimationFrame(D),document.querySelectorAll(`[data-mpi-check="${t.packageName}"],.mpi-version[data-package="${t.packageName}"]`).forEach(re=>re.remove())}}e(Ys,"observePluginUpdate");var ln=require("@deepseek-ai/dsh-client-ui-primitives");var Ke=vs,xi="@michengai/dsh-archive-manager",wr="archived-sessions",Ci=4,Zs="dsham-sidebar-entry-style",Ei=`
|
|
15
15
|
.dsham_mainPanel{box-sizing:border-box;height:100%;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:28px clamp(24px,4vw,48px) 48px}
|
|
16
16
|
.dsham_mainPanel>*{width:100%;max-width:960px}
|
|
17
17
|
.dsham_bundle_row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:0.5px solid var(--dsw-alias-border-l2)}
|
|
18
18
|
.dsham_bundle_label_box{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;text-align:left}
|
|
19
19
|
.dsham_bundle_title{font-size:13px;font-weight:500;line-height:20px;color:var(--dsw-alias-label-primary)}
|
|
20
20
|
.dsham_bundle_desc{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}
|
|
21
|
-
`;function Zs(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(Ys)!==null||typeof document.createElement!="function")return;let t=document.createElement("style");t.id=Ys,t.textContent=Ei,(document.head??document.documentElement)?.appendChild?.(t)}e(Zs,"ensureSidebarEntryStyle");function Ai(t){let s=t&&typeof t.size=="number"?t.size:16;return ct(Cn.IconArchiveOutlineMedium,{size:s})}e(Ai,"ArchiveSidebarIcon");function Ii(t){Zs();let{t:s,enabled:o,onToggle:y,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:p,onlineUpdateDisabled:f,onlineUpdateLocked:w=!1}=t,D=[ct("div",{key:"sidebar-entry",className:"dsham_bundle_row"},ct("div",{className:"dsham_bundle_label_box"},ct("span",{className:"dsham_bundle_title"},s("sidebar.entry.title")),ct("span",{className:"dsham_bundle_desc"},s("sidebar.entry.desc"))),ct(Cn.Switch,{checked:o,onChange:y,label:s("sidebar.entry.toggle"),disabled:a}))];if(typeof p=="function"){let k=w?`${s("update.entry.desc")} (${s("update.entry.locked")})`:s("update.entry.desc");D.push(ct("div",{key:"online-update",className:"dsham_bundle_row"},ct("div",{className:"dsham_bundle_label_box"},ct("span",{className:"dsham_bundle_title"},s("update.entry.title")),ct("span",{className:"dsham_bundle_desc"},k)),ct(Cn.Switch,{checked:l,onChange:p,label:s("update.entry.toggle"),disabled:f||w,title:w?s("update.entry.locked"):void 0})))}return ct(fs,null,D)}e(Ii,"ArchiveBundleConfigCard");function Ti(t){let[s,o]=rn(t.getEnabled),[y,a]=rn(t.getOnlineUpdateEnabled?t.getOnlineUpdateEnabled:()=>!0),[l,p]=rn(t.getOnlineUpdateLocked?t.getOnlineUpdateLocked:()=>!1),[f,w]=rn(!1),[D,k]=rn(!1);vs(()=>{let R=e(()=>{o(t.getEnabled()),t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled()),t.getOnlineUpdateLocked&&p(t.getOnlineUpdateLocked())},"syncState");return R(),t.subscribe(R)},[t]);let v=e(R=>{w(!0),o(R),t.setSidebar(R).catch(()=>{o(t.getEnabled())}).finally(()=>{w(!1)})},"onToggleSidebar"),C=t.setOnlineUpdate?R=>{t.getOnlineUpdateLocked?.()||(k(!0),a(R),t.setOnlineUpdate(R).catch(()=>{t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled())}).finally(()=>{k(!1)}))}:void 0;return ct(Ii,{t:t.t,enabled:s,disabled:f,onToggle:v,onlineUpdateEnabled:y,onlineUpdateDisabled:D||l,onlineUpdateLocked:l,onToggleOnlineUpdate:C})}e(Ti,"ArchiveBundleConfigCardWrapper");function Sr(t,s){if(Zs(),!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,p=!1,f=!1,w=null,D=null,k=0,v=!1,C,R=new Set,M=e(()=>{if(!v)for(let H of R)try{H()}catch{}},"notify"),U=e(()=>{if(v||!f||!l||w)return;let H=t.slots.register({name:"main",key:wr,locale:a,inject:e(()=>{let Te=typeof s.injectProps=="function"?s.injectProps():{};return Object.assign({t:t.locale?.bind?t.locale.bind(a):void 0},Te)},"inject")},Te=>ct("div",{className:"dsham_mainPanel"},y(Te)));w=typeof H=="function"?H:()=>{}},"mountMain"),B=e(()=>{if(w){try{w()}catch{}w=null}},"unmountMain"),W=e(()=>{if(v||!p||!l||D)return;let H=t.slots.register({name:"sidebar.panellist",id:wr,order:Ci,label:e(()=>t.locale.bind(a)("archives.title"),"label"),locale:a},Te=>Ai(Te&&typeof Te=="object"&&"size"in Te?Te:void 0));D=typeof H=="function"?H:()=>{}},"mountRow"),Fe=e(()=>{if(D){try{D()}catch{}D=null}},"unmountRow"),ne=e(()=>{if(!v)if(l)U(),W();else{if(C?.panelInfo&&typeof C.selectPanel=="function")try{C.panelInfo.getSnapshot().activePanelId===wr&&C.selectPanel(null)}catch{}Fe(),B()}},"sync"),re=e(async H=>{if(v)return l;let Te=++k;l=H,ne(),M();try{return await o("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:H})}),H}catch(Re){throw Te===k&&(l=!H,ne(),M()),Re}},"setEnabled"),le=!0,se=!1,Ue=0,he=e(async H=>{if(v||se)return le;let Te=++Ue;if(le=H,M(),typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(H)}catch{}try{if(await o("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:H})}),Te===Ue&&typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(H)}catch{}return H}catch(Re){if(Te===Ue&&(le=!H,M(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(!H)}catch{}throw Re}},"setOnlineUpdate"),J=k;o("/sidebar-entry").then(H=>{!v&&k===J&&H&&typeof H.enabled=="boolean"&&(l=H.enabled,ne(),M())}).catch(()=>{});let Nt=Ue;o("/online-update").then(H=>{if(!v&&Ue===Nt&&H&&typeof H.enabled=="boolean"&&(le=H.enabled,H.locked===!0&&(se=!0),M(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(le)}catch{}}).catch(()=>{});let pt=t;return typeof pt.inject=="function"&&pt.inject(["layout"],H=>{!v&&H.layout&&(C=H.layout)}),t.slots.inject("main",()=>{if(!v)return f=!0,U(),()=>{f=!1,B()}}),t.slots.inject("sidebar.panellist",()=>{if(!v)return p=!0,W(),()=>{p=!1,Fe()}}),t.slots.inject("plugins.bundle.config",()=>{if(!v)return t.slots.register({name:"plugins.bundle.config",key:ki,locale:a},H=>H&&H.view==="summary"?null:ct(Ti,{t:t.locale.bind(a),getEnabled:e(()=>l,"getEnabled"),setSidebar:re,getOnlineUpdateEnabled:e(()=>le,"getOnlineUpdateEnabled"),setOnlineUpdate:he,getOnlineUpdateLocked:e(()=>se,"getOnlineUpdateLocked"),subscribe:e(Te=>(R.add(Te),()=>{R.delete(Te)}),"subscribe")}))}),{isEnabled:e(()=>l,"isEnabled"),isSupported:e(()=>p,"isSupported"),setEnabled:re,isOnlineUpdateEnabled:e(()=>le,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:e(()=>se,"isOnlineUpdateLocked"),setOnlineUpdate:he,destroy:e(()=>{v||(v=!0,k++,Ue++,C=void 0,R.clear(),Fe(),B())},"destroy")}}e(Sr,"setupSidebarEntry");function xr(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(xr,"checkedId");var _i={parse(t){let s=te(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:xr(s.sessionId),favorite:s.favorite}}},Ri={parse(t){let s=te(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(xr))]}},safeParse(t){try{return{success:!0,data:this.parse(t)}}catch(s){return{success:!1,error:s}}}};function Js(){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",_i)}],result:t("FavoriteState",Ri),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(Js,"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 p=typeof t.updatedAt=="number"?t.updatedAt:Date.parse(t.updatedAt??"");return Number.isFinite(p)&&p<=o-s*864e5}e(kr,"idleArchiveCandidate");async function Wn(t,s,{onProgress:o,refresh:y}={}){let a=[...new Set(t.map(xr))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},p=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");p();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)}p()}try{await y?.()}catch(f){l.refreshError=f instanceof Error?f.message:String(f)}return l}e(Wn,"runSessionBatch");function Xs({workspaces:t,sessions:s,archive:o,restore:y,deleteOne:a,getFavorites:l,refresh:p,currentSessionId:f}){return async(w,D,k={})=>{if(!["archive","restore","undo","delete"].includes(w))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return Wn(D,async v=>{let R=t.getSnapshot().archivedSessionIds.includes(v);if(w==="archive"){if(R||!s.getSnapshot().byId[v])return!1;if(k.idleDays!==void 0){let Fe=new Set((await l()).favoriteSessionIds),ne=s.getSnapshot();if(!kr(ne.byId[v],{days:k.idleDays,favorites:Fe,currentId:f(ne),pending:k.getPending?.()??k.pending}))return!1}return await o(v),t.getSnapshot().archivedSessionIds.includes(v)}return R?w==="delete"?(await a(v),!0):!((await y(v))?.archivedSessionIds??t.getSnapshot().archivedSessionIds).includes(v):!1},{onProgress:k.onProgress,refresh:p})}}e(Xs,"createSessionOrganizer");function ji(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(ji,"formatBytes");function Qs(t,s){let o=t.createElement;function y(l,p){return o(s??(w=>o("button",{type:"button",disabled:w.disabled,onClick:w.onClick},w.children)),{variant:"outline",size:"sm",...p},l)}e(y,"textButton");function a({title:l,failures:p,separator:f}){let[w,D]=t.useState(!1),k=o("ul",null,p.map(v=>o("li",{key:v.sessionId},v.sessionId,f,v.message)));return o(Un,{title:l,open:w,onToggle:e(()=>D(v=>!v),"onToggle")},k)}return e(a,"FailureDetails"),e(function({t:p,archived:f,busy:w,ready:D,days:k,onDays:v,count:C,onPreview:R,progress:M,result:U,onRetry:B,undoCount:W,onUndo:Fe,onReload:ne,orphanCount:re=0,orphanSizeBytes:le=0,orphanCleaning:se=!1,onCleanOrphans:Ue,cacheCount:he=0,cacheRepair:J,onRebuildCaches:Nt,onRetryCaches:pt,onReloadCaches:H,onDismissCaches:Te}){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(p("organizer.reloadFavorites"),{disabled:w,onClick:ne}),!f&&o(t.Fragment,null,o("label",null,p("organizer.idleDays"),o(bs,{min:1,max:36500,value:k===""?null:Number(k),disabled:w,"aria-label":p("organizer.idleDays"),onChange:e(Re=>v(Re==null?"":String(Re)),"onChange")})),y(p("organizer.preview",{n:C}),{disabled:w||!D||C===0,onClick:R}))),!f&&o("p",null,p("organizer.rules"))),re>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,p("organizer.orphanTitle",{n:re})),Ue&&y(p(se?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:w||se,onClick:Ue})),o("p",null,p("organizer.orphanDesc",{size:ji(le)}))),he>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,p("organizer.cacheTitle",{n:he})),Nt&&y(p(J?.busy?"organizer.cacheRebuilding":"organizer.cacheRebuild"),{disabled:w||J?.busy,onClick:Nt})),o("p",null,p("organizer.cacheDesc"))),J&&(J.result||J.progress||J.error||J.refreshError)&&o("section",{className:"dsham_batchFeedback","aria-label":p("organizer.cacheRebuild")},J.progress&&o("div",{role:"status"},o("progress",{value:J.progress.done,max:Math.max(1,J.progress.total)}),p("organizer.progressCount",J.progress)),J.result&&o("div",{role:"status"},o("p",null,p("organizer.result",{succeeded:J.result.rebuiltSessionIds.length,skipped:J.result.skippedSessionIds.length,failed:J.result.failures.length})),J.result.failures.length>0&&o(a,{title:p("organizer.failureDetails"),failures:J.result.failures,separator:p("common.separator")}),J.result.failures.length>0&&pt&&y(p("organizer.cacheRetry",{n:J.result.failures.length}),{disabled:w||J.busy,onClick:pt})),J.error&&o("p",{role:"alert"},p("organizer.cacheError",{detail:J.error})),J.refreshError&&o("p",{role:"alert"},p("organizer.refreshError",{detail:J.refreshError})),o("div",{className:"dsham_organizerControls"},H&&y(p("organizer.cacheCheck"),{disabled:w||J.busy,onClick:H}),Te&&y(p("organizer.dismiss"),{disabled:w||J.busy,onClick:Te}))),(M||U||W>0)&&o("section",{className:"dsham_batchFeedback","aria-label":p("organizer.feedback")},M&&o("div",{role:"status","aria-live":"polite"},o("progress",{value:M.done,max:Math.max(1,M.total),"aria-label":p("organizer.progress")}),p("organizer.progressCount",{done:M.done,total:M.total})),U&&o("div",{role:"status"},o("strong",null,p(`organizer.${U.kind??"archive"}Result`)),o("p",null,p("organizer.result",{succeeded:U.succeeded.length,skipped:U.skipped.length,failed:U.failures.length})),U.failures.length>0&&o(a,{title:p("organizer.failureDetails"),failures:U.failures,separator:p("common.separator")}),U.refreshError&&o("p",{role:"alert"},p("organizer.refreshError",{detail:U.refreshError})),U.remaining.length>0&&y(p("organizer.retry",{n:U.remaining.length}),{disabled:w,onClick:B})),W>0&&o("div",{className:"dsham_organizerControls"},y(p("organizer.undo",{n:W}),{disabled:w,onClick:Fe}),o("p",null,p("organizer.undoHint")))))},"OrganizerPanel")}e(Qs,"createOrganizerPanel");var ea={"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"},ta={"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."},na={"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 an=Function("return globalThis.__dshArchiveReactDOM")(),ra=Function("return globalThis.__dshArchiveReactDOMClient")(),sa=an.createPortal,el=an.flushSync,tl=ra?.createRoot,nl=ra?.hydrateRoot,rl=an.findDOMNode,sl=an.unmountComponentAtNode,al=an.unstable_batchedUpdates,il=an.version;function Ni(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"),p=t("react-dom"),f=t("@deepseek-ai/dsh-client-ui-primitives");function w({open:n,onClose:r,title:i,description:c,footer:m,children:u,className:x,width:S,portalToBody:A=!1,closeLabel:O,t:I}){let N=l.useRef(null),P=l.useCallback(()=>N.current?.closest(".dsham_settings")??document.body,[]),[h,Ee]=l.useState(null);l.useEffect(()=>{if(!n){Ee(null);return}Ee(A?typeof document<"u"?document.body:null:P())},[n,P,A]),l.useEffect(()=>{if(!n)return;let He=e($e=>{$e.key==="Escape"&&($e.preventDefault(),$e.stopPropagation(),"stopImmediatePropagation"in $e&&typeof $e.stopImmediatePropagation=="function"&&$e.stopImmediatePropagation(),r())},"onKey");return window.addEventListener("keydown",He,!0),()=>window.removeEventListener("keydown",He,!0)},[n,r]);let pe=O||I("common.close"),ce=(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:ua("dsham_modalDialog",x),style:{width:S??560},children:[(0,a.jsxs)("div",{className:"dsham_modalHeader",children:[(0,a.jsx)("h2",{title:typeof i=="string"?i:void 0,children:i}),(0,a.jsx)("button",{type:"button",className:"dsham_modalClose",onClick:r,"aria-label":pe,title:pe,children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M3.5 3.5l9 9M12.5 3.5l-9 9"})})})]}),c!=null&&(0,a.jsx)("p",{children:c}),u!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:u}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:m})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{refObject:N,getContainer:P}),n&&h?sa(ce,h):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:c,disabled:m,title:u,onClick:x,"aria-label":S,"aria-pressed":A,"aria-expanded":O,"aria-haspopup":I}){return(0,a.jsx)(f.Button,{variant:n,size:"sm",className:c,disabled:m,title:u,onClick:x,"aria-label":S,"aria-pressed":A,"aria-expanded":O,"aria-haspopup":I,icon:r,children:i})}e(k,"settingsButton");function v({variant:n="outline",danger:r=!1,disabled:i,onClick:c,children:m}){return(0,a.jsx)(f.Button,{variant:r?"outline":n,className:r?"dsham_btnDanger":void 0,disabled:i,onClick:c,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 R=Qs(l,f.Button),{HighlightedText:M,useArchiveSearch:U,useArchivePreview:B,DiscoveryFilters:W,SearchStatus:Fe,PreviewContent:ne}=_s(l,{Button:f.Button,SegmentedControl:f.SegmentedControl}),re={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 le(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 c of re[n]){let m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d",c),i.append(m)}return r.append(i),r}e(le,"createPluginUpdateIcon");let se={parse(n){if(typeof n!="string"||n.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(n)}`);return n}},Ue={parse(n){let r=te(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(c=>typeof c!="string"))throw new TypeError("archivedSessionIds must be a string array");return r}},he={parse(n){let r=te(n);if(typeof r!="object"||r===null||Array.isArray(r)||r.deleted!==!0)throw new TypeError("deleted must be true");return r}},J={parse(n){let r=te(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=te(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(c=>typeof c!="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}},pt={parse(n){let r=te(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}},H={parse(n){let r=te(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}}},Te={parse(n){let r=te(n);if(!r||r.ok!==!0)throw new TypeError("session move result must be ok: true");return r}};function Re(n,r){return{mode:"strict",typeSymbol:n,create:e(()=>r,"create"),schema:r}}e(Re,"strictCodec");let Wt={package:"@michengai/dsh-archive-manager",descriptors:[...Js(),...Es(),...zs(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Re("@deepseek-ai/dsh-session/types#SessionId",se)}],result:Re("@michengai/dsh-archive-manager/types#ArchivedSessionIds",Ue),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Re("@deepseek-ai/dsh-session/types#SessionId",se)}],result:Re("@michengai/dsh-archive-manager/types#Deleted",he),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteArchivedSessions",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteArchivedSessions",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",codec:Re("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",J)}],result:Re("@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:Re("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",pt),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/diagnoseOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"diagnoseOrphanSubagents",invocation:{kind:"direct"},parameters:[],result:Re("@michengai/dsh-archive-manager/types#OrphanSubagentDiagnosis",{parse(n){let r=te(n);if(!r||typeof r.count!="number"||!Array.isArray(r.items)||typeof r.totalSizeBytes!="number")throw new TypeError("invalid orphan subagent diagnosis");return r}}),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/cleanOrphanSubagents",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"cleanOrphanSubagents",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",acceptsUndefined:!0,codec:Re("@michengai/dsh-archive-manager/types#CleanOrphanTarget",{parse(n){if(n==null)return{};let r=te(n);if(!r)throw new TypeError("target must be an object");if(r.sessionIds!==void 0&&(!Array.isArray(r.sessionIds)||r.sessionIds.some(i=>typeof i!="string")))throw new TypeError("sessionIds must be an array of strings");return r}})}],result:Re("@michengai/dsh-archive-manager/types#CleanOrphanResult",{parse(n){let r=te(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:Re("@michengai/dsh-archive-manager/types#SessionMoveInput",H)}],result:Re("@michengai/dsh-archive-manager/types#SessionMoveResult",Te),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]};function kt(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(kt,"ensurePluginStyle"),kt("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)}"),kt("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}"),kt("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%));backdrop-filter:var(--dsw-mask-blur,blur(16px));-webkit-backdrop-filter:var(--dsw-mask-blur,blur(16px))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;box-sizing:border-box;max-width:calc(100vw - 48px);max-height:min(85vh,760px);padding:22px 24px 20px;overflow:hidden;border:1px solid var(--dsw-alias-border-l1,rgba(128,128,128,.2));border-radius:var(--dsw-radius-panel,28px);background-color:var(--dsw-alias-surface-overlay,var(--dsw-alias-bg-base,Canvas));background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-surface-overlay,Canvas));backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}.dsham_modalHeader h2,.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--dsw-alias-label-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.dsham_modalClose{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:28px;height:28px;padding:0;border:none;border-radius:var(--dsw-radius-sm,6px);background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;flex:none;transition:background-color .15s ease,color .15s ease}.dsham_modalClose:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.dsham_modalClose svg{display:block;width:14px;height:14px}.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}.dsham_modalWide{width:min(900px,calc(100vw - 48px))!important;max-height:min(88vh,820px)!important}.dsham_modalWide .dsham_modalBody{overflow:hidden}.dsham_modalWide .dsham_previewMessages{max-height:none;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}"),kt("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}"),kt("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 ae="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 Je(n){return n?'<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="'+ae+'"/></svg>':'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round" aria-hidden="true"><path d="'+ae+'"/></svg>'}e(Je,"starSvg");function Vt(n){return!!n?.querySelector("[data-state]")}e(Vt,"resolveRowHasStatus"),kt("dsh-archive-manager/RowFavorite.css","[data-row-key^='session:']{position:relative}.dsham_starSlot{display:none;position:absolute;left:calc(8px + var(--dsh-workspace-indent,0px));inset-inline-start:calc(8px + var(--dsh-workspace-indent,0px));top:50%;transform:translateY(-50%);align-items:center;justify-content:center;box-sizing:border-box;width:16px;height:20px;z-index:1;pointer-events:none}[data-row-key^='session:']:hover .dsham_starSlot,.dsham_starSlot[data-favorited='true']{display:inline-flex;pointer-events:auto}[data-row-key^='session:']:hover>span:first-child:not(:has([data-state])),[data-row-key^='session:'][data-dsham-favorited='true']:not([data-dsham-has-status='true'])>span:first-child:not(:has([data-state])){opacity:0}[data-row-key^='session:'][data-dsham-has-status='true']>span:first-child,[data-row-key^='session:']>span:first-child:has([data-state]){opacity:1}[data-row-key^='session:'][data-dsham-has-status='true'] .dsham_starSlot,[data-row-key^='session:']:has(>span:first-child [data-state]) .dsham_starSlot{width:10px;height:10px;top:auto;bottom:3px;left:calc(15px + var(--dsh-workspace-indent,0px));inset-inline-start:calc(15px + var(--dsh-workspace-indent,0px));transform:none}[data-row-key^='session:'][data-dsham-has-status='true'] .dsham_rowStar,[data-row-key^='session:']:has(>span:first-child [data-state]) .dsham_rowStar{width:10px;height:10px}[data-row-key^='session:'][data-dsham-has-status='true'] .dsham_rowStar svg,[data-row-key^='session:']:has(>span:first-child [data-state]) .dsham_rowStar svg{width:10px;height:10px;filter:drop-shadow(0 0 1px rgba(0,0,0,0.85))}.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:16px;height:16px;flex:none}");let An="dsh-archive-manager:workspace-favorites-only",dt="data-dsham-favorites-hidden",Yt="data-dsham-favorites-only",X="dsham_rowStar",Me="dsham_starSlot",mt=["\u4EC5\u663E\u793A\u5DF2\u5F52\u6863","Archived only","\u0422\u043E\u043B\u044C\u043A\u043E \u0430\u0440\u0445\u0438\u0432\u043D\u044B\u0435"];kt("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 aa(){try{return window.localStorage.getItem(An)==="1"}catch{return!1}}e(aa,"readWorkspaceFavoritesOnly");function ia(n){try{window.localStorage.setItem(An,n?"1":"0")}catch{}}e(ia,"writeWorkspaceFavoritesOnly");function Er(n,r){let i=e(u=>r.favorites.has(u)||r.sessions?.[u]?.blank===!0,"visibleSession"),c=new Map,m=null;for(let u of n){if(u.startsWith("workspace:")){m=u,c.set(u,!1);continue}u.startsWith("session:")&&m!==null&&i(u.slice(8))&&c.set(m,!0)}return n.map(u=>u.startsWith("session:")?i(u.slice(8)):u.startsWith("workspace:")?c.get(u)===!0||r.groupHasFavorite?.(u.slice(10))===!0:!u.startsWith("overflow:"))}e(Er,"favoritesOnlyVisibility");function Ar(n,r){let i=new Map,c=new Set;for(let u of r){let x=!1;for(let S of u.sessionIds)c.add(S),n.has(S)&&(x=!0);i.set(u.workspaceId,x)}let m=!1;for(let u of n)if(!c.has(u)){m=!0;break}return u=>u===""||u==="ungrouped"?m:i.get(u)===!0}e(Ar,"favoriteGroupPredicate");function oa(n,r,i){let c={dispose:e(()=>{},"dispose")};if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return c;let m=aa(),u=!1,x=!1,S=0,A=200,O=null,I=new Set,N=e(F=>{let We=r.getSnapshot();for(let de of F){let ge=de.getAttribute("data-row-key")??"";if(!ge.startsWith("session:"))continue;let ut=ge.slice(8),at=Array.from(de.children).find(Ze=>Ze.tagName==="SPAN"&&Array.from(Ze.classList).some(tt=>tt==="slot"||tt.endsWith("_slot")))??null;if(at===null){de.removeAttribute("data-dsham-has-status");continue}let q=Array.from(de.children).find(Ze=>Ze.classList.contains(Me))??null;if(!We.ready){q?.remove(),de.removeAttribute("data-dsham-favorited"),de.removeAttribute("data-dsham-has-status");continue}q!==null&&(q.parentElement!==de||q.nextElementSibling!==null)&&de.appendChild(q),q===null&&(q=document.createElement("span"),q.className=Me,de.appendChild(q)),q.dataset.sessionId=ut,Vt(at)?de.setAttribute("data-dsham-has-status","true"):de.removeAttribute("data-dsham-has-status");let Le=q.querySelector("."+X);Le===null&&(Le=document.createElement("button"),Le.type="button",Le.className=X,Le.addEventListener("click",Ze=>{Ze.preventDefault(),Ze.stopPropagation(),r.toggle(q?.dataset.sessionId??"")}),q.appendChild(Le));let ze=We.ids.has(ut);if(ze?de.setAttribute("data-dsham-favorited","true"):de.removeAttribute("data-dsham-favorited"),q.dataset.favorited===String(ze))continue;let fe=i()(ze?"organizer.unfavorite":"organizer.favorite");q.dataset.favorited=String(ze),Le.setAttribute("aria-pressed",String(ze)),Le.setAttribute("aria-label",fe),Le.title=fe,Le.innerHTML=Je(ze)}},"ensureRowStars"),P=e(F=>{let We=r.getSnapshot();if(!m||!We.ready){for(let q of F)q.hasAttribute(dt)&&q.removeAttribute(dt);S=0,O=null,I.clear();return}let de=F.map(q=>q.getAttribute("data-row-key")??""),ge=Ar(We.ids,n.workspaces.list?.getSnapshot?.()?.items??[]),ut=Er(de,{favorites:We.ids,sessions:n.sessions.list?.getSnapshot?.()?.byId,groupHasFavorite:ge});O!==null&&(F.length<=O.rows&&I.add(O.key),O=null);let at=!1;if(S<A)for(let q=0;q<F.length;q+=1){let Q=F[q],Le=de[q];if(!Le.startsWith("overflow:")||Q.getAttribute("aria-expanded")!=="false")continue;let ze=Le.slice(9);if(!(I.has(ze)||!ge(ze))){try{Q.click(),S+=1,O={key:ze,rows:F.length},at=!0}catch(fe){console.warn("archive-manager: favorites-only expand failed",fe)}break}}for(let q=0;q<F.length;q+=1){let Q=F[q];ut[q]?Q.hasAttribute(dt)&&Q.removeAttribute(dt):Q.setAttribute(dt,"true")}at&&pe()},"applyVisibility"),h=e(F=>{let We=F.parentElement;if(We===null)return null;let de=We.cloneNode(!0),ge=de.querySelector('button[role="menuitem"]');if(ge===null)return null;let ut=Array.from(ge.querySelectorAll("span")),at=ut[0]??null,q=ut[ut.length-1]??null;at!==null&&(at.innerHTML=Je(!1)),q!==null&&(q.textContent=i()("organizer.favoritesOnly"));for(let Q of Array.from(ge.querySelectorAll("svg")))Q.closest("span")===null&&Q.remove();return ge.setAttribute(Yt,"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(),ce(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0}))},de},"buildMenuRow"),Ee=e(()=>{if(!u){for(let F of Array.from(document.querySelectorAll("button["+Yt+"]")))F.dataset.active=String(m),F.setAttribute("aria-checked",String(m));for(let F of Array.from(document.querySelectorAll('[role="menu"]'))){let We=Array.from(F.querySelectorAll('button[role="menuitem"]')).find(ut=>mt.some(at=>(ut.textContent??"").includes(at)));if(We===void 0||F.querySelector("["+Yt+"]")!==null)continue;let de=We.parentElement;if(de===null)continue;let ge=h(We);ge!==null&&de.parentElement?.insertBefore(ge,de.nextSibling)}}},"injectMenuRows"),pe=e(()=>{if(x||u)return;x=!0;let F=e(()=>{if(x=!1,u)return;let We=Array.from(document.querySelectorAll("[data-row-key]"));Ee(),N(We),P(We),r.getSnapshot().ready||Ct()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(F):setTimeout(F,16)},"schedulePass"),ce=e(()=>{m=!m,$e=20,S=0,O=null,I.clear(),ia(m),pe()},"toggle"),He=null,$e=20,Ct=e(()=>{He!==null||u||$e<=0||($e-=1,He=setTimeout(()=>{He=null,r.ensure(),pe()},600))},"scheduleRetry"),Y=new MutationObserver(F=>{Dn(F,'[data-row-key], [role="menu"]')&&pe()});Y.observe(document.body,{childList:!0,subtree:!0}),r.ensure().catch(()=>{});let Ae=[r.subscribe(()=>pe()),typeof n.sessions.list?.subscribe=="function"?n.sessions.list.subscribe(()=>pe()):null,typeof n.workspaces.list?.subscribe=="function"?n.workspaces.list.subscribe(()=>pe()):null].filter(F=>typeof F=="function");return pe(),{dispose(){u=!0,Y.disconnect();for(let F of Ae)F();for(let F of Array.from(document.querySelectorAll("["+dt+"]")))F.removeAttribute(dt);for(let F of Array.from(document.querySelectorAll("["+Yt+"]")))F.parentElement?.remove();for(let F of Array.from(document.querySelectorAll("."+Me)))F.remove();for(let F of Array.from(document.querySelectorAll("[data-dsham-favorited]")))F.removeAttribute("data-dsham-favorited");for(let F of Array.from(document.querySelectorAll("[data-dsham-has-status]")))F.removeAttribute("data-dsham-has-status");He!==null&&(clearTimeout(He),He=null)}}}e(oa,"setupWorkspaceFavoritesOnly");function Ir(){let n,r={ready:!1,ids:new Set,pending:new Set},i,c=0,m=new Set,u=e(S=>{r=S;for(let A of m)try{A()}catch(O){console.warn("archive-manager: favorite listener failed",O)}},"publish"),x=e((S,A)=>{let O=new Set(S);for(let h of r.pending)h!==A&&(r.ids.has(h)?O.add(h):O.delete(h));let I=new Set(r.pending);A!==void 0?I.delete(A):r.pending.size===0&&I.clear();let N=r.ids.size===O.size&&[...O].every(h=>r.ids.has(h)),P=r.pending.size===I.size&&[...I].every(h=>r.pending.has(h));N&&P&&r.ready||u({ready:!0,ids:O,pending:I})},"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()<c?Promise.resolve():(i=n.favoriteSessions().then(S=>{x(S.favoriteSessionIds)}).catch(S=>{console.warn("archive-manager: load favorites failed, will retry",S),c=Date.now()+600}).finally(()=>{i=void 0}),i)},async toggle(S){if(n===void 0||!r.ready||r.pending.has(S))return;let A=r.ids.has(S),O=!A,I=new Set(r.ids);O?I.add(S):I.delete(S);let N=new Set(r.pending);N.add(S),u({ready:!0,ids:I,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 h=new Set(r.ids);A?h.add(S):h.delete(S);let Ee=new Set(r.pending);Ee.delete(S),u({ready:!0,ids:h,pending:Ee})}}}}e(Ir,"createFavoriteRowStore");function Tn(n){let r=new Map;for(let i of Object.values(n)){if(i.origin!=="subagent")continue;let c=new Set,m=i;for(;m?.origin==="subagent"&&m.parentId!==void 0&&!c.has(m.id);){c.add(m.id);let u=r.get(m.parentId);u===void 0?r.set(m.parentId,{count:1,runningCount:i.running?1:0}):(u.count+=1,i.running&&(u.runningCount+=1)),m=n[m.parentId]}}return r}e(Tn,"indexSubagentDescendants");let Mi="__flat_session_order__",_n="dsh.archive-manager.workspace.view.v1",Tr="dsh.workspace.view.v5";function _r(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(Tr);return i==null?!1:(r.setItem(_n,i),!0)}catch{return!1}}e(_r,"migrateWorkspaceViewPersist");function la(){return _r(),(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(([c])=>i.has(c))),n.sessionOrderByAccount=Object.fromEntries(Object.entries(n.sessionOrderByAccount).filter(([c])=>i.has(c))),n.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(n.sessionUpdatedAtByAccount).filter(([c])=>i.has(c)))},"retainAccountKeys"),syncSessionOrderAccount:e((n,r,i,c)=>{n.sessionOrderByAccount[r]=i,n.sessionUpdatedAtByAccount[r]=c},"syncSessionOrderAccount"),setSessionOrder:e((n,r,i)=>{n.sessionOrderByAccount[r]=i},"setSessionOrder")}})}e(la,"createWorkspaceViewStore");function ca(){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(ca,"GithubMark16");function da(){let n=f.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}e(da,"FeedbackIcon");function Gn({archiveSessions:n,archiveSession:r,sessionStore:i,workspaceStore:c,unarchiveSession:m,deleteSession:u,unarchiveSessions:x,deleteArchivedSessions:S,archivedSessionMetadata:A,openConversation:O,focusSessionWorkspace:I,viewState:N,close:P,t:h,diagnoseOrphanSubagents:Ee,cleanOrphanSubagents:pe,diagnoseSessionCaches:ce,rebuildSessionCaches:He,refreshCacheLists:$e,searchSessionContent:Ct,searchArchivedContent:Y,previewArchivedSession:Ae,favoriteSessions:F,setSessionFavorite:We,favoriteSync:de,organizeBatch:ge,useSessionPendingInteraction:ut,useSessionStatus:at}){let q=(0,l.useSyncExternalStore)(i.subscribe,i.getSnapshot),Q=(0,l.useSyncExternalStore)(c.subscribe,c.getSnapshot),[Le,ze]=(0,l.useState)("archived"),fe=Le==="archived",[Ze,tt]=(0,l.useState)(null),[cn,Et]=(0,l.useState)(null),[At,St]=(0,l.useState)(null),Ot=e((d,E=null)=>{K(null),Ye(null),ke(!1),Et(E),tt(d)},"requestArchive"),dn=e(()=>{V||(tt(null),Et(null),K(null))},"closeArchive"),It=(0,l.useRef)(!1),[je,Pt]=(0,l.useState)(null),un=(0,l.useRef)(!1),[V,Ke]=(0,l.useState)(!1),[ft,K]=(0,l.useState)(null),[zn,Ye]=(0,l.useState)(null),Jt=e(d=>{K(null),Ye(null),Pt(d)},"requestDelete"),[Tt,Xt]=(0,l.useState)(N?.query??""),[ht,Lt]=(0,l.useState)(N?.project??"all"),[_t,hn]=(0,l.useState)(N?.sortBy??"updated"),[pn,mn]=(0,l.useState)({}),[Bt,On]=(0,l.useState)(()=>new Set),yt=(0,l.useRef)(new Set),[bt,gt]=(0,l.useState)([]),[g,b]=(0,l.useState)([]),[T,G]=(0,l.useState)(!1),[Ie,ue]=(0,l.useState)(!1),De=(0,l.useRef)(!1),[Ne,ve]=(0,l.useState)(!1),[qe,Qe]=l.useState("content"),[it,vt]=l.useState(""),[ee,ie]=l.useState(""),[z,oe]=(0,l.useState)(()=>new Set),[_e,xe]=(0,l.useState)("30"),[et,ke]=(0,l.useState)(!1),[ye,be]=(0,l.useState)(null),[Ce,Z]=(0,l.useState)(null),[Oe,wt]=(0,l.useState)([]),Pe=(0,l.useRef)(!1),nt=(0,l.useRef)(null),me=wa(ut??va,at??ya,typeof at=="function"),Mt=(0,l.useRef)(me.pending);Mt.current=me.pending;let ot=(0,l.useMemo)(()=>new Set(g),[g]),Qt=e(async()=>{if(F)try{let d=await F();b(d.favoriteSessionIds),G(!0),de?.adopt(d.favoriteSessionIds)}catch(d){G(!1),K(Ge(d))}},"loadFavorites");(0,l.useEffect)(()=>{let d=!0;return F&&F().then(E=>{d&&(b(E.favoriteSessionIds),G(!0),de?.adopt(E.favoriteSessionIds))}).catch(E=>{d&&K(Ge(E))}),()=>{d=!1}},[F]),(0,l.useEffect)(()=>{if(de)return de.subscribe(()=>{let d=de.getSnapshot();d.ready&&(b([...d.ids]),G(!0))})},[de]);let fn=e(async d=>{if(!(De.current||V||!T)){De.current=!0,ue(!0),K(null);try{let E=await We({sessionId:d,favorite:!ot.has(d)});b(E.favoriteSessionIds),de?.adopt(E.favoriteSessionIds)}catch(E){K(Ge(E))}finally{De.current=!1,ue(!1)}}},"toggleFavorite"),Ve=e(async(d,E,{idle:$=!1,retry:we=!1}={})=>{if(!(Pe.current||De.current||yt.current.size>0||!ge)){Pe.current=!0,Ke(!0),K(null),Ye(null),Z(null),d==="archive"&&!we&&wt([]);try{let j=await ge(d,E,{idleDays:$?Number(_e):void 0,getPending:e(()=>Mt.current,"getPending"),onProgress:e(Se=>{be(Se),d==="archive"&&Se.total>0&&Se.done>=Se.total&&(tt(null),Et(null),ke(!1))},"onProgress")});return Z({...j,kind:d,tab:Le}),nt.current=j.remaining.length?{kind:d,ids:j.remaining,idle:$}:null,d==="archive"&&wt(Se=>[...new Set([...Se,...j.succeeded])]),(d==="undo"||d==="restore"||d==="delete")&&wt(Se=>Se.filter(lt=>!j.succeeded.includes(lt)&&!j.skipped.includes(lt))),gt(Se=>Se.filter(lt=>!j.succeeded.includes(lt)&&!j.skipped.includes(lt))),d==="delete"&&b(Se=>Se.filter(lt=>!j.succeeded.includes(lt))),j}catch(j){K(Ge(j))}finally{Pe.current=!1,Ke(!1),be(null)}}},"executeBatch"),[st,en]=(0,l.useState)(null),[tn,gn]=(0,l.useState)({diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null}),Be=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!ce||!He||!$e)return;let d=Os({diagnose:ce,rebuild:He,refresh:$e});Be.current=d;let E=d.subscribe(()=>{gn(d.snapshot())});return d.load(),()=>{E(),d.dispose(),Be.current=null}},[ce,He,$e]),(0,l.useEffect)(()=>{Be.current?.snapshot().busy||Be.current?.load()},[Q.archivedSessionIds]);let Gt=e(async(d=!1)=>{if(!(V||Pe.current||!Be.current||Be.current.snapshot().busy)){Pe.current=!0,Ke(!0);try{await Be.current.run(d)}finally{Pe.current=!1,Rt.current&&Ke(!1)}}},"runCacheRebuild"),[nn,Ft]=(0,l.useState)(!1),$t=e(()=>{typeof Ee=="function"&&Ee().then(en).catch(d=>{console.warn("archive-manager: diagnose orphan subagents failed",d)})},"loadOrphans");(0,l.useEffect)(()=>{$t()},[Q.archivedSessionIds]);let Ua=e(async()=>{if(!(nn||typeof pe!="function")){Ft(!0),K(null),Ye(null);try{let d=await pe({});(d.cleanedSessionIds.length>0||d.skippedSessionIds.length>0)&&$t(),d.failures.length>0?(Ye(null),K(jn(d.failures,h))):d.cleanedSessionIds.length>0&&(K(null),Ye(h("organizer.orphanCleanSuccess",{n:d.cleanedSessionIds.length})))}catch(d){K(Ge(d))}finally{Ft(!1)}}},"cleanOrphans"),Rt=(0,l.useRef)(!0),ir=(0,l.useRef)(!1);(0,l.useEffect)(()=>(Rt.current=!0,()=>{Rt.current=!1}),[]);let Pn=e(async(d,E=!1)=>{if(V||ir.current)return;ir.current=!0,Ke(!0),K(null);let $=!1;try{await Ls({prepare:E?async we=>{await I?.(we)}:void 0,restore:e(async we=>{await m(we),$=!0},"restore"),open:e(async we=>{await O(we),Rt.current&&P?.()},"open")},d.id,E,()=>Rt.current)}catch(we){if(!Rt.current)return;if($){ze("unarchived");let j=Ut.find(Se=>Se.sessions.some(lt=>lt.id===d.id));j!==void 0&&Lt(j.key)}K(Ps(we,h))}finally{ir.current=!1,Rt.current&&Ke(!1)}},"viewConversation");(0,l.useEffect)(()=>{N&&Object.assign(N,{query:Tt,project:ht,sortBy:_t})},[Tt,ht,_t,N]);let Ln=(0,l.useMemo)(()=>fe?Q.archivedSessionIds:Qr(q.byId,Q.archivedSessionIds),[fe,q.byId,Q.archivedSessionIds]),Ut=(0,l.useMemo)(()=>es(q.byId,Q.items,Ln,h("group.ungrouped")),[q.byId,Q,Ln,h]),Ha=e(d=>{V||yt.current.size>0||(xt.close(),ze(d),gt([]),tt(null),Et(null),K(null),Ye(null),Lt("all"),Xt(""),d!=="archived"&&_t==="archived"&&hn("updated"))},"switchTab"),is=e(async(d,E=!1)=>{if(!(It.current||V||!d?.length)){if(ge){It.current=!0;try{let $=await Ve("archive",d,{idle:E}),we=$?.failures.map(j=>Mr(j.sessionId,j.message)).find(j=>j!==void 0);if(we!==void 0&&typeof r=="function"){let j=q.byId[we.sessionId];St({sessionId:we.sessionId,title:j===void 0?we.sessionId:rt(j,h),kinds:we.kinds.join(", ")}),tt(null),Et(null),K(null);return}$&&(tt(null),Et(null),ke(!1))}finally{It.current=!1}return}It.current=!0,Ke(!0),K(null),Ye(null);try{let $=await n(d);tt(null),Et(null),$.archivedSessionIdsAdded.length>0&&Ye(h("archives.archiveSuccess",{n:$.archivedSessionIdsAdded.length})),$.failures&&$.failures.length>0?K(jn($.failures,h)):(gt([]),ze("archived"),Lt("all"),Xt(""))}catch($){let we=Dr($);if(we!==void 0&&typeof r=="function"){let j=q.byId[we.sessionId];St({sessionId:we.sessionId,title:j===void 0?we.sessionId:rt(j,h),kinds:we.kinds.join(", ")}),tt(null),Et(null),K(null)}else{let j=Nn($);K(j===void 0?h("archives.archiveBatchFailed",{detail:$ instanceof Error?$.message:String($)}):h("archives.archiveActive",{kinds:j.join(", ")}))}}finally{It.current=!1,Ke(!1)}}},"performArchive"),Wa=e(()=>is(Ze,et),"confirmArchive"),qa=e(async d=>{K(null),Ye(null);try{await fr(d.id),Rt.current&&Ye(h("details.copied"))}catch(E){Rt.current&&K(typeof Fn(E)=="string"&&String(Fn(E)).startsWith("copy.")?h(String(Fn(E))):Ge(E))}},"copyId"),or=(0,l.useMemo)(()=>ts(Ut,_t,pn,h,fe?Q.archivedSessionIds:void 0),[Ut,_t,pn,h,fe,Q.archivedSessionIds]);(0,l.useEffect)(()=>{if(V)return;let d=!1;return A().then(E=>{d||mn(Object.fromEntries(E.items.map($=>[$.sessionId,$.createdAt])))}).catch(()=>{d||mn({})}),()=>{d=!0}},[A,Q.archivedSessionIds,V]),(0,l.useEffect)(()=>{ht!=="all"&&!Ut.some(d=>d.key===ht)&&Lt("all")},[Ut,ht]);let os=!gr(it,ee),ls=or.filter(d=>ht==="all"||ht===d.key).map(d=>({...d,sessions:d.sessions.filter(E=>(!Ne||ot.has(E.id))&&Is(E.updatedAt,it,ee))})).filter(d=>d.sessions.length),lr=qe==="content"&&!os,vn=U(ls.flatMap(d=>d.sessions.map(E=>E.id)),Tt,lr,Ct??Y),cr=new Map(vn.items.map(d=>[d.sessionId,d])),xt=B(Ae,fe?Q.archivedSessionIds:[]),cs=Tt.trim().toLocaleLowerCase(),yn=ls.map(d=>({...d,sessions:d.sessions.filter(E=>!cs||rt(E,h).toLocaleLowerCase().includes(cs)||cr.has(E.id))})).filter(d=>d.sessions.length),ds=T?yn.flatMap(d=>d.sessions).filter(d=>kr(d,{days:Number(_e),favorites:ot,currentId:jt(q),pending:me.pending})).map(d=>d.id):[],bn=(0,l.useMemo)(()=>Zr(yn),[yn]),dr=(0,l.useMemo)(()=>new Set(bt),[bt]),Va=(0,l.useMemo)(()=>{let d=new Set(Q.archivedSessionIds);return Oe.reduce((E,$)=>E+(d.has($)?1:0),0)},[Oe,Q.archivedSessionIds]),ur=bn.filter(d=>dr.has(d)).length,Ga=bn.length>0&&ur===bn.length;(0,l.useEffect)(()=>{gt(d=>Jr(d,Ln))},[Ln]);let $a=e((d,E)=>{gt($=>rr($,[d],E))},"toggleSessionSelection"),Ka=e(d=>{gt(E=>rr(E,bn,d))},"toggleVisibleSelection"),Ya=e(d=>{V||yt.current.has(d)||(yt.current.add(d),On(new Set(yt.current)),K(null),Ye(null),m(d).catch(E=>{K(jr(E,h))}).finally(()=>{yt.current.delete(d),On(new Set(yt.current))}))},"onUnarchive"),us=e(async d=>{if(!V){if(ge){let E=ln(Q.archivedSessionIds,Q.items,d),$=await Ve("restore",E);return $&&{unarchivedSessionIds:$.succeeded}}Ke(!0),K(null),Ye(null);try{let E=await x(d);return E.unarchivedSessionIds.length>0&&Ye(h("archives.restoreSuccess",{n:E.unarchivedSessionIds.length})),E.failures&&E.failures.length>0&&K(jn(E.failures,h,jr)),E}catch(E){K(h("archives.restoreBatchFailed",{detail:E instanceof Error?E.message:String(E)}))}finally{Ke(!1)}}},"onBatchUnarchive"),Za=e(async()=>{if(bt.length===0)return;let d=await us({scope:"sessions",sessionIds:bt});if(d!==void 0){let E=new Set(d.unarchivedSessionIds);gt($=>$.filter(we=>!E.has(we)))}},"onSelectedUnarchive"),hs=e(()=>{V||Pt(null)},"closeDelete");(0,l.useEffect)(()=>{if(je===null)return;let d=e(E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),"stopImmediatePropagation"in E&&typeof E.stopImmediatePropagation=="function"&&E.stopImmediatePropagation(),V||Pt(null))},"onKeyDown");return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[je,V]);let Ja=e(async()=>{if(V||un.current||je===null)return;if(je.kind!=="batch"){un.current=!0,Ke(!0),K(null),Ye(null);try{await u(je.session.id),Pt(null)}catch(E){K(Kn(E,h))}finally{un.current=!1,Ke(!1)}return}if(Pe.current||De.current||yt.current.size>0)return;let{target:d}=je;if(d.scope==="sessions"&&ln(Q.archivedSessionIds,Q.items,d).length===0){Pt(null);return}Pe.current=!0,Ke(!0),K(null),Ye(null),Z(null),be(null);try{let E=await S(d),$=Xr(E,h);$.kind==="error"?K($.message):Ye($.message);let we=new Set([...E.deletedSessionIds,...E.skippedSessionIds]);wt(Se=>Se.filter(lt=>!we.has(lt))),gt(Se=>Se.filter(lt=>!we.has(lt))),b(Se=>Se.filter(lt=>!we.has(lt)));let j=E.failures.map(Se=>Se.sessionId);nt.current=j.length>0?{kind:"delete",ids:j,idle:!1}:null,Z({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:Le}),Pt(null)}catch(E){K(Kn(E,h))}finally{Pe.current=!1,Ke(!1)}},"confirmDelete"),zt=je?.kind==="batch"?je.target.scope:null,Xa=zt==="ungrouped"?h("archives.deleteUngroupedTitle"):zt==="workspace"?h("archives.deleteProjectTitle",{name:je?.kind==="batch"?je.title:""}):h(zt==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),ps=je===null?void 0:zt==="ungrouped"?h("archives.deleteUngroupedDesc",{n:je.kind==="batch"?je.count:0}):zt==="workspace"?h("archives.deleteProjectDesc",{name:je?.kind==="batch"?je.title:"",n:je.kind==="batch"?je.count:0}):zt==="sessions"?h("archives.deleteSelectedDesc",{n:je.kind==="batch"?je.count:0}):h("deleteSession.desc",{name:rt(je.kind==="session"?je.session:{},h)}),Qa=h(zt==="ungrouped"?"archives.deleteUngroupedConfirm":zt==="workspace"?"archives.deleteProjectConfirm":zt==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:Ea+Ta+_a+Ra+ja}),(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)(f.Button,{variant:"outline",size:"sm","aria-label":h("archives.viewProject"),icon:(0,a.jsx)(ca,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:h("archives.viewProject")}),(0,a.jsx)(f.Button,{variant:"outline",size:"sm","aria-label":h("archives.feedback"),icon:(0,a.jsx)(da,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:h("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:h("archives.description")})]}),l.createElement("div",C(V||Bt.size>0,(0,a.jsx)(f.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:Le==="unarchived"?"unarchived":"archived",onChange:e(d=>Ha(d==="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: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)(f.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(Le==="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)(nr,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:Ne?"favorites":"all",options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:e(d=>typeof ve=="function"&&ve(d==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),(0,a.jsx)(nr,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:qe,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}],onChange:e(d=>typeof Qe=="function"&&Qe(d),"onChange"),"aria-label":h("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:Tt,onChange:e(d=>Xt(d.target.value),"onChange"),placeholder:h(lr?"discovery.searchPlaceholder":fe?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(lr?"discovery.searchPlaceholder":fe?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)(Na,{id:"dsham-sort-filter",t:h,disabled:V,favoritesOnly:Ne,setFavoritesOnly:ve,favoriteBusy:V||Ie||!T,sortBy:!fe&&_t==="archived"?"updated":_t,setSortBy:hn,options:[...fe?[{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)(nr,{id:"dsham-project-filter",className:"dsham_projectFilter",value:ht,title:ht==="all"?h("archives.allProjects"):or.find(d=>d.key===ht)?.title??ht,options:[{value:"all",label:h("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:h("archives.allProjects")},...or.map(d=>({value:d.key,label:d.title,title:d.title}))],onChange:Lt,"aria-label":h("archives.projectFilter")}),l.createElement(W,{t:h,from:it,to:ee,onFrom:vt,onTo:ie,invalid:os,onClear:e(()=>{vt(""),ie("")},"onClear")})]})}),l.createElement("style",null,Rs),l.createElement(Fe,{state:vn,t:h}),ge&&(0,a.jsx)(R,{t:h,archived:fe,busy:V||Ie||Bt.size>0,ready:T,days:_e,onDays:xe,count:ds.length,onPreview:e(()=>{Ot(ds),ke(!0)},"onPreview"),progress:ye,result:Ce?.tab===Le?Ce:null,onRetry:e(()=>{let d=nt.current;d&&(d.kind==="delete"?Jt({kind:"batch",target:{scope:"sessions",sessionIds:d.ids},count:d.ids.length}):Ve(d.kind,d.ids,{idle:d.idle,retry:!0}))},"onRetry"),undoCount:Va,onUndo:e(()=>Ve("undo",Oe,{retry:!0}),"onUndo"),onReload:Qt,orphanCount:st?.count??0,cacheCount:tn.diagnosis.count,cacheRepair:tn,onRebuildCaches:e(()=>Gt(),"onRebuildCaches"),onRetryCaches:e(()=>Gt(!0),"onRetryCaches"),onReloadCaches:e(async()=>{try{await $e?.(),await Be.current?.load(),(Be.current?.snapshot().diagnosis.count??0)===0&&Be.current?.dismiss()}catch(d){Rt.current&&K(Ge(d))}},"onReloadCaches"),onDismissCaches:e(()=>Be.current?.dismiss(),"onDismissCaches"),orphanSizeBytes:st?.totalSizeBytes??0,orphanCleaning:nn,onCleanOrphans:Ua}),Ut.length>0&&(0,a.jsx)($r,{selectedCount:bt.length,hiddenCount:bt.length-ur,allVisibleSelected:Ga,selectedVisibleCount:ur,visibleCount:bn.length,busy:V,t:h,onToggle:Ka,onClear:e(()=>gt([]),"onClear"),onArchive:fe?void 0:()=>Ot([...bt]),onRestore:Za,onDelete:e(()=>Jt({kind:"batch",target:{scope:"sessions",sessionIds:bt},count:bt.length}),"onDelete")}),Ut.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(fe?"archives.empty":"archives.emptyUnarchived")}):yn.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:vn.status==="loading"||vn.status==="error"||vn.failures.length?null:h("archives.emptyFiltered")}):yn.map(d=>{let E=za(d.key),$=Ut.find(j=>j.key===d.key)?.sessions.map(j=>j.id)??[],we=fe?ln(Q.archivedSessionIds,Q.items,E).length:$.length;return(0,a.jsxs)("section",{className:"dsham_settingsGroup",children:[(0,a.jsxs)("div",{className:"dsham_settingsGroupHeading",children:[(0,a.jsx)("h3",{className:"dsham_settingsGroupTitle",children:(0,a.jsxs)("button",{type:"button",className:"dsham_groupToggle","aria-expanded":!z.has(d.key),"aria-controls":"dsham-group-"+encodeURIComponent(d.key),onClick:e(()=>oe(j=>{let Se=new Set(j);return Se.has(d.key)?Se.delete(d.key):Se.add(d.key),Se}),"onClick"),children:[(0,a.jsx)(z.has(d.key)?f.IconChevronRightOutlineMedium:f.IconChevronDownOutlineMedium,{}),(0,a.jsx)(f.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)(Ma,{group:d,busy:V,onArchive:fe?void 0:()=>Ot($,d),onRestore:e(()=>us(E),"onRestore"),onDelete:e(()=>Jt({kind:"batch",target:E,title:d.title,count:we}),"onDelete"),t:h})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(d.key),hidden:z.has(d.key)||void 0,children:!z.has(d.key)&&d.sessions.map(j=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":dr.has(j.id),children:[(0,a.jsx)(Kr,{checked:dr.has(j.id),disabled:V,label:h("archives.selectSession",{name:rt(j,h)}),onChange:e(Se=>$a(j.id,Se.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:rt(j,h),"aria-label":h("archives.openSession")+h("common.separator")+rt(j,h),disabled:V||Bt.has(j.id),onClick:e(()=>Pn(j),"onClick"),children:rt(j,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[Ca(j.updatedAt,h)]}),cr.has(j.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:V,title:h(fe?"discovery.preview":"archives.openSession"),onClick:e(()=>fe?xt.open(j,Tt):Pn(j),"onClick")},l.createElement(M,{text:cr.get(j.id)?.snippet??"",query:Tt}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof We=="function"&&k({variant:"outline",className:"dsham_iconAction"+(ot.has(j.id)?" dsham_favoriteOn":""),title:h(ot.has(j.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":ot.has(j.id),"aria-label":h(ot.has(j.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+rt(j,h),disabled:V||Ie||!T,onClick:e(()=>fn(j.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:ot.has(j.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:ae})})}),k({variant:"outline",className:"dsham_iconAction",title:h(fe?"archives.restore":"archives.archiveSelected"),"aria-label":h(fe?"archives.restore":"archives.archiveSelected"),disabled:V||Bt.has(j.id),onClick:e(()=>fe?Ya(j.id):is([j.id]),"onClick"),icon:(0,a.jsx)(fe?f.IconRefreshOutlineMedium:f.IconArchiveOutlineMedium,{size:16})}),fe&&(0,a.jsx)(Da,{busy:V||Bt.has(j.id),t:h,title:rt(j,h),onCopyId:e(()=>qa(j),"onCopyId"),onPreview:typeof Ae=="function"?()=>xt.open(j,Tt):void 0,onRestoreOpen:e(()=>Pn(j,!0),"onRestoreOpen"),onDelete:e(()=>Jt({kind:"session",session:j}),"onDelete")})]})]},j.id))})]},d.key)}),l.createElement(w,{width:900,className:"dsham_modalWide",portalToBody:!0,t:h,open:xt.target!==null,onClose:xt.close,title:xt.target?rt(xt.target.session,h):h("discovery.preview"),footer:v({variant:"primary",disabled:V,onClick:e(()=>{if(xt.target){let d=xt.target.session;return xt.close(),Pn(d)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(ne,{preview:xt,t:h,MarkdownText:f.MarkdownText})}),Ze===null&&ft!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:ft}),zn!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:zn}),(0,a.jsx)(w,{t:h,open:Ze!==null,onClose:dn,title:h("archives.archiveTitle",{n:Ze?.length??0}),description:cn===null?h("archives.archiveSelectedDesc"):h(cn.key===Mn?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:cn.title,n:Ze?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:V,onClick:dn,children:h("cancel")}),v({variant:"primary",disabled:V||!Ze?.length,onClick:Wa,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[ge&&(0,a.jsx)("p",{children:h(et?"organizer.idleConfirm":"organizer.manualConfirm")}),ge&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(Ze??[]).map(d=>(0,a.jsxs)("label",{children:[(0,a.jsx)(hr,{checked:!0,disabled:V,label:rt(q.byId[d]??{id:d},h),onChange:e(()=>tt(E=>(E??[]).filter($=>$!==d)),"onChange")}),rt(q.byId[d]??{id:d},h)]},d))}),ye&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:ye.done,max:Math.max(1,ye.total)}),h("organizer.progressCount",{done:ye.done,total:ye.total})]}),ft!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:ft})]})}),(0,a.jsx)(w,{t:h,open:At!==null,onClose:e(()=>{V||(St(null),K(null))},"onClose"),title:h("archiveActive.title"),...At===null?{}:{description:h("archiveActive.desc",{name:At.title,kinds:At.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:V,onClick:e(()=>{V||(St(null),K(null))},"onClick"),children:h("cancel")}),v({danger:!0,disabled:V,onClick:e(async()=>{if(!(It.current||V||At===null||typeof r!="function")){It.current=!0,Ke(!0),K(null);try{await r(At.sessionId,{stopActivity:!0}),gt(d=>d.filter(E=>At===null||E!==At.sessionId)),ze("archived"),Ye(h("archives.archiveSuccess",{n:1})),St(null)}catch(d){K(d instanceof Error?d.message:String(d))}finally{It.current=!1,Ke(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:ft!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:ft})}),(0,a.jsx)(w,{t:h,open:je!==null,onClose:hs,title:Xa,...ps===void 0?{}:{description:ps},footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:V,onClick:hs,children:h("cancel")}),v({danger:!0,disabled:V,onClick:Ja,children:Qa})]}),children:(0,a.jsxs)(a.Fragment,{children:[V&&(0,a.jsxs)("div",{role:"status",children:[je?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),ye&&(0,a.jsx)("progress",{value:ye.done,max:Math.max(1,ye.total),"aria-label":h("organizer.progress")}),ye&&h("organizer.progressCount",{done:ye.done,total:ye.total})]}),ft!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:ft})]})})]})]})}e(Gn,"ArchivedSessionsSection");function Rr(n){var r,i,c="";if(typeof n=="string"||typeof n=="number")c+=n;else if(typeof n=="object")if(Array.isArray(n)){var m=n.length;for(r=0;r<m;r++)n[r]&&(i=Rr(n[r]))&&(c&&(c+=" "),c+=i)}else for(i in n)n[i]&&(c&&(c+=" "),c+=i);return c}e(Rr,"r");function ua(...n){for(var r,i,c=0,m="",u=arguments.length;c<u;c++)(r=arguments[c])&&(i=Rr(r))&&(m&&(m+=" "),m+=i);return m}e(ua,"clsx");let $n="Ungrouped";function ha(n,r=$n){if(n===void 0||n==="")return r;let i=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return i!==void 0&&i!==""?i:n}e(ha,"workspaceLabel");function on(n,r){return r.updatedAt!==n.updatedAt?r.updatedAt-n.updatedAt:n.id<r.id?-1:1}e(on,"byRecency");function Zt(n,r,i,c){return n.origin!=="subagent"&&(!i.has(n.id)||c===!0)&&(!n.blank||n.id===r)}e(Zt,"sessionVisible");function Rn(n){let r=n instanceof Error?n.message:String(n);return r.includes("UNKNOWN_SESSION")||r.includes("no such session")}e(Rn,"isUnknownSessionError");function Kn(n,r){if(Rn(n))return r("deleteSession.unknown");let i=n instanceof Error?n.message:String(n);return r("deleteSession.failed",{detail:i})}e(Kn,"formatDeleteError");function jr(n,r){if(Rn(n))return r("archives.unarchiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.unarchiveFailed",{detail:i})}e(jr,"formatUnarchiveError");function jn(n,r,i=Nr){return n.map(c=>c.sessionId+r("common.separator")+i(new Error(c.message),r)).join(`
|
|
22
|
-
`)}e(jn,"formatBatchFailures");function Nr(n,r){if(Rn(n))return r("archives.archiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.archiveFailed",{detail:i})}e(Nr,"formatArchiveError");function Nn(n){if(n===null||typeof n!="object")return;let r=te(n),i=r.rpcError!==null&&typeof r.rpcError=="object"?te(r.rpcError):void 0,c=r.name==="WorkspaceActiveSessionError"?r.activity:void 0,m=i?.details,u=r.name==="WorkspaceArchiveError"&&i?.code==="workspace/session-active"&&m!==null&&typeof m=="object"?te(m).activity:void 0,x=Array.isArray(c)?c:Array.isArray(u)?u:void 0;if(x===void 0)return;let S=x.flatMap(A=>{if(A===null||typeof A!="object")return[];let O=te(A).kind;return typeof O=="string"&&O.length>0?[O]:[]});return S.length>0?S:void 0}e(Nn,"activeSessionActivity");function Dr(n){let r=Nn(n);if(r===void 0||n===null||typeof n!="object")return;let i=te(n),c=i.rpcError!==null&&typeof i.rpcError=="object"?te(i.rpcError).details:void 0,m=c!==null&&typeof c=="object"?te(c).sessionId:void 0,u=typeof i.sessionId=="string"?i.sessionId:typeof m=="string"?m:void 0;return u===void 0?void 0:{sessionId:u,kinds:r}}e(Dr,"activeSessionRefusal");function Mr(n,r){let i=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(r);if(i===null)return;let c=i[1].split(", ").filter(m=>m.length>0);return c.length>0?{sessionId:n,kinds:c}:void 0}e(Mr,"activeArchiveFromMessage");function pa(n,r){let i=n instanceof Error?n.message:String(n);return r("archives.forkFailed",{detail:i})}e(pa,"formatForkError");function Yn(n){return n.blank?"New Session":n.displayTitle}e(Yn,"sessionTitle");function zr(n,r,i,c,m,u,x){let S=[...u];return x==="recency"&&S.sort(on),{key:n,workspaceId:r,cwd:i,createdAt:c,label:m,sessions:S}}e(zr,"buildGroup");function ma(n,r){let i=new Map(n.map(u=>[u.id,u])),c=new Set,m=[];for(let u of r){let x=i.get(u);x===void 0||c.has(u)||(m.push(x),c.add(u))}for(let u of[...n].sort(on))c.has(u.id)||m.push(u);return m}e(ma,"orderedUngrouped");function Or(n,r,i,c,m){let u=[],x=new Set;for(let A of r){let O=[];for(let I of A.sessionIds){let N=n.byId[I];N!==void 0&&(x.add(I),Zt(N,jt(n),i,m)&&O.push(N))}u.push(zr(A.workspaceId,A.workspaceId,A.path,Date.parse(A.createdAt),A.title,O,"account"))}let S=n.ids.map(A=>n.byId[A]).filter(A=>A!==void 0&&!x.has(A.id)&&Zt(A,jt(n),i,m));return S.length>0&&u.push(zr("",void 0,void 0,void 0,$n,c===void 0?S:ma(S,c),c===void 0?"recency":"account")),u}e(Or,"groupByWorkspace");function Zn(n,r,i){if(!n||i.has(n))return!1;let c=r?.[n];return!(c===void 0||c.origin==="subagent"||c.blank)}e(Zn,"isWorkspaceTaskCandidate");function Pr(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 c=i.slice(10);if(!c)return null;let m=r.querySelector(".title")??r.querySelector("[class*='title']");return{workspaceId:c,title:m?.textContent?.trim()||c}}e(Pr,"workspaceMenuTriggerFrom");function Jn(n){let r=n.querySelector('[class*="rowActions"]');if(!r)return null;let i=Array.from(r.querySelectorAll("button"));if(i.length===0)return null;let c=e(u=>!!((u.getAttribute("class")??"").includes("dsham_rowStar")||typeof u.closest=="function"&&u.closest(".dsham_starSlot")),"isStarButton");return i.find(u=>{if(c(u))return!1;if(u.getAttribute("aria-haspopup")==="menu")return!0;let x=(u.getAttribute("aria-label")??u.getAttribute("title")??"").toLowerCase();return/new|create|新建|add|\+|созда/.test(x)?!1:/action|操作|действи|more|更多|选项|options|menu/.test(x)})??null}e(Jn,"findRowMenuButton");function Lr(n,r){if(Jn(r)===n)return!0;let c=(n.getAttribute("aria-label")??n.getAttribute("title")??"").toLowerCase();return/action|操作|действи|more|更多/.test(c)}e(Lr,"isRowMenuButton");function Br(){if(typeof document>"u"||typeof document.addEventListener!="function")return()=>{};let n=e(r=>{let i=r.target;if(!i||i.closest("input, textarea, [contenteditable='true']"))return;let c=i.closest('[data-row-key^="workspace:"], [data-row-key^="session:"]');if(!c)return;let m=i.closest("button");if(m&&!Lr(m,c))return;let u=Jn(c);u&&(r.preventDefault(),r.stopPropagation(),u.click())},"onContextMenu");return document.addEventListener("contextmenu",n,!0),()=>{document.removeEventListener("contextmenu",n,!0)}}e(Br,"setupSidebarRowContextMenu");function Xn(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(Xn,"isWorkspaceDeleteMenuItem");function fa(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}e(fa,"visiblePendingKind");function Fr(n,r){let i=r.get(n.id),c=i===void 0?n.pendingInteraction:i.kind;return fa(c)}e(Fr,"pendingInteractionForSession");let Qn=new Map,er=new Set,ga=new Map;function va(n){return n(Qn)}e(va,"useEmptySessionPendingInteraction");function ya(n){return n(ga)}e(ya,"useEmptySessionStatus");function Ur(n){return n instanceof Map||n==null?{pending:n??Qn,completed:er}:{pending:n.pending??Qn,completed:n.completed??er}}e(Ur,"pendingFacts");function ba(n){let r=new Map,i=new Set;if(n instanceof Map)for(let[c,m]of n)m?.pendingInteraction!==void 0&&r.set(c,m.pendingInteraction),m?.completionUnread===!0&&i.add(c);return{pending:r,completed:i}}e(ba,"factsFromSessionStatus");function wa(n,r,i){let c=n(u=>u),m=r(u=>u);return i?ba(m):{pending:c,completed:er}}e(wa,"useSessionUiFacts");function Hr(n,r,i,c){let m=Ur(c),u=Fr(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),...u===void 0?{}:{pendingInteraction:u}}}e(Hr,"sessionNode");function Sa(n,r,i,c,m){let u=new Set(i),x=new Set(m.expandedGroups),S=Tn(n.byId),A=jt(n),O=A===void 0?void 0:r.find(N=>N.sessionIds.includes(A))?.workspaceId??"",I=[];for(let N of Or(n,r,u,m.ungroupedOrder,m.showArchived)){let P=x.has(N.key);I.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(h=>Hr(h,S,u,c)):[]})}return I}e(Sa,"deriveGroups");function xa(n,r,i,c){let m=new Set(r),u=Tn(n.byId),x=[];for(let S of n.ids){let A=n.byId[S];A===void 0||!Zt(A,jt(n),m,c)||x.push(A)}return x.sort(on),x.map(S=>Hr(S,u,m,i))}e(xa,"deriveFlat");function ka(n,r,i,c,m,u,x,S,A=$n){let O=i.trim().toLowerCase();if(O==="")return{items:[],hasMore:!1};let I=new Set(c),N=Tn(n.byId),P=new Map;for(let Y of r)for(let Ae of Y.sessionIds)P.has(Ae)||P.set(Ae,Y.title);let h=e(Y=>P.get(Y.id)??ha(Y.cwd,A),"labelOf"),Ee=new Map;for(let Y of u.items)Ee.has(Y.sessionId)||Ee.set(Y.sessionId,Y);let pe=[];for(let Y of n.ids){let Ae=n.byId[Y];Ae===void 0||Ae.blank||!Zt(Ae,jt(n),I,S)||(Yn(Ae).toLowerCase().includes(O)||h(Ae).toLowerCase().includes(O))&&pe.push(Ae)}pe.sort(on);let ce=[],He=new Set,$e=e(Y=>{He.has(Y.id)||(He.add(Y.id),ce.push(Y))},"include");for(let Y of pe)$e(Y);for(let Y of u.items){let Ae=n.byId[Y.sessionId];Ae!==void 0&&!Ae.blank&&Zt(Ae,jt(n),I,S)&&$e(Ae)}let Ct=Ur(m);return{items:ce.slice(0,x).map(Y=>{let Ae=Ee.get(Y.id),F=Fr(Y,Ct.pending);return{id:Y.id,title:Yn(Y),workspace:h(Y),running:Y.running,runningSubagentCount:N.get(Y.id)?.runningCount??0,archived:I.has(Y.id),...F===void 0?{}:{pendingInteraction:F},completed:Y.completed===!0||Ct.completed.has(Y.id),...Ae===void 0?{}:{snippet:Ae.snippet}}}),hasMore:u.hasMore||ce.length>x}}e(ka,"deriveSearchResults");function zi(n,r){let u=Math.max(0,r-n);return u<6e4?{unit:"now",n:0}:u<36e5?{unit:"minutes",n:Math.floor(u/6e4)}:u<864e5?{unit:"hours",n:Math.floor(u/36e5)}:u<30*864e5?{unit:"days",n:Math.floor(u/864e5)}:u<365*864e5?{unit:"months",n:Math.floor(u/(30*864e5))}:{unit:"years",n:Math.floor(u/(365*864e5))}}e(zi,"relativeTime");let Wr={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 rt(n,r){return n.blank?r("session.new"):n.title??n.displayTitle??""}e(rt,"displayTitle");function Ca(n,r){let i=new Date(n),c=`${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:c})}e(Ca,"archiveTimeLabel");let Ea=[".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(""),Dt="data-dsham-nav-icon",Aa='[role="dialog"] nav button',tr=[`[${Dt}] > svg { display: none !important; }`,`[${Dt}]::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 Ia(n,r){let i=String(r??"").trim();return i.length>0&&String(n??"").trim()===i}e(Ia,"isOwnSettingsNavRow");function Dn(n,r){for(let i of n){if(i.type==="characterData"){let m=i.target.parentElement;if(m!==null&&m.closest(r)!==null)return!0;continue}let c=i.target;if(c&&c.nodeType===1&&(typeof c.matches=="function"&&c.matches(r)||typeof c.closest=="function"&&c.closest(r)!==null))return!0;if(i.addedNodes)for(let m of i.addedNodes){if(m.nodeType!==1)continue;let u=m;if(typeof u.matches=="function"&&u.matches(r)||typeof u.querySelector=="function"&&u.querySelector(r)!==null||typeof u.closest=="function"&&u.closest(r)!==null)return!0}if(i.removedNodes)for(let m of i.removedNodes){if(m.nodeType!==1)continue;let u=m;if(typeof u.matches=="function"&&u.matches(r)||typeof u.querySelector=="function"&&u.querySelector(r)!==null||typeof u.closest=="function"&&u.closest(r)!==null)return!0}}return!1}e(Dn,"mutationTouches");function qr(n,r){return Ia(n.textContent,r)?n.getAttribute(Dt)===""?!1:(n.setAttribute(Dt,""),!0):n.hasAttribute(Dt)?(n.removeAttribute(Dt),!0):!1}e(qr,"applySettingsNavIcon");function Vr(n){return n.hasAttribute(Dt)?(n.removeAttribute(Dt),!0):!1}e(Vr,"restoreSettingsNavIcon");function Gr(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=tr,(document.head??document.documentElement).append(i)):i.textContent!==tr&&(i.textContent=tr);let c=!1,m=!1,u=e(()=>{if(m=!1,c)return;let A=n.locale.bind(Xe)("archived.badge");for(let O of document.querySelectorAll(Aa))qr(O,A)},"sync"),x=e(()=>{m||c||(m=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(u):setTimeout(u,16))},"schedule");u();let S=new MutationObserver(A=>{Dn(A,'[role="dialog"] nav')&&x()});return S.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{c=!0,S.disconnect();for(let A of document.querySelectorAll(`[${Dt}]`))Vr(A);i?.remove()}},"archive-manager: settings nav icon")}e(Gr,"installSettingsNavIcon");let Ta=[".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 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill));overflow:hidden;transition:border-color 150ms ease}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:0 10px;margin:0;user-select:none}",".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:0;border-top:1px solid var(--dsw-alias-border-l2);border-radius:0;background:transparent}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:40px;padding:4px 10px;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:16px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:1px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:13px}",".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:10px}.dsham_settingsRow{padding:4px 8px}.dsham_settingsActions{gap:2px}}"].join(""),_a=".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:16px;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:6px;padding:4px 6px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:10px}}.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{flex:none;box-sizing:border-box;width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);cursor:pointer}.dsham_checkbox:focus-visible{outline:var(--dsw-focus-ring-width,1px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.dsham_checkbox:disabled{opacity:.5;cursor:default}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",Ra=".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}}",ja=".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 nr({id:n,className:r,value:i,options:c,onChange:m,disabled:u=!1,"aria-label":x,title:S,tabIndex:A,"aria-hidden":O}){let[I,N]=l.useState(!1),P=l.useMemo(()=>c.map(pe=>({id:pe.value,label:pe.label})),[c]),h=c.find(pe=>pe.value===i),Ee=h?.label??x;return(0,a.jsx)("div",{id:n,tabIndex:A,"aria-hidden":O,className:r===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${r}`,children:(0,a.jsx)(f.Menu,{open:I,onClose:e(()=>N(!1),"onClose"),onSelect:e(pe=>{u||m(pe),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":I,disabled:u,tabIndex:A,"aria-hidden":O,title:S??h?.title??h?.label??x,className:"dsham_menuSelectBtn"+(I?" is-open":""),onClick:e(()=>{u||N(pe=>!pe)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:Ee}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:I?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:P})})}e(nr,"ArchiveProjectSelect");function Na({id:n,t:r,disabled:i=!1,favoritesOnly:c,setFavoritesOnly:m,favoriteBusy:u=!1,sortBy:x,setSortBy:S,options:A}){let[O,I]=l.useState(!1),N=l.useMemo(()=>{let ce=[];typeof m=="function"&&(ce.push({type:"label",id:"lbl_view_filter",text:r("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),ce.push({id:"filter:all",label:r("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),ce.push({id:"filter:favorites",label:r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),ce.push({type:"separator",id:"sep_view_filter"})),ce.push({type:"label",id:"lbl_view_sort",text:r("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let He of A)ce.push({id:`sort:${He.value}`,label:He.label});return ce},[r,m,A]),P=e(ce=>{ce.startsWith("filter:")?typeof m=="function"&&!u&&m(ce==="filter:favorites"):ce.startsWith("sort:")&&S(ce.slice(5)),I(!1)},"onSelect"),h=A.find(ce=>ce.value===x),Ee=c?r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":r("organizer.allChats")||"\u5168\u90E8\u804A\u5929",pe=`${Ee} \xB7 ${h?.label??x}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(f.Menu,{open:O,onClose:e(()=>I(!1),"onClose"),onSelect:P,selectedIds:[c?"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:pe,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(O?" is-open":"")+(c?" has-filter":""),onClick:e(()=>{i||I(ce=>!ce)},"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:Ee}),(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(Na,"ArchiveViewSortMenu");function $r({selectedCount:n,hiddenCount:r,allVisibleSelected:i,selectedVisibleCount:c,visibleCount:m,busy:u,t:x,onToggle:S,onClear:A,onRestore:O,onDelete:I,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)(Kr,{checked:i,indeterminate:c>0&&!i,disabled:u||m===0,label:x("archives.selectAllFiltered"),onChange:e(h=>S(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:P?x("archives.selectedCount",{n}):x("archives.selectAllFiltered")})]}),P&&k({disabled:u,"aria-label":x("archives.clearSelection"),onClick:A,children:x("archives.clearSelectionShort")})]}),P&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:N?[k({disabled:u,onClick:N,children:x("archives.archiveSelected")})]:[k({disabled:u,"aria-label":x("archives.restoreSelected"),onClick:O,children:x("archives.restore")}),k({disabled:u,className:"dsham_btnDanger","aria-label":x("archives.deleteSelected"),onClick:I,children:x("archives.deleteSelectionShort")})]})]}),r>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:x("archives.selectionHiddenHint",{hidden:r})})]})}e($r,"ArchiveSelectionToolbar");function Kr({checked:n,indeterminate:r=!1,disabled:i=!1,label:c,onChange:m}){return(0,a.jsx)(hr,{checked:n,indeterminate:r,disabled:i,label:c,onChange:m})}e(Kr,"ArchiveSelectionCheckbox");function Yr(){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(Yr,"moreIcon");function Da({busy:n,title:r,t:i,onPreview:c,onRestoreOpen:m,onDelete:u,onCopyId:x}){let[S,A]=(0,l.useState)(!1),O=e(N=>{if(!n){if(A(!1),N==="copyId")return x?.();if(N==="preview")return c?.();if(N==="restoreOpen")return m?.();N==="delete"&&u?.()}},"choose"),I=[...c?[{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}]:[],...u?[{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:I,onSelect:O,onClose:e(()=>A(!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:Yr(),onClick:e(()=>{n||A(N=>!N)},"onClick")})})}e(Da,"ArchivedSessionMenu");function Ma({group:n,busy:r,onArchive:i,onRestore:c,onDelete:m,t:u}){let x=n.key===Mn,S=i?[{id:"archive",label:u(x?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(f.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:u(x?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(f.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:u(x?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(f.IconTrashOutlineMedium,{size:16}),danger:!0}],[A,O]=(0,l.useState)(!1),I=u(x?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),N=e(P=>{r||(P==="archive"?i?.():P==="restore"?c?.():P==="delete"&&m?.())},"choose");return(0,a.jsx)(f.Menu,{open:!r&&A,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":I,"aria-haspopup":"menu","aria-expanded":A&&!r,icon:Yr(),onClick:e(()=>{r||O(P=>!P)},"onClick")})})}e(Ma,"ArchivedGroupActions");let Mn="__ungrouped__";function za(n){return n===Mn?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}e(za,"archivedBatchTargetForGroup");function ln(n,r,i){let c=[...new Set(n??[])];if(i.scope==="all")return c;if(i.scope==="sessions"){let u=new Set(i.sessionIds??[]);return c.filter(x=>u.has(x))}if(i.scope==="workspace"){let u=new Set(r.find(x=>x.workspaceId===i.workspaceId)?.sessionIds??[]);return c.filter(x=>u.has(x))}let m=new Set(r.flatMap(u=>u.sessionIds));return c.filter(u=>!m.has(u))}e(ln,"deriveArchivedBatchIds");function Zr(n){return[...new Set(n.flatMap(r=>r.sessions.map(i=>i.id)))]}e(Zr,"archivedSessionIdsInGroups");function Jr(n,r){let i=new Set(r);return[...new Set(n)].filter(c=>i.has(c))}e(Jr,"pruneArchivedSelection");function rr(n,r,i){let c=new Set(n);for(let m of r)i?c.add(m):c.delete(m);return[...c]}e(rr,"toggleArchivedSelection");function Xr(n,r){let i=n.deletedSessionIds.length,c=n.skippedSessionIds.length;return n.failures.length>0?{kind:"error",message:r("archives.deletePartial",{deleted:i,skipped:c,failed:n.failures.length,detail:n.failures[0].message})}:c>0&&i>0?{kind:"notice",message:r("archives.deleteSuccessWithSkipped",{deleted:i,skipped:c})}:c>0?{kind:"notice",message:r("archives.deleteSkipped",{n:c})}:{kind:"notice",message:r("archives.deleteSuccess",{n:i})}}e(Xr,"archivedDeleteFeedback");function Qr(n,r){let i=new Set(r);return Object.values(n).filter(c=>c.origin!=="subagent"&&!c.blank&&!i.has(c.id)).map(c=>c.id)}e(Qr,"unarchivedSessionIds");function es(n,r,i,c){let m=r.map(S=>({key:S.workspaceId,title:S.title,ids:new Set(S.sessionIds),sessions:[]})),u=[];for(let S of i){let A=n[S];if(A===void 0||A.origin==="subagent")continue;let O=m.find(I=>I.ids?.has(S));(O===void 0?u:O.sessions).push(A)}let x=m.filter(S=>S.sessions.length>0);return u.length>0&&x.push({key:Mn,title:c,sessions:u}),x}e(es,"deriveArchivedGroups");function ts(n,r,i,c,m=[]){let u=e((I,N)=>String(I).localeCompare(String(N),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),x=new Map;if(Array.isArray(m))for(let I=0;I<m.length;I++)x.set(m[I],I);let S=e(I=>{let N=r==="created"?i[I.id]:I.updatedAt;return typeof N=="number"&&Number.isFinite(N)?N:Number.NEGATIVE_INFINITY},"timestampOf"),A=e((I,N)=>{if(r==="archived"){let P=x.get(I.id)??-1,Ee=(x.get(N.id)??-1)-P;if(Ee!==0)return Ee}if(r!=="alphabetical"){let P=S(N)-S(I);if(Number.isFinite(P)&&P!==0)return P}return u(rt(I,c),rt(N,c))||u(I.id,N.id)},"compareSessions");return n.map(I=>({...I,sessions:[...I.sessions].sort(A)})).sort((I,N)=>{if(r==="archived"){let P=I.sessions[0]?.id,h=N.sessions[0]?.id,Ee=P!==void 0?x.get(P)??-1:-1,ce=(h!==void 0?x.get(h)??-1:-1)-Ee;if(ce!==0)return ce}if(r!=="alphabetical"){let P=S(N.sessions[0])-S(I.sessions[0]);if(Number.isFinite(P)&&P!==0)return P}return u(I.title,N.title)||u(I.key,N.key)})}e(ts,"sortArchivedGroups");let ns={...ea,...js,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","common.close":"\u5173\u95ED","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"},rs={...ta,...Ns,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","common.close":"Close","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"},Oa={...na,...Ds,"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.","common.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","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"},Xe="archive-manager-workspace",Pa=["slots","sessions","workspaces","locale","remote","typert"];function sr(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}e(sr,"bindObservable");function ss(n){return async r=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(r)}}e(ss,"createUnarchiveSession");async function ar(n,r,i){let c=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=await Wn(r,async x=>{try{await n.archiveSession(x)}catch(S){throw S!==null&&typeof S=="object"&&Nn(S)!==void 0&&typeof te(S).sessionId!="string"&&Object.assign(S,{sessionId:x}),S}return!0},{refresh:i}),u=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:u,archivedSessionIdsAdded:u.filter(x=>!c.has(x)),failures:m.failures}}e(ar,"archiveSessionsViaOfficial");async function as(n,r,i,c){let m=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),u=typeof c=="function"?c:A=>n.unarchiveSession?.(A),x=await Wn(r,async A=>(await u(A),!0),{refresh:i}),S=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:S,unarchivedSessionIds:[...m].filter(A=>!S.includes(A)),failures:x.failures}}e(as,"unarchiveSessionsViaOfficial");async function La(n){Ba(n);let r=n.get("remote"),i=e(()=>{},"disposeRemote");return r!==void 0&&(i=await r.$mount(Wt)),async()=>{await i()}}e(La,"apply");function Ba(n){n.effect(()=>n.locale.register(Xe,{zh:ns,en:rs,ru:Oa}),"dsh-archive-manager: dictionaries");let r=e(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),i={},c,m=e(g=>(c=Bs(g,n.sessions,n.workspaces,{onOpened:e(()=>n.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:e(()=>n.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>c?.dispose()),"attachArchiveNavigation");n.effect(()=>m(r()),"archive-manager: explicit archived navigation");let u=e(g=>{if(c===void 0)throw new Ht("navigationUnavailable");return Wr.request(g),c.open(g)},"openConversation"),x=e(async g=>{n.get("layout")?.beginNavigation?.(),Wr.request(g)},"focusSessionWorkspace"),S=e(async(g,b)=>{let T=await n.sessions.search(g,b);if(!T.ok)throw new Error(T.error.message);return T.value},"searchSessions"),A=e(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await Ee(),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=ss(n.workspaces),I=e(async(g,...b)=>{let T=n.get("remote.workspaceRegistry");if(!T||typeof T[g]!="function")throw new Error(n.locale.bind(Xe)("service.unavailable"));let Ie=await T[g].apply(T,b);if(!Ie.ok)throw new Error(Ie.error.message);return Ie.value},"registryCall"),N=e(()=>I("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),P=e(()=>I("diagnoseSessionCaches"),"diagnoseSessionCaches"),h=e(g=>I("rebuildSessionCaches",g),"rebuildSessionCaches"),Ee=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,T=b.manager;if(T?.listState==="error"&&T.listError)throw new Error(Ge(T.listError));if(b.listState==="error"&&b.listError)throw new Error(Ge(b.listError));let G=b.list?.getSnapshot?.();if(G?.state==="error"&&G.error)throw new Error(Ge(G.error));if(g&&typeof g=="object"&&"ok"in g&&g.ok===!1)throw new Error(Ge(g.error??"Session list refresh failed"))},"refreshCacheLists"),pe=e((g={})=>I("cleanOrphanSubagents",g??{}),"cleanOrphanSubagents"),ce=e(g=>I("searchArchivedContent",g),"searchArchivedContent"),He=e(g=>I("searchSessionContent",g),"searchSessionContent"),$e=e(g=>I("previewArchivedSession",g),"previewArchivedSession"),Ct=e(()=>I("favoriteSessions"),"favoriteSessions"),Y=e(g=>I("setSessionFavorite",g),"setSessionFavorite"),Ae=Ir();Ae.bind({favoriteSessions:Ct,setSessionFavorite:Y});let F=oa(n,Ae,()=>n.locale.bind(Xe));n.effect(()=>()=>F.dispose(),"archive-manager: favorites only filter");let We=Xs({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(Xe)("service.unavailable"));let T=await b.deleteSession(g);if(!T.ok)throw new Error(T.error.message)},"deleteOne"),getFavorites:Ct,refresh:e(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:jt}),de=e(async g=>{await O(g),await A()},"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 T=await b.deleteSession(g);if(!T.ok)throw new Error(T.error.message);await A()},"deleteSession"),ut=e(async(g,b)=>{let T=n.get("remote.workspaceRegistry");if(T===void 0)throw new Error("archive-manager remote service is unavailable");let G=await T.moveSessionToWorkspace({sessionId:g,targetWorkspaceId:b});if(!G.ok)throw new Error(G.error?.message||"move failed");return await A(),G.value},"moveSession"),at=e(async g=>ar(n.workspaces,g,A),"archiveSessions"),q=e(async g=>{let b=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},T=ln(b.archivedSessionIds,b.items,g);return as(n.workspaces,T,A,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 T=await b.deleteArchivedSessions(g);if(!T.ok)throw new Error(T.error.message);let G=await A();return{...T.value,refreshError:G}},"deleteArchivedSessions"),Le=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"),ze="sidebar.workspaces.session.menu.item",fe=null,Ze=new Set,tt=e(g=>{fe=g;for(let b of Ze)b()},"publishDeleteTarget");function cn(){return l.useSyncExternalStore(g=>(Ze.add(g),()=>{Ze.delete(g)}),()=>fe,()=>fe)}e(cn,"useDeleteRequest");function Et({sessionId:g,displayTitle:b,useMenuOpenState:T,t:G}){let[,Ie]=T(),ue=f.MenuItemButton,De=(0,a.jsx)(f.IconTrashOutlineRegular,{size:14}),Ne=e(()=>{Ie(!1),tt({sessionId:g,title:b})},"onSelect");return typeof ue=="function"?(0,a.jsx)(ue,{danger:!0,icon:De,onSelect:Ne,children:G("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Ne,children:G("menu.deleteSession")})}e(Et,"DeleteSessionMenuItem");function At({sessionId:g,favoriteRow:b,useMenuOpenState:T,t:G}){let[,Ie]=T(),ue=(0,l.useSyncExternalStore)(b.subscribe,b.getSnapshot),De=ue.ready&&ue.ids.has(g),Ne=e(()=>{Ie(!1),b.toggle(g)},"onSelect"),ve=f.MenuItemButton,qe=(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:De?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,children:(0,a.jsx)("path",{d:ae})}),Qe=G(De?"organizer.unfavorite":"organizer.favorite");return typeof ve=="function"?(0,a.jsx)(ve,{icon:qe,onSelect:Ne,children:Qe}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:Ne,children:Qe})}e(At,"FavoriteMenuItem");let St=null,Ot=new Set;function dn(g,b="success"){St={text:g,tone:b,seq:Date.now()};for(let T of Ot)T()}e(dn,"showToast");function It(){let g=l.useSyncExternalStore(T=>(Ot.add(T),()=>{Ot.delete(T)}),()=>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 T of Ot)T()}},"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(It,"GlobalToastOverlay");function je({sessionId:g,displayTitle:b,useMenuOpenState:T,t:G}){let[,Ie]=T(),[ue,De]=l.useState(!1),[Ne,ve]=l.useState(null),[qe,Qe]=l.useState(!1),it=l.useRef(null),vt=l.useRef(null),ee=n.workspaces.list?.getSnapshot?.()?.items??[],ie=f.MenuItemButton,z=e(()=>{if(vt.current&&clearTimeout(vt.current),it.current){let be=it.current.getBoundingClientRect(),Ce=typeof window<"u"?window.innerWidth:1024,Z=typeof window<"u"?window.innerHeight:768,Oe=220,wt=Math.max(140,Z-20),Pe=Math.min(360,wt),nt=be.right+2;nt+Oe>Ce-10&&(nt=Math.max(10,be.left-Oe-4));let me=be.top-4;me+Pe>Z-10&&(me=Math.max(10,Z-Pe-10)),me<10&&(me=10),ve({top:me,left:nt,maxHeight:Pe})}De(!0)},"handleMouseEnter"),oe=e(()=>{vt.current=setTimeout(()=>{De(!1)},180)},"handleMouseLeave"),_e=e(async(be,Ce)=>{if(!qe){Qe(!0),De(!1),Ie(!1);try{await ut(g,be),dn(G("moveSession.success",{name:Ce})||`\u4F1A\u8BDD\u5DF2\u6210\u529F\u79FB\u52A8\u5230\u201C${Ce}\u201D`,"success")}catch(Z){let Oe=Z instanceof Error?Z.message:String(Z);console.warn("archive-manager: move session failed",Z),dn(Oe,"danger")}finally{Qe(!1)}}},"handleSelectWorkspace"),xe=(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"})]}),et=(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"})}),ke=(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:8},children:[(0,a.jsx)("span",{children:G("menu.moveSession")}),et]}),ye=typeof ie=="function"?(0,a.jsx)(ie,{icon:xe,onSelect:e(()=>z(),"onSelect"),children:ke}):(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:[xe,ke]});return(0,a.jsxs)("div",{ref:it,className:"dsham_moveSessionWrap",onMouseEnter:z,onMouseLeave:oe,children:[ye,ue&&Ne&&typeof document<"u"&&typeof p?.createPortal=="function"&&(0,p.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:oe,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}),ee.length===0?(0,a.jsx)("div",{style:{padding:"8px 10px",fontSize:"12px",color:"var(--dsw-alias-label-tertiary, #888)"},children:G("moveSession.noOtherWorkspaces")}):ee.map(be=>{let Ce=be.title||be.path||be.workspaceId;return(0,a.jsx)("button",{type:"button",role:"menuitem",className:"dsham_moveSubmenuBtn",disabled:qe,onPointerDown:e(Z=>{Z.preventDefault(),Z.stopPropagation(),_e(be.workspaceId,Ce)},"onPointerDown"),onClick:e(Z=>{Z.preventDefault(),Z.stopPropagation(),_e(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 Pt(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(Pt,"focusSessionRow");function un({t:g}){let b=cn(),[T,G]=(0,l.useState)(!1),[Ie,ue]=(0,l.useState)(null),[De,Ne]=(0,l.useState)(null),ve=(0,l.useRef)(null),qe=(0,l.useRef)(null),Qe=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(b===null||typeof document>"u"){Ne(null);return}let ee=null,ie=e(()=>{if(ee&&ee.isConnected)return ee;try{ee=document.querySelector(`[data-row-key="session:${CSS.escape(b.sessionId)}"]`)}catch{ee=null}return ee},"getTargetRow"),z=e(()=>{let _e=ve.current,xe=_e?.offsetWidth||290,et=_e?.offsetHeight||160,ke=8,ye=ie();if(!ye){let Oe=window.innerWidth,wt=window.innerHeight,Pe=Math.max(16,(wt-et)/2),nt=Math.max(16,(Oe-xe)/2);Ne(me=>me!==null&&me.top===Pe&&me.left===nt?me:{top:Pe,left:nt});return}let be=ye.getBoundingClientRect(),Ce=be.top-4;Ce+et>window.innerHeight-16&&(Ce=window.innerHeight-16-et),Ce<16&&(Ce=16);let Z=be.right+ke;Z+xe>window.innerWidth-16&&(Z=be.left-xe-ke),Z<16&&(Z=16),Ne(Oe=>Oe!==null&&Oe.top===Ce&&Oe.left===Z?Oe:{top:Ce,left:Z})},"updatePosition");z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);let oe=null;return typeof ResizeObserver<"u"&&ve.current&&(oe=new ResizeObserver(z),oe.observe(ve.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[b]),(0,l.useEffect)(()=>{if(b===null)return;qe.current&&!qe.current.disabled?qe.current.focus():ve.current?.focus();let ee=b.sessionId;return()=>{if(!Pt(ee)){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&&T&&ve.current?.focus()},[b,T]),(0,l.useEffect)(()=>{if(b===null)return;let ee=e(ie=>{if(ie.key==="Escape"){ie.preventDefault(),ie.stopPropagation(),"stopImmediatePropagation"in ie&&typeof ie.stopImmediatePropagation=="function"&&ie.stopImmediatePropagation(),T||(ue(null),tt(null));return}if(ie.key==="Tab"){if(ie.preventDefault(),T){ve.current?.focus();return}let z=qe.current,oe=Qe.current;if(!z||!oe)return;ie.shiftKey?document.activeElement===z?oe.focus():z.focus():document.activeElement===oe?z.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",ee,!0),()=>window.removeEventListener("keydown",ee,!0)},[b,T]),b===null)return null;let it=e(()=>{T||(ue(null),tt(null))},"close"),vt=e(()=>{G(!0),ue(null),ge(b.sessionId).then(()=>{G(!1),tt(null)}).catch(ee=>{G(!1),ue(Kn(ee,g))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:it}),(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})}),T&&(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:qe,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:T,onClick:it,children:g("cancel")}),(0,a.jsx)("button",{ref:Qe,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:T,onClick:vt,children:g("deleteSession.title")})]})]})]})}e(un,"DeleteSessionOverlay");let V=null,Ke=new Set,ft=e(g=>{V=g;for(let b of Ke)b()},"publishArchiveWsTarget");function K(){return l.useSyncExternalStore(g=>(Ke.add(g),()=>{Ke.delete(g)}),()=>V,()=>V)}e(K,"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 Ye({t:g}){let b=K(),[T,G]=(0,l.useState)(!1),[Ie,ue]=(0,l.useState)(null),[De,Ne]=(0,l.useState)(null),ve=(0,l.useRef)(null),qe=(0,l.useRef)(null),Qe=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(b===null||typeof document>"u"){Ne(null);return}let ee=null,ie=e(()=>{if(ee&&ee.isConnected)return ee;try{ee=document.querySelector(`[data-row-key="workspace:${CSS.escape(b.workspaceId)}"]`)}catch{ee=null}return ee},"getTargetRow"),z=e(()=>{let _e=ve.current,xe=_e?.offsetWidth||290,et=_e?.offsetHeight||160,ke=8,ye=ie();if(!ye){let Oe=window.innerWidth,wt=window.innerHeight,Pe=Math.max(16,(wt-et)/2),nt=Math.max(16,(Oe-xe)/2);Ne(me=>me!==null&&me.top===Pe&&me.left===nt?me:{top:Pe,left:nt});return}let be=ye.getBoundingClientRect(),Ce=be.top-4;Ce+et>window.innerHeight-16&&(Ce=window.innerHeight-16-et),Ce<16&&(Ce=16);let Z=be.right+ke;Z+xe>window.innerWidth-16&&(Z=be.left-xe-ke),Z<16&&(Z=16),Ne(Oe=>Oe!==null&&Oe.top===Ce&&Oe.left===Z?Oe:{top:Ce,left:Z})},"updatePosition");z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);let oe=null;return typeof ResizeObserver<"u"&&ve.current&&(oe=new ResizeObserver(z),oe.observe(ve.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[b]),(0,l.useEffect)(()=>{if(b===null)return;qe.current&&!qe.current.disabled?qe.current.focus():ve.current?.focus();let ee=b.workspaceId;return()=>{zn(ee)}},[b]),(0,l.useEffect)(()=>{b!==null&&T&&ve.current?.focus()},[b,T]),(0,l.useEffect)(()=>{if(b===null)return;let ee=e(ie=>{if(ie.key==="Escape"){ie.preventDefault(),ie.stopPropagation(),"stopImmediatePropagation"in ie&&typeof ie.stopImmediatePropagation=="function"&&ie.stopImmediatePropagation(),T||(ue(null),ft(null));return}if(ie.key==="Tab"){if(ie.preventDefault(),T){ve.current?.focus();return}let z=qe.current,oe=Qe.current;if(!z||!oe)return;ie.shiftKey?document.activeElement===z?oe.focus():z.focus():document.activeElement===oe?z.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",ee,!0),()=>window.removeEventListener("keydown",ee,!0)},[b,T]),b===null)return null;let it=e(()=>{T||(ue(null),ft(null))},"close"),vt=e(()=>{G(!0),ue(null);let ie=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(xe=>xe.workspaceId===b.workspaceId),z=n.sessions.list?.getSnapshot?.()?.byId??{},oe=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),_e=(ie?.sessionIds??[]).filter(xe=>Zn(xe,z,oe));ar(n.workspaces,_e,A).then(xe=>{if(G(!1),xe.failures.length>0){ue(jn(xe.failures,g));return}ft(null)}).catch(xe=>{G(!1),ue(Nr(xe,g))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:it}),(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})}),T&&(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:qe,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:T,onClick:it,children:g("cancel")}),(0,a.jsx)("button",{ref:Qe,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:T,onClick:vt,children:g("archiveWorkspace.confirm")})]})]})]})}e(Ye,"ArchiveWorkspaceOverlay");function Jt(g){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let b=null,T=!1,G=new Map,Ie=!1,ue=e(z=>{let _e=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(ke=>ke.workspaceId===z);if(_e===void 0)return[];let xe=n.sessions.list?.getSnapshot?.()?.byId??{},et=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return _e.sessionIds.filter(ke=>Zn(ke,xe,et))},"workspaceCandidateIds"),De=e(()=>{if(Ie=!1,!T)for(let[z,oe]of G){if(!z.isConnected){G.delete(z);continue}let _e=ue(oe.workspaceId).length===0;z.disabled=_e,z.style.opacity=_e?"0.5":"",z.style.cursor=_e?"not-allowed":""}},"revalidateItems"),Ne=e(()=>{if(G.size===0||Ie||T)return;Ie=!0;let z=e(()=>De(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(z):setTimeout(z,16)},"scheduleRevalidate"),ve=e(z=>{b=Pr(z.target)},"rememberWorkspace");document.addEventListener("pointerdown",ve,!0),document.addEventListener("click",ve,!0);let qe=e(()=>{if(T)return;for(let[oe]of G)oe.isConnected||G.delete(oe);let z=document.querySelectorAll('[role="menu"]');for(let oe of z){if(oe.querySelector('[data-dsham-archive-workspace="true"]'))continue;let _e=Array.from(oe.querySelectorAll('button[role="menuitem"]'));if(_e.length===0)continue;let xe=_e.find(Ve=>Xn(Ve,!1))??_e.find(Ve=>Xn(Ve,!0));if(!xe)continue;let et=_e.find(Ve=>Ve!==xe)??xe,ke=xe.parentElement;if(!ke)continue;let ye=b;if(!ye)continue;let Ce=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(Ve=>Ve.workspaceId===ye.workspaceId),Z=Ce?.path??Ce?.cwd,wt=ue(ye.workspaceId).length,Pe=document.createElement("div");Pe.className=ke.className;let nt=et.className.split(/\s+/).filter(Ve=>!/(?:^|[_-])danger(?:$|[_-])/i.test(Ve)).join(" "),me=document.createElement("button");me.type="button",me.setAttribute("role","menuitem"),me.dataset.dshamArchiveWorkspace="true",me.className=nt;let Mt=et.querySelector("span"),ot=et.querySelectorAll("span")[1],Qt=document.createElement("span");Qt.setAttribute("aria-hidden","true"),Mt?.className&&(Qt.className=Mt.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"><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 fn=document.createElement("span");if(ot?.className&&(fn.className=ot.className),fn.textContent=g("menu.archiveWorkspace"),me.append(Qt,fn),Pe.append(me),wt===0&&(me.disabled=!0,me.style.opacity="0.5",me.style.cursor="not-allowed"),me.addEventListener("click",Ve=>{Ve.preventDefault(),Ve.stopPropagation();let st=ue(ye.workspaceId).length;st!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),ft({workspaceId:ye.workspaceId,title:ye.title,count:st}))}),Z){let Ve=document.createElement("div");Ve.className=ke.className;let st=document.createElement("button");st.type="button",st.setAttribute("role","menuitem"),st.dataset.dshamCopyWorkspacePath="true",st.className=nt,st.disabled=!1,st.style.opacity="",st.style.cursor="";let en=document.createElement("span");en.setAttribute("aria-hidden","true"),Mt?.className&&(en.className=Mt.className),en.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 tn=document.createElement("span");ot?.className&&(tn.className=ot.className),tn.textContent=g("menu.copyWorkspacePath"),st.append(en,tn),Ve.append(st),st.addEventListener("click",Ft=>{Ft.preventDefault(),Ft.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),fr(Z).catch(()=>{})});let gn=document.createElement("div");gn.className=ke.className;let Be=document.createElement("button");Be.type="button",Be.setAttribute("role","menuitem"),Be.dataset.dshamOpenExplorer="true",Be.className=nt,Be.disabled=!1,Be.style.opacity="",Be.style.cursor="";let Gt=document.createElement("span");Gt.setAttribute("aria-hidden","true"),Mt?.className&&(Gt.className=Mt.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 nn=document.createElement("span");ot?.className&&(nn.className=ot.className),nn.textContent=g("menu.openInExplorer"),Be.append(Gt,nn),gn.append(Be),Be.addEventListener("click",Ft=>{Ft.preventDefault(),Ft.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),(async()=>{try{let $t=await fetch(kn("/open-in-app/open"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({app:"explorer",path:Z})}).catch(()=>null);if($t&&$t.ok)return}catch{}try{await bt("/open-in-explorer",{method:"POST",body:JSON.stringify({path:Z,workspaceId:ye.workspaceId})})}catch($t){console.warn("archive-manager: open in explorer failed",$t)}})()}),ke.parentNode?.insertBefore(Ve,ke),ke.parentNode?.insertBefore(gn,ke)}ke.parentNode?.insertBefore(Pe,ke),G.set(me,{workspaceId:ye.workspaceId})}},"checkAndInject"),Qe=!1,it=e(()=>{if(Qe||T)return;Qe=!0;let z=e(()=>{Qe=!1,!T&&qe()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(z):setTimeout(z,16)},"scheduleInject"),vt=new MutationObserver(z=>{Dn(z,'[role="menu"]')&&it()});vt.observe(document.body,{childList:!0,subtree:!0});let ee=n.sessions.list?.subscribe?.(Ne),ie=n.workspaces.list?.subscribe?.(Ne);return()=>{T=!0,document.removeEventListener("pointerdown",ve,!0),document.removeEventListener("click",ve,!0),vt.disconnect(),ee?.(),ie?.(),G.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(Jt,"setupWorkspaceMenuInjector");function Tt(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(g=>g.children?.[ze]!==void 0)}e(Tt,"hostSidebarDeclaresSessionMenu");let Xt,ht,Lt,_t,hn,pn,mn,Bt=e(()=>{let g=Tt()?"menu":"waiting";g!==Xt&&(Xt=g,g==="menu"&&(ht??=n.slots.inject(ze,()=>n.slots.register({name:ze,id:"archive-manager.delete-session",order:500,locale:Xe,inject:e(()=>({}),"inject")},Et)),Lt??=n.slots.inject(ze,()=>n.slots.register({name:ze,id:"archive-manager.favorite",order:50,locale:Xe,inject:e(()=>({favoriteRow:Ae}),"inject")},At)),_t??=n.slots.inject(ze,()=>n.slots.register({name:ze,id:"archive-manager.move-session",order:480,locale:Xe,inject:e(()=>({}),"inject")},je)),hn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:Xe,inject:e(()=>({t:n.locale.bind(Xe)}),"inject")},un)),pn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:Xe,inject:e(()=>({t:n.locale.bind(Xe)}),"inject")},Ye)),mn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.toast",locale:Xe,inject:e(()=>({}),"inject")},It))))},"reconcileSidebar");Bt(),n.effect(()=>Jt(n.locale.bind(Xe)),"archive-manager: workspace menu injector"),n.effect(()=>Br(),"archive-manager: sidebar row contextmenu trigger"),Gr(n);let On=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(()=>()=>{On?.(),ht?.(),Lt?.(),_t?.(),hn?.(),pn?.(),mn?.()},"archive-manager: sidebar mode");let yt=e(()=>({archiveSessions:at,archiveSession:e((g,b)=>n.workspaces.archiveSession(g,b),"archiveSession"),sessionStore:sr(n.sessions.list),workspaceStore:sr(n.workspaces.list),unarchiveSession:de,deleteSession:ge,unarchiveSessions:q,deleteArchivedSessions:Q,archivedSessionMetadata:Le,openConversation:u,focusSessionWorkspace:x,viewState:i,favoriteSessions:Ct,setSessionFavorite:Y,favoriteSync:Ae,organizeBatch:We,diagnoseOrphanSubagents:N,cleanOrphanSubagents:pe,diagnoseSessionCaches:P,rebuildSessionCaches:h,refreshCacheLists:Ee,searchSessionContent:He,searchArchivedContent:ce,previewArchivedSession:$e,t:n.locale.bind(Xe)}),"buildArchivedSectionProps"),bt=e(async(g,b)=>{let T=kn(`/api/michengai/dsh-archive-manager${g}`),G=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},b?.headers),Ie=await fetch(T,Object.assign({},b,{headers:G})),ue=await Ie.json();if(!Ie.ok||!ue||ue.ok===!1)throw new Error((ue&&typeof ue=="object"&&typeof ue.error=="string"?ue.error:void 0)||`HTTP ${Ie.status}`);return ue},"callSettingsApi"),gt=Sr(n,{callApi:bt,renderPanel:e(g=>(0,a.jsx)(Gn,Object.assign({},yt(),g)),"renderPanel"),injectProps:yt,ns:Xe,onOnlineUpdateChange:e(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange")});n.effect(()=>()=>gt.destroy(),"archive-manager: sidebar entry"),n.effect(()=>Ks({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:le,isEnabled:e(()=>gt.isOnlineUpdateEnabled(),"isEnabled")}),"dsh-archive-manager: plugin update ui"),n.slots.inject("settings.section",()=>{try{return n.slots.register({name:"settings.section",id:"archive-manager",order:45,label:e(()=>n.locale.bind(Xe)("archived.badge"),"label"),icon:"archive",locale:Xe,inject:yt},Gn)}catch(g){return console.warn("archive-manager: register settings.section failed:",g),()=>{}}})}e(Ba,"applyWorkspaceBrowser");async function Fa(n,r,i,c){try{await r(n)}catch(m){i(pa(m,c))}}return e(Fa,"forkWithFeedback"),o.__test={forkWithFeedback:Fa,favoritesOnlyVisibility:Er,favoriteGroupPredicate:Ar,createFavoriteRowStore:Ir,unarchivedSessionIds:Qr,ArchiveSelectionToolbar:$r,ArchivedSessionsSection:Gn,zh:ns,en:rs,displayTitle:rt,sessionVisible:Zt,indexSubagentDescendants:Tn,isUnknownSessionError:Rn,deriveGroups:Sa,deriveFlat:xa,deriveSearchResults:ka,deriveArchivedGroups:es,sortArchivedGroups:ts,deriveArchivedBatchIds:ln,archivedSessionIdsInGroups:Zr,pruneArchivedSelection:Jr,toggleArchivedSelection:rr,archivedDeleteFeedback:Xr,isWorkspaceTaskCandidate:Zn,isWorkspaceDeleteMenuItem:Xn,workspaceMenuTriggerFrom:Pr,findRowMenuButton:Jn,isRowMenuButton:Lr,setupSidebarRowContextMenu:Br,applySettingsNavIcon:qr,restoreSettingsNavIcon:Vr,installSettingsNavIcon:Gr,mutationTouches:Dn,resolveRowHasStatus:Vt,activeSessionActivity:Nn,activeSessionRefusal:Dr,activeArchiveFromMessage:Mr,archiveSessionsViaOfficial:ar,unarchiveSessionsViaOfficial:as,createUnarchiveSession:ss,createWorkspaceViewStore:la,migrateWorkspaceViewPersist:_r,WORKSPACE_VIEW_PERSIST_KEY:_n,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:Tr,bindObservable:sr,groupByWorkspace:Or,byRecency:on,ARCHIVE_MANAGER_REMOTE:Wt,currentSessionId:jt,setupSidebarEntry:Sr},o.apply=La,o.inject=Pa,s.exports}e(Ni,"startArchiveClient");
|
|
21
|
+
`;function Js(){if(typeof document>"u"||typeof document.getElementById!="function"||document.getElementById(Zs)!==null||typeof document.createElement!="function")return;let t=document.createElement("style");t.id=Zs,t.textContent=Ei,(document.head??document.documentElement)?.appendChild?.(t)}e(Js,"ensureSidebarEntryStyle");function Ai(t){let s=t&&typeof t.size=="number"?t.size:16;return Ke(ln.IconArchiveOutlineMedium,{size:s})}e(Ai,"ArchiveSidebarIcon");function Ii(t){Js();let{t:s,enabled:o,onToggle:b,disabled:a,onlineUpdateEnabled:l=!0,onToggleOnlineUpdate:p,onlineUpdateDisabled:g,onlineUpdateLocked:y=!1,sidebarFavoriteStarEnabled:D=!0,onToggleSidebarFavoriteStar:x,sidebarFavoriteStarDisabled:v}=t,C=[Ke("div",{key:"sidebar-entry",className:"dsham_bundle_row"},Ke("div",{className:"dsham_bundle_label_box"},Ke("span",{className:"dsham_bundle_title"},s("sidebar.entry.title")),Ke("span",{className:"dsham_bundle_desc"},s("sidebar.entry.desc"))),Ke(ln.Switch,{checked:o,onChange:b,label:s("sidebar.entry.toggle"),disabled:a}))];if(typeof p=="function"){let M=y?`${s("update.entry.desc")} (${s("update.entry.locked")})`:s("update.entry.desc");C.push(Ke("div",{key:"online-update",className:"dsham_bundle_row"},Ke("div",{className:"dsham_bundle_label_box"},Ke("span",{className:"dsham_bundle_title"},s("update.entry.title")),Ke("span",{className:"dsham_bundle_desc"},M)),Ke(ln.Switch,{checked:l,onChange:p,label:s("update.entry.toggle"),disabled:g||y,title:y?s("update.entry.locked"):void 0})))}return typeof x=="function"&&C.push(Ke("div",{key:"sidebar-favorite-star",className:"dsham_bundle_row"},Ke("div",{className:"dsham_bundle_label_box"},Ke("span",{className:"dsham_bundle_title"},s("sidebar.favoriteStar.title")),Ke("span",{className:"dsham_bundle_desc"},s("sidebar.favoriteStar.desc"))),Ke(ln.Switch,{checked:D,onChange:x,label:s("sidebar.favoriteStar.toggle"),disabled:v}))),Ke(gs,null,C)}e(Ii,"ArchiveBundleConfigCard");function Ti(t){let[s,o]=Gt(t.getEnabled),[b,a]=Gt(t.getOnlineUpdateEnabled?t.getOnlineUpdateEnabled:()=>!0),[l,p]=Gt(t.getOnlineUpdateLocked?t.getOnlineUpdateLocked:()=>!1),[g,y]=Gt(t.getSidebarFavoriteStarEnabled?t.getSidebarFavoriteStarEnabled:()=>!0),[D,x]=Gt(!1),[v,C]=Gt(!1),[M,N]=Gt(!1);bs(()=>{let le=e(()=>{o(t.getEnabled()),t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled()),t.getOnlineUpdateLocked&&p(t.getOnlineUpdateLocked()),t.getSidebarFavoriteStarEnabled&&y(t.getSidebarFavoriteStarEnabled())},"syncState");return le(),t.subscribe(le)},[t]);let H=e(le=>{x(!0),o(le),t.setSidebar(le).catch(()=>{o(t.getEnabled())}).finally(()=>{x(!1)})},"onToggleSidebar"),B=t.setOnlineUpdate?le=>{t.getOnlineUpdateLocked?.()||(C(!0),a(le),t.setOnlineUpdate(le).catch(()=>{t.getOnlineUpdateEnabled&&a(t.getOnlineUpdateEnabled())}).finally(()=>{C(!1)}))}:void 0,q=t.setSidebarFavoriteStar?le=>{N(!0),y(le),t.setSidebarFavoriteStar(le).catch(()=>{t.getSidebarFavoriteStarEnabled&&y(t.getSidebarFavoriteStarEnabled())}).finally(()=>{N(!1)})}:void 0;return Ke(Ii,{t:t.t,enabled:s,disabled:D,onToggle:H,onlineUpdateEnabled:b,onlineUpdateDisabled:v||l,onlineUpdateLocked:l,onToggleOnlineUpdate:B,sidebarFavoriteStarEnabled:g,sidebarFavoriteStarDisabled:M,onToggleSidebarFavoriteStar:q})}e(Ti,"ArchiveBundleConfigCardWrapper");function Sr(t,s){if(Js(),!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"),isSidebarFavoriteStarEnabled:e(()=>!0,"isSidebarFavoriteStarEnabled"),setSidebarFavoriteStar:e(async()=>!1,"setSidebarFavoriteStar"),destroy:e(()=>{},"destroy")};let{callApi:o,renderPanel:b,ns:a}=s,l=!1,p=!1,g=!1,y=null,D=null,x=0,v=!1,C,M=new Set,N=e(()=>{if(!v)for(let L of M)try{L()}catch{}},"notify"),H=e(()=>{if(v||!g||!l||y)return;let L=t.slots.register({name:"main",key:wr,locale:a,inject:e(()=>{let Ee=typeof s.injectProps=="function"?s.injectProps():{};return Object.assign({t:t.locale?.bind?t.locale.bind(a):void 0},Ee)},"inject")},Ee=>Ke("div",{className:"dsham_mainPanel"},b(Ee)));y=typeof L=="function"?L:()=>{}},"mountMain"),B=e(()=>{if(y){try{y()}catch{}y=null}},"unmountMain"),q=e(()=>{if(v||!p||!l||D)return;let L=t.slots.register({name:"sidebar.panellist",id:wr,order:Ci,label:e(()=>t.locale.bind(a)("archives.title"),"label"),locale:a},Ee=>Ai(Ee&&typeof Ee=="object"&&"size"in Ee?Ee:void 0));D=typeof L=="function"?L:()=>{}},"mountRow"),le=e(()=>{if(D){try{D()}catch{}D=null}},"unmountRow"),re=e(()=>{if(!v)if(l)H(),q();else{if(C?.panelInfo&&typeof C.selectPanel=="function")try{C.panelInfo.getSnapshot().activePanelId===wr&&C.selectPanel(null)}catch{}le(),B()}},"sync"),se=e(async L=>{if(v)return l;let Ee=++x;l=L,re(),N();try{return await o("/sidebar-entry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:L})}),L}catch(Mt){throw Ee===x&&(l=!L,re(),N()),Mt}},"setEnabled"),de=!0,ae=!1,Be=0,he=e(async L=>{if(v||ae)return de;let Ee=++Be;if(de=L,N(),typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(L)}catch{}try{if(await o("/online-update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:L})}),Ee===Be&&typeof s.onOnlineUpdateChange=="function")try{s.onOnlineUpdateChange(L)}catch{}return L}catch(Mt){if(Ee===Be&&(de=!L,N(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(!L)}catch{}throw Mt}},"setOnlineUpdate"),V=!0,mt=0,ft=e(async L=>{if(v)return V;let Ee=++mt;if(V=L,N(),typeof s.onSidebarFavoriteStarChange=="function")try{s.onSidebarFavoriteStarChange(L)}catch{}try{return await o("/sidebar-favorite-star",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:L})}),L}catch(Mt){if(Ee===mt&&(V=!L,N(),typeof s.onSidebarFavoriteStarChange=="function"))try{s.onSidebarFavoriteStarChange(!L)}catch{}throw Mt}},"setSidebarFavoriteStar"),yt=x;o("/sidebar-entry").then(L=>{!v&&x===yt&&L&&typeof L.enabled=="boolean"&&(l=L.enabled,re(),N())}).catch(()=>{});let xt=Be;o("/online-update").then(L=>{if(!v&&Be===xt&&L&&typeof L.enabled=="boolean"&&(de=L.enabled,L.locked===!0&&(ae=!0),N(),typeof s.onOnlineUpdateChange=="function"))try{s.onOnlineUpdateChange(de)}catch{}}).catch(()=>{});let ze=mt;o("/sidebar-favorite-star").then(L=>{if(!v&&mt===ze&&L&&typeof L.enabled=="boolean"&&(V=L.enabled,N(),typeof s.onSidebarFavoriteStarChange=="function"))try{s.onSidebarFavoriteStarChange(V)}catch{}}).catch(()=>{});let It=t;return typeof It.inject=="function"&&It.inject(["layout"],L=>{!v&&L.layout&&(C=L.layout)}),t.slots.inject("main",()=>{if(!v)return g=!0,H(),()=>{g=!1,B()}}),t.slots.inject("sidebar.panellist",()=>{if(!v)return p=!0,q(),()=>{p=!1,le()}}),t.slots.inject("plugins.bundle.config",()=>{if(!v)return t.slots.register({name:"plugins.bundle.config",key:xi,locale:a},L=>L&&L.view==="summary"?null:Ke(Ti,{t:t.locale.bind(a),getEnabled:e(()=>l,"getEnabled"),setSidebar:se,getOnlineUpdateEnabled:e(()=>de,"getOnlineUpdateEnabled"),setOnlineUpdate:he,getOnlineUpdateLocked:e(()=>ae,"getOnlineUpdateLocked"),getSidebarFavoriteStarEnabled:e(()=>V,"getSidebarFavoriteStarEnabled"),setSidebarFavoriteStar:ft,subscribe:e(Ee=>(M.add(Ee),()=>{M.delete(Ee)}),"subscribe")}))}),{isEnabled:e(()=>l,"isEnabled"),isSupported:e(()=>p,"isSupported"),setEnabled:se,isOnlineUpdateEnabled:e(()=>de,"isOnlineUpdateEnabled"),isOnlineUpdateLocked:e(()=>ae,"isOnlineUpdateLocked"),setOnlineUpdate:he,isSidebarFavoriteStarEnabled:e(()=>V,"isSidebarFavoriteStarEnabled"),setSidebarFavoriteStar:ft,destroy:e(()=>{v||(v=!0,x++,Be++,mt++,C=void 0,M.clear(),le(),B())},"destroy")}}e(Sr,"setupSidebarEntry");function kr(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(kr,"checkedId");var _i={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:kr(s.sessionId),favorite:s.favorite}}},Ri={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(kr))]}},safeParse(t){try{return{success:!0,data:this.parse(t)}}catch(s){return{success:!1,error:s}}}};function Xs(){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",_i)}],result:t("FavoriteState",Ri),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}e(Xs,"favoriteInvocations");function xr(t,{days:s,now:o=Date.now(),favorites:b=new Set,currentId:a,pending:l=new Map}){if(!t||!Number.isInteger(s)||s<1||s>36500||b.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 p=typeof t.updatedAt=="number"?t.updatedAt:Date.parse(t.updatedAt??"");return Number.isFinite(p)&&p<=o-s*864e5}e(xr,"idleArchiveCandidate");async function Vn(t,s,{onProgress:o,refresh:b}={}){let a=[...new Set(t.map(kr))],l={requested:a,succeeded:[],skipped:[],failures:[],remaining:[],refreshError:null},p=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");p();for(let g of a){try{(await s(g)?l.succeeded:l.skipped).push(g)}catch(y){l.failures.push({sessionId:g,message:y instanceof Error?y.message:String(y)}),l.remaining.push(g)}p()}try{await b?.()}catch(g){l.refreshError=g instanceof Error?g.message:String(g)}return l}e(Vn,"runSessionBatch");function Qs({workspaces:t,sessions:s,archive:o,restore:b,deleteOne:a,getFavorites:l,refresh:p,currentSessionId:g}){return async(y,D,x={})=>{if(!["archive","restore","undo","delete"].includes(y))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return Vn(D,async v=>{let M=t.getSnapshot().archivedSessionIds.includes(v);if(y==="archive"){if(M||!s.getSnapshot().byId[v])return!1;if(x.idleDays!==void 0){let le=new Set((await l()).favoriteSessionIds),re=s.getSnapshot();if(!xr(re.byId[v],{days:x.idleDays,favorites:le,currentId:g(re),pending:x.getPending?.()??x.pending}))return!1}return await o(v),t.getSnapshot().archivedSessionIds.includes(v)}return M?y==="delete"?(await a(v),!0):!((await b(v))?.archivedSessionIds??t.getSnapshot().archivedSessionIds).includes(v):!1},{onProgress:x.onProgress,refresh:p})}}e(Qs,"createSessionOrganizer");function Ni(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(Ni,"formatBytes");function ea(t,s){let o=t.createElement;function b(l,p){return o(s??(y=>o("button",{type:"button",disabled:y.disabled,onClick:y.onClick},y.children)),{variant:"outline",size:"sm",...p},l)}e(b,"textButton");function a({title:l,failures:p,separator:g}){let[y,D]=t.useState(!1),x=o("ul",null,p.map(v=>o("li",{key:v.sessionId},v.sessionId,g,v.message)));return o(Wn,{title:l,open:y,onToggle:e(()=>D(v=>!v),"onToggle")},x)}return e(a,"FailureDetails"),e(function({t:p,archived:g,busy:y,ready:D,days:x,onDays:v,count:C,onPreview:M,progress:N,result:H,onRetry:B,undoCount:q,onUndo:le,onReload:re,orphanCount:se=0,orphanSizeBytes:de=0,orphanCleaning:ae=!1,onCleanOrphans:Be,cacheCount:he=0,cacheRepair:V,onRebuildCaches:mt,onRetryCaches:ft,onReloadCaches:yt,onDismissCaches:xt}){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}"),(!g||!D)&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},!D&&b(p("organizer.reloadFavorites"),{disabled:y,onClick:re}),!g&&o(t.Fragment,null,o("label",null,p("organizer.idleDays"),o(ws,{min:1,max:36500,value:x===""?null:Number(x),disabled:y,"aria-label":p("organizer.idleDays"),onChange:e(ze=>v(ze==null?"":String(ze)),"onChange")})),b(p("organizer.preview",{n:C}),{disabled:y||!D||C===0,onClick:M}))),!g&&o("p",null,p("organizer.rules"))),se>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,p("organizer.orphanTitle",{n:se})),Be&&b(p(ae?"organizer.cleaning":"organizer.cleanOrphans"),{disabled:y||ae,onClick:Be})),o("p",null,p("organizer.orphanDesc",{size:Ni(de)}))),he>0&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},o("strong",null,p("organizer.cacheTitle",{n:he})),mt&&b(p(V?.busy?"organizer.cacheRebuilding":"organizer.cacheRebuild"),{disabled:y||V?.busy,onClick:mt})),o("p",null,p("organizer.cacheDesc"))),V&&(V.result||V.progress||V.error||V.refreshError)&&o("section",{className:"dsham_batchFeedback","aria-label":p("organizer.cacheRebuild")},V.progress&&o("div",{role:"status"},o("progress",{value:V.progress.done,max:Math.max(1,V.progress.total)}),p("organizer.progressCount",V.progress)),V.result&&o("div",{role:"status"},o("p",null,p("organizer.result",{succeeded:V.result.rebuiltSessionIds.length,skipped:V.result.skippedSessionIds.length,failed:V.result.failures.length})),V.result.failures.length>0&&o(a,{title:p("organizer.failureDetails"),failures:V.result.failures,separator:p("common.separator")}),V.result.failures.length>0&&ft&&b(p("organizer.cacheRetry",{n:V.result.failures.length}),{disabled:y||V.busy,onClick:ft})),V.error&&o("p",{role:"alert"},p("organizer.cacheError",{detail:V.error})),V.refreshError&&o("p",{role:"alert"},p("organizer.refreshError",{detail:V.refreshError})),o("div",{className:"dsham_organizerControls"},yt&&b(p("organizer.cacheCheck"),{disabled:y||V.busy,onClick:yt}),xt&&b(p("organizer.dismiss"),{disabled:y||V.busy,onClick:xt}))),(N||H||q>0)&&o("section",{className:"dsham_batchFeedback","aria-label":p("organizer.feedback")},N&&o("div",{role:"status","aria-live":"polite"},o("progress",{value:N.done,max:Math.max(1,N.total),"aria-label":p("organizer.progress")}),p("organizer.progressCount",{done:N.done,total:N.total})),H&&o("div",{role:"status"},o("strong",null,p(`organizer.${H.kind??"archive"}Result`)),o("p",null,p("organizer.result",{succeeded:H.succeeded.length,skipped:H.skipped.length,failed:H.failures.length})),H.failures.length>0&&o(a,{title:p("organizer.failureDetails"),failures:H.failures,separator:p("common.separator")}),H.refreshError&&o("p",{role:"alert"},p("organizer.refreshError",{detail:H.refreshError})),H.remaining.length>0&&b(p("organizer.retry",{n:H.remaining.length}),{disabled:y,onClick:B})),q>0&&o("div",{className:"dsham_organizerControls"},b(p("organizer.undo",{n:q}),{disabled:y,onClick:le}),o("p",null,p("organizer.undoHint")))))},"OrganizerPanel")}e(ea,"createOrganizerPanel");var ta={"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"},na={"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."},ra={"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 dn=Function("return globalThis.__dshArchiveReactDOM")(),sa=Function("return globalThis.__dshArchiveReactDOMClient")(),aa=dn.createPortal,tl=dn.flushSync,nl=sa?.createRoot,rl=sa?.hydrateRoot,sl=dn.findDOMNode,al=dn.unmountComponentAtNode,il=dn.unstable_batchedUpdates,ol=dn.version;function ji(t){var s={exports:{}},o=s.exports;Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});let b=t("@deepseek-ai/dsh-client-store"),a=t("react/jsx-runtime"),l=t("react"),p=t("react-dom"),g=t("@deepseek-ai/dsh-client-ui-primitives");function y({open:n,onClose:r,title:i,description:d,footer:m,children:u,className:S,width:k,portalToBody:A=!1,closeLabel:P,t:I}){let R=l.useRef(null),F=l.useCallback(()=>R.current?.closest(".dsham_settings")??document.body,[]),[h,ge]=l.useState(null);l.useEffect(()=>{if(!n){ge(null);return}ge(A?typeof document<"u"?document.body:null:F())},[n,F,A]),l.useEffect(()=>{if(!n)return;let ot=e(Xe=>{Xe.key==="Escape"&&(Xe.preventDefault(),Xe.stopPropagation(),"stopImmediatePropagation"in Xe&&typeof Xe.stopImmediatePropagation=="function"&&Xe.stopImmediatePropagation(),r())},"onKey");return window.addEventListener("keydown",ot,!0),()=>window.removeEventListener("keydown",ot,!0)},[n,r]);let _e=P||I("common.close"),ce=(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:ua("dsham_modalDialog",S),style:{width:k??560},children:[(0,a.jsxs)("div",{className:"dsham_modalHeader",children:[(0,a.jsx)("h2",{title:typeof i=="string"?i:void 0,children:i}),(0,a.jsx)("button",{type:"button",className:"dsham_modalClose",onClick:r,"aria-label":_e,title:_e,children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M3.5 3.5l9 9M12.5 3.5l-9 9"})})})]}),d!=null&&(0,a.jsx)("p",{children:d}),u!=null&&(0,a.jsx)("div",{className:"dsham_modalBody",children:u}),m!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:m})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{refObject:R,getContainer:F}),n&&h?aa(ce,h):null]})}e(y,"SettingsModal");function D({refObject:n,getContainer:r}){return(0,a.jsx)("span",{hidden:!0,ref:n,"data-get-container":r})}e(D,"SettingsModalAnchor");function x({variant:n="outline",icon:r,children:i,className:d,disabled:m,title:u,onClick:S,"aria-label":k,"aria-pressed":A,"aria-expanded":P,"aria-haspopup":I}){return(0,a.jsx)(g.Button,{variant:n,size:"sm",className:d,disabled:m,title:u,onClick:S,"aria-label":k,"aria-pressed":A,"aria-expanded":P,"aria-haspopup":I,icon:r,children:i})}e(x,"settingsButton");function v({variant:n="outline",danger:r=!1,disabled:i,onClick:d,children:m}){return(0,a.jsx)(g.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 M=ea(l,g.Button),{HighlightedText:N,useArchiveSearch:H,useArchivePreview:B,DiscoveryFilters:q,SearchStatus:le,PreviewContent:re}=Rs(l,{Button:g.Button,SegmentedControl:g.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 de(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(de,"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}},Be={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}},he={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}},V={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")}},mt={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}},ft={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}},yt={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}}},xt={parse(n){let r=ne(n);if(!r||r.ok!==!0)throw new TypeError("session move result must be ok: true");return r}};function ze(n,r){return{mode:"strict",typeSymbol:n,create:e(()=>r,"create"),schema:r}}e(ze,"strictCodec");let It={package:"@michengai/dsh-archive-manager",descriptors:[...Xs(),...As(),...Os(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:ze("@deepseek-ai/dsh-session/types#SessionId",ae)}],result:ze("@michengai/dsh-archive-manager/types#ArchivedSessionIds",Be),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:ze("@deepseek-ai/dsh-session/types#SessionId",ae)}],result:ze("@michengai/dsh-archive-manager/types#Deleted",he),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:ze("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",V)}],result:ze("@michengai/dsh-archive-manager/types#DeletedBatch",mt),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:ze("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",ft),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:ze("@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:ze("@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:ze("@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:ze("@michengai/dsh-archive-manager/types#SessionMoveInput",yt)}],result:ze("@michengai/dsh-archive-manager/types#SessionMoveResult",xt),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]};function L(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(L,"ensurePluginStyle");function Ee(n){if(typeof document>"u")return;document.querySelector("style[data-plugin-css="+JSON.stringify(n)+"]")?.remove()}e(Ee,"removePluginStyle"),L("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)}"),L("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}"),L("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%));backdrop-filter:var(--dsw-mask-blur,blur(16px));-webkit-backdrop-filter:var(--dsw-mask-blur,blur(16px))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;box-sizing:border-box;max-width:calc(100vw - 48px);max-height:min(85vh,760px);padding:22px 24px 20px;overflow:hidden;border:1px solid var(--dsw-alias-border-l1,rgba(128,128,128,.2));border-radius:var(--dsw-radius-panel,28px);background-color:var(--dsw-alias-surface-overlay,var(--dsw-alias-bg-base,Canvas));background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-surface-overlay,Canvas));backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));-webkit-backdrop-filter:var(--dsw-menu-backdrop-filter,blur(40px) saturate(150%));color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}.dsham_modalHeader h2,.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--dsw-alias-label-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.dsham_modalClose{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:28px;height:28px;padding:0;border:none;border-radius:var(--dsw-radius-sm,6px);background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer;flex:none;transition:background-color .15s ease,color .15s ease}.dsham_modalClose:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.dsham_modalClose svg{display:block;width:14px;height:14px}.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}.dsham_modalWide{width:min(900px,calc(100vw - 48px))!important;max-height:min(88vh,820px)!important}.dsham_modalWide .dsham_modalBody{overflow:hidden}.dsham_modalWide .dsham_previewMessages{max-height:none;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}"),L("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}"),L("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 Ve="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 Kt(n){return n?'<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="'+Ve+'"/></svg>':'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round" aria-hidden="true"><path d="'+Ve+'"/></svg>'}e(Kt,"starSvg");function cn(n){return!!n?.querySelector("[data-state]")}e(cn,"resolveRowHasStatus");let Rn="[data-row-key^='session:']{position:relative}.dsham_starSlot{display:none;position:absolute;left:calc(8px + var(--dsh-workspace-indent,0px));inset-inline-start:calc(8px + var(--dsh-workspace-indent,0px));top:50%;transform:translateY(-50%);align-items:center;justify-content:center;box-sizing:border-box;width:16px;height:20px;z-index:1;pointer-events:none}[data-row-key^='session:']:hover .dsham_starSlot,.dsham_starSlot[data-favorited='true']{display:inline-flex;pointer-events:auto}[data-row-key^='session:']:hover>span:first-child:not(:has([data-state])),[data-row-key^='session:'][data-dsham-favorited='true']:not([data-dsham-has-status='true'])>span:first-child:not(:has([data-state])){opacity:0}[data-row-key^='session:'][data-dsham-has-status='true']>span:first-child,[data-row-key^='session:']>span:first-child:has([data-state]){opacity:1}[data-row-key^='session:'][data-dsham-has-status='true'] .dsham_starSlot,[data-row-key^='session:']:has(>span:first-child [data-state]) .dsham_starSlot{width:10px;height:10px;top:auto;bottom:3px;left:calc(15px + var(--dsh-workspace-indent,0px));inset-inline-start:calc(15px + var(--dsh-workspace-indent,0px));transform:none}[data-row-key^='session:'][data-dsham-has-status='true'] .dsham_rowStar,[data-row-key^='session:']:has(>span:first-child [data-state]) .dsham_rowStar{width:10px;height:10px}[data-row-key^='session:'][data-dsham-has-status='true'] .dsham_rowStar svg,[data-row-key^='session:']:has(>span:first-child [data-state]) .dsham_rowStar svg{width:10px;height:10px;filter:drop-shadow(0 0 1px rgba(0,0,0,0.85))}.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:16px;height:16px;flex:none}";L("dsh-archive-manager/RowFavorite.css",Rn);let zt="dsh-archive-manager:workspace-favorites-only",Ot="data-dsham-favorites-hidden",X="data-dsham-favorites-only",Le="dsham_rowStar",at="dsham_starSlot",un=["\u4EC5\u663E\u793A\u5DF2\u5F52\u6863","Archived only","\u0422\u043E\u043B\u044C\u043A\u043E \u0430\u0440\u0445\u0438\u0432\u043D\u044B\u0435"];L("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 ia(){try{return window.localStorage.getItem(zt)==="1"}catch{return!1}}e(ia,"readWorkspaceFavoritesOnly");function oa(n){try{window.localStorage.setItem(zt,n?"1":"0")}catch{}}e(oa,"writeWorkspaceFavoritesOnly");function Er(n,r){let i=e(u=>r.favorites.has(u)||r.sessions?.[u]?.blank===!0,"visibleSession"),d=new Map,m=null;for(let u of n){if(u.startsWith("workspace:")){m=u,d.set(u,!1);continue}u.startsWith("session:")&&m!==null&&i(u.slice(8))&&d.set(m,!0)}return n.map(u=>u.startsWith("session:")?i(u.slice(8)):u.startsWith("workspace:")?d.get(u)===!0||r.groupHasFavorite?.(u.slice(10))===!0:!u.startsWith("overflow:"))}e(Er,"favoritesOnlyVisibility");function Ar(n,r){let i=new Map,d=new Set;for(let u of r){let S=!1;for(let k of u.sessionIds)d.add(k),n.has(k)&&(S=!0);i.set(u.workspaceId,S)}let m=!1;for(let u of n)if(!d.has(u)){m=!0;break}return u=>u===""||u==="ungrouped"?m:i.get(u)===!0}e(Ar,"favoriteGroupPredicate");function Ir(n,r,i,d){let m={dispose:e(()=>{},"dispose"),setFavoriteStarEnabled:e(W=>{},"setFavoriteStarEnabled"),isFavoriteStarEnabled:e(()=>!0,"isFavoriteStarEnabled")};if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return m;let u=ia(),S=typeof d=="function"?d():!0,k=!1,A=!1,P=e(()=>{S?L("dsh-archive-manager/RowFavorite.css",Rn):Ee("dsh-archive-manager/RowFavorite.css")},"updateStarStyle");P();let I=e(W=>{let De=W;typeof De?.detail?.enabled=="boolean"?S=De.detail.enabled:typeof d=="function"&&(S=d()),P(),Ye()},"onStarToggle");typeof window<"u"&&typeof window.addEventListener=="function"&&window.addEventListener("dsham-favorite-star-toggle",I);let R=0,F=200,h=null,ge=new Set,_e=e(W=>{if(!S){for(let J of W)Array.from(J.children).find(Ue=>Ue.classList.contains(at))?.remove(),J.removeAttribute("data-dsham-favorited"),J.removeAttribute("data-dsham-has-status");return}let De=r.getSnapshot();for(let J of W){let K=J.getAttribute("data-row-key")??"";if(!K.startsWith("session:"))continue;let Ue=K.slice(8),rt=Array.from(J.children).find(Qe=>Qe.tagName==="SPAN"&&Array.from(Qe.classList).some(Tt=>Tt==="slot"||Tt.endsWith("_slot")))??null;if(rt===null){J.removeAttribute("data-dsham-has-status");continue}let O=Array.from(J.children).find(Qe=>Qe.classList.contains(at))??null;if(!De.ready){O?.remove(),J.removeAttribute("data-dsham-favorited"),J.removeAttribute("data-dsham-has-status");continue}O!==null&&(O.parentElement!==J||O.nextElementSibling!==null)&&J.appendChild(O),O===null&&(O=document.createElement("span"),O.className=at,J.appendChild(O)),O.dataset.sessionId=Ue,cn(rt)?J.setAttribute("data-dsham-has-status","true"):J.removeAttribute("data-dsham-has-status");let Ae=O.querySelector("."+Le);Ae===null&&(Ae=document.createElement("button"),Ae.type="button",Ae.className=Le,Ae.addEventListener("click",Qe=>{Qe.preventDefault(),Qe.stopPropagation(),r.toggle(O?.dataset.sessionId??"")}),O.appendChild(Ae));let Ze=De.ids.has(Ue);if(Ze?J.setAttribute("data-dsham-favorited","true"):J.removeAttribute("data-dsham-favorited"),O.dataset.favorited===String(Ze))continue;let dt=i()(Ze?"organizer.unfavorite":"organizer.favorite");O.dataset.favorited=String(Ze),Ae.setAttribute("aria-pressed",String(Ze)),Ae.setAttribute("aria-label",dt),Ae.title=dt,Ae.innerHTML=Kt(Ze)}},"ensureRowStars"),ce=e(W=>{let De=r.getSnapshot();if(!u||!De.ready){for(let O of W)O.hasAttribute(Ot)&&O.removeAttribute(Ot);R=0,h=null,ge.clear();return}let J=W.map(O=>O.getAttribute("data-row-key")??""),K=Ar(De.ids,n.workspaces.list?.getSnapshot?.()?.items??[]),Ue=Er(J,{favorites:De.ids,sessions:n.sessions.list?.getSnapshot?.()?.byId,groupHasFavorite:K});h!==null&&(W.length<=h.rows&&ge.add(h.key),h=null);let rt=!1;if(R<F)for(let O=0;O<W.length;O+=1){let Re=W[O],Ae=J[O];if(!Ae.startsWith("overflow:")||Re.getAttribute("aria-expanded")!=="false")continue;let Ze=Ae.slice(9);if(!(ge.has(Ze)||!K(Ze))){try{Re.click(),R+=1,h={key:Ze,rows:W.length},rt=!0}catch(dt){console.warn("archive-manager: favorites-only expand failed",dt)}break}}for(let O=0;O<W.length;O+=1){let Re=W[O];Ue[O]?Re.hasAttribute(Ot)&&Re.removeAttribute(Ot):Re.setAttribute(Ot,"true")}rt&&Ye()},"applyVisibility"),ot=e(W=>{let De=W.parentElement;if(De===null)return null;let J=De.cloneNode(!0),K=J.querySelector('button[role="menuitem"]');if(K===null)return null;let Ue=Array.from(K.querySelectorAll("span")),rt=Ue[0]??null,O=Ue[Ue.length-1]??null;rt!==null&&(rt.innerHTML=Kt(!1)),O!==null&&(O.textContent=i()("organizer.favoritesOnly"));for(let Re of Array.from(K.querySelectorAll("svg")))Re.closest("span")===null&&Re.remove();return K.setAttribute(X,"true"),K.setAttribute("role","menuitemcheckbox"),K.dataset.active=String(u),K.setAttribute("aria-checked",String(u)),K.setAttribute("aria-label",i()("organizer.favoritesOnly")),K.onclick=Re=>{Re.preventDefault(),Re.stopPropagation(),ee(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0}))},J},"buildMenuRow"),Xe=e(()=>{if(!k){for(let W of Array.from(document.querySelectorAll("button["+X+"]")))W.dataset.active=String(u),W.setAttribute("aria-checked",String(u));for(let W of Array.from(document.querySelectorAll('[role="menu"]'))){let De=Array.from(W.querySelectorAll('button[role="menuitem"]')).find(Ue=>un.some(rt=>(Ue.textContent??"").includes(rt)));if(De===void 0||W.querySelector("["+X+"]")!==null)continue;let J=De.parentElement;if(J===null)continue;let K=ot(De);K!==null&&J.parentElement?.insertBefore(K,J.nextSibling)}}},"injectMenuRows"),Ye=e(()=>{if(A||k)return;A=!0;let W=e(()=>{if(A=!1,k)return;let De=Array.from(document.querySelectorAll("[data-row-key]"));Xe(),_e(De),ce(De),r.getSnapshot().ready||en()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(W):setTimeout(W,16)},"schedulePass"),ee=e(()=>{u=!u,nt=20,R=0,h=null,ge.clear(),oa(u),Ye()},"toggle"),pe=null,nt=20,en=e(()=>{pe!==null||k||nt<=0||(nt-=1,pe=setTimeout(()=>{pe=null,r.ensure(),Ye()},600))},"scheduleRetry"),wt=new MutationObserver(W=>{On(W,'[data-row-key], [role="menu"]')&&Ye()});wt.observe(document.body,{childList:!0,subtree:!0}),r.ensure().catch(()=>{});let Ct=[r.subscribe(()=>Ye()),typeof n.sessions.list?.subscribe=="function"?n.sessions.list.subscribe(()=>Ye()):null,typeof n.workspaces.list?.subscribe=="function"?n.workspaces.list.subscribe(()=>Ye()):null].filter(W=>typeof W=="function");return Ye(),{dispose(){k=!0,typeof window<"u"&&typeof window.removeEventListener=="function"&&window.removeEventListener("dsham-favorite-star-toggle",I),wt.disconnect();for(let W of Ct)W();for(let W of Array.from(document.querySelectorAll("["+Ot+"]")))W.removeAttribute(Ot);for(let W of Array.from(document.querySelectorAll("["+X+"]")))W.parentElement?.remove();for(let W of Array.from(document.querySelectorAll("."+at)))W.remove();for(let W of Array.from(document.querySelectorAll("[data-dsham-favorited]")))W.removeAttribute("data-dsham-favorited");for(let W of Array.from(document.querySelectorAll("[data-dsham-has-status]")))W.removeAttribute("data-dsham-has-status");pe!==null&&(clearTimeout(pe),pe=null)},setFavoriteStarEnabled(W){S=W,P(),Ye()},isFavoriteStarEnabled:e(()=>S,"isFavoriteStarEnabled")}}e(Ir,"setupWorkspaceFavoritesOnly");function Tr(){let n,r={ready:!1,ids:new Set,pending:new Set},i,d=0,m=new Set,u=e(k=>{r=k;for(let A of m)try{A()}catch(P){console.warn("archive-manager: favorite listener failed",P)}},"publish"),S=e((k,A)=>{let P=new Set(k);for(let h of r.pending)h!==A&&(r.ids.has(h)?P.add(h):P.delete(h));let I=new Set(r.pending);A!==void 0?I.delete(A):r.pending.size===0&&I.clear();let R=r.ids.size===P.size&&[...P].every(h=>r.ids.has(h)),F=r.pending.size===I.size&&[...I].every(h=>r.pending.has(h));R&&F&&r.ready||u({ready:!0,ids:P,pending:I})},"adopt");return{bind(k){n=k},subscribe(k){return m.add(k),()=>{m.delete(k)}},getSnapshot:e(()=>r,"getSnapshot"),adopt:e(k=>S(k),"adopt"),ensure(){return n===void 0||r.ready?Promise.resolve():i!==void 0?i:Date.now()<d?Promise.resolve():(i=n.favoriteSessions().then(k=>{S(k.favoriteSessionIds)}).catch(k=>{console.warn("archive-manager: load favorites failed, will retry",k),d=Date.now()+600}).finally(()=>{i=void 0}),i)},async toggle(k){if(n===void 0||!r.ready||r.pending.has(k))return;let A=r.ids.has(k),P=!A,I=new Set(r.ids);P?I.add(k):I.delete(k);let R=new Set(r.pending);R.add(k),u({ready:!0,ids:I,pending:R});try{let F=await n.setSessionFavorite({sessionId:k,favorite:P});if(!Array.isArray(F?.favoriteSessionIds))throw new TypeError("favorite response is missing favoriteSessionIds");S(F.favoriteSessionIds,k)}catch(F){console.warn("archive-manager: sidebar favorite toggle failed",F);let h=new Set(r.ids);A?h.add(k):h.delete(k);let ge=new Set(r.pending);ge.delete(k),u({ready:!0,ids:h,pending:ge})}}}}e(Tr,"createFavoriteRowStore");function Nn(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 u=r.get(m.parentId);u===void 0?r.set(m.parentId,{count:1,runningCount:i.running?1:0}):(u.count+=1,i.running&&(u.runningCount+=1)),m=n[m.parentId]}}return r}e(Nn,"indexSubagentDescendants");let zi="__flat_session_order__",jn="dsh.archive-manager.workspace.view.v1",_r="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(jn)!=null)return!1;let i=r.getItem(_r);return i==null?!1:(r.setItem(jn,i),!0)}catch{return!1}}e(Rr,"migrateWorkspaceViewPersist");function la(){return Rr(),(0,b.defineStore)({init:e(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:jn,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(la,"createWorkspaceViewStore");function da(){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(da,"GithubMark16");function ca(){let n=g.IconEditOutlineRegular;return(0,a.jsx)(n,{size:16})}e(ca,"FeedbackIcon");function Gn({archiveSessions:n,archiveSession:r,sessionStore:i,workspaceStore:d,unarchiveSession:m,deleteSession:u,unarchiveSessions:S,deleteArchivedSessions:k,archivedSessionMetadata:A,openConversation:P,focusSessionWorkspace:I,viewState:R,close:F,t:h,diagnoseOrphanSubagents:ge,cleanOrphanSubagents:_e,diagnoseSessionCaches:ce,rebuildSessionCaches:ot,refreshCacheLists:Xe,searchSessionContent:Ye,searchArchivedContent:ee,previewArchivedSession:pe,favoriteSessions:nt,setSessionFavorite:en,favoriteSync:wt,organizeBatch:Ct,useSessionPendingInteraction:W,useSessionStatus:De}){let J=(0,l.useSyncExternalStore)(i.subscribe,i.getSnapshot),K=(0,l.useSyncExternalStore)(d.subscribe,d.getSnapshot),[Ue,rt]=(0,l.useState)("archived"),O=Ue==="archived",[Re,Ae]=(0,l.useState)(null),[Ze,dt]=(0,l.useState)(null),[Qe,Tt]=(0,l.useState)(null),Lt=e((c,E=null)=>{G(null),$e(null),xe(!1),dt(E),Ae(c)},"requestArchive"),Yt=e(()=>{Z||(Ae(null),dt(null),G(null))},"closeArchive"),Et=(0,l.useRef)(!1),[Ne,Ut]=(0,l.useState)(null),mn=(0,l.useRef)(!1),[Z,Ge]=(0,l.useState)(!1),[St,G]=(0,l.useState)(null),[Ln,$e]=(0,l.useState)(null),tn=e(c=>{G(null),$e(null),Ut(c)},"requestDelete"),[_t,fn]=(0,l.useState)(R?.query??""),[pt,Ht]=(0,l.useState)(R?.project??"all"),[Rt,gn]=(0,l.useState)(R?.sortBy??"updated"),[vn,bn]=(0,l.useState)({}),[Wt,yn]=(0,l.useState)(()=>new Set),Nt=(0,l.useRef)(new Set),[gt,vt]=(0,l.useState)([]),[f,w]=(0,l.useState)([]),[T,$]=(0,l.useState)(!1),[Ie,ue]=(0,l.useState)(!1),Me=(0,l.useRef)(!1),[je,ve]=(0,l.useState)(!1),[He,et]=l.useState("content"),[ct,bt]=l.useState(""),[te,ie]=l.useState(""),[z,oe]=(0,l.useState)(()=>new Set),[Te,ke]=(0,l.useState)("30"),[tt,xe]=(0,l.useState)(!1),[be,ye]=(0,l.useState)(null),[Ce,Q]=(0,l.useState)(null),[Oe,kt]=(0,l.useState)([]),Pe=(0,l.useRef)(!1),st=(0,l.useRef)(null),me=wa(W??va,De??ba,typeof De=="function"),Ft=(0,l.useRef)(me.pending);Ft.current=me.pending;let ut=(0,l.useMemo)(()=>new Set(f),[f]),nn=e(async()=>{if(nt)try{let c=await nt();w(c.favoriteSessionIds),$(!0),wt?.adopt(c.favoriteSessionIds)}catch(c){$(!1),G(qe(c))}},"loadFavorites");(0,l.useEffect)(()=>{let c=!0;return nt&&nt().then(E=>{c&&(w(E.favoriteSessionIds),$(!0),wt?.adopt(E.favoriteSessionIds))}).catch(E=>{c&&G(qe(E))}),()=>{c=!1}},[nt]),(0,l.useEffect)(()=>{if(wt)return wt.subscribe(()=>{let c=wt.getSnapshot();c.ready&&(w([...c.ids]),$(!0))})},[wt]);let wn=e(async c=>{if(!(Me.current||Z||!T)){Me.current=!0,ue(!0),G(null);try{let E=await en({sessionId:c,favorite:!ut.has(c)});w(E.favoriteSessionIds),wt?.adopt(E.favoriteSessionIds)}catch(E){G(qe(E))}finally{Me.current=!1,ue(!1)}}},"toggleFavorite"),We=e(async(c,E,{idle:Y=!1,retry:we=!1}={})=>{if(!(Pe.current||Me.current||Nt.current.size>0||!Ct)){Pe.current=!0,Ge(!0),G(null),$e(null),Q(null),c==="archive"&&!we&&kt([]);try{let j=await Ct(c,E,{idleDays:Y?Number(Te):void 0,getPending:e(()=>Ft.current,"getPending"),onProgress:e(Se=>{ye(Se),c==="archive"&&Se.total>0&&Se.done>=Se.total&&(Ae(null),dt(null),xe(!1))},"onProgress")});return Q({...j,kind:c,tab:Ue}),st.current=j.remaining.length?{kind:c,ids:j.remaining,idle:Y}:null,c==="archive"&&kt(Se=>[...new Set([...Se,...j.succeeded])]),(c==="undo"||c==="restore"||c==="delete")&&kt(Se=>Se.filter(ht=>!j.succeeded.includes(ht)&&!j.skipped.includes(ht))),vt(Se=>Se.filter(ht=>!j.succeeded.includes(ht)&&!j.skipped.includes(ht))),c==="delete"&&w(Se=>Se.filter(ht=>!j.succeeded.includes(ht))),j}catch(j){G(qe(j))}finally{Pe.current=!1,Ge(!1),ye(null)}}},"executeBatch"),[lt,rn]=(0,l.useState)(null),[sn,Sn]=(0,l.useState)({diagnosis:{count:0,items:[]},busy:!1,progress:null,result:null,error:null,refreshError:null}),Fe=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!ce||!ot||!Xe)return;let c=Ps({diagnose:ce,rebuild:ot,refresh:Xe});Fe.current=c;let E=c.subscribe(()=>{Sn(c.snapshot())});return c.load(),()=>{E(),c.dispose(),Fe.current=null}},[ce,ot,Xe]),(0,l.useEffect)(()=>{Fe.current?.snapshot().busy||Fe.current?.load()},[K.archivedSessionIds]);let Zt=e(async(c=!1)=>{if(!(Z||Pe.current||!Fe.current||Fe.current.snapshot().busy)){Pe.current=!0,Ge(!0);try{await Fe.current.run(c)}finally{Pe.current=!1,jt.current&&Ge(!1)}}},"runCacheRebuild"),[an,qt]=(0,l.useState)(!1),Jt=e(()=>{typeof ge=="function"&&ge().then(rn).catch(c=>{console.warn("archive-manager: diagnose orphan subagents failed",c)})},"loadOrphans");(0,l.useEffect)(()=>{Jt()},[K.archivedSessionIds]);let Ua=e(async()=>{if(!(an||typeof _e!="function")){qt(!0),G(null),$e(null);try{let c=await _e({});(c.cleanedSessionIds.length>0||c.skippedSessionIds.length>0)&&Jt(),c.failures.length>0?($e(null),G(Mn(c.failures,h))):c.cleanedSessionIds.length>0&&(G(null),$e(h("organizer.orphanCleanSuccess",{n:c.cleanedSessionIds.length})))}catch(c){G(qe(c))}finally{qt(!1)}}},"cleanOrphans"),jt=(0,l.useRef)(!0),ir=(0,l.useRef)(!1);(0,l.useEffect)(()=>(jt.current=!0,()=>{jt.current=!1}),[]);let Fn=e(async(c,E=!1)=>{if(Z||ir.current)return;ir.current=!0,Ge(!0),G(null);let Y=!1;try{await Fs({prepare:E?async we=>{await I?.(we)}:void 0,restore:e(async we=>{await m(we),Y=!0},"restore"),open:e(async we=>{await P(we),jt.current&&F?.()},"open")},c.id,E,()=>jt.current)}catch(we){if(!jt.current)return;if(Y){rt("unarchived");let j=Vt.find(Se=>Se.sessions.some(ht=>ht.id===c.id));j!==void 0&&Ht(j.key)}G(Ls(we,h))}finally{ir.current=!1,jt.current&&Ge(!1)}},"viewConversation");(0,l.useEffect)(()=>{R&&Object.assign(R,{query:_t,project:pt,sortBy:Rt})},[_t,pt,Rt,R]);let Bn=(0,l.useMemo)(()=>O?K.archivedSessionIds:es(J.byId,K.archivedSessionIds),[O,J.byId,K.archivedSessionIds]),Vt=(0,l.useMemo)(()=>ts(J.byId,K.items,Bn,h("group.ungrouped")),[J.byId,K,Bn,h]),Ha=e(c=>{Z||Nt.current.size>0||(At.close(),rt(c),vt([]),Ae(null),dt(null),G(null),$e(null),Ht("all"),fn(""),c!=="archived"&&Rt==="archived"&&gn("updated"))},"switchTab"),os=e(async(c,E=!1)=>{if(!(Et.current||Z||!c?.length)){if(Ct){Et.current=!0;try{let Y=await We("archive",c,{idle:E}),we=Y?.failures.map(j=>zr(j.sessionId,j.message)).find(j=>j!==void 0);if(we!==void 0&&typeof r=="function"){let j=J.byId[we.sessionId];Tt({sessionId:we.sessionId,title:j===void 0?we.sessionId:it(j,h),kinds:we.kinds.join(", ")}),Ae(null),dt(null),G(null);return}Y&&(Ae(null),dt(null),xe(!1))}finally{Et.current=!1}return}Et.current=!0,Ge(!0),G(null),$e(null);try{let Y=await n(c);Ae(null),dt(null),Y.archivedSessionIdsAdded.length>0&&$e(h("archives.archiveSuccess",{n:Y.archivedSessionIdsAdded.length})),Y.failures&&Y.failures.length>0?G(Mn(Y.failures,h)):(vt([]),rt("archived"),Ht("all"),fn(""))}catch(Y){let we=Mr(Y);if(we!==void 0&&typeof r=="function"){let j=J.byId[we.sessionId];Tt({sessionId:we.sessionId,title:j===void 0?we.sessionId:it(j,h),kinds:we.kinds.join(", ")}),Ae(null),dt(null),G(null)}else{let j=zn(Y);G(j===void 0?h("archives.archiveBatchFailed",{detail:Y instanceof Error?Y.message:String(Y)}):h("archives.archiveActive",{kinds:j.join(", ")}))}}finally{Et.current=!1,Ge(!1)}}},"performArchive"),Wa=e(()=>os(Re,tt),"confirmArchive"),qa=e(async c=>{G(null),$e(null);try{await fr(c.id),jt.current&&$e(h("details.copied"))}catch(E){jt.current&&G(typeof Hn(E)=="string"&&String(Hn(E)).startsWith("copy.")?h(String(Hn(E))):qe(E))}},"copyId"),or=(0,l.useMemo)(()=>ns(Vt,Rt,vn,h,O?K.archivedSessionIds:void 0),[Vt,Rt,vn,h,O,K.archivedSessionIds]);(0,l.useEffect)(()=>{if(Z)return;let c=!1;return A().then(E=>{c||bn(Object.fromEntries(E.items.map(Y=>[Y.sessionId,Y.createdAt])))}).catch(()=>{c||bn({})}),()=>{c=!0}},[A,K.archivedSessionIds,Z]),(0,l.useEffect)(()=>{pt!=="all"&&!Vt.some(c=>c.key===pt)&&Ht("all")},[Vt,pt]);let ls=!gr(ct,te),ds=or.filter(c=>pt==="all"||pt===c.key).map(c=>({...c,sessions:c.sessions.filter(E=>(!je||ut.has(E.id))&&Ts(E.updatedAt,ct,te))})).filter(c=>c.sessions.length),lr=He==="content"&&!ls,kn=H(ds.flatMap(c=>c.sessions.map(E=>E.id)),_t,lr,Ye??ee),dr=new Map(kn.items.map(c=>[c.sessionId,c])),At=B(pe,O?K.archivedSessionIds:[]),cs=_t.trim().toLocaleLowerCase(),xn=ds.map(c=>({...c,sessions:c.sessions.filter(E=>!cs||it(E,h).toLocaleLowerCase().includes(cs)||dr.has(E.id))})).filter(c=>c.sessions.length),us=T?xn.flatMap(c=>c.sessions).filter(c=>xr(c,{days:Number(Te),favorites:ut,currentId:Dt(J),pending:me.pending})).map(c=>c.id):[],Cn=(0,l.useMemo)(()=>Jr(xn),[xn]),cr=(0,l.useMemo)(()=>new Set(gt),[gt]),Va=(0,l.useMemo)(()=>{let c=new Set(K.archivedSessionIds);return Oe.reduce((E,Y)=>E+(c.has(Y)?1:0),0)},[Oe,K.archivedSessionIds]),ur=Cn.filter(c=>cr.has(c)).length,Ga=Cn.length>0&&ur===Cn.length;(0,l.useEffect)(()=>{vt(c=>Xr(c,Bn))},[Bn]);let $a=e((c,E)=>{vt(Y=>rr(Y,[c],E))},"toggleSessionSelection"),Ka=e(c=>{vt(E=>rr(E,Cn,c))},"toggleVisibleSelection"),Ya=e(c=>{Z||Nt.current.has(c)||(Nt.current.add(c),yn(new Set(Nt.current)),G(null),$e(null),m(c).catch(E=>{G(jr(E,h))}).finally(()=>{Nt.current.delete(c),yn(new Set(Nt.current))}))},"onUnarchive"),hs=e(async c=>{if(!Z){if(Ct){let E=pn(K.archivedSessionIds,K.items,c),Y=await We("restore",E);return Y&&{unarchivedSessionIds:Y.succeeded}}Ge(!0),G(null),$e(null);try{let E=await S(c);return E.unarchivedSessionIds.length>0&&$e(h("archives.restoreSuccess",{n:E.unarchivedSessionIds.length})),E.failures&&E.failures.length>0&&G(Mn(E.failures,h,jr)),E}catch(E){G(h("archives.restoreBatchFailed",{detail:E instanceof Error?E.message:String(E)}))}finally{Ge(!1)}}},"onBatchUnarchive"),Za=e(async()=>{if(gt.length===0)return;let c=await hs({scope:"sessions",sessionIds:gt});if(c!==void 0){let E=new Set(c.unarchivedSessionIds);vt(Y=>Y.filter(we=>!E.has(we)))}},"onSelectedUnarchive"),ps=e(()=>{Z||Ut(null)},"closeDelete");(0,l.useEffect)(()=>{if(Ne===null)return;let c=e(E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),"stopImmediatePropagation"in E&&typeof E.stopImmediatePropagation=="function"&&E.stopImmediatePropagation(),Z||Ut(null))},"onKeyDown");return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[Ne,Z]);let Ja=e(async()=>{if(Z||mn.current||Ne===null)return;if(Ne.kind!=="batch"){mn.current=!0,Ge(!0),G(null),$e(null);try{await u(Ne.session.id),Ut(null)}catch(E){G(Kn(E,h))}finally{mn.current=!1,Ge(!1)}return}if(Pe.current||Me.current||Nt.current.size>0)return;let{target:c}=Ne;if(c.scope==="sessions"&&pn(K.archivedSessionIds,K.items,c).length===0){Ut(null);return}Pe.current=!0,Ge(!0),G(null),$e(null),Q(null),ye(null);try{let E=await k(c),Y=Qr(E,h);Y.kind==="error"?G(Y.message):$e(Y.message);let we=new Set([...E.deletedSessionIds,...E.skippedSessionIds]);kt(Se=>Se.filter(ht=>!we.has(ht))),vt(Se=>Se.filter(ht=>!we.has(ht))),w(Se=>Se.filter(ht=>!we.has(ht)));let j=E.failures.map(Se=>Se.sessionId);st.current=j.length>0?{kind:"delete",ids:j,idle:!1}:null,Q({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:Ue}),Ut(null)}catch(E){G(Kn(E,h))}finally{Pe.current=!1,Ge(!1)}},"confirmDelete"),Bt=Ne?.kind==="batch"?Ne.target.scope:null,Xa=Bt==="ungrouped"?h("archives.deleteUngroupedTitle"):Bt==="workspace"?h("archives.deleteProjectTitle",{name:Ne?.kind==="batch"?Ne.title:""}):h(Bt==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),ms=Ne===null?void 0:Bt==="ungrouped"?h("archives.deleteUngroupedDesc",{n:Ne.kind==="batch"?Ne.count:0}):Bt==="workspace"?h("archives.deleteProjectDesc",{name:Ne?.kind==="batch"?Ne.title:"",n:Ne.kind==="batch"?Ne.count:0}):Bt==="sessions"?h("archives.deleteSelectedDesc",{n:Ne.kind==="batch"?Ne.count:0}):h("deleteSession.desc",{name:it(Ne.kind==="session"?Ne.session:{},h)}),Qa=h(Bt==="ungrouped"?"archives.deleteUngroupedConfirm":Bt==="workspace"?"archives.deleteProjectConfirm":Bt==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:Ea+Ta+_a+Ra+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)(g.Button,{variant:"outline",size:"sm","aria-label":h("archives.viewProject"),icon:(0,a.jsx)(da,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:h("archives.viewProject")}),(0,a.jsx)(g.Button,{variant:"outline",size:"sm","aria-label":h("archives.feedback"),icon:(0,a.jsx)(ca,{}),onClick:e(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:h("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:h("archives.description")})]}),l.createElement("div",C(Z||Wt.size>0,(0,a.jsx)(g.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:Ue==="unarchived"?"unarchived":"archived",onChange:e(c=>Ha(c==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(g.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)(g.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(Ue==="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)(nr,{id:"dsham-favorite-filter",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:je?"favorites":"all",options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:e(c=>typeof ve=="function"&&ve(c==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),(0,a.jsx)(nr,{id:"dsham-search-scope",className:"dsham_srOnly",tabIndex:-1,"aria-hidden":!0,value:He,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}],onChange:e(c=>typeof et=="function"&&et(c),"onChange"),"aria-label":h("discovery.scope")}),(0,a.jsx)(g.Input,{id:"dsham-search-input",className:"dsham_searchField",type:"search",icon:(0,a.jsx)(g.IconSearchOutlineMedium,{size:16,"aria-hidden":!0}),autoComplete:"off",spellCheck:!1,maxLength:200,value:_t,onChange:e(c=>fn(c.target.value),"onChange"),placeholder:h(lr?"discovery.searchPlaceholder":O?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(lr?"discovery.searchPlaceholder":O?"archives.searchPlaceholder":"archives.searchUnarchived")}),(0,a.jsx)(ja,{id:"dsham-sort-filter",t:h,disabled:Z,favoritesOnly:je,setFavoritesOnly:ve,favoriteBusy:Z||Ie||!T,sortBy:!O&&Rt==="archived"?"updated":Rt,setSortBy:gn,options:[...O?[{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)(nr,{id:"dsham-project-filter",className:"dsham_projectFilter",value:pt,title:pt==="all"?h("archives.allProjects"):or.find(c=>c.key===pt)?.title??pt,options:[{value:"all",label:h("archives.allProjects")||"\u6240\u6709\u9879\u76EE",title:h("archives.allProjects")},...or.map(c=>({value:c.key,label:c.title,title:c.title}))],onChange:Ht,"aria-label":h("archives.projectFilter")}),l.createElement(q,{t:h,from:ct,to:te,onFrom:bt,onTo:ie,invalid:ls,onClear:e(()=>{bt(""),ie("")},"onClear")})]})}),l.createElement("style",null,Ns),l.createElement(le,{state:kn,t:h}),Ct&&(0,a.jsx)(M,{t:h,archived:O,busy:Z||Ie||Wt.size>0,ready:T,days:Te,onDays:ke,count:us.length,onPreview:e(()=>{Lt(us),xe(!0)},"onPreview"),progress:be,result:Ce?.tab===Ue?Ce:null,onRetry:e(()=>{let c=st.current;c&&(c.kind==="delete"?tn({kind:"batch",target:{scope:"sessions",sessionIds:c.ids},count:c.ids.length}):We(c.kind,c.ids,{idle:c.idle,retry:!0}))},"onRetry"),undoCount:Va,onUndo:e(()=>We("undo",Oe,{retry:!0}),"onUndo"),onReload:nn,orphanCount:lt?.count??0,cacheCount:sn.diagnosis.count,cacheRepair:sn,onRebuildCaches:e(()=>Zt(),"onRebuildCaches"),onRetryCaches:e(()=>Zt(!0),"onRetryCaches"),onReloadCaches:e(async()=>{try{await Xe?.(),await Fe.current?.load(),(Fe.current?.snapshot().diagnosis.count??0)===0&&Fe.current?.dismiss()}catch(c){jt.current&&G(qe(c))}},"onReloadCaches"),onDismissCaches:e(()=>Fe.current?.dismiss(),"onDismissCaches"),orphanSizeBytes:lt?.totalSizeBytes??0,orphanCleaning:an,onCleanOrphans:Ua}),Vt.length>0&&(0,a.jsx)(Kr,{selectedCount:gt.length,hiddenCount:gt.length-ur,allVisibleSelected:Ga,selectedVisibleCount:ur,visibleCount:Cn.length,busy:Z,t:h,onToggle:Ka,onClear:e(()=>vt([]),"onClear"),onArchive:O?void 0:()=>Lt([...gt]),onRestore:Za,onDelete:e(()=>tn({kind:"batch",target:{scope:"sessions",sessionIds:gt},count:gt.length}),"onDelete")}),Vt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(O?"archives.empty":"archives.emptyUnarchived")}):xn.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:kn.status==="loading"||kn.status==="error"||kn.failures.length?null:h("archives.emptyFiltered")}):xn.map(c=>{let E=za(c.key),Y=Vt.find(j=>j.key===c.key)?.sessions.map(j=>j.id)??[],we=O?pn(K.archivedSessionIds,K.items,E).length:Y.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(()=>oe(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)?g.IconChevronRightOutlineMedium:g.IconChevronDownOutlineMedium,{}),(0,a.jsx)(g.IconFolderOpenOutlineMedium,{}),(0,a.jsx)("span",{children:c.title})]})}),(0,a.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,a.jsx)("span",{className:"dsham_settingsCount",children:h("archives.sessionCount",{n:c.sessions.length})}),(0,a.jsx)(Ma,{group:c,busy:Z,onArchive:O?void 0:()=>Lt(Y,c),onRestore:e(()=>hs(E),"onRestore"),onDelete:e(()=>tn({kind:"batch",target:E,title:c.title,count:we}),"onDelete"),t:h})]})]}),(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)(Yr,{checked:cr.has(j.id),disabled:Z,label:h("archives.selectSession",{name:it(j,h)}),onChange:e(Se=>$a(j.id,Se.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:it(j,h),"aria-label":h("archives.openSession")+h("common.separator")+it(j,h),disabled:Z||Wt.has(j.id),onClick:e(()=>Fn(j),"onClick"),children:it(j,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[Ca(j.updatedAt,h)]}),dr.has(j.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:Z,title:h(O?"discovery.preview":"archives.openSession"),onClick:e(()=>O?At.open(j,_t):Fn(j),"onClick")},l.createElement(N,{text:dr.get(j.id)?.snippet??"",query:_t}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof en=="function"&&x({variant:"outline",className:"dsham_iconAction"+(ut.has(j.id)?" dsham_favoriteOn":""),title:h(ut.has(j.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":ut.has(j.id),"aria-label":h(ut.has(j.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+it(j,h),disabled:Z||Ie||!T,onClick:e(()=>wn(j.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:ut.has(j.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:Ve})})}),x({variant:"outline",className:"dsham_iconAction",title:h(O?"archives.restore":"archives.archiveSelected"),"aria-label":h(O?"archives.restore":"archives.archiveSelected"),disabled:Z||Wt.has(j.id),onClick:e(()=>O?Ya(j.id):os([j.id]),"onClick"),icon:(0,a.jsx)(O?g.IconRefreshOutlineMedium:g.IconArchiveOutlineMedium,{size:16})}),O&&(0,a.jsx)(Da,{busy:Z||Wt.has(j.id),t:h,title:it(j,h),onCopyId:e(()=>qa(j),"onCopyId"),onPreview:typeof pe=="function"?()=>At.open(j,_t):void 0,onRestoreOpen:e(()=>Fn(j,!0),"onRestoreOpen"),onDelete:e(()=>tn({kind:"session",session:j}),"onDelete")})]})]},j.id))})]},c.key)}),l.createElement(y,{width:900,className:"dsham_modalWide",portalToBody:!0,t:h,open:At.target!==null,onClose:At.close,title:At.target?it(At.target.session,h):h("discovery.preview"),footer:v({variant:"primary",disabled:Z,onClick:e(()=>{if(At.target){let c=At.target.session;return At.close(),Fn(c)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(re,{preview:At,t:h,MarkdownText:g.MarkdownText})}),Re===null&&St!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:St}),Ln!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:Ln}),(0,a.jsx)(y,{t:h,open:Re!==null,onClose:Yt,title:h("archives.archiveTitle",{n:Re?.length??0}),description:Ze===null?h("archives.archiveSelectedDesc"):h(Ze.key===Pn?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:Ze.title,n:Re?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:Z,onClick:Yt,children:h("cancel")}),v({variant:"primary",disabled:Z||!Re?.length,onClick:Wa,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[Ct&&(0,a.jsx)("p",{children:h(tt?"organizer.idleConfirm":"organizer.manualConfirm")}),Ct&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(Re??[]).map(c=>(0,a.jsxs)("label",{children:[(0,a.jsx)(hr,{checked:!0,disabled:Z,label:it(J.byId[c]??{id:c},h),onChange:e(()=>Ae(E=>(E??[]).filter(Y=>Y!==c)),"onChange")}),it(J.byId[c]??{id:c},h)]},c))}),be&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:be.done,max:Math.max(1,be.total)}),h("organizer.progressCount",{done:be.done,total:be.total})]}),St!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:St})]})}),(0,a.jsx)(y,{t:h,open:Qe!==null,onClose:e(()=>{Z||(Tt(null),G(null))},"onClose"),title:h("archiveActive.title"),...Qe===null?{}:{description:h("archiveActive.desc",{name:Qe.title,kinds:Qe.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:Z,onClick:e(()=>{Z||(Tt(null),G(null))},"onClick"),children:h("cancel")}),v({danger:!0,disabled:Z,onClick:e(async()=>{if(!(Et.current||Z||Qe===null||typeof r!="function")){Et.current=!0,Ge(!0),G(null);try{await r(Qe.sessionId,{stopActivity:!0}),vt(c=>c.filter(E=>Qe===null||E!==Qe.sessionId)),rt("archived"),$e(h("archives.archiveSuccess",{n:1})),Tt(null)}catch(c){G(c instanceof Error?c.message:String(c))}finally{Et.current=!1,Ge(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:St!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:St})}),(0,a.jsx)(y,{t:h,open:Ne!==null,onClose:ps,title:Xa,...ms===void 0?{}:{description:ms},footer:(0,a.jsxs)(a.Fragment,{children:[v({disabled:Z,onClick:ps,children:h("cancel")}),v({danger:!0,disabled:Z,onClick:Ja,children:Qa})]}),children:(0,a.jsxs)(a.Fragment,{children:[Z&&(0,a.jsxs)("div",{role:"status",children:[Ne?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),be&&(0,a.jsx)("progress",{value:be.done,max:Math.max(1,be.total),"aria-label":h("organizer.progress")}),be&&h("organizer.progressCount",{done:be.done,total:be.total})]}),St!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:St})]})})]})]})}e(Gn,"ArchivedSessionsSection");function Nr(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=Nr(n[r]))&&(d&&(d+=" "),d+=i)}else for(i in n)n[i]&&(d&&(d+=" "),d+=i);return d}e(Nr,"r");function ua(...n){for(var r,i,d=0,m="",u=arguments.length;d<u;d++)(r=arguments[d])&&(i=Nr(r))&&(m&&(m+=" "),m+=i);return m}e(ua,"clsx");let $n="Ungrouped";function ha(n,r=$n){if(n===void 0||n==="")return r;let i=n.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return i!==void 0&&i!==""?i:n}e(ha,"workspaceLabel");function hn(n,r){return r.updatedAt!==n.updatedAt?r.updatedAt-n.updatedAt:n.id<r.id?-1:1}e(hn,"byRecency");function Qt(n,r,i,d){return n.origin!=="subagent"&&(!i.has(n.id)||d===!0)&&(!n.blank||n.id===r)}e(Qt,"sessionVisible");function Dn(n){let r=n instanceof Error?n.message:String(n);return r.includes("UNKNOWN_SESSION")||r.includes("no such session")}e(Dn,"isUnknownSessionError");function Kn(n,r){if(Dn(n))return r("deleteSession.unknown");let i=n instanceof Error?n.message:String(n);return r("deleteSession.failed",{detail:i})}e(Kn,"formatDeleteError");function jr(n,r){if(Dn(n))return r("archives.unarchiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.unarchiveFailed",{detail:i})}e(jr,"formatUnarchiveError");function Mn(n,r,i=Dr){return n.map(d=>d.sessionId+r("common.separator")+i(new Error(d.message),r)).join(`
|
|
22
|
+
`)}e(Mn,"formatBatchFailures");function Dr(n,r){if(Dn(n))return r("archives.archiveUnknown");let i=n instanceof Error?n.message:String(n);return r("archives.archiveFailed",{detail:i})}e(Dr,"formatArchiveError");function zn(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,u=r.name==="WorkspaceArchiveError"&&i?.code==="workspace/session-active"&&m!==null&&typeof m=="object"?ne(m).activity:void 0,S=Array.isArray(d)?d:Array.isArray(u)?u:void 0;if(S===void 0)return;let k=S.flatMap(A=>{if(A===null||typeof A!="object")return[];let P=ne(A).kind;return typeof P=="string"&&P.length>0?[P]:[]});return k.length>0?k:void 0}e(zn,"activeSessionActivity");function Mr(n){let r=zn(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,u=typeof i.sessionId=="string"?i.sessionId:typeof m=="string"?m:void 0;return u===void 0?void 0:{sessionId:u,kinds:r}}e(Mr,"activeSessionRefusal");function zr(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(zr,"activeArchiveFromMessage");function pa(n,r){let i=n instanceof Error?n.message:String(n);return r("archives.forkFailed",{detail:i})}e(pa,"formatForkError");function Yn(n){return n.blank?"New Session":n.displayTitle}e(Yn,"sessionTitle");function Or(n,r,i,d,m,u,S){let k=[...u];return S==="recency"&&k.sort(hn),{key:n,workspaceId:r,cwd:i,createdAt:d,label:m,sessions:k}}e(Or,"buildGroup");function ma(n,r){let i=new Map(n.map(u=>[u.id,u])),d=new Set,m=[];for(let u of r){let S=i.get(u);S===void 0||d.has(u)||(m.push(S),d.add(u))}for(let u of[...n].sort(hn))d.has(u.id)||m.push(u);return m}e(ma,"orderedUngrouped");function Pr(n,r,i,d,m){let u=[],S=new Set;for(let A of r){let P=[];for(let I of A.sessionIds){let R=n.byId[I];R!==void 0&&(S.add(I),Qt(R,Dt(n),i,m)&&P.push(R))}u.push(Or(A.workspaceId,A.workspaceId,A.path,Date.parse(A.createdAt),A.title,P,"account"))}let k=n.ids.map(A=>n.byId[A]).filter(A=>A!==void 0&&!S.has(A.id)&&Qt(A,Dt(n),i,m));return k.length>0&&u.push(Or("",void 0,void 0,void 0,$n,d===void 0?k:ma(k,d),d===void 0?"recency":"account")),u}e(Pr,"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 Lr(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(Lr,"workspaceMenuTriggerFrom");function Jn(n){let r=n.querySelector('[class*="rowActions"]');if(!r)return null;let i=Array.from(r.querySelectorAll("button"));if(i.length===0)return null;let d=e(u=>!!((u.getAttribute("class")??"").includes("dsham_rowStar")||typeof u.closest=="function"&&u.closest(".dsham_starSlot")),"isStarButton");return i.find(u=>{if(d(u))return!1;if(u.getAttribute("aria-haspopup")==="menu")return!0;let S=(u.getAttribute("aria-label")??u.getAttribute("title")??"").toLowerCase();return/new|create|新建|add|\+|созда/.test(S)?!1:/action|操作|действи|more|更多|选项|options|menu/.test(S)})??null}e(Jn,"findRowMenuButton");function Fr(n,r){if(Jn(r)===n)return!0;let d=(n.getAttribute("aria-label")??n.getAttribute("title")??"").toLowerCase();return/action|操作|действи|more|更多/.test(d)}e(Fr,"isRowMenuButton");function Br(){if(typeof document>"u"||typeof document.addEventListener!="function")return()=>{};let n=e(r=>{let i=r.target;if(!i||i.closest("input, textarea, [contenteditable='true']"))return;let d=i.closest('[data-row-key^="workspace:"], [data-row-key^="session:"]');if(!d)return;let m=i.closest("button");if(m&&!Fr(m,d))return;let u=Jn(d);u&&(r.preventDefault(),r.stopPropagation(),u.click())},"onContextMenu");return document.addEventListener("contextmenu",n,!0),()=>{document.removeEventListener("contextmenu",n,!0)}}e(Br,"setupSidebarRowContextMenu");function Xn(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(Xn,"isWorkspaceDeleteMenuItem");function fa(n){switch(n){case"approval":case"plan-review":case"question":return n;default:return}}e(fa,"visiblePendingKind");function Ur(n,r){let i=r.get(n.id),d=i===void 0?n.pendingInteraction:i.kind;return fa(d)}e(Ur,"pendingInteractionForSession");let Qn=new Map,er=new Set,ga=new Map;function va(n){return n(Qn)}e(va,"useEmptySessionPendingInteraction");function ba(n){return n(ga)}e(ba,"useEmptySessionStatus");function Hr(n){return n instanceof Map||n==null?{pending:n??Qn,completed:er}:{pending:n.pending??Qn,completed:n.completed??er}}e(Hr,"pendingFacts");function ya(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(ya,"factsFromSessionStatus");function wa(n,r,i){let d=n(u=>u),m=r(u=>u);return i?ya(m):{pending:d,completed:er}}e(wa,"useSessionUiFacts");function Wr(n,r,i,d){let m=Hr(d),u=Ur(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),...u===void 0?{}:{pendingInteraction:u}}}e(Wr,"sessionNode");function Sa(n,r,i,d,m){let u=new Set(i),S=new Set(m.expandedGroups),k=Nn(n.byId),A=Dt(n),P=A===void 0?void 0:r.find(R=>R.sessionIds.includes(A))?.workspaceId??"",I=[];for(let R of Pr(n,r,u,m.ungroupedOrder,m.showArchived)){let F=S.has(R.key);I.push({key:R.key,workspaceId:R.workspaceId,cwd:R.cwd,createdAt:R.createdAt,label:R.label,sessionCount:R.sessions.length,expanded:F,containsCurrent:R.key===P,sessions:F?R.sessions.map(h=>Wr(h,k,u,d)):[]})}return I}e(Sa,"deriveGroups");function ka(n,r,i,d){let m=new Set(r),u=Nn(n.byId),S=[];for(let k of n.ids){let A=n.byId[k];A===void 0||!Qt(A,Dt(n),m,d)||S.push(A)}return S.sort(hn),S.map(k=>Wr(k,u,m,i))}e(ka,"deriveFlat");function xa(n,r,i,d,m,u,S,k,A=$n){let P=i.trim().toLowerCase();if(P==="")return{items:[],hasMore:!1};let I=new Set(d),R=Nn(n.byId),F=new Map;for(let ee of r)for(let pe of ee.sessionIds)F.has(pe)||F.set(pe,ee.title);let h=e(ee=>F.get(ee.id)??ha(ee.cwd,A),"labelOf"),ge=new Map;for(let ee of u.items)ge.has(ee.sessionId)||ge.set(ee.sessionId,ee);let _e=[];for(let ee of n.ids){let pe=n.byId[ee];pe===void 0||pe.blank||!Qt(pe,Dt(n),I,k)||(Yn(pe).toLowerCase().includes(P)||h(pe).toLowerCase().includes(P))&&_e.push(pe)}_e.sort(hn);let ce=[],ot=new Set,Xe=e(ee=>{ot.has(ee.id)||(ot.add(ee.id),ce.push(ee))},"include");for(let ee of _e)Xe(ee);for(let ee of u.items){let pe=n.byId[ee.sessionId];pe!==void 0&&!pe.blank&&Qt(pe,Dt(n),I,k)&&Xe(pe)}let Ye=Hr(m);return{items:ce.slice(0,S).map(ee=>{let pe=ge.get(ee.id),nt=Ur(ee,Ye.pending);return{id:ee.id,title:Yn(ee),workspace:h(ee),running:ee.running,runningSubagentCount:R.get(ee.id)?.runningCount??0,archived:I.has(ee.id),...nt===void 0?{}:{pendingInteraction:nt},completed:ee.completed===!0||Ye.completed.has(ee.id),...pe===void 0?{}:{snippet:pe.snippet}}}),hasMore:u.hasMore||ce.length>S}}e(xa,"deriveSearchResults");function Oi(n,r){let u=Math.max(0,r-n);return u<6e4?{unit:"now",n:0}:u<36e5?{unit:"minutes",n:Math.floor(u/6e4)}:u<864e5?{unit:"hours",n:Math.floor(u/36e5)}:u<30*864e5?{unit:"days",n:Math.floor(u/864e5)}:u<365*864e5?{unit:"months",n:Math.floor(u/(30*864e5))}:{unit:"years",n:Math.floor(u/(365*864e5))}}e(Oi,"relativeTime");let qr={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 it(n,r){return n.blank?r("session.new"):n.title??n.displayTitle??""}e(it,"displayTitle");function Ca(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(Ca,"archiveTimeLabel");let Ea=[".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(""),Pt="data-dsham-nav-icon",Aa='[role="dialog"] nav button',tr=[`[${Pt}] > svg { display: none !important; }`,`[${Pt}]::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 Ia(n,r){let i=String(r??"").trim();return i.length>0&&String(n??"").trim()===i}e(Ia,"isOwnSettingsNavRow");function On(n,r){for(let i of n){if(i.type==="characterData"){let m=i.target.parentElement;if(m!==null&&m.closest(r)!==null)return!0;continue}let d=i.target;if(d&&d.nodeType===1&&(typeof d.matches=="function"&&d.matches(r)||typeof d.closest=="function"&&d.closest(r)!==null))return!0;if(i.addedNodes)for(let m of i.addedNodes){if(m.nodeType!==1)continue;let u=m;if(typeof u.matches=="function"&&u.matches(r)||typeof u.querySelector=="function"&&u.querySelector(r)!==null||typeof u.closest=="function"&&u.closest(r)!==null)return!0}if(i.removedNodes)for(let m of i.removedNodes){if(m.nodeType!==1)continue;let u=m;if(typeof u.matches=="function"&&u.matches(r)||typeof u.querySelector=="function"&&u.querySelector(r)!==null||typeof u.closest=="function"&&u.closest(r)!==null)return!0}}return!1}e(On,"mutationTouches");function Vr(n,r){return Ia(n.textContent,r)?n.getAttribute(Pt)===""?!1:(n.setAttribute(Pt,""),!0):n.hasAttribute(Pt)?(n.removeAttribute(Pt),!0):!1}e(Vr,"applySettingsNavIcon");function Gr(n){return n.hasAttribute(Pt)?(n.removeAttribute(Pt),!0):!1}e(Gr,"restoreSettingsNavIcon");function $r(n){typeof document>"u"||typeof MutationObserver>"u"||n.effect(()=>{let r="dsham-nav-icon-style",i=document.getElementById(r);i===null?(i=document.createElement("style"),i.id=r,i.textContent=tr,(document.head??document.documentElement).append(i)):i.textContent!==tr&&(i.textContent=tr);let d=!1,m=!1,u=e(()=>{if(m=!1,d)return;let A=n.locale.bind(Je)("archived.badge");for(let P of document.querySelectorAll(Aa))Vr(P,A)},"sync"),S=e(()=>{m||d||(m=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(u):setTimeout(u,16))},"schedule");u();let k=new MutationObserver(A=>{On(A,'[role="dialog"] nav')&&S()});return k.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),()=>{d=!0,k.disconnect();for(let A of document.querySelectorAll(`[${Pt}]`))Gr(A);i?.remove()}},"archive-manager: settings nav icon")}e($r,"installSettingsNavIcon");let Ta=[".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 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill));overflow:hidden;transition:border-color 150ms ease}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:0 10px;margin:0;user-select:none}",".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:0;border-top:1px solid var(--dsw-alias-border-l2);border-radius:0;background:transparent}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:40px;padding:4px 10px;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:16px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:1px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:13px}",".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:10px}.dsham_settingsRow{padding:4px 8px}.dsham_settingsActions{gap:2px}}"].join(""),_a=".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:16px;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:6px;padding:4px 6px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:10px}}.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{flex:none;box-sizing:border-box;width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);cursor:pointer}.dsham_checkbox:focus-visible{outline:var(--dsw-focus-ring-width,1px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.dsham_checkbox:disabled{opacity:.5;cursor:default}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",Ra=".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 nr({id:n,className:r,value:i,options:d,onChange:m,disabled:u=!1,"aria-label":S,title:k,tabIndex:A,"aria-hidden":P}){let[I,R]=l.useState(!1),F=l.useMemo(()=>d.map(_e=>({id:_e.value,label:_e.label})),[d]),h=d.find(_e=>_e.value===i),ge=h?.label??S;return(0,a.jsx)("div",{id:n,tabIndex:A,"aria-hidden":P,className:r===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${r}`,children:(0,a.jsx)(g.Menu,{open:I,onClose:e(()=>R(!1),"onClose"),onSelect:e(_e=>{u||m(_e),R(!1)},"onSelect"),selectedId:i,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,a.jsxs)(g.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":S,"aria-expanded":I,disabled:u,tabIndex:A,"aria-hidden":P,title:k??h?.title??h?.label??S,className:"dsham_menuSelectBtn"+(I?" is-open":""),onClick:e(()=>{u||R(_e=>!_e)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:ge}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:I?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:F})})}e(nr,"ArchiveProjectSelect");function ja({id:n,t:r,disabled:i=!1,favoritesOnly:d,setFavoritesOnly:m,favoriteBusy:u=!1,sortBy:S,setSortBy:k,options:A}){let[P,I]=l.useState(!1),R=l.useMemo(()=>{let ce=[];typeof m=="function"&&(ce.push({type:"label",id:"lbl_view_filter",text:r("organizer.favoriteFilter")||"\u7B5B\u9009\u4F1A\u8BDD"}),ce.push({id:"filter:all",label:r("organizer.allSessions")||"\u5168\u90E8\u4F1A\u8BDD"}),ce.push({id:"filter:favorites",label:r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF"}),ce.push({type:"separator",id:"sep_view_filter"})),ce.push({type:"label",id:"lbl_view_sort",text:r("archives.sortLabel")||"\u6392\u5E8F\u65B9\u5F0F"});for(let ot of A)ce.push({id:`sort:${ot.value}`,label:ot.label});return ce},[r,m,A]),F=e(ce=>{ce.startsWith("filter:")?typeof m=="function"&&!u&&m(ce==="filter:favorites"):ce.startsWith("sort:")&&k(ce.slice(5)),I(!1)},"onSelect"),h=A.find(ce=>ce.value===S),ge=d?r("organizer.favoritesOnly")||"\u53EA\u770B\u6536\u85CF":r("organizer.allChats")||"\u5168\u90E8\u804A\u5929",_e=`${ge} \xB7 ${h?.label??S}`;return(0,a.jsxs)("div",{className:"dsham_viewSortContainer",children:[(0,a.jsx)(g.Menu,{open:P,onClose:e(()=>I(!1),"onClose"),onSelect:F,selectedIds:[d?"filter:favorites":"filter:all",`sort:${S}`],align:"end",portal:!0,dense:!0,listClassName:"dsham_viewSortDropdown",anchor:(0,a.jsxs)(g.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":r("archives.viewOptions")||"\u89C6\u56FE\u9009\u9879","aria-expanded":P,disabled:i,title:_e,className:"dsham_menuSelectBtn dsham_viewSortBtn"+(P?" is-open":"")+(d?" has-filter":""),onClick:e(()=>{i||I(ce=>!ce)},"onClick"),children:[(0,a.jsxs)("svg",{viewBox:"0 0 16 16",width:13,height:13,fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none",marginRight:4},children:[(0,a.jsx)("line",{x1:2.5,y1:4.5,x2:13.5,y2:4.5}),(0,a.jsx)("circle",{cx:5,cy:4.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"}),(0,a.jsx)("line",{x1:2.5,y1:11.5,x2:13.5,y2:11.5}),(0,a.jsx)("circle",{cx:11,cy:11.5,r:1.5,fill:"var(--dsw-alias-bg-layer-1)"})]}),(0,a.jsx)("span",{className:"dsham_selectLabel",children:ge}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:11,height:11,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:3,transition:"transform 150ms ease",transform:P?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:R})]})}e(ja,"ArchiveViewSortMenu");function Kr({selectedCount:n,hiddenCount:r,allVisibleSelected:i,selectedVisibleCount:d,visibleCount:m,busy:u,t:S,onToggle:k,onClear:A,onRestore:P,onDelete:I,onArchive:R}){let F=n>0;return(0,a.jsxs)("div",{className:"dsham_settingsSelection",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionMain",children:[(0,a.jsxs)("div",{className:"dsham_settingsSelectionSummary",children:[(0,a.jsxs)("label",{className:"dsham_settingsSelectionToggle",title:S("archives.selectAllFiltered"),children:[(0,a.jsx)(Yr,{checked:i,indeterminate:d>0&&!i,disabled:u||m===0,label:S("archives.selectAllFiltered"),onChange:e(h=>k(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:F?S("archives.selectedCount",{n}):S("archives.selectAllFiltered")})]}),F&&x({disabled:u,"aria-label":S("archives.clearSelection"),onClick:A,children:S("archives.clearSelectionShort")})]}),F&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:R?[x({disabled:u,onClick:R,children:S("archives.archiveSelected")})]:[x({disabled:u,"aria-label":S("archives.restoreSelected"),onClick:P,children:S("archives.restore")}),x({disabled:u,className:"dsham_btnDanger","aria-label":S("archives.deleteSelected"),onClick:I,children:S("archives.deleteSelectionShort")})]})]}),r>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:S("archives.selectionHiddenHint",{hidden:r})})]})}e(Kr,"ArchiveSelectionToolbar");function Yr({checked:n,indeterminate:r=!1,disabled:i=!1,label:d,onChange:m}){return(0,a.jsx)(hr,{checked:n,indeterminate:r,disabled:i,label:d,onChange:m})}e(Yr,"ArchiveSelectionCheckbox");function Zr(){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(Zr,"moreIcon");function Da({busy:n,title:r,t:i,onPreview:d,onRestoreOpen:m,onDelete:u,onCopyId:S}){let[k,A]=(0,l.useState)(!1),P=e(R=>{if(!n){if(A(!1),R==="copyId")return S?.();if(R==="preview")return d?.();if(R==="restoreOpen")return m?.();R==="delete"&&u?.()}},"choose"),I=[...d?[{id:"preview",label:i("discovery.preview"),icon:(0,a.jsx)(g.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"restoreOpen",label:i("archives.restoreOpen"),icon:(0,a.jsx)(g.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...S?[{id:"copyId",label:i("details.copyId"),icon:(0,a.jsx)(g.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...u?[{id:"delete",label:i("menu.deleteSession"),icon:(0,a.jsx)(g.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(g.Menu,{open:!n&&k,align:"end",portal:!0,dense:!0,items:I,onSelect:P,onClose:e(()=>A(!1),"onClose"),anchor:x({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":k&&!n,icon:Zr(),onClick:e(()=>{n||A(R=>!R)},"onClick")})})}e(Da,"ArchivedSessionMenu");function Ma({group:n,busy:r,onArchive:i,onRestore:d,onDelete:m,t:u}){let S=n.key===Pn,k=i?[{id:"archive",label:u(S?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(g.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:u(S?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(g.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:u(S?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(g.IconTrashOutlineMedium,{size:16}),danger:!0}],[A,P]=(0,l.useState)(!1),I=u(S?"archives.ungroupedActions":"archives.projectActions",{name:n.title}),R=e(F=>{r||(F==="archive"?i?.():F==="restore"?d?.():F==="delete"&&m?.())},"choose");return(0,a.jsx)(g.Menu,{open:!r&&A,align:"end",portal:!0,dense:!0,items:k,onSelect:e(F=>{P(!1),R(F)},"onSelect"),onClose:e(()=>P(!1),"onClose"),anchor:x({variant:"outline",className:"dsham_iconAction",disabled:r,"aria-label":I,"aria-haspopup":"menu","aria-expanded":A&&!r,icon:Zr(),onClick:e(()=>{r||P(F=>!F)},"onClick")})})}e(Ma,"ArchivedGroupActions");let Pn="__ungrouped__";function za(n){return n===Pn?{scope:"ungrouped"}:{scope:"workspace",workspaceId:n}}e(za,"archivedBatchTargetForGroup");function pn(n,r,i){let d=[...new Set(n??[])];if(i.scope==="all")return d;if(i.scope==="sessions"){let u=new Set(i.sessionIds??[]);return d.filter(S=>u.has(S))}if(i.scope==="workspace"){let u=new Set(r.find(S=>S.workspaceId===i.workspaceId)?.sessionIds??[]);return d.filter(S=>u.has(S))}let m=new Set(r.flatMap(u=>u.sessionIds));return d.filter(u=>!m.has(u))}e(pn,"deriveArchivedBatchIds");function Jr(n){return[...new Set(n.flatMap(r=>r.sessions.map(i=>i.id)))]}e(Jr,"archivedSessionIdsInGroups");function Xr(n,r){let i=new Set(r);return[...new Set(n)].filter(d=>i.has(d))}e(Xr,"pruneArchivedSelection");function rr(n,r,i){let d=new Set(n);for(let m of r)i?d.add(m):d.delete(m);return[...d]}e(rr,"toggleArchivedSelection");function Qr(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(Qr,"archivedDeleteFeedback");function es(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(es,"unarchivedSessionIds");function ts(n,r,i,d){let m=r.map(k=>({key:k.workspaceId,title:k.title,ids:new Set(k.sessionIds),sessions:[]})),u=[];for(let k of i){let A=n[k];if(A===void 0||A.origin==="subagent")continue;let P=m.find(I=>I.ids?.has(k));(P===void 0?u:P.sessions).push(A)}let S=m.filter(k=>k.sessions.length>0);return u.length>0&&S.push({key:Pn,title:d,sessions:u}),S}e(ts,"deriveArchivedGroups");function ns(n,r,i,d,m=[]){let u=e((I,R)=>String(I).localeCompare(String(R),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),S=new Map;if(Array.isArray(m))for(let I=0;I<m.length;I++)S.set(m[I],I);let k=e(I=>{let R=r==="created"?i[I.id]:I.updatedAt;return typeof R=="number"&&Number.isFinite(R)?R:Number.NEGATIVE_INFINITY},"timestampOf"),A=e((I,R)=>{if(r==="archived"){let F=S.get(I.id)??-1,ge=(S.get(R.id)??-1)-F;if(ge!==0)return ge}if(r!=="alphabetical"){let F=k(R)-k(I);if(Number.isFinite(F)&&F!==0)return F}return u(it(I,d),it(R,d))||u(I.id,R.id)},"compareSessions");return n.map(I=>({...I,sessions:[...I.sessions].sort(A)})).sort((I,R)=>{if(r==="archived"){let F=I.sessions[0]?.id,h=R.sessions[0]?.id,ge=F!==void 0?S.get(F)??-1:-1,ce=(h!==void 0?S.get(h)??-1:-1)-ge;if(ce!==0)return ce}if(r!=="alphabetical"){let F=k(R.sessions[0])-k(I.sessions[0]);if(Number.isFinite(F)&&F!==0)return F}return u(I.title,R.title)||u(I.key,R.key)})}e(ns,"sortArchivedGroups");let rs={...ta,...js,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","common.close":"\u5173\u95ED","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","sidebar.favoriteStar.title":"\u4FA7\u680F\u6536\u85CF\u661F\u6807","sidebar.favoriteStar.desc":"\u5728\u4F1A\u8BDD\u5217\u8868\u884C\u524D\u663E\u793A\u6536\u85CF\u661F\u6807\u3002\u5173\u95ED\u540E\u4E0D\u663E\u793A\u56FE\u6807\uFF0C\u4ECD\u53EF\u901A\u8FC7\u83DC\u5355\u6536\u85CF\u548C\u7B5B\u9009\u3002","sidebar.favoriteStar.toggle":"\u5207\u6362\u4FA7\u680F\u6536\u85CF\u661F\u6807","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"},ss={...na,...Ds,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","common.close":"Close","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","sidebar.favoriteStar.title":"Sidebar favorite star","sidebar.favoriteStar.desc":"Show favorite star on session rows in the sidebar. When disabled, the star is hidden while menu actions and filters stay available.","sidebar.favoriteStar.toggle":"Toggle sidebar favorite star","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"},Oa={...ra,...Ms,"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.","common.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","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","sidebar.favoriteStar.title":"\u0417\u0432\u0435\u0437\u0434\u0430 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","sidebar.favoriteStar.desc":"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0437\u0432\u0435\u0437\u0434\u0443 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0443 \u0441\u0442\u0440\u043E\u043A \u0441\u0435\u0441\u0441\u0438\u0439 \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438. \u041F\u0440\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438 \u0437\u043D\u0430\u0447\u043E\u043A \u0441\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F, \u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043C\u0435\u043D\u044E \u0438 \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C\u0438.","sidebar.favoriteStar.toggle":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0437\u0432\u0435\u0437\u0434\u0443 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0432 \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"},Je="archive-manager-workspace",Pa=["slots","sessions","workspaces","locale","remote","typert"];function sr(n){return{getSnapshot:n.getSnapshot.bind(n),subscribe:n.subscribe.bind(n)}}e(sr,"bindObservable");function as(n){return async r=>{if(typeof n?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await n.unarchiveSession(r)}}e(as,"createUnarchiveSession");async function ar(n,r,i){let d=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),m=await Vn(r,async S=>{try{await n.archiveSession(S)}catch(k){throw k!==null&&typeof k=="object"&&zn(k)!==void 0&&typeof ne(k).sessionId!="string"&&Object.assign(k,{sessionId:S}),k}return!0},{refresh:i}),u=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:u,archivedSessionIdsAdded:u.filter(S=>!d.has(S)),failures:m.failures}}e(ar,"archiveSessionsViaOfficial");async function is(n,r,i,d){let m=new Set(n.list?.getSnapshot?.()?.archivedSessionIds??[]),u=typeof d=="function"?d:A=>n.unarchiveSession?.(A),S=await Vn(r,async A=>(await u(A),!0),{refresh:i}),k=[...n.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:k,unarchivedSessionIds:[...m].filter(A=>!k.includes(A)),failures:S.failures}}e(is,"unarchiveSessionsViaOfficial");async function La(n){Fa(n);let r=n.get("remote"),i=e(()=>{},"disposeRemote");return r!==void 0&&(i=await r.$mount(It)),async()=>{await i()}}e(La,"apply");function Fa(n){n.effect(()=>n.locale.register(Je,{zh:rs,en:ss,ru:Oa}),"dsh-archive-manager: dictionaries");let r=e(()=>n.get("uiWorkspace"),"uiWorkspaceAt"),i={},d,m=e(f=>(d=Bs(f,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 u=e(f=>{if(d===void 0)throw new $t("navigationUnavailable");return qr.request(f),d.open(f)},"openConversation"),S=e(async f=>{n.get("layout")?.beginNavigation?.(),qr.request(f)},"focusSessionWorkspace"),k=e(async(f,w)=>{let T=await n.sessions.search(f,w);if(!T.ok)throw new Error(T.error.message);return T.value},"searchSessions"),A=e(async()=>{if(typeof n.sessions.refresh!="function")return null;try{return await ge(),null}catch(f){return console.warn("archive-manager: restored archived sessions but session list refresh failed:",f),f instanceof Error?f.message:String(f)}},"refreshSessionList"),P=as(n.workspaces),I=e(async(f,...w)=>{let T=n.get("remote.workspaceRegistry");if(!T||typeof T[f]!="function")throw new Error(n.locale.bind(Je)("service.unavailable"));let Ie=await T[f].apply(T,w);if(!Ie.ok)throw new Error(Ie.error.message);return Ie.value},"registryCall"),R=e(()=>I("diagnoseOrphanSubagents"),"diagnoseOrphanSubagents"),F=e(()=>I("diagnoseSessionCaches"),"diagnoseSessionCaches"),h=e(f=>I("rebuildSessionCaches",f),"rebuildSessionCaches"),ge=e(async()=>{if(typeof n.sessions.refresh!="function")throw new Error("Official session list refresh is unavailable");let f=await n.sessions.refresh(),w=n.sessions,T=w.manager;if(T?.listState==="error"&&T.listError)throw new Error(qe(T.listError));if(w.listState==="error"&&w.listError)throw new Error(qe(w.listError));let $=w.list?.getSnapshot?.();if($?.state==="error"&&$.error)throw new Error(qe($.error));if(f&&typeof f=="object"&&"ok"in f&&f.ok===!1)throw new Error(qe(f.error??"Session list refresh failed"))},"refreshCacheLists"),_e=e((f={})=>I("cleanOrphanSubagents",f??{}),"cleanOrphanSubagents"),ce=e(f=>I("searchArchivedContent",f),"searchArchivedContent"),ot=e(f=>I("searchSessionContent",f),"searchSessionContent"),Xe=e(f=>I("previewArchivedSession",f),"previewArchivedSession"),Ye=e(()=>I("favoriteSessions"),"favoriteSessions"),ee=e(f=>I("setSessionFavorite",f),"setSessionFavorite"),pe=Tr();pe.bind({favoriteSessions:Ye,setSessionFavorite:ee});let nt,en=Ir(n,pe,()=>n.locale.bind(Je),()=>nt?.isSidebarFavoriteStarEnabled()??!0);n.effect(()=>()=>en.dispose(),"archive-manager: favorites only filter");let wt=Qs({workspaces:n.workspaces.list,sessions:n.sessions.list,archive:e(f=>n.workspaces.archiveSession(f),"archive"),restore:e(async f=>{await P(f)},"restore"),deleteOne:e(async f=>{let w=n.get("remote.workspaceRegistry");if(!w)throw new Error(n.locale.bind(Je)("service.unavailable"));let T=await w.deleteSession(f);if(!T.ok)throw new Error(T.error.message)},"deleteOne"),getFavorites:Ye,refresh:e(()=>n.sessions.refresh?.(),"refresh"),currentSessionId:Dt}),Ct=e(async f=>{await P(f),await A()},"unarchiveSession"),W=e(async f=>{let w=n.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let T=await w.deleteSession(f);if(!T.ok)throw new Error(T.error.message);await A()},"deleteSession"),De=e(async(f,w)=>{let T=n.get("remote.workspaceRegistry");if(T===void 0)throw new Error("archive-manager remote service is unavailable");let $=await T.moveSessionToWorkspace({sessionId:f,targetWorkspaceId:w});if(!$.ok)throw new Error($.error?.message||"move failed");return await A(),$.value},"moveSession"),J=e(async f=>ar(n.workspaces,f,A),"archiveSessions"),K=e(async f=>{let w=n.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},T=pn(w.archivedSessionIds,w.items,f);return is(n.workspaces,T,A,P)},"unarchiveSessions"),Ue=e(async f=>{let w=n.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let T=await w.deleteArchivedSessions(f);if(!T.ok)throw new Error(T.error.message);let $=await A();return{...T.value,refreshError:$}},"deleteArchivedSessions"),rt=e(async()=>{let f=n.get("remote.workspaceRegistry");if(f===void 0)throw new Error("archive-manager remote service is unavailable");let w=await f.archivedSessionMetadata();if(!w.ok)throw new Error(w.error.message);return w.value},"archivedSessionMetadata"),O="sidebar.workspaces.session.menu.item",Re=null,Ae=new Set,Ze=e(f=>{Re=f;for(let w of Ae)w()},"publishDeleteTarget");function dt(){return l.useSyncExternalStore(f=>(Ae.add(f),()=>{Ae.delete(f)}),()=>Re,()=>Re)}e(dt,"useDeleteRequest");function Qe({sessionId:f,displayTitle:w,useMenuOpenState:T,t:$}){let[,Ie]=T(),ue=g.MenuItemButton,Me=(0,a.jsx)(g.IconTrashOutlineRegular,{size:14}),je=e(()=>{Ie(!1),Ze({sessionId:f,title:w})},"onSelect");return typeof ue=="function"?(0,a.jsx)(ue,{danger:!0,icon:Me,onSelect:je,children:$("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:je,children:$("menu.deleteSession")})}e(Qe,"DeleteSessionMenuItem");function Tt({sessionId:f,favoriteRow:w,useMenuOpenState:T,t:$}){let[,Ie]=T(),ue=(0,l.useSyncExternalStore)(w.subscribe,w.getSnapshot),Me=ue.ready&&ue.ids.has(f),je=e(()=>{Ie(!1),w.toggle(f)},"onSelect"),ve=g.MenuItemButton,He=(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:Me?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,children:(0,a.jsx)("path",{d:Ve})}),et=$(Me?"organizer.unfavorite":"organizer.favorite");return typeof ve=="function"?(0,a.jsx)(ve,{icon:He,onSelect:je,children:et}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:je,children:et})}e(Tt,"FavoriteMenuItem");let Lt=null,Yt=new Set;function Et(f,w="success"){Lt={text:f,tone:w,seq:Date.now()};for(let T of Yt)T()}e(Et,"showToast");function Ne(){let f=l.useSyncExternalStore(T=>(Yt.add(T),()=>{Yt.delete(T)}),()=>Lt,()=>Lt);if(!f)return null;let w=g.Toast;return typeof w=="function"?(0,a.jsx)(w,{key:f.seq,text:f.text,tone:f.tone,holdMs:3e3,onDone:e(()=>{if(Lt?.seq===f.seq){Lt=null;for(let T of Yt)T()}},"onDone")}):(0,a.jsx)("div",{key:f.seq,style:{position:"fixed",top:16,left:"50%",transform:"translateX(-50%)",zIndex:99999,padding:"8px 16px",borderRadius:8,background:f.tone==="danger"?"#7f1d1d":"#14532d",color:"#fff",fontSize:13,boxShadow:"0 4px 16px rgba(0,0,0,0.4)"},children:f.text})}e(Ne,"GlobalToastOverlay");function Ut({sessionId:f,displayTitle:w,useMenuOpenState:T,t:$}){let[,Ie]=T(),[ue,Me]=l.useState(!1),[je,ve]=l.useState(null),[He,et]=l.useState(!1),ct=l.useRef(null),bt=l.useRef(null),te=n.workspaces.list?.getSnapshot?.()?.items??[],ie=g.MenuItemButton,z=e(()=>{if(bt.current&&clearTimeout(bt.current),ct.current){let ye=ct.current.getBoundingClientRect(),Ce=typeof window<"u"?window.innerWidth:1024,Q=typeof window<"u"?window.innerHeight:768,Oe=220,kt=Math.max(140,Q-20),Pe=Math.min(360,kt),st=ye.right+2;st+Oe>Ce-10&&(st=Math.max(10,ye.left-Oe-4));let me=ye.top-4;me+Pe>Q-10&&(me=Math.max(10,Q-Pe-10)),me<10&&(me=10),ve({top:me,left:st,maxHeight:Pe})}Me(!0)},"handleMouseEnter"),oe=e(()=>{bt.current=setTimeout(()=>{Me(!1)},180)},"handleMouseLeave"),Te=e(async(ye,Ce)=>{if(!He){et(!0),Me(!1),Ie(!1);try{await De(f,ye),Et($("moveSession.success",{name:Ce})||`\u4F1A\u8BDD\u5DF2\u6210\u529F\u79FB\u52A8\u5230\u201C${Ce}\u201D`,"success")}catch(Q){let Oe=Q instanceof Error?Q.message:String(Q);console.warn("archive-manager: move session failed",Q),Et(Oe,"danger")}finally{et(!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"})]}),tt=(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")}),tt]}),be=typeof ie=="function"?(0,a.jsx)(ie,{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:ct,className:"dsham_moveSessionWrap",onMouseEnter:z,onMouseLeave:oe,children:[be,ue&&je&&typeof document<"u"&&typeof p?.createPortal=="function"&&(0,p.createPortal)((0,a.jsxs)("div",{className:"dsham_moveSubmenu",role:"menu",onPointerDown:e(ye=>{ye.stopPropagation()},"onPointerDown"),onMouseDown:e(ye=>{ye.stopPropagation()},"onMouseDown"),onMouseEnter:z,onMouseLeave:oe,style:{top:je.top,left:je.left,maxHeight:je.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(ye=>{let Ce=ye.title||ye.path||ye.workspaceId;return(0,a.jsx)("button",{type:"button",role:"menuitem",className:"dsham_moveSubmenuBtn",disabled:He,onPointerDown:e(Q=>{Q.preventDefault(),Q.stopPropagation(),Te(ye.workspaceId,Ce)},"onPointerDown"),onClick:e(Q=>{Q.preventDefault(),Q.stopPropagation(),Te(ye.workspaceId,Ce)},"onClick"),children:(0,a.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",flex:1},children:Ce})},ye.workspaceId)})]}),document.body)]})}e(Ut,"MoveSessionMenuItem");function mn(f){try{let w=document.querySelector(`[data-row-key="session:${CSS.escape(f)}"]`);return w?(w.hasAttribute("tabindex")||(w.setAttribute("tabindex","-1"),w.addEventListener("blur",()=>w.removeAttribute("tabindex"),{once:!0})),typeof g.focusWithoutRing=="function"?g.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}e(mn,"focusSessionRow");function Z({t:f}){let w=dt(),[T,$]=(0,l.useState)(!1),[Ie,ue]=(0,l.useState)(null),[Me,je]=(0,l.useState)(null),ve=(0,l.useRef)(null),He=(0,l.useRef)(null),et=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){je(null);return}let te=null,ie=e(()=>{if(te&&te.isConnected)return te;try{te=document.querySelector(`[data-row-key="session:${CSS.escape(w.sessionId)}"]`)}catch{te=null}return te},"getTargetRow"),z=e(()=>{let Te=ve.current,ke=Te?.offsetWidth||290,tt=Te?.offsetHeight||160,xe=8,be=ie();if(!be){let Oe=window.innerWidth,kt=window.innerHeight,Pe=Math.max(16,(kt-tt)/2),st=Math.max(16,(Oe-ke)/2);je(me=>me!==null&&me.top===Pe&&me.left===st?me:{top:Pe,left:st});return}let ye=be.getBoundingClientRect(),Ce=ye.top-4;Ce+tt>window.innerHeight-16&&(Ce=window.innerHeight-16-tt),Ce<16&&(Ce=16);let Q=ye.right+xe;Q+ke>window.innerWidth-16&&(Q=ye.left-ke-xe),Q<16&&(Q=16),je(Oe=>Oe!==null&&Oe.top===Ce&&Oe.left===Q?Oe:{top:Ce,left:Q})},"updatePosition");z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);let oe=null;return typeof ResizeObserver<"u"&&ve.current&&(oe=new ResizeObserver(z),oe.observe(ve.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[w]),(0,l.useEffect)(()=>{if(w===null)return;He.current&&!He.current.disabled?He.current.focus():ve.current?.focus();let te=w.sessionId;return()=>{if(!mn(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 g.focusWithoutRing=="function"?g.focusWithoutRing(z):z.focus())}}},[w]),(0,l.useEffect)(()=>{w!==null&&T&&ve.current?.focus()},[w,T]),(0,l.useEffect)(()=>{if(w===null)return;let te=e(ie=>{if(ie.key==="Escape"){ie.preventDefault(),ie.stopPropagation(),"stopImmediatePropagation"in ie&&typeof ie.stopImmediatePropagation=="function"&&ie.stopImmediatePropagation(),T||(ue(null),Ze(null));return}if(ie.key==="Tab"){if(ie.preventDefault(),T){ve.current?.focus();return}let z=He.current,oe=et.current;if(!z||!oe)return;ie.shiftKey?document.activeElement===z?oe.focus():z.focus():document.activeElement===oe?z.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",te,!0),()=>window.removeEventListener("keydown",te,!0)},[w,T]),w===null)return null;let ct=e(()=>{T||(ue(null),Ze(null))},"close"),bt=e(()=>{$(!0),ue(null),W(w.sessionId).then(()=>{$(!1),Ze(null)}).catch(te=>{$(!1),ue(Kn(te,f))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:ct}),(0,a.jsxs)("div",{ref:ve,role:"dialog","aria-modal":!0,"aria-label":f("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:Me?{top:Me.top,left:Me.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:f("deleteSession.confirmTitle")}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:f("deleteSession.desc",{name:w.title})}),T&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:f("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:He,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:T,onClick:ct,children:f("cancel")}),(0,a.jsx)("button",{ref:et,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:T,onClick:bt,children:f("deleteSession.title")})]})]})]})}e(Z,"DeleteSessionOverlay");let Ge=null,St=new Set,G=e(f=>{Ge=f;for(let w of St)w()},"publishArchiveWsTarget");function Ln(){return l.useSyncExternalStore(f=>(St.add(f),()=>{St.delete(f)}),()=>Ge,()=>Ge)}e(Ln,"useArchiveWsRequest");function $e(f){try{let w=document.querySelector(`[data-row-key="workspace:${CSS.escape(f)}"]`);return w?(w.hasAttribute("tabindex")||(w.setAttribute("tabindex","-1"),w.addEventListener("blur",()=>w.removeAttribute("tabindex"),{once:!0})),typeof g.focusWithoutRing=="function"?g.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}e($e,"focusWorkspaceRow");function tn({t:f}){let w=Ln(),[T,$]=(0,l.useState)(!1),[Ie,ue]=(0,l.useState)(null),[Me,je]=(0,l.useState)(null),ve=(0,l.useRef)(null),He=(0,l.useRef)(null),et=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){je(null);return}let te=null,ie=e(()=>{if(te&&te.isConnected)return te;try{te=document.querySelector(`[data-row-key="workspace:${CSS.escape(w.workspaceId)}"]`)}catch{te=null}return te},"getTargetRow"),z=e(()=>{let Te=ve.current,ke=Te?.offsetWidth||290,tt=Te?.offsetHeight||160,xe=8,be=ie();if(!be){let Oe=window.innerWidth,kt=window.innerHeight,Pe=Math.max(16,(kt-tt)/2),st=Math.max(16,(Oe-ke)/2);je(me=>me!==null&&me.top===Pe&&me.left===st?me:{top:Pe,left:st});return}let ye=be.getBoundingClientRect(),Ce=ye.top-4;Ce+tt>window.innerHeight-16&&(Ce=window.innerHeight-16-tt),Ce<16&&(Ce=16);let Q=ye.right+xe;Q+ke>window.innerWidth-16&&(Q=ye.left-ke-xe),Q<16&&(Q=16),je(Oe=>Oe!==null&&Oe.top===Ce&&Oe.left===Q?Oe:{top:Ce,left:Q})},"updatePosition");z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);let oe=null;return typeof ResizeObserver<"u"&&ve.current&&(oe=new ResizeObserver(z),oe.observe(ve.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[w]),(0,l.useEffect)(()=>{if(w===null)return;He.current&&!He.current.disabled?He.current.focus():ve.current?.focus();let te=w.workspaceId;return()=>{$e(te)}},[w]),(0,l.useEffect)(()=>{w!==null&&T&&ve.current?.focus()},[w,T]),(0,l.useEffect)(()=>{if(w===null)return;let te=e(ie=>{if(ie.key==="Escape"){ie.preventDefault(),ie.stopPropagation(),"stopImmediatePropagation"in ie&&typeof ie.stopImmediatePropagation=="function"&&ie.stopImmediatePropagation(),T||(ue(null),G(null));return}if(ie.key==="Tab"){if(ie.preventDefault(),T){ve.current?.focus();return}let z=He.current,oe=et.current;if(!z||!oe)return;ie.shiftKey?document.activeElement===z?oe.focus():z.focus():document.activeElement===oe?z.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",te,!0),()=>window.removeEventListener("keydown",te,!0)},[w,T]),w===null)return null;let ct=e(()=>{T||(ue(null),G(null))},"close"),bt=e(()=>{$(!0),ue(null);let ie=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(ke=>ke.workspaceId===w.workspaceId),z=n.sessions.list?.getSnapshot?.()?.byId??{},oe=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),Te=(ie?.sessionIds??[]).filter(ke=>Zn(ke,z,oe));ar(n.workspaces,Te,A).then(ke=>{if($(!1),ke.failures.length>0){ue(Mn(ke.failures,f));return}G(null)}).catch(ke=>{$(!1),ue(Dr(ke,f))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:ct}),(0,a.jsxs)("div",{ref:ve,role:"dialog","aria-modal":!0,"aria-label":f("menu.archiveWorkspace"),tabIndex:-1,className:"dsham_sidebarCard",style:Me?{top:Me.top,left:Me.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:f("archiveWorkspace.title",{n:w.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:f("archiveWorkspace.desc",{name:w.title})}),T&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:f("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:He,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:T,onClick:ct,children:f("cancel")}),(0,a.jsx)("button",{ref:et,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:T,onClick:bt,children:f("archiveWorkspace.confirm")})]})]})]})}e(tn,"ArchiveWorkspaceOverlay");function _t(f){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let w=null,T=!1,$=new Map,Ie=!1,ue=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??{},tt=new Set(n.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]);return Te.sessionIds.filter(xe=>Zn(xe,ke,tt))},"workspaceCandidateIds"),Me=e(()=>{if(Ie=!1,!T)for(let[z,oe]of $){if(!z.isConnected){$.delete(z);continue}let Te=ue(oe.workspaceId).length===0;z.disabled=Te,z.style.opacity=Te?"0.5":"",z.style.cursor=Te?"not-allowed":""}},"revalidateItems"),je=e(()=>{if($.size===0||Ie||T)return;Ie=!0;let z=e(()=>Me(),"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(z):setTimeout(z,16)},"scheduleRevalidate"),ve=e(z=>{w=Lr(z.target)},"rememberWorkspace");document.addEventListener("pointerdown",ve,!0),document.addEventListener("click",ve,!0);let He=e(()=>{if(T)return;for(let[oe]of $)oe.isConnected||$.delete(oe);let z=document.querySelectorAll('[role="menu"]');for(let oe of z){if(oe.querySelector('[data-dsham-archive-workspace="true"]'))continue;let Te=Array.from(oe.querySelectorAll('button[role="menuitem"]'));if(Te.length===0)continue;let ke=Te.find(We=>Xn(We,!1))??Te.find(We=>Xn(We,!0));if(!ke)continue;let tt=Te.find(We=>We!==ke)??ke,xe=ke.parentElement;if(!xe)continue;let be=w;if(!be)continue;let Ce=(n.workspaces.list?.getSnapshot?.()?.items??[]).find(We=>We.workspaceId===be.workspaceId),Q=Ce?.path??Ce?.cwd,kt=ue(be.workspaceId).length,Pe=document.createElement("div");Pe.className=xe.className;let st=tt.className.split(/\s+/).filter(We=>!/(?:^|[_-])danger(?:$|[_-])/i.test(We)).join(" "),me=document.createElement("button");me.type="button",me.setAttribute("role","menuitem"),me.dataset.dshamArchiveWorkspace="true",me.className=st;let Ft=tt.querySelector("span"),ut=tt.querySelectorAll("span")[1],nn=document.createElement("span");nn.setAttribute("aria-hidden","true"),Ft?.className&&(nn.className=Ft.className),nn.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 wn=document.createElement("span");if(ut?.className&&(wn.className=ut.className),wn.textContent=f("menu.archiveWorkspace"),me.append(nn,wn),Pe.append(me),kt===0&&(me.disabled=!0,me.style.opacity="0.5",me.style.cursor="not-allowed"),me.addEventListener("click",We=>{We.preventDefault(),We.stopPropagation();let lt=ue(be.workspaceId).length;lt!==0&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),G({workspaceId:be.workspaceId,title:be.title,count:lt}))}),Q){let We=document.createElement("div");We.className=xe.className;let lt=document.createElement("button");lt.type="button",lt.setAttribute("role","menuitem"),lt.dataset.dshamCopyWorkspacePath="true",lt.className=st,lt.disabled=!1,lt.style.opacity="",lt.style.cursor="";let rn=document.createElement("span");rn.setAttribute("aria-hidden","true"),Ft?.className&&(rn.className=Ft.className),rn.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 sn=document.createElement("span");ut?.className&&(sn.className=ut.className),sn.textContent=f("menu.copyWorkspacePath"),lt.append(rn,sn),We.append(lt),lt.addEventListener("click",qt=>{qt.preventDefault(),qt.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),fr(Q).catch(()=>{})});let Sn=document.createElement("div");Sn.className=xe.className;let Fe=document.createElement("button");Fe.type="button",Fe.setAttribute("role","menuitem"),Fe.dataset.dshamOpenExplorer="true",Fe.className=st,Fe.disabled=!1,Fe.style.opacity="",Fe.style.cursor="";let Zt=document.createElement("span");Zt.setAttribute("aria-hidden","true"),Ft?.className&&(Zt.className=Ft.className),Zt.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 an=document.createElement("span");ut?.className&&(an.className=ut.className),an.textContent=f("menu.openInExplorer"),Fe.append(Zt,an),Sn.append(Fe),Fe.addEventListener("click",qt=>{qt.preventDefault(),qt.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),(async()=>{try{let Jt=await fetch(Tn("/open-in-app/open"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({app:"explorer",path:Q})}).catch(()=>null);if(Jt&&Jt.ok)return}catch{}try{await vt("/open-in-explorer",{method:"POST",body:JSON.stringify({path:Q,workspaceId:be.workspaceId})})}catch(Jt){console.warn("archive-manager: open in explorer failed",Jt)}})()}),xe.parentNode?.insertBefore(We,xe),xe.parentNode?.insertBefore(Sn,xe)}xe.parentNode?.insertBefore(Pe,xe),$.set(me,{workspaceId:be.workspaceId})}},"checkAndInject"),et=!1,ct=e(()=>{if(et||T)return;et=!0;let z=e(()=>{et=!1,!T&&He()},"run");typeof requestAnimationFrame=="function"?requestAnimationFrame(z):setTimeout(z,16)},"scheduleInject"),bt=new MutationObserver(z=>{On(z,'[role="menu"]')&&ct()});bt.observe(document.body,{childList:!0,subtree:!0});let te=n.sessions.list?.subscribe?.(je),ie=n.workspaces.list?.subscribe?.(je);return()=>{T=!0,document.removeEventListener("pointerdown",ve,!0),document.removeEventListener("click",ve,!0),bt.disconnect(),te?.(),ie?.(),$.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(_t,"setupWorkspaceMenuInjector");function fn(){return typeof n.slots.entries!="function"?!1:n.slots.entries("sidebar.workspaces").some(f=>f.children?.[O]!==void 0)}e(fn,"hostSidebarDeclaresSessionMenu");let pt,Ht,Rt,gn,vn,bn,Wt,yn=e(()=>{let f=fn()?"menu":"waiting";f!==pt&&(pt=f,f==="menu"&&(Ht??=n.slots.inject(O,()=>n.slots.register({name:O,id:"archive-manager.delete-session",order:500,locale:Je,inject:e(()=>({}),"inject")},Qe)),Rt??=n.slots.inject(O,()=>n.slots.register({name:O,id:"archive-manager.favorite",order:50,locale:Je,inject:e(()=>({favoriteRow:pe}),"inject")},Tt)),gn??=n.slots.inject(O,()=>n.slots.register({name:O,id:"archive-manager.move-session",order:480,locale:Je,inject:e(()=>({}),"inject")},Ut)),vn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:Je,inject:e(()=>({t:n.locale.bind(Je)}),"inject")},Z)),bn??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:Je,inject:e(()=>({t:n.locale.bind(Je)}),"inject")},tn)),Wt??=n.slots.inject("shell.overlay",()=>n.slots.register({name:"shell.overlay",id:"archive-manager.toast",locale:Je,inject:e(()=>({}),"inject")},Ne))))},"reconcileSidebar");yn(),n.effect(()=>_t(n.locale.bind(Je)),"archive-manager: workspace menu injector"),n.effect(()=>Br(),"archive-manager: sidebar row contextmenu trigger"),$r(n);let Nt=typeof n.on=="function"?n.on("slots/changed",f=>{if(f==="sidebar.workspaces")try{yn()}catch(w){console.warn("archive-manager: sidebar mode switch failed",w)}}):void 0;n.effect(()=>()=>{Nt?.(),Ht?.(),Rt?.(),gn?.(),vn?.(),bn?.(),Wt?.()},"archive-manager: sidebar mode");let gt=e(()=>({archiveSessions:J,archiveSession:e((f,w)=>n.workspaces.archiveSession(f,w),"archiveSession"),sessionStore:sr(n.sessions.list),workspaceStore:sr(n.workspaces.list),unarchiveSession:Ct,deleteSession:W,unarchiveSessions:K,deleteArchivedSessions:Ue,archivedSessionMetadata:rt,openConversation:u,focusSessionWorkspace:S,viewState:i,favoriteSessions:Ye,setSessionFavorite:ee,favoriteSync:pe,organizeBatch:wt,diagnoseOrphanSubagents:R,cleanOrphanSubagents:_e,diagnoseSessionCaches:F,rebuildSessionCaches:h,refreshCacheLists:ge,searchSessionContent:ot,searchArchivedContent:ce,previewArchivedSession:Xe,t:n.locale.bind(Je)}),"buildArchivedSectionProps"),vt=e(async(f,w)=>{let T=Tn(`/api/michengai/dsh-archive-manager${f}`),$=Object.assign({"content-type":"application/json","x-michengai-plugin-update":"1"},w?.headers),Ie=await fetch(T,Object.assign({},w,{headers:$})),ue=await Ie.json();if(!Ie.ok||!ue||ue.ok===!1)throw new Error((ue&&typeof ue=="object"&&typeof ue.error=="string"?ue.error:void 0)||`HTTP ${Ie.status}`);return ue},"callSettingsApi");nt=Sr(n,{callApi:vt,renderPanel:e(f=>(0,a.jsx)(Gn,Object.assign({},gt(),f)),"renderPanel"),injectProps:gt,ns:Je,onOnlineUpdateChange:e(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-update-toggle"))},"onOnlineUpdateChange"),onSidebarFavoriteStarChange:e(f=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("dsham-favorite-star-toggle",{detail:{enabled:f}}))},"onSidebarFavoriteStarChange")}),n.effect(()=>()=>nt?.destroy(),"archive-manager: sidebar entry"),n.effect(()=>Ys({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:de,isEnabled:e(()=>nt.isOnlineUpdateEnabled(),"isEnabled")}),"dsh-archive-manager: plugin update ui"),n.slots.inject("settings.section",()=>{try{return n.slots.register({name:"settings.section",id:"archive-manager",order:45,label:e(()=>n.locale.bind(Je)("archived.badge"),"label"),icon:"archive",locale:Je,inject:gt},Gn)}catch(f){return console.warn("archive-manager: register settings.section failed:",f),()=>{}}})}e(Fa,"applyWorkspaceBrowser");async function Ba(n,r,i,d){try{await r(n)}catch(m){i(pa(m,d))}}return e(Ba,"forkWithFeedback"),o.__test={forkWithFeedback:Ba,favoritesOnlyVisibility:Er,favoriteGroupPredicate:Ar,createFavoriteRowStore:Tr,unarchivedSessionIds:es,ArchiveSelectionToolbar:Kr,ArchivedSessionsSection:Gn,zh:rs,en:ss,displayTitle:it,sessionVisible:Qt,indexSubagentDescendants:Nn,isUnknownSessionError:Dn,deriveGroups:Sa,deriveFlat:ka,deriveSearchResults:xa,deriveArchivedGroups:ts,sortArchivedGroups:ns,deriveArchivedBatchIds:pn,archivedSessionIdsInGroups:Jr,pruneArchivedSelection:Xr,toggleArchivedSelection:rr,archivedDeleteFeedback:Qr,isWorkspaceTaskCandidate:Zn,isWorkspaceDeleteMenuItem:Xn,workspaceMenuTriggerFrom:Lr,findRowMenuButton:Jn,isRowMenuButton:Fr,setupSidebarRowContextMenu:Br,applySettingsNavIcon:Vr,restoreSettingsNavIcon:Gr,installSettingsNavIcon:$r,mutationTouches:On,resolveRowHasStatus:cn,activeSessionActivity:zn,activeSessionRefusal:Mr,activeArchiveFromMessage:zr,archiveSessionsViaOfficial:ar,unarchiveSessionsViaOfficial:is,createUnarchiveSession:as,createWorkspaceViewStore:la,migrateWorkspaceViewPersist:Rr,WORKSPACE_VIEW_PERSIST_KEY:jn,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:_r,bindObservable:sr,groupByWorkspace:Pr,byRecency:hn,ARCHIVE_MANAGER_REMOTE:It,currentSessionId:Dt,setupSidebarEntry:Sr,setupWorkspaceFavoritesOnly:Ir},o.apply=La,o.inject=Pa,s.exports}e(ji,"startArchiveClient");
|
|
24
24
|
|
|
25
25
|
return module.exports.startArchiveClient(require);
|
|
26
26
|
}
|