@michengai/dsh-archive-manager 1.1.1 → 1.1.3
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 +12 -0
- package/CHANGELOG.zh-CN.md +12 -0
- package/lib/client.js +3 -3
- package/lib/projcache.js +10 -3
- package/lib/workspace.js +8 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -7,7 +7,7 @@ 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 Un=Object.defineProperty;var qa=Object.getOwnPropertyDescriptor;var Ga=Object.getOwnPropertyNames;var Ua=Object.prototype.hasOwnProperty;var t=(r,o)=>Un(r,"name",{value:o,configurable:!0});var Va=(r,o)=>{for(var d in o)Un(r,d,{get:o[d],enumerable:!0})},Wa=(r,o,d,y)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of Ga(o))!Ua.call(r,n)&&n!==d&&Un(r,n,{get:()=>o[n],enumerable:!(y=qa(o,n))||y.enumerable});return r};var Xa=r=>Wa(Un({},"__esModule",{value:!0}),r);var pi={};Va(pi,{startArchiveClient:()=>hi});module.exports=Xa(pi);function Ce(r){if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return r}t(Ce,"record");function nt(r){return String(r&&typeof r=="object"&&"message"in r?r.message??r:r)}t(nt,"errorMessage");function un(r){return r&&typeof r=="object"&&"code"in r?r.code:void 0}t(un,"errorCode");var lr=Function("return globalThis.__dshArchiveReact")(),{Children:yi,Component:bi,Fragment:wi,Profiler:xi,PureComponent:Si,StrictMode:ki,Suspense:_i,cloneElement:Ri,createContext:Ci,createElement:Ii,createRef:Ai,forwardRef:Ei,isValidElement:ji,lazy:Di,memo:Ti,startTransition:Ni,useCallback:Mi,useContext:Oi,useDebugValue:Hi,useDeferredValue:Pi,useEffect:zi,useId:Bi,useImperativeHandle:Fi,useInsertionEffect:Li,useLayoutEffect:qi,useMemo:Gi,useReducer:Ui,useRef:Vi,useState:Wi,useSyncExternalStore:Xi,useTransition:Ki,version:$i}=lr,L=lr;function cr(r){return L.createElement("input",{className:"dsham_number",type:"number",min:r.min,max:r.max,value:r.value??"",disabled:r.disabled,"aria-label":r["aria-label"],onChange:t(o=>{let d=o.target.value;if(d===""){r.onChange(null);return}let y=Number(d);r.onChange(Number.isNaN(y)?null:y)},"onChange")})}t(cr,"NumberField");function dr(r){function o(d,y){let n=d==="from"?y:r.from,i=d==="to"?y:r.to;if(n===""&&i===""){r.onClear();return}d==="from"?r.onFrom(y):r.onTo(y)}return t(o,"change"),L.createElement("div",{className:"dsham_dateRange",role:"group","aria-label":r.label},L.createElement("input",{className:"dsham_date",type:"date",value:r.from,"aria-label":r.fromLabel,"aria-invalid":r.invalid||void 0,onChange:t(d=>o("from",d.target.value),"onChange")}),L.createElement("span",{className:"dsham_dateSep","aria-hidden":!0,children:"\u2013"}),L.createElement("input",{className:"dsham_date",type:"date",value:r.to,"aria-label":r.toLabel,"aria-invalid":r.invalid||void 0,onChange:t(d=>o("to",d.target.value),"onChange")}),r.from||r.to?L.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:r.onClear,children:"\xD7"}):null)}t(dr,"DateRange");function hn(r){return L.createElement("div",{className:r.className},L.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":r.open,onClick:r.onToggle},Ka(L.createElement,r.open),r.title),r.open?L.createElement("div",null,r.children):null)}t(hn,"Disclosure");function Ka(r,o){return r("svg",{className:"dsham_foldChevron"+(o?" is-open":""),viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0},r("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}t(Ka,"foldChevron");function os(r){let o=L.useRef(null);return L.useEffect(()=>{o.current&&(o.current.indeterminate=!!r.indeterminate&&!r.checked)},[r.indeterminate,r.checked]),L.createElement("input",{ref:o,className:"dsham_checkbox",type:"checkbox",checked:r.checked,disabled:r.disabled,"aria-label":r.label,onChange:t(d=>r.onChange({target:{checked:d.target.checked}}),"onChange")})}t(os,"SelectionCheckbox");var Cn={"health.archived":"\u5DF2\u5F52\u6863\u4F1A\u8BDD\u9700\u8981\u68C0\u67E5","health.unarchived":"\u672A\u5F52\u6863\u4F1A\u8BDD\u9700\u8981\u68C0\u67E5","health.heading":"\u8BCA\u65AD\u4E0E\u4FEE\u590D","health.scopeArchived":"\u68C0\u67E5\u8303\u56F4\uFF1A\u5168\u90E8\u5DF2\u5F52\u6863\u4F1A\u8BDD\uFF0C\u4E0D\u53D7\u5217\u8868\u7B5B\u9009\u5F71\u54CD\u3002","health.scopeUnarchived":"\u68C0\u67E5\u8303\u56F4\uFF1A\u5168\u90E8\u672A\u5F52\u6863\u4F1A\u8BDD\uFF0C\u4E0D\u53D7\u5217\u8868\u7B5B\u9009\u5F71\u54CD\u3002\u4FEE\u590D\u524D\u9700\u5148\u5F52\u6863\u5E76\u5173\u95ED\u4F1A\u8BDD\u3002","health.retry":"\u91CD\u65B0\u68C0\u6D4B","health.busy":"\u5904\u7406\u4E2D\u2026","health.confirm":"\u786E\u8BA4\u4FEE\u590D","health.diagnose":"\u8BCA\u65AD\u4F1A\u8BDD","health.technical":"\u6280\u672F\u8BE6\u60C5","health.notice":"\u4F1A\u8BDD\u4FEE\u590D\u5B8C\u6210\uFF0C\u5DF2\u91CD\u65B0\u8BFB\u53D6\u8BE6\u60C5\u3002","health.legacy-source.reason":"\u65E7\u7248\u6D88\u606F\u6765\u6E90\u4E0D\u53D7\u65B0\u7248 DSH \u652F\u6301","health.legacy-source.advice":"\u8FD0\u884C\u8BCA\u65AD\uFF0C\u68C0\u67E5\u662F\u5426\u4E3A\u53EF\u8F6C\u6362\u7684\u65E7\u7248\u6765\u6E90\u3002","health.repair-frame.reason":"\u65E7\u7248\u4FEE\u590D\u751F\u6210\u7684\u538B\u7F29\u683C\u5F0F\u4E0D\u7B26\u5408\u5BBF\u4E3B\u8981\u6C42","health.repair-frame.advice":"\u91CD\u65B0\u8BCA\u65AD\u53EF\u7EA0\u6B63\u538B\u7F29\u5E27\u683C\u5F0F\uFF0C\u539F\u59CB\u65E5\u5FD7\u4FDD\u6301\u4E0D\u53D8\u3002","health.missing.reason":"\u4F1A\u8BDD\u65E5\u5FD7\u6216\u9644\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728","health.missing.advice":"\u68C0\u67E5\u539F\u76EE\u5F55\u6216\u78C1\u76D8\u662F\u5426\u53EF\u7528\uFF1B\u7F3A\u5931\u6B63\u6587\u4E0D\u80FD\u901A\u8FC7\u91CD\u5EFA\u7F13\u5B58\u6062\u590D\u3002","health.permission.reason":"\u6CA1\u6709\u6743\u9650\u8BFB\u53D6\u4F1A\u8BDD\u6587\u4EF6","health.permission.advice":"\u68C0\u67E5\u76EE\u5F55\u8BBF\u95EE\u6743\u9650\u3001\u6587\u4EF6\u5360\u7528\u4E0E\u5B89\u5168\u8F6F\u4EF6\u9650\u5236\uFF0C\u518D\u91CD\u8BD5\u3002","health.corrupt.reason":"\u4F1A\u8BDD\u65E5\u5FD7\u53EF\u80FD\u635F\u574F\u6216\u672A\u5B8C\u6574\u5199\u5165","health.corrupt.advice":"\u4FDD\u7559\u73B0\u6709\u65E5\u5FD7\uFF0C\u68C0\u67E5\u78C1\u76D8\u548C\u539F\u59CB\u6587\u4EF6\uFF1B\u4E0D\u81EA\u52A8\u622A\u65AD\u6216\u5220\u9664\u6D88\u606F\u3002","health.unknown.reason":"\u4F1A\u8BDD\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6","health.unknown.advice":"\u5148\u91CD\u8BD5\uFF1B\u4ECD\u5931\u8D25\u65F6\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\uFF0C\u6309\u5177\u4F53\u9519\u8BEF\u68C0\u67E5\u5BBF\u4E3B\u517C\u5BB9\u6027\u3002","health.healthy.reason":"\u4F1A\u8BDD\u5DF2\u53EF\u6B63\u5E38\u8BFB\u53D6","health.healthy.advice":"\u5237\u65B0\u4F1A\u8BDD\u8BE6\u60C5\u5373\u53EF\uFF0C\u65E0\u9700\u4FEE\u590D\u3002","health.ready.reason":"\u53D1\u73B0 {n} \u5904\u65E7\u7248\u6765\u6E90\uFF0C\u5DF2\u901A\u8FC7\u5BBF\u4E3B\u683C\u5F0F\u8F6C\u6362\u6821\u9A8C","health.ready.advice":"\u5C06\u6765\u6E90\u6539\u5199\u4E3A\u5BBF\u4E3B\u652F\u6301\u7684\u63D2\u4EF6\u5F52\u5C5E\uFF0C\u4FDD\u7559\u6B63\u6587\uFF0C\u751F\u6210\u65B0\u7248\u65E5\u5FD7\uFF1B\u65E7\u65E5\u5FD7\u539F\u6837\u4FDD\u7559\u3002\u8BF7\u786E\u4FDD\u5176\u4ED6 DSH \u8FDB\u7A0B\u672A\u6253\u5F00\u8BE5\u4F1A\u8BDD\u3002","health.ready-frame.reason":"\u53D1\u73B0\u65E7\u7248\u4FEE\u590D\u7684\u538B\u7F29\u5E27\u95EE\u9898\uFF0C\u5DF2\u901A\u8FC7\u5BBF\u4E3B\u8BFB\u53D6\u6821\u9A8C","health.ready-frame.advice":"\u7EA0\u6B63\u538B\u7F29\u5E27\u683C\u5F0F\uFF0C\u4FDD\u7559\u6B63\u6587\u53CA\u539F\u59CB\u65E5\u5FD7\u3002\u8BF7\u786E\u4FDD\u5176\u4ED6 DSH \u8FDB\u7A0B\u672A\u6253\u5F00\u8BE5\u4F1A\u8BDD\u3002","health.blocked.reason":"\u6682\u4E0D\u80FD\u81EA\u52A8\u4FEE\u590D","health.blocked.advice":"\u8BF7\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\u67E5\u770B\u5177\u4F53\u9650\u5236\uFF0C\u5904\u7406\u540E\u91CD\u65B0\u8BCA\u65AD\u3002","health.repaired.reason":"\u4FEE\u590D\u5B8C\u6210\uFF0C\u5BBF\u4E3B\u5DF2\u80FD\u6B63\u5E38\u8BFB\u53D6","health.repaired.advice":"\u65E7\u65E5\u5FD7\u4FDD\u7559\uFF0C\u5F52\u6863\u72B6\u6001\u4E0D\u53D8\uFF1B\u53EF\u4EE5\u91CD\u65B0\u9884\u89C8\u6216\u6253\u5F00\u4F1A\u8BDD\u3002","health.published-unreadable.reason":"\u65B0\u7248\u65E5\u5FD7\u5DF2\u751F\u6210\uFF0C\u4F46\u5BBF\u4E3B\u590D\u8BFB\u672A\u901A\u8FC7","health.published-unreadable.advice":"\u65E7\u65E5\u5FD7\u4ECD\u4FDD\u7559\uFF0C\u8BF7\u91CD\u542F DSH \u540E\u91CD\u65B0\u8BCA\u65AD\uFF1B\u4E0D\u8981\u53CD\u590D\u4FEE\u590D\u6216\u5220\u9664\u65E5\u5FD7\u3002","health.failed.reason":"\u64CD\u4F5C\u672A\u5B8C\u6210","health.failed.advice":"\u8BF7\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\u67E5\u770B\u9519\u8BEF\uFF0C\u5904\u7406\u540E\u91CD\u65B0\u8BCA\u65AD\u3002"},ls={"health.archived":"Archived sessions need attention","health.unarchived":"Unarchived sessions need attention","health.heading":"Diagnosis and repair","health.scopeArchived":"Checks all archived sessions, regardless of list filters.","health.scopeUnarchived":"Checks all unarchived sessions, regardless of list filters. Archive and close a session before repairing it.","health.retry":"Check again","health.busy":"Processing\u2026","health.confirm":"Confirm repair","health.diagnose":"Diagnose session","health.technical":"Technical details","health.notice":"Session repaired. Details have been refreshed.","health.legacy-source.reason":"The new DSH version does not support this legacy message source","health.legacy-source.advice":"Run a diagnosis to check whether the legacy source can be converted.","health.repair-frame.reason":"A previous repair used an unsupported compression format","health.repair-frame.advice":"Run a diagnosis to correct the compression frames while preserving the original log.","health.missing.reason":"The session log or attachment path does not exist","health.missing.advice":"Check the original directory and disk. Rebuilding the cache cannot recover missing messages.","health.permission.reason":"Permission to read the session files was denied","health.permission.advice":"Check directory permissions, file locks and security software, then retry.","health.corrupt.reason":"The session log may be corrupt or incomplete","health.corrupt.advice":"Keep the existing log and check the disk and original files. Messages will not be truncated or deleted automatically.","health.unknown.reason":"The session cannot currently be read","health.unknown.advice":"Retry first. If it still fails, expand technical details to check host compatibility.","health.healthy.reason":"The session can be read normally","health.healthy.advice":"Refresh the session details. No repair is needed.","health.ready.reason":"Found {n} legacy sources; host format validation passed","health.ready.advice":"Rewrite the sources to a host-supported plugin attribution and generate a new log, preserving messages and the original log. Ensure no other DSH process has the session open.","health.ready-frame.reason":"Found compression frame issues from a previous repair; host validation passed","health.ready-frame.advice":"Correct the compression frames, preserving messages and the original log. Ensure no other DSH process has the session open.","health.blocked.reason":"Automatic repair is currently unavailable","health.blocked.advice":"Expand technical details to see the restriction. Resolve it before diagnosing again.","health.repaired.reason":"Repair complete; the host can read the session","health.repaired.advice":"The original log and archive status are preserved. You can preview or open the session again.","health.published-unreadable.reason":"A new log was generated, but the host could not read it back","health.published-unreadable.advice":"The original log is preserved. Restart DSH and diagnose again. Do not repeatedly repair or delete logs.","health.failed.reason":"The operation did not complete","health.failed.advice":"Expand technical details to inspect the error. Resolve it before diagnosing again."},cs={"health.archived":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0442\u0440\u0435\u0431\u0443\u044E\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F","health.unarchived":"\u041D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0442\u0440\u0435\u0431\u0443\u044E\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F","health.heading":"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430 \u0438 \u0440\u0435\u043C\u043E\u043D\u0442","health.scopeArchived":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430.","health.scopeUnarchived":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442 \u0432\u0441\u0435 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430. \u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0437\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0435\u0441\u0441\u0438\u044E \u043F\u0435\u0440\u0435\u0434 \u0440\u0435\u043C\u043E\u043D\u0442\u043E\u043C.","health.retry":"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430","health.busy":"\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430\u2026","health.confirm":"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0440\u0435\u043C\u043E\u043D\u0442","health.diagnose":"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","health.technical":"\u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438","health.notice":"\u0421\u0435\u0441\u0441\u0438\u044F \u043E\u0442\u0440\u0435\u043C\u043E\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0430. \u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B.","health.legacy-source.reason":"\u041D\u043E\u0432\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F DSH \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u044D\u0442\u043E\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439","health.legacy-source.advice":"\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C, \u043C\u043E\u0436\u043D\u043E \u043B\u0438 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A.","health.repair-frame.reason":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u043C\u043E\u043D\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043B \u043D\u0435\u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0441\u0436\u0430\u0442\u0438\u044F","health.repair-frame.advice":"\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443, \u0447\u0442\u043E\u0431\u044B \u0438\u0441\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u0434\u0440\u044B \u0441\u0436\u0430\u0442\u0438\u044F, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0432 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B.","health.missing.reason":"\u041F\u0443\u0442\u044C \u043A \u0436\u0443\u0440\u043D\u0430\u043B\u0443 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u043B\u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442","health.missing.advice":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u0438 \u0434\u0438\u0441\u043A. \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043A\u044D\u0448\u0430 \u043D\u0435 \u0432\u0435\u0440\u043D\u0451\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u044E\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","health.permission.reason":"\u041E\u0442\u043A\u0430\u0437\u0430\u043D\u043E \u0432 \u0434\u043E\u0441\u0442\u0443\u043F\u0435 \u043A \u0444\u0430\u0439\u043B\u0430\u043C \u0441\u0435\u0441\u0441\u0438\u0438","health.permission.advice":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u0440\u0430\u0432\u0430 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430, \u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432 \u0438 \u0430\u043D\u0442\u0438\u0432\u0438\u0440\u0443\u0441, \u0437\u0430\u0442\u0435\u043C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","health.corrupt.reason":"\u0416\u0443\u0440\u043D\u0430\u043B \u0441\u0435\u0441\u0441\u0438\u0438 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0451\u043D \u0438\u043B\u0438 \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u043C","health.corrupt.advice":"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0438\u0441\u043A \u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B. \u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u043E\u0431\u0440\u0435\u0437\u0430\u043D\u044B \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","health.unknown.reason":"\u0421\u0435\u0441\u0441\u0438\u044E \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C","health.unknown.advice":"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435. \u0415\u0441\u043B\u0438 \u043D\u0435 \u043F\u043E\u043C\u043E\u0436\u0435\u0442, \u0440\u0430\u0441\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u043E\u0441\u0442\u0438 \u0441 \u0445\u043E\u0441\u0442\u043E\u043C.","health.healthy.reason":"\u0421\u0435\u0441\u0441\u0438\u044F \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F \u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u043E","health.healthy.advice":"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u0441\u0435\u0441\u0441\u0438\u0438. \u0420\u0435\u043C\u043E\u043D\u0442 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F.","health.ready.reason":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432: {n}; \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0444\u043E\u0440\u043C\u0430\u0442\u0430 \u0445\u043E\u0441\u0442\u0430 \u043F\u0440\u043E\u0439\u0434\u0435\u043D\u0430","health.ready.advice":"\u041F\u0435\u0440\u0435\u043F\u0438\u0448\u0438\u0442\u0435 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438 \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u0443\u044E \u0445\u043E\u0441\u0442\u043E\u043C \u0430\u0442\u0440\u0438\u0431\u0443\u0446\u0438\u044E \u043F\u043B\u0430\u0433\u0438\u043D\u0430 \u0438 \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0432 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u0441\u0435\u0441\u0441\u0438\u044E \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441 DSH.","health.ready-frame.reason":"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u043A\u0430\u0434\u0440\u043E\u0432 \u0441\u0436\u0430\u0442\u0438\u044F \u043E\u0442 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u0440\u0435\u043C\u043E\u043D\u0442\u0430; \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0445\u043E\u0441\u0442\u0430 \u043F\u0440\u043E\u0439\u0434\u0435\u043D\u0430","health.ready-frame.advice":"\u0418\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u043A\u0430\u0434\u0440\u044B \u0441\u0436\u0430\u0442\u0438\u044F, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0432 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u0441\u0435\u0441\u0441\u0438\u044E \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441 DSH.","health.blocked.reason":"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0440\u0435\u043C\u043E\u043D\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D","health.blocked.advice":"\u0420\u0430\u0441\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0435. \u0423\u0441\u0442\u0440\u0430\u043D\u0438\u0442\u0435 \u0435\u0433\u043E \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0439 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u043E\u0439.","health.repaired.reason":"\u0420\u0435\u043C\u043E\u043D\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D; \u0445\u043E\u0441\u0442 \u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","health.repaired.advice":"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B. \u041C\u043E\u0436\u043D\u043E \u0441\u043D\u043E\u0432\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0438\u043B\u0438 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E.","health.published-unreadable.reason":"\u041D\u043E\u0432\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0441\u043E\u0437\u0434\u0430\u043D, \u043D\u043E \u0445\u043E\u0441\u0442 \u043D\u0435 \u0441\u043C\u043E\u0433 \u0435\u0433\u043E \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C","health.published-unreadable.advice":"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D. \u041F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 DSH \u0438 \u043F\u0440\u043E\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443 \u0441\u043D\u043E\u0432\u0430. \u041D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0439\u0442\u0435 \u0440\u0435\u043C\u043E\u043D\u0442 \u0438 \u043D\u0435 \u0443\u0434\u0430\u043B\u044F\u0439\u0442\u0435 \u0436\u0443\u0440\u043D\u0430\u043B\u044B.","health.failed.reason":"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043D\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430","health.failed.advice":"\u0420\u0430\u0441\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u0438\u0437\u0443\u0447\u0438\u0442\u044C \u043E\u0448\u0438\u0431\u043A\u0443. \u0423\u0441\u0442\u0440\u0430\u043D\u0438\u0442\u0435 \u0435\u0451 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0439 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u043E\u0439."};var Dt=t(r=>{if(typeof r!="string"||!r.length||r.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return r},"id"),mr=t((r,o=!1)=>{if(typeof r!="string"||r.length>200||o&&!r.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return r.trim()},"queryText"),ur={parse(r){let o=Ce(r);if(!o||!Array.isArray(o.sessionIds)||!o.sessionIds.length||o.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u68C0\u7D22\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(o.sessionIds.map(Dt))],query:mr(o.query,!0)}}},$a={parse(r){let o=Ce(r);if(!o)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:Dt(o.sessionId),query:mr(o.query??"")}}},jt=t((r,o)=>{if(typeof r!="string"||r.length>o)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return r},"boundedString"),In=t(r=>{if(typeof r!="number"||!Number.isSafeInteger(r)||r<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return r},"sequence"),ds={parse(r){let o=Ce(r);if(!o||!Array.isArray(o.items)||!Array.isArray(o.failures)||o.items.length>20||o.failures.length>20)throw new TypeError("\u68C0\u7D22\u7ED3\u679C\u65E0\u6548");return{items:o.items.map(Ce).map(d=>({sessionId:Dt(d.sessionId),seq:In(d.seq),snippet:jt(d.snippet,400)})),failures:o.failures.map(Ce).map(d=>({sessionId:Dt(d.sessionId),message:jt(d.message,500)}))}}},Ya={parse(r){let o=Ce(r);if(!o||!Array.isArray(o.messages)||o.messages.length>8||typeof o.hasEarlier!="boolean"||typeof o.hasLater!="boolean")throw new TypeError("\u9884\u89C8\u7ED3\u679C\u65E0\u6548");return{sessionId:Dt(o.sessionId),hasEarlier:o.hasEarlier,hasLater:o.hasLater,messages:o.messages.map(Ce).map(d=>{if(typeof d.role!="string"||!["user","assistant"].includes(d.role)||typeof d.truncated!="boolean")throw new TypeError("\u6D88\u606F\u89D2\u8272\u6216\u622A\u65AD\u72B6\u6001\u65E0\u6548");return{seq:In(d.seq),role:d.role,text:jt(d.text,2e3),truncated:d.truncated}})}}},Ja={parse(r){let o=Ce(r);if(!o||!Array.isArray(o.sessionIds)||!o.sessionIds.length||o.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(o.sessionIds.map(Dt))]}}},us={parse(r){let o=Ce(r);if(!o||!Array.isArray(o.items)||o.items.length>20)throw new TypeError("\u4F1A\u8BDD\u8BE6\u60C5\u65E0\u6548");return{items:o.items.map(Ce).map(d=>({sessionId:Dt(d.sessionId),...d.createdAt!==void 0?{createdAt:In(d.createdAt)}:{},turnCount:d.turnCount===null?null:In(d.turnCount),path:d.path===null?null:jt(d.path,32768),error:jt(d.error,500)}))}}};function hs(r,o,d){let y=typeof r=="number"&&Number.isSafeInteger(r)&&r>=0,n=typeof o=="number"&&Number.isSafeInteger(o)&&o>=0;return y!==n?y?-1:1:y&&n?d==="turnsAsc"?r-o:o-r:0}t(hs,"compareTurnCounts");async function gr(r,o=globalThis.navigator?.clipboard){if(typeof r!="string"||!r)throw Object.assign(new Error("\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9"),{code:"copy.empty"});if(!o?.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 o.writeText(r)}catch{throw Object.assign(new Error("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5"),{code:"copy.denied"})}}t(gr,"copySessionText");function fr(){let r=t((d,y)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${d}`,create:t(()=>y,"create"),schema:y}),"codec");return[["searchSessionContent",ur,ds],["diagnoseSession",hr,pr],["repairSession",hr,pr],["sessionDetails",Ja,us],["searchArchivedContent",ur,ds],["previewArchivedSession",$a,Ya]].map(([d,y,n])=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${d}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:d,invocation:{kind:"direct"},parameters:[{name:"input",wire:"input",source:"json",codec:r(d+"Input",y)}],result:r(d+"Result",n),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(fr,"discoveryInvocations");function vr(r,o){let d=o?.trim().toLowerCase();if(!d)return null;let y=r.toLowerCase().indexOf(d);if(y<0)return null;let n=0,i=0,c;for(let O of r){let N=i+O.toLowerCase().length;if(c===void 0&&N>y&&(c=n),n+=O.length,N>=y+d.length)return{start:c??n,end:n};i=N}return null}t(vr,"findTextRange");function yr(r,o){return[...new Set(r)].map(d=>o[d]??{id:d})}t(yr,"sessionDetailCandidates");function Vn(r,o=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(r))return NaN;let[d,y,n]=r.split("-").map(Number),i=new Date(d,y-1,n);return i.getFullYear()!==d||i.getMonth()!==y-1||i.getDate()!==n?NaN:(o&&i.setDate(i.getDate()+1),i.getTime())}t(Vn,"dayBoundary");function ps(r,o){return(!r||Number.isFinite(Vn(r)))&&(!o||Number.isFinite(Vn(o)))&&(!r||!o||r<=o)}t(ps,"validUpdatedRange");function br(r,o,d){if(!ps(o,d))return!1;if(!o&&!d)return!0;let y=typeof r=="number"?r:Date.parse(r??"");return Number.isFinite(y)&&(!o||y>=Vn(o))&&(!d||y<Vn(d,!0))}t(br,"matchesUpdatedRange");async function wr(r,o,d,{signal:y,onProgress:n}={}){let i=[],c=[],O=[...new Set(r)],N=t(()=>{if(y?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let B=0;B<O.length;B+=20){N();let j=ds.parse(await d({sessionIds:O.slice(B,B+20),query:o}));N(),i.push(...j.items),c.push(...j.failures),n?.({done:Math.min(B+20,O.length),total:O.length,items:[...i],failures:[...c]})}return N(),{items:i,failures:c}}t(wr,"searchArchiveBatches");function xr(r){let o=nt(r),d={"repair-frame":["\u65E7\u7248\u4FEE\u590D\u751F\u6210\u7684\u538B\u7F29\u683C\u5F0F\u4E0D\u7B26\u5408\u5BBF\u4E3B\u8981\u6C42","\u91CD\u65B0\u8BCA\u65AD\u53EF\u7EA0\u6B63\u538B\u7F29\u5E27\u683C\u5F0F\uFF0C\u539F\u59CB\u65E5\u5FD7\u4FDD\u6301\u4E0D\u53D8\u3002"],"legacy-source":["\u65E7\u7248\u6D88\u606F\u6765\u6E90\u4E0D\u53D7\u65B0\u7248 DSH \u652F\u6301","\u8FD0\u884C\u8BCA\u65AD\uFF0C\u68C0\u67E5\u662F\u5426\u4E3A\u53EF\u8F6C\u6362\u7684\u65E7\u7248\u6765\u6E90\u3002"],missing:["\u4F1A\u8BDD\u65E5\u5FD7\u6216\u9644\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728","\u68C0\u67E5\u539F\u76EE\u5F55\u6216\u78C1\u76D8\u662F\u5426\u53EF\u7528\uFF1B\u7F3A\u5931\u6B63\u6587\u4E0D\u80FD\u901A\u8FC7\u91CD\u5EFA\u7F13\u5B58\u6062\u590D\u3002"],permission:["\u6CA1\u6709\u6743\u9650\u8BFB\u53D6\u4F1A\u8BDD\u6587\u4EF6","\u68C0\u67E5\u76EE\u5F55\u8BBF\u95EE\u6743\u9650\u3001\u6587\u4EF6\u5360\u7528\u4E0E\u5B89\u5168\u8F6F\u4EF6\u9650\u5236\uFF0C\u518D\u91CD\u8BD5\u3002"],corrupt:["\u4F1A\u8BDD\u65E5\u5FD7\u53EF\u80FD\u635F\u574F\u6216\u672A\u5B8C\u6574\u5199\u5165","\u4FDD\u7559\u73B0\u6709\u65E5\u5FD7\uFF0C\u68C0\u67E5\u78C1\u76D8\u548C\u539F\u59CB\u6587\u4EF6\uFF1B\u4E0D\u81EA\u52A8\u622A\u65AD\u6216\u5220\u9664\u6D88\u606F\u3002"],unknown:["\u4F1A\u8BDD\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6","\u5148\u91CD\u8BD5\uFF1B\u4ECD\u5931\u8D25\u65F6\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\uFF0C\u6309\u5177\u4F53\u9519\u8BEF\u68C0\u67E5\u5BBF\u4E3B\u517C\u5BB9\u6027\u3002"]},y={ENOENT:"missing",EACCES:"permission",EPERM:"permission"},n=[["repair-frame",/first frame is not exactly one header line/],["legacy-source",/unclassified message source/],["missing",/ENOENT|不存在|not found/i],["permission",/EACCES|EPERM|permission/i],["corrupt",/corrupt|JSON|incomplete|truncat|损坏|SessionFormatError/i]],i=un(r),c=r&&typeof r=="object"&&"name"in r?String(r.name??""):"",O=typeof i=="string"?y[i]??i:"";if(Object.hasOwn(d,O)){let[M,G]=d[O];return{code:O,reason:M,advice:G}}if(/requires toolCallId matching its tool source|tool call id requires a nonempty string/i.test(o))return{code:"corrupt",reason:"\u65E5\u5FD7\u5C3E\u90E8\u6709\u672A\u95ED\u5408\u7684\u5DE5\u5177\u8C03\u7528\uFF0C\u4E14 toolCallId \u4E3A\u7A7A",advice:"\u4FDD\u7559\u73B0\u6709\u65E5\u5FD7\uFF0C\u68C0\u67E5\u78C1\u76D8\u548C\u539F\u59CB\u6587\u4EF6\uFF1B\u4E0D\u81EA\u52A8\u622A\u65AD\u6216\u6539\u5199\u65E5\u5FD7\u3002"};let j=(c==="SessionFormatError"||c==="SessionPersistenceCorruptionError"?"corrupt":void 0)??n.find(([,M])=>M.test(o))?.[0]??"unknown",[Q,C]=d[j];return{code:j,reason:Q,advice:C}}t(xr,"classifySessionError");var hr={parse(r){let o=Ce(r),d=Dt(o?.sessionId);if(o?.token!==void 0&&(typeof o.token!="string"||!/^[a-f0-9]{64}$/.test(o.token)))throw new TypeError("\u4FEE\u590D\u51ED\u636E\u65E0\u6548");return{sessionId:d,...o.token!==void 0?{token:o.token}:{}}}},pr={parse(r){let o=Ce(r);if(!o||typeof o.repairable!="boolean"||typeof o.repaired!="boolean")throw new TypeError("\u8BCA\u65AD\u7ED3\u679C\u65E0\u6548");return{...o.code!==void 0?{code:jt(o.code,64)}:{},sessionId:Dt(o.sessionId),repairable:o.repairable,repaired:o.repaired,reason:jt(o.reason,1e3),advice:jt(o.advice,1e3),token:jt(o.token??"",64),count:In(o.count??0)}}};var Za=t((r,o={})=>Object.entries(o).reduce((d,[y,n])=>d.replaceAll("{"+y+"}",String(n)),Cn[r]??r),"defaultT"),Qa=`
|
|
10
|
+
"use strict";var Zt=Object.defineProperty;var na=Object.getOwnPropertyDescriptor;var sa=Object.getOwnPropertyNames;var ra=Object.prototype.hasOwnProperty;var t=(n,r)=>Zt(n,"name",{value:r,configurable:!0});var aa=(n,r)=>{for(var o in r)Zt(n,o,{get:r[o],enumerable:!0})},ia=(n,r,o,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of sa(r))!ra.call(n,a)&&a!==o&&Zt(n,a,{get:()=>r[a],enumerable:!(p=na(r,a))||p.enumerable});return n};var oa=n=>ia(Zt({},"__esModule",{value:!0}),n);var Aa={};aa(Aa,{startArchiveClient:()=>Ea});module.exports=oa(Aa);function Z(n){if(typeof n!="object"||n===null||Array.isArray(n))throw new TypeError("\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61");return n}t(Z,"record");function Ee(n){return String(n&&typeof n=="object"&&"message"in n?n.message??n:n)}t(Ee,"errorMessage");function xt(n){return n&&typeof n=="object"&&"code"in n?n.code:void 0}t(xt,"errorCode");var vs=Function("return globalThis.__dshArchiveReact")(),{Children:Da,Component:Pa,Fragment:Ma,Profiler:za,PureComponent:Oa,StrictMode:La,Suspense:Fa,cloneElement:Ba,createContext:Ua,createElement:Ha,createRef:Wa,forwardRef:qa,isValidElement:Ga,lazy:Va,memo:Ka,startTransition:$a,useCallback:Ya,useContext:Ja,useDebugValue:Za,useDeferredValue:Qa,useEffect:Xa,useId:ei,useImperativeHandle:ti,useInsertionEffect:ni,useLayoutEffect:si,useMemo:ri,useReducer:ai,useRef:ii,useState:oi,useSyncExternalStore:li,useTransition:ci,version:di}=vs,j=vs;function ys(n){return j.createElement("input",{className:"dsham_number",type:"number",min:n.min,max:n.max,value:n.value??"",disabled:n.disabled,"aria-label":n["aria-label"],onChange:t(r=>{let o=r.target.value;if(o===""){n.onChange(null);return}let p=Number(o);n.onChange(Number.isNaN(p)?null:p)},"onChange")})}t(ys,"NumberField");function bs(n){function r(o,p){let a=o==="from"?p:n.from,l=o==="to"?p:n.to;if(a===""&&l===""){n.onClear();return}o==="from"?n.onFrom(p):n.onTo(p)}return t(r,"change"),j.createElement("div",{className:"dsham_dateRange",role:"group","aria-label":n.label},j.createElement("input",{className:"dsham_date",type:"date",value:n.from,"aria-label":n.fromLabel,"aria-invalid":n.invalid||void 0,onChange:t(o=>r("from",o.target.value),"onChange")}),j.createElement("span",{className:"dsham_dateSep","aria-hidden":!0,children:"\u2013"}),j.createElement("input",{className:"dsham_date",type:"date",value:n.to,"aria-label":n.toLabel,"aria-invalid":n.invalid||void 0,onChange:t(o=>r("to",o.target.value),"onChange")}),n.from||n.to?j.createElement("button",{type:"button",className:"dsham_dateClearBtn","aria-label":"clear",title:"clear",onClick:n.onClear,children:"\xD7"}):null)}t(bs,"DateRange");function Ct(n){return j.createElement("div",{className:n.className},j.createElement("button",{type:"button",className:"dsham_disclosure","aria-expanded":n.open,onClick:n.onToggle},la(j.createElement,n.open),n.title),n.open?j.createElement("div",null,n.children):null)}t(Ct,"Disclosure");function la(n,r){return n("svg",{className:"dsham_foldChevron"+(r?" is-open":""),viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":!0},n("path",{d:"M4 6l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"}))}t(la,"foldChevron");function wn(n){let r=j.useRef(null);return j.useEffect(()=>{r.current&&(r.current.indeterminate=!!n.indeterminate&&!n.checked)},[n.indeterminate,n.checked]),j.createElement("input",{ref:r,className:"dsham_checkbox",type:"checkbox",checked:n.checked,disabled:n.disabled,"aria-label":n.label,onChange:t(o=>n.onChange({target:{checked:o.target.checked}}),"onChange")})}t(wn,"SelectionCheckbox");var Mt={"health.archived":"\u5DF2\u5F52\u6863\u4F1A\u8BDD\u9700\u8981\u68C0\u67E5","health.unarchived":"\u672A\u5F52\u6863\u4F1A\u8BDD\u9700\u8981\u68C0\u67E5","health.heading":"\u8BCA\u65AD\u4E0E\u4FEE\u590D","health.scopeArchived":"\u68C0\u67E5\u8303\u56F4\uFF1A\u5168\u90E8\u5DF2\u5F52\u6863\u4F1A\u8BDD\uFF0C\u4E0D\u53D7\u5217\u8868\u7B5B\u9009\u5F71\u54CD\u3002","health.scopeUnarchived":"\u68C0\u67E5\u8303\u56F4\uFF1A\u5168\u90E8\u672A\u5F52\u6863\u4F1A\u8BDD\uFF0C\u4E0D\u53D7\u5217\u8868\u7B5B\u9009\u5F71\u54CD\u3002\u4FEE\u590D\u524D\u9700\u5148\u5F52\u6863\u5E76\u5173\u95ED\u4F1A\u8BDD\u3002","health.retry":"\u91CD\u65B0\u68C0\u6D4B","health.busy":"\u5904\u7406\u4E2D\u2026","health.confirm":"\u786E\u8BA4\u4FEE\u590D","health.diagnose":"\u8BCA\u65AD\u4F1A\u8BDD","health.technical":"\u6280\u672F\u8BE6\u60C5","health.notice":"\u4F1A\u8BDD\u4FEE\u590D\u5B8C\u6210\uFF0C\u5DF2\u91CD\u65B0\u8BFB\u53D6\u8BE6\u60C5\u3002","health.legacy-source.reason":"\u65E7\u7248\u6D88\u606F\u6765\u6E90\u4E0D\u53D7\u65B0\u7248 DSH \u652F\u6301","health.legacy-source.advice":"\u8FD0\u884C\u8BCA\u65AD\uFF0C\u68C0\u67E5\u662F\u5426\u4E3A\u53EF\u8F6C\u6362\u7684\u65E7\u7248\u6765\u6E90\u3002","health.repair-frame.reason":"\u65E7\u7248\u4FEE\u590D\u751F\u6210\u7684\u538B\u7F29\u683C\u5F0F\u4E0D\u7B26\u5408\u5BBF\u4E3B\u8981\u6C42","health.repair-frame.advice":"\u91CD\u65B0\u8BCA\u65AD\u53EF\u7EA0\u6B63\u538B\u7F29\u5E27\u683C\u5F0F\uFF0C\u539F\u59CB\u65E5\u5FD7\u4FDD\u6301\u4E0D\u53D8\u3002","health.missing.reason":"\u4F1A\u8BDD\u65E5\u5FD7\u6216\u9644\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728","health.missing.advice":"\u68C0\u67E5\u539F\u76EE\u5F55\u6216\u78C1\u76D8\u662F\u5426\u53EF\u7528\uFF1B\u7F3A\u5931\u6B63\u6587\u4E0D\u80FD\u901A\u8FC7\u91CD\u5EFA\u7F13\u5B58\u6062\u590D\u3002","health.permission.reason":"\u6CA1\u6709\u6743\u9650\u8BFB\u53D6\u4F1A\u8BDD\u6587\u4EF6","health.permission.advice":"\u68C0\u67E5\u76EE\u5F55\u8BBF\u95EE\u6743\u9650\u3001\u6587\u4EF6\u5360\u7528\u4E0E\u5B89\u5168\u8F6F\u4EF6\u9650\u5236\uFF0C\u518D\u91CD\u8BD5\u3002","health.corrupt.reason":"\u4F1A\u8BDD\u65E5\u5FD7\u53EF\u80FD\u635F\u574F\u6216\u672A\u5B8C\u6574\u5199\u5165","health.corrupt.advice":"\u4FDD\u7559\u73B0\u6709\u65E5\u5FD7\uFF0C\u68C0\u67E5\u78C1\u76D8\u548C\u539F\u59CB\u6587\u4EF6\uFF1B\u4E0D\u81EA\u52A8\u622A\u65AD\u6216\u5220\u9664\u6D88\u606F\u3002","health.unknown.reason":"\u4F1A\u8BDD\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6","health.unknown.advice":"\u5148\u91CD\u8BD5\uFF1B\u4ECD\u5931\u8D25\u65F6\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\uFF0C\u6309\u5177\u4F53\u9519\u8BEF\u68C0\u67E5\u5BBF\u4E3B\u517C\u5BB9\u6027\u3002","health.healthy.reason":"\u4F1A\u8BDD\u5DF2\u53EF\u6B63\u5E38\u8BFB\u53D6","health.healthy.advice":"\u5237\u65B0\u4F1A\u8BDD\u8BE6\u60C5\u5373\u53EF\uFF0C\u65E0\u9700\u4FEE\u590D\u3002","health.ready.reason":"\u53D1\u73B0 {n} \u5904\u65E7\u7248\u6765\u6E90\uFF0C\u5DF2\u901A\u8FC7\u5BBF\u4E3B\u683C\u5F0F\u8F6C\u6362\u6821\u9A8C","health.ready.advice":"\u5C06\u6765\u6E90\u6539\u5199\u4E3A\u5BBF\u4E3B\u652F\u6301\u7684\u63D2\u4EF6\u5F52\u5C5E\uFF0C\u4FDD\u7559\u6B63\u6587\uFF0C\u751F\u6210\u65B0\u7248\u65E5\u5FD7\uFF1B\u65E7\u65E5\u5FD7\u539F\u6837\u4FDD\u7559\u3002\u8BF7\u786E\u4FDD\u5176\u4ED6 DSH \u8FDB\u7A0B\u672A\u6253\u5F00\u8BE5\u4F1A\u8BDD\u3002","health.ready-frame.reason":"\u53D1\u73B0\u65E7\u7248\u4FEE\u590D\u7684\u538B\u7F29\u5E27\u95EE\u9898\uFF0C\u5DF2\u901A\u8FC7\u5BBF\u4E3B\u8BFB\u53D6\u6821\u9A8C","health.ready-frame.advice":"\u7EA0\u6B63\u538B\u7F29\u5E27\u683C\u5F0F\uFF0C\u4FDD\u7559\u6B63\u6587\u53CA\u539F\u59CB\u65E5\u5FD7\u3002\u8BF7\u786E\u4FDD\u5176\u4ED6 DSH \u8FDB\u7A0B\u672A\u6253\u5F00\u8BE5\u4F1A\u8BDD\u3002","health.blocked.reason":"\u6682\u4E0D\u80FD\u81EA\u52A8\u4FEE\u590D","health.blocked.advice":"\u8BF7\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\u67E5\u770B\u5177\u4F53\u9650\u5236\uFF0C\u5904\u7406\u540E\u91CD\u65B0\u8BCA\u65AD\u3002","health.repaired.reason":"\u4FEE\u590D\u5B8C\u6210\uFF0C\u5BBF\u4E3B\u5DF2\u80FD\u6B63\u5E38\u8BFB\u53D6","health.repaired.advice":"\u65E7\u65E5\u5FD7\u4FDD\u7559\uFF0C\u5F52\u6863\u72B6\u6001\u4E0D\u53D8\uFF1B\u53EF\u4EE5\u91CD\u65B0\u9884\u89C8\u6216\u6253\u5F00\u4F1A\u8BDD\u3002","health.published-unreadable.reason":"\u65B0\u7248\u65E5\u5FD7\u5DF2\u751F\u6210\uFF0C\u4F46\u5BBF\u4E3B\u590D\u8BFB\u672A\u901A\u8FC7","health.published-unreadable.advice":"\u65E7\u65E5\u5FD7\u4ECD\u4FDD\u7559\uFF0C\u8BF7\u91CD\u542F DSH \u540E\u91CD\u65B0\u8BCA\u65AD\uFF1B\u4E0D\u8981\u53CD\u590D\u4FEE\u590D\u6216\u5220\u9664\u65E5\u5FD7\u3002","health.failed.reason":"\u64CD\u4F5C\u672A\u5B8C\u6210","health.failed.advice":"\u8BF7\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\u67E5\u770B\u9519\u8BEF\uFF0C\u5904\u7406\u540E\u91CD\u65B0\u8BCA\u65AD\u3002"},Sn={"health.archived":"Archived sessions need attention","health.unarchived":"Unarchived sessions need attention","health.heading":"Diagnosis and repair","health.scopeArchived":"Checks all archived sessions, regardless of list filters.","health.scopeUnarchived":"Checks all unarchived sessions, regardless of list filters. Archive and close a session before repairing it.","health.retry":"Check again","health.busy":"Processing\u2026","health.confirm":"Confirm repair","health.diagnose":"Diagnose session","health.technical":"Technical details","health.notice":"Session repaired. Details have been refreshed.","health.legacy-source.reason":"The new DSH version does not support this legacy message source","health.legacy-source.advice":"Run a diagnosis to check whether the legacy source can be converted.","health.repair-frame.reason":"A previous repair used an unsupported compression format","health.repair-frame.advice":"Run a diagnosis to correct the compression frames while preserving the original log.","health.missing.reason":"The session log or attachment path does not exist","health.missing.advice":"Check the original directory and disk. Rebuilding the cache cannot recover missing messages.","health.permission.reason":"Permission to read the session files was denied","health.permission.advice":"Check directory permissions, file locks and security software, then retry.","health.corrupt.reason":"The session log may be corrupt or incomplete","health.corrupt.advice":"Keep the existing log and check the disk and original files. Messages will not be truncated or deleted automatically.","health.unknown.reason":"The session cannot currently be read","health.unknown.advice":"Retry first. If it still fails, expand technical details to check host compatibility.","health.healthy.reason":"The session can be read normally","health.healthy.advice":"Refresh the session details. No repair is needed.","health.ready.reason":"Found {n} legacy sources; host format validation passed","health.ready.advice":"Rewrite the sources to a host-supported plugin attribution and generate a new log, preserving messages and the original log. Ensure no other DSH process has the session open.","health.ready-frame.reason":"Found compression frame issues from a previous repair; host validation passed","health.ready-frame.advice":"Correct the compression frames, preserving messages and the original log. Ensure no other DSH process has the session open.","health.blocked.reason":"Automatic repair is currently unavailable","health.blocked.advice":"Expand technical details to see the restriction. Resolve it before diagnosing again.","health.repaired.reason":"Repair complete; the host can read the session","health.repaired.advice":"The original log and archive status are preserved. You can preview or open the session again.","health.published-unreadable.reason":"A new log was generated, but the host could not read it back","health.published-unreadable.advice":"The original log is preserved. Restart DSH and diagnose again. Do not repeatedly repair or delete logs.","health.failed.reason":"The operation did not complete","health.failed.advice":"Expand technical details to inspect the error. Resolve it before diagnosing again."},kn={"health.archived":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0442\u0440\u0435\u0431\u0443\u044E\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F","health.unarchived":"\u041D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0442\u0440\u0435\u0431\u0443\u044E\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F","health.heading":"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430 \u0438 \u0440\u0435\u043C\u043E\u043D\u0442","health.scopeArchived":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430.","health.scopeUnarchived":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442 \u0432\u0441\u0435 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E \u043E\u0442 \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430. \u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0437\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0435\u0441\u0441\u0438\u044E \u043F\u0435\u0440\u0435\u0434 \u0440\u0435\u043C\u043E\u043D\u0442\u043E\u043C.","health.retry":"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430","health.busy":"\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430\u2026","health.confirm":"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0440\u0435\u043C\u043E\u043D\u0442","health.diagnose":"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","health.technical":"\u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438","health.notice":"\u0421\u0435\u0441\u0441\u0438\u044F \u043E\u0442\u0440\u0435\u043C\u043E\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0430. \u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B.","health.legacy-source.reason":"\u041D\u043E\u0432\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F DSH \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u044D\u0442\u043E\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439","health.legacy-source.advice":"\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C, \u043C\u043E\u0436\u043D\u043E \u043B\u0438 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A.","health.repair-frame.reason":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u043C\u043E\u043D\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043B \u043D\u0435\u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0441\u0436\u0430\u0442\u0438\u044F","health.repair-frame.advice":"\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443, \u0447\u0442\u043E\u0431\u044B \u0438\u0441\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u0434\u0440\u044B \u0441\u0436\u0430\u0442\u0438\u044F, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0432 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B.","health.missing.reason":"\u041F\u0443\u0442\u044C \u043A \u0436\u0443\u0440\u043D\u0430\u043B\u0443 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u043B\u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442","health.missing.advice":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u0438 \u0434\u0438\u0441\u043A. \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043A\u044D\u0448\u0430 \u043D\u0435 \u0432\u0435\u0440\u043D\u0451\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u044E\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","health.permission.reason":"\u041E\u0442\u043A\u0430\u0437\u0430\u043D\u043E \u0432 \u0434\u043E\u0441\u0442\u0443\u043F\u0435 \u043A \u0444\u0430\u0439\u043B\u0430\u043C \u0441\u0435\u0441\u0441\u0438\u0438","health.permission.advice":"\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u0440\u0430\u0432\u0430 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430, \u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432 \u0438 \u0430\u043D\u0442\u0438\u0432\u0438\u0440\u0443\u0441, \u0437\u0430\u0442\u0435\u043C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","health.corrupt.reason":"\u0416\u0443\u0440\u043D\u0430\u043B \u0441\u0435\u0441\u0441\u0438\u0438 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0451\u043D \u0438\u043B\u0438 \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u043C","health.corrupt.advice":"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0438\u0441\u043A \u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B. \u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u043E\u0431\u0440\u0435\u0437\u0430\u043D\u044B \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","health.unknown.reason":"\u0421\u0435\u0441\u0441\u0438\u044E \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C","health.unknown.advice":"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435. \u0415\u0441\u043B\u0438 \u043D\u0435 \u043F\u043E\u043C\u043E\u0436\u0435\u0442, \u0440\u0430\u0441\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u043E\u0441\u0442\u0438 \u0441 \u0445\u043E\u0441\u0442\u043E\u043C.","health.healthy.reason":"\u0421\u0435\u0441\u0441\u0438\u044F \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F \u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u043E","health.healthy.advice":"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u0441\u0435\u0441\u0441\u0438\u0438. \u0420\u0435\u043C\u043E\u043D\u0442 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F.","health.ready.reason":"\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432: {n}; \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0444\u043E\u0440\u043C\u0430\u0442\u0430 \u0445\u043E\u0441\u0442\u0430 \u043F\u0440\u043E\u0439\u0434\u0435\u043D\u0430","health.ready.advice":"\u041F\u0435\u0440\u0435\u043F\u0438\u0448\u0438\u0442\u0435 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438 \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u0443\u044E \u0445\u043E\u0441\u0442\u043E\u043C \u0430\u0442\u0440\u0438\u0431\u0443\u0446\u0438\u044E \u043F\u043B\u0430\u0433\u0438\u043D\u0430 \u0438 \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0432 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u0441\u0435\u0441\u0441\u0438\u044E \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441 DSH.","health.ready-frame.reason":"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u043A\u0430\u0434\u0440\u043E\u0432 \u0441\u0436\u0430\u0442\u0438\u044F \u043E\u0442 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u0440\u0435\u043C\u043E\u043D\u0442\u0430; \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0445\u043E\u0441\u0442\u0430 \u043F\u0440\u043E\u0439\u0434\u0435\u043D\u0430","health.ready-frame.advice":"\u0418\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u043A\u0430\u0434\u0440\u044B \u0441\u0436\u0430\u0442\u0438\u044F, \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0432 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u0441\u0435\u0441\u0441\u0438\u044E \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441 DSH.","health.blocked.reason":"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0440\u0435\u043C\u043E\u043D\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D","health.blocked.advice":"\u0420\u0430\u0441\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0435. \u0423\u0441\u0442\u0440\u0430\u043D\u0438\u0442\u0435 \u0435\u0433\u043E \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0439 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u043E\u0439.","health.repaired.reason":"\u0420\u0435\u043C\u043E\u043D\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D; \u0445\u043E\u0441\u0442 \u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","health.repaired.advice":"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B. \u041C\u043E\u0436\u043D\u043E \u0441\u043D\u043E\u0432\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0438\u043B\u0438 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E.","health.published-unreadable.reason":"\u041D\u043E\u0432\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0441\u043E\u0437\u0434\u0430\u043D, \u043D\u043E \u0445\u043E\u0441\u0442 \u043D\u0435 \u0441\u043C\u043E\u0433 \u0435\u0433\u043E \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C","health.published-unreadable.advice":"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0436\u0443\u0440\u043D\u0430\u043B \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D. \u041F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 DSH \u0438 \u043F\u0440\u043E\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443 \u0441\u043D\u043E\u0432\u0430. \u041D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0439\u0442\u0435 \u0440\u0435\u043C\u043E\u043D\u0442 \u0438 \u043D\u0435 \u0443\u0434\u0430\u043B\u044F\u0439\u0442\u0435 \u0436\u0443\u0440\u043D\u0430\u043B\u044B.","health.failed.reason":"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043D\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430","health.failed.advice":"\u0420\u0430\u0441\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u0438\u0437\u0443\u0447\u0438\u0442\u044C \u043E\u0448\u0438\u0431\u043A\u0443. \u0423\u0441\u0442\u0440\u0430\u043D\u0438\u0442\u0435 \u0435\u0451 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0439 \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u043E\u0439."};var rt=t(n=>{if(typeof n!="string"||!n.length||n.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u65E0\u6548");return n},"id"),xs=t((n,r=!1)=>{if(typeof n!="string"||n.length>200||r&&!n.trim())throw new TypeError("\u5173\u952E\u8BCD\u987B\u4E3A 1\uFF5E200 \u4E2A\u5B57\u7B26");return n.trim()},"queryText"),ws={parse(n){let r=Z(n);if(!r||!Array.isArray(r.sessionIds)||!r.sessionIds.length||r.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u68C0\u7D22\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(r.sessionIds.map(rt))],query:xs(r.query,!0)}}},ca={parse(n){let r=Z(n);if(!r)throw new TypeError("\u9884\u89C8\u53C2\u6570\u65E0\u6548");return{sessionId:rt(r.sessionId),query:xs(r.query??"")}}},st=t((n,r)=>{if(typeof n!="string"||n.length>r)throw new TypeError("\u8FD4\u56DE\u6587\u672C\u65E0\u6548");return n},"boundedString"),zt=t(n=>{if(typeof n!="number"||!Number.isSafeInteger(n)||n<0)throw new TypeError("\u6D88\u606F\u5E8F\u53F7\u65E0\u6548");return n},"sequence"),xn={parse(n){let r=Z(n);if(!r||!Array.isArray(r.items)||!Array.isArray(r.failures)||r.items.length>20||r.failures.length>20)throw new TypeError("\u68C0\u7D22\u7ED3\u679C\u65E0\u6548");return{items:r.items.map(Z).map(o=>({sessionId:rt(o.sessionId),seq:zt(o.seq),snippet:st(o.snippet,400)})),failures:r.failures.map(Z).map(o=>({sessionId:rt(o.sessionId),message:st(o.message,500)}))}}},da={parse(n){let r=Z(n);if(!r||!Array.isArray(r.messages)||r.messages.length>8||typeof r.hasEarlier!="boolean"||typeof r.hasLater!="boolean")throw new TypeError("\u9884\u89C8\u7ED3\u679C\u65E0\u6548");return{sessionId:rt(r.sessionId),hasEarlier:r.hasEarlier,hasLater:r.hasLater,messages:r.messages.map(Z).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:zt(o.seq),role:o.role,text:st(o.text,2e3),truncated:o.truncated}})}}},ua={parse(n){let r=Z(n);if(!r||!Array.isArray(r.sessionIds)||!r.sessionIds.length||r.sessionIds.length>20)throw new TypeError("\u6BCF\u6B21\u987B\u5305\u542B 1\uFF5E20 \u4E2A\u4F1A\u8BDD");return{sessionIds:[...new Set(r.sessionIds.map(rt))]}}},Cn={parse(n){let r=Z(n);if(!r||!Array.isArray(r.items)||r.items.length>20)throw new TypeError("\u4F1A\u8BDD\u8BE6\u60C5\u65E0\u6548");return{items:r.items.map(Z).map(o=>({sessionId:rt(o.sessionId),...o.createdAt!==void 0?{createdAt:zt(o.createdAt)}:{},turnCount:o.turnCount===null?null:zt(o.turnCount),path:o.path===null?null:st(o.path,32768),error:st(o.error,500)}))}}};function In(n,r,o){let p=typeof n=="number"&&Number.isSafeInteger(n)&&n>=0,a=typeof r=="number"&&Number.isSafeInteger(r)&&r>=0;return p!==a?p?-1:1:p&&a?o==="turnsAsc"?n-r:r-n:0}t(In,"compareTurnCounts");async function Cs(n,r=globalThis.navigator?.clipboard){if(typeof n!="string"||!n)throw Object.assign(new Error("\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9"),{code:"copy.empty"});if(!r?.writeText)throw Object.assign(new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u526A\u8D34\u677F\uFF0C\u8BF7\u5728 HTTPS \u6216\u672C\u673A\u5730\u5740\u4E2D\u6253\u5F00\u9875\u9762"),{code:"copy.unavailable"});try{await r.writeText(n)}catch{throw Object.assign(new Error("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u5141\u8BB8\u6D4F\u89C8\u5668\u8BBF\u95EE\u526A\u8D34\u677F\u540E\u91CD\u8BD5"),{code:"copy.denied"})}}t(Cs,"copySessionText");function Is(){let n=t((o,p)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:t(()=>p,"create"),schema:p}),"codec");return[["searchSessionContent",ws,xn],["diagnoseSession",Ss,ks],["repairSession",Ss,ks],["sessionDetails",ua,Cn],["searchArchivedContent",ws,xn],["previewArchivedSession",ca,da]].map(([o,p,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:n(o+"Input",p)}],result:n(o+"Result",a),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(Is,"discoveryInvocations");function Es(n,r){let o=r?.trim().toLowerCase();if(!o)return null;let p=n.toLowerCase().indexOf(o);if(p<0)return null;let a=0,l=0,c;for(let E of n){let x=l+E.toLowerCase().length;if(c===void 0&&x>p&&(c=a),a+=E.length,x>=p+o.length)return{start:c??a,end:a};l=x}return null}t(Es,"findTextRange");function As(n,r){return[...new Set(n)].map(o=>r[o]??{id:o})}t(As,"sessionDetailCandidates");function Qt(n,r=!1){if(!/^\d{4}-\d{2}-\d{2}$/.test(n))return NaN;let[o,p,a]=n.split("-").map(Number),l=new Date(o,p-1,a);return l.getFullYear()!==o||l.getMonth()!==p-1||l.getDate()!==a?NaN:(r&&l.setDate(l.getDate()+1),l.getTime())}t(Qt,"dayBoundary");function En(n,r){return(!n||Number.isFinite(Qt(n)))&&(!r||Number.isFinite(Qt(r)))&&(!n||!r||n<=r)}t(En,"validUpdatedRange");function _s(n,r,o){if(!En(r,o))return!1;if(!r&&!o)return!0;let p=typeof n=="number"?n:Date.parse(n??"");return Number.isFinite(p)&&(!r||p>=Qt(r))&&(!o||p<Qt(o,!0))}t(_s,"matchesUpdatedRange");async function Rs(n,r,o,{signal:p,onProgress:a}={}){let l=[],c=[],E=[...new Set(n)],x=t(()=>{if(p?.aborted)throw new Error("\u641C\u7D22\u5DF2\u53D6\u6D88")},"check");for(let T=0;T<E.length;T+=20){x();let S=xn.parse(await o({sessionIds:E.slice(T,T+20),query:r}));x(),l.push(...S.items),c.push(...S.failures),a?.({done:Math.min(T+20,E.length),total:E.length,items:[...l],failures:[...c]})}return x(),{items:l,failures:c}}t(Rs,"searchArchiveBatches");function Ts(n){let r=Ee(n),o={"repair-frame":["\u65E7\u7248\u4FEE\u590D\u751F\u6210\u7684\u538B\u7F29\u683C\u5F0F\u4E0D\u7B26\u5408\u5BBF\u4E3B\u8981\u6C42","\u91CD\u65B0\u8BCA\u65AD\u53EF\u7EA0\u6B63\u538B\u7F29\u5E27\u683C\u5F0F\uFF0C\u539F\u59CB\u65E5\u5FD7\u4FDD\u6301\u4E0D\u53D8\u3002"],"legacy-source":["\u65E7\u7248\u6D88\u606F\u6765\u6E90\u4E0D\u53D7\u65B0\u7248 DSH \u652F\u6301","\u8FD0\u884C\u8BCA\u65AD\uFF0C\u68C0\u67E5\u662F\u5426\u4E3A\u53EF\u8F6C\u6362\u7684\u65E7\u7248\u6765\u6E90\u3002"],missing:["\u4F1A\u8BDD\u65E5\u5FD7\u6216\u9644\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728","\u68C0\u67E5\u539F\u76EE\u5F55\u6216\u78C1\u76D8\u662F\u5426\u53EF\u7528\uFF1B\u7F3A\u5931\u6B63\u6587\u4E0D\u80FD\u901A\u8FC7\u91CD\u5EFA\u7F13\u5B58\u6062\u590D\u3002"],permission:["\u6CA1\u6709\u6743\u9650\u8BFB\u53D6\u4F1A\u8BDD\u6587\u4EF6","\u68C0\u67E5\u76EE\u5F55\u8BBF\u95EE\u6743\u9650\u3001\u6587\u4EF6\u5360\u7528\u4E0E\u5B89\u5168\u8F6F\u4EF6\u9650\u5236\uFF0C\u518D\u91CD\u8BD5\u3002"],corrupt:["\u4F1A\u8BDD\u65E5\u5FD7\u53EF\u80FD\u635F\u574F\u6216\u672A\u5B8C\u6574\u5199\u5165","\u4FDD\u7559\u73B0\u6709\u65E5\u5FD7\uFF0C\u68C0\u67E5\u78C1\u76D8\u548C\u539F\u59CB\u6587\u4EF6\uFF1B\u4E0D\u81EA\u52A8\u622A\u65AD\u6216\u5220\u9664\u6D88\u606F\u3002"],unknown:["\u4F1A\u8BDD\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6","\u5148\u91CD\u8BD5\uFF1B\u4ECD\u5931\u8D25\u65F6\u5C55\u5F00\u6280\u672F\u8BE6\u60C5\uFF0C\u6309\u5177\u4F53\u9519\u8BEF\u68C0\u67E5\u5BBF\u4E3B\u517C\u5BB9\u6027\u3002"]},p={ENOENT:"missing",EACCES:"permission",EPERM:"permission"},a=[["repair-frame",/first frame is not exactly one header line/],["legacy-source",/unclassified message source/],["missing",/ENOENT|不存在|not found/i],["permission",/EACCES|EPERM|permission/i],["corrupt",/corrupt|JSON|incomplete|truncat|损坏|SessionFormatError/i]],l=xt(n),c=n&&typeof n=="object"&&"name"in n?String(n.name??""):"",E=typeof l=="string"?p[l]??l:"";if(Object.hasOwn(o,E)){let[I,P]=o[E];return{code:E,reason:I,advice:P}}if(/requires toolCallId matching its tool source|tool call id requires a nonempty string/i.test(r))return{code:"corrupt",reason:"\u65E5\u5FD7\u5C3E\u90E8\u6709\u672A\u95ED\u5408\u7684\u5DE5\u5177\u8C03\u7528\uFF0C\u4E14 toolCallId \u4E3A\u7A7A",advice:"\u4FDD\u7559\u73B0\u6709\u65E5\u5FD7\uFF0C\u68C0\u67E5\u78C1\u76D8\u548C\u539F\u59CB\u6587\u4EF6\uFF1B\u4E0D\u81EA\u52A8\u622A\u65AD\u6216\u6539\u5199\u65E5\u5FD7\u3002"};let S=(c==="SessionFormatError"||c==="SessionPersistenceCorruptionError"?"corrupt":void 0)??a.find(([,I])=>I.test(r))?.[0]??"unknown",[U,y]=o[S];return{code:S,reason:U,advice:y}}t(Ts,"classifySessionError");var Ss={parse(n){let r=Z(n),o=rt(r?.sessionId);if(r?.token!==void 0&&(typeof r.token!="string"||!/^[a-f0-9]{64}$/.test(r.token)))throw new TypeError("\u4FEE\u590D\u51ED\u636E\u65E0\u6548");return{sessionId:o,...r.token!==void 0?{token:r.token}:{}}}},ks={parse(n){let r=Z(n);if(!r||typeof r.repairable!="boolean"||typeof r.repaired!="boolean")throw new TypeError("\u8BCA\u65AD\u7ED3\u679C\u65E0\u6548");return{...r.code!==void 0?{code:st(r.code,64)}:{},sessionId:rt(r.sessionId),repairable:r.repairable,repaired:r.repaired,reason:st(r.reason,1e3),advice:st(r.advice,1e3),token:st(r.token??"",64),count:zt(r.count??0)}}};var ha=t((n,r={})=>Object.entries(r).reduce((o,[p,a])=>o.replaceAll("{"+p+"}",String(a)),Mt[n]??n),"defaultT"),pa=`
|
|
11
11
|
.dsham_health{margin:0 0 16px;font-size:13px;line-height:1.6;color:var(--dsw-alias-label-primary);--health-accent:var(--dsw-alias-state-business-primary,#507fe5);--health-warning:var(--dsw-alias-state-warn-label)}
|
|
12
12
|
.dsham_health p{margin:0}.dsham_healthPanel{border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2);overflow:hidden}
|
|
13
13
|
.dsham_healthSummary{display:flex;align-items:center;gap:10px;min-height:52px;padding:12px 16px;list-style:none;cursor:pointer;box-sizing:border-box}
|
|
@@ -25,11 +25,11 @@ window.__ModuleLoader__.load({
|
|
|
25
25
|
.dsham_health button:focus-visible,.dsham_health summary:focus-visible{outline:2px solid var(--health-accent);outline-offset:3px}.dsham_health svg{flex:none}
|
|
26
26
|
@media(max-width:520px){.dsham_healthSummary{padding:12px}.dsham_healthSummaryHint{display:none}.dsham_healthBody{padding:10px}.dsham_healthItem{padding:12px}.dsham_healthRow{align-items:flex-start;flex-wrap:wrap;gap:12px}.dsham_healthCopy{flex-basis:65%}.dsham_healthIntro{align-items:flex-start}.dsham_healthIntro>span{flex:1}}
|
|
27
27
|
@media(prefers-reduced-motion:reduce){.dsham_health *{transition:none!important}}
|
|
28
|
-
`;function Sr(r,o={},d){let y=r.createElement,n=t((O,N)=>o[O]?y("span",{className:N,"aria-hidden":!0},y(o[O],{width:16,height:16})):null,"icon");function i(O,N,B){let j=N.primary?"primary":N.subtle?"ghost":"outline";return y(d??(C=>y("button",{type:"button",disabled:C.disabled,onClick:C.onClick},C.children)),{variant:j,size:"sm",disabled:N.disabled,onClick:N.onClick,icon:B??void 0},O)}t(i,"actionButton");function c({title:O,glyph:N,children:B}){let[j,Q]=r.useState(!1);return y(hn,{className:"dsham_healthTech",title:y(r.Fragment,null,N,O),open:j,onToggle:t(()=>Q(C=>!C),"onToggle")},B)}return t(c,"TechnicalDetails"),t(function({items:N,sessions:B,t:j=Za,isArchived:Q=!0,diagnoseSession:C,repairSession:M,retry:G,pending:z}){let[le,se]=r.useState({}),[te,qe]=r.useState(""),[Ie,ze]=r.useState(""),We=N.filter(Ae=>Ae.error),Z=t(async(Ae,ot)=>{if(!te){qe(Ae.sessionId),ze("");try{let xe=await(ot&&M?M({sessionId:Ae.sessionId,token:le[Ae.sessionId].token}):C({sessionId:Ae.sessionId}));se(st=>({...st,[Ae.sessionId]:xe})),xe.repaired&&(ze(!0),G())}catch(xe){se(st=>({...st,[Ae.sessionId]:{repairable:!1,code:"failed",reason:"",advice:nt(xe).slice(0,1e3)}}))}finally{qe("")}}},"run");return y("div",{className:"dsham_health"},y("style",null,Qa),Ie&&y("p",{role:"status",className:"dsham_healthNotice"},n("check"),j("health.notice")),We.length>0&&y("details",{className:"dsham_healthPanel"},y("summary",{className:"dsham_healthSummary"},n("warning","dsham_healthIcon"),y("span",{className:"dsham_healthSummaryText"},j(Q?"health.archived":"health.unarchived"),y("span",{className:"dsham_healthCount"},We.length)),y("span",{className:"dsham_healthSummaryHint"},j("health.heading")),n("chevron","dsham_healthChevron")),y("div",{className:"dsham_healthBody"},y("div",{className:"dsham_healthIntro"},y("span",null,j(Q?"health.scopeArchived":"health.scopeUnarchived")),i(j("health.retry"),{subtle:!0,disabled:z||!!te,onClick:G},n("refresh"))),We.map(Ae=>{let ot=xr(Ae.error),xe=le[Ae.sessionId],st=xe?Object.hasOwn(Cn,"health."+xe.code+".reason")?xe.code:xe.repaired?"repaired":xe.repairable?"ready":"blocked":ot.code,Tt=B.find(Nt=>Nt.id===Ae.sessionId),Je=xe?.repairable&&M;return y("section",{key:Ae.sessionId,className:"dsham_healthItem","aria-busy":te===Ae.sessionId},y("div",{className:"dsham_healthRow"},y("div",{className:"dsham_healthCopy"},y("strong",{className:"dsham_healthTitle"},Tt?.displayTitle||Tt?.title||Ae.sessionId),y("div",{className:"dsham_healthState","data-state":xe?.repaired?"success":Je?"ready":"pending",role:xe?"status":void 0},n(xe?.repaired?"check":"info"),j("health."+st+".reason",{n:xe?.count??0}))),C&&i(j(te===Ae.sessionId?"health.busy":Je?"health.confirm":"health.diagnose"),{primary:!!Je,disabled:!!te,onClick:t(()=>Z(Ae,!!Je),"onClick")},n(te===Ae.sessionId?"refresh":Je?"check":"search"))),xe&&y("p",{className:"dsham_healthAdvice"},j("health."+st+".advice")),!xe&&ot.code!=="legacy-source"&&y("p",{className:"dsham_healthAdvice"},j("health."+st+".advice")),y(c,{title:j("health.technical"),glyph:n("chevron","dsham_healthChevron")},y("div",{className:"dsham_healthLog"},y("p",null,Ae.sessionId),y("p",null,Ae.error),xe?.reason&&y("p",null,xe.reason),xe?.advice&&y("p",null,xe.advice))))}))))},"SessionHealthPanel")}t(Sr,"createSessionHealthPanel");function kr(r,o={}){let d=r.createElement;function y({text:C,query:M=""}){let G=vr(C,M);return G?d(r.Fragment,null,C.slice(0,G.start),d("mark",null,C.slice(G.start,G.end)),C.slice(G.end)):C}t(y,"HighlightedText");function n(C,M,G,z){let le=JSON.stringify(C),se=JSON.stringify([le,M]),[te,qe]=r.useState(0),[Ie,ze]=r.useState({key:"",status:"idle",items:[],failures:[]});return r.useEffect(()=>{if(!G||!M.trim()||!z)return;let Z=new AbortController;ze({key:se,status:"loading",items:[],failures:[],done:0,total:C.length});let Ae=setTimeout(()=>{wr(JSON.parse(le),M,z,{signal:Z.signal,onProgress:t(ot=>{Z.signal.aborted||ze({key:se,status:"loading",...ot})},"onProgress")}).then(ot=>{Z.signal.aborted||ze({key:se,status:"ready",done:C.length,total:C.length,...ot})}).catch(ot=>{Z.signal.aborted||ze(xe=>({...xe,key:se,status:"error",error:nt(ot)}))})},350);return()=>{Z.abort(),clearTimeout(Ae)}},[le,M,G,z,te]),{...G&&M.trim()&&z?Ie.key===se?Ie:{key:se,status:"loading",items:[],failures:[],done:0,total:C.length}:{status:"idle",items:[],failures:[]},retry:t(()=>qe(Z=>Z+1),"retry")}}t(n,"useArchiveSearch");function i(C,M,G,z=!1){let le=JSON.stringify(C.map(Z=>[Z.id,Z.updatedAt])),[se,te]=r.useState(0),[qe,Ie]=r.useState({key:"",items:[],pending:!1});r.useEffect(()=>{if(!M||z)return;let Z=!0,Ae=[...new Set(JSON.parse(le).map(xe=>xe[0]))];return Ie({key:le,items:[],pending:Ae.length>0}),t(async()=>{let xe=[];for(let st=0;st<Ae.length&&Z;st+=20){let Tt=Ae.slice(st,st+20);try{let Je=us.parse(await M({sessionIds:Tt})),Nt=new Map(Je.items.map(Ze=>[Ze.sessionId,Ze]));xe.push(...Tt.map(Ze=>Nt.get(Ze)??{sessionId:Ze,turnCount:null,path:null,error:"",errorKey:"details.notReturned"}))}catch(Je){xe.push(...Tt.map(Nt=>({sessionId:Nt,turnCount:null,path:null,error:nt(Je)})))}Z&&Ie({key:le,items:[...xe],pending:st+20<Ae.length})}},"load")(),()=>{Z=!1}},[le,M,se,z]);let ze=M&&qe.key===le?qe:{items:[],pending:!!(M&&C.length)},We=ze.items.map(Z=>Z.errorKey?{...Z,error:G?G(Z.errorKey):Z.errorKey}:Z);return{...ze,items:We,byId:Object.fromEntries(We.map(Z=>[Z.sessionId,Z])),retry:t(()=>te(Z=>Z+1),"retry")}}t(i,"useSessionDetails");function c(C,M){let[G,z]=r.useState(null),[le,se]=r.useState({status:"idle"}),[te,qe]=r.useState(0),Ie=G,ze=G&&M.includes(G.session.id);return r.useEffect(()=>{G&&!ze&&z(null)},[G,ze]),r.useEffect(()=>{if(!ze||typeof window>"u")return;let We=t(Z=>{Z.key==="Escape"&&(Z.preventDefault(),Z.stopPropagation(),Z.stopImmediatePropagation(),z(null))},"onKeyDown");return window.addEventListener("keydown",We,!0),()=>window.removeEventListener("keydown",We,!0)},[ze]),r.useEffect(()=>{if(!G||!ze||!C)return;let We=!0;return se({key:Ie,status:"loading"}),Promise.resolve().then(()=>C({sessionId:G.session.id,query:G.query})).then(Z=>{We&&se({key:Ie,status:"ready",value:Z})}).catch(Z=>{We&&se({key:Ie,status:"error",error:nt(Z)})}),()=>{We=!1}},[Ie,ze,C,te]),{target:ze?G:null,...le.key===Ie?le:{status:"loading"},open:t((We,Z="")=>z({session:We,query:Z}),"open"),close:t(()=>z(null),"close"),retry:t(()=>qe(We=>We+1),"retry")}}t(c,"useArchivePreview");function O({title:C,failures:M,separator:G}){let[z,le]=r.useState(!1),se=d("ul",null,M.map(te=>d("li",{key:te.sessionId},te.sessionId,G,te.message)));return d(hn,{title:C,open:z,onToggle:t(()=>le(te=>!te),"onToggle")},se)}t(O,"FailureDetails");function N(C,M){let G=o.Button??(z=>d("button",{type:"button",disabled:z.disabled,onClick:z.onClick},z.children));return d(G,{variant:"outline",size:"sm",...M},C)}t(N,"textButton");function B({t:C,from:M,to:G,onFrom:z,onTo:le,invalid:se,onClear:te}){return d("div",{className:"dsham_dateFilter"},d(dr,{from:M,to:G,invalid:se,label:C("discovery.date"),fromLabel:C("discovery.from"),toLabel:C("discovery.to"),onFrom:z,onTo:le,onClear:te}),se?d("p",{className:"dsham_dateAlert",role:"alert"},C("discovery.invalidDate")):null)}t(B,"DiscoveryFilters");function j({state:C,t:M}){return C.status==="idle"?null:d("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},d("p",null,M(C.status==="loading"?"discovery.searching":C.status==="error"?"discovery.searchError":"discovery.searched",{done:C.done??0,total:C.total??0})),C.status==="error"&&d("p",null,C.error),C.failures.length>0&&d(O,{title:M("discovery.failed",{n:C.failures.length}),failures:C.failures,separator:M("common.separator")}),(C.status==="error"||C.status==="ready"&&C.failures.length>0)&&N(M("discovery.retry"),{onClick:C.retry}))}t(j,"SearchStatus");function Q({preview:C,t:M,MarkdownText:G}){let[z,le]=r.useState(!1);if(C.status==="loading")return d("p",{role:"status"},M("discovery.loading"));if(C.status==="error")return d("div",null,d("p",{role:"alert"},C.error),N(M("discovery.retry"),{onClick:C.retry}));let se=C.value;return se?d("div",{className:"dsham_previewMessages"},d("div",{className:"dsham_previewToolbar"},d("span",{title:M("discovery.previewHint")},M("discovery.readOnly")," \xB7 ",M("discovery.messageCount",{n:se.messages.length})),G&&d(o.SegmentedControl??"div",{id:"dsham-preview-mode",label:M("discovery.displayMode"),value:z?"raw":"formatted",options:[{value:"formatted",label:M("discovery.formatted")},{value:"raw",label:M("discovery.raw")}],onChange:t(te=>le(te==="raw"),"onChange")})),se.hasEarlier&&d("p",null,M("discovery.earlier")),!se.messages.length&&d("p",null,M("discovery.empty")),se.messages.map(te=>d("article",{key:te.seq,className:"dsham_previewMessage"},d("div",{className:"dsham_previewRole","data-role":te.role},d("span",{"aria-hidden":!0},M(te.role==="user"?"discovery.you":"discovery.ai")),d("strong",null,M("discovery."+te.role))),z||!G?d("pre",{className:"dsham_previewRaw"},d(y,{text:te.text,query:C.target?.query})):d(G,{text:te.text,streaming:!1,labels:{code:{copyLabel:M("discovery.copyCode"),copiedLabel:M("details.copied")},footnotes:M("discovery.footnotes")}}),te.truncated&&d("small",null,M("discovery.truncated")))),se.hasLater&&d("p",null,M("discovery.later"))):null}return t(Q,"PreviewContent"),{HighlightedText:y,useSessionDetails:i,useArchiveSearch:n,useArchivePreview:c,DiscoveryFilters:B,SearchStatus:j,PreviewContent:Q}}t(kr,"createDiscoveryTools");var _r=[".dsham_dateFilter{display:flex;align-items:center;gap:8px;min-width:0}",".dsham_dateAlert{margin:0;font-size:12px;color:var(--dsw-alias-state-error-primary)}",".dsham_dateRange{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0;height:32px;padding:0 8px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);box-sizing:border-box}",".dsham_dateRange:hover{border-color:var(--dsw-alias-border-l3)}",".dsham_dateRange:focus-within{border-color:var(--dsw-alias-state-business-primary);outline:1px solid var(--dsw-alias-state-business-primary)}",".dsham_date{border:0;outline:none;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;height:24px;padding:0;color-scheme:dark;flex:1 1 0;min-width:0}",".dsham_dateSep{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px;user-select:none}",".dsham_dateClearBtn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;margin-left:2px;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);border-radius:50%;cursor:pointer;font-size:14px;line-height:1}",".dsham_dateClearBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}",".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(""),Rr={"common.separator":"\uFF1A","details.notReturned":"\u5BBF\u4E3B\u672A\u8FD4\u56DE\u4F1A\u8BDD\u8BE6\u60C5","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.turns":"{n} \u8F6E","details.unknown":"\u8F6E\u6B21\u672A\u77E5","details.pending":"\u8F6E\u6B21\u8BFB\u53D6\u4E2D","details.hint":"\u6309\u7528\u6237\u63D0\u4EA4\u6D88\u606F\u6570\u7EDF\u8BA1\uFF0C\u4E0D\u542B\u5DE5\u5177\u8C03\u7528\u548C\u63D2\u4EF6\u6CE8\u5165","details.more":"\u8F6E\u6B21\u6700\u591A","details.less":"\u8F6E\u6B21\u6700\u5C11","details.failed":"{n} \u6761\u4F1A\u8BDD\u8BE6\u60C5\u8BFB\u53D6\u5931\u8D25","details.copyId":"\u590D\u5236\u4F1A\u8BDD ID","details.copyPath":"\u590D\u5236\u4F1A\u8BDD\u8DEF\u5F84","details.copied":"\u5DF2\u590D\u5236","details.noPath":"\u5BBF\u4E3B\u672A\u63D0\u4F9B\u53EF\u590D\u5236\u7684\u4F1A\u8BDD\u8DEF\u5F84","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"},Cr={"common.separator":": ","details.notReturned":"The host did not return session details","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.turns":"{n} turns","details.unknown":"Unknown turns","details.pending":"Loading turns","details.hint":"User submissions; excludes tool calls and injected messages","details.more":"Most turns","details.less":"Fewest turns","details.failed":"Could not read turns for {n} sessions","details.copyId":"Copy session ID","details.copyPath":"Copy session path","details.copied":"Copied","details.noPath":"The host did not provide a session path","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"},Ir={"common.separator":": ","details.notReturned":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u0432\u0435\u0440\u043D\u0443\u043B \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u0441\u0435\u0441\u0441\u0438\u0438","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.turns":"{n} \u0445\u043E\u0434\u043E\u0432","details.unknown":"\u0425\u043E\u0434\u043E\u0432 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E","details.pending":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0445\u043E\u0434\u043E\u0432","details.hint":"\u041F\u043E \u0447\u0438\u0441\u043B\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F; \u0431\u0435\u0437 \u0432\u044B\u0437\u043E\u0432\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u0438 \u0438\u043D\u044A\u0435\u043A\u0446\u0438\u0439 \u043F\u043B\u0430\u0433\u0438\u043D\u043E\u0432","details.more":"\u0411\u043E\u043B\u044C\u0448\u0435 \u0445\u043E\u0434\u043E\u0432","details.less":"\u041C\u0435\u043D\u044C\u0448\u0435 \u0445\u043E\u0434\u043E\u0432","details.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u0445\u043E\u0434\u044B \u0434\u043B\u044F {n} \u0441\u0435\u0441\u0441\u0438\u0439","details.copyId":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID \u0441\u0435\u0441\u0441\u0438\u0438","details.copyPath":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u0438","details.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","details.noPath":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u0438\u043B \u043F\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u0438","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 Ft=class extends Error{static{t(this,"ArchiveNavigationError")}code;constructor(o){super(o),this.name="ArchiveNavigationError",this.code=o}};function Ar(r,o){return r instanceof Ft?o(`archives.${r.code}`):nt(r)}t(Ar,"formatArchiveNavigationError");function ei(r,o){if(typeof r?.retainInfo!="function")return;let d=r.retainInfo(o),y=d&&typeof d=="object"&&"getSnapshot"in d&&typeof d.getSnapshot=="function"?d.getSnapshot():d;if(!y||typeof y!="object"||!("retainedBy"in y))return;let n=y.retainedBy;if(!(!n||typeof n!="object"||!("mainView"in n)||typeof n.mainView!="number"))return{retainedBy:{mainView:n.mainView}}}t(ei,"retainInfoSnapshot");function ti(r){let o=r?.byId;if(o!==void 0){for(let d of Object.values(o))if(d&&(d.retainedBy?.mainView??0)>0)return d.id}}t(ti,"mainViewSessionId");function dt(r){return ti(r)}t(dt,"currentSessionId");function ni(r,o,d){return o===void 0||o===""?!1:(r?.byId?.[o]?.retainedBy?.mainView??0)>0||(ei(d,o)?.retainedBy?.mainView??0)>0}t(ni,"sessionIsCurrent");async function Er(r,o,d,y=()=>!0){if(d){if(typeof r.prepare=="function"&&await r.prepare(o),!y())return;await r.restore(o)}y()&&await r.open(o)}t(Er,"openArchivedConversation");function jr(r,o,d,{onOpened:y=t(()=>{},"onOpened"),beginNavigation:n,warn:i=t((...c)=>console.warn(...c),"warn")}={}){let c,O=r?.clearArchivedCurrent,N=r&&Object.getOwnPropertyDescriptor(r,"clearArchivedCurrent"),B=t(C=>ni(o.list.getSnapshot(),C,o),"viewing"),j=t(function(...C){return c!==void 0&&B(c)&&d.list.getSnapshot().archivedSessionIds.includes(c)?!1:(c=void 0,O?.apply(this,C))},"wrapped"),Q=t(()=>r&&Object.getOwnPropertyDescriptor(r,"clearArchivedCurrent")?.value===j,"ownsWrapper");if(r&&typeof O=="function")try{if(r.clearArchivedCurrent=j,!Q())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(C){i("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",C)}return{open(C){c=C;try{if(typeof O=="function"&&!Q()&&d.list.getSnapshot().archivedSessionIds.includes(C))throw i("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new Ft("navigationUnavailable");if(n?.(),typeof r?.openSession!="function")throw i("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new Ft("navigationUnavailable");if(r.openSession(C),!B(C))throw i("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof O=="function"}),new Ft("sessionNotRetained");y()}catch(M){throw c=void 0,M}},dispose(){c=void 0,!(!r||Object.getOwnPropertyDescriptor(r,"clearArchivedCurrent")?.value!==j)&&(N?Object.defineProperty(r,"clearArchivedCurrent",N):delete r.clearArchivedCurrent,O?.call(r))}}}t(jr,"allowArchivedNavigation");var Jt=require("@deepseek-ai/dsh-client-ui-primitives");var Dr={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"},Tr={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 An(r){return r.toLowerCase().startsWith("zh")?Dr:Tr}t(An,"pluginUpdateCopy");function si(r,o,d,y){let n=An(r),i=o?.restartDesktop===!0||o?.profileName==="desktop",c=i?{...n,manualHint:n.manualHintDesktop}:n,O=d!=="idle",N=c.checking,B="";return d==="checking"?N=c.checking:d==="updating"?N=c.updating:y.type==="error"?(N=y.message||c.failed,B="error"):y.type==="restart"?(N=i?c.restartDesktop:c.restart,B="success"):y.type==="restarting"?(N=c.restarting,B="success"):o===void 0?N=c.checking:o.latestCheckFailed?(N=c.failed,B="error"):!o.canAutoUpdate&&o.updateAvailable?(N=c.unavailable,B="update"):o.updateAvailable?(N=`${c.found}: v${o.latestVersion??c.unknown}`,B="update"):(N=c.latest,B="success"),{copy:c,busy:O,message:N,kind:B,loading:d==="updating",updateLabel:d==="updating"?c.updating:c.auto,disabled:O||o?.canAutoUpdate!==!0||o.updateAvailable!==!0,currentVersion:o===void 0?c.unknown:`v${o.currentVersion}`,latestVersion:o?.latestVersion===void 0?c.unknown:`v${o.latestVersion}`,profileName:o?.profileName??c.unknown,profileRaw:o?.profileName??"",latestRaw:o?.latestVersion??"latest"}}t(si,"describePluginUpdate");function Nr(r,o,d){let y="idle",n=o,i={type:"status"},c=0,O=new Set,N=t(()=>{for(let j of O)j()},"emit"),B=t(j=>{n=j,d?.(j)},"assign");return{get posts(){return c},subscribe(j){return O.add(j),()=>{O.delete(j)}},view(j){return si(j,n,y,i)},async check(){if(y==="idle"){y="checking",i={type:"status"},N();try{B(await r("GET")),i={type:"status"}}catch(j){i={type:"error",message:j instanceof Error?j.message:""}}finally{y="idle",N()}}},async update(){if(y==="idle"){y="updating",i={type:"status"},c+=1,N();try{let j=await r("POST");B(j),i={type:j.autoReload===!0?"restarting":"restart"}}catch(j){i={type:"error",message:j instanceof Error?j.message:""}}finally{y="idle",N()}}}}}t(Nr,"createUpdateFlow");function Mr(r,o,d){return`dsh plugin${r.trim()===""?"":` --profile ${r.trim()}`} add ${o}@${d} --registry=https://registry.npmjs.org/`}t(Mr,"manualPluginUpdateCommand");function Or(r,o){return r.key!=="Escape"?!1:(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation(),o(),!0)}t(Or,"handlePluginUpdateEscape");function Hr(r){let d=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(d===void 0)throw new Error("createRoot unavailable");return d(r)}t(Hr,"mountRoot");var ri="x-michengai-plugin-update",Pr="michengai-plugin-update-ui",ms=`
|
|
28
|
+
`;function Ns(n,r={},o){let p=n.createElement,a=t((E,x)=>r[E]?p("span",{className:x,"aria-hidden":!0},p(r[E],{width:16,height:16})):null,"icon");function l(E,x,T){let S=x.primary?"primary":x.subtle?"ghost":"outline";return p(o??(y=>p("button",{type:"button",disabled:y.disabled,onClick:y.onClick},y.children)),{variant:S,size:"sm",disabled:x.disabled,onClick:x.onClick,icon:T??void 0},E)}t(l,"actionButton");function c({title:E,glyph:x,children:T}){let[S,U]=n.useState(!1);return p(Ct,{className:"dsham_healthTech",title:p(n.Fragment,null,x,E),open:S,onToggle:t(()=>U(y=>!y),"onToggle")},T)}return t(c,"TechnicalDetails"),t(function({items:x,sessions:T,t:S=ha,isArchived:U=!0,diagnoseSession:y,repairSession:I,retry:P,pending:R}){let[V,q]=n.useState({}),[H,ue]=n.useState(""),[Q,ce]=n.useState(""),fe=x.filter(X=>X.error),F=t(async(X,ze)=>{if(!H){ue(X.sessionId),ce("");try{let Y=await(ze&&I?I({sessionId:X.sessionId,token:V[X.sessionId].token}):y({sessionId:X.sessionId}));q(Ae=>({...Ae,[X.sessionId]:Y})),Y.repaired&&(ce(!0),P())}catch(Y){q(Ae=>({...Ae,[X.sessionId]:{repairable:!1,code:"failed",reason:"",advice:Ee(Y).slice(0,1e3)}}))}finally{ue("")}}},"run");return p("div",{className:"dsham_health"},p("style",null,pa),Q&&p("p",{role:"status",className:"dsham_healthNotice"},a("check"),S("health.notice")),fe.length>0&&p("details",{className:"dsham_healthPanel"},p("summary",{className:"dsham_healthSummary"},a("warning","dsham_healthIcon"),p("span",{className:"dsham_healthSummaryText"},S(U?"health.archived":"health.unarchived"),p("span",{className:"dsham_healthCount"},fe.length)),p("span",{className:"dsham_healthSummaryHint"},S("health.heading")),a("chevron","dsham_healthChevron")),p("div",{className:"dsham_healthBody"},p("div",{className:"dsham_healthIntro"},p("span",null,S(U?"health.scopeArchived":"health.scopeUnarchived")),l(S("health.retry"),{subtle:!0,disabled:R||!!H,onClick:P},a("refresh"))),fe.map(X=>{let ze=Ts(X.error),Y=V[X.sessionId],Ae=Y?Object.hasOwn(Mt,"health."+Y.code+".reason")?Y.code:Y.repaired?"repaired":Y.repairable?"ready":"blocked":ze.code,at=T.find(it=>it.id===X.sessionId),Se=Y?.repairable&&I;return p("section",{key:X.sessionId,className:"dsham_healthItem","aria-busy":H===X.sessionId},p("div",{className:"dsham_healthRow"},p("div",{className:"dsham_healthCopy"},p("strong",{className:"dsham_healthTitle"},at?.displayTitle||at?.title||X.sessionId),p("div",{className:"dsham_healthState","data-state":Y?.repaired?"success":Se?"ready":"pending",role:Y?"status":void 0},a(Y?.repaired?"check":"info"),S("health."+Ae+".reason",{n:Y?.count??0}))),y&&l(S(H===X.sessionId?"health.busy":Se?"health.confirm":"health.diagnose"),{primary:!!Se,disabled:!!H,onClick:t(()=>F(X,!!Se),"onClick")},a(H===X.sessionId?"refresh":Se?"check":"search"))),Y&&p("p",{className:"dsham_healthAdvice"},S("health."+Ae+".advice")),!Y&&ze.code!=="legacy-source"&&p("p",{className:"dsham_healthAdvice"},S("health."+Ae+".advice")),p(c,{title:S("health.technical"),glyph:a("chevron","dsham_healthChevron")},p("div",{className:"dsham_healthLog"},p("p",null,X.sessionId),p("p",null,X.error),Y?.reason&&p("p",null,Y.reason),Y?.advice&&p("p",null,Y.advice))))}))))},"SessionHealthPanel")}t(Ns,"createSessionHealthPanel");function js(n,r={}){let o=n.createElement;function p({text:y,query:I=""}){let P=Es(y,I);return P?o(n.Fragment,null,y.slice(0,P.start),o("mark",null,y.slice(P.start,P.end)),y.slice(P.end)):y}t(p,"HighlightedText");function a(y,I,P,R){let V=JSON.stringify(y),q=JSON.stringify([V,I]),[H,ue]=n.useState(0),[Q,ce]=n.useState({key:"",status:"idle",items:[],failures:[]});return n.useEffect(()=>{if(!P||!I.trim()||!R)return;let F=new AbortController;ce({key:q,status:"loading",items:[],failures:[],done:0,total:y.length});let X=setTimeout(()=>{Rs(JSON.parse(V),I,R,{signal:F.signal,onProgress:t(ze=>{F.signal.aborted||ce({key:q,status:"loading",...ze})},"onProgress")}).then(ze=>{F.signal.aborted||ce({key:q,status:"ready",done:y.length,total:y.length,...ze})}).catch(ze=>{F.signal.aborted||ce(Y=>({...Y,key:q,status:"error",error:Ee(ze)}))})},350);return()=>{F.abort(),clearTimeout(X)}},[V,I,P,R,H]),{...P&&I.trim()&&R?Q.key===q?Q:{key:q,status:"loading",items:[],failures:[],done:0,total:y.length}:{status:"idle",items:[],failures:[]},retry:t(()=>ue(F=>F+1),"retry")}}t(a,"useArchiveSearch");function l(y,I,P,R=!1){let V=JSON.stringify(y.map(F=>[F.id,F.updatedAt])),[q,H]=n.useState(0),[ue,Q]=n.useState({key:"",items:[],pending:!1});n.useEffect(()=>{if(!I||R)return;let F=!0,X=[...new Set(JSON.parse(V).map(Y=>Y[0]))];return Q({key:V,items:[],pending:X.length>0}),t(async()=>{let Y=[];for(let Ae=0;Ae<X.length&&F;Ae+=20){let at=X.slice(Ae,Ae+20);try{let Se=Cn.parse(await I({sessionIds:at})),it=new Map(Se.items.map(mt=>[mt.sessionId,mt]));Y.push(...at.map(mt=>it.get(mt)??{sessionId:mt,turnCount:null,path:null,error:"",errorKey:"details.notReturned"}))}catch(Se){Y.push(...at.map(it=>({sessionId:it,turnCount:null,path:null,error:Ee(Se)})))}F&&Q({key:V,items:[...Y],pending:Ae+20<X.length})}},"load")(),()=>{F=!1}},[V,I,q,R]);let ce=I&&ue.key===V?ue:{items:[],pending:!!(I&&y.length)},fe=ce.items.map(F=>F.errorKey?{...F,error:P?P(F.errorKey):F.errorKey}:F);return{...ce,items:fe,byId:Object.fromEntries(fe.map(F=>[F.sessionId,F])),retry:t(()=>H(F=>F+1),"retry")}}t(l,"useSessionDetails");function c(y,I){let[P,R]=n.useState(null),[V,q]=n.useState({status:"idle"}),[H,ue]=n.useState(0),Q=P,ce=P&&I.includes(P.session.id);return n.useEffect(()=>{P&&!ce&&R(null)},[P,ce]),n.useEffect(()=>{if(!ce||typeof window>"u")return;let fe=t(F=>{F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation(),R(null))},"onKeyDown");return window.addEventListener("keydown",fe,!0),()=>window.removeEventListener("keydown",fe,!0)},[ce]),n.useEffect(()=>{if(!P||!ce||!y)return;let fe=!0;return q({key:Q,status:"loading"}),Promise.resolve().then(()=>y({sessionId:P.session.id,query:P.query})).then(F=>{fe&&q({key:Q,status:"ready",value:F})}).catch(F=>{fe&&q({key:Q,status:"error",error:Ee(F)})}),()=>{fe=!1}},[Q,ce,y,H]),{target:ce?P:null,...V.key===Q?V:{status:"loading"},open:t((fe,F="")=>R({session:fe,query:F}),"open"),close:t(()=>R(null),"close"),retry:t(()=>ue(fe=>fe+1),"retry")}}t(c,"useArchivePreview");function E({title:y,failures:I,separator:P}){let[R,V]=n.useState(!1),q=o("ul",null,I.map(H=>o("li",{key:H.sessionId},H.sessionId,P,H.message)));return o(Ct,{title:y,open:R,onToggle:t(()=>V(H=>!H),"onToggle")},q)}t(E,"FailureDetails");function x(y,I){let P=r.Button??(R=>o("button",{type:"button",disabled:R.disabled,onClick:R.onClick},R.children));return o(P,{variant:"outline",size:"sm",...I},y)}t(x,"textButton");function T({t:y,from:I,to:P,onFrom:R,onTo:V,invalid:q,onClear:H}){return o("div",{className:"dsham_dateFilter"},o(bs,{from:I,to:P,invalid:q,label:y("discovery.date"),fromLabel:y("discovery.from"),toLabel:y("discovery.to"),onFrom:R,onTo:V,onClear:H}),q?o("p",{className:"dsham_dateAlert",role:"alert"},y("discovery.invalidDate")):null)}t(T,"DiscoveryFilters");function S({state:y,t:I}){return y.status==="idle"?null:o("div",{className:"dsham_discoveryStatus",role:"status","aria-live":"polite"},o("p",null,I(y.status==="loading"?"discovery.searching":y.status==="error"?"discovery.searchError":"discovery.searched",{done:y.done??0,total:y.total??0})),y.status==="error"&&o("p",null,y.error),y.failures.length>0&&o(E,{title:I("discovery.failed",{n:y.failures.length}),failures:y.failures,separator:I("common.separator")}),(y.status==="error"||y.status==="ready"&&y.failures.length>0)&&x(I("discovery.retry"),{onClick:y.retry}))}t(S,"SearchStatus");function U({preview:y,t:I,MarkdownText:P}){let[R,V]=n.useState(!1);if(y.status==="loading")return o("p",{role:"status"},I("discovery.loading"));if(y.status==="error")return o("div",null,o("p",{role:"alert"},y.error),x(I("discovery.retry"),{onClick:y.retry}));let q=y.value;return q?o("div",{className:"dsham_previewMessages"},o("div",{className:"dsham_previewToolbar"},o("span",{title:I("discovery.previewHint")},I("discovery.readOnly")," \xB7 ",I("discovery.messageCount",{n:q.messages.length})),P&&o(r.SegmentedControl??"div",{id:"dsham-preview-mode",label:I("discovery.displayMode"),value:R?"raw":"formatted",options:[{value:"formatted",label:I("discovery.formatted")},{value:"raw",label:I("discovery.raw")}],onChange:t(H=>V(H==="raw"),"onChange")})),q.hasEarlier&&o("p",null,I("discovery.earlier")),!q.messages.length&&o("p",null,I("discovery.empty")),q.messages.map(H=>o("article",{key:H.seq,className:"dsham_previewMessage"},o("div",{className:"dsham_previewRole","data-role":H.role},o("span",{"aria-hidden":!0},I(H.role==="user"?"discovery.you":"discovery.ai")),o("strong",null,I("discovery."+H.role))),R||!P?o("pre",{className:"dsham_previewRaw"},o(p,{text:H.text,query:y.target?.query})):o(P,{text:H.text,streaming:!1,labels:{code:{copyLabel:I("discovery.copyCode"),copiedLabel:I("details.copied")},footnotes:I("discovery.footnotes")}}),H.truncated&&o("small",null,I("discovery.truncated")))),q.hasLater&&o("p",null,I("discovery.later"))):null}return t(U,"PreviewContent"),{HighlightedText:p,useSessionDetails:l,useArchiveSearch:a,useArchivePreview:c,DiscoveryFilters:T,SearchStatus:S,PreviewContent:U}}t(js,"createDiscoveryTools");var Ds=[".dsham_dateFilter{display:flex;align-items:center;gap:8px;min-width:0}",".dsham_dateAlert{margin:0;font-size:12px;color:var(--dsw-alias-state-error-primary)}",".dsham_dateRange{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0;height:32px;padding:0 8px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);box-sizing:border-box}",".dsham_dateRange:hover{border-color:var(--dsw-alias-border-l3)}",".dsham_dateRange:focus-within{border-color:var(--dsw-alias-state-business-primary);outline:1px solid var(--dsw-alias-state-business-primary)}",".dsham_date{border:0;outline:none;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;height:24px;padding:0;color-scheme:dark;flex:1 1 0;min-width:0}",".dsham_dateSep{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px;user-select:none}",".dsham_dateClearBtn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;margin-left:2px;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);border-radius:50%;cursor:pointer;font-size:14px;line-height:1}",".dsham_dateClearBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}",".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(""),Ps={"common.separator":"\uFF1A","details.notReturned":"\u5BBF\u4E3B\u672A\u8FD4\u56DE\u4F1A\u8BDD\u8BE6\u60C5","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.turns":"{n} \u8F6E","details.unknown":"\u8F6E\u6B21\u672A\u77E5","details.pending":"\u8F6E\u6B21\u8BFB\u53D6\u4E2D","details.hint":"\u6309\u7528\u6237\u63D0\u4EA4\u6D88\u606F\u6570\u7EDF\u8BA1\uFF0C\u4E0D\u542B\u5DE5\u5177\u8C03\u7528\u548C\u63D2\u4EF6\u6CE8\u5165","details.more":"\u8F6E\u6B21\u6700\u591A","details.less":"\u8F6E\u6B21\u6700\u5C11","details.failed":"{n} \u6761\u4F1A\u8BDD\u8BE6\u60C5\u8BFB\u53D6\u5931\u8D25","details.copyId":"\u590D\u5236\u4F1A\u8BDD ID","details.copyPath":"\u590D\u5236\u4F1A\u8BDD\u8DEF\u5F84","details.copied":"\u5DF2\u590D\u5236","details.noPath":"\u5BBF\u4E3B\u672A\u63D0\u4F9B\u53EF\u590D\u5236\u7684\u4F1A\u8BDD\u8DEF\u5F84","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"},Ms={"common.separator":": ","details.notReturned":"The host did not return session details","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.turns":"{n} turns","details.unknown":"Unknown turns","details.pending":"Loading turns","details.hint":"User submissions; excludes tool calls and injected messages","details.more":"Most turns","details.less":"Fewest turns","details.failed":"Could not read turns for {n} sessions","details.copyId":"Copy session ID","details.copyPath":"Copy session path","details.copied":"Copied","details.noPath":"The host did not provide a session path","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"},zs={"common.separator":": ","details.notReturned":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u0432\u0435\u0440\u043D\u0443\u043B \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u0441\u0435\u0441\u0441\u0438\u0438","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.turns":"{n} \u0445\u043E\u0434\u043E\u0432","details.unknown":"\u0425\u043E\u0434\u043E\u0432 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E","details.pending":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0445\u043E\u0434\u043E\u0432","details.hint":"\u041F\u043E \u0447\u0438\u0441\u043B\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F; \u0431\u0435\u0437 \u0432\u044B\u0437\u043E\u0432\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u0438 \u0438\u043D\u044A\u0435\u043A\u0446\u0438\u0439 \u043F\u043B\u0430\u0433\u0438\u043D\u043E\u0432","details.more":"\u0411\u043E\u043B\u044C\u0448\u0435 \u0445\u043E\u0434\u043E\u0432","details.less":"\u041C\u0435\u043D\u044C\u0448\u0435 \u0445\u043E\u0434\u043E\u0432","details.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u0445\u043E\u0434\u044B \u0434\u043B\u044F {n} \u0441\u0435\u0441\u0441\u0438\u0439","details.copyId":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID \u0441\u0435\u0441\u0441\u0438\u0438","details.copyPath":"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u0438","details.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","details.noPath":"\u0425\u043E\u0441\u0442 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u0438\u043B \u043F\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u0438","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 pt=class extends Error{static{t(this,"ArchiveNavigationError")}code;constructor(r){super(r),this.name="ArchiveNavigationError",this.code=r}};function Os(n,r){return n instanceof pt?r(`archives.${n.code}`):Ee(n)}t(Os,"formatArchiveNavigationError");function ma(n,r){if(typeof n?.retainInfo!="function")return;let o=n.retainInfo(r),p=o&&typeof o=="object"&&"getSnapshot"in o&&typeof o.getSnapshot=="function"?o.getSnapshot():o;if(!p||typeof p!="object"||!("retainedBy"in p))return;let a=p.retainedBy;if(!(!a||typeof a!="object"||!("mainView"in a)||typeof a.mainView!="number"))return{retainedBy:{mainView:a.mainView}}}t(ma,"retainInfoSnapshot");function ga(n){let r=n?.byId;if(r!==void 0){for(let o of Object.values(r))if(o&&(o.retainedBy?.mainView??0)>0)return o.id}}t(ga,"mainViewSessionId");function Ze(n){return ga(n)}t(Ze,"currentSessionId");function fa(n,r,o){return r===void 0||r===""?!1:(n?.byId?.[r]?.retainedBy?.mainView??0)>0||(ma(o,r)?.retainedBy?.mainView??0)>0}t(fa,"sessionIsCurrent");async function Ls(n,r,o,p=()=>!0){if(o){if(typeof n.prepare=="function"&&await n.prepare(r),!p())return;await n.restore(r)}p()&&await n.open(r)}t(Ls,"openArchivedConversation");function Fs(n,r,o,{onOpened:p=t(()=>{},"onOpened"),beginNavigation:a,warn:l=t((...c)=>console.warn(...c),"warn")}={}){let c,E=n?.clearArchivedCurrent,x=n&&Object.getOwnPropertyDescriptor(n,"clearArchivedCurrent"),T=t(y=>fa(r.list.getSnapshot(),y,r),"viewing"),S=t(function(...y){return c!==void 0&&T(c)&&o.list.getSnapshot().archivedSessionIds.includes(c)?!1:(c=void 0,E?.apply(this,y))},"wrapped"),U=t(()=>n&&Object.getOwnPropertyDescriptor(n,"clearArchivedCurrent")?.value===S,"ownsWrapper");if(n&&typeof E=="function")try{if(n.clearArchivedCurrent=S,!U())throw new Error("\u5BFC\u822A\u65B9\u6CD5\u672A\u63A5\u7EB3\u5F52\u6863\u9002\u914D")}catch(y){l("archive-manager: \u65E0\u6CD5\u9002\u914D\u5F52\u6863\u5BFC\u822A\uFF0C\u8BF7\u6062\u590D\u4F1A\u8BDD\u540E\u6253\u5F00\u3002",y)}return{open(y){c=y;try{if(typeof E=="function"&&!U()&&o.list.getSnapshot().archivedSessionIds.includes(y))throw l("archive-manager: \u5F52\u6863\u5BFC\u822A\u9002\u914D\u4E0D\u53EF\u7528\u6216\u5DF2\u88AB\u66FF\u6362\u3002"),new pt("navigationUnavailable");if(a?.(),typeof n?.openSession!="function")throw l("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002"),new pt("navigationUnavailable");if(n.openSession(y),!T(y))throw l("archive-manager: \u5BBF\u4E3B\u672A\u4FDD\u7559\u76EE\u6807\u4F1A\u8BDD\u3002",{cleanupAvailable:typeof E=="function"}),new pt("sessionNotRetained");p()}catch(I){throw c=void 0,I}},dispose(){c=void 0,!(!n||Object.getOwnPropertyDescriptor(n,"clearArchivedCurrent")?.value!==S)&&(x?Object.defineProperty(n,"clearArchivedCurrent",x):delete n.clearArchivedCurrent,E?.call(n))}}}t(Fs,"allowArchivedNavigation");var yt=require("@deepseek-ai/dsh-client-ui-primitives");var Bs={check:"\u68C0\u67E5\u66F4\u65B0",update:"\u66F4\u65B0",recheck:"\u91CD\u65B0\u68C0\u67E5",auto:"\u81EA\u52A8\u66F4\u65B0",updating:"\u6B63\u5728\u66F4\u65B0\u2026",copy:"\u590D\u5236\u547D\u4EE4",copied:"\u5DF2\u590D\u5236",copyFailed:"\u590D\u5236\u5931\u8D25",checking:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026",latest:"\u5DF2\u662F\u6700\u65B0\u7248\u672C",found:"\u53D1\u73B0\u65B0\u7248\u672C",failed:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",current:"\u8FD0\u884C\u7248\u672C",latestLabel:"\u6700\u65B0\u7248\u672C",profile:"\u76EE\u6807 profile",unknown:"\u672A\u77E5",manual:"\u624B\u5DE5\u66F4\u65B0",manualHint:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u53EF\u5728\u5F53\u524D DSH \u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5B8C\u6210\u540E\u91CD\u542F DSH Web\u3002",manualHintDesktop:"\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u65F6\uFF0C\u8BF7\u5148\u5B8C\u5168\u9000\u51FA DSH Desktop\uFF0C\u518D\u7528 Desktop \u81EA\u5E26\u7684 dsh \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u3002\u666E\u901A dsh \u4F1A\u62D2\u7EDD desktop profile\u3002",intro:"\u4EC5\u68C0\u67E5\u5E76\u66F4\u65B0\u5F53\u524D\u63D2\u4EF6\uFF0C\u4E0D\u4F1A\u8054\u52A8\u5B89\u88C5\u5176\u4ED6\u63D2\u4EF6\u3002",restart:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u91CD\u542F DSH Web\u3002",restartDesktop:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u65B0\u6253\u5F00 DSH Desktop\u3002",restarting:"\u66F4\u65B0\u5B8C\u6210\uFF0C\u6B63\u5728\u91CD\u542F DSH Desktop\u2026",unavailable:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u4F7F\u7528\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4\u3002"},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 Ot(n){return n.toLowerCase().startsWith("zh")?Bs:Us}t(Ot,"pluginUpdateCopy");function va(n,r,o,p){let a=Ot(n),l=r?.restartDesktop===!0||r?.profileName==="desktop",c=l?{...a,manualHint:a.manualHintDesktop}:a,E=o!=="idle",x=c.checking,T="";return o==="checking"?x=c.checking:o==="updating"?x=c.updating:p.type==="error"?(x=p.message||c.failed,T="error"):p.type==="restart"?(x=l?c.restartDesktop:c.restart,T="success"):p.type==="restarting"?(x=c.restarting,T="success"):r===void 0?x=c.checking:r.latestCheckFailed?(x=c.failed,T="error"):!r.canAutoUpdate&&r.updateAvailable?(x=c.unavailable,T="update"):r.updateAvailable?(x=`${c.found}: v${r.latestVersion??c.unknown}`,T="update"):(x=c.latest,T="success"),{copy:c,busy:E,message:x,kind:T,loading:o==="updating",updateLabel:o==="updating"?c.updating:c.auto,disabled:E||r?.canAutoUpdate!==!0||r.updateAvailable!==!0,currentVersion:r===void 0?c.unknown:`v${r.currentVersion}`,latestVersion:r?.latestVersion===void 0?c.unknown:`v${r.latestVersion}`,profileName:r?.profileName??c.unknown,profileRaw:r?.profileName??"",latestRaw:r?.latestVersion??"latest"}}t(va,"describePluginUpdate");function Hs(n,r,o){let p="idle",a=r,l={type:"status"},c=0,E=new Set,x=t(()=>{for(let S of E)S()},"emit"),T=t(S=>{a=S,o?.(S)},"assign");return{get posts(){return c},subscribe(S){return E.add(S),()=>{E.delete(S)}},view(S){return va(S,a,p,l)},async check(){if(p==="idle"){p="checking",l={type:"status"},x();try{T(await n("GET")),l={type:"status"}}catch(S){l={type:"error",message:S instanceof Error?S.message:""}}finally{p="idle",x()}}},async update(){if(p==="idle"){p="updating",l={type:"status"},c+=1,x();try{let S=await n("POST");T(S),l={type:S.autoReload===!0?"restarting":"restart"}}catch(S){l={type:"error",message:S instanceof Error?S.message:""}}finally{p="idle",x()}}}}}t(Hs,"createUpdateFlow");function Ws(n,r,o){return`dsh plugin${n.trim()===""?"":` --profile ${n.trim()}`} add ${r}@${o} --registry=https://registry.npmjs.org/`}t(Ws,"manualPluginUpdateCommand");function qs(n,r){return n.key!=="Escape"?!1:(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),r(),!0)}t(qs,"handlePluginUpdateEscape");function Gs(n){let o=Function("return globalThis.__dshArchiveReactDOMClient")()?.createRoot;if(o===void 0)throw new Error("createRoot unavailable");return o(n)}t(Gs,"mountRoot");var ya="x-michengai-plugin-update",Vs="michengai-plugin-update-ui",An=`
|
|
29
29
|
.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}
|
|
30
30
|
.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}}
|
|
31
31
|
.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}}
|
|
32
|
-
`;function ai(){let r=document.getElementById(Pr);if(r!==null){r.textContent!==ms&&(r.textContent=ms);return}let o=document.createElement("style");o.id=Pr,o.textContent=ms,(document.head??document.documentElement).append(o)}t(ai,"ensureStyle");function ii(r){if(r===null||typeof r!="object")return!1;let o=r;return typeof o.packageName=="string"&&typeof o.currentVersion=="string"&&typeof o.updateAvailable=="boolean"&&typeof o.profileName=="string"&&typeof o.canAutoUpdate=="boolean"&&typeof o.latestCheckFailed=="boolean"&&(o.latestVersion===void 0||typeof o.latestVersion=="string")}t(ii,"validPayload");async function zr(r,o,d){let y=d===void 0?{}:{signal:d},n=await fetch(r,o==="GET"?{cache:"no-store",...y}:{method:"POST",headers:{"content-type":"application/json",[ri]:"1"},body:"{}",...y}),i=await n.json();if(!n.ok||!ii(i))throw new Error(i&&typeof i=="object"&&"error"in i&&typeof i.error=="string"?i.error:An(document.documentElement.lang).failed);return i}t(zr,"requestStatus");function oi(r){let o=L.useRef(null);return L.useLayoutEffect(()=>{o.current?.replaceChildren(r.node)},[r.node]),L.createElement("span",{ref:o,className:"mpi-icon","aria-hidden":!0})}t(oi,"HostIcon");function li(r){let o=L.useRef(null),[,d]=L.useState(0),[y,n]=L.useState("idle");L.useEffect(()=>r.flow.subscribe(()=>d(j=>j+1)),[r.flow]),L.useEffect(()=>{let j=document.documentElement,Q=new MutationObserver(()=>d(C=>C+1));return Q.observe(j,{attributes:!0,attributeFilter:["lang"]}),()=>Q.disconnect()},[]),L.useEffect(()=>{r.flow.check()},[r.flow]),L.useEffect(()=>{function j(Q){Or(Q,r.onClose)}return t(j,"onKey"),document.addEventListener("keydown",j,!0),()=>document.removeEventListener("keydown",j,!0)},[r.onClose]);let i=document.documentElement.lang,c=r.flow.view(i),O=i.toLowerCase().startsWith("zh")?r.zhName:i.toLowerCase().startsWith("ru")?r.ruName:r.enName,N=Mr(c.profileRaw,r.packageName,c.latestRaw),B=y==="copied"?c.copy.copied:y==="failed"?c.copy.copyFailed:c.copy.copy;return L.createElement(Jt.Modal,{open:!0,className:"mpi-dialog",title:`${O} ${c.copy.update}`,closeLabel:"Close",onClose:r.onClose,footer:[L.createElement(Jt.Button,{key:"check",variant:"outline",disabled:c.busy,onClick:t(()=>{r.flow.check()},"onClick")},c.copy.recheck),L.createElement(Jt.Button,{key:"update",variant:"primary",disabled:c.disabled,onClick:t(()=>{r.flow.update()},"onClick")},c.updateLabel)]},L.createElement("div",{ref:o},L.createElement("p",{className:"mpi-intro"},c.copy.intro),L.createElement("dl",{className:"mpi-meta"},L.createElement("dt",null,c.copy.current),L.createElement("dd",null,L.createElement("span",{className:"mpi-mono"},c.currentVersion)),L.createElement("dt",null,c.copy.latestLabel),L.createElement("dd",{className:"mpi-latest"},L.createElement("span",{className:"mpi-mono"},c.latestVersion),L.createElement("span",{className:"mpi-status",role:"status","data-kind":c.kind,...c.kind==="update"?{style:{color:"#e8b15a"}}:{}},c.message)),L.createElement("dt",null,c.copy.profile),L.createElement("dd",null,L.createElement("span",{className:"mpi-mono"},c.profileName))),c.busy?L.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},L.createElement("div",{className:"dssm-update-progress-bar"})):null,L.createElement("section",{className:"mpi-manual"},L.createElement("h3",null,c.copy.manual),L.createElement("p",null,c.copy.manualHint),L.createElement("div",{className:"mpi-command"},L.createElement("code",null,N),L.createElement(Jt.Button,{variant:"outline",size:"sm",disabled:c.busy,onClick:t(()=>{let j=navigator.clipboard?.writeText(N);if(j===void 0){n("failed");return}j.then(()=>{n("copied"),window.setTimeout(()=>n("idle"),1400)}).catch(()=>n("failed"))},"onClick")},B)))))}t(li,"UpdateDialog");function Br(r){if(typeof document>"u"||document.body===null)return()=>{};ai();let o=new AbortController,d,y,n,i,c,O,N;function B(){n?.unmount(),n=void 0,y=void 0,i=void 0}t(B,"unmountCheck");function j(){if(n===void 0)return;i===void 0&&(i=r.createIcon("refresh"));let z=i;n.render(L.createElement(Jt.Button,{variant:"outline",size:"sm",onClick:C,icon:L.createElement(oi,{node:z})},L.createElement("span",{"data-mpi-label":""},An(document.documentElement.lang).check)))}t(j,"renderCheck");function Q(){O?.unmount(),O=void 0,c?.remove(),c=void 0}t(Q,"closeDialog");function C(){Q();let z=document.createElement("div");z.className="mpi-dialog-root",document.body.append(z),c=z,O=Hr(z),O.render(L.createElement(li,{flow:Nr(le=>zr(r.endpoint,le,o.signal),d,le=>{d=le,M()}),packageName:r.packageName,zhName:r.zhName,enName:r.enName,ruName:r.ruName,onClose:Q}))}t(C,"openDialog");function M(){let z=document.querySelector(r.titleRowSelector);if(z===null)return;let le=z.querySelector("h1,h2");if(le!==null&&d!==void 0){let Ie=le.querySelector(`.mpi-version[data-package="${r.packageName}"]`);Ie===null&&(Ie=document.createElement("span"),Ie.className="mpi-version",Ie.dataset.package=r.packageName,le.append(Ie));let ze=`v${d.currentVersion}`;Ie.textContent!==ze&&(Ie.textContent=ze)}y!==void 0&&!y.isConnected&&B();let se=z.querySelector(r.linksSelector);if(se===null)return;let te=se.querySelector(`[data-mpi-check="${r.packageName}"]`);if(te!==null){let Ie=te.querySelector("[data-mpi-label]");(Ie===null||Ie.textContent!==An(document.documentElement.lang).check)&&j();return}let qe=document.createElement("span");qe.dataset.mpiCheck=r.packageName,qe.className="mpi-check-host",se.append(qe),y=qe,n=Hr(qe),j()}t(M,"applyControls");let G=new MutationObserver(()=>{N===void 0&&(N=window.requestAnimationFrame(()=>{N=void 0,M()}))});return G.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]}),M(),zr(r.endpoint,"GET",o.signal).then(z=>{d=z,M()}).catch(()=>{}),()=>{o.abort(),G.disconnect(),Q(),B(),N!==void 0&&window.cancelAnimationFrame(N),document.querySelectorAll(`[data-mpi-check="${r.packageName}"],.mpi-version[data-package="${r.packageName}"]`).forEach(z=>z.remove())}}t(Br,"observePluginUpdate");function gs(r){if(typeof r!="string"||r.length===0||r.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u957F\u5EA6\u987B\u4E3A 1\uFF5E1024 \u4E2A\u5B57\u7B26");return r}t(gs,"checkedId");var ci={parse(r){let o=Ce(r);if(!o||typeof o!="object"||typeof o.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:gs(o.sessionId),favorite:o.favorite}}},di={parse(r){let o=Ce(r);if(!o||!Array.isArray(o.favoriteSessionIds)||o.favoriteSessionIds.length>1e5)throw new TypeError("\u6536\u85CF\u96C6\u5408\u65E0\u6548");return{favoriteSessionIds:[...new Set(o.favoriteSessionIds.map(gs))]}},safeParse(r){try{return{success:!0,data:this.parse(r)}}catch(o){return{success:!1,error:o}}}};function Fr(){let r=t((o,d)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${o}`,create:t(()=>d,"create"),schema:d}),"codec");return["favoriteSessions","setSessionFavorite"].map(o=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${o}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:o,invocation:{kind:"direct"},parameters:o==="favoriteSessions"?[]:[{name:"input",wire:"input",source:"json",codec:r("FavoriteInput",ci)}],result:r("FavoriteState",di),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(Fr,"favoriteInvocations");function fs(r,{days:o,now:d=Date.now(),favorites:y=new Set,currentId:n,pending:i=new Map}){if(!r||!Number.isInteger(o)||o<1||o>36500||y.has(r.id)||r.id===n||(r.retainedBy?.mainView??0)>0||r.running||(r.runningSubagentCount??0)>0||r.pendingInteraction!=null||i.has(r.id))return!1;let c=typeof r.updatedAt=="number"?r.updatedAt:Date.parse(r.updatedAt??"");return Number.isFinite(c)&&c<=d-o*864e5}t(fs,"idleArchiveCandidate");async function ui(r,o,{onProgress:d,refresh:y}={}){let n=[...new Set(r.map(gs))],i={requested:n,succeeded:[],skipped:[],failures:[],unprocessed:[],remaining:[],refreshError:null},c=t(()=>d?.({total:n.length,done:i.succeeded.length+i.skipped.length+i.failures.length,succeeded:i.succeeded.length,skipped:i.skipped.length,failed:i.failures.length}),"report");c();for(let[O,N]of n.entries()){try{(await o(N)?i.succeeded:i.skipped).push(N)}catch(B){i.failures.push({sessionId:N,message:B instanceof Error?B.message:String(B)}),i.unprocessed=n.slice(O+1),i.remaining=n.slice(O),c();break}c()}try{await y?.()}catch(O){i.refreshError=O instanceof Error?O.message:String(O)}return i}t(ui,"runSessionBatch");function Lr({workspaces:r,sessions:o,archive:d,restore:y,deleteOne:n,getFavorites:i,refresh:c,currentSessionId:O}){return async(N,B,j={})=>{if(!["archive","restore","undo","delete"].includes(N))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return ui(B,async Q=>{let M=r.getSnapshot().archivedSessionIds.includes(Q);if(N==="archive"){if(M||!o.getSnapshot().byId[Q])return!1;if(j.idleDays!==void 0){let te=new Set((await i()).favoriteSessionIds),qe=o.getSnapshot();if(!fs(qe.byId[Q],{days:j.idleDays,favorites:te,currentId:O(qe),pending:j.getPending?.()??j.pending}))return!1}return await d(Q),r.getSnapshot().archivedSessionIds.includes(Q)}return M?N==="delete"?(await n(Q),!0):!((await y(Q))?.archivedSessionIds??r.getSnapshot().archivedSessionIds).includes(Q):!1},{onProgress:j.onProgress,refresh:c})}}t(Lr,"createSessionOrganizer");function qr(r,o){let d=r.createElement;function y(i,c){return d(o??(N=>d("button",{type:"button",disabled:N.disabled,onClick:N.onClick},N.children)),{variant:"outline",size:"sm",...c},i)}t(y,"textButton");function n({title:i,failures:c,separator:O}){let[N,B]=r.useState(!1),j=d("ul",null,c.map(Q=>d("li",{key:Q.sessionId},Q.sessionId,O,Q.message)));return d(hn,{title:i,open:N,onToggle:t(()=>B(Q=>!Q),"onToggle")},j)}return t(n,"FailureDetails"),t(function({t:c,archived:O,busy:N,ready:B,days:j,onDays:Q,count:C,onPreview:M,progress:G,result:z,onRetry:le,undoCount:se,onUndo:te,onReload:qe}){return d(r.Fragment,null,d("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}"),(!O||!B)&&d("div",{className:"dsham_organizer"},d("div",{className:"dsham_organizerControls"},!B&&y(c("organizer.reloadFavorites"),{disabled:N,onClick:qe}),!O&&d(r.Fragment,null,d("label",null,c("organizer.idleDays"),d(cr,{min:1,max:36500,value:j===""?null:Number(j),disabled:N,"aria-label":c("organizer.idleDays"),onChange:t(Ie=>Q(Ie==null?"":String(Ie)),"onChange")})),y(c("organizer.preview",{n:C}),{disabled:N||!B||C===0,onClick:M}))),!O&&d("p",null,c("organizer.rules"))),(G||z||se>0)&&d("section",{className:"dsham_batchFeedback","aria-label":c("organizer.feedback")},G&&d("div",{role:"status","aria-live":"polite"},d("progress",{value:G.done,max:Math.max(1,G.total),"aria-label":c("organizer.progress")}),c("organizer.progressCount",{done:G.done,total:G.total})),z&&d("div",{role:"status"},d("strong",null,c(`organizer.${z.kind??"archive"}Result`)),d("p",null,c("organizer.result",{succeeded:z.succeeded.length,skipped:z.skipped.length,failed:z.failures.length,remaining:z.unprocessed.length})),z.failures.length>0&&d(n,{title:c("organizer.failureDetails"),failures:z.failures,separator:c("common.separator")}),z.refreshError&&d("p",{role:"alert"},c("organizer.refreshError",{detail:z.refreshError})),z.remaining.length>0&&y(c("organizer.retry",{n:z.remaining.length}),{disabled:N,onClick:le})),se>0&&d("div",{className:"dsham_organizerControls"},y(c("organizer.undo",{n:se}),{disabled:N,onClick:te}),d("p",null,c("organizer.undoHint")))))},"OrganizerPanel")}t(qr,"createOrganizerPanel");var Gr={"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} \xB7 \u672A\u5904\u7406 {remaining}","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"},Ur={"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} \xB7 Unprocessed {remaining}","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."},Vr={"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} \xB7 \u041D\u0435 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E {remaining}","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."};var pn=Function("return globalThis.__dshArchiveReactDOM")(),Wr=Function("return globalThis.__dshArchiveReactDOMClient")(),Xr=pn.createPortal,Do=pn.flushSync,To=Wr?.createRoot,No=Wr?.hydrateRoot,Mo=pn.findDOMNode,Oo=pn.unmountComponentAtNode,Ho=pn.unstable_batchedUpdates,Po=pn.version;function hi(r){var o={exports:{}},d=o.exports;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"});let y=r("@deepseek-ai/dsh-client-store"),n=r("react/jsx-runtime"),i=r("react"),c=r("@deepseek-ai/dsh-client-ui-primitives");function O({open:e,onClose:s,title:a,description:l,footer:h,children:p,className:g,width:b}){let R=i.useRef(null),A=i.useCallback(()=>R.current?.closest(".dsham_settings")??document.body,[]),[_,S]=i.useState(null);i.useEffect(()=>{if(!e){S(null);return}S(A())},[e,A]),i.useEffect(()=>{if(!e)return;let u=t(fe=>{fe.key==="Escape"&&(fe.preventDefault(),fe.stopPropagation(),"stopImmediatePropagation"in fe&&typeof fe.stopImmediatePropagation=="function"&&fe.stopImmediatePropagation(),s())},"onKey");return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[e,s]);let x=(0,n.jsxs)("div",{className:"dsham_modalRoot",role:"presentation",children:[(0,n.jsx)("div",{className:"dsham_modalMask",onClick:s}),(0,n.jsxs)("div",{role:"dialog","aria-modal":!0,"aria-label":typeof a=="string"?a:void 0,className:Ue("dsham_modalDialog",g),style:{width:b??560},children:[(0,n.jsx)("h2",{children:a}),l!=null&&(0,n.jsx)("p",{children:l}),p,h!=null&&(0,n.jsx)("div",{className:"dsham_modalFooter",children:h})]})]});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(N,{refObject:R,getContainer:A}),e&&_?Xr(x,_):null]})}t(O,"SettingsModal");function N({refObject:e,getContainer:s}){return(0,n.jsx)("span",{hidden:!0,ref:e,"data-get-container":s})}t(N,"SettingsModalAnchor");function B({variant:e="outline",icon:s,children:a,className:l,disabled:h,title:p,onClick:g,"aria-label":b,"aria-pressed":R,"aria-expanded":A,"aria-haspopup":_}){return(0,n.jsx)(c.Button,{variant:e,size:"sm",className:l,disabled:h,title:p,onClick:g,"aria-label":b,"aria-pressed":R,"aria-expanded":A,"aria-haspopup":_,icon:s,children:a})}t(B,"settingsButton");function j({variant:e="outline",danger:s=!1,disabled:a,onClick:l,children:h}){return(0,n.jsx)(c.Button,{variant:s?"outline":e,className:s?"dsham_btnDanger":void 0,disabled:a,onClick:l,children:h})}t(j,"modalFooterButton");function Q(e,s){let a={className:e?"dsham_archiveTabsLocked":void 0,children:s};return e&&(a.inert=""),a}t(Q,"tabsShell");let C=qr(i,c.Button),{HighlightedText:M,useSessionDetails:G,useArchiveSearch:z,useArchivePreview:le,DiscoveryFilters:se,SearchStatus:te,PreviewContent:qe}=kr(i,{Button:c.Button,SegmentedControl:c.SegmentedControl}),Ie=Sr(i,{warning:c.IconWarningOutlineMedium,info:c.IconInfoOutlineMedium,check:c.IconCheckOutlineMedium,refresh:c.IconRefreshOutlineMedium,search:c.IconSearchOutlineMedium,chevron:c.IconChevronDownOutlineMedium},c.Button),ze={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 We(e){let s=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 16 16"),a.setAttribute("width","16"),a.setAttribute("height","16"),a.setAttribute("fill","none"),a.setAttribute("stroke","currentColor"),a.setAttribute("stroke-width","1.5"),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("aria-hidden","true");for(let l of ze[e]){let h=document.createElementNS("http://www.w3.org/2000/svg","path");h.setAttribute("d",l),a.append(h)}return s.append(a),s}t(We,"createPluginUpdateIcon");let Z={parse(e){if(typeof e!="string"||e.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(e)}`);return e}},Ae={parse(e){let s=Ce(e);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");let a=s.archivedSessionIds;if(!Array.isArray(a)||a.some(l=>typeof l!="string"))throw new TypeError("archivedSessionIds must be a string array");return s}},ot={parse(e){let s=Ce(e);if(typeof s!="object"||s===null||Array.isArray(s)||s.deleted!==!0)throw new TypeError("deleted must be true");return s}},xe={parse(e){let s=Ce(e);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("target must be an object");if(s.scope==="all"||s.scope==="ungrouped"||s.scope==="workspace"&&typeof s.workspaceId=="string"&&s.workspaceId.length>0||s.scope==="sessions"&&Array.isArray(s.sessionIds)&&s.sessionIds.length>0&&s.sessionIds.every(a=>typeof a=="string"&&a.length>0))return s;throw new TypeError("target.scope must be all, ungrouped, workspace with a non-empty workspaceId, or sessions with non-empty sessionIds")}},st={parse(e){let s=Ce(e);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");for(let a of["requestedSessionIds","deletedSessionIds","skippedSessionIds"])if(!Array.isArray(s[a])||s[a].some(l=>typeof l!="string"))throw new TypeError(`${a} must be a string array`);if(!Array.isArray(s.failures)||s.failures.some(a=>typeof a!="object"||a===null||typeof a.sessionId!="string"||typeof a.message!="string"))throw new TypeError("failures must contain sessionId/message objects");return s}},Tt={parse(e){let s=Ce(e);if(typeof s!="object"||s===null||Array.isArray(s)||!Array.isArray(s.items))throw new TypeError("result.items must be an array");if(s.items.some(a=>typeof a!="object"||a===null||typeof a.sessionId!="string"||typeof a.createdAt!="number"||!Number.isFinite(a.createdAt)))throw new TypeError("items must contain sessionId/createdAt objects");if(s.repairedSessionIds!==void 0&&(!Array.isArray(s.repairedSessionIds)||s.repairedSessionIds.some(a=>typeof a!="string")))throw new TypeError("repairedSessionIds must be a string array");return s}};function Je(e,s){return{mode:"strict",typeSymbol:e,create:t(()=>s,"create"),schema:s}}t(Je,"strictCodec");let Nt={package:"@michengai/dsh-archive-manager",descriptors:[...Fr(),...fr(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Je("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:Je("@michengai/dsh-archive-manager/types#ArchivedSessionIds",Ae),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:Je("@deepseek-ai/dsh-session/types#SessionId",Z)}],result:Je("@michengai/dsh-archive-manager/types#Deleted",ot),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:Je("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",xe)}],result:Je("@michengai/dsh-archive-manager/types#DeletedBatch",st),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:Je("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",Tt),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]},Ze={row:"dsham_archivedRow",title:"dsham_archivedTitle",badge:"dsham_archivedBadge",content:"dsham_archiveCardContent",meta:"dsham_archiveCardMeta",actions:"dsham_archiveCardActions",unarchive:"dsham_archiveCardUnarchive",delete:"dsham_iconAction dsham_iconDanger"},Kr=".dshamRow_sessionRow.dsham_archivedRow{box-sizing:border-box;cursor:default;min-height:64px;height:auto;background:var(--dsw-alias-button-elevated-fill);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;gap:12px;margin:8px 0;padding:10px 16px}.dshamRow_sessionRow.dsham_archivedRow:hover{background:var(--dsw-alias-button-elevated-fill);border-color:var(--dsw-alias-border-l3)}.dshamRow_searchResultRow.dsham_archivedRow{background:var(--dsw-alias-button-elevated-fill);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;margin:8px 0;padding:10px 16px}.dsham_archivedTitle{color:var(--dsw-alias-label-primary);font-weight:600}.dsham_archivedBadge{display:none}.dsham_archiveCardContent{min-width:0;flex:1;flex-direction:column;gap:2px;display:flex}.dsham_archiveCardMeta{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.dshamRow_sessionRow.dsham_archivedRow>.dshamRow_time,.dshamRow_sessionRow.dsham_archivedRow>.dshamRow_rowActions{display:none}.dsham_archiveCardActions{align-items:center;gap:12px;display:inline-flex}.dsham_archiveCardActions button{cursor:pointer;flex:none}.dsham_archiveCardUnarchive{height:32px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-button-elevated-fill);border:1px solid var(--dsw-alias-border-l2)!important;border-radius:8px;padding:0 12px;font-size:13px;font-weight:600;line-height:20px}.dsham_archiveCardUnarchive:hover{background:var(--dsw-alias-interactive-bg-hover)}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/Archived.module.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/Archived.module.css",e.textContent=Kr,document.head.appendChild(e)}let $r=".dsham_btnDanger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272);border-color:var(--dsw-alias-state-error-primary,#ef7272)}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/DangerButton.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/DangerButton.css",e.textContent=$r,document.head.appendChild(e)}let Yr=".dsham_iconAction{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:22px!important;min-width:22px!important;height:22px!important;padding:0!important;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px)!important;background:transparent;color:var(--dsw-alias-label-secondary)}.dsham_iconAction:not(:disabled):hover{color:var(--dsw-alias-link,#4176e6)!important;border-color:var(--dsw-alias-link,#4176e6)!important}.dsham_iconAction.dsham_iconDanger{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction.dsham_iconDanger:not(:disabled):hover{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction svg{width:16px!important;height:16px!important;flex:none!important}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/IconAction.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/IconAction.css",e.textContent=Yr,document.head.appendChild(e)}let Jr=".dsham_modalRoot{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.dsham_modalMask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1,rgb(0 0 0 / 45%))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;max-width:calc(100vw - 48px);max-height:min(80vh,720px);padding:22px 24px 20px;overflow:auto;border:0;border-radius:var(--dsw-radius-panel,28px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px}.dsham_modalDialog>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dsham_modalFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/Modal.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/Modal.css",e.textContent=Jr,document.head.appendChild(e)}let Zr=".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)}.dsham_sidebarCardFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.dsham_sidebarCardBtn{border:none;background:transparent;padding:5px 12px;border-radius:var(--dsw-radius-sm,6px);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:background-color .15s ease,opacity .15s ease}.dsham_sidebarCardBtnCancel{color:var(--dsw-alias-label-primary)}.dsham_sidebarCardBtnCancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dsham_sidebarCardBtnDanger{color:var(--dsw-alias-state-error-primary,#ef7272)}.dsham_sidebarCardBtnDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,#f25a5a26)}.dsham_sidebarCardBtn:disabled{opacity:.4;cursor:default}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/SidebarPopover.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/SidebarPopover.css",e.textContent=Zr,document.head.appendChild(e)}function En(e){let s=new Map;for(let a of Object.values(e)){if(a.origin!=="subagent")continue;let l=new Set,h=a;for(;h?.origin==="subagent"&&h.parentId!==void 0&&!l.has(h.id);){l.add(h.id);let p=s.get(h.parentId);p===void 0?s.set(h.parentId,{count:1,runningCount:a.running?1:0}):(p.count+=1,a.running&&(p.runningCount+=1)),h=e[h.parentId]}}return s}t(En,"indexSubagentDescendants");let Lt="__flat_session_order__",jn="dsh.archive-manager.workspace.view.v1",vs="dsh.workspace.view.v5";function ys(e){let s=e??globalThis.localStorage;if(s==null||typeof s.getItem!="function"||typeof s.setItem!="function")return!1;try{if(s.getItem(jn)!=null)return!1;let a=s.getItem(vs);return a==null?!1:(s.setItem(jn,a),!0)}catch{return!1}}t(ys,"migrateWorkspaceViewPersist");function Qr(){return ys(),(0,y.defineStore)({init:t(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:jn,actions:{setGroupBy:t((e,s)=>{e.groupBy=s},"setGroupBy"),setOrderBy:t((e,s)=>{e.orderBy=s},"setOrderBy"),setShowArchived:t((e,s)=>{e.showArchived=s===!0},"setShowArchived"),setGroupExpanded:t((e,s,a)=>{e.groupExpansion[s]=a},"setGroupExpanded"),retainAccountKeys:t((e,s)=>{let a=new Set(s);e.groupExpansion=Object.fromEntries(Object.entries(e.groupExpansion).filter(([l])=>a.has(l))),e.sessionOrderByAccount=Object.fromEntries(Object.entries(e.sessionOrderByAccount).filter(([l])=>a.has(l))),e.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(e.sessionUpdatedAtByAccount).filter(([l])=>a.has(l)))},"retainAccountKeys"),syncSessionOrderAccount:t((e,s,a,l)=>{e.sessionOrderByAccount[s]=a,e.sessionUpdatedAtByAccount[s]=l},"syncSessionOrderAccount"),setSessionOrder:t((e,s,a)=>{e.sessionOrderByAccount[s]=a},"setSessionOrder")}})}t(Qr,"createWorkspaceViewStore");function ea(){return(0,n.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,n.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}t(ea,"GithubMark16");function ta(){return(0,n.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,n.jsx)("path",{fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M9.5 2.5 13.5 6.5 6 14H2v-4z"})})}t(ta,"FeedbackIcon");function bs({archiveSessions:e,archiveSession:s,sessionStore:a,workspaceStore:l,unarchiveSession:h,deleteSession:p,unarchiveSessions:g,deleteArchivedSessions:b,archivedSessionMetadata:R,openConversation:A,focusSessionWorkspace:_,viewState:S,close:x,t:u,diagnoseSession:fe,repairSession:Ne,sessionDetails:ce,searchSessionContent:Be,searchArchivedContent:Fe,previewArchivedSession:de,favoriteSessions:P,setSessionFavorite:V,organizeBatch:pe,useSessionPendingInteraction:ae,useSessionStatus:Me}){let I=(0,i.useSyncExternalStore)(a.subscribe,a.getSnapshot),ie=(0,i.useSyncExternalStore)(l.subscribe,l.getSnapshot),[me,Te]=(0,i.useState)("archived"),$=me==="archived",[ve,ke]=(0,i.useState)(null),[Ke,U]=(0,i.useState)(null),[ue,ne]=(0,i.useState)(null),X=t((m,E=null)=>{w(null),re(null),Ot(!1),U(E),ke(m)},"requestArchive"),Le=t(()=>{q||(ke(null),U(null),w(null))},"closeArchive"),_e=(0,i.useRef)(!1),[ee,Ge]=(0,i.useState)(null),Oe=(0,i.useRef)(!1),[q,Re]=(0,i.useState)(!1),[f,w]=(0,i.useState)(null),[F,re]=(0,i.useState)(null),Ee=t(m=>{w(null),re(null),Ge(m)},"requestDelete"),[He,Qe]=(0,i.useState)(S?.query??""),[ye,Pe]=(0,i.useState)(S?.project??"all"),[k,J]=(0,i.useState)(S?.sortBy??"updated"),[be,Ve]=(0,i.useState)({}),[Y,Se]=(0,i.useState)(()=>new Set),T=(0,i.useRef)(new Set),[oe,we]=(0,i.useState)([]),[$e,De]=(0,i.useState)([]),[rt,wt]=(0,i.useState)(!1),[xt,ut]=(0,i.useState)(!1),et=(0,i.useRef)(!1),[lt,Qt]=(0,i.useState)(!1),[ft,ht]=i.useState("title"),[vt,vn]=i.useState(""),[en,yn]=i.useState(""),[Mt,bn]=(0,i.useState)(()=>new Set),[tn,Bn]=(0,i.useState)("30"),[qt,Ot]=(0,i.useState)(!1),[at,_t]=(0,i.useState)(null),[wn,Gt]=(0,i.useState)(null),[nn,Ut]=(0,i.useState)([]),Rt=(0,i.useRef)(!1),St=(0,i.useRef)(null),Vt=Nn(ae??Es,Me??js,typeof Me=="function"),Ht=(0,i.useRef)(Vt.pending);Ht.current=Vt.pending;let pt=(0,i.useMemo)(()=>new Set($e),[$e]),Fn=t(async()=>{if(P)try{let m=await P();De(m.favoriteSessionIds),wt(!0)}catch(m){wt(!1),w(nt(m))}},"loadFavorites");(0,i.useEffect)(()=>{let m=!0;return P&&P().then(E=>{m&&(De(E.favoriteSessionIds),wt(!0))}).catch(E=>{m&&w(nt(E))}),()=>{m=!1}},[P]);let sn=t(async m=>{if(!(et.current||q||!rt)){et.current=!0,ut(!0),w(null);try{let E=await V({sessionId:m,favorite:!pt.has(m)});De(E.favoriteSessionIds)}catch(E){w(nt(E))}finally{et.current=!1,ut(!1)}}},"toggleFavorite"),Wt=t(async(m,E,{idle:W=!1,retry:he=!1}={})=>{if(!(Rt.current||et.current||T.current.size>0||!pe)){Rt.current=!0,Re(!0),w(null),re(null),Gt(null),m==="archive"&&!he&&Ut([]);try{let D=await pe(m,E,{idleDays:W?Number(tn):void 0,getPending:t(()=>Ht.current,"getPending"),onProgress:t(je=>{_t(je),m==="archive"&&je.total>0&&je.done>=je.total&&(ke(null),U(null),Ot(!1))},"onProgress")});return Gt({...D,kind:m,tab:me}),St.current=D.remaining.length?{kind:m,ids:D.remaining,idle:W}:null,m==="archive"&&Ut(je=>[...new Set([...je,...D.succeeded])]),(m==="undo"||m==="restore"||m==="delete")&&Ut(je=>je.filter(it=>!D.succeeded.includes(it)&&!D.skipped.includes(it))),we(je=>je.filter(it=>!D.succeeded.includes(it)&&!D.skipped.includes(it))),m==="delete"&&De(je=>je.filter(it=>!D.succeeded.includes(it))),D}catch(D){w(nt(D))}finally{Rt.current=!1,Re(!1),_t(null)}}},"executeBatch"),yt=(0,i.useRef)(!0),xn=(0,i.useRef)(!1);(0,i.useEffect)(()=>(yt.current=!0,()=>{yt.current=!1}),[]);let ct=t(async(m,E=!1)=>{if(q||xn.current)return;xn.current=!0,Re(!0),w(null);let W=!1;try{await Er({prepare:E?async he=>{await _?.(he)}:void 0,restore:t(async he=>{await h(he),W=!0},"restore"),open:t(async he=>{await A(he),yt.current&&x?.()},"open")},m.id,E,()=>yt.current)}catch(he){if(!yt.current)return;if(W){Te("unarchived");let D=mt.find(je=>je.sessions.some(it=>it.id===m.id));D!==void 0&&Pe(D.key)}w(Ar(he,u))}finally{xn.current=!1,yt.current&&Re(!1)}},"viewConversation");(0,i.useEffect)(()=>{S&&Object.assign(S,{query:He,project:ye,sortBy:k})},[He,ye,k,S]);let Ct=(0,i.useMemo)(()=>$?ie.archivedSessionIds:Qs(I.byId,ie.archivedSessionIds),[$,I.byId,ie.archivedSessionIds]),Pt=yr(Ct,I.byId),rn=(0,i.useRef)(Pt);q||(rn.current=Pt);let mt=(0,i.useMemo)(()=>er(I.byId,ie.items,Ct,u("group.ungrouped")),[I.byId,ie,Ct,u]),an=t(m=>{q||T.current.size>0||(tt.close(),Te(m),we([]),ke(null),U(null),w(null),re(null),Pe("all"),Qe(""))},"switchTab"),Sn=t(async(m,E=!1)=>{if(!(_e.current||q||!m?.length)){if(pe){_e.current=!0;try{let W=await Wt("archive",m,{idle:E}),he=W?.failures.map(D=>ks(D.sessionId,D.message)).find(D=>D!==void 0);if(he!==void 0&&typeof s=="function"){let D=I.byId[he.sessionId];ne({sessionId:he.sessionId,title:D===void 0?he.sessionId:Xe(D,u),kinds:he.kinds.join(", ")}),ke(null),U(null),w(null);return}W&&(ke(null),U(null),Ot(!1))}finally{_e.current=!1}return}_e.current=!0,Re(!0),w(null),re(null);try{let W=await e(m);we([]),Te("archived"),Pe("all"),Qe(""),re(u("archives.archiveSuccess",{n:W.archivedSessionIdsAdded.length})),ke(null),U(null)}catch(W){let he=Ss(W);if(he!==void 0&&typeof s=="function"){let D=I.byId[he.sessionId];ne({sessionId:he.sessionId,title:D===void 0?he.sessionId:Xe(D,u),kinds:he.kinds.join(", ")}),ke(null),U(null),w(null)}else{let D=gn(W);w(D===void 0?u("archives.archiveBatchFailed",{detail:W instanceof Error?W.message:String(W)}):u("archives.archiveActive",{kinds:D.join(", ")}))}}finally{_e.current=!1,Re(!1)}}},"performArchive"),as=t(()=>Sn(ve,qt),"confirmArchive"),gt=G(rn.current,ce,u,q),It=t(async(m,E)=>{w(null),re(null);try{let W=m.id;if(E==="path"){let he=gt.byId[m.id];if(he||(he=(await ce({sessionIds:[m.id]})).items[0]),!he?.path)throw new Error(u("details.noPath"));W=he.path}await gr(W),yt.current&&re(u("details.copied"))}catch(W){yt.current&&w(typeof un(W)=="string"&&String(un(W)).startsWith("copy.")?u(String(un(W))):nt(W))}},"copyDetail"),on=(0,i.useMemo)(()=>tr(mt,k,be,u,gt.byId),[mt,k,be,u,gt.byId]);(0,i.useEffect)(()=>{if(q)return;let m=!1;return R().then(E=>{m||Ve(Object.fromEntries(E.items.map(W=>[W.sessionId,W.createdAt])))}).catch(()=>{m||Ve({})}),()=>{m=!0}},[R,ie.archivedSessionIds,q]),(0,i.useEffect)(()=>{ye!=="all"&&!mt.some(m=>m.key===ye)&&Pe("all")},[mt,ye]);let zt=!ps(vt,en),ln=on.filter(m=>ye==="all"||ye===m.key).map(m=>({...m,sessions:m.sessions.filter(E=>(!lt||pt.has(E.id))&&br(E.updatedAt,vt,en))})).filter(m=>m.sessions.length),Xt=ft==="content"&&!zt,At=z(ln.flatMap(m=>m.sessions.map(E=>E.id)),He,Xt,Be??Fe),cn=new Map(At.items.map(m=>[m.sessionId,m])),tt=le(de,$?ie.archivedSessionIds:[]),kn=He.trim().toLocaleLowerCase(),Kt=ln.map(m=>({...m,sessions:m.sessions.filter(E=>!kn||Xe(E,u).toLocaleLowerCase().includes(kn)||cn.has(E.id))})).filter(m=>m.sessions.length),_n=rt?Kt.flatMap(m=>m.sessions).filter(m=>fs(m,{days:Number(tn),favorites:pt,currentId:dt(I),pending:Vt.pending})).map(m=>m.id):[],bt=(0,i.useMemo)(()=>Ys(Kt),[Kt]),Et=(0,i.useMemo)(()=>new Set(oe),[oe]),$t=(0,i.useMemo)(()=>{let m=new Set(ie.archivedSessionIds);return nn.reduce((E,W)=>E+(m.has(W)?1:0),0)},[nn,ie.archivedSessionIds]),Bt=bt.filter(m=>Et.has(m)).length,dn=bt.length>0&&Bt===bt.length;(0,i.useEffect)(()=>{we(m=>Js(m,Ct))},[Ct]);let Ln=t((m,E)=>{we(W=>ts(W,[m],E))},"toggleSessionSelection"),qn=t(m=>{we(E=>ts(E,bt,m))},"toggleVisibleSelection"),Yt=t(m=>{q||T.current.has(m)||(T.current.add(m),Se(new Set(T.current)),w(null),re(null),h(m).catch(E=>{w(xs(E,u))}).finally(()=>{T.current.delete(m),Se(new Set(T.current))}))},"onUnarchive"),Rn=t(async m=>{if(!q){if(pe){let E=fn(ie.archivedSessionIds,ie.items,m),W=await Wt("restore",E);return W&&{unarchivedSessionIds:W.succeeded}}Re(!0),w(null),re(null);try{let E=await g(m);return re(u("archives.restoreSuccess",{n:E.unarchivedSessionIds.length})),E}catch(E){w(u("archives.restoreBatchFailed",{detail:E instanceof Error?E.message:String(E)}))}finally{Re(!1)}}},"onBatchUnarchive"),is=t(async()=>{if(oe.length===0)return;let m=await Rn({scope:"sessions",sessionIds:oe});if(m!==void 0){let E=new Set(m.unarchivedSessionIds);we(W=>W.filter(he=>!E.has(he)))}},"onSelectedUnarchive"),v=t(()=>{q||Ge(null)},"closeDelete");(0,i.useEffect)(()=>{if(ee===null)return;let m=t(E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),"stopImmediatePropagation"in E&&typeof E.stopImmediatePropagation=="function"&&E.stopImmediatePropagation(),q||Ge(null))},"onKeyDown");return window.addEventListener("keydown",m,!0),()=>window.removeEventListener("keydown",m,!0)},[ee,q]);let ge=t(async()=>{if(q||Oe.current||ee===null)return;if(ee.kind!=="batch"){Oe.current=!0,Re(!0),w(null),re(null);try{await p(ee.session.id),Ge(null)}catch(E){w(Tn(E,u))}finally{Oe.current=!1,Re(!1)}return}if(Rt.current||et.current||T.current.size>0)return;let{target:m}=ee;if(m.scope==="sessions"&&fn(ie.archivedSessionIds,ie.items,m).length===0){Ge(null);return}Rt.current=!0,Re(!0),w(null),re(null),Gt(null),_t(null);try{let E=await b(m),W=Zs(E,u);W.kind==="error"?w(W.message):re(W.message);let he=new Set([...E.deletedSessionIds,...E.skippedSessionIds]);Ut(je=>je.filter(it=>!he.has(it))),we(je=>je.filter(it=>!he.has(it))),De(je=>je.filter(it=>!he.has(it)));let D=E.failures.map(je=>je.sessionId);St.current=D.length>0?{kind:"delete",ids:D,idle:!1}:null,Gt({requested:E.requestedSessionIds,succeeded:E.deletedSessionIds,skipped:E.skippedSessionIds,failures:E.failures,unprocessed:[],remaining:D,refreshError:"refreshError"in E&&typeof E.refreshError=="string"?E.refreshError:null,kind:"delete",tab:me}),Ge(null)}catch(E){w(Tn(E,u))}finally{Rt.current=!1,Re(!1)}},"confirmDelete"),Ye=ee?.kind==="batch"?ee.target.scope:null,Gn=Ye==="ungrouped"?u("archives.deleteUngroupedTitle"):Ye==="workspace"?u("archives.deleteProjectTitle",{name:ee?.kind==="batch"?ee.title:""}):u(Ye==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),or=ee===null?void 0:Ye==="ungrouped"?u("archives.deleteUngroupedDesc",{n:ee.kind==="batch"?ee.count:0}):Ye==="workspace"?u("archives.deleteProjectDesc",{name:ee?.kind==="batch"?ee.title:"",n:ee.kind==="batch"?ee.count:0}):Ye==="sessions"?u("archives.deleteSelectedDesc",{n:ee.kind==="batch"?ee.count:0}):u("deleteSession.desc",{name:Xe(ee.kind==="session"?ee.session:{},u)}),La=u(Ye==="ungrouped"?"archives.deleteUngroupedConfirm":Ye==="workspace"?"archives.deleteProjectConfirm":Ye==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,n.jsxs)("section",{className:"dsham_settings","aria-label":u("archives.title"),children:[(0,n.jsx)("style",{children:Ia+Aa+Ea+ja+Da}),(0,n.jsxs)("div",{className:"dsham_settingsHeader",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"dsham_settingsTitleRow",children:[(0,n.jsx)("h2",{children:u("archives.title")}),(0,n.jsxs)("div",{className:"dsham_settingsLinks",children:[(0,n.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":u("archives.viewProject"),icon:(0,n.jsx)(ea,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:u("archives.viewProject")}),(0,n.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":u("archives.feedback"),icon:(0,n.jsx)(ta,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:u("archives.feedback")})]})]}),(0,n.jsx)("p",{className:"dsham_settingsIntro",children:u("archives.description")})]}),i.createElement("div",Q(q||Y.size>0,(0,n.jsx)(c.SegmentedTabs,{className:"dsham_archiveTabs",label:u("archives.title"),value:me==="unarchived"?"unarchived":"archived",onChange:t(m=>an(m==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:u("archives.tab.archived"),id:"dsham-tab-archived",panelId:"dsham-archive-panel"},{value:"unarchived",label:u("archives.tab.unarchived"),id:"dsham-tab-unarchived",panelId:"dsham-archive-panel"}]})))]}),(0,n.jsxs)("div",{id:"dsham-archive-panel",role:"region","aria-label":u(me==="unarchived"?"archives.tab.unarchived":"archives.tab.archived"),children:[(0,n.jsxs)("div",{className:"dsham_settingsToolbar",children:[(0,n.jsxs)("div",{className:"dsham_settingsSearch",children:[typeof V=="function"&&(0,n.jsx)(Pn,{id:"dsham-favorite-filter",className:"dsham_favoriteFilter",value:lt?"favorites":"all",disabled:q||xt||!rt,options:[{value:"all",label:u("organizer.allSessions")},{value:"favorites",label:u("organizer.favoritesOnly")}],onChange:t(m=>Qt(m==="favorites"),"onChange"),"aria-label":u("organizer.favoriteFilter")}),i.createElement(Pn,{id:"dsham-search-scope",className:"dsham_scopeFilter",value:ft,"aria-label":u("discovery.scope"),disabled:q||Y.size>0,onChange:ht,options:[{value:"title",label:u("discovery.titleOnly")},{value:"content",label:u("discovery.titleAndContent")}]}),(0,n.jsx)(c.Input,{className:"dsham_searchField",type:"search",maxLength:200,value:He,onChange:t(m=>Qe(m.target.value),"onChange"),placeholder:u(Xt?"discovery.searchPlaceholder":$?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":u(Xt?"discovery.searchPlaceholder":$?"archives.searchPlaceholder":"archives.searchUnarchived")})]}),(0,n.jsxs)("div",{className:"dsham_settingsFilters",children:[(0,n.jsx)(Pn,{id:"dsham-project-filter",className:"dsham_projectFilter",value:ye,options:[{value:"all",label:u("archives.allProjects"),title:u("archives.allProjects")},...on.map(m=>({value:m.key,label:m.title,title:m.title}))],onChange:Pe,"aria-label":u("archives.projectFilter")}),i.createElement(se,{t:u,from:vt,to:en,onFrom:vn,onTo:yn,invalid:zt,onClear:t(()=>{vn(""),yn("")},"onClear")}),(0,n.jsxs)("div",{className:"dsham_settingsSort",children:[(0,n.jsx)("span",{className:"dsham_settingsSortLabel","aria-hidden":!0,children:u("archives.sortLabel")}),(0,n.jsx)(Pn,{id:"dsham-sort-filter",className:"dsham_sortFilter",value:k,options:[{value:"updated",label:u("archives.sortUpdated")},{value:"created",label:u("archives.sortCreated")},{value:"alphabetical",label:u("archives.sortAlphabetical")},...typeof ce=="function"?[{value:"turnsDesc",label:u("details.more")},{value:"turnsAsc",label:u("details.less")}]:[]],onChange:J,"aria-label":u("archives.sortBy")})]})]})]}),i.createElement("style",null,_r),i.createElement(te,{state:At,t:u}),i.createElement(Ie,{key:me,t:u,isArchived:$,items:gt.items,sessions:mt.flatMap(m=>m.sessions),diagnoseSession:fe,repairSession:Ne,retry:gt.retry,pending:gt.pending}),pe&&(0,n.jsx)(C,{t:u,archived:$,busy:q||xt||Y.size>0,ready:rt,days:tn,onDays:Bn,count:_n.length,onPreview:t(()=>{X(_n),Ot(!0)},"onPreview"),progress:at,result:wn?.tab===me?wn:null,onRetry:t(()=>{let m=St.current;m&&(m.kind==="delete"?Ee({kind:"batch",target:{scope:"sessions",sessionIds:m.ids},count:m.ids.length}):Wt(m.kind,m.ids,{idle:m.idle,retry:!0}))},"onRetry"),undoCount:$t,onUndo:t(()=>Wt("undo",nn,{retry:!0}),"onUndo"),onReload:Fn}),mt.length>0&&(0,n.jsx)(Xs,{selectedCount:oe.length,hiddenCount:oe.length-Bt,allVisibleSelected:dn,selectedVisibleCount:Bt,visibleCount:bt.length,busy:q,t:u,onToggle:qn,onClear:t(()=>we([]),"onClear"),onArchive:$?void 0:()=>X([...oe]),onRestore:is,onDelete:t(()=>Ee({kind:"batch",target:{scope:"sessions",sessionIds:oe},count:oe.length}),"onDelete")}),mt.length===0?(0,n.jsx)("div",{className:"dsham_settingsEmpty",children:u($?"archives.empty":"archives.emptyUnarchived")}):Kt.length===0?(0,n.jsx)("div",{className:"dsham_settingsEmpty",children:At.status==="loading"||At.status==="error"||At.failures.length?null:u("archives.emptyFiltered")}):Kt.map(m=>{let E=Oa(m.key),W=mt.find(D=>D.key===m.key)?.sessions.map(D=>D.id)??[],he=$?fn(ie.archivedSessionIds,ie.items,E).length:W.length;return(0,n.jsxs)("section",{className:"dsham_settingsGroup",children:[(0,n.jsxs)("div",{className:"dsham_settingsGroupHeading",children:[(0,n.jsx)("h3",{className:"dsham_settingsGroupTitle",children:(0,n.jsxs)("button",{type:"button",className:"dsham_groupToggle","aria-expanded":!Mt.has(m.key),"aria-controls":"dsham-group-"+encodeURIComponent(m.key),onClick:t(()=>bn(D=>{let je=new Set(D);return je.has(m.key)?je.delete(m.key):je.add(m.key),je}),"onClick"),children:[(0,n.jsx)(Mt.has(m.key)?c.IconChevronRightOutlineMedium:c.IconChevronDownOutlineMedium,{}),(0,n.jsx)(c.IconFolderOpenOutlineMedium,{}),(0,n.jsx)("span",{children:m.title})]})}),(0,n.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,n.jsx)("span",{className:"dsham_settingsCount",children:u("archives.sessionCount",{n:m.sessions.length})}),(0,n.jsx)(Ma,{group:m,busy:q,onArchive:$?void 0:()=>X(W,m),onRestore:t(()=>Rn(E),"onRestore"),onDelete:t(()=>Ee({kind:"batch",target:E,title:m.title,count:he}),"onDelete"),t:u})]})]}),(0,n.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(m.key),hidden:Mt.has(m.key)||void 0,children:!Mt.has(m.key)&&m.sessions.map(D=>(0,n.jsxs)("div",{className:"dsham_settingsRow","data-selected":Et.has(D.id),children:[(0,n.jsx)(Ks,{checked:Et.has(D.id),disabled:q,label:u("archives.selectSession",{name:Xe(D,u)}),onChange:t(je=>Ln(D.id,je.target.checked),"onChange")}),(0,n.jsxs)("div",{className:"dsham_settingsContent",children:[(0,n.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:Xe(D,u),"aria-label":u("archives.openSession")+u("common.separator")+Xe(D,u),disabled:q||Y.has(D.id),onClick:t(()=>ct(D),"onClick"),children:Xe(D,u)}),(0,n.jsx)("div",{className:"dsham_settingsMeta",children:[ca(D.updatedAt,u),typeof ce=="function"&&i.createElement("span",{key:"turns",title:gt.byId[D.id]?.error||u("details.hint")}," \xB7 ",u(typeof gt.byId[D.id]?.turnCount=="number"?"details.turns":gt.byId[D.id]?"details.unknown":"details.pending",{n:gt.byId[D.id]?.turnCount}))]}),cn.has(D.id)&&i.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:q,title:u($?"discovery.preview":"archives.openSession"),onClick:t(()=>$?tt.open(D,He):ct(D),"onClick")},i.createElement(M,{text:cn.get(D.id)?.snippet??"",query:He}))]}),(0,n.jsxs)("div",{className:"dsham_settingsActions",children:[typeof V=="function"&&B({variant:"outline",className:"dsham_iconAction"+(pt.has(D.id)?" dsham_favoriteOn":""),title:u(pt.has(D.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":pt.has(D.id),"aria-label":u(pt.has(D.id)?"organizer.unfavorite":"organizer.favorite")+u("common.separator")+Xe(D,u),disabled:q||xt||!rt,onClick:t(()=>sn(D.id),"onClick"),children:(0,n.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:pt.has(D.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,n.jsx)("path",{d:"M8 1.75l1.934 3.918 4.324.628-3.129 3.05.738 4.306L8 11.618l-3.867 2.034.738-4.306-3.129-3.05 4.324-.628L8 1.75z"})})}),B({variant:"outline",className:"dsham_iconAction",title:u($?"archives.restore":"archives.archiveSelected"),"aria-label":u($?"archives.restore":"archives.archiveSelected"),disabled:q||Y.has(D.id),onClick:t(()=>$?Yt(D.id):Sn([D.id]),"onClick"),icon:(0,n.jsx)($?c.IconRefreshOutlineMedium:c.IconArchiveOutlineMedium,{size:16})}),($||typeof ce=="function")&&(0,n.jsx)(Na,{busy:q||Y.has(D.id),t:u,title:Xe(D,u),onCopyId:t(()=>It(D,"id"),"onCopyId"),onCopyPath:typeof ce=="function"?()=>It(D,"path"):void 0,onPreview:$&&typeof de=="function"?()=>tt.open(D,He):void 0,onRestoreOpen:$?()=>ct(D,!0):void 0,onDelete:$?()=>Ee({kind:"session",session:D}):void 0})]})]},D.id))})]},m.key)}),i.createElement(O,{width:900,open:tt.target!==null,onClose:tt.close,title:tt.target?Xe(tt.target.session,u):u("discovery.preview"),footer:j({variant:"primary",disabled:q,onClick:t(()=>{if(tt.target){let m=tt.target.session;return tt.close(),ct(m)}},"onClick"),children:u("discovery.openFull")}),children:i.createElement(qe,{preview:tt,t:u,MarkdownText:c.MarkdownText})}),ve===null&&f!==null&&(0,n.jsx)("div",{className:"dsham_settingsError",role:"alert",children:f}),F!==null&&(0,n.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:F}),(0,n.jsx)(O,{open:ve!==null,onClose:Le,title:u("archives.archiveTitle",{n:ve?.length??0}),description:Ke===null?u("archives.archiveSelectedDesc"):u(Ke.key===zn?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:Ke.title,n:ve?.length??0}),footer:(0,n.jsxs)(n.Fragment,{children:[j({disabled:q,onClick:Le,children:u("cancel")}),j({variant:"primary",disabled:q||!ve?.length,onClick:as,children:u("archives.archiveSelected")})]}),children:(0,n.jsxs)(n.Fragment,{children:[pe&&(0,n.jsx)("p",{children:u(qt?"organizer.idleConfirm":"organizer.manualConfirm")}),pe&&(0,n.jsx)("div",{className:"dsham_archivePreview",children:(ve??[]).map(m=>(0,n.jsxs)("label",{children:[(0,n.jsx)(os,{checked:!0,disabled:q,label:Xe(I.byId[m]??{id:m},u),onChange:t(()=>ke(E=>(E??[]).filter(W=>W!==m)),"onChange")}),Xe(I.byId[m]??{id:m},u)]},m))}),at&&(0,n.jsxs)("div",{role:"status",children:[(0,n.jsx)("progress",{value:at.done,max:Math.max(1,at.total)}),u("organizer.progressCount",{done:at.done,total:at.total})]}),f!==null&&(0,n.jsx)("div",{className:"dsham_settingsError",role:"alert",children:f})]})}),(0,n.jsx)(O,{open:ue!==null,onClose:t(()=>{q||(ne(null),w(null))},"onClose"),title:u("archiveActive.title"),...ue===null?{}:{description:u("archiveActive.desc",{name:ue.title,kinds:ue.kinds})},footer:(0,n.jsxs)(n.Fragment,{children:[j({disabled:q,onClick:t(()=>{q||(ne(null),w(null))},"onClick"),children:u("cancel")}),j({danger:!0,disabled:q,onClick:t(async()=>{if(!(_e.current||q||ue===null||typeof s!="function")){_e.current=!0,Re(!0),w(null);try{await s(ue.sessionId,{stopActivity:!0}),we(m=>m.filter(E=>ue===null||E!==ue.sessionId)),Te("archived"),re(u("archives.archiveSuccess",{n:1})),ne(null)}catch(m){w(m instanceof Error?m.message:String(m))}finally{_e.current=!1,Re(!1)}}},"onClick"),children:u("archiveActive.confirm")})]}),children:f!==null&&(0,n.jsx)("div",{className:"dsham_settingsError",role:"alert",children:f})}),(0,n.jsx)(O,{open:ee!==null,onClose:v,title:Gn,...or===void 0?{}:{description:or},footer:(0,n.jsxs)(n.Fragment,{children:[j({disabled:q,onClick:v,children:u("cancel")}),j({danger:!0,disabled:q,onClick:ge,children:La})]}),children:(0,n.jsxs)(n.Fragment,{children:[q&&(0,n.jsxs)("div",{role:"status",children:[ee?.kind==="batch"?u("archives.deleteBatchPending"):u("deleteSession.pending"),at&&(0,n.jsx)("progress",{value:at.done,max:Math.max(1,at.total),"aria-label":u("organizer.progress")}),at&&u("organizer.progressCount",{done:at.done,total:at.total})]}),f!==null&&(0,n.jsx)("div",{className:"dsham_settingsError",role:"alert",children:f})]})})]})]})}t(bs,"ArchivedSessionsSection");function ws(e){var s,a,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var h=e.length;for(s=0;s<h;s++)e[s]&&(a=ws(e[s]))&&(l&&(l+=" "),l+=a)}else for(a in e)e[a]&&(l&&(l+=" "),l+=a);return l}t(ws,"r");function Ue(...e){for(var s,a,l=0,h="",p=arguments.length;l<p;l++)(s=arguments[l])&&(a=ws(s))&&(h&&(h+=" "),h+=a);return h}t(Ue,"clsx");let Wn="Ungrouped";function na(e,s=Wn){if(e===void 0||e==="")return s;let a=e.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return a!==void 0&&a!==""?a:e}t(na,"workspaceLabel");function mn(e,s){return s.updatedAt!==e.updatedAt?s.updatedAt-e.updatedAt:e.id<s.id?-1:1}t(mn,"byRecency");function Zt(e,s,a,l){return e.origin!=="subagent"&&(!a.has(e.id)||l===!0)&&(!e.blank||e.id===s)}t(Zt,"sessionVisible");function Dn(e){let s=e instanceof Error?e.message:String(e);return s.includes("UNKNOWN_SESSION")||s.includes("no such session")}t(Dn,"isUnknownSessionError");function Tn(e,s){if(Dn(e))return s("deleteSession.unknown");let a=e instanceof Error?e.message:String(e);return s("deleteSession.failed",{detail:a})}t(Tn,"formatDeleteError");function xs(e,s){if(Dn(e))return s("archives.unarchiveUnknown");let a=e instanceof Error?e.message:String(e);return s("archives.unarchiveFailed",{detail:a})}t(xs,"formatUnarchiveError");function Xn(e,s){if(Dn(e))return s("archives.archiveUnknown");let a=e instanceof Error?e.message:String(e);return s("archives.archiveFailed",{detail:a})}t(Xn,"formatArchiveError");function gn(e){if(e===null||typeof e!="object")return;let s=Ce(e),a=s.rpcError!==null&&typeof s.rpcError=="object"?Ce(s.rpcError):void 0,l=s.name==="WorkspaceActiveSessionError"?s.activity:void 0,h=a?.details,p=s.name==="WorkspaceArchiveError"&&a?.code==="workspace/session-active"&&h!==null&&typeof h=="object"?Ce(h).activity:void 0,g=Array.isArray(l)?l:Array.isArray(p)?p:void 0;if(g===void 0)return;let b=g.flatMap(R=>{if(R===null||typeof R!="object")return[];let A=Ce(R).kind;return typeof A=="string"&&A.length>0?[A]:[]});return b.length>0?b:void 0}t(gn,"activeSessionActivity");function Ss(e){let s=gn(e);if(s===void 0||e===null||typeof e!="object")return;let a=Ce(e),l=a.rpcError!==null&&typeof a.rpcError=="object"?Ce(a.rpcError).details:void 0,h=l!==null&&typeof l=="object"?Ce(l).sessionId:void 0,p=typeof a.sessionId=="string"?a.sessionId:typeof h=="string"?h:void 0;return p===void 0?void 0:{sessionId:p,kinds:s}}t(Ss,"activeSessionRefusal");function ks(e,s){let a=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(s);if(a===null)return;let l=a[1].split(", ").filter(h=>h.length>0);return l.length>0?{sessionId:e,kinds:l}:void 0}t(ks,"activeArchiveFromMessage");function sa(e,s){let a=e instanceof Error?e.message:String(e);return s("archives.forkFailed",{detail:a})}t(sa,"formatForkError");function Kn(e){return e.blank?"New Session":e.displayTitle}t(Kn,"sessionTitle");function _s(e,s,a,l,h,p,g){let b=[...p];return g==="recency"&&b.sort(mn),{key:e,workspaceId:s,cwd:a,createdAt:l,label:h,sessions:b}}t(_s,"buildGroup");function ra(e,s){let a=new Map(e.map(p=>[p.id,p])),l=new Set,h=[];for(let p of s){let g=a.get(p);g===void 0||l.has(p)||(h.push(g),l.add(p))}for(let p of[...e].sort(mn))l.has(p.id)||h.push(p);return h}t(ra,"orderedUngrouped");function Rs(e,s,a,l,h){let p=[],g=new Set;for(let R of s){let A=[];for(let _ of R.sessionIds){let S=e.byId[_];S!==void 0&&(g.add(_),Zt(S,dt(e),a,h)&&A.push(S))}p.push(_s(R.workspaceId,R.workspaceId,R.path,Date.parse(R.createdAt),R.title,A,"account"))}let b=e.ids.map(R=>e.byId[R]).filter(R=>R!==void 0&&!g.has(R.id)&&Zt(R,dt(e),a,h));return b.length>0&&p.push(_s("",void 0,void 0,void 0,Wn,l===void 0?b:ra(b,l),l===void 0?"recency":"account")),p}t(Rs,"groupByWorkspace");function $n(e,s){let a=s instanceof Set?s:new Set(s);return[...new Set(e.sessionIds)].filter(l=>!a.has(l)).length}t($n,"archiveableWorkspaceSessionCount");function Cs(e,s,a,l){let h=e.find(g=>g.workspaceId===s);if(h===void 0)return null;let p=$n(h,l);return p===0?null:{workspaceId:s,title:a,count:p}}t(Cs,"archiveWorkspaceDialogTarget");function Is(e,s,a){return{target:e,archiving:!1,error:Xn(s,a)}}t(Is,"archiveWorkspaceDialogFailureState");function aa(e){switch(e){case"approval":case"plan-review":case"question":return e;default:return}}t(aa,"visiblePendingKind");function As(e,s){let a=s.get(e.id),l=a===void 0?e.pendingInteraction:a.kind;return aa(l)}t(As,"pendingInteractionForSession");let Yn=new Map,Jn=new Set,ia=new Map;function Es(e){return e(Yn)}t(Es,"useEmptySessionPendingInteraction");function js(e){return e(ia)}t(js,"useEmptySessionStatus");function Ds(e){return e instanceof Map||e==null?{pending:e??Yn,completed:Jn}:{pending:e.pending??Yn,completed:e.completed??Jn}}t(Ds,"pendingFacts");function oa(e){let s=new Map,a=new Set;if(e instanceof Map)for(let[l,h]of e)h?.pendingInteraction!==void 0&&s.set(l,h.pendingInteraction),h?.completionUnread===!0&&a.add(l);return{pending:s,completed:a}}t(oa,"factsFromSessionStatus");function Nn(e,s,a){let l=e(p=>p),h=s(p=>p);return a?oa(h):{pending:l,completed:Jn}}t(Nn,"useSessionUiFacts");function Ts(e,s,a,l){let h=Ds(l),p=As(e,h.pending);return{id:e.id,title:Kn(e),blank:e.blank,running:e.running,runningSubagentCount:s.get(e.id)?.runningCount??0,completed:e.completed===!0||h.completed.has(e.id),updatedAt:e.updatedAt,archived:a.has(e.id),...p===void 0?{}:{pendingInteraction:p}}}t(Ts,"sessionNode");function Ns(e,s,a,l,h){let p=new Set(a),g=new Set(h.expandedGroups),b=En(e.byId),R=dt(e),A=R===void 0?void 0:s.find(S=>S.sessionIds.includes(R))?.workspaceId??"",_=[];for(let S of Rs(e,s,p,h.ungroupedOrder,h.showArchived)){let x=g.has(S.key);_.push({key:S.key,workspaceId:S.workspaceId,cwd:S.cwd,createdAt:S.createdAt,label:S.label,sessionCount:S.sessions.length,expanded:x,containsCurrent:S.key===A,sessions:x?S.sessions.map(u=>Ts(u,b,p,l)):[]})}return _}t(Ns,"deriveGroups");function Ms(e,s,a,l){let h=new Set(s),p=En(e.byId),g=[];for(let b of e.ids){let R=e.byId[b];R===void 0||!Zt(R,dt(e),h,l)||g.push(R)}return g.sort(mn),g.map(b=>Ts(b,p,h,a))}t(Ms,"deriveFlat");function Os(e,s,a,l,h,p,g,b,R=Wn){let A=a.trim().toLowerCase();if(A==="")return{items:[],hasMore:!1};let _=new Set(l),S=En(e.byId),x=new Map;for(let P of s)for(let V of P.sessionIds)x.has(V)||x.set(V,P.title);let u=t(P=>x.get(P.id)??na(P.cwd,R),"labelOf"),fe=new Map;for(let P of p.items)fe.has(P.sessionId)||fe.set(P.sessionId,P);let Ne=[];for(let P of e.ids){let V=e.byId[P];V===void 0||V.blank||!Zt(V,dt(e),_,b)||(Kn(V).toLowerCase().includes(A)||u(V).toLowerCase().includes(A))&&Ne.push(V)}Ne.sort(mn);let ce=[],Be=new Set,Fe=t(P=>{Be.has(P.id)||(Be.add(P.id),ce.push(P))},"include");for(let P of Ne)Fe(P);for(let P of p.items){let V=e.byId[P.sessionId];V!==void 0&&!V.blank&&Zt(V,dt(e),_,b)&&Fe(V)}let de=Ds(h);return{items:ce.slice(0,g).map(P=>{let V=fe.get(P.id),pe=As(P,de.pending);return{id:P.id,title:Kn(P),workspace:u(P),running:P.running,runningSubagentCount:S.get(P.id)?.runningCount??0,archived:_.has(P.id),...pe===void 0?{}:{pendingInteraction:pe},completed:P.completed===!0||de.completed.has(P.id),...V===void 0?{}:{snippet:V.snippet}}}),hasMore:p.hasMore||ce.length>g}}t(Os,"deriveSearchResults");function Hs(e,s){let p=Math.max(0,s-e);return p<6e4?{unit:"now",n:0}:p<36e5?{unit:"minutes",n:Math.floor(p/6e4)}:p<864e5?{unit:"hours",n:Math.floor(p/36e5)}:p<30*864e5?{unit:"days",n:Math.floor(p/864e5)}:p<365*864e5?{unit:"months",n:Math.floor(p/(30*864e5))}:{unit:"years",n:Math.floor(p/(365*864e5))}}t(Hs,"relativeTime");let la='.dshamRow_projectRow,.dshamRow_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.dshamRow_projectRow:hover,.dshamRow_sessionRow:hover,.dshamRow_sessionRow.dshamRow_selected{background:var(--dsw-alias-interactive-bg-hover)}.dshamRow_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.dshamRow_searchResultRow:hover,.dshamRow_searchResultRow.dshamRow_selected{background:var(--dsw-alias-interactive-bg-hover)}.dshamRow_searchResultHeading{align-items:center;min-width:0;display:flex}.dshamRow_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.dshamRow_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.dshamRow_searchResultWorkspace,.dshamRow_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.dshamRow_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.dshamRow_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.dshamRow_projectRow{box-sizing:border-box;align-items:center;height:34px}.dshamRow_projectRow .dshamRow_rowActions{height:20px}.dshamRow_sessionRow{height:32px;animation:dshamRow_row-in .15s var(--ds-ease-in-out);gap:0}.dshamRow_sessionRow .dshamRow_title{margin:0 6px 0 4px}.dshamRow_flatSessionRowWithoutStatus .dshamRow_title{margin-left:0}@keyframes dshamRow_row-in{0%{opacity:0}}.dshamRow_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.dshamRow_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.dshamRow_folderActive{color:var(--dsw-alias-state-business-primary)}.dshamRow_projectRow .dshamRow_chevron{display:none}.dshamRow_projectRow:hover .dshamRow_chevron{display:inline-flex}.dshamRow_projectRow:hover .dshamRow_folder{display:none}.dshamRow_arrow{transition:transform .15s var(--ds-ease-in-out)}.dshamRow_arrowOpen{transform:rotate(90deg)}.dshamRow_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.dshamRow_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.dshamRow_renameInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.dshamRow_sessionRow .dshamRow_title{flex:1}.dshamRow_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.dshamRow_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.dshamRow_dot{flex:none}.dshamRow_rowActions{flex:none;align-items:center;gap:12px;display:none}.dshamRow_projectRow:hover .dshamRow_rowActions,.dshamRow_sessionRow:hover .dshamRow_rowActions,.dshamRow_projectRow.dshamRow_menuOpen .dshamRow_rowActions,.dshamRow_sessionRow.dshamRow_menuOpen .dshamRow_rowActions{display:inline-flex}.dshamRow_sessionRow:hover .dshamRow_time,.dshamRow_sessionRow.dshamRow_menuOpen .dshamRow_time{display:none}.dshamRow_projectRow.dshamRow_menuOpen,.dshamRow_sessionRow.dshamRow_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.dshamRow_sessionRow.dshamRow_dropBefore,.dshamRow_sessionRow.dshamRow_dropAfter{position:relative}.dshamRow_sessionRow.dshamRow_dropBefore:before,.dshamRow_sessionRow.dshamRow_dropAfter:after{content:"";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.dshamRow_sessionRow.dshamRow_dropBefore:before{top:-7px}.dshamRow_sessionRow.dshamRow_dropAfter:after{bottom:-7px}.dshamRow_hoverContent{flex-direction:column;gap:8px;display:flex}.dshamRow_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.dshamRow_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.dshamRow_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.dshamRow_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.dshamRow_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.dshamRow_iconButton:hover{color:var(--dsw-alias-label-primary)}.dshamRow_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.dshamRow_sessionRow,.dshamRow_arrow{transition:none;animation:none}}';var K={hoverTitle:"dshamRow_hoverTitle",title:"dshamRow_title",hoverContent:"dshamRow_hoverContent",dropAfter:"dshamRow_dropAfter",renameInput:"dshamRow_renameInput",dot:"dshamRow_dot",hoverTime:"dshamRow_hoverTime",iconButton:"dshamRow_iconButton",flatSessionRowWithoutStatus:"dshamRow_flatSessionRowWithoutStatus","row-in":"dshamRow_row-in",folder:"dshamRow_folder",menuOpen:"dshamRow_menuOpen",selected:"dshamRow_selected",searchResultHeading:"dshamRow_searchResultHeading",searchResultWorkspace:"dshamRow_searchResultWorkspace",visuallyHidden:"dshamRow_visuallyHidden",projectRow:"dshamRow_projectRow",hoverStatus:"dshamRow_hoverStatus",arrowOpen:"dshamRow_arrowOpen",rowActions:"dshamRow_rowActions",chevron:"dshamRow_chevron",arrow:"dshamRow_arrow",searchResultTitle:"dshamRow_searchResultTitle",searchResultMeta:"dshamRow_searchResultMeta",slot:"dshamRow_slot",folderActive:"dshamRow_folderActive",time:"dshamRow_time",sessionRow:"dshamRow_sessionRow",meta:"dshamRow_meta",dropBefore:"dshamRow_dropBefore",searchResultSnippet:"dshamRow_searchResultSnippet",projectText:"dshamRow_projectText",hoverPath:"dshamRow_hoverPath",searchResultRow:"dshamRow_searchResultRow"};function Xe(e,s){return e.blank?s("session.new"):e.title??e.displayTitle??""}t(Xe,"displayTitle");function Ps(e,s,a){let{unit:l,n:h}=Hs(e,s);return l==="now"?a("time.now"):a(`time.${l}`,{n:h})}t(Ps,"timeLabel");function ca(e,s){let a=new Date(e),l=`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`;return s("archives.timestamp",{date:s("date.ymd",{y:a.getFullYear(),m:a.getMonth()+1,d:a.getDate()}),time:l})}t(ca,"archiveTimeLabel");function da(e,s,a){let{unit:l,n:h}=Hs(e,s);return l==="now"?a("time.now"):a("time.ago",{t:a(`time.${l}`,{n:h})})}t(da,"hoverTimeLabel");function ua(e,s){let a=new Date(e??NaN),l=t(h=>String(h).padStart(2,"0"),"pad2");return s("hover.created",{time:`${s("date.ymd",{y:a.getFullYear(),m:a.getMonth()+1,d:a.getDate()})} ${l(a.getHours())}:${l(a.getMinutes())}`})}t(ua,"createdLabel");function ha({label:e,cwd:s,createdAt:a,t:l}){return(0,n.jsxs)("div",{className:K.hoverContent,children:[(0,n.jsx)("div",{className:K.hoverTitle,children:e}),(0,n.jsx)("div",{className:K.hoverPath,children:s}),(0,n.jsx)("div",{className:K.hoverTime,children:ua(a,l)})]})}t(ha,"WorkspaceHoverContent");function zs(e){let s=e.currentTarget.getBoundingClientRect();return e.clientY<s.top+s.height/2?"before":"after"}t(zs,"rowHalf");function pa({group:e,onToggle:s,onCreate:a,actions:l,drag:h,t:p}){let g=e,b=g.workspaceId===void 0?p("group.ungrouped"):g.label,R=e.expanded&&e.containsCurrent,[A,_]=(0,i.useState)(!1),S=[{id:"rename",label:p("rename"),icon:(0,n.jsx)(c.IconEditOutlineMedium,{})},...l?.canArchive===!0?[{id:"archive-workspace",label:p("menu.archiveWorkspace"),icon:(0,n.jsx)(c.IconArchiveOutlineMedium,{size:16})}]:[],{id:"delete",label:p("delete.workspace"),icon:(0,n.jsx)(c.IconTrashOutlineMedium,{}),danger:!0}],x=(0,n.jsxs)("div",{className:Ue(K.projectRow,A&&K.menuOpen),role:"treeitem","aria-expanded":g.expanded,onClick:s,draggable:h!==void 0,onDragStart:h===void 0?void 0:u=>{u.dataTransfer.effectAllowed="move",u.dataTransfer.setData("text/plain",g.key),h.start()},onDragEnd:h?.end,children:[(0,n.jsx)("span",{className:Ue(K.slot,K.folder,R&&K.folderActive),children:g.expanded?(0,n.jsx)(c.IconFolderOpenMedium,{}):(0,n.jsx)(c.IconFolderCloseMedium,{})}),(0,n.jsx)("span",{className:Ue(K.slot,K.chevron),children:(0,n.jsx)(c.IconTriangleRightFillMedium,{className:Ue(K.arrow,g.expanded&&K.arrowOpen)})}),(0,n.jsx)("span",{className:K.projectText,children:(0,n.jsx)("span",{className:K.title,children:b})}),(0,n.jsxs)("span",{className:K.rowActions,children:[l!==void 0&&(0,n.jsx)(c.Menu,{open:A,onClose:t(()=>{_(!1)},"onClose"),items:S,onSelect:t(u=>{_(!1),!(u!=="rename"&&u!=="archive-workspace"&&u!=="delete")&&(u==="rename"?l.rename():u==="archive-workspace"?l.archive():l.delete())},"onSelect"),portal:!0,closeOnPointerLeave:!0,anchor:(0,n.jsx)("button",{type:"button",className:K.iconButton,"aria-label":p("actions.workspace.aria",{name:b}),onClick:t(u=>{u.stopPropagation(),_(fe=>!fe)},"onClick"),children:(0,n.jsx)(c.IconEllipsisOutlineMedium,{})})}),(0,n.jsx)("button",{type:"button",className:K.iconButton,"aria-label":p("actions.newSession.aria",{name:b}),onClick:t(u=>{u.stopPropagation(),a()},"onClick"),children:(0,n.jsx)(c.IconPlusOutlineMedium,{})})]})]});return g.createdAt===void 0?x:(0,n.jsx)(c.HoverCard,{anchor:x,content:(0,n.jsx)(ha,{label:g.label,cwd:g.cwd,createdAt:g.createdAt,t:p}),disabled:A,copyText:g.cwd,copyLabel:p("copy"),copiedLabel:p("hover.copied")})}t(pa,"ProjectRowItem");function ma(e){throw new Error(`unknown pending interaction: ${String(e)}`)}t(ma,"assertNever");function Zn(e,s){let a=e.runningSubagentCount===0?void 0:{state:"ongoing",label:s(e.runningSubagentCount===1?"status.subagentsRunning.one":"status.subagentsRunning.other",{n:e.runningSubagentCount})},l;switch(e.pendingInteraction){case"approval":l={state:"warning",label:s("status.waitingApproval")};break;case"plan-review":l={state:"warning",label:s("status.planReview")};break;case"question":l={state:"warning",label:s("status.waitingAnswer")};break;case void 0:break;default:return ma(e.pendingInteraction)}if(l!==void 0)return a===void 0?[l]:[l,a];if(e.running){let h={state:"ongoing",label:s("status.running")};return a===void 0?[h]:[h,a]}return a!==void 0?[a]:e.completed?[{state:"done",label:s("status.completed")}]:[{state:"done",label:s("status.idle")}]}t(Zn,"sessionStatuses");function Bs({statuses:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.StateDot,{state:e[0].state}),e.map(s=>(0,n.jsx)("span",{className:K.visuallyHidden,children:s.label},s.label))]})}t(Bs,"SessionStatusDots");function ga({node:e,now:s,t:a}){let l=Zn(e,a);return(0,n.jsxs)("div",{className:K.hoverContent,children:[(0,n.jsx)("div",{className:K.hoverTitle,children:Xe(e,a)}),!e.blank&&(0,n.jsx)("div",{className:K.hoverTime,children:da(e.updatedAt,s,a)}),l.map(h=>(0,n.jsxs)("div",{className:K.hoverStatus,children:[(0,n.jsx)(c.StateDot,{state:h.state}),(0,n.jsx)("span",{children:h.label})]},h.label))]})}t(ga,"SessionHoverContent");function fa({result:e,currentId:s,onOpen:a,t:l}){let h=e.id===s,p=Zn(e,l),g=p[0];return(0,n.jsxs)("button",{type:"button",className:Ue(K.searchResultRow,h&&K.selected,e.archived===!0&&Ze.row),role:"treeitem","aria-selected":h,onClick:t(()=>{a(e.id)},"onClick"),children:[(0,n.jsxs)("span",{className:K.searchResultHeading,children:[(0,n.jsx)("span",{className:K.slot,children:(g.state!=="done"||e.completed)&&(0,n.jsx)(Bs,{statuses:p})}),e.archived===!0&&(0,n.jsx)("span",{className:Ze.badge,children:l("archived.badge")}),(0,n.jsx)("span",{className:Ue(K.searchResultTitle,e.archived===!0&&Ze.title),children:e.title})]}),(0,n.jsxs)("span",{className:K.searchResultMeta,children:[(0,n.jsx)("span",{className:K.searchResultWorkspace,children:e.workspace}),e.snippet!==void 0&&(0,n.jsx)("span",{className:K.searchResultSnippet,children:e.snippet})]})]})}t(fa,"SearchResultItem");function Fs({node:e,currentId:s,now:a,onOpen:l,onRename:h,onFork:p,onArchive:g,onUnarchive:b,onDeleteSession:R,onReveal:A,drag:_,flat:S=!1,t:x}){let u=e,fe=Xe(e,x),Ne=e.id===s,ce=u.archived===!0,Be=Zn(e,x),Fe=Be[0].state!=="done"||u.completed,[de,P]=(0,i.useState)(!1),V=(0,i.useRef)(null);(0,i.useEffect)(()=>{A!==void 0&&(V.current?.scrollIntoView({block:"nearest"}),A())},[A]);let pe=ce?[{id:"unarchive",label:x("menu.unarchive"),icon:(0,n.jsx)(c.IconArchiveOutlineMedium,{size:16})},{id:"delete-session",label:x("menu.deleteSession"),icon:(0,n.jsx)(c.IconTrashOutlineMedium,{}),danger:!0}]:[{id:"rename",label:x("rename"),icon:(0,n.jsx)(c.IconEditOutlineMedium,{})},{id:"fork",label:x("menu.fork"),icon:(0,n.jsx)(c.IconBranchOutlineMedium,{})},{id:"archive",label:x("menu.archiveSession"),icon:(0,n.jsx)(c.IconArchiveOutlineMedium,{size:16})},{id:"delete-session",label:x("menu.deleteSession"),icon:(0,n.jsx)(c.IconTrashOutlineMedium,{}),danger:!0}];return(0,n.jsx)(c.HoverCard,{anchor:(0,n.jsxs)("div",{ref:V,className:Ue(K.sessionRow,Ne&&K.selected,de&&K.menuOpen,S&&!Fe&&K.flatSessionRowWithoutStatus,ce&&Ze.row,_?.marker==="before"&&K.dropBefore,_?.marker==="after"&&K.dropAfter),role:"treeitem","aria-selected":Ne,onClick:t(()=>{ce||l(e.id)},"onClick"),draggable:_!==void 0,onDragStart:_===void 0?void 0:ae=>{ae.dataTransfer.effectAllowed="move",ae.dataTransfer.setData("text/plain",e.id),_.start()},onDragEnd:_?.end,onDragOver:_===void 0?void 0:ae=>{_.active&&(ae.preventDefault(),ae.dataTransfer.dropEffect="move",_.hover(zs(ae)))},onDrop:_===void 0?void 0:ae=>{_.active&&(ae.preventDefault(),_.drop(zs(ae)))},children:[(!S||Fe)&&(0,n.jsx)("span",{className:K.slot,children:Fe&&(0,n.jsx)(Bs,{statuses:Be})}),ce&&(0,n.jsx)("span",{className:Ze.badge,children:x("archived.badge")}),ce?(0,n.jsxs)("span",{className:Ze.content,children:[(0,n.jsx)("span",{className:Ue(K.title,Ze.title),children:fe}),!u.blank&&(0,n.jsx)("span",{className:Ze.meta,children:Ps(u.updatedAt,a,x)})]}):(0,n.jsx)("span",{className:K.title,children:fe}),!u.blank&&(0,n.jsx)("span",{className:K.time,children:Ps(u.updatedAt,a,x)}),ce&&!u.blank&&(0,n.jsxs)("span",{className:Ze.actions,onClick:t(ae=>{ae.stopPropagation()},"onClick"),children:[(0,n.jsx)("button",{type:"button",className:Ze.delete,"aria-label":x("menu.deleteSession"),onClick:t(()=>R(e.id,u.title),"onClick"),children:(0,n.jsx)(c.IconTrashOutlineMedium,{})}),(0,n.jsx)("button",{type:"button",className:Ze.unarchive,onClick:t(()=>b(e.id),"onClick"),children:x("menu.unarchive")})]}),!u.blank&&(0,n.jsx)("span",{className:K.rowActions,children:(0,n.jsx)(c.Menu,{open:de,onClose:t(()=>{P(!1)},"onClose"),items:pe,onSelect:t(ae=>{P(!1),ae==="rename"&&h(e.id,u.title),ae==="fork"&&p(e.id),ae==="archive"&&g(e.id),ae==="unarchive"&&b(e.id),ae==="delete-session"&&R(e.id,u.title)},"onSelect"),portal:!0,closeOnPointerLeave:!0,anchor:(0,n.jsx)("button",{type:"button",className:K.iconButton,"aria-label":x("actions.session.aria",{name:fe}),onClick:t(ae=>{ae.stopPropagation(),P(Me=>!Me)},"onClick"),children:(0,n.jsx)(c.IconEllipsisOutlineMedium,{})})})})]}),content:(0,n.jsx)(ga,{node:e,now:a,t:x}),disabled:de||_?.active===!0,copyText:u.blank?void 0:u.title,copyLabel:x("copy"),copiedLabel:x("hover.copied")})}t(Fs,"SessionNodeItem");let va="._G5b-a_modalAction{min-width:72px}._G5b-a_modalError,._G5b-a_menuStatus{margin-top:8px;font-size:12px;line-height:18px}._G5b-a_modalError{color:var(--dsw-alias-state-error-primary)}._G5b-a_menuStatus{color:var(--dsw-alias-label-secondary)}";var Mn={modalAction:"_G5b-a_modalAction",menuStatus:"_G5b-a_menuStatus",modalError:"_G5b-a_modalError"};let Ls="::add-workspace";function ya({t:e,open:s,anchorRef:a,useWorkspaces:l,createWorkspace:h,useDirectoryFlow:p,renderDirectoryFlow:g,onPick:b,onClose:R,addOnly:A=!1,side:_="bottom",selectedId:S}){let x=l(X=>X),u=x.items,fe=(0,i.useCallback)(()=>a?.current?.getBoundingClientRect()??null,[a]),[Ne,ce]=(0,i.useState)(!1),[Be,Fe]=(0,i.useState)(null),[de,P]=(0,i.useState)(!1),[V,pe]=(0,i.useState)(!1),ae=de||V,Me=p(X=>X);(0,i.useEffect)(()=>{de&&!Me&&P(!1)},[de,Me]);let I=Me?[{id:Ls,label:e("menu.addWorkspace"),icon:(0,n.jsx)(c.IconPlusOutlineMedium,{size:16}),disabled:ae}]:[],ie=!A&&u.length>0,me=ie?u.map(X=>({id:X.workspaceId,label:X.title,icon:(0,n.jsx)(c.IconFolderCloseMedium,{size:16}),disabled:ae})):I,Te=me.length===0,$=t(()=>{ce(!1),Fe(null)},"closeModal"),ve=t(X=>h({path:X}).then(Le=>{P(!1),b(Le.workspaceId)}).catch(Le=>{Fe(Le instanceof Error?Le.message:String(Le)),P(!1),ce(!0)}),"adoptDirectory"),ke=(0,i.useCallback)(()=>{R(),ce(!1),Fe(null),P(!0)},[R]),Ke=A||x.phase==="ready",U=!ie&&Ke&&I.length===1;(0,i.useEffect)(()=>{s&&U&&!ae&&ke()},[s,U,ae,ke]);let ue={open:de,busy:V,onPicked:t(X=>{pe(!0),ve(X).finally(()=>{pe(!1)})},"onPicked"),onCancel:t(()=>{P(!1)},"onCancel"),onError:t(X=>{P(!1),Fe(X),ce(!0)},"onError")},ne=t(X=>{if(X===Ls){ke();return}b(X)},"handleSelect");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Menu,{open:s&&!U&&!Te,anchor:null,items:me,...ie?{footer:I}:{},selectedId:S,onSelect:ne,onClose:R,side:_,portal:!0,getAnchorRect:fe}),s&&!U&&!Te&&x.phase==="pending"&&(0,n.jsx)("div",{className:Mn.menuStatus,role:"status",children:e("picker.loading")}),g(ue),(0,n.jsx)(c.Modal,{open:Ne,onClose:$,closeLabel:e("close"),title:e("folderError.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",className:Mn.modalAction,onClick:$,children:e("cancel")}),(0,n.jsx)(c.Button,{variant:"primary",className:Mn.modalAction,disabled:!Me,onClick:ke,children:e("folderError.retry")})]}),children:(0,n.jsx)("div",{className:Mn.modalError,role:"alert",children:Be})})]})}t(ya,"WorkspacePickFlow");let ba='.qDHVXG_root{--dsh-session-list-edge-inset:var(--dsh-sidebar-inline-padding);--dsh-session-list-scrollbar-width:8px;--dsh-session-list-scrollbar-offset:2px;box-sizing:border-box;min-height:0;padding-right:var(--dsh-session-list-edge-inset);flex-direction:column;flex:1;display:flex}.qDHVXG_root.qDHVXG_rail{padding-right:0}.qDHVXG_iconButton{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.qDHVXG_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_sectionHeader{box-sizing:border-box;height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;flex:none;justify-content:flex-end;align-items:center;gap:4px;margin-bottom:4px;padding-left:4px;display:flex;overflow:hidden}.qDHVXG_root:not(.qDHVXG_rail) .qDHVXG_sectionHeader{margin-top:2px;margin-right:-4px}.qDHVXG_sectionLabel{white-space:nowrap;opacity:1;visibility:visible;min-width:0;max-width:45%;transition:max-width .18s var(--ds-ease-in-out), margin-right .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;line-height:20px;overflow:hidden}.qDHVXG_sectionLabelHidden{opacity:0;visibility:hidden;max-width:0;margin-right:-4px;transition-delay:0s,0s,0s,0s,.18s;transform:translate(-4px)}.qDHVXG_searchSlot{box-sizing:border-box;min-width:0;max-width:28px;transition:max-width .18s var(--ds-ease-in-out), padding-left .18s var(--ds-ease-in-out);flex:1;align-items:center;margin-left:auto;padding-left:0;display:flex}.qDHVXG_searchSlotExpanded{max-width:100%;padding-left:0}.qDHVXG_headerActions{opacity:1;visibility:visible;max-width:60px;transition:max-width .18s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out), transform .18s var(--ds-ease-in-out), visibility 0s linear;flex:none;align-items:center;gap:4px;display:flex;overflow:hidden}.qDHVXG_headerActionsHidden{opacity:0;visibility:hidden;pointer-events:none;max-width:0;transition-delay:0s,0s,0s,.18s;transform:translate(4px)}.qDHVXG_search{box-sizing:border-box;cursor:text;width:100%;height:28px;color:var(--dsw-alias-label-secondary);transition:width .18s var(--ds-ease-in-out), padding .18s var(--ds-ease-in-out), border-color .18s var(--ds-ease-in-out), background-color .18s var(--ds-ease-in-out);background:0 0;border:none;border-radius:50%;flex:none;align-items:center;gap:0;margin:0;padding:0;display:flex;overflow:hidden}.qDHVXG_searchExpanded{border:1px solid var(--dsw-alias-border-l2);width:calc(100% + 4px);height:30px;color:var(--dsw-alias-label-caption);background:0 0;border-radius:10px;margin-inline:-2px;padding:0 4px 0 0}.qDHVXG_searchButton{cursor:pointer;width:28px;height:28px;color:inherit;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.qDHVXG_searchExpanded .qDHVXG_searchButton{width:28px;height:30px}.qDHVXG_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_searchExpanded .qDHVXG_searchButton:hover{background:0 0}.qDHVXG_searchInput{opacity:0;pointer-events:none;width:0;min-width:0;color:var(--dsw-alias-label-primary);transition:opacity .12s var(--ds-ease-in-out);background:0 0;border:none;outline:none;flex:1;font-size:13px;line-height:18px}.qDHVXG_searchExpanded .qDHVXG_searchInput{opacity:1;pointer-events:auto;margin-left:-2px}.qDHVXG_searchInput::placeholder{color:var(--dsw-alias-label-tertiary)}.qDHVXG_clearButton{cursor:pointer;width:24px;height:24px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.qDHVXG_clearButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_rail .qDHVXG_sectionHeader{justify-content:flex-start;gap:0;margin-bottom:12px;padding-left:0}.qDHVXG_rail .qDHVXG_headerActions{max-width:none}.qDHVXG_rail .qDHVXG_iconButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.qDHVXG_rail .qDHVXG_search{background:0 0;border-color:#0000;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.qDHVXG_rail .qDHVXG_searchButton{width:36px;height:36px;color:var(--dsw-alias-label-primary)}.qDHVXG_rail .qDHVXG_searchButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.qDHVXG_listArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-session-list-edge-inset));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:visible}.qDHVXG_rail .qDHVXG_listArea{margin-left:0;margin-right:0;padding-left:0}.qDHVXG_treeBody{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.qDHVXG_fade{left:0;right:var(--dsh-session-list-edge-inset);background:linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));pointer-events:none;height:24px;position:absolute;bottom:0}.qDHVXG_wide{animation:qDHVXG_wide-in .2s var(--ds-ease-in-out)}@keyframes qDHVXG_wide-in{0%{opacity:0}}.qDHVXG_list{min-height:0;margin-left:-4px;margin-right:var(--dsh-session-list-scrollbar-offset);padding-left:4px;padding-right:calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));scrollbar-gutter:stable;flex:1;padding-bottom:16px;overflow-y:auto}.qDHVXG_flatList>*+*,.qDHVXG_searchTree>[role=treeitem]+[role=treeitem],.qDHVXG_groupSection>*+*{margin-top:2px}.qDHVXG_searchStatus,.qDHVXG_searchWarning{color:var(--dsw-alias-label-tertiary);padding:10px 12px;font-size:12px;line-height:18px}.qDHVXG_searchWarning{color:var(--dsw-alias-label-secondary)}.qDHVXG_groupSection{position:relative}.qDHVXG_groupSection+.qDHVXG_groupSection{margin-top:4px}.qDHVXG_listTopDropIndicator,.qDHVXG_workspaceDropBefore:before,.qDHVXG_workspaceDropAfter:after{content:"";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:0}.qDHVXG_listTopDropIndicator{top:-8px;left:0;right:var(--dsh-session-list-edge-inset)}.qDHVXG_listTopDropActive>.qDHVXG_workspaceDropBefore:first-child:before{display:none}.qDHVXG_workspaceDropBefore:before{top:-8px}.qDHVXG_workspaceDropAfter:after{bottom:-8px}.qDHVXG_sessionOverflowButton{cursor:pointer;text-align:left;width:100%;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:8px;padding:0 12px 0 28px;font-size:12px}.qDHVXG_groupSection>.qDHVXG_sessionOverflowButton{margin-top:0}.qDHVXG_sessionOverflowButton:hover{color:var(--dsw-alias-label-secondary);background:0 0}.qDHVXG_empty{color:var(--dsw-alias-label-tertiary);padding:16px 12px;font-size:13px}.qDHVXG_renameInput{box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);width:100%;height:44px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:22px;outline:none;padding:7px 14px;font-size:14px;font-weight:400;line-height:22px}.qDHVXG_renameInput:disabled{color:var(--dsw-alias-label-dimmed)}.qDHVXG_renameError{color:var(--dsw-alias-state-error-primary);margin-top:8px;font-size:12px;line-height:18px}.qDHVXG_deleteAction:not(:disabled){color:var(--dsw-alias-state-error-primary)}.qDHVXG_deleteStatus{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){.qDHVXG_wide{animation:none}.qDHVXG_search,.qDHVXG_sectionLabel,.qDHVXG_searchSlot,.qDHVXG_searchInput,.qDHVXG_headerActions{transition:none}}';var H={"wide-in":"qDHVXG_wide-in",searchWarning:"qDHVXG_searchWarning",empty:"qDHVXG_empty",deleteStatus:"qDHVXG_deleteStatus",search:"qDHVXG_search",fade:"qDHVXG_fade",workspaceDropAfter:"qDHVXG_workspaceDropAfter",searchSlot:"qDHVXG_searchSlot",rail:"qDHVXG_rail",searchSlotExpanded:"qDHVXG_searchSlotExpanded",searchButton:"qDHVXG_searchButton",workspaceDropBefore:"qDHVXG_workspaceDropBefore",deleteAction:"qDHVXG_deleteAction",root:"qDHVXG_root",clearButton:"qDHVXG_clearButton",listTopDropIndicator:"qDHVXG_listTopDropIndicator",listTopDropActive:"qDHVXG_listTopDropActive",headerActions:"qDHVXG_headerActions",searchStatus:"qDHVXG_searchStatus",sectionLabelHidden:"qDHVXG_sectionLabelHidden",searchInput:"qDHVXG_searchInput",listArea:"qDHVXG_listArea",searchExpanded:"qDHVXG_searchExpanded",list:"qDHVXG_list",iconButton:"qDHVXG_iconButton",sectionLabel:"qDHVXG_sectionLabel",groupSection:"qDHVXG_groupSection",renameInput:"qDHVXG_renameInput",sessionOverflowButton:"qDHVXG_sessionOverflowButton",treeBody:"qDHVXG_treeBody",wide:"qDHVXG_wide",flatList:"qDHVXG_flatList",searchTree:"qDHVXG_searchTree",sectionHeader:"qDHVXG_sectionHeader",headerActionsHidden:"qDHVXG_headerActionsHidden",renameError:"qDHVXG_renameError"};let wa=300,xa=250,Qn=500,On=5;function qs(e){let s=e.replaceAll("\0","");if(s.length<=Qn)return s;let a=Qn,l=s.charCodeAt(a-1),h=s.charCodeAt(a);return l>=55296&&l<=56319&&h>=56320&&h<=57343&&a--,s.slice(0,a)}t(qs,"sanitizeSearchQuery");function Sa(e,s){return e.includes(s)?e.filter(a=>a!==s):[...e,s]}t(Sa,"toggled");function Gs(e){(0,i.useEffect)(()=>{if(!e)return;let s=t(l=>{l.preventDefault(),l.dataTransfer!==null&&(l.dataTransfer.dropEffect="move")},"acceptDrag"),a=t(l=>{l.preventDefault()},"acceptDrop");return document.addEventListener("dragover",s),document.addEventListener("drop",a),()=>{document.removeEventListener("dragover",s),document.removeEventListener("drop",a)}},[e])}t(Gs,"useNativeDragAcceptance");function Hn(e,s){if(s===void 0)return[...e];let a=new Map(e.map(p=>[p,p])),l=[],h=new Set;for(let p of s){let g=a.get(p);g===void 0||h.has(p)||(l.push(g),h.add(p))}for(let p of e)h.has(p)||l.push(p);return l}t(Hn,"reconciledSessionOrder");function Us(e,s,a){let l=a[e]?.updatedAt??Number.NEGATIVE_INFINITY,h=a[s]?.updatedAt??Number.NEGATIVE_INFINITY;return l!==h?h-l:e<s?-1:1}t(Us,"compareSessionRecency");function Vs({sessionIds:e,previousOrder:s,previousUpdatedAt:a,list:l,orderBy:h,sortByRecency:p}){let g=Hn(e,s);if(p)g.sort((_,S)=>Us(_,S,l.byId));else if(h==="updated"){let _=e.filter(S=>{let x=l.byId[S];return x!==void 0&&(a[S]===void 0||x.updatedAt>a[S])}).sort((S,x)=>Us(S,x,l.byId));if(_.length>0){let S=new Set(_);g=[..._,...g.filter(x=>!S.has(x))]}}let b={};for(let _ of e){let S=l.byId[_];S!==void 0&&(b[_]=S.updatedAt)}let R=s===void 0||g.length!==s.length||g.some((_,S)=>_!==s[S]),A=Object.keys(b).length!==Object.keys(a).length||Object.entries(b).some(([_,S])=>a[_]!==S);return{order:g,updatedAt:b,changed:R||A}}t(Vs,"nextSessionOrderAccount");function ka({groupBy:e,orderBy:s,onGroupPick:a,onOrderPick:l,t:h}){let[p,g]=(0,i.useState)(!1);return(0,n.jsx)(c.Menu,{open:p,onClose:t(()=>{g(!1)},"onClose"),items:[{type:"label",id:"group-by",text:h("groupBy.label")},{id:"workspace",label:h("groupBy.workspace")},{id:"flat",label:h("groupBy.flat")},{type:"separator",id:"order-by-separator"},{type:"label",id:"order-by",text:h("orderBy.label")},{id:"manual",label:h("orderBy.manual")},{id:"updated",label:h("orderBy.updated")}],selectedIds:[e,s],onSelect:t(b=>{b==="workspace"||b==="flat"?a(b):(b==="manual"||b==="updated")&&l(b),g(!1)},"onSelect"),align:"end",dense:!0,portal:!0,anchor:(0,n.jsx)(c.Tooltip,{label:h("viewOptions.label"),side:"bottom",delayMs:500,children:(0,n.jsx)("button",{type:"button",className:Ue(H.iconButton,H.wide),"aria-label":h("viewOptions.label"),onClick:t(()=>{g(b=>!b)},"onClick"),children:(0,n.jsx)(c.IconPersonalizationOutlineMedium,{})})})})}t(ka,"ViewOptionsMenu");function Ws(e){let s=e.currentTarget.getBoundingClientRect();return e.clientY<s.top+s.height/2?"before":"after"}t(Ws,"workspaceGroupHalf");function _a({useSessions:e,useSessionPendingInteraction:s,useSessionStatus:a,preferSessionStatus:l,startSession:h,open:p,forkSession:g,workspaces:b,archivedSessionIds:R,showArchived:A,onRenameRequest:_,onArchiveRequest:S,onDeleteRequest:x,onSessionRename:u,onSessionArchive:fe,onSessionUnarchive:Ne,onSessionDelete:ce,insertWorkspaceBefore:Be,insertSessionBefore:Fe,orderBy:de,groupExpansion:P,setGroupExpanded:V,sessionOrderByAccount:pe,sessionUpdatedAtByAccount:ae,syncSessionOrderAccount:Me,setSessionOrder:I,t:ie,revealSessionId:me,onSessionRevealed:Te,showArchivedToast:$}){let ve=e(k=>k),ke=Nn(s,a,l),Ke=dt(ve),[U,ue]=(0,i.useState)([]),[ne,X]=(0,i.useState)(null),Le=(0,i.useRef)(!1),[_e,ee]=(0,i.useState)(null),Ge=(0,i.useRef)(!1),Oe=(0,i.useRef)(de);Gs(ne!==null||_e!==null);let q=Ke===void 0?void 0:b.find(k=>k.sessionIds.includes(Ke))?.workspaceId??"",Re=me===void 0?void 0:b.find(k=>k.sessionIds.includes(me))?.workspaceId??"";(0,i.useEffect)(()=>{Ke===void 0||q===void 0||Object.hasOwn(P,q)||V(q,!0)},[Ke,q,V,P]),(0,i.useEffect)(()=>{Re===void 0||P[Re]===!0||V(Re,!0)},[P,Re,V]);let f=(0,i.useMemo)(()=>Object.entries(P).filter(([,k])=>k).map(([k])=>k),[P]),w=(0,i.useMemo)(()=>{let k=new Set(b.flatMap(J=>J.sessionIds));return ve.ids.filter(J=>ve.byId[J]!==void 0&&!k.has(J))},[ve,b]);(0,i.useEffect)(()=>{if(ve.phase!=="ready")return;let k=Oe.current!=="updated"&&de==="updated";Oe.current=de;let J=[...b.map(be=>({key:be.workspaceId,sessionIds:be.sessionIds.filter(Ve=>ve.byId[Ve]!==void 0)})),{key:"",sessionIds:w}];for(let{key:be,sessionIds:Ve}of J){let Y=pe[be],Se=Vs({sessionIds:Ve,previousOrder:Y,previousUpdatedAt:ae[be]??{},list:ve,orderBy:de,sortByRecency:de==="updated"&&(Y===void 0||k)});Se.changed&&typeof Me=="function"&&Me(be,Se.order.map(T=>T),Se.updatedAt)}},[ve,de,pe,ae,Me,w,b]);let F=(0,i.useMemo)(()=>b.map(k=>{let J=pe[k.workspaceId],be=Hn(k.sessionIds,J);return{...k,sessionIds:be}}),[pe,b]),re=(0,i.useMemo)(()=>Hn(w,pe[""]),[pe,w]),Ee=(0,i.useMemo)(()=>Ns(ve,F,R,ke,{expandedGroups:f,showArchived:A,...pe[""]===void 0?{}:{ungroupedOrder:pe[""]}}),[ve,F,R,ke,A,f,pe]);(0,i.useEffect)(()=>{if(me===void 0||Re===void 0)return;let k=Ee.find(J=>J.key===Re);k===void 0||!k.expanded||!k.sessions.some(J=>J.id===me)||k.sessions.slice(0,On).some(J=>J.id===me)||ue(J=>J.includes(Re)?J:[...J,Re])},[Ee,Re,me]);let He=Date.now(),Qe=t((k,J)=>{if(Le.current)return;Le.current=!0,X(null);let be=Ee.find(De=>De.key===k.accountKey);if(be===void 0)return;let Ve=be.sessions.findIndex(De=>De.id===J.id);if(Ve===-1)return;let Y=J.half==="before"?J.id:be.sessions[Ve+1]?.id;if(Y===k.sessionId)return;let Se=be.sessions.findIndex(De=>De.id===k.sessionId),T=Y===void 0?be.sessions.length:be.sessions.findIndex(De=>De.id===Y);if(Se!==-1&&(T===Se||T===Se+1))return;let oe=k.accountKey===""?re:F.find(De=>De.workspaceId===k.accountKey)?.sessionIds;if(oe===void 0)return;let we=oe.filter(De=>De!==k.sessionId),$e=Y===void 0?we.length:we.indexOf(Y);we.splice($e===-1?we.length:$e,0,k.sessionId),I(k.accountKey,we.map(De=>De)),!(de==="updated"||k.accountKey==="")&&Fe(k.accountKey,k.sessionId,Y).catch(De=>{console.warn("session reorder rejected:",De)})},"commitSessionDrag"),ye=t((k,J)=>{if(Ge.current)return;Ge.current=!0,ee(null);let be=b.findIndex(T=>T.workspaceId===J.id);if(be===-1)return;let Ve=J.half==="before"?J.id:b[be+1]?.workspaceId;if(Ve===k.workspaceId)return;let Y=b.findIndex(T=>T.workspaceId===k.workspaceId),Se=Ve===void 0?b.length:b.findIndex(T=>T.workspaceId===Ve);Y!==-1&&(Se===Y||Se===Y+1)||Be(k.workspaceId,Ve).catch(T=>{console.warn("workspace reorder rejected:",T)})},"commitWorkspaceDrag"),Pe=Ee[0]?.workspaceId!==void 0&&_e?.over?.id===Ee[0].workspaceId&&_e.over.half==="before";return(0,n.jsxs)("div",{className:Ue(H.treeBody,H.wide),children:[Pe&&(0,n.jsx)("span",{className:H.listTopDropIndicator,"aria-hidden":"true"}),(0,n.jsxs)("div",{className:Ue(H.list,Pe&&H.listTopDropActive),role:"tree","aria-label":ie("section.sessions"),children:[Ee.length===0&&(0,n.jsx)("div",{className:H.empty,children:ie("empty.none")}),Ee.map(k=>{let J=k.workspaceId,be=J!==void 0&&_e?.over?.id===J?_e.over.half:null,Ve=J===void 0?void 0:{start:t(()=>{Ge.current=!1,ee({workspaceId:J,over:null})},"start"),end:t(()=>{_e?.over!==null&&_e?.over!==void 0?ye(_e,_e.over):ee(null),Ge.current=!1},"end")},Y=J===void 0?void 0:T=>{ee(oe=>oe===null?oe:{...oe,over:{id:J,half:T}})},Se=J===void 0?void 0:T=>{_e!==null&&ye(_e,{id:J,half:T})};return(0,n.jsxs)("div",{className:Ue(H.groupSection,be==="before"&&H.workspaceDropBefore,be==="after"&&H.workspaceDropAfter),onDragOver:_e===null||Y===void 0?void 0:T=>{T.preventDefault(),T.dataTransfer.dropEffect="move",Y(Ws(T))},onDrop:_e===null||Se===void 0?void 0:T=>{T.preventDefault(),Se(Ws(T))},children:[(0,n.jsx)(pa,{group:k,t:ie,onToggle:t(()=>{k.expanded&&ue(T=>T.filter(oe=>oe!==k.key)),V(k.key,!k.expanded)},"onToggle"),onCreate:t(()=>{k.workspaceId!==void 0&&(V(k.key,!0),h(k.workspaceId))},"onCreate"),drag:Ve,actions:k.workspaceId===void 0?void 0:{canArchive:(()=>{let T=b.find(oe=>oe.workspaceId===k.workspaceId);return T!==void 0&&$n(T,R)>0})(),rename:t(()=>{k.workspaceId!==void 0&&_(k.workspaceId,k.label)},"rename"),archive:t(()=>{k.workspaceId!==void 0&&S(k.workspaceId,k.label)},"archive"),delete:t(()=>{k.workspaceId!==void 0&&x(k.workspaceId,k.label)},"delete")}}),(U.includes(k.key)?k.sessions:k.sessions.slice(0,On)).map(T=>{let oe=ne!==null&&ne.accountKey===k.key;return(0,n.jsx)(Fs,{node:T,currentId:Ke,now:He,onOpen:p,onRename:u,onFork:t(we=>{rs(we,g,$,ie)},"onFork"),onArchive:fe,onUnarchive:Ne,onDeleteSession:ce,onReveal:T.id===me&&k.key===Re?()=>{Te?.(T.id)}:void 0,drag:{start:t(()=>{Le.current=!1,X({accountKey:k.key,sessionId:T.id,over:null})},"start"),active:oe,marker:oe&&ne.over?.id===T.id?ne.over.half:null,hover:t(we=>{X($e=>$e===null?$e:{...$e,over:{id:T.id,half:we}})},"hover"),drop:t(we=>{ne!==null&&Qe(ne,{id:T.id,half:we})},"drop"),end:t(()=>{ne?.over!==null&&ne?.over!==void 0?Qe(ne,ne.over):X(null),Le.current=!1},"end")},t:ie},T.id)}),k.sessions.length>On&&(0,n.jsx)("button",{type:"button",className:H.sessionOverflowButton,"aria-expanded":U.includes(k.key),onClick:t(()=>{ue(T=>Sa(T,k.key))},"onClick"),children:U.includes(k.key)?ie("sessions.collapse"):ie("sessions.expand",{n:k.sessions.length-On})})]},k.key)})]}),(0,n.jsx)("span",{className:H.fade})]})}t(_a,"SessionTree");function Ra({useSessions:e,useSessionPendingInteraction:s,useSessionStatus:a,preferSessionStatus:l,open:h,forkSession:p,onSessionRename:g,onSessionArchive:b,onSessionUnarchive:R,onSessionDelete:A,archivedSessionIds:_,showArchived:S,orderBy:x,sessionOrderByAccount:u,sessionUpdatedAtByAccount:fe,syncSessionOrderAccount:Ne,setSessionOrder:ce,t:Be,revealSessionId:Fe,onSessionRevealed:de,showArchivedToast:P}){let V=e(U=>U),pe=Nn(s,a,l),ae=dt(V),Me=(0,i.useMemo)(()=>Ms(V,_,pe,S),[V,_,pe,S]),I=(0,i.useMemo)(()=>Me.map(U=>U.id),[Me]),ie=(0,i.useRef)(x);(0,i.useEffect)(()=>{if(V.phase!=="ready")return;let U=u[Lt],ue=fe[Lt]??{},ne=ie.current!=="updated"&&x==="updated";ie.current=x;let X=Vs({sessionIds:I,previousOrder:U,previousUpdatedAt:ue,list:V,orderBy:x,sortByRecency:x==="updated"&&(U===void 0||ne)});X.changed&&Ne(Lt,X.order.map(Le=>Le),X.updatedAt)},[V,x,u,fe,I,Ne]);let me=(0,i.useMemo)(()=>{let U=new Map(Me.map(ue=>[ue.id,ue]));return Hn(I,u[Lt]).flatMap(ue=>{let ne=U.get(ue);return ne===void 0?[]:[ne]})},[Me,u,I]),[Te,$]=(0,i.useState)(null),ve=(0,i.useRef)(!1);Gs(Te!==null);let ke=t((U,ue)=>{if(ve.current)return;ve.current=!0,$(null);let ne=me.findIndex(Oe=>Oe.id===ue.id);if(ne===-1)return;let X=ue.half==="before"?ue.id:me[ne+1]?.id;if(X===U.sessionId)return;let Le=me.findIndex(Oe=>Oe.id===U.sessionId),_e=X===void 0?me.length:me.findIndex(Oe=>Oe.id===X);if(Le!==-1&&(_e===Le||_e===Le+1))return;let ee=me.map(Oe=>Oe.id).filter(Oe=>Oe!==U.sessionId),Ge=X===void 0?ee.length:ee.indexOf(X);ee.splice(Ge===-1?ee.length:Ge,0,U.sessionId),ce(Lt,ee.map(Oe=>Oe))},"commitDrag"),Ke=Date.now();return(0,n.jsxs)("div",{className:Ue(H.treeBody,H.wide),children:[(0,n.jsxs)("div",{className:Ue(H.list,H.flatList),role:"tree","aria-label":Be("section.sessions"),children:[me.length===0&&(0,n.jsx)("div",{className:H.empty,children:Be("empty.none")}),me.map(U=>{let ue=Te!==null;return(0,n.jsx)(Fs,{node:U,currentId:ae,now:Ke,onOpen:h,onRename:g,onFork:t(ne=>{rs(ne,p,P,Be)},"onFork"),onArchive:b,onUnarchive:R,onDeleteSession:A,onReveal:U.id===Fe?()=>{de?.(U.id)}:void 0,flat:!0,drag:{start:t(()=>{ve.current=!1,$({accountKey:Lt,sessionId:U.id,over:null})},"start"),active:ue,marker:ue&&Te.over?.id===U.id?Te.over.half:null,hover:t(ne=>{$(X=>X===null?X:{...X,over:{id:U.id,half:ne}})},"hover"),drop:t(ne=>{Te!==null&&ke(Te,{id:U.id,half:ne})},"drop"),end:t(()=>{Te?.over!==null&&Te?.over!==void 0?ke(Te,Te.over):$(null),ve.current=!1},"end")},t:Be},U.id)})]}),(0,n.jsx)("span",{className:H.fade})]})}t(Ra,"FlatList");function Ca({useSessions:e,useSessionPendingInteraction:s,useSessionStatus:a,preferSessionStatus:l,open:h,workspaces:p,archivedSessionIds:g,showArchived:b,query:R,remote:A,resultLimit:_,t:S}){let x=e(de=>de),u=Nn(s,a,l),fe=S("group.ungrouped"),Ne=A.query===R?A:{query:R,status:"loading",items:[],hasMore:!1},ce=(0,i.useMemo)(()=>Os(x,p,R,g,u,Ne,_,b,fe),[x,p,R,g,u,Ne,_,b,fe]),Be=Ne.status==="loading",Fe=Ne.status==="error";return(0,n.jsxs)("div",{className:Ue(H.treeBody,H.wide),children:[(0,n.jsxs)("div",{className:H.list,children:[(0,n.jsx)("div",{className:H.searchTree,role:"tree","aria-label":S("search.results.aria"),children:ce.items.map(de=>(0,n.jsx)(fa,{result:de,currentId:dt(x),onOpen:h,t:S},de.id))}),Be&&(0,n.jsx)("div",{className:H.searchStatus,role:"status",children:S("search.pending")}),Fe&&(0,n.jsx)("div",{className:H.searchWarning,role:"status",children:S("search.unavailable")}),!Be&&ce.items.length===0&&(0,n.jsx)("div",{className:H.empty,children:S("search.noMatches")}),ce.hasMore&&(0,n.jsx)("div",{className:H.searchStatus,children:S("search.hasMore",{n:_})})]}),(0,n.jsx)("span",{className:H.fade})]})}t(Ca,"SearchResults");let es={listeners:new Set,request(e){for(let s of this.listeners)s(e)},subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};function mi({wide:e,expandSidebar:s,useSessions:a,useSessionPendingInteraction:l,useSessionStatus:h,useWorkspaces:p,useStore:g,actions:b,startSession:R,open:A,renameSession:_,forkSession:S,renameWorkspace:x,deleteWorkspace:u,insertWorkspaceBefore:fe,archiveSession:Ne,archiveWorkspaceSessions:ce,unarchiveSession:Be,deleteSession:Fe,insertSessionBefore:de,createWorkspace:P,searchSessions:V,searchResultLimit:pe,useDirectoryFlow:ae,renderSlot:Me,t:I}){let ie=typeof h=="function",me=l??Es,Te=h??js,$=p(v=>v.items),ve=p(v=>v.phase),ke=p(v=>v.archivedSessionIds),Ke=a(v=>v),U=ae(v=>v),ue=g(v=>v.groupBy),ne=g(v=>v.orderBy),X=g(v=>v.showArchived)===!0,Le=g(v=>v.groupExpansion),_e=g(v=>v.sessionOrderByAccount),ee=g(v=>v.sessionUpdatedAtByAccount),Ge=(0,i.useMemo)(()=>new Set(ke),[ke]),[Oe,q]=(0,i.useState)(void 0);(0,i.useEffect)(()=>es.subscribe(v=>q(v)),[]);let Re=t(v=>{q(ge=>ge===v?void 0:ge)},"acknowledgeSessionReveal"),[f,w]=(0,i.useState)(null),F=(0,i.useRef)(0),re=t(v=>{F.current+=1,w({text:v,seq:F.current})},"showArchivedToast"),Ee=t(v=>{if(Ge.has(v)){re(I("archived.notOpenable"));return}A(v)},"guardedOpen");(0,i.useEffect)(()=>{ve==="ready"&&b.retainAccountKeys(["",Lt,...$.map(v=>v.workspaceId)])},[b.retainAccountKeys,ve,$]);let[He,Qe]=(0,i.useState)(""),[ye,Pe]=(0,i.useState)(!1),k=qs(He).trim(),[J,be]=(0,i.useState)({query:"",status:"idle",items:[],hasMore:!1}),Ve=(0,i.useRef)(null),Y=(0,i.useRef)(null),[Se,T]=(0,i.useState)(!1),oe=(0,i.useRef)(null),we=(0,i.useRef)(!1),[$e,De]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&$e){let v=window.setTimeout(()=>{Y.current?.focus({preventScroll:!0}),De(!1)},wa);return()=>{window.clearTimeout(v)}}},[e,$e]),(0,i.useEffect)(()=>{!e||!ye||$e||Y.current?.focus({preventScroll:!0})},[e,ye,$e]),(0,i.useEffect)(()=>{if(!e||!ye)return;let v=t(ge=>{!(ge.target instanceof Node)||Ve.current?.contains(ge.target)===!0||(Y.current?.blur(),k===""&&Pe(!1))},"onClick");return document.addEventListener("click",v),()=>{document.removeEventListener("click",v)}},[k,e,ye]),(0,i.useEffect)(()=>{if(k===""){be({query:"",status:"idle",items:[],hasMore:!1});return}let v=new AbortController;be({query:k,status:"loading",items:[],hasMore:!1});let ge=window.setTimeout(()=>{V(k,v.signal).then(Ye=>{v.signal.aborted||be({query:k,status:"ready",items:Ye.items,hasMore:Ye.hasMore})}).catch(()=>{v.signal.aborted||be({query:k,status:"error",items:[],hasMore:!1})})},xa);return()=>{window.clearTimeout(ge),v.abort()}},[k,V]);let[rt,wt]=(0,i.useState)(null),[xt,ut]=(0,i.useState)(""),[et,lt]=(0,i.useState)(!1),[Qt,ft]=(0,i.useState)(null),ht=xt.trim(),vt=rt!==null&&ht!==""&&ht!==rt.currentTitle&&$.some(v=>v.title===ht),vn=et||ht===""||rt===null||ht===rt.currentTitle||vt,en=t(()=>{et||(wt(null),ft(null))},"closeRename"),yn=t(()=>{vn||(lt(!0),ft(null),x(rt.workspaceId,ht).then(()=>{lt(!1),wt(null)}).catch(v=>{lt(!1),ft(v instanceof Error?v.message:String(v))}))},"confirmRename"),[Mt,bn]=(0,i.useState)(null),[tn,Bn]=(0,i.useState)(""),[qt,Ot]=(0,i.useState)(!1),[at,_t]=(0,i.useState)(null),wn=tn.trim(),Gt=qt||wn===""||Mt===null,nn=t(()=>{qt||(bn(null),_t(null))},"closeSessionRename"),Ut=t(()=>{Gt||(Ot(!0),_t(null),_(Mt.sessionId,wn).then(()=>{Ot(!1),bn(null)}).catch(v=>{Ot(!1),_t(v instanceof Error?v.message:String(v))}))},"confirmSessionRename"),Rt=t((v,ge)=>{bn({sessionId:v,currentTitle:ge}),Bn(ge),_t(null)},"onSessionRename"),[St,Vt]=(0,i.useState)(null),[Ht,pt]=(0,i.useState)(!1),[Fn,sn]=(0,i.useState)(null),Wt=t(()=>{Ht||(Vt(null),sn(null))},"closeStopArchive"),yt=t(v=>{Ne(v).catch(ge=>{let Ye=gn(ge);if(Ye!==void 0){let Gn=Ke.byId[v];Vt({sessionId:v,title:Gn===void 0?v:Xe(Gn,I),kinds:Ye.join(", ")}),sn(null);return}re(Xn(ge,I))})},"onSessionArchive"),xn=t(()=>{Ht||St===null||(pt(!0),sn(null),Ne(St.sessionId,{stopActivity:!0}).then(()=>{pt(!1),Vt(null)}).catch(v=>{pt(!1),sn(Xn(v,I))}))},"confirmStopArchive"),[ct,Ct]=(0,i.useState)(null),[Pt,rn]=(0,i.useState)(!1),[mt,an]=(0,i.useState)(null),Sn=t(()=>{Pt||(Ct(null),an(null))},"closeArchiveWorkspace"),as=t((v,ge)=>{let Ye=Cs($,v,ge,Ge);Ye!==null&&(Ct(Ye),an(null))},"onArchiveWorkspaceRequest"),gt=t(()=>{Pt||ct===null||(rn(!0),an(null),ce(ct.workspaceId).then(()=>{rn(!1),Ct(null)}).catch(v=>{let ge=Is(ct,v,I);rn(ge.archiving),an(ge.error)}))},"confirmArchiveWorkspace"),[It,on]=(0,i.useState)(null),[zt,ln]=(0,i.useState)(!1),[Xt,At]=(0,i.useState)(null),[cn,tt]=(0,i.useState)(null);(0,i.useEffect)(()=>{Xt===null||$.some(v=>v.workspaceId===Xt)||(ln(!1),At(null),on(null))},[Xt,$]);let kn=t(()=>{zt||(on(null),tt(null))},"closeDelete"),Kt=t(()=>{zt||It===null||(ln(!0),At(null),tt(null),u(It.workspaceId).then(()=>{At(It.workspaceId)}).catch(v=>{ln(!1),tt(v instanceof Error?v.message:String(v))}))},"confirmDelete"),_n=t(v=>{Be(v).catch(ge=>{re(xs(ge,I))})},"onSessionUnarchive"),[bt,Et]=(0,i.useState)(null),[$t,Bt]=(0,i.useState)(!1),[dn,Ln]=(0,i.useState)(null),[qn,Yt]=(0,i.useState)(null);(0,i.useEffect)(()=>{dn===null||Ge.has(dn)||$.some(v=>v.sessionIds.includes(dn))||(Bt(!1),Ln(null),Et(null))},[dn,Ge,$]);let Rn=t(()=>{$t||(Et(null),Yt(null))},"closeDeleteSession"),is=t(()=>{if($t||bt===null)return;Bt(!0),Yt(null);let v=bt.sessionId;Fe(v).then(()=>{Bt(!1),Et(null),Ln(v)}).catch(ge=>{Bt(!1),Yt(Tn(ge,I))})},"confirmDeleteSession");return(0,n.jsxs)("div",{className:Ue(H.root,!e&&H.rail),children:[(0,n.jsxs)("div",{className:H.sectionHeader,children:[e&&(0,n.jsx)("span",{className:Ue(H.sectionLabel,H.wide,ye&&H.sectionLabelHidden),children:I(ue==="flat"?"section.sessions":"section.workspaces")}),e&&(0,n.jsx)("div",{className:Ue(H.searchSlot,ye&&H.searchSlotExpanded),children:(0,n.jsxs)("div",{ref:Ve,className:Ue(H.search,ye&&H.searchExpanded),onClick:t(()=>{T(!1),Pe(!0),Y.current?.focus()},"onClick"),children:[(0,n.jsx)(c.Tooltip,{label:I("search"),side:"bottom",delayMs:500,disabled:ye,children:(0,n.jsx)("button",{type:"button",className:H.searchButton,"aria-label":I("search.sessions.aria"),"aria-expanded":ye,onClick:t(()=>{T(!1),Pe(!0)},"onClick"),children:(0,n.jsx)(c.IconSearchOutlineMedium,{size:ye?11:14})})}),(0,n.jsx)("input",{ref:Y,className:H.searchInput,type:"text",placeholder:I("search.placeholder"),maxLength:Qn,value:He,tabIndex:ye?0:-1,onChange:t(v=>{Qe(qs(v.target.value))},"onChange"),onKeyDown:t(v=>{v.key==="Escape"&&(Qe(""),Pe(!1))},"onKeyDown")}),ye&&(0,n.jsx)("button",{type:"button",className:H.clearButton,"aria-label":I("search.clear"),onClick:t(v=>{v.stopPropagation(),Qe(""),Pe(!1)},"onClick"),children:(0,n.jsx)(c.IconCloseFillMedium,{})})]})}),(0,n.jsxs)("div",{className:Ue(H.headerActions,e&&ye&&H.headerActionsHidden),children:[e&&(0,n.jsx)(ka,{groupBy:ue,orderBy:ne,onGroupPick:t(v=>{b.setGroupBy(v)},"onGroupPick"),onOrderPick:t(v=>{b.setOrderBy(v)},"onOrderPick"),t:I}),U&&(0,n.jsx)(c.Tooltip,{label:I("workspace.add"),side:"bottom",delayMs:500,children:(0,n.jsx)("button",{ref:oe,type:"button",className:H.iconButton,"aria-label":I("workspace.add"),onClick:t(()=>{T(v=>!v)},"onClick"),children:(0,n.jsx)(c.IconProjectAddOutlineMedium,{size:e?16:18})})})]}),(0,n.jsx)(ya,{t:I,open:Se,anchorRef:oe,useWorkspaces:p,createWorkspace:P,useDirectoryFlow:ae,renderDirectoryFlow:t(v=>Me(rr,v),"renderDirectoryFlow"),addOnly:!0,side:"right",onPick:t(v=>{T(!1),R(v)},"onPick"),onClose:t(()=>{T(!1)},"onClose")})]}),!e&&(0,n.jsx)("div",{className:H.search,children:(0,n.jsx)(c.Tooltip,{label:I("search"),children:(0,n.jsx)("button",{type:"button",className:H.searchButton,"aria-label":I("search.sessions.aria"),onClick:t(()=>{Pe(!0),De(!0),s()},"onClick"),children:(0,n.jsx)(c.IconSearchOutlineMedium,{size:18})})})}),(0,n.jsx)("div",{className:H.listArea,children:e&&(k!==""?(0,n.jsx)(Ca,{useSessions:a,useSessionPendingInteraction:me,useSessionStatus:Te,preferSessionStatus:ie,open:t(v=>{q(v),Qe(""),Pe(!1),Ee(v)},"open"),workspaces:$,archivedSessionIds:ke,showArchived:X,query:k,remote:J,resultLimit:pe,t:I}):ue==="flat"?(0,n.jsx)(Ra,{useSessions:a,useSessionPendingInteraction:me,useSessionStatus:Te,preferSessionStatus:ie,open:Ee,revealSessionId:Oe,onSessionRevealed:Re,showArchivedToast:re,forkSession:S,onSessionRename:Rt,onSessionArchive:yt,onSessionUnarchive:_n,onSessionDelete:t((v,ge)=>{Et({sessionId:v,title:ge}),Yt(null)},"onSessionDelete"),archivedSessionIds:ke,showArchived:X,orderBy:ne,sessionOrderByAccount:_e,sessionUpdatedAtByAccount:ee,syncSessionOrderAccount:b.syncSessionOrderAccount,setSessionOrder:b.setSessionOrder,t:I}):(0,n.jsx)(_a,{useSessions:a,useSessionPendingInteraction:me,useSessionStatus:Te,preferSessionStatus:ie,revealSessionId:Oe,onSessionRevealed:Re,showArchivedToast:re,onSessionRename:Rt,onSessionArchive:yt,onSessionUnarchive:_n,onSessionDelete:t((v,ge)=>{Et({sessionId:v,title:ge}),Yt(null)},"onSessionDelete"),forkSession:S,workspaces:$,groupExpansion:Le,setGroupExpanded:b.setGroupExpanded,sessionOrderByAccount:_e,sessionUpdatedAtByAccount:ee,syncSessionOrderAccount:b.syncSessionOrderAccount,setSessionOrder:b.setSessionOrder,archivedSessionIds:ke,showArchived:X,startSession:R,open:Ee,insertWorkspaceBefore:fe,insertSessionBefore:de,orderBy:ne,t:I,onRenameRequest:t((v,ge)=>{wt({workspaceId:v,currentTitle:ge}),ut(ge),ft(null)},"onRenameRequest"),onArchiveRequest:as,onDeleteRequest:t((v,ge)=>{on({workspaceId:v,title:ge}),tt(null)},"onDeleteRequest")}))}),(0,n.jsxs)(c.Modal,{open:rt!==null,onClose:en,closeLabel:I("close"),title:I("rename.workspace.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",disabled:et,onClick:en,children:I("cancel")}),(0,n.jsx)(c.Button,{variant:"primary",disabled:vn,onClick:yn,children:I("rename")})]}),children:[(0,n.jsx)("input",{className:H.renameInput,value:xt,"aria-label":I("field.workspaceName"),autoFocus:!0,disabled:et,onFocus:t(v=>{v.target.select()},"onFocus"),onChange:t(v=>{ut(v.target.value),ft(null)},"onChange"),onCompositionStart:t(()=>{we.current=!0},"onCompositionStart"),onCompositionEnd:t(()=>{we.current=!1},"onCompositionEnd"),onKeyDown:t(v=>{v.key==="Enter"&&!we.current&&(v.preventDefault(),yn())},"onKeyDown")}),vt&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:I("conflict.named",{name:ht})}),Qt!==null&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:Qt})]}),(0,n.jsxs)(c.Modal,{open:Mt!==null,onClose:nn,closeLabel:I("close"),title:I("rename.session.title"),footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",disabled:qt,onClick:nn,children:I("cancel")}),(0,n.jsx)(c.Button,{variant:"primary",disabled:Gt,onClick:Ut,children:I("rename")})]}),children:[(0,n.jsx)("input",{className:H.renameInput,value:tn,"aria-label":I("field.sessionName"),autoFocus:!0,disabled:qt,onFocus:t(v=>{v.target.select()},"onFocus"),onChange:t(v=>{Bn(v.target.value),_t(null)},"onChange"),onCompositionStart:t(()=>{we.current=!0},"onCompositionStart"),onCompositionEnd:t(()=>{we.current=!1},"onCompositionEnd"),onKeyDown:t(v=>{v.key==="Enter"&&!we.current&&(v.preventDefault(),Ut())},"onKeyDown")}),at!==null&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:at})]}),(0,n.jsxs)(c.Modal,{open:It!==null,onClose:kn,closeLabel:I("close"),title:I("delete.workspace"),...It===null?{}:{description:I("delete.desc",{name:It.title})},footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",disabled:zt,onClick:kn,children:I("cancel")}),(0,n.jsx)(c.Button,{variant:"outline",className:"dsham_btnDanger",disabled:zt,onClick:Kt,children:I("delete.workspace")})]}),children:[zt&&(0,n.jsx)("div",{className:H.deleteStatus,role:"status",children:I("delete.pending")}),cn!==null&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:cn})]}),(0,n.jsxs)(c.Modal,{open:ct!==null,onClose:Sn,closeLabel:I("close"),title:ct===null?"":I("archiveWorkspace.title",{n:ct.count}),...ct===null?{}:{description:I("archiveWorkspace.desc",{name:ct.title})},footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",disabled:Pt,onClick:Sn,children:I("cancel")}),(0,n.jsx)(c.Button,{variant:"outline",className:"dsham_btnDanger",disabled:Pt,onClick:gt,children:I("archiveWorkspace.confirm")})]}),children:[Pt&&(0,n.jsx)("div",{className:H.deleteStatus,role:"status",children:I("archiveWorkspace.pending")}),mt!==null&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:mt})]}),(0,n.jsxs)(c.Modal,{open:bt!==null,onClose:Rn,closeLabel:I("close"),title:I("deleteSession.title"),...bt===null?{}:{description:I("deleteSession.desc",{name:bt.title})},footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",disabled:$t,onClick:Rn,children:I("cancel")}),(0,n.jsx)(c.Button,{variant:"outline",className:"dsham_btnDanger",disabled:$t,onClick:is,children:I("deleteSession.title")})]}),children:[$t&&(0,n.jsx)("div",{className:H.deleteStatus,role:"status",children:I("deleteSession.pending")}),qn!==null&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:qn})]}),(0,n.jsxs)(c.Modal,{open:St!==null,onClose:Wt,closeLabel:I("close"),title:I("archiveActive.title"),...St===null?{}:{description:I("archiveActive.desc",{name:St.title,kinds:St.kinds})},footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Button,{variant:"outline",disabled:Ht,onClick:Wt,children:I("cancel")}),(0,n.jsx)(c.Button,{variant:"outline",className:"dsham_btnDanger",disabled:Ht,onClick:xn,children:I("archiveActive.confirm")})]}),children:[Ht&&(0,n.jsx)("div",{className:H.deleteStatus,role:"status",children:I("archiveActive.pending")}),Fn!==null&&(0,n.jsx)("div",{className:H.renameError,role:"alert",children:Fn})]}),f!==null&&(0,n.jsx)(c.Toast,{key:f.seq,text:f.text,onDone:t(()=>{w(null)},"onDone")})]})}t(mi,"WorkspaceBrowser");let Ia=".dsham_archiveTabsLocked{opacity:.5}",Aa=[".dsham_settings{container-type:inline-size;min-width:0;box-sizing:border-box;width:min(100%,760px);margin:0 auto;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;flex-direction:column;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}",".dsham_settingsFilters{display:flex;align-items:center;gap:8px;min-width:0;width:100%;flex-wrap:nowrap}",".dsham_settingsSort{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none;min-width:0}",".dsham_settingsSortLabel{flex:none;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px;white-space:nowrap}",".dsham_settingsFilter{display:flex;position:relative;flex:none;width:auto;min-width:0}",".dsham_settingsSearch .dsham_favoriteFilter,.dsham_settingsSearch .dsham_scopeFilter,.dsham_settingsFilters>.dsham_projectFilter,.dsham_settingsSort .dsham_sortFilter{flex:none;width:auto}",".dsham_settingsFilters>.dsham_dateFilter{flex:1 1 auto;min-width:0}","@container(max-width:480px){.dsham_settingsFilters{flex-wrap:wrap}.dsham_settingsSort{margin-left:0}}",".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_settingsSearch .dsham_searchField{flex:1 1 0;min-width:0;width:auto;max-width:none;box-sizing:border-box}",".dsham_settingsGroup{margin:0 0 20px}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}",".dsham_settingsGroupTitle{display:flex;align-items:center;gap:8px;min-width:0;margin:0;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}",".dsham_settingsGroupTitle svg{flex:none;color:var(--dsw-alias-label-secondary)}",".dsham_settingsCount{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px}",".dsham_settingsList{display:grid;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill))}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:64px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_settingsRow:last-child{border-bottom:0}",".dsham_settingsContent{min-width:0;flex:1}",".dsham_settingsTitle{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px}",".dsham_settingsActions{display:flex;align-items:center;gap:4px;flex:none}",".dsham_settingsEmpty{padding:28px 8px;color:var(--dsw-alias-label-secondary);text-align:center}",".dsham_settingsError{margin-top:10px;color:var(--dsw-alias-state-error-primary);font-size:12px}","@container(max-width:520px){.dsham_settingsHeader{margin-bottom:16px}.dsham_settingsGroup{margin-bottom:32px}.dsham_settingsRow{padding:10px 12px}.dsham_settingsActions{gap:4px}}"].join(""),Ea=".dsham_settingsTitleLink{display:block;max-width:100%;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;font-weight:600;line-height:20px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.dsham_settingsTitleLink:hover:not(:disabled){text-decoration:underline;text-underline-offset:3px}.dsham_settingsTitleLink:disabled{cursor:default;opacity:.6}.dsham_groupToggle{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:4px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsham_groupToggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dsham_settingsRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsRow[data-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsTitleLink:focus-visible,.dsham_groupToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#3b82f6);outline-offset:2px}@container(max-width:400px){.dsham_settingsRow{gap:8px;padding:10px 8px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:11px}}.dsham_settingsGroupMeta{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap}.dsham_settingsStatus{margin-top:10px;color:var(--dsw-alias-label-secondary);font-size:12px}.dsham_checkbox{width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);flex:none}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",ja=".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}}",Da=".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}",Ta=".dsham_settings{margin:0 auto!important}@media(max-width:720px){.dsham_settings{margin:0 auto!important}}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/ArchiveSettings.layout.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/ArchiveSettings.layout.css",e.textContent=Ta,document.head.appendChild(e)}function Pn({id:e,className:s,value:a,options:l,onChange:h,disabled:p=!1,"aria-label":g}){let[b,R]=i.useState(!1);i.useEffect(()=>{if(!b||typeof window>"u")return;function x(u){u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),u.stopImmediatePropagation(),R(!1))}return t(x,"onKey"),window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)},[b]);let A=i.useMemo(()=>l.map(x=>({id:x.value,label:x.label})),[l]),S=l.find(x=>x.value===a)?.label??g;return(0,n.jsx)("div",{id:e,className:s===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${s}`,children:(0,n.jsx)(c.Menu,{open:b,onClose:t(()=>R(!1),"onClose"),onSelect:t(x=>{p||h(x),R(!1)},"onSelect"),selectedId:a,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,n.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":g,"aria-expanded":b,disabled:p,className:"dsham_menuSelectBtn"+(b?" is-open":""),onClick:t(()=>{p||R(x=>!x)},"onClick"),children:[(0,n.jsx)("span",{className:"dsham_selectLabel",children:S}),(0,n.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:b?"rotate(180deg)":"none",flex:"none"},children:(0,n.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:A})})}t(Pn,"ArchiveProjectSelect");function Xs({selectedCount:e,hiddenCount:s,allVisibleSelected:a,selectedVisibleCount:l,visibleCount:h,busy:p,t:g,onToggle:b,onClear:R,onRestore:A,onDelete:_,onArchive:S}){let x=e>0;return(0,n.jsxs)("div",{className:"dsham_settingsSelection",children:[(0,n.jsxs)("div",{className:"dsham_settingsSelectionMain",children:[(0,n.jsxs)("div",{className:"dsham_settingsSelectionSummary",children:[(0,n.jsxs)("label",{className:"dsham_settingsSelectionToggle",title:g("archives.selectAllFiltered"),children:[(0,n.jsx)(Ks,{checked:a,indeterminate:l>0&&!a,disabled:p||h===0,label:g("archives.selectAllFiltered"),onChange:t(u=>b(u.target.checked),"onChange")}),(0,n.jsx)("span",{"aria-live":"polite",children:x?g("archives.selectedCount",{n:e}):g("archives.selectAllFiltered")})]}),x&&B({disabled:p,"aria-label":g("archives.clearSelection"),onClick:R,children:g("archives.clearSelectionShort")})]}),x&&(0,n.jsxs)("div",{className:"dsham_settingsSelectionActions",children:S?[B({disabled:p,onClick:S,children:g("archives.archiveSelected")})]:[B({disabled:p,"aria-label":g("archives.restoreSelected"),onClick:A,children:g("archives.restore")}),B({disabled:p,className:"dsham_btnDanger","aria-label":g("archives.deleteSelected"),onClick:_,children:g("archives.deleteSelectionShort")})]})]}),s>0&&(0,n.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:g("archives.selectionHiddenHint",{hidden:s})})]})}t(Xs,"ArchiveSelectionToolbar");function Ks({checked:e,indeterminate:s=!1,disabled:a=!1,label:l,onChange:h}){return(0,n.jsx)(os,{checked:e,indeterminate:s,disabled:a,label:l,onChange:h})}t(Ks,"ArchiveSelectionCheckbox");function $s(){return(0,n.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:[3.5,8,12.5].map(e=>(0,n.jsx)("circle",{cx:e,cy:8,r:1.15,fill:"none",stroke:"currentColor",strokeWidth:1.5},e))})}t($s,"moreIcon");function Na({busy:e,title:s,t:a,onPreview:l,onRestoreOpen:h,onDelete:p,onCopyId:g,onCopyPath:b}){let[R,A]=(0,i.useState)(!1),_=t(x=>{if(!e){if(A(!1),x==="copyId")return g?.();if(x==="copyPath")return b?.();if(x==="preview")return l?.();if(x==="restoreOpen")return h?.();x==="delete"&&p?.()}},"choose"),S=[...l?[{id:"preview",label:a("discovery.preview"),icon:(0,n.jsx)(c.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...h?[{id:"restoreOpen",label:a("archives.restoreOpen"),icon:(0,n.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...g?[{id:"copyId",label:a("details.copyId"),icon:(0,n.jsx)(c.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...b?[{id:"copyPath",label:a("details.copyPath"),icon:(0,n.jsx)(c.IconLinkOutlineMedium,{size:16}),danger:!1}]:[],...p?[{id:"delete",label:a("menu.deleteSession"),icon:(0,n.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,n.jsx)(c.Menu,{open:!e&&R,align:"end",portal:!0,dense:!0,items:S,onSelect:_,onClose:t(()=>A(!1),"onClose"),anchor:B({variant:"outline",className:"dsham_iconAction",disabled:e,title:a("archives.moreActions"),"aria-label":a("archives.moreActions")+a("common.separator")+s,"aria-haspopup":"menu","aria-expanded":R&&!e,icon:$s(),onClick:t(()=>{e||A(x=>!x)},"onClick")})})}t(Na,"ArchivedSessionMenu");function Ma({group:e,busy:s,onArchive:a,onRestore:l,onDelete:h,t:p}){let g=e.key===zn,b=a?[{id:"archive",label:p(g?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,n.jsx)(c.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:p(g?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,n.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:p(g?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,n.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}],[R,A]=(0,i.useState)(!1),_=p(g?"archives.ungroupedActions":"archives.projectActions",{name:e.title}),S=t(x=>{s||(x==="archive"?a?.():x==="restore"?l?.():x==="delete"&&h?.())},"choose");return(0,n.jsx)(c.Menu,{open:!s&&R,align:"end",portal:!0,dense:!0,items:b,onSelect:t(x=>{A(!1),S(x)},"onSelect"),onClose:t(()=>A(!1),"onClose"),anchor:B({variant:"outline",className:"dsham_iconAction",disabled:s,"aria-label":_,"aria-haspopup":"menu","aria-expanded":R&&!s,icon:$s(),onClick:t(()=>{s||A(x=>!x)},"onClick")})})}t(Ma,"ArchivedGroupActions");let zn="__ungrouped__";function Oa(e){return e===zn?{scope:"ungrouped"}:{scope:"workspace",workspaceId:e}}t(Oa,"archivedBatchTargetForGroup");function fn(e,s,a){let l=[...new Set(e??[])];if(a.scope==="all")return l;if(a.scope==="sessions"){let p=new Set(a.sessionIds??[]);return l.filter(g=>p.has(g))}if(a.scope==="workspace"){let p=new Set(s.find(g=>g.workspaceId===a.workspaceId)?.sessionIds??[]);return l.filter(g=>p.has(g))}let h=new Set(s.flatMap(p=>p.sessionIds));return l.filter(p=>!h.has(p))}t(fn,"deriveArchivedBatchIds");function Ys(e){return[...new Set(e.flatMap(s=>s.sessions.map(a=>a.id)))]}t(Ys,"archivedSessionIdsInGroups");function Js(e,s){let a=new Set(s);return[...new Set(e)].filter(l=>a.has(l))}t(Js,"pruneArchivedSelection");function ts(e,s,a){let l=new Set(e);for(let h of s)a?l.add(h):l.delete(h);return[...l]}t(ts,"toggleArchivedSelection");function Zs(e,s){let a=e.deletedSessionIds.length,l=e.skippedSessionIds.length;return e.failures.length>0?{kind:"error",message:s("archives.deletePartial",{deleted:a,skipped:l,failed:e.failures.length,detail:e.failures[0].message})}:l>0&&a>0?{kind:"notice",message:s("archives.deleteSuccessWithSkipped",{deleted:a,skipped:l})}:l>0?{kind:"notice",message:s("archives.deleteSkipped",{n:l})}:{kind:"notice",message:s("archives.deleteSuccess",{n:a})}}t(Zs,"archivedDeleteFeedback");function Qs(e,s){let a=new Set(s);return Object.values(e).filter(l=>l.origin!=="subagent"&&!l.blank&&!a.has(l.id)).map(l=>l.id)}t(Qs,"unarchivedSessionIds");function er(e,s,a,l){let h=s.map(b=>({key:b.workspaceId,title:b.title,ids:new Set(b.sessionIds),sessions:[]})),p=[];for(let b of a){let R=e[b];if(R===void 0||R.origin==="subagent")continue;let A=h.find(_=>_.ids?.has(b));(A===void 0?p:A.sessions).push(R)}let g=h.filter(b=>b.sessions.length>0);return p.length>0&&g.push({key:zn,title:l,sessions:p}),g}t(er,"deriveArchivedGroups");function tr(e,s,a,l,h={}){let p=t((A,_)=>String(A).localeCompare(String(_),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),g=t(A=>{let _=s==="created"?h[A.id]?.createdAt??a[A.id]:A.updatedAt;return typeof _=="number"&&Number.isFinite(_)?_:Number.NEGATIVE_INFINITY},"timestampOf"),b=t((A,_)=>{if(s==="turnsAsc"||s==="turnsDesc"){let S=hs(h[A.id]?.turnCount,h[_.id]?.turnCount,s);if(S)return S}if(s!=="alphabetical"){let S=g(_)-g(A);if(Number.isFinite(S)&&S!==0)return S}return p(Xe(A,l),Xe(_,l))||p(A.id,_.id)},"compareSessions");return e.map(A=>({...A,sessions:[...A.sessions].sort(b)})).sort((A,_)=>{if(s==="turnsAsc"||s==="turnsDesc"){let S=hs(h[A.sessions[0]?.id]?.turnCount,h[_.sessions[0]?.id]?.turnCount,s);if(S)return S}if(s!=="alphabetical"){let S=g(_.sessions[0])-g(A.sessions[0]);if(Number.isFinite(S)&&S!==0)return S}return p(A.title,_.title)||p(A.key,_.key)})}t(tr,"sortArchivedGroups");let nr={...Gr,...Rr,...Cn,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","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","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","archives.sessionCount":"{n} \u4E2A\u804A\u5929","archives.selectAllFiltered":"\u5168\u9009\u5F53\u524D\u7B5B\u9009\u7ED3\u679C","archives.selectSession":"\u9009\u62E9\u4F1A\u8BDD\u201C{name}\u201D","archives.restoreSelected":"\u6062\u590D\u6240\u9009","archives.deleteSelected":"\u5220\u9664\u6240\u9009","archives.timestamp":"{date}\uFF0C{time}","archives.restoreProject":"\u6062\u590D\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.restoreUngrouped":"\u5168\u90E8\u6062\u590D","archives.deleteProject":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngrouped":"\u5168\u90E8\u5220\u9664","archives.projectActions":"\u9879\u76EE\u201C{name}\u201D\u7684\u5F52\u6863\u64CD\u4F5C","archives.ungroupedActions":"\u672A\u5206\u7EC4\u804A\u5929\u7684\u5F52\u6863\u64CD\u4F5C","archives.restoreSuccess":"\u5DF2\u6062\u590D {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.restoreBatchFailed":"\u6279\u91CF\u6062\u590D\u5931\u8D25\uFF1A{detail}","archives.deleteSelectedTitle":"\u5220\u9664\u6240\u9009\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteSelectedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u6240\u9009\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteSelectedConfirm":"\u5220\u9664\u6240\u9009\u804A\u5929","archives.deleteProjectTitle":"\u5220\u9664\u201C{name}\u201D\u4E2D\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteProjectDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u201C{name}\u201D\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u9879\u76EE\u76EE\u5F55\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteProjectConfirm":"\u5220\u9664\u9879\u76EE\u5168\u90E8\u804A\u5929","archives.deleteUngroupedTitle":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5DF2\u5F52\u6863\u804A\u5929","archives.deleteUngroupedDesc":"\u5C06\u6C38\u4E45\u5220\u9664\u672A\u5206\u7EC4\u4E2D\u7684 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u53CA\u5176\u5B50\u4EE3\u7406\u548C\u8BB0\u5F55\u3002\u5176\u4ED6\u9879\u76EE\u548C\u672A\u5F52\u6863\u804A\u5929\u4E0D\u4F1A\u53D7\u5F71\u54CD\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","archives.deleteUngroupedConfirm":"\u5220\u9664\u672A\u5206\u7EC4\u7684\u5168\u90E8\u804A\u5929","archives.deleteBatchPending":"\u6B63\u5728\u5220\u9664\u5DF2\u5F52\u6863\u804A\u5929\u2026","archives.deleteSuccess":"\u5DF2\u5220\u9664 {n} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\u3002","archives.deleteSuccessWithSkipped":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u5DF2\u5F52\u6863\u804A\u5929\uFF1B\u53E6\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deleteSkipped":"\u5DF2\u6E05\u7406 {n} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\u3002","archives.deletePartial":"\u5DF2\u5220\u9664 {deleted} \u4E2A\u804A\u5929\uFF0C\u6E05\u7406 {skipped} \u4E2A\u5DF2\u4E0D\u5B58\u5728\u4F1A\u8BDD\u7684\u5F52\u6863\u8BB0\u5F55\uFF1B{failed} \u4E2A\u5220\u9664\u5931\u8D25\uFF1A{detail}","archives.unarchiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u53D6\u6D88\u5F52\u6863\u3002","archives.unarchiveFailed":"\u53D6\u6D88\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveUnknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u5F52\u6863\u3002","archives.archiveFailed":"\u5F52\u6863\u5931\u8D25\uFF1A{detail}","archives.archiveActive":"\u4F1A\u8BDD\u4ECD\u5728\u8FD0\u884C\uFF08{kinds}\uFF09\u3002","archiveActive.title":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.desc":"\u201C{name}\u201D\u4ECD\u6709\u6B63\u5728\u8FDB\u884C\u7684\u5DE5\u4F5C\uFF1A{kinds}\u3002\u5F52\u6863\u524D\u4F1A\u505C\u6B62\u8FD9\u4E9B\u5DE5\u4F5C\u3002","archiveActive.confirm":"\u505C\u6B62\u5E76\u5F52\u6863","archiveActive.pending":"\u6B63\u5728\u505C\u6B62\u5E76\u5F52\u6863\u2026","archives.forkFailed":"\u5206\u53C9\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","deleteSession.title":"\u5220\u9664\u4F1A\u8BDD","deleteSession.confirmTitle":"\u5220\u9664\u4F1A\u8BDD\uFF1F","deleteSession.desc":"\u5C06\u6C38\u4E45\u5220\u9664\u4F1A\u8BDD\u201C{name}\u201D\u53CA\u5176\u5B50\u4EE3\u7406\uFF08\u542B\u6B63\u5728\u8FD0\u884C\u7684\uFF09\u548C\u5168\u90E8\u8BB0\u5F55\uFF08\u5BF9\u8BDD\u5185\u5BB9\u3001\u7EDF\u8BA1\u3001\u7F13\u5B58\uFF09\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002","deleteSession.pending":"\u6B63\u5728\u5220\u9664\u4F1A\u8BDD\u2026","deleteSession.unknown":"\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\u3002","deleteSession.failed":"\u5220\u9664\u4F1A\u8BDD\u5931\u8D25\uFF1A{detail}","picker.loading":"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026","conflict.named":"\u5DF2\u5B58\u5728\u540D\u4E3A\u201C{name}\u201D\u7684\u5DE5\u4F5C\u533A\u3002","folderError.title":"\u65E0\u6CD5\u6253\u5F00\u6587\u4EF6\u5939","folderError.retry":"\u91CD\u65B0\u9009\u62E9",rename:"\u91CD\u547D\u540D","rename.workspace.title":"\u91CD\u547D\u540D\u5DE5\u4F5C\u533A","rename.session.title":"\u91CD\u547D\u540D\u4F1A\u8BDD","field.workspaceName":"\u5DE5\u4F5C\u533A\u540D\u79F0","field.sessionName":"\u4F1A\u8BDD\u540D\u79F0","delete.workspace":"\u5220\u9664\u5DE5\u4F5C\u533A","delete.desc":"\u5C06\u628A\u201C{name}\u201D\u4ECE\u5DE5\u4F5C\u533A\u5217\u8868\u4E2D\u79FB\u9664\u3002\u6587\u4EF6\u5939\u4E0E\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\uFF0C\u5176\u4F1A\u8BDD\u5C06\u663E\u793A\u5728\u201C\u672A\u5206\u7EC4\u201D\u4E0B\u3002","delete.pending":"\u6B63\u5728\u5220\u9664\u5DE5\u4F5C\u533A\u2026","menu.fork":"\u5206\u53C9\u4F1A\u8BDD","menu.archiveSession":"\u5F52\u6863\u4F1A\u8BDD","menu.archiveWorkspace":"\u5F52\u6863\u5168\u90E8\u804A\u5929","archiveWorkspace.title":"\u5F52\u6863 {n} \u4E2A\u804A\u5929\uFF1F","archiveWorkspace.desc":"\u8FD9\u4F1A\u5C06\u201C{name}\u201D\u4E2D\u7684\u804A\u5929\u5F52\u6863\u3002\u4E4B\u540E\u4F60\u53EF\u4EE5\u5728\u5DF2\u5F52\u6863\u7684\u804A\u5929\u4E2D\u627E\u5230\u5B83\u4EEC\u3002","archiveWorkspace.confirm":"\u5168\u90E8\u5F52\u6863","archiveWorkspace.pending":"\u6B63\u5728\u5F52\u6863\u804A\u5929\u2026","actions.workspace.aria":"\u5DE5\u4F5C\u533A\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.session.aria":"\u4F1A\u8BDD\u201C{name}\u201D\u7684\u64CD\u4F5C","actions.newSession.aria":"\u5728\u201C{name}\u201D\u4E2D\u65B0\u5EFA\u4F1A\u8BDD","status.running":"\u8FDB\u884C\u4E2D","status.subagentsRunning.one":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.subagentsRunning.other":"{n} \u4E2A\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D","status.idle":"\u7A7A\u95F2","status.waitingApproval":"\u7B49\u5F85\u5BA1\u6279","status.planReview":"\u8BA1\u5212\u5F85\u5BA1","status.waitingAnswer":"\u7B49\u5F85\u56DE\u7B54","status.completed":"\u5DF2\u5B8C\u6210","hover.created":"\u521B\u5EFA\u4E8E {time}","hover.copied":"\u5DF2\u590D\u5236","date.ymd":"{y}\u5E74{m}\u6708{d}\u65E5","time.now":"\u521A\u521A","time.minutes":"{n}\u5206\u949F","time.hours":"{n}\u5C0F\u65F6","time.days":"{n}\u5929","time.months":"{n}\u4E2A\u6708","time.years":"{n}\u5E74","time.ago":"{t}\u524D"},sr={...Ur,...Cr,...ls,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","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","archives.sortUpdated":"Last updated","archives.sortCreated":"Created","archives.sortAlphabetical":"Alphabetical","archives.projectFilter":"Filter by project","archives.allProjects":"All projects","archives.sessionCount":"{n} chats","archives.selectAllFiltered":"Select all results","archives.selectSession":"Select chat {name}","archives.restoreSelected":"Restore selected","archives.deleteSelected":"Delete selected","archives.timestamp":"{date}, {time}","archives.restoreProject":"Restore all chats in this project","archives.restoreUngrouped":"Restore all","archives.deleteProject":"Delete all chats in this project","archives.deleteUngrouped":"Delete all","archives.projectActions":"Archive actions for project {name}","archives.ungroupedActions":"Archive actions for ungrouped chats","archives.restoreSuccess":"Restored {n} archived chats.","archives.restoreBatchFailed":"Could not restore the archived chats: {detail}","archives.deleteSelectedTitle":"Delete selected archived chats","archives.deleteSelectedDesc":"This permanently deletes the selected {n} archived chats, their child agents (including any that are still running), and their records. Other chats are not affected. This cannot be undone.","archives.deleteSelectedConfirm":"Delete selected chats","archives.deleteProjectTitle":"Delete archived chats in {name}","archives.deleteProjectDesc":"This permanently deletes the {n} archived chats in {name}, their child agents, and their records. The project directory and unarchived chats are not affected. This cannot be undone.","archives.deleteProjectConfirm":"Delete all project chats","archives.deleteUngroupedTitle":"Delete ungrouped archived chats","archives.deleteUngroupedDesc":"This permanently deletes the {n} ungrouped archived chats, their child agents, and their records. Other projects and unarchived chats are not affected. This cannot be undone.","archives.deleteUngroupedConfirm":"Delete all ungrouped chats","archives.deleteBatchPending":"Deleting archived chats\u2026","archives.deleteSuccess":"Deleted {n} archived chats.","archives.deleteSuccessWithSkipped":"Deleted {deleted} archived chats and cleared {skipped} stale archive entries for sessions that no longer exist.","archives.deleteSkipped":"Cleared {n} stale archive entries for sessions that no longer exist.","archives.deletePartial":"Deleted {deleted} chats and cleared {skipped} stale archive entries; {failed} could not be deleted: {detail}","archives.unarchiveUnknown":"This session no longer exists, so it cannot be unarchived.","archives.unarchiveFailed":"Could not unarchive the session: {detail}","archives.archiveUnknown":"This session no longer exists, so it cannot be archived.","archives.archiveFailed":"Could not archive the session: {detail}","archives.archiveActive":"This conversation is still running ({kinds}).","archiveActive.title":"Stop and archive","archiveActive.desc":"\u201C{name}\u201D still has work in progress: {kinds}. Archiving stops that work first.","archiveActive.confirm":"Stop and archive","archiveActive.pending":"Stopping and archiving\u2026","archives.forkFailed":"Could not fork the session: {detail}","deleteSession.title":"Delete session","deleteSession.confirmTitle":"Delete session?","deleteSession.desc":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","deleteSession.pending":"Deleting session\u2026","deleteSession.unknown":"This session no longer exists or was already deleted.","deleteSession.failed":"Could not delete the session: {detail}","picker.loading":"Loading workspaces\u2026","conflict.named":"A workspace named \u201C{name}\u201D already exists.","folderError.title":"Couldn\u2019t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes \u201C{name}\u201D from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace\u2026","menu.fork":"Fork session","menu.archiveSession":"Archive session","menu.archiveWorkspace":"Archive all chats","archiveWorkspace.title":"Archive {n} chats?","archiveWorkspace.desc":"This archives the chats in \u201C{name}\u201D. You can find them later in Archived chats.","archiveWorkspace.confirm":"Archive all","archiveWorkspace.pending":"Archiving chats\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"},Ha={...Vr,...Ir,...cs,"locale.language":"ru","service.unavailable":"\u0421\u0435\u0440\u0432\u0438\u0441 \u0435\u0449\u0451 \u043D\u0435 \u0433\u043E\u0442\u043E\u0432. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.","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.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","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":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B","archiveWorkspace.title":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0447\u0430\u0442\u043E\u0432?","archiveWorkspace.desc":"\u042D\u0442\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0447\u0430\u0442\u044B \u0432 \xAB{name}\xBB. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435 \u0432 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u0430\u0445.","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 \u0447\u0430\u0442\u043E\u0432\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"},kt="archive-manager-workspace",rr="archiveManager.sidebar.directoryFlow",Pa=["slots","sessions","workspaces","locale","remote","typert"];function ns(e){return{getSnapshot:e.getSnapshot.bind(e),subscribe:e.subscribe.bind(e)}}t(ns,"bindObservable");function ar(e){return async s=>{if(typeof e?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await e.unarchiveSession(s)}}t(ar,"createUnarchiveSession");async function ss(e,s,a){let l=new Set(e.list?.getSnapshot?.()?.archivedSessionIds??[]),h=new Set;for(let g of s)if(!(typeof g!="string"||g.length===0||h.has(g))){h.add(g);try{await e.archiveSession(g)}catch(b){throw b!==null&&typeof b=="object"&&gn(b)!==void 0&&typeof Ce(b).sessionId!="string"&&Object.assign(b,{sessionId:g}),b}}typeof a=="function"&&await a();let p=[...e.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:p,archivedSessionIdsAdded:p.filter(g=>!l.has(g))}}t(ss,"archiveSessionsViaOfficial");async function ir(e,s,a,l){let h=new Set(e.list?.getSnapshot?.()?.archivedSessionIds??[]),p=new Set,g=typeof l=="function"?l:R=>e.unarchiveSession?.(R);for(let R of s)typeof R!="string"||R.length===0||p.has(R)||(p.add(R),await g(R));typeof a=="function"&&await a();let b=[...e.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:b,unarchivedSessionIds:[...h].filter(R=>!b.includes(R))}}t(ir,"unarchiveSessionsViaOfficial");async function za(e){Ba(e);let s=e.get("remote"),a=t(()=>{},"disposeRemote");return s!==void 0&&(a=await s.$mount(Nt)),async()=>{await a()}}t(za,"apply");function Ba(e){e.effect(()=>e.locale.register(kt,{zh:nr,en:sr,ru:Ha}),"dsh-archive-manager: dictionaries"),e.effect(()=>Br({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:We}),"dsh-archive-manager: plugin update ui");let s=t(()=>e.get("uiWorkspace"),"uiWorkspaceAt"),a={},l,h=t(f=>(l=jr(f,e.sessions,e.workspaces,{onOpened:t(()=>e.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:t(()=>e.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>l?.dispose()),"attachArchiveNavigation");typeof e.inject=="function"?e.inject(["uiWorkspace"],f=>h(f.uiWorkspace??s())):e.effect(()=>h(s()),"archive-manager: explicit archived navigation");let p=t(f=>{if(l===void 0)throw new Ft("navigationUnavailable");return es.request(f),l.open(f)},"openConversation"),g=t(async f=>{e.get("layout")?.beginNavigation?.(),es.request(f)},"focusSessionWorkspace"),b=t(async(f,w)=>{let F=await e.sessions.search(f,w);if(!F.ok)throw new Error(F.error.message);return F.value},"searchSessions"),A=t(f=>({getSnapshot:t(()=>e.slots.entries(f).length>0,"getSnapshot"),subscribe:t(w=>e.slots.subscribe(f,w),"subscribe")}),"flowSource")(rr),_=t(async()=>{if(typeof e.sessions.refresh!="function")return null;try{return await e.sessions.refresh(),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"),S=ar(e.workspaces),x=t(async(f,...w)=>{let F=e.get("remote.workspaceRegistry");if(!F||typeof F[f]!="function")throw new Error(e.locale.bind(kt)("service.unavailable"));let Ee=await F[f].apply(F,w);if(!Ee.ok)throw new Error(Ee.error.message);return Ee.value},"registryCall"),u=t(f=>x("sessionDetails",f),"sessionDetails"),fe=t(f=>x("diagnoseSession",f),"diagnoseSession"),Ne=t(f=>x("repairSession",f),"repairSession"),ce=t(f=>x("searchArchivedContent",f),"searchArchivedContent"),Be=t(f=>x("searchSessionContent",f),"searchSessionContent"),Fe=t(f=>x("previewArchivedSession",f),"previewArchivedSession"),de=t(()=>x("favoriteSessions"),"favoriteSessions"),P=t(f=>x("setSessionFavorite",f),"setSessionFavorite"),V=Lr({workspaces:e.workspaces.list,sessions:e.sessions.list,archive:t(f=>e.workspaces.archiveSession(f),"archive"),restore:t(async f=>{await S(f)},"restore"),deleteOne:t(async f=>{let w=e.get("remote.workspaceRegistry");if(!w)throw new Error(e.locale.bind(kt)("service.unavailable"));let F=await w.deleteSession(f);if(!F.ok)throw new Error(F.error.message)},"deleteOne"),getFavorites:de,refresh:t(()=>e.sessions.refresh?.(),"refresh"),currentSessionId:dt}),pe=t(async f=>{await S(f),await _()},"unarchiveSession"),ae=t(async f=>{let F=(e.workspaces.list?.getSnapshot?.()?.items??[]).find(re=>re.workspaceId===f);if(F===void 0)throw new Error(`unknown workspace "${f}"`);return ss(e.workspaces,F.sessionIds,_)},"archiveWorkspaceSessions"),Me=t(async f=>{let w=e.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let F=await w.deleteSession(f);if(!F.ok)throw new Error(F.error.message);await _()},"deleteSession"),I=t(async f=>ss(e.workspaces,f,_),"archiveSessions"),ie=t(async f=>{let w=e.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},F=fn(w.archivedSessionIds,w.items,f);return ir(e.workspaces,F,_,S)},"unarchiveSessions"),me=t(async f=>{let w=e.get("remote.workspaceRegistry");if(w===void 0)throw new Error("archive-manager remote service is unavailable");let F=await w.deleteArchivedSessions(f);if(!F.ok)throw new Error(F.error.message);let re=await _();return{...F.value,refreshError:re}},"deleteArchivedSessions"),Te=t(async()=>{let f=e.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);if(w.value.repairedSessionIds?.length>0&&typeof e.sessions.refresh=="function")try{await e.sessions.refresh()}catch(F){console.warn("archive-manager: repaired archived projections but session list refresh failed:",F)}return w.value},"archivedSessionMetadata"),$=t(()=>({startSession:t(f=>{let w=s();w!==void 0?w.startSession(f):e.workspaces.startSession(f)},"startSession"),open:t(f=>{let w=s();if(typeof w?.openSession!="function")throw new Error("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002");w.openSession(f)},"open"),searchSessions:b,searchResultLimit:e.sessions.searchResultLimit,renameSession:t(async(f,w)=>{let F=t(async Ee=>{let He=await Ee.rename(w);if(!He.ok)throw new Error(He.error.message)},"rename");if(typeof e.sessions.using=="function"){await e.sessions.using(f,{source:"workspaceOperation"},Ee=>F(Ee.binding.session));return}let re=e.sessions.binding(f)?.session;if(re===void 0)throw new Error(`unknown session "${f}"`);await F(re)},"renameSession"),forkSession:t(f=>{let w=s();return typeof w?.forkSession=="function"?w.forkSession(f):e.sessions.fork({sessionId:f,increaseTitle:!0}).then(F=>{if(typeof w?.openSession!="function")throw new Error("archive-manager: \u5BBF\u4E3B\u672A\u63D0\u4F9B\u4F1A\u8BDD\u6253\u5F00\u63A5\u53E3\u3002");w.openSession(F)})},"forkSession"),renameWorkspace:t(async(f,w)=>{await e.workspaces.rename(f,w)},"renameWorkspace"),deleteWorkspace:t(async f=>{await e.workspaces.delete(f)},"deleteWorkspace"),insertWorkspaceBefore:t(async(f,w)=>{await e.workspaces.insertBefore(f,w)},"insertWorkspaceBefore"),archiveSession:t(async(f,w)=>{await e.workspaces.archiveSession(f,w)},"archiveSession"),archiveWorkspaceSessions:ae,unarchiveSession:pe,deleteSession:Me,insertSessionBefore:t(async(f,w,F)=>{await e.workspaces.insertSessionBefore(f,w,F)},"insertSessionBefore"),createWorkspace:t(f=>e.workspaces.create(f),"createWorkspace"),hooks:{directoryFlow:A}}),"browserInjected"),ve="sidebar.workspaces.session.menu.item",ke=null,Ke=new Set,U=t(f=>{ke=f;for(let w of Ke)w()},"publishDeleteTarget");function ue(){return i.useSyncExternalStore(f=>(Ke.add(f),()=>{Ke.delete(f)}),()=>ke,()=>ke)}t(ue,"useDeleteRequest");function ne({sessionId:f,displayTitle:w,useMenuOpenState:F,t:re}){let[,Ee]=F(),He=c.MenuItemButton,Qe=(0,n.jsx)(c.IconTrashOutlineRegular,{size:14}),ye=t(()=>{Ee(!1),U({sessionId:f,title:w})},"onSelect");return typeof He=="function"?(0,n.jsx)(He,{danger:!0,icon:Qe,onSelect:ye,children:re("menu.deleteSession")}):(0,n.jsx)("button",{type:"button",role:"menuitem",onClick:ye,children:re("menu.deleteSession")})}t(ne,"DeleteSessionMenuItem");function X(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 c.focusWithoutRing=="function"?c.focusWithoutRing(w):w.focus(),!0):!1}catch{return!1}}t(X,"focusSessionRow");function Le({t:f}){let w=ue(),[F,re]=(0,i.useState)(!1),[Ee,He]=(0,i.useState)(null),[Qe,ye]=(0,i.useState)(null),Pe=(0,i.useRef)(null),k=(0,i.useRef)(null),J=(0,i.useRef)(null);if((0,i.useLayoutEffect)(()=>{if(w===null||typeof document>"u"){ye(null);return}let Y=null,Se=t(()=>{if(Y&&Y.isConnected)return Y;try{Y=document.querySelector(`[data-row-key="session:${CSS.escape(w.sessionId)}"]`)}catch{Y=null}return Y},"getTargetRow"),T=t(()=>{let we=Pe.current,$e=we?.offsetWidth||290,De=we?.offsetHeight||160,rt=8,wt=Se();if(!wt){let lt=window.innerWidth,Qt=window.innerHeight,ft=Math.max(16,(Qt-De)/2),ht=Math.max(16,(lt-$e)/2);ye(vt=>vt!==null&&vt.top===ft&&vt.left===ht?vt:{top:ft,left:ht});return}let xt=wt.getBoundingClientRect(),ut=xt.top-4;ut+De>window.innerHeight-16&&(ut=window.innerHeight-16-De),ut<16&&(ut=16);let et=xt.right+rt;et+$e>window.innerWidth-16&&(et=xt.left-$e-rt),et<16&&(et=16),ye(lt=>lt!==null&<.top===ut&<.left===et?lt:{top:ut,left:et})},"updatePosition");T(),window.addEventListener("scroll",T,!0),window.addEventListener("resize",T);let oe=null;return typeof ResizeObserver<"u"&&Pe.current&&(oe=new ResizeObserver(T),oe.observe(Pe.current)),()=>{oe?.disconnect(),window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}},[w]),(0,i.useEffect)(()=>{if(w===null)return;k.current&&!k.current.disabled?k.current.focus():Pe.current?.focus();let Y=w.sessionId;return()=>{if(!X(Y)){let T=document.querySelector('[role="treeitem"][aria-selected="true"]');T&&(T.hasAttribute("tabindex")||(T.setAttribute("tabindex","-1"),T.addEventListener("blur",()=>T.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(T):T.focus())}}},[w]),(0,i.useEffect)(()=>{w!==null&&F&&Pe.current?.focus()},[w,F]),(0,i.useEffect)(()=>{if(w===null)return;let Y=t(Se=>{if(Se.key==="Escape"){Se.preventDefault(),Se.stopPropagation(),"stopImmediatePropagation"in Se&&typeof Se.stopImmediatePropagation=="function"&&Se.stopImmediatePropagation(),F||(He(null),U(null));return}if(Se.key==="Tab"){if(Se.preventDefault(),F){Pe.current?.focus();return}let T=k.current,oe=J.current;if(!T||!oe)return;Se.shiftKey?document.activeElement===T?oe.focus():T.focus():document.activeElement===oe?T.focus():oe.focus()}},"onKey");return window.addEventListener("keydown",Y,!0),()=>window.removeEventListener("keydown",Y,!0)},[w,F]),w===null)return null;let be=t(()=>{F||(He(null),U(null))},"close"),Ve=t(()=>{re(!0),He(null),Me(w.sessionId).then(()=>{re(!1),U(null)}).catch(Y=>{re(!1),He(Tn(Y,f))})},"confirm");return(0,n.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,n.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:be}),(0,n.jsxs)("div",{ref:Pe,role:"dialog","aria-modal":!0,"aria-label":f("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:Qe?{top:Qe.top,left:Qe.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,n.jsx)("h3",{className:"dsham_sidebarCardTitle",children:f("deleteSession.confirmTitle")}),(0,n.jsx)("p",{className:"dsham_sidebarCardDesc",children:f("deleteSession.desc",{name:w.title})}),F&&(0,n.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:f("deleteSession.pending")}),Ee!==null&&(0,n.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:Ee}),(0,n.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,n.jsx)("button",{ref:k,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:F,onClick:be,children:f("cancel")}),(0,n.jsx)("button",{ref:J,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:F,onClick:Ve,children:f("deleteSession.title")})]})]})]})}t(Le,"DeleteSessionOverlay");function _e(){return typeof e.slots.entries!="function"?!1:e.slots.entries("sidebar.workspaces").some(f=>f.children?.[ve]!==void 0)}t(_e,"hostSidebarDeclaresSessionMenu");let ee,Ge,Oe,q=t(()=>{let f=_e()?"menu":"waiting";f!==ee&&(ee=f,f==="menu"&&(Ge??=e.slots.inject(ve,()=>e.slots.register({name:ve,id:"archive-manager.delete-session",order:500,locale:kt,inject:t(()=>({}),"inject")},ne)),Oe??=e.slots.inject("shell.overlay",()=>e.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:kt,inject:t(()=>({t:e.locale.bind(kt)}),"inject")},Le))))},"reconcileSidebar");q();let Re=typeof e.on=="function"?e.on("slots/changed",f=>{if(f==="sidebar.workspaces")try{q()}catch(w){console.warn("archive-manager: sidebar mode switch failed",w)}}):void 0;e.effect(()=>()=>{Re?.(),Ge?.(),Oe?.()},"archive-manager: sidebar mode"),e.slots.inject("settings.section",()=>e.slots.register({name:"settings.section",id:"archived-sessions",order:45,label:t(()=>e.locale.bind(kt)("archived.badge"),"label"),icon:"archive",locale:kt,inject:t(()=>({archiveSessions:I,archiveSession:t((f,w)=>e.workspaces.archiveSession(f,w),"archiveSession"),sessionStore:ns(e.sessions.list),workspaceStore:ns(e.workspaces.list),unarchiveSession:pe,deleteSession:Me,unarchiveSessions:ie,deleteArchivedSessions:me,archivedSessionMetadata:Te,openConversation:p,focusSessionWorkspace:g,viewState:a,favoriteSessions:de,setSessionFavorite:P,organizeBatch:V,diagnoseSession:fe,repairSession:Ne,sessionDetails:u,searchSessionContent:Be,searchArchivedContent:ce,previewArchivedSession:Fe,t:e.locale.bind(kt)}),"inject")},bs))}t(Ba,"applyWorkspaceBrowser");let Fa=t(()=>{if(typeof document>"u")return;let e=[["@michengai/dsh-archive-manager/Rows.module.css",la],["@michengai/dsh-archive-manager/WorkspacePicker.module.css",va],["@michengai/dsh-archive-manager/WorkspaceBrowser.module.css",ba]];for(let[s,a]of e){if(document.querySelector("style[data-plugin-css="+JSON.stringify(s)+"]")!==null)continue;let l=document.createElement("style");l.dataset.plugin="@michengai/dsh-archive-manager",l.dataset.pluginCss=s,l.textContent=a,document.head.appendChild(l)}},"ensureLegacyWorkspaceCss");async function rs(e,s,a,l){try{await s(e)}catch(h){a(sa(h,l))}}return t(rs,"forkWithFeedback"),d.__test={forkWithFeedback:rs,unarchivedSessionIds:Qs,ArchiveSelectionToolbar:Xs,ArchivedSessionsSection:bs,zh:nr,en:sr,displayTitle:Xe,sessionVisible:Zt,indexSubagentDescendants:En,isUnknownSessionError:Dn,deriveGroups:Ns,deriveFlat:Ms,deriveSearchResults:Os,deriveArchivedGroups:er,sortArchivedGroups:tr,deriveArchivedBatchIds:fn,archivedSessionIdsInGroups:Ys,pruneArchivedSelection:Js,toggleArchivedSelection:ts,archivedDeleteFeedback:Zs,archiveableWorkspaceSessionCount:$n,archiveWorkspaceDialogTarget:Cs,archiveWorkspaceDialogFailureState:Is,activeSessionActivity:gn,activeSessionRefusal:Ss,activeArchiveFromMessage:ks,archiveSessionsViaOfficial:ss,unarchiveSessionsViaOfficial:ir,createUnarchiveSession:ar,createWorkspaceViewStore:Qr,migrateWorkspaceViewPersist:ys,WORKSPACE_VIEW_PERSIST_KEY:jn,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:vs,bindObservable:ns,groupByWorkspace:Rs,byRecency:mn,ARCHIVE_MANAGER_REMOTE:Nt,currentSessionId:dt,ensureLegacyWorkspaceCss:Fa},d.apply=za,d.inject=Pa,o.exports}t(hi,"startArchiveClient");
|
|
32
|
+
`;function ba(){let n=document.getElementById(Vs);if(n!==null){n.textContent!==An&&(n.textContent=An);return}let r=document.createElement("style");r.id=Vs,r.textContent=An,(document.head??document.documentElement).append(r)}t(ba,"ensureStyle");function wa(n){if(n===null||typeof n!="object")return!1;let r=n;return typeof r.packageName=="string"&&typeof r.currentVersion=="string"&&typeof r.updateAvailable=="boolean"&&typeof r.profileName=="string"&&typeof r.canAutoUpdate=="boolean"&&typeof r.latestCheckFailed=="boolean"&&(r.latestVersion===void 0||typeof r.latestVersion=="string")}t(wa,"validPayload");async function Ks(n,r,o){let p=o===void 0?{}:{signal:o},a=await fetch(n,r==="GET"?{cache:"no-store",...p}:{method:"POST",headers:{"content-type":"application/json",[ya]:"1"},body:"{}",...p}),l=await a.json();if(!a.ok||!wa(l))throw new Error(l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:Ot(document.documentElement.lang).failed);return l}t(Ks,"requestStatus");function Sa(n){let r=j.useRef(null);return j.useLayoutEffect(()=>{r.current?.replaceChildren(n.node)},[n.node]),j.createElement("span",{ref:r,className:"mpi-icon","aria-hidden":!0})}t(Sa,"HostIcon");function ka(n){let r=j.useRef(null),[,o]=j.useState(0),[p,a]=j.useState("idle");j.useEffect(()=>n.flow.subscribe(()=>o(S=>S+1)),[n.flow]),j.useEffect(()=>{let S=document.documentElement,U=new MutationObserver(()=>o(y=>y+1));return U.observe(S,{attributes:!0,attributeFilter:["lang"]}),()=>U.disconnect()},[]),j.useEffect(()=>{n.flow.check()},[n.flow]),j.useEffect(()=>{function S(U){qs(U,n.onClose)}return t(S,"onKey"),document.addEventListener("keydown",S,!0),()=>document.removeEventListener("keydown",S,!0)},[n.onClose]);let l=document.documentElement.lang,c=n.flow.view(l),E=l.toLowerCase().startsWith("zh")?n.zhName:l.toLowerCase().startsWith("ru")?n.ruName:n.enName,x=Ws(c.profileRaw,n.packageName,c.latestRaw),T=p==="copied"?c.copy.copied:p==="failed"?c.copy.copyFailed:c.copy.copy;return j.createElement(yt.Modal,{open:!0,className:"mpi-dialog",title:`${E} ${c.copy.update}`,closeLabel:"Close",onClose:n.onClose,footer:[j.createElement(yt.Button,{key:"check",variant:"outline",disabled:c.busy,onClick:t(()=>{n.flow.check()},"onClick")},c.copy.recheck),j.createElement(yt.Button,{key:"update",variant:"primary",disabled:c.disabled,onClick:t(()=>{n.flow.update()},"onClick")},c.updateLabel)]},j.createElement("div",{ref:r},j.createElement("p",{className:"mpi-intro"},c.copy.intro),j.createElement("dl",{className:"mpi-meta"},j.createElement("dt",null,c.copy.current),j.createElement("dd",null,j.createElement("span",{className:"mpi-mono"},c.currentVersion)),j.createElement("dt",null,c.copy.latestLabel),j.createElement("dd",{className:"mpi-latest"},j.createElement("span",{className:"mpi-mono"},c.latestVersion),j.createElement("span",{className:"mpi-status",role:"status","data-kind":c.kind,...c.kind==="update"?{style:{color:"#e8b15a"}}:{}},c.message)),j.createElement("dt",null,c.copy.profile),j.createElement("dd",null,j.createElement("span",{className:"mpi-mono"},c.profileName))),c.busy?j.createElement("div",{className:"dssm-update-progress",role:"progressbar","aria-busy":"true"},j.createElement("div",{className:"dssm-update-progress-bar"})):null,j.createElement("section",{className:"mpi-manual"},j.createElement("h3",null,c.copy.manual),j.createElement("p",null,c.copy.manualHint),j.createElement("div",{className:"mpi-command"},j.createElement("code",null,x),j.createElement(yt.Button,{variant:"outline",size:"sm",disabled:c.busy,onClick:t(()=>{let S=navigator.clipboard?.writeText(x);if(S===void 0){a("failed");return}S.then(()=>{a("copied"),window.setTimeout(()=>a("idle"),1400)}).catch(()=>a("failed"))},"onClick")},T)))))}t(ka,"UpdateDialog");function $s(n){if(typeof document>"u"||document.body===null)return()=>{};ba();let r=new AbortController,o,p,a,l,c,E,x;function T(){a?.unmount(),a=void 0,p=void 0,l=void 0}t(T,"unmountCheck");function S(){if(a===void 0)return;l===void 0&&(l=n.createIcon("refresh"));let R=l;a.render(j.createElement(yt.Button,{variant:"outline",size:"sm",onClick:y,icon:j.createElement(Sa,{node:R})},j.createElement("span",{"data-mpi-label":""},Ot(document.documentElement.lang).check)))}t(S,"renderCheck");function U(){E?.unmount(),E=void 0,c?.remove(),c=void 0}t(U,"closeDialog");function y(){U();let R=document.createElement("div");R.className="mpi-dialog-root",document.body.append(R),c=R,E=Gs(R),E.render(j.createElement(ka,{flow:Hs(V=>Ks(n.endpoint,V,r.signal),o,V=>{o=V,I()}),packageName:n.packageName,zhName:n.zhName,enName:n.enName,ruName:n.ruName,onClose:U}))}t(y,"openDialog");function I(){let R=document.querySelector(n.titleRowSelector);if(R===null)return;let V=R.querySelector("h1,h2");if(V!==null&&o!==void 0){let Q=V.querySelector(`.mpi-version[data-package="${n.packageName}"]`);Q===null&&(Q=document.createElement("span"),Q.className="mpi-version",Q.dataset.package=n.packageName,V.append(Q));let ce=`v${o.currentVersion}`;Q.textContent!==ce&&(Q.textContent=ce)}p!==void 0&&!p.isConnected&&T();let q=R.querySelector(n.linksSelector);if(q===null)return;let H=q.querySelector(`[data-mpi-check="${n.packageName}"]`);if(H!==null){let Q=H.querySelector("[data-mpi-label]");(Q===null||Q.textContent!==Ot(document.documentElement.lang).check)&&S();return}let ue=document.createElement("span");ue.dataset.mpiCheck=n.packageName,ue.className="mpi-check-host",q.append(ue),p=ue,a=Gs(ue),S()}t(I,"applyControls");let P=new MutationObserver(()=>{x===void 0&&(x=window.requestAnimationFrame(()=>{x=void 0,I()}))});return P.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["lang"]}),I(),Ks(n.endpoint,"GET",r.signal).then(R=>{o=R,I()}).catch(()=>{}),()=>{r.abort(),P.disconnect(),U(),T(),x!==void 0&&window.cancelAnimationFrame(x),document.querySelectorAll(`[data-mpi-check="${n.packageName}"],.mpi-version[data-package="${n.packageName}"]`).forEach(R=>R.remove())}}t($s,"observePluginUpdate");function _n(n){if(typeof n!="string"||n.length===0||n.length>1024)throw new TypeError("\u4F1A\u8BDD ID \u957F\u5EA6\u987B\u4E3A 1\uFF5E1024 \u4E2A\u5B57\u7B26");return n}t(_n,"checkedId");var xa={parse(n){let r=Z(n);if(!r||typeof r!="object"||typeof r.favorite!="boolean")throw new TypeError("\u6536\u85CF\u72B6\u6001\u5FC5\u987B\u4E3A\u5E03\u5C14\u503C");return{sessionId:_n(r.sessionId),favorite:r.favorite}}},Ca={parse(n){let r=Z(n);if(!r||!Array.isArray(r.favoriteSessionIds)||r.favoriteSessionIds.length>1e5)throw new TypeError("\u6536\u85CF\u96C6\u5408\u65E0\u6548");return{favoriteSessionIds:[...new Set(r.favoriteSessionIds.map(_n))]}},safeParse(n){try{return{success:!0,data:this.parse(n)}}catch(r){return{success:!1,error:r}}}};function Ys(){let n=t((r,o)=>({mode:"strict",typeSymbol:`@michengai/dsh-archive-manager/types#${r}`,create:t(()=>o,"create"),schema:o}),"codec");return["favoriteSessions","setSessionFavorite"].map(r=>({id:`@michengai/dsh-archive-manager#workspaceRegistry/${r}`,service:"workspaceRegistry",namespace:"workspaceRegistry",method:r,invocation:{kind:"direct"},parameters:r==="favoriteSessions"?[]:[{name:"input",wire:"input",source:"json",codec:n("FavoriteInput",xa)}],result:n("FavoriteState",Ca),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}))}t(Ys,"favoriteInvocations");function Rn(n,{days:r,now:o=Date.now(),favorites:p=new Set,currentId:a,pending:l=new Map}){if(!n||!Number.isInteger(r)||r<1||r>36500||p.has(n.id)||n.id===a||(n.retainedBy?.mainView??0)>0||n.running||(n.runningSubagentCount??0)>0||n.pendingInteraction!=null||l.has(n.id))return!1;let c=typeof n.updatedAt=="number"?n.updatedAt:Date.parse(n.updatedAt??"");return Number.isFinite(c)&&c<=o-r*864e5}t(Rn,"idleArchiveCandidate");async function Ia(n,r,{onProgress:o,refresh:p}={}){let a=[...new Set(n.map(_n))],l={requested:a,succeeded:[],skipped:[],failures:[],unprocessed:[],remaining:[],refreshError:null},c=t(()=>o?.({total:a.length,done:l.succeeded.length+l.skipped.length+l.failures.length,succeeded:l.succeeded.length,skipped:l.skipped.length,failed:l.failures.length}),"report");c();for(let[E,x]of a.entries()){try{(await r(x)?l.succeeded:l.skipped).push(x)}catch(T){l.failures.push({sessionId:x,message:T instanceof Error?T.message:String(T)}),l.unprocessed=a.slice(E+1),l.remaining=a.slice(E),c();break}c()}try{await p?.()}catch(E){l.refreshError=E instanceof Error?E.message:String(E)}return l}t(Ia,"runSessionBatch");function Js({workspaces:n,sessions:r,archive:o,restore:p,deleteOne:a,getFavorites:l,refresh:c,currentSessionId:E}){return async(x,T,S={})=>{if(!["archive","restore","undo","delete"].includes(x))throw new TypeError("\u672A\u77E5\u6279\u91CF\u64CD\u4F5C");return Ia(T,async U=>{let I=n.getSnapshot().archivedSessionIds.includes(U);if(x==="archive"){if(I||!r.getSnapshot().byId[U])return!1;if(S.idleDays!==void 0){let H=new Set((await l()).favoriteSessionIds),ue=r.getSnapshot();if(!Rn(ue.byId[U],{days:S.idleDays,favorites:H,currentId:E(ue),pending:S.getPending?.()??S.pending}))return!1}return await o(U),n.getSnapshot().archivedSessionIds.includes(U)}return I?x==="delete"?(await a(U),!0):!((await p(U))?.archivedSessionIds??n.getSnapshot().archivedSessionIds).includes(U):!1},{onProgress:S.onProgress,refresh:c})}}t(Js,"createSessionOrganizer");function Zs(n,r){let o=n.createElement;function p(l,c){return o(r??(x=>o("button",{type:"button",disabled:x.disabled,onClick:x.onClick},x.children)),{variant:"outline",size:"sm",...c},l)}t(p,"textButton");function a({title:l,failures:c,separator:E}){let[x,T]=n.useState(!1),S=o("ul",null,c.map(U=>o("li",{key:U.sessionId},U.sessionId,E,U.message)));return o(Ct,{title:l,open:x,onToggle:t(()=>T(U=>!U),"onToggle")},S)}return t(a,"FailureDetails"),t(function({t:c,archived:E,busy:x,ready:T,days:S,onDays:U,count:y,onPreview:I,progress:P,result:R,onRetry:V,undoCount:q,onUndo:H,onReload:ue}){return o(n.Fragment,null,o("style",null,".dsham_organizer,.dsham_batchFeedback{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}.dsham_organizerControls{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.dsham_organizer label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--dsw-alias-label-primary)}.dsham_number{width:88px;height:32px;padding:0 10px;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.dsham_number:hover{border-color:var(--dsw-alias-border-l3)}.dsham_number:focus{outline:none;border-color:var(--dsw-alias-state-business-primary)}.dsham_disclosure{display:inline-flex;align-items:center;gap:6px;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer}.dsham_foldChevron{transition:transform 150ms ease}.dsham_foldChevron.is-open{transform:rotate(180deg)}.dsham_organizer p,.dsham_batchFeedback p{margin:0;font-size:12px;color:var(--dsw-alias-label-secondary)}.dsham_batchFeedback progress{width:100%}.dsham_batchFeedback details{font-size:12px;overflow-wrap:anywhere}.dsham_archivePreview{max-height:260px;overflow:auto;display:grid;gap:8px;padding:8px 0}.dsham_archivePreview label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere}"),(!E||!T)&&o("div",{className:"dsham_organizer"},o("div",{className:"dsham_organizerControls"},!T&&p(c("organizer.reloadFavorites"),{disabled:x,onClick:ue}),!E&&o(n.Fragment,null,o("label",null,c("organizer.idleDays"),o(ys,{min:1,max:36500,value:S===""?null:Number(S),disabled:x,"aria-label":c("organizer.idleDays"),onChange:t(Q=>U(Q==null?"":String(Q)),"onChange")})),p(c("organizer.preview",{n:y}),{disabled:x||!T||y===0,onClick:I}))),!E&&o("p",null,c("organizer.rules"))),(P||R||q>0)&&o("section",{className:"dsham_batchFeedback","aria-label":c("organizer.feedback")},P&&o("div",{role:"status","aria-live":"polite"},o("progress",{value:P.done,max:Math.max(1,P.total),"aria-label":c("organizer.progress")}),c("organizer.progressCount",{done:P.done,total:P.total})),R&&o("div",{role:"status"},o("strong",null,c(`organizer.${R.kind??"archive"}Result`)),o("p",null,c("organizer.result",{succeeded:R.succeeded.length,skipped:R.skipped.length,failed:R.failures.length,remaining:R.unprocessed.length})),R.failures.length>0&&o(a,{title:c("organizer.failureDetails"),failures:R.failures,separator:c("common.separator")}),R.refreshError&&o("p",{role:"alert"},c("organizer.refreshError",{detail:R.refreshError})),R.remaining.length>0&&p(c("organizer.retry",{n:R.remaining.length}),{disabled:x,onClick:V})),q>0&&o("div",{className:"dsham_organizerControls"},p(c("organizer.undo",{n:q}),{disabled:x,onClick:H}),o("p",null,c("organizer.undoHint")))))},"OrganizerPanel")}t(Zs,"createOrganizerPanel");var Qs={"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} \xB7 \u672A\u5904\u7406 {remaining}","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"},Xs={"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} \xB7 Unprocessed {remaining}","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."},er={"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} \xB7 \u041D\u0435 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E {remaining}","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."};var It=Function("return globalThis.__dshArchiveReactDOM")(),tr=Function("return globalThis.__dshArchiveReactDOMClient")(),nr=It.createPortal,Gi=It.flushSync,Vi=tr?.createRoot,Ki=tr?.hydrateRoot,$i=It.findDOMNode,Yi=It.unmountComponentAtNode,Ji=It.unstable_batchedUpdates,Zi=It.version;function Ea(n){var r={exports:{}},o=r.exports;Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});let p=n("@deepseek-ai/dsh-client-store"),a=n("react/jsx-runtime"),l=n("react"),c=n("@deepseek-ai/dsh-client-ui-primitives");function E({open:e,onClose:s,title:i,description:u,footer:g,children:m,className:b,width:A}){let C=l.useRef(null),_=l.useCallback(()=>C.current?.closest(".dsham_settings")??document.body,[]),[M,D]=l.useState(null);l.useEffect(()=>{if(!e){D(null);return}D(_())},[e,_]),l.useEffect(()=>{if(!e)return;let h=t(Re=>{Re.key==="Escape"&&(Re.preventDefault(),Re.stopPropagation(),"stopImmediatePropagation"in Re&&typeof Re.stopImmediatePropagation=="function"&&Re.stopImmediatePropagation(),s())},"onKey");return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[e,s]);let O=(0,a.jsxs)("div",{className:"dsham_modalRoot",role:"presentation",children:[(0,a.jsx)("div",{className:"dsham_modalMask",onClick:s}),(0,a.jsxs)("div",{role:"dialog","aria-modal":!0,"aria-label":typeof i=="string"?i:void 0,className:cr("dsham_modalDialog",b),style:{width:A??560},children:[(0,a.jsx)("h2",{children:i}),u!=null&&(0,a.jsx)("p",{children:u}),m,g!=null&&(0,a.jsx)("div",{className:"dsham_modalFooter",children:g})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x,{refObject:C,getContainer:_}),e&&M?nr(O,M):null]})}t(E,"SettingsModal");function x({refObject:e,getContainer:s}){return(0,a.jsx)("span",{hidden:!0,ref:e,"data-get-container":s})}t(x,"SettingsModalAnchor");function T({variant:e="outline",icon:s,children:i,className:u,disabled:g,title:m,onClick:b,"aria-label":A,"aria-pressed":C,"aria-expanded":_,"aria-haspopup":M}){return(0,a.jsx)(c.Button,{variant:e,size:"sm",className:u,disabled:g,title:m,onClick:b,"aria-label":A,"aria-pressed":C,"aria-expanded":_,"aria-haspopup":M,icon:s,children:i})}t(T,"settingsButton");function S({variant:e="outline",danger:s=!1,disabled:i,onClick:u,children:g}){return(0,a.jsx)(c.Button,{variant:s?"outline":e,className:s?"dsham_btnDanger":void 0,disabled:i,onClick:u,children:g})}t(S,"modalFooterButton");function U(e,s){let i={className:e?"dsham_archiveTabsLocked":void 0,children:s};return e&&(i.inert=""),i}t(U,"tabsShell");let y=Zs(l,c.Button),{HighlightedText:I,useSessionDetails:P,useArchiveSearch:R,useArchivePreview:V,DiscoveryFilters:q,SearchStatus:H,PreviewContent:ue}=js(l,{Button:c.Button,SegmentedControl:c.SegmentedControl}),Q=Ns(l,{warning:c.IconWarningOutlineMedium,info:c.IconInfoOutlineMedium,check:c.IconCheckOutlineMedium,refresh:c.IconRefreshOutlineMedium,search:c.IconSearchOutlineMedium,chevron:c.IconChevronDownOutlineMedium},c.Button),ce={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 fe(e){let s=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 16 16"),i.setAttribute("width","16"),i.setAttribute("height","16"),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","1.5"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-linejoin","round"),i.setAttribute("aria-hidden","true");for(let u of ce[e]){let g=document.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d",u),i.append(g)}return s.append(i),s}t(fe,"createPluginUpdateIcon");let F={parse(e){if(typeof e!="string"||e.length===0)throw new TypeError(`sessionId must be a non-empty string, got ${String(e)}`);return e}},X={parse(e){let s=Z(e);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");let i=s.archivedSessionIds;if(!Array.isArray(i)||i.some(u=>typeof u!="string"))throw new TypeError("archivedSessionIds must be a string array");return s}},ze={parse(e){let s=Z(e);if(typeof s!="object"||s===null||Array.isArray(s)||s.deleted!==!0)throw new TypeError("deleted must be true");return s}},Y={parse(e){let s=Z(e);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("target must be an object");if(s.scope==="all"||s.scope==="ungrouped"||s.scope==="workspace"&&typeof s.workspaceId=="string"&&s.workspaceId.length>0||s.scope==="sessions"&&Array.isArray(s.sessionIds)&&s.sessionIds.length>0&&s.sessionIds.every(i=>typeof i=="string"&&i.length>0))return s;throw new TypeError("target.scope must be all, ungrouped, workspace with a non-empty workspaceId, or sessions with non-empty sessionIds")}},Ae={parse(e){let s=Z(e);if(typeof s!="object"||s===null||Array.isArray(s))throw new TypeError("result must be an object");for(let i of["requestedSessionIds","deletedSessionIds","skippedSessionIds"])if(!Array.isArray(s[i])||s[i].some(u=>typeof u!="string"))throw new TypeError(`${i} must be a string array`);if(!Array.isArray(s.failures)||s.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 s}},at={parse(e){let s=Z(e);if(typeof s!="object"||s===null||Array.isArray(s)||!Array.isArray(s.items))throw new TypeError("result.items must be an array");if(s.items.some(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");if(s.repairedSessionIds!==void 0&&(!Array.isArray(s.repairedSessionIds)||s.repairedSessionIds.some(i=>typeof i!="string")))throw new TypeError("repairedSessionIds must be a string array");return s}};function Se(e,s){return{mode:"strict",typeSymbol:e,create:t(()=>s,"create"),schema:s}}t(Se,"strictCodec");let it={package:"@michengai/dsh-archive-manager",descriptors:[...Ys(),...Is(),{id:"@michengai/dsh-archive-manager#workspaceRegistry/unarchiveSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"unarchiveSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Se("@deepseek-ai/dsh-session/types#SessionId",F)}],result:Se("@michengai/dsh-archive-manager/types#ArchivedSessionIds",X),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteSession",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteSession",invocation:{kind:"direct"},parameters:[{name:"sessionId",wire:"sessionId",source:"json",codec:Se("@deepseek-ai/dsh-session/types#SessionId",F)}],result:Se("@michengai/dsh-archive-manager/types#Deleted",ze),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/deleteArchivedSessions",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"deleteArchivedSessions",invocation:{kind:"direct"},parameters:[{name:"target",wire:"target",source:"json",codec:Se("@michengai/dsh-archive-manager/types#ArchivedBatchTarget",Y)}],result:Se("@michengai/dsh-archive-manager/types#DeletedBatch",Ae),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}},{id:"@michengai/dsh-archive-manager#workspaceRegistry/archivedSessionMetadata",service:"workspaceRegistry",namespace:"workspaceRegistry",method:"archivedSessionMetadata",invocation:{kind:"direct"},parameters:[],result:Se("@michengai/dsh-archive-manager/types#ArchivedSessionMetadata",at),sourceLocation:{file:"@michengai/dsh-archive-manager/lib/workspace.js",line:1,column:1}}]},mt=".dsham_btnDanger:not(:disabled){color:var(--dsw-alias-state-error-primary,#ef7272);border-color:var(--dsw-alias-state-error-primary,#ef7272)}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/DangerButton.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/DangerButton.css",e.textContent=mt,document.head.appendChild(e)}let sr=".dsham_iconAction{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:22px!important;min-width:22px!important;height:22px!important;padding:0!important;border:0.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm,8px)!important;background:transparent;color:var(--dsw-alias-label-secondary)}.dsham_iconAction:not(:disabled):hover{color:var(--dsw-alias-link,#4176e6)!important;border-color:var(--dsw-alias-link,#4176e6)!important}.dsham_iconAction.dsham_iconDanger{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction.dsham_iconDanger:not(:disabled):hover{color:var(--dsw-alias-state-error-primary,#ef7272)!important;border-color:var(--dsw-alias-state-error-primary,#ef7272)!important}.dsham_iconAction svg{width:16px!important;height:16px!important;flex:none!important}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/IconAction.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/IconAction.css",e.textContent=sr,document.head.appendChild(e)}let rr=".dsham_modalRoot{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.dsham_modalMask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1,rgb(0 0 0 / 45%))}.dsham_modalDialog{position:relative;display:flex;flex-direction:column;gap:12px;max-width:calc(100vw - 48px);max-height:min(80vh,720px);padding:22px 24px 20px;overflow:auto;border:0;border-radius:var(--dsw-radius-panel,28px);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 16px 40px rgb(0 0 0 / 24%))}.dsham_modalDialog h2{margin:0;font-size:16px;line-height:24px}.dsham_modalDialog>p{margin:0;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}.dsham_modalFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/Modal.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/Modal.css",e.textContent=rr,document.head.appendChild(e)}let ar=".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)}.dsham_sidebarCardFooter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.dsham_sidebarCardBtn{border:none;background:transparent;padding:5px 12px;border-radius:var(--dsw-radius-sm,6px);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:background-color .15s ease,opacity .15s ease}.dsham_sidebarCardBtnCancel{color:var(--dsw-alias-label-primary)}.dsham_sidebarCardBtnCancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dsham_sidebarCardBtnDanger{color:var(--dsw-alias-state-error-primary,#ef7272)}.dsham_sidebarCardBtnDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,#f25a5a26)}.dsham_sidebarCardBtn:disabled{opacity:.4;cursor:default}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/SidebarPopover.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/SidebarPopover.css",e.textContent=ar,document.head.appendChild(e)}function Lt(e){let s=new Map;for(let i of Object.values(e)){if(i.origin!=="subagent")continue;let u=new Set,g=i;for(;g?.origin==="subagent"&&g.parentId!==void 0&&!u.has(g.id);){u.add(g.id);let m=s.get(g.parentId);m===void 0?s.set(g.parentId,{count:1,runningCount:i.running?1:0}):(m.count+=1,i.running&&(m.runningCount+=1)),g=e[g.parentId]}}return s}t(Lt,"indexSubagentDescendants");let _a="__flat_session_order__",Ft="dsh.archive-manager.workspace.view.v1",Tn="dsh.workspace.view.v5";function Nn(e){let s=e??globalThis.localStorage;if(s==null||typeof s.getItem!="function"||typeof s.setItem!="function")return!1;try{if(s.getItem(Ft)!=null)return!1;let i=s.getItem(Tn);return i==null?!1:(s.setItem(Ft,i),!0)}catch{return!1}}t(Nn,"migrateWorkspaceViewPersist");function ir(){return Nn(),(0,p.defineStore)({init:t(()=>({groupBy:"workspace",orderBy:"updated",showArchived:!1,groupExpansion:{},sessionOrderByAccount:{},sessionUpdatedAtByAccount:{}}),"init"),persist:Ft,actions:{setGroupBy:t((e,s)=>{e.groupBy=s},"setGroupBy"),setOrderBy:t((e,s)=>{e.orderBy=s},"setOrderBy"),setShowArchived:t((e,s)=>{e.showArchived=s===!0},"setShowArchived"),setGroupExpanded:t((e,s,i)=>{e.groupExpansion[s]=i},"setGroupExpanded"),retainAccountKeys:t((e,s)=>{let i=new Set(s);e.groupExpansion=Object.fromEntries(Object.entries(e.groupExpansion).filter(([u])=>i.has(u))),e.sessionOrderByAccount=Object.fromEntries(Object.entries(e.sessionOrderByAccount).filter(([u])=>i.has(u))),e.sessionUpdatedAtByAccount=Object.fromEntries(Object.entries(e.sessionUpdatedAtByAccount).filter(([u])=>i.has(u)))},"retainAccountKeys"),syncSessionOrderAccount:t((e,s,i,u)=>{e.sessionOrderByAccount[s]=i,e.sessionUpdatedAtByAccount[s]=u},"syncSessionOrderAccount"),setSessionOrder:t((e,s,i)=>{e.sessionOrderByAccount[s]=i},"setSessionOrder")}})}t(ir,"createWorkspaceViewStore");function or(){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,"aria-hidden":!0,focusable:"false",children:(0,a.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-2.53 15.59c.4.074.547-.173.547-.385 0-.19-.007-.693-.01-1.36-2.226.484-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.726-.496.055-.486.055-.486.803.056 1.225.824 1.225.824.714 1.223 1.872.87 2.328.665.072-.517.28-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.956 0-.874.31-1.588.823-2.148-.083-.202-.357-1.017.078-2.12 0 0 .672-.215 2.2.82A7.65 7.65 0 0 1 8 4.8c.68.003 1.365.092 2.004.27 1.527-1.035 2.197-.82 2.197-.82.437 1.103.162 1.918.08 2.12.513.56.822 1.274.822 2.148 0 3.076-1.872 3.752-3.654 3.95.288.248.544.735.544 1.482 0 1.07-.01 1.932-.01 2.195 0 .214.144.463.55.384A8.001 8.001 0 0 0 8 0Z"})})}t(or,"GithubMark16");function lr(){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:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M9.5 2.5 13.5 6.5 6 14H2v-4z"})})}t(lr,"FeedbackIcon");function jn({archiveSessions:e,archiveSession:s,sessionStore:i,workspaceStore:u,unarchiveSession:g,deleteSession:m,unarchiveSessions:b,deleteArchivedSessions:A,archivedSessionMetadata:C,openConversation:_,focusSessionWorkspace:M,viewState:D,close:O,t:h,diagnoseSession:Re,repairSession:gt,sessionDetails:Le,searchSessionContent:ft,searchArchivedContent:wt,previewArchivedSession:vt,favoriteSessions:G,setSessionFavorite:oe,organizeBatch:Fe,useSessionPendingInteraction:cn,useSessionStatus:qt}){let Be=(0,l.useSyncExternalStore)(i.subscribe,i.getSnapshot),we=(0,l.useSyncExternalStore)(u.subscribe,u.getSnapshot),[We,ot]=(0,l.useState)("archived"),se=We==="archived",[Qe,qe]=(0,l.useState)(null),[_t,$e]=(0,l.useState)(null),[Ue,Xe]=(0,l.useState)(null),lt=t((d,w=null)=>{K(null),xe(null),Vt(!1),$e(w),qe(d)},"requestArchive"),Gt=t(()=>{L||(qe(null),$e(null),K(null))},"closeArchive"),Ye=(0,l.useRef)(!1),[ie,ct]=(0,l.useState)(null),Rt=(0,l.useRef)(!1),[L,ke]=(0,l.useState)(!1),[Ge,K]=(0,l.useState)(null),[Tt,xe]=(0,l.useState)(null),f=t(d=>{K(null),xe(null),ct(d)},"requestDelete"),[v,N]=(0,l.useState)(D?.query??""),[le,ve]=(0,l.useState)(D?.project??"all"),[he,Ce]=(0,l.useState)(D?.sortBy??"updated"),[ye,te]=(0,l.useState)({}),[re,Te]=(0,l.useState)(()=>new Set),pe=(0,l.useRef)(new Set),[Ne,W]=(0,l.useState)([]),[J,B]=(0,l.useState)([]),[ne,je]=(0,l.useState)(!1),[de,me]=(0,l.useState)(!1),De=(0,l.useRef)(!1),[Ve,Pe]=(0,l.useState)(!1),[be,ae]=l.useState("title"),[ge,St]=l.useState(""),[et,dt]=l.useState(""),[Me,Ur]=(0,l.useState)(()=>new Set),[dn,Hr]=(0,l.useState)("30"),[ns,Vt]=(0,l.useState)(!1),[He,un]=(0,l.useState)(null),[ss,Kt]=(0,l.useState)(null),[hn,$t]=(0,l.useState)([]),kt=(0,l.useRef)(!1),pn=(0,l.useRef)(null),mn=kr(cn??br,qt??wr,typeof qt=="function"),rs=(0,l.useRef)(mn.pending);rs.current=mn.pending;let ut=(0,l.useMemo)(()=>new Set(J),[J]),Wr=t(async()=>{if(G)try{let d=await G();B(d.favoriteSessionIds),je(!0)}catch(d){je(!1),K(Ee(d))}},"loadFavorites");(0,l.useEffect)(()=>{let d=!0;return G&&G().then(w=>{d&&(B(w.favoriteSessionIds),je(!0))}).catch(w=>{d&&K(Ee(w))}),()=>{d=!1}},[G]);let qr=t(async d=>{if(!(De.current||L||!ne)){De.current=!0,me(!0),K(null);try{let w=await oe({sessionId:d,favorite:!ut.has(d)});B(w.favoriteSessionIds)}catch(w){K(Ee(w))}finally{De.current=!1,me(!1)}}},"toggleFavorite"),Yt=t(async(d,w,{idle:z=!1,retry:$=!1}={})=>{if(!(kt.current||De.current||pe.current.size>0||!Fe)){kt.current=!0,ke(!0),K(null),xe(null),Kt(null),d==="archive"&&!$&&$t([]);try{let k=await Fe(d,w,{idleDays:z?Number(dn):void 0,getPending:t(()=>rs.current,"getPending"),onProgress:t(ee=>{un(ee),d==="archive"&&ee.total>0&&ee.done>=ee.total&&(qe(null),$e(null),Vt(!1))},"onProgress")});return Kt({...k,kind:d,tab:We}),pn.current=k.remaining.length?{kind:d,ids:k.remaining,idle:z}:null,d==="archive"&&$t(ee=>[...new Set([...ee,...k.succeeded])]),(d==="undo"||d==="restore"||d==="delete")&&$t(ee=>ee.filter(_e=>!k.succeeded.includes(_e)&&!k.skipped.includes(_e))),W(ee=>ee.filter(_e=>!k.succeeded.includes(_e)&&!k.skipped.includes(_e))),d==="delete"&&B(ee=>ee.filter(_e=>!k.succeeded.includes(_e))),k}catch(k){K(Ee(k))}finally{kt.current=!1,ke(!1),un(null)}}},"executeBatch"),ht=(0,l.useRef)(!0),gn=(0,l.useRef)(!1);(0,l.useEffect)(()=>(ht.current=!0,()=>{ht.current=!1}),[]);let Jt=t(async(d,w=!1)=>{if(L||gn.current)return;gn.current=!0,ke(!0),K(null);let z=!1;try{await Ls({prepare:w?async $=>{await M?.($)}:void 0,restore:t(async $=>{await g($),z=!0},"restore"),open:t(async $=>{await _($),ht.current&&O?.()},"open")},d.id,w,()=>ht.current)}catch($){if(!ht.current)return;if(z){ot("unarchived");let k=tt.find(ee=>ee.sessions.some(_e=>_e.id===d.id));k!==void 0&&ve(k.key)}K(Os($,h))}finally{gn.current=!1,ht.current&&ke(!1)}},"viewConversation");(0,l.useEffect)(()=>{D&&Object.assign(D,{query:v,project:le,sortBy:he})},[v,le,he,D]);let Nt=(0,l.useMemo)(()=>se?we.archivedSessionIds:Yn(Be.byId,we.archivedSessionIds),[se,Be.byId,we.archivedSessionIds]),as=As(Nt,Be.byId),is=(0,l.useRef)(as);L||(is.current=as);let tt=(0,l.useMemo)(()=>Jn(Be.byId,we.items,Nt,h("group.ungrouped")),[Be.byId,we,Nt,h]),Gr=t(d=>{L||pe.current.size>0||(Ke.close(),ot(d),W([]),qe(null),$e(null),K(null),xe(null),ve("all"),N(""))},"switchTab"),os=t(async(d,w=!1)=>{if(!(Ye.current||L||!d?.length)){if(Fe){Ye.current=!0;try{let z=await Yt("archive",d,{idle:w}),$=z?.failures.map(k=>Mn(k.sessionId,k.message)).find(k=>k!==void 0);if($!==void 0&&typeof s=="function"){let k=Be.byId[$.sessionId];Xe({sessionId:$.sessionId,title:k===void 0?$.sessionId:Ie(k,h),kinds:$.kinds.join(", ")}),qe(null),$e(null),K(null);return}z&&(qe(null),$e(null),Vt(!1))}finally{Ye.current=!1}return}Ye.current=!0,ke(!0),K(null),xe(null);try{let z=await e(d);W([]),ot("archived"),ve("all"),N(""),xe(h("archives.archiveSuccess",{n:z.archivedSessionIdsAdded.length})),qe(null),$e(null)}catch(z){let $=Pn(z);if($!==void 0&&typeof s=="function"){let k=Be.byId[$.sessionId];Xe({sessionId:$.sessionId,title:k===void 0?$.sessionId:Ie(k,h),kinds:$.kinds.join(", ")}),qe(null),$e(null),K(null)}else{let k=Ut(z);K(k===void 0?h("archives.archiveBatchFailed",{detail:z instanceof Error?z.message:String(z)}):h("archives.archiveActive",{kinds:k.join(", ")}))}}finally{Ye.current=!1,ke(!1)}}},"performArchive"),Vr=t(()=>os(Qe,ns),"confirmArchive"),Je=P(is.current,Le,h,L),ls=t(async(d,w)=>{K(null),xe(null);try{let z=d.id;if(w==="path"){let $=Je.byId[d.id];if($||($=(await Le({sessionIds:[d.id]})).items[0]),!$?.path)throw new Error(h("details.noPath"));z=$.path}await Cs(z),ht.current&&xe(h("details.copied"))}catch(z){ht.current&&K(typeof xt(z)=="string"&&String(xt(z)).startsWith("copy.")?h(String(xt(z))):Ee(z))}},"copyDetail"),cs=(0,l.useMemo)(()=>Zn(tt,he,ye,h,Je.byId),[tt,he,ye,h,Je.byId]);(0,l.useEffect)(()=>{if(L)return;let d=!1;return C().then(w=>{d||te(Object.fromEntries(w.items.map(z=>[z.sessionId,z.createdAt])))}).catch(()=>{d||te({})}),()=>{d=!0}},[C,we.archivedSessionIds,L]),(0,l.useEffect)(()=>{le!=="all"&&!tt.some(d=>d.key===le)&&ve("all")},[tt,le]);let ds=!En(ge,et),us=cs.filter(d=>le==="all"||le===d.key).map(d=>({...d,sessions:d.sessions.filter(w=>(!Ve||ut.has(w.id))&&_s(w.updatedAt,ge,et))})).filter(d=>d.sessions.length),fn=be==="content"&&!ds,jt=R(us.flatMap(d=>d.sessions.map(w=>w.id)),v,fn,ft??wt),vn=new Map(jt.items.map(d=>[d.sessionId,d])),Ke=V(vt,se?we.archivedSessionIds:[]),hs=v.trim().toLocaleLowerCase(),Dt=us.map(d=>({...d,sessions:d.sessions.filter(w=>!hs||Ie(w,h).toLocaleLowerCase().includes(hs)||vn.has(w.id))})).filter(d=>d.sessions.length),ps=ne?Dt.flatMap(d=>d.sessions).filter(d=>Rn(d,{days:Number(dn),favorites:ut,currentId:Ze(Be),pending:mn.pending})).map(d=>d.id):[],Pt=(0,l.useMemo)(()=>Vn(Dt),[Dt]),yn=(0,l.useMemo)(()=>new Set(Ne),[Ne]),Kr=(0,l.useMemo)(()=>{let d=new Set(we.archivedSessionIds);return hn.reduce((w,z)=>w+(d.has(z)?1:0),0)},[hn,we.archivedSessionIds]),bn=Pt.filter(d=>yn.has(d)).length,$r=Pt.length>0&&bn===Pt.length;(0,l.useEffect)(()=>{W(d=>Kn(d,Nt))},[Nt]);let Yr=t((d,w)=>{W(z=>an(z,[d],w))},"toggleSessionSelection"),Jr=t(d=>{W(w=>an(w,Pt,d))},"toggleVisibleSelection"),Zr=t(d=>{L||pe.current.has(d)||(pe.current.add(d),Te(new Set(pe.current)),K(null),xe(null),g(d).catch(w=>{K(ur(w,h))}).finally(()=>{pe.current.delete(d),Te(new Set(pe.current))}))},"onUnarchive"),ms=t(async d=>{if(!L){if(Fe){let w=At(we.archivedSessionIds,we.items,d),z=await Yt("restore",w);return z&&{unarchivedSessionIds:z.succeeded}}ke(!0),K(null),xe(null);try{let w=await b(d);return xe(h("archives.restoreSuccess",{n:w.unarchivedSessionIds.length})),w}catch(w){K(h("archives.restoreBatchFailed",{detail:w instanceof Error?w.message:String(w)}))}finally{ke(!1)}}},"onBatchUnarchive"),Qr=t(async()=>{if(Ne.length===0)return;let d=await ms({scope:"sessions",sessionIds:Ne});if(d!==void 0){let w=new Set(d.unarchivedSessionIds);W(z=>z.filter($=>!w.has($)))}},"onSelectedUnarchive"),gs=t(()=>{L||ct(null)},"closeDelete");(0,l.useEffect)(()=>{if(ie===null)return;let d=t(w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),"stopImmediatePropagation"in w&&typeof w.stopImmediatePropagation=="function"&&w.stopImmediatePropagation(),L||ct(null))},"onKeyDown");return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[ie,L]);let Xr=t(async()=>{if(L||Rt.current||ie===null)return;if(ie.kind!=="batch"){Rt.current=!0,ke(!0),K(null),xe(null);try{await m(ie.session.id),ct(null)}catch(w){K(en(w,h))}finally{Rt.current=!1,ke(!1)}return}if(kt.current||De.current||pe.current.size>0)return;let{target:d}=ie;if(d.scope==="sessions"&&At(we.archivedSessionIds,we.items,d).length===0){ct(null);return}kt.current=!0,ke(!0),K(null),xe(null),Kt(null),un(null);try{let w=await A(d),z=$n(w,h);z.kind==="error"?K(z.message):xe(z.message);let $=new Set([...w.deletedSessionIds,...w.skippedSessionIds]);$t(ee=>ee.filter(_e=>!$.has(_e))),W(ee=>ee.filter(_e=>!$.has(_e))),B(ee=>ee.filter(_e=>!$.has(_e)));let k=w.failures.map(ee=>ee.sessionId);pn.current=k.length>0?{kind:"delete",ids:k,idle:!1}:null,Kt({requested:w.requestedSessionIds,succeeded:w.deletedSessionIds,skipped:w.skippedSessionIds,failures:w.failures,unprocessed:[],remaining:k,refreshError:"refreshError"in w&&typeof w.refreshError=="string"?w.refreshError:null,kind:"delete",tab:We}),ct(null)}catch(w){K(en(w,h))}finally{kt.current=!1,ke(!1)}},"confirmDelete"),nt=ie?.kind==="batch"?ie.target.scope:null,ea=nt==="ungrouped"?h("archives.deleteUngroupedTitle"):nt==="workspace"?h("archives.deleteProjectTitle",{name:ie?.kind==="batch"?ie.title:""}):h(nt==="sessions"?"archives.deleteSelectedTitle":"deleteSession.title"),fs=ie===null?void 0:nt==="ungrouped"?h("archives.deleteUngroupedDesc",{n:ie.kind==="batch"?ie.count:0}):nt==="workspace"?h("archives.deleteProjectDesc",{name:ie?.kind==="batch"?ie.title:"",n:ie.kind==="batch"?ie.count:0}):nt==="sessions"?h("archives.deleteSelectedDesc",{n:ie.kind==="batch"?ie.count:0}):h("deleteSession.desc",{name:Ie(ie.kind==="session"?ie.session:{},h)}),ta=h(nt==="ungrouped"?"archives.deleteUngroupedConfirm":nt==="workspace"?"archives.deleteProjectConfirm":nt==="sessions"?"archives.deleteSelectedConfirm":"deleteSession.title");return(0,a.jsxs)("section",{className:"dsham_settings","aria-label":h("archives.title"),children:[(0,a.jsx)("style",{children:Ar+_r+Rr+Tr+Nr}),(0,a.jsxs)("div",{className:"dsham_settingsHeader",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"dsham_settingsTitleRow",children:[(0,a.jsx)("h2",{children:h("archives.title")}),(0,a.jsxs)("div",{className:"dsham_settingsLinks",children:[(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.viewProject"),icon:(0,a.jsx)(or,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager","_blank","noreferrer"),"onClick"),children:h("archives.viewProject")}),(0,a.jsx)(c.Button,{variant:"outline",size:"sm","aria-label":h("archives.feedback"),icon:(0,a.jsx)(lr,{}),onClick:t(()=>window.open("https://github.com/MichengAI/dsh-archive-manager/issues","_blank","noreferrer"),"onClick"),children:h("archives.feedback")})]})]}),(0,a.jsx)("p",{className:"dsham_settingsIntro",children:h("archives.description")})]}),l.createElement("div",U(L||re.size>0,(0,a.jsx)(c.SegmentedTabs,{className:"dsham_archiveTabs",label:h("archives.title"),value:We==="unarchived"?"unarchived":"archived",onChange:t(d=>Gr(d==="unarchived"?"unarchived":"archived"),"onChange"),items:[{value:"archived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconArchiveOutlineMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.archived")})]}),id:"dsham-tab-archived",panelId:"dsham-archive-panel"},{value:"unarchived",label:(0,a.jsxs)("span",{className:"dsham_tabLabel",children:[(0,a.jsx)(c.IconFolderCloseMedium,{size:14}),(0,a.jsx)("span",{children:h("archives.tab.unarchived")})]}),id:"dsham-tab-unarchived",panelId:"dsham-archive-panel"}]})))]}),(0,a.jsxs)("div",{id:"dsham-archive-panel",role:"region","aria-label":h(We==="unarchived"?"archives.tab.unarchived":"archives.tab.archived"),children:[(0,a.jsxs)("div",{className:"dsham_settingsToolbar",children:[(0,a.jsxs)("div",{className:"dsham_settingsSearch",children:[typeof oe=="function"&&(0,a.jsx)(Ht,{id:"dsham-favorite-filter",className:"dsham_favoriteFilter",value:Ve?"favorites":"all",disabled:L||de||!ne,options:[{value:"all",label:h("organizer.allSessions")},{value:"favorites",label:h("organizer.favoritesOnly")}],onChange:t(d=>Pe(d==="favorites"),"onChange"),"aria-label":h("organizer.favoriteFilter")}),l.createElement(Ht,{id:"dsham-search-scope",className:"dsham_scopeFilter",value:be,"aria-label":h("discovery.scope"),disabled:L||re.size>0,onChange:ae,options:[{value:"title",label:h("discovery.titleOnly")},{value:"content",label:h("discovery.titleAndContent")}]}),(0,a.jsx)(c.Input,{className:"dsham_searchField",type:"search",maxLength:200,value:v,onChange:t(d=>N(d.target.value),"onChange"),placeholder:h(fn?"discovery.searchPlaceholder":se?"archives.searchPlaceholder":"archives.searchUnarchived"),"aria-label":h(fn?"discovery.searchPlaceholder":se?"archives.searchPlaceholder":"archives.searchUnarchived")})]}),(0,a.jsxs)("div",{className:"dsham_settingsFilters",children:[(0,a.jsx)(Ht,{id:"dsham-project-filter",className:"dsham_projectFilter",value:le,options:[{value:"all",label:h("archives.allProjects"),title:h("archives.allProjects")},...cs.map(d=>({value:d.key,label:d.title,title:d.title}))],onChange:ve,"aria-label":h("archives.projectFilter")}),l.createElement(q,{t:h,from:ge,to:et,onFrom:St,onTo:dt,invalid:ds,onClear:t(()=>{St(""),dt("")},"onClear")}),(0,a.jsxs)("div",{className:"dsham_settingsSort",children:[(0,a.jsx)("span",{className:"dsham_settingsSortLabel","aria-hidden":!0,children:h("archives.sortLabel")}),(0,a.jsx)(Ht,{id:"dsham-sort-filter",className:"dsham_sortFilter",value:he,options:[{value:"updated",label:h("archives.sortUpdated")},{value:"created",label:h("archives.sortCreated")},{value:"alphabetical",label:h("archives.sortAlphabetical")},...typeof Le=="function"?[{value:"turnsDesc",label:h("details.more")},{value:"turnsAsc",label:h("details.less")}]:[]],onChange:Ce,"aria-label":h("archives.sortBy")})]})]})]}),l.createElement("style",null,Ds),l.createElement(H,{state:jt,t:h}),l.createElement(Q,{key:We,t:h,isArchived:se,items:Je.items,sessions:tt.flatMap(d=>d.sessions),diagnoseSession:Re,repairSession:gt,retry:Je.retry,pending:Je.pending}),Fe&&(0,a.jsx)(y,{t:h,archived:se,busy:L||de||re.size>0,ready:ne,days:dn,onDays:Hr,count:ps.length,onPreview:t(()=>{lt(ps),Vt(!0)},"onPreview"),progress:He,result:ss?.tab===We?ss:null,onRetry:t(()=>{let d=pn.current;d&&(d.kind==="delete"?f({kind:"batch",target:{scope:"sessions",sessionIds:d.ids},count:d.ids.length}):Yt(d.kind,d.ids,{idle:d.idle,retry:!0}))},"onRetry"),undoCount:Kr,onUndo:t(()=>Yt("undo",hn,{retry:!0}),"onUndo"),onReload:Wr}),tt.length>0&&(0,a.jsx)(Wn,{selectedCount:Ne.length,hiddenCount:Ne.length-bn,allVisibleSelected:$r,selectedVisibleCount:bn,visibleCount:Pt.length,busy:L,t:h,onToggle:Jr,onClear:t(()=>W([]),"onClear"),onArchive:se?void 0:()=>lt([...Ne]),onRestore:Qr,onDelete:t(()=>f({kind:"batch",target:{scope:"sessions",sessionIds:Ne},count:Ne.length}),"onDelete")}),tt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:h(se?"archives.empty":"archives.emptyUnarchived")}):Dt.length===0?(0,a.jsx)("div",{className:"dsham_settingsEmpty",children:jt.status==="loading"||jt.status==="error"||jt.failures.length?null:h("archives.emptyFiltered")}):Dt.map(d=>{let w=Mr(d.key),z=tt.find(k=>k.key===d.key)?.sessions.map(k=>k.id)??[],$=se?At(we.archivedSessionIds,we.items,w).length:z.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":!Me.has(d.key),"aria-controls":"dsham-group-"+encodeURIComponent(d.key),onClick:t(()=>Ur(k=>{let ee=new Set(k);return ee.has(d.key)?ee.delete(d.key):ee.add(d.key),ee}),"onClick"),children:[(0,a.jsx)(Me.has(d.key)?c.IconChevronRightOutlineMedium:c.IconChevronDownOutlineMedium,{}),(0,a.jsx)(c.IconFolderOpenOutlineMedium,{}),(0,a.jsx)("span",{children:d.title})]})}),(0,a.jsxs)("div",{className:"dsham_settingsGroupMeta",children:[(0,a.jsx)("span",{className:"dsham_settingsCount",children:h("archives.sessionCount",{n:d.sessions.length})}),(0,a.jsx)(Pr,{group:d,busy:L,onArchive:se?void 0:()=>lt(z,d),onRestore:t(()=>ms(w),"onRestore"),onDelete:t(()=>f({kind:"batch",target:w,title:d.title,count:$}),"onDelete"),t:h})]})]}),(0,a.jsx)("div",{className:"dsham_settingsList",id:"dsham-group-"+encodeURIComponent(d.key),hidden:Me.has(d.key)||void 0,children:!Me.has(d.key)&&d.sessions.map(k=>(0,a.jsxs)("div",{className:"dsham_settingsRow","data-selected":yn.has(k.id),children:[(0,a.jsx)(qn,{checked:yn.has(k.id),disabled:L,label:h("archives.selectSession",{name:Ie(k,h)}),onChange:t(ee=>Yr(k.id,ee.target.checked),"onChange")}),(0,a.jsxs)("div",{className:"dsham_settingsContent",children:[(0,a.jsx)("button",{type:"button",className:"dsham_settingsTitleLink",title:Ie(k,h),"aria-label":h("archives.openSession")+h("common.separator")+Ie(k,h),disabled:L||re.has(k.id),onClick:t(()=>Jt(k),"onClick"),children:Ie(k,h)}),(0,a.jsx)("div",{className:"dsham_settingsMeta",children:[Er(k.updatedAt,h),typeof Le=="function"&&l.createElement("span",{key:"turns",title:Je.byId[k.id]?.error||h("details.hint")}," \xB7 ",h(typeof Je.byId[k.id]?.turnCount=="number"?"details.turns":Je.byId[k.id]?"details.unknown":"details.pending",{n:Je.byId[k.id]?.turnCount}))]}),vn.has(k.id)&&l.createElement("button",{type:"button",className:"dsham_settingsSnippet",disabled:L,title:h(se?"discovery.preview":"archives.openSession"),onClick:t(()=>se?Ke.open(k,v):Jt(k),"onClick")},l.createElement(I,{text:vn.get(k.id)?.snippet??"",query:v}))]}),(0,a.jsxs)("div",{className:"dsham_settingsActions",children:[typeof oe=="function"&&T({variant:"outline",className:"dsham_iconAction"+(ut.has(k.id)?" dsham_favoriteOn":""),title:h(ut.has(k.id)?"organizer.unfavorite":"organizer.favorite"),"aria-pressed":ut.has(k.id),"aria-label":h(ut.has(k.id)?"organizer.unfavorite":"organizer.favorite")+h("common.separator")+Ie(k,h),disabled:L||de||!ne,onClick:t(()=>qr(k.id),"onClick"),children:(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:ut.has(k.id)?"currentColor":"none",stroke:"currentColor",strokeWidth:1.4,strokeLinejoin:"round","aria-hidden":!0,style:{display:"block"},children:(0,a.jsx)("path",{d:"M8 1.75l1.934 3.918 4.324.628-3.129 3.05.738 4.306L8 11.618l-3.867 2.034.738-4.306-3.129-3.05 4.324-.628L8 1.75z"})})}),T({variant:"outline",className:"dsham_iconAction",title:h(se?"archives.restore":"archives.archiveSelected"),"aria-label":h(se?"archives.restore":"archives.archiveSelected"),disabled:L||re.has(k.id),onClick:t(()=>se?Zr(k.id):os([k.id]),"onClick"),icon:(0,a.jsx)(se?c.IconRefreshOutlineMedium:c.IconArchiveOutlineMedium,{size:16})}),(se||typeof Le=="function")&&(0,a.jsx)(Dr,{busy:L||re.has(k.id),t:h,title:Ie(k,h),onCopyId:t(()=>ls(k,"id"),"onCopyId"),onCopyPath:typeof Le=="function"?()=>ls(k,"path"):void 0,onPreview:se&&typeof vt=="function"?()=>Ke.open(k,v):void 0,onRestoreOpen:se?()=>Jt(k,!0):void 0,onDelete:se?()=>f({kind:"session",session:k}):void 0})]})]},k.id))})]},d.key)}),l.createElement(E,{width:900,open:Ke.target!==null,onClose:Ke.close,title:Ke.target?Ie(Ke.target.session,h):h("discovery.preview"),footer:S({variant:"primary",disabled:L,onClick:t(()=>{if(Ke.target){let d=Ke.target.session;return Ke.close(),Jt(d)}},"onClick"),children:h("discovery.openFull")}),children:l.createElement(ue,{preview:Ke,t:h,MarkdownText:c.MarkdownText})}),Qe===null&&Ge!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:Ge}),Tt!==null&&(0,a.jsx)("div",{className:"dsham_settingsStatus",role:"status",children:Tt}),(0,a.jsx)(E,{open:Qe!==null,onClose:Gt,title:h("archives.archiveTitle",{n:Qe?.length??0}),description:_t===null?h("archives.archiveSelectedDesc"):h(_t.key===Wt?"archives.archiveUngroupedDesc":"archives.archiveProjectDesc",{name:_t.title,n:Qe?.length??0}),footer:(0,a.jsxs)(a.Fragment,{children:[S({disabled:L,onClick:Gt,children:h("cancel")}),S({variant:"primary",disabled:L||!Qe?.length,onClick:Vr,children:h("archives.archiveSelected")})]}),children:(0,a.jsxs)(a.Fragment,{children:[Fe&&(0,a.jsx)("p",{children:h(ns?"organizer.idleConfirm":"organizer.manualConfirm")}),Fe&&(0,a.jsx)("div",{className:"dsham_archivePreview",children:(Qe??[]).map(d=>(0,a.jsxs)("label",{children:[(0,a.jsx)(wn,{checked:!0,disabled:L,label:Ie(Be.byId[d]??{id:d},h),onChange:t(()=>qe(w=>(w??[]).filter(z=>z!==d)),"onChange")}),Ie(Be.byId[d]??{id:d},h)]},d))}),He&&(0,a.jsxs)("div",{role:"status",children:[(0,a.jsx)("progress",{value:He.done,max:Math.max(1,He.total)}),h("organizer.progressCount",{done:He.done,total:He.total})]}),Ge!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:Ge})]})}),(0,a.jsx)(E,{open:Ue!==null,onClose:t(()=>{L||(Xe(null),K(null))},"onClose"),title:h("archiveActive.title"),...Ue===null?{}:{description:h("archiveActive.desc",{name:Ue.title,kinds:Ue.kinds})},footer:(0,a.jsxs)(a.Fragment,{children:[S({disabled:L,onClick:t(()=>{L||(Xe(null),K(null))},"onClick"),children:h("cancel")}),S({danger:!0,disabled:L,onClick:t(async()=>{if(!(Ye.current||L||Ue===null||typeof s!="function")){Ye.current=!0,ke(!0),K(null);try{await s(Ue.sessionId,{stopActivity:!0}),W(d=>d.filter(w=>Ue===null||w!==Ue.sessionId)),ot("archived"),xe(h("archives.archiveSuccess",{n:1})),Xe(null)}catch(d){K(d instanceof Error?d.message:String(d))}finally{Ye.current=!1,ke(!1)}}},"onClick"),children:h("archiveActive.confirm")})]}),children:Ge!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:Ge})}),(0,a.jsx)(E,{open:ie!==null,onClose:gs,title:ea,...fs===void 0?{}:{description:fs},footer:(0,a.jsxs)(a.Fragment,{children:[S({disabled:L,onClick:gs,children:h("cancel")}),S({danger:!0,disabled:L,onClick:Xr,children:ta})]}),children:(0,a.jsxs)(a.Fragment,{children:[L&&(0,a.jsxs)("div",{role:"status",children:[ie?.kind==="batch"?h("archives.deleteBatchPending"):h("deleteSession.pending"),He&&(0,a.jsx)("progress",{value:He.done,max:Math.max(1,He.total),"aria-label":h("organizer.progress")}),He&&h("organizer.progressCount",{done:He.done,total:He.total})]}),Ge!==null&&(0,a.jsx)("div",{className:"dsham_settingsError",role:"alert",children:Ge})]})})]})]})}t(jn,"ArchivedSessionsSection");function Dn(e){var s,i,u="";if(typeof e=="string"||typeof e=="number")u+=e;else if(typeof e=="object")if(Array.isArray(e)){var g=e.length;for(s=0;s<g;s++)e[s]&&(i=Dn(e[s]))&&(u&&(u+=" "),u+=i)}else for(i in e)e[i]&&(u&&(u+=" "),u+=i);return u}t(Dn,"r");function cr(...e){for(var s,i,u=0,g="",m=arguments.length;u<m;u++)(s=arguments[u])&&(i=Dn(s))&&(g&&(g+=" "),g+=i);return g}t(cr,"clsx");let Xt="Ungrouped";function dr(e,s=Xt){if(e===void 0||e==="")return s;let i=e.replace(/[/\\]+$/,"").split(/[/\\]/).pop();return i!==void 0&&i!==""?i:e}t(dr,"workspaceLabel");function Et(e,s){return s.updatedAt!==e.updatedAt?s.updatedAt-e.updatedAt:e.id<s.id?-1:1}t(Et,"byRecency");function bt(e,s,i,u){return e.origin!=="subagent"&&(!i.has(e.id)||u===!0)&&(!e.blank||e.id===s)}t(bt,"sessionVisible");function Bt(e){let s=e instanceof Error?e.message:String(e);return s.includes("UNKNOWN_SESSION")||s.includes("no such session")}t(Bt,"isUnknownSessionError");function en(e,s){if(Bt(e))return s("deleteSession.unknown");let i=e instanceof Error?e.message:String(e);return s("deleteSession.failed",{detail:i})}t(en,"formatDeleteError");function ur(e,s){if(Bt(e))return s("archives.unarchiveUnknown");let i=e instanceof Error?e.message:String(e);return s("archives.unarchiveFailed",{detail:i})}t(ur,"formatUnarchiveError");function hr(e,s){if(Bt(e))return s("archives.archiveUnknown");let i=e instanceof Error?e.message:String(e);return s("archives.archiveFailed",{detail:i})}t(hr,"formatArchiveError");function Ut(e){if(e===null||typeof e!="object")return;let s=Z(e),i=s.rpcError!==null&&typeof s.rpcError=="object"?Z(s.rpcError):void 0,u=s.name==="WorkspaceActiveSessionError"?s.activity:void 0,g=i?.details,m=s.name==="WorkspaceArchiveError"&&i?.code==="workspace/session-active"&&g!==null&&typeof g=="object"?Z(g).activity:void 0,b=Array.isArray(u)?u:Array.isArray(m)?m:void 0;if(b===void 0)return;let A=b.flatMap(C=>{if(C===null||typeof C!="object")return[];let _=Z(C).kind;return typeof _=="string"&&_.length>0?[_]:[]});return A.length>0?A:void 0}t(Ut,"activeSessionActivity");function Pn(e){let s=Ut(e);if(s===void 0||e===null||typeof e!="object")return;let i=Z(e),u=i.rpcError!==null&&typeof i.rpcError=="object"?Z(i.rpcError).details:void 0,g=u!==null&&typeof u=="object"?Z(u).sessionId:void 0,m=typeof i.sessionId=="string"?i.sessionId:typeof g=="string"?g:void 0;return m===void 0?void 0:{sessionId:m,kinds:s}}t(Pn,"activeSessionRefusal");function Mn(e,s){let i=/^cannot archive session '(?:[^'\\]|\\')*': the session is active \((.*)\)$/.exec(s);if(i===null)return;let u=i[1].split(", ").filter(g=>g.length>0);return u.length>0?{sessionId:e,kinds:u}:void 0}t(Mn,"activeArchiveFromMessage");function pr(e,s){let i=e instanceof Error?e.message:String(e);return s("archives.forkFailed",{detail:i})}t(pr,"formatForkError");function tn(e){return e.blank?"New Session":e.displayTitle}t(tn,"sessionTitle");function zn(e,s,i,u,g,m,b){let A=[...m];return b==="recency"&&A.sort(Et),{key:e,workspaceId:s,cwd:i,createdAt:u,label:g,sessions:A}}t(zn,"buildGroup");function mr(e,s){let i=new Map(e.map(m=>[m.id,m])),u=new Set,g=[];for(let m of s){let b=i.get(m);b===void 0||u.has(m)||(g.push(b),u.add(m))}for(let m of[...e].sort(Et))u.has(m.id)||g.push(m);return g}t(mr,"orderedUngrouped");function On(e,s,i,u,g){let m=[],b=new Set;for(let C of s){let _=[];for(let M of C.sessionIds){let D=e.byId[M];D!==void 0&&(b.add(M),bt(D,Ze(e),i,g)&&_.push(D))}m.push(zn(C.workspaceId,C.workspaceId,C.path,Date.parse(C.createdAt),C.title,_,"account"))}let A=e.ids.map(C=>e.byId[C]).filter(C=>C!==void 0&&!b.has(C.id)&&bt(C,Ze(e),i,g));return A.length>0&&m.push(zn("",void 0,void 0,void 0,Xt,u===void 0?A:mr(A,u),u===void 0?"recency":"account")),m}t(On,"groupByWorkspace");function nn(e,s,i){return!(!e||i.has(e)||e.startsWith("im:")||e.startsWith("dsh-automation-")||s?.[e]?.origin==="subagent"||s?.[e]?.blank)}t(nn,"isWorkspaceTaskCandidate");function Ln(e,s){let i=s instanceof Set?s:new Set(s);return[...new Set(e.sessionIds)].filter(u=>!i.has(u)).length}t(Ln,"archiveableWorkspaceSessionCount");function gr(e,s,i,u){let g=e.find(b=>b.workspaceId===s);if(g===void 0)return null;let m=Ln(g,u);return m===0?null:{workspaceId:s,title:i,count:m}}t(gr,"archiveWorkspaceDialogTarget");function fr(e,s,i){return{target:e,archiving:!1,error:hr(s,i)}}t(fr,"archiveWorkspaceDialogFailureState");function vr(e){switch(e){case"approval":case"plan-review":case"question":return e;default:return}}t(vr,"visiblePendingKind");function Fn(e,s){let i=s.get(e.id),u=i===void 0?e.pendingInteraction:i.kind;return vr(u)}t(Fn,"pendingInteractionForSession");let sn=new Map,rn=new Set,yr=new Map;function br(e){return e(sn)}t(br,"useEmptySessionPendingInteraction");function wr(e){return e(yr)}t(wr,"useEmptySessionStatus");function Bn(e){return e instanceof Map||e==null?{pending:e??sn,completed:rn}:{pending:e.pending??sn,completed:e.completed??rn}}t(Bn,"pendingFacts");function Sr(e){let s=new Map,i=new Set;if(e instanceof Map)for(let[u,g]of e)g?.pendingInteraction!==void 0&&s.set(u,g.pendingInteraction),g?.completionUnread===!0&&i.add(u);return{pending:s,completed:i}}t(Sr,"factsFromSessionStatus");function kr(e,s,i){let u=e(m=>m),g=s(m=>m);return i?Sr(g):{pending:u,completed:rn}}t(kr,"useSessionUiFacts");function Un(e,s,i,u){let g=Bn(u),m=Fn(e,g.pending);return{id:e.id,title:tn(e),blank:e.blank,running:e.running,runningSubagentCount:s.get(e.id)?.runningCount??0,completed:e.completed===!0||g.completed.has(e.id),updatedAt:e.updatedAt,archived:i.has(e.id),...m===void 0?{}:{pendingInteraction:m}}}t(Un,"sessionNode");function xr(e,s,i,u,g){let m=new Set(i),b=new Set(g.expandedGroups),A=Lt(e.byId),C=Ze(e),_=C===void 0?void 0:s.find(D=>D.sessionIds.includes(C))?.workspaceId??"",M=[];for(let D of On(e,s,m,g.ungroupedOrder,g.showArchived)){let O=b.has(D.key);M.push({key:D.key,workspaceId:D.workspaceId,cwd:D.cwd,createdAt:D.createdAt,label:D.label,sessionCount:D.sessions.length,expanded:O,containsCurrent:D.key===_,sessions:O?D.sessions.map(h=>Un(h,A,m,u)):[]})}return M}t(xr,"deriveGroups");function Cr(e,s,i,u){let g=new Set(s),m=Lt(e.byId),b=[];for(let A of e.ids){let C=e.byId[A];C===void 0||!bt(C,Ze(e),g,u)||b.push(C)}return b.sort(Et),b.map(A=>Un(A,m,g,i))}t(Cr,"deriveFlat");function Ir(e,s,i,u,g,m,b,A,C=Xt){let _=i.trim().toLowerCase();if(_==="")return{items:[],hasMore:!1};let M=new Set(u),D=Lt(e.byId),O=new Map;for(let G of s)for(let oe of G.sessionIds)O.has(oe)||O.set(oe,G.title);let h=t(G=>O.get(G.id)??dr(G.cwd,C),"labelOf"),Re=new Map;for(let G of m.items)Re.has(G.sessionId)||Re.set(G.sessionId,G);let gt=[];for(let G of e.ids){let oe=e.byId[G];oe===void 0||oe.blank||!bt(oe,Ze(e),M,A)||(tn(oe).toLowerCase().includes(_)||h(oe).toLowerCase().includes(_))&>.push(oe)}gt.sort(Et);let Le=[],ft=new Set,wt=t(G=>{ft.has(G.id)||(ft.add(G.id),Le.push(G))},"include");for(let G of gt)wt(G);for(let G of m.items){let oe=e.byId[G.sessionId];oe!==void 0&&!oe.blank&&bt(oe,Ze(e),M,A)&&wt(oe)}let vt=Bn(g);return{items:Le.slice(0,b).map(G=>{let oe=Re.get(G.id),Fe=Fn(G,vt.pending);return{id:G.id,title:tn(G),workspace:h(G),running:G.running,runningSubagentCount:D.get(G.id)?.runningCount??0,archived:M.has(G.id),...Fe===void 0?{}:{pendingInteraction:Fe},completed:G.completed===!0||vt.completed.has(G.id),...oe===void 0?{}:{snippet:oe.snippet}}}),hasMore:m.hasMore||Le.length>b}}t(Ir,"deriveSearchResults");function Ra(e,s){let m=Math.max(0,s-e);return m<6e4?{unit:"now",n:0}:m<36e5?{unit:"minutes",n:Math.floor(m/6e4)}:m<864e5?{unit:"hours",n:Math.floor(m/36e5)}:m<30*864e5?{unit:"days",n:Math.floor(m/864e5)}:m<365*864e5?{unit:"months",n:Math.floor(m/(30*864e5))}:{unit:"years",n:Math.floor(m/(365*864e5))}}t(Ra,"relativeTime");let Hn={listeners:new Set,request(e){for(let s of this.listeners)s(e)},subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};function Ie(e,s){return e.blank?s("session.new"):e.title??e.displayTitle??""}t(Ie,"displayTitle");function Er(e,s){let i=new Date(e),u=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`;return s("archives.timestamp",{date:s("date.ymd",{y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate()}),time:u})}t(Er,"archiveTimeLabel");let Ar=[".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-radius:var(--dsw-radius-sm,8px)!important;border:0.5px solid 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;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(""),_r=[".dsham_settings{container-type:inline-size;min-width:0;box-sizing:border-box;width:min(100%,760px);margin:0 auto;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;flex-direction:column;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}",".dsham_settingsFilters{display:flex;align-items:center;gap:8px;min-width:0;width:100%;flex-wrap:nowrap}",".dsham_settingsSort{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none;min-width:0}",".dsham_settingsSortLabel{flex:none;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px;white-space:nowrap}",".dsham_settingsFilter{display:flex;position:relative;flex:none;width:auto;min-width:0}",".dsham_settingsSearch .dsham_favoriteFilter,.dsham_settingsSearch .dsham_scopeFilter,.dsham_settingsFilters>.dsham_projectFilter,.dsham_settingsSort .dsham_sortFilter{flex:none;width:auto}",".dsham_settingsFilters>.dsham_dateFilter{flex:1 1 auto;min-width:0}","@container(max-width:480px){.dsham_settingsFilters{flex-wrap:wrap}.dsham_settingsSort{margin-left:0}}",".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_settingsSearch .dsham_searchField{flex:1 1 0;min-width:0;width:auto;max-width:none;box-sizing:border-box}",".dsham_settingsGroup{margin:0 0 20px}",".dsham_settingsGroupHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}",".dsham_settingsGroupTitle{display:flex;align-items:center;gap:8px;min-width:0;margin:0;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}",".dsham_settingsGroupTitle svg{flex:none;color:var(--dsw-alias-label-secondary)}",".dsham_settingsCount{flex:none;color:var(--dsw-alias-label-tertiary);font-size:12px}",".dsham_settingsList{display:grid;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-button-elevated-fill))}",".dsham_settingsRow{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:64px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}",".dsham_settingsRow:last-child{border-bottom:0}",".dsham_settingsContent{min-width:0;flex:1}",".dsham_settingsTitle{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}",".dsham_settingsMeta{margin-top:2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:16px}",".dsham_settingsActions{display:flex;align-items:center;gap:4px;flex:none}",".dsham_settingsEmpty{padding:28px 8px;color:var(--dsw-alias-label-secondary);text-align:center}",".dsham_settingsError{margin-top:10px;color:var(--dsw-alias-state-error-primary);font-size:12px}","@container(max-width:520px){.dsham_settingsHeader{margin-bottom:16px}.dsham_settingsGroup{margin-bottom:32px}.dsham_settingsRow{padding:10px 12px}.dsham_settingsActions{gap:4px}}"].join(""),Rr=".dsham_settingsTitleLink{display:block;max-width:100%;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;font-weight:600;line-height:20px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.dsham_settingsTitleLink:hover:not(:disabled){text-decoration:underline;text-underline-offset:3px}.dsham_settingsTitleLink:disabled{cursor:default;opacity:.6}.dsham_groupToggle{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:4px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsham_groupToggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dsham_settingsRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsRow[data-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.dsham_settingsTitleLink:focus-visible,.dsham_groupToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#3b82f6);outline-offset:2px}@container(max-width:400px){.dsham_settingsRow{gap:8px;padding:10px 8px}.dsham_settingsActions{gap:0}.dsham_settingsMeta{font-size:11px}}.dsham_settingsGroupMeta{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap}.dsham_settingsStatus{margin-top:10px;color:var(--dsw-alias-label-secondary);font-size:12px}.dsham_checkbox{width:16px;height:16px;margin:0;accent-color:var(--dsw-alias-brand-primary);flex:none}button.dsham_favoriteOn{color:#e8b931}button.dsham_favoriteOn:not(:disabled):hover{color:#e8b931!important;border-color:#e8b931!important}",Tr=".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}}",Nr=".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}",jr=".dsham_settings{margin:0 auto!important}@media(max-width:720px){.dsham_settings{margin:0 auto!important}}";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify("dsh-archive-manager/ArchiveSettings.layout.css")+"]")===null){let e=document.createElement("style");e.dataset.plugin="@michengai/dsh-archive-manager",e.dataset.pluginCss="dsh-archive-manager/ArchiveSettings.layout.css",e.textContent=jr,document.head.appendChild(e)}function Ht({id:e,className:s,value:i,options:u,onChange:g,disabled:m=!1,"aria-label":b}){let[A,C]=l.useState(!1);l.useEffect(()=>{if(!A||typeof window>"u")return;function O(h){h.key==="Escape"&&(h.preventDefault(),h.stopPropagation(),h.stopImmediatePropagation(),C(!1))}return t(O,"onKey"),window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[A]);let _=l.useMemo(()=>u.map(O=>({id:O.value,label:O.label})),[u]),D=u.find(O=>O.value===i)?.label??b;return(0,a.jsx)("div",{id:e,className:s===void 0?"dsham_settingsFilter":`dsham_settingsFilter ${s}`,children:(0,a.jsx)(c.Menu,{open:A,onClose:t(()=>C(!1),"onClose"),onSelect:t(O=>{m||g(O),C(!1)},"onSelect"),selectedId:i,align:"start",portal:!0,dense:!0,listClassName:"dsham_selectDropdown",anchor:(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",role:"combobox","aria-label":b,"aria-expanded":A,disabled:m,className:"dsham_menuSelectBtn"+(A?" is-open":""),onClick:t(()=>{m||C(O=>!O)},"onClick"),children:[(0,a.jsx)("span",{className:"dsham_selectLabel",children:D}),(0,a.jsx)("svg",{viewBox:"0 0 16 16",width:12,height:12,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:4,transition:"transform 150ms ease",transform:A?"rotate(180deg)":"none",flex:"none"},children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4"})})]}),items:_})})}t(Ht,"ArchiveProjectSelect");function Wn({selectedCount:e,hiddenCount:s,allVisibleSelected:i,selectedVisibleCount:u,visibleCount:g,busy:m,t:b,onToggle:A,onClear:C,onRestore:_,onDelete:M,onArchive:D}){let O=e>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:b("archives.selectAllFiltered"),children:[(0,a.jsx)(qn,{checked:i,indeterminate:u>0&&!i,disabled:m||g===0,label:b("archives.selectAllFiltered"),onChange:t(h=>A(h.target.checked),"onChange")}),(0,a.jsx)("span",{"aria-live":"polite",children:O?b("archives.selectedCount",{n:e}):b("archives.selectAllFiltered")})]}),O&&T({disabled:m,"aria-label":b("archives.clearSelection"),onClick:C,children:b("archives.clearSelectionShort")})]}),O&&(0,a.jsxs)("div",{className:"dsham_settingsSelectionActions",children:D?[T({disabled:m,onClick:D,children:b("archives.archiveSelected")})]:[T({disabled:m,"aria-label":b("archives.restoreSelected"),onClick:_,children:b("archives.restore")}),T({disabled:m,className:"dsham_btnDanger","aria-label":b("archives.deleteSelected"),onClick:M,children:b("archives.deleteSelectionShort")})]})]}),s>0&&(0,a.jsx)("p",{className:"dsham_settingsSelectionScope",role:"status",children:b("archives.selectionHiddenHint",{hidden:s})})]})}t(Wn,"ArchiveSelectionToolbar");function qn({checked:e,indeterminate:s=!1,disabled:i=!1,label:u,onChange:g}){return(0,a.jsx)(wn,{checked:e,indeterminate:s,disabled:i,label:u,onChange:g})}t(qn,"ArchiveSelectionCheckbox");function Gn(){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(e=>(0,a.jsx)("circle",{cx:e,cy:8,r:1.15,fill:"none",stroke:"currentColor",strokeWidth:1.5},e))})}t(Gn,"moreIcon");function Dr({busy:e,title:s,t:i,onPreview:u,onRestoreOpen:g,onDelete:m,onCopyId:b,onCopyPath:A}){let[C,_]=(0,l.useState)(!1),M=t(O=>{if(!e){if(_(!1),O==="copyId")return b?.();if(O==="copyPath")return A?.();if(O==="preview")return u?.();if(O==="restoreOpen")return g?.();O==="delete"&&m?.()}},"choose"),D=[...u?[{id:"preview",label:i("discovery.preview"),icon:(0,a.jsx)(c.IconBrowseOutlineMedium,{size:16}),danger:!1}]:[],...g?[{id:"restoreOpen",label:i("archives.restoreOpen"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1}]:[],...b?[{id:"copyId",label:i("details.copyId"),icon:(0,a.jsx)(c.IconCopyOutlineMedium,{size:16}),danger:!1}]:[],...A?[{id:"copyPath",label:i("details.copyPath"),icon:(0,a.jsx)(c.IconLinkOutlineMedium,{size:16}),danger:!1}]:[],...m?[{id:"delete",label:i("menu.deleteSession"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}]:[]];return(0,a.jsx)(c.Menu,{open:!e&&C,align:"end",portal:!0,dense:!0,items:D,onSelect:M,onClose:t(()=>_(!1),"onClose"),anchor:T({variant:"outline",className:"dsham_iconAction",disabled:e,title:i("archives.moreActions"),"aria-label":i("archives.moreActions")+i("common.separator")+s,"aria-haspopup":"menu","aria-expanded":C&&!e,icon:Gn(),onClick:t(()=>{e||_(O=>!O)},"onClick")})})}t(Dr,"ArchivedSessionMenu");function Pr({group:e,busy:s,onArchive:i,onRestore:u,onDelete:g,t:m}){let b=e.key===Wt,A=i?[{id:"archive",label:m(b?"archives.archiveUngrouped":"archives.archiveProject"),icon:(0,a.jsx)(c.IconArchiveOutlineMedium,{size:16}),danger:!0}]:[{id:"restore",label:m(b?"archives.restoreUngrouped":"archives.restoreProject"),icon:(0,a.jsx)(c.IconUnarchiveOutlineMedium,{size:16}),danger:!1},{id:"delete",label:m(b?"archives.deleteUngrouped":"archives.deleteProject"),icon:(0,a.jsx)(c.IconTrashOutlineMedium,{size:16}),danger:!0}],[C,_]=(0,l.useState)(!1),M=m(b?"archives.ungroupedActions":"archives.projectActions",{name:e.title}),D=t(O=>{s||(O==="archive"?i?.():O==="restore"?u?.():O==="delete"&&g?.())},"choose");return(0,a.jsx)(c.Menu,{open:!s&&C,align:"end",portal:!0,dense:!0,items:A,onSelect:t(O=>{_(!1),D(O)},"onSelect"),onClose:t(()=>_(!1),"onClose"),anchor:T({variant:"outline",className:"dsham_iconAction",disabled:s,"aria-label":M,"aria-haspopup":"menu","aria-expanded":C&&!s,icon:Gn(),onClick:t(()=>{s||_(O=>!O)},"onClick")})})}t(Pr,"ArchivedGroupActions");let Wt="__ungrouped__";function Mr(e){return e===Wt?{scope:"ungrouped"}:{scope:"workspace",workspaceId:e}}t(Mr,"archivedBatchTargetForGroup");function At(e,s,i){let u=[...new Set(e??[])];if(i.scope==="all")return u;if(i.scope==="sessions"){let m=new Set(i.sessionIds??[]);return u.filter(b=>m.has(b))}if(i.scope==="workspace"){let m=new Set(s.find(b=>b.workspaceId===i.workspaceId)?.sessionIds??[]);return u.filter(b=>m.has(b))}let g=new Set(s.flatMap(m=>m.sessionIds));return u.filter(m=>!g.has(m))}t(At,"deriveArchivedBatchIds");function Vn(e){return[...new Set(e.flatMap(s=>s.sessions.map(i=>i.id)))]}t(Vn,"archivedSessionIdsInGroups");function Kn(e,s){let i=new Set(s);return[...new Set(e)].filter(u=>i.has(u))}t(Kn,"pruneArchivedSelection");function an(e,s,i){let u=new Set(e);for(let g of s)i?u.add(g):u.delete(g);return[...u]}t(an,"toggleArchivedSelection");function $n(e,s){let i=e.deletedSessionIds.length,u=e.skippedSessionIds.length;return e.failures.length>0?{kind:"error",message:s("archives.deletePartial",{deleted:i,skipped:u,failed:e.failures.length,detail:e.failures[0].message})}:u>0&&i>0?{kind:"notice",message:s("archives.deleteSuccessWithSkipped",{deleted:i,skipped:u})}:u>0?{kind:"notice",message:s("archives.deleteSkipped",{n:u})}:{kind:"notice",message:s("archives.deleteSuccess",{n:i})}}t($n,"archivedDeleteFeedback");function Yn(e,s){let i=new Set(s);return Object.values(e).filter(u=>u.origin!=="subagent"&&!u.blank&&!i.has(u.id)).map(u=>u.id)}t(Yn,"unarchivedSessionIds");function Jn(e,s,i,u){let g=s.map(A=>({key:A.workspaceId,title:A.title,ids:new Set(A.sessionIds),sessions:[]})),m=[];for(let A of i){let C=e[A];if(C===void 0||C.origin==="subagent")continue;let _=g.find(M=>M.ids?.has(A));(_===void 0?m:_.sessions).push(C)}let b=g.filter(A=>A.sessions.length>0);return m.length>0&&b.push({key:Wt,title:u,sessions:m}),b}t(Jn,"deriveArchivedGroups");function Zn(e,s,i,u,g={}){let m=t((_,M)=>String(_).localeCompare(String(M),void 0,{numeric:!0,sensitivity:"base"}),"compareText"),b=t(_=>{let M=s==="created"?g[_.id]?.createdAt??i[_.id]:_.updatedAt;return typeof M=="number"&&Number.isFinite(M)?M:Number.NEGATIVE_INFINITY},"timestampOf"),A=t((_,M)=>{if(s==="turnsAsc"||s==="turnsDesc"){let D=In(g[_.id]?.turnCount,g[M.id]?.turnCount,s);if(D)return D}if(s!=="alphabetical"){let D=b(M)-b(_);if(Number.isFinite(D)&&D!==0)return D}return m(Ie(_,u),Ie(M,u))||m(_.id,M.id)},"compareSessions");return e.map(_=>({..._,sessions:[..._.sessions].sort(A)})).sort((_,M)=>{if(s==="turnsAsc"||s==="turnsDesc"){let D=In(g[_.sessions[0]?.id]?.turnCount,g[M.sessions[0]?.id]?.turnCount,s);if(D)return D}if(s!=="alphabetical"){let D=b(M.sessions[0])-b(_.sessions[0]);if(Number.isFinite(D)&&D!==0)return D}return m(_.title,M.title)||m(_.key,M.key)})}t(Zn,"sortArchivedGroups");let Qn={...Qs,...Ps,...Mt,"locale.language":"zh","service.unavailable":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u8BD5","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","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","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","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"},Xn={...Xs,...Ms,...Sn,"locale.language":"en","service.unavailable":"The service is not ready. Please retry.","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","archives.sortUpdated":"Last updated","archives.sortCreated":"Created","archives.sortAlphabetical":"Alphabetical","archives.projectFilter":"Filter by project","archives.allProjects":"All projects","archives.sessionCount":"{n} chats","archives.selectAllFiltered":"Select all results","archives.selectSession":"Select chat {name}","archives.restoreSelected":"Restore selected","archives.deleteSelected":"Delete selected","archives.timestamp":"{date}, {time}","archives.restoreProject":"Restore all chats in this project","archives.restoreUngrouped":"Restore all","archives.deleteProject":"Delete all chats in this project","archives.deleteUngrouped":"Delete all","archives.projectActions":"Archive actions for project {name}","archives.ungroupedActions":"Archive actions for ungrouped chats","archives.restoreSuccess":"Restored {n} archived chats.","archives.restoreBatchFailed":"Could not restore the archived chats: {detail}","archives.deleteSelectedTitle":"Delete selected archived chats","archives.deleteSelectedDesc":"This permanently deletes the selected {n} archived chats, their child agents (including any that are still running), and their records. Other chats are not affected. This cannot be undone.","archives.deleteSelectedConfirm":"Delete selected chats","archives.deleteProjectTitle":"Delete archived chats in {name}","archives.deleteProjectDesc":"This permanently deletes the {n} archived chats in {name}, their child agents, and their records. The project directory and unarchived chats are not affected. This cannot be undone.","archives.deleteProjectConfirm":"Delete all project chats","archives.deleteUngroupedTitle":"Delete ungrouped archived chats","archives.deleteUngroupedDesc":"This permanently deletes the {n} ungrouped archived chats, their child agents, and their records. Other projects and unarchived chats are not affected. This cannot be undone.","archives.deleteUngroupedConfirm":"Delete all ungrouped chats","archives.deleteBatchPending":"Deleting archived chats\u2026","archives.deleteSuccess":"Deleted {n} archived chats.","archives.deleteSuccessWithSkipped":"Deleted {deleted} archived chats and cleared {skipped} stale archive entries for sessions that no longer exist.","archives.deleteSkipped":"Cleared {n} stale archive entries for sessions that no longer exist.","archives.deletePartial":"Deleted {deleted} chats and cleared {skipped} stale archive entries; {failed} could not be deleted: {detail}","archives.unarchiveUnknown":"This session no longer exists, so it cannot be unarchived.","archives.unarchiveFailed":"Could not unarchive the session: {detail}","archives.archiveUnknown":"This session no longer exists, so it cannot be archived.","archives.archiveFailed":"Could not archive the session: {detail}","archives.archiveActive":"This conversation is still running ({kinds}).","archiveActive.title":"Stop and archive","archiveActive.desc":"\u201C{name}\u201D still has work in progress: {kinds}. Archiving stops that work first.","archiveActive.confirm":"Stop and archive","archiveActive.pending":"Stopping and archiving\u2026","archives.forkFailed":"Could not fork the session: {detail}","deleteSession.title":"Delete session","deleteSession.confirmTitle":"Delete session?","deleteSession.desc":"This permanently deletes session \u201C{name}\u201D, its child agents (including any that are still running), and all of its records (conversation, stats, cache). This cannot be undone.","deleteSession.pending":"Deleting session\u2026","deleteSession.unknown":"This session no longer exists or was already deleted.","deleteSession.failed":"Could not delete the session: {detail}","picker.loading":"Loading workspaces\u2026","conflict.named":"A workspace named \u201C{name}\u201D already exists.","folderError.title":"Couldn\u2019t open folder","folderError.retry":"Choose again",rename:"Rename","rename.workspace.title":"Rename workspace","rename.session.title":"Rename session","field.workspaceName":"Workspace name","field.sessionName":"Session name","delete.workspace":"Delete workspace","delete.desc":"This removes \u201C{name}\u201D from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.","delete.pending":"Deleting workspace\u2026","menu.fork":"Fork session","menu.archiveSession":"Archive session","menu.archiveWorkspace":"Archive all conversations","archiveWorkspace.title":"Archive {n} conversations?","archiveWorkspace.desc":"This archives all conversations in \u201C{name}\u201D. You can find them later in Archived sessions.","archiveWorkspace.confirm":"Archive all","archiveWorkspace.pending":"Archiving conversations\u2026","actions.workspace.aria":"Workspace actions for {name}","actions.session.aria":"Session actions for {name}","actions.newSession.aria":"New session in {name}","status.running":"Running","status.subagentsRunning.one":"{n} subagent running","status.subagentsRunning.other":"{n} subagents running","status.idle":"Idle","status.waitingApproval":"Waiting for approval","status.planReview":"Plan awaiting review","status.waitingAnswer":"Waiting for answer","status.completed":"Completed","hover.created":"Created {time}","hover.copied":"Copied","date.ymd":"{y}-{m}-{d}","time.now":"now","time.minutes":"{n}min","time.hours":"{n}h","time.days":"{n}d","time.months":"{n}mo","time.years":"{n}y","time.ago":"{t} ago"},zr={...er,...zs,...kn,"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.","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.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","archives.sessionCount":"{n} \u0447\u0430\u0442\u043E\u0432","archives.selectAllFiltered":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B","archives.selectSession":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0447\u0430\u0442 {name}","archives.restoreSelected":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.deleteSelected":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435","archives.timestamp":"{date}, {time}","archives.restoreProject":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.restoreUngrouped":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435","archives.deleteProject":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngrouped":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435","archives.projectActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0435\u043A\u0442\u0430 {name}","archives.ungroupedActions":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432","archives.restoreSuccess":"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.restoreBatchFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B: {detail}","archives.deleteSelectedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteSelectedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteSelectedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteProjectTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u0432 {name}","archives.deleteProjectDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0432 {name}, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteProjectConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0447\u0430\u0442\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430","archives.deleteUngroupedTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteUngroupedDesc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 {n} \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432, \u0438\u0445 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B \u0438 \u0437\u0430\u043F\u0438\u0441\u0438. \u0414\u0440\u0443\u0433\u0438\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u044B \u0438 \u043D\u0435\u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B \u043D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044E\u0442\u0441\u044F. \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","archives.deleteUngroupedConfirm":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0447\u0430\u0442\u044B","archives.deleteBatchPending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432\u2026","archives.deleteSuccess":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432: {n}.","archives.deleteSuccessWithSkipped":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deleteSkipped":"\u041E\u0447\u0438\u0449\u0435\u043D\u043E {n} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439.","archives.deletePartial":"\u0423\u0434\u0430\u043B\u0435\u043D\u043E {deleted} \u0447\u0430\u0442\u043E\u0432 \u0438 \u043E\u0447\u0438\u0449\u0435\u043D\u043E {skipped} \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0430\u0440\u0445\u0438\u0432\u0430; {failed} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C: {detail}","archives.unarchiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430.","archives.unarchiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430: {detail}","archives.archiveUnknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0435\u0451 \u043D\u0435\u043B\u044C\u0437\u044F \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C.","archives.archiveFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","archives.archiveActive":"\u042D\u0442\u043E\u0442 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F ({kinds}).","archiveActive.title":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.desc":"\u0412 \xAB{name}\xBB \u0435\u0449\u0451 \u0438\u0434\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0430: {kinds}. \u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442 \u0435\u0451.","archiveActive.confirm":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C","archiveActive.pending":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0438 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F\u2026","archives.forkFailed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438: {detail}","deleteSession.title":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","deleteSession.confirmTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E?","deleteSession.desc":"\u042D\u0442\u043E \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \u0441\u0435\u0441\u0441\u0438\u044E \xAB{name}\xBB, \u0435\u0451 \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0435\u0449\u0451 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435) \u0438 \u0432\u0441\u0435 \u0435\u0451 \u0437\u0430\u043F\u0438\u0441\u0438 (\u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0443, \u043A\u044D\u0448). \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","deleteSession.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\u2026","deleteSession.unknown":"\u042D\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0430.","deleteSession.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E: {detail}","picker.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u2026","conflict.named":"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u0441 \u0438\u043C\u0435\u043D\u0435\u043C \xAB{name}\xBB \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.","folderError.title":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0443","folderError.retry":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430",rename:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C","rename.workspace.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","rename.session.title":"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","field.workspaceName":"\u0418\u043C\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430","field.sessionName":"\u0418\u043C\u044F \u0441\u0435\u0441\u0441\u0438\u0438","delete.workspace":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","delete.desc":"\u042D\u0442\u043E \u0443\u0434\u0430\u043B\u0438\u0442 \xAB{name}\xBB \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432. \u041F\u0430\u043F\u043A\u0430 \u0438 \u0436\u0443\u0440\u043D\u0430\u043B\u044B \u0441\u0435\u0441\u0441\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u0443\u0442\u0441\u044F. \u0415\u0433\u043E \u0441\u0435\u0441\u0441\u0438\u0438 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u044B\xBB.","delete.pending":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430\u2026","menu.fork":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0435\u0442\u043A\u0443 \u0441\u0435\u0441\u0441\u0438\u0438","menu.archiveSession":"\u0417\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E","menu.archiveWorkspace":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","archiveWorkspace.title":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C {n} \u0441\u0435\u0441\u0441\u0438\u0439?","archiveWorkspace.desc":"\u042D\u0442\u043E \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432 \xAB{name}\xBB. \u0418\u0445 \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \xAB\u0410\u0440\u0445\u0438\u0432\xBB.","archiveWorkspace.confirm":"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435","archiveWorkspace.pending":"\u0410\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0439\u2026","actions.workspace.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430 \u0434\u043B\u044F {name}","actions.session.aria":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043B\u044F {name}","actions.newSession.aria":"\u041D\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u0432 {name}","status.running":"\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F","status.subagentsRunning.one":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442","status.subagentsRunning.other":"{n} \u043F\u043E\u0434\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442","status.idle":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435","status.waitingApproval":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F","status.planReview":"\u041F\u043B\u0430\u043D \u043E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438","status.waitingAnswer":"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u0432\u0435\u0442\u0430","status.completed":"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E","hover.created":"\u0421\u043E\u0437\u0434\u0430\u043D\u043E {time}","hover.copied":"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E","date.ymd":"{y}-{m}-{d}","time.now":"\u0441\u0435\u0439\u0447\u0430\u0441","time.minutes":"{n}\u043C\u0438\u043D","time.hours":"{n}\u0447","time.days":"{n}\u0434","time.months":"{n}\u043C\u0435\u0441","time.years":"{n}\u0433","time.ago":"{t} \u043D\u0430\u0437\u0430\u0434"},Oe="archive-manager-workspace",Or=["slots","sessions","workspaces","locale","remote","typert"];function on(e){return{getSnapshot:e.getSnapshot.bind(e),subscribe:e.subscribe.bind(e)}}t(on,"bindObservable");function es(e){return async s=>{if(typeof e?.unarchiveSession!="function")throw new Error("archive-manager: host unarchiveSession is unavailable");await e.unarchiveSession(s)}}t(es,"createUnarchiveSession");async function ln(e,s,i){let u=new Set(e.list?.getSnapshot?.()?.archivedSessionIds??[]),g=new Set;for(let b of s)if(!(typeof b!="string"||b.length===0||g.has(b))){g.add(b);try{await e.archiveSession(b)}catch(A){throw A!==null&&typeof A=="object"&&Ut(A)!==void 0&&typeof Z(A).sessionId!="string"&&Object.assign(A,{sessionId:b}),A}}typeof i=="function"&&await i();let m=[...e.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:m,archivedSessionIdsAdded:m.filter(b=>!u.has(b))}}t(ln,"archiveSessionsViaOfficial");async function ts(e,s,i,u){let g=new Set(e.list?.getSnapshot?.()?.archivedSessionIds??[]),m=new Set,b=typeof u=="function"?u:C=>e.unarchiveSession?.(C);for(let C of s)typeof C!="string"||C.length===0||m.has(C)||(m.add(C),await b(C));typeof i=="function"&&await i();let A=[...e.list?.getSnapshot?.()?.archivedSessionIds??[]];return{archivedSessionIds:A,unarchivedSessionIds:[...g].filter(C=>!A.includes(C))}}t(ts,"unarchiveSessionsViaOfficial");async function Lr(e){Fr(e);let s=e.get("remote"),i=t(()=>{},"disposeRemote");return s!==void 0&&(i=await s.$mount(it)),async()=>{await i()}}t(Lr,"apply");function Fr(e){e.effect(()=>e.locale.register(Oe,{zh:Qn,en:Xn,ru:zr}),"dsh-archive-manager: dictionaries"),e.effect(()=>$s({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:fe}),"dsh-archive-manager: plugin update ui");let s=t(()=>e.get("uiWorkspace"),"uiWorkspaceAt"),i={},u,g=t(f=>(u=Fs(f,e.sessions,e.workspaces,{onOpened:t(()=>e.get("layout")?.selectPanel(null),"onOpened"),beginNavigation:t(()=>e.get("layout")?.beginNavigation?.(),"beginNavigation")}),()=>u?.dispose()),"attachArchiveNavigation");typeof e.inject=="function"?e.inject(["uiWorkspace"],f=>g(f.uiWorkspace??s())):e.effect(()=>g(s()),"archive-manager: explicit archived navigation");let m=t(f=>{if(u===void 0)throw new pt("navigationUnavailable");return Hn.request(f),u.open(f)},"openConversation"),b=t(async f=>{e.get("layout")?.beginNavigation?.(),Hn.request(f)},"focusSessionWorkspace"),A=t(async(f,v)=>{let N=await e.sessions.search(f,v);if(!N.ok)throw new Error(N.error.message);return N.value},"searchSessions"),C=t(async()=>{if(typeof e.sessions.refresh!="function")return null;try{return await e.sessions.refresh(),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"),_=es(e.workspaces),M=t(async(f,...v)=>{let N=e.get("remote.workspaceRegistry");if(!N||typeof N[f]!="function")throw new Error(e.locale.bind(Oe)("service.unavailable"));let ve=await N[f].apply(N,v);if(!ve.ok)throw new Error(ve.error.message);return ve.value},"registryCall"),D=t(f=>M("sessionDetails",f),"sessionDetails"),O=t(f=>M("diagnoseSession",f),"diagnoseSession"),h=t(f=>M("repairSession",f),"repairSession"),Re=t(f=>M("searchArchivedContent",f),"searchArchivedContent"),gt=t(f=>M("searchSessionContent",f),"searchSessionContent"),Le=t(f=>M("previewArchivedSession",f),"previewArchivedSession"),ft=t(()=>M("favoriteSessions"),"favoriteSessions"),wt=t(f=>M("setSessionFavorite",f),"setSessionFavorite"),vt=Js({workspaces:e.workspaces.list,sessions:e.sessions.list,archive:t(f=>e.workspaces.archiveSession(f),"archive"),restore:t(async f=>{await _(f)},"restore"),deleteOne:t(async f=>{let v=e.get("remote.workspaceRegistry");if(!v)throw new Error(e.locale.bind(Oe)("service.unavailable"));let N=await v.deleteSession(f);if(!N.ok)throw new Error(N.error.message)},"deleteOne"),getFavorites:ft,refresh:t(()=>e.sessions.refresh?.(),"refresh"),currentSessionId:Ze}),G=t(async f=>{await _(f),await C()},"unarchiveSession"),oe=t(async f=>{let v=e.get("remote.workspaceRegistry");if(v===void 0)throw new Error("archive-manager remote service is unavailable");let N=await v.deleteSession(f);if(!N.ok)throw new Error(N.error.message);await C()},"deleteSession"),Fe=t(async f=>ln(e.workspaces,f,C),"archiveSessions"),cn=t(async f=>{let v=e.workspaces.list?.getSnapshot?.()??{archivedSessionIds:[],items:[]},N=At(v.archivedSessionIds,v.items,f);return ts(e.workspaces,N,C,_)},"unarchiveSessions"),qt=t(async f=>{let v=e.get("remote.workspaceRegistry");if(v===void 0)throw new Error("archive-manager remote service is unavailable");let N=await v.deleteArchivedSessions(f);if(!N.ok)throw new Error(N.error.message);let le=await C();return{...N.value,refreshError:le}},"deleteArchivedSessions"),Be=t(async()=>{let f=e.get("remote.workspaceRegistry");if(f===void 0)throw new Error("archive-manager remote service is unavailable");let v=await f.archivedSessionMetadata();if(!v.ok)throw new Error(v.error.message);if(v.value.repairedSessionIds?.length>0&&typeof e.sessions.refresh=="function")try{await e.sessions.refresh()}catch(N){console.warn("archive-manager: repaired archived projections but session list refresh failed:",N)}return v.value},"archivedSessionMetadata"),we="sidebar.workspaces.session.menu.item",We=null,ot=new Set,se=t(f=>{We=f;for(let v of ot)v()},"publishDeleteTarget");function Qe(){return l.useSyncExternalStore(f=>(ot.add(f),()=>{ot.delete(f)}),()=>We,()=>We)}t(Qe,"useDeleteRequest");function qe({sessionId:f,displayTitle:v,useMenuOpenState:N,t:le}){let[,ve]=N(),he=c.MenuItemButton,Ce=(0,a.jsx)(c.IconTrashOutlineRegular,{size:14}),ye=t(()=>{ve(!1),se({sessionId:f,title:v})},"onSelect");return typeof he=="function"?(0,a.jsx)(he,{danger:!0,icon:Ce,onSelect:ye,children:le("menu.deleteSession")}):(0,a.jsx)("button",{type:"button",role:"menuitem",onClick:ye,children:le("menu.deleteSession")})}t(qe,"DeleteSessionMenuItem");function _t(f){try{let v=document.querySelector(`[data-row-key="session:${CSS.escape(f)}"]`);return v?(v.hasAttribute("tabindex")||(v.setAttribute("tabindex","-1"),v.addEventListener("blur",()=>v.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(v):v.focus(),!0):!1}catch{return!1}}t(_t,"focusSessionRow");function $e({t:f}){let v=Qe(),[N,le]=(0,l.useState)(!1),[ve,he]=(0,l.useState)(null),[Ce,ye]=(0,l.useState)(null),te=(0,l.useRef)(null),re=(0,l.useRef)(null),Te=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(v===null||typeof document>"u"){ye(null);return}let W=null,J=t(()=>{if(W&&W.isConnected)return W;try{W=document.querySelector(`[data-row-key="session:${CSS.escape(v.sessionId)}"]`)}catch{W=null}return W},"getTargetRow"),B=t(()=>{let je=te.current,de=je?.offsetWidth||290,me=je?.offsetHeight||160,De=8,Ve=J();if(!Ve){let ge=window.innerWidth,St=window.innerHeight,et=Math.max(16,(St-me)/2),dt=Math.max(16,(ge-de)/2);ye(Me=>Me!==null&&Me.top===et&&Me.left===dt?Me:{top:et,left:dt});return}let Pe=Ve.getBoundingClientRect(),be=Pe.top-4;be+me>window.innerHeight-16&&(be=window.innerHeight-16-me),be<16&&(be=16);let ae=Pe.right+De;ae+de>window.innerWidth-16&&(ae=Pe.left-de-De),ae<16&&(ae=16),ye(ge=>ge!==null&&ge.top===be&&ge.left===ae?ge:{top:be,left:ae})},"updatePosition");B(),window.addEventListener("scroll",B,!0),window.addEventListener("resize",B);let ne=null;return typeof ResizeObserver<"u"&&te.current&&(ne=new ResizeObserver(B),ne.observe(te.current)),()=>{ne?.disconnect(),window.removeEventListener("scroll",B,!0),window.removeEventListener("resize",B)}},[v]),(0,l.useEffect)(()=>{if(v===null)return;re.current&&!re.current.disabled?re.current.focus():te.current?.focus();let W=v.sessionId;return()=>{if(!_t(W)){let B=document.querySelector('[role="treeitem"][aria-selected="true"]');B&&(B.hasAttribute("tabindex")||(B.setAttribute("tabindex","-1"),B.addEventListener("blur",()=>B.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(B):B.focus())}}},[v]),(0,l.useEffect)(()=>{v!==null&&N&&te.current?.focus()},[v,N]),(0,l.useEffect)(()=>{if(v===null)return;let W=t(J=>{if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),"stopImmediatePropagation"in J&&typeof J.stopImmediatePropagation=="function"&&J.stopImmediatePropagation(),N||(he(null),se(null));return}if(J.key==="Tab"){if(J.preventDefault(),N){te.current?.focus();return}let B=re.current,ne=Te.current;if(!B||!ne)return;J.shiftKey?document.activeElement===B?ne.focus():B.focus():document.activeElement===ne?B.focus():ne.focus()}},"onKey");return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[v,N]),v===null)return null;let pe=t(()=>{N||(he(null),se(null))},"close"),Ne=t(()=>{le(!0),he(null),oe(v.sessionId).then(()=>{le(!1),se(null)}).catch(W=>{le(!1),he(en(W,f))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:pe}),(0,a.jsxs)("div",{ref:te,role:"dialog","aria-modal":!0,"aria-label":f("deleteSession.title"),tabIndex:-1,className:"dsham_sidebarCard",style:Ce?{top:Ce.top,left:Ce.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:v.title})}),N&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:f("deleteSession.pending")}),ve!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:ve}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:re,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:N,onClick:pe,children:f("cancel")}),(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:N,onClick:Ne,children:f("deleteSession.title")})]})]})]})}t($e,"DeleteSessionOverlay");let Ue=null,Xe=new Set,lt=t(f=>{Ue=f;for(let v of Xe)v()},"publishArchiveWsTarget");function Gt(){return l.useSyncExternalStore(f=>(Xe.add(f),()=>{Xe.delete(f)}),()=>Ue,()=>Ue)}t(Gt,"useArchiveWsRequest");function Ye(f){try{let v=document.querySelector(`[data-row-key="workspace:${CSS.escape(f)}"]`);return v?(v.hasAttribute("tabindex")||(v.setAttribute("tabindex","-1"),v.addEventListener("blur",()=>v.removeAttribute("tabindex"),{once:!0})),typeof c.focusWithoutRing=="function"?c.focusWithoutRing(v):v.focus(),!0):!1}catch{return!1}}t(Ye,"focusWorkspaceRow");function ie({t:f}){let v=Gt(),[N,le]=(0,l.useState)(!1),[ve,he]=(0,l.useState)(null),[Ce,ye]=(0,l.useState)(null),te=(0,l.useRef)(null),re=(0,l.useRef)(null),Te=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{if(v===null||typeof document>"u"){ye(null);return}let W=null,J=t(()=>{if(W&&W.isConnected)return W;try{W=document.querySelector(`[data-row-key="workspace:${CSS.escape(v.workspaceId)}"]`)}catch{W=null}return W},"getTargetRow"),B=t(()=>{let je=te.current,de=je?.offsetWidth||290,me=je?.offsetHeight||160,De=8,Ve=J();if(!Ve){let ge=window.innerWidth,St=window.innerHeight,et=Math.max(16,(St-me)/2),dt=Math.max(16,(ge-de)/2);ye(Me=>Me!==null&&Me.top===et&&Me.left===dt?Me:{top:et,left:dt});return}let Pe=Ve.getBoundingClientRect(),be=Pe.top-4;be+me>window.innerHeight-16&&(be=window.innerHeight-16-me),be<16&&(be=16);let ae=Pe.right+De;ae+de>window.innerWidth-16&&(ae=Pe.left-de-De),ae<16&&(ae=16),ye(ge=>ge!==null&&ge.top===be&&ge.left===ae?ge:{top:be,left:ae})},"updatePosition");B(),window.addEventListener("scroll",B,!0),window.addEventListener("resize",B);let ne=null;return typeof ResizeObserver<"u"&&te.current&&(ne=new ResizeObserver(B),ne.observe(te.current)),()=>{ne?.disconnect(),window.removeEventListener("scroll",B,!0),window.removeEventListener("resize",B)}},[v]),(0,l.useEffect)(()=>{if(v===null)return;re.current&&!re.current.disabled?re.current.focus():te.current?.focus();let W=v.workspaceId;return()=>{Ye(W)}},[v]),(0,l.useEffect)(()=>{v!==null&&N&&te.current?.focus()},[v,N]),(0,l.useEffect)(()=>{if(v===null)return;let W=t(J=>{if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),"stopImmediatePropagation"in J&&typeof J.stopImmediatePropagation=="function"&&J.stopImmediatePropagation(),N||(he(null),lt(null));return}if(J.key==="Tab"){if(J.preventDefault(),N){te.current?.focus();return}let B=re.current,ne=Te.current;if(!B||!ne)return;J.shiftKey?document.activeElement===B?ne.focus():B.focus():document.activeElement===ne?B.focus():ne.focus()}},"onKey");return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[v,N]),v===null)return null;let pe=t(()=>{N||(he(null),lt(null))},"close"),Ne=t(()=>{le(!0),he(null);let J=(e.workspaces.list?.getSnapshot?.()?.items??[]).find(de=>de.workspaceId===v.workspaceId),B=e.sessions.list?.getSnapshot?.()?.byId??{},ne=new Set(e.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),je=(J?.sessionIds??[]).filter(de=>nn(de,B,ne));ln(e.workspaces,je,C).then(()=>{le(!1),lt(null)}).catch(de=>{le(!1),he(de instanceof Error?de.message:String(de))})},"confirm");return(0,a.jsxs)("div",{className:"dsham_sidebarCardRoot",children:[(0,a.jsx)("div",{className:"dsham_sidebarCardBackdrop",onClick:pe}),(0,a.jsxs)("div",{ref:te,role:"dialog","aria-modal":!0,"aria-label":f("menu.archiveWorkspace"),tabIndex:-1,className:"dsham_sidebarCard",style:Ce?{top:Ce.top,left:Ce.left,visibility:"visible"}:{visibility:"hidden",top:0,left:0},children:[(0,a.jsx)("h3",{className:"dsham_sidebarCardTitle",children:f("archiveWorkspace.title",{n:v.count})}),(0,a.jsx)("p",{className:"dsham_sidebarCardDesc",children:f("archiveWorkspace.desc",{name:v.title})}),N&&(0,a.jsx)("div",{className:"dsham_sidebarCardDesc",role:"status",children:f("archiveWorkspace.pending")}),ve!==null&&(0,a.jsx)("div",{className:"dsham_sidebarCardError",role:"alert",children:ve}),(0,a.jsxs)("div",{className:"dsham_sidebarCardFooter",children:[(0,a.jsx)("button",{ref:re,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnCancel",disabled:N,onClick:pe,children:f("cancel")}),(0,a.jsx)("button",{ref:Te,type:"button",className:"dsham_sidebarCardBtn dsham_sidebarCardBtnDanger",disabled:N,onClick:Ne,children:f("archiveWorkspace.confirm")})]})]})]})}t(ie,"ArchiveWorkspaceOverlay");function ct(f){if(typeof document>"u"||typeof document.addEventListener!="function"||typeof MutationObserver>"u")return()=>{};let v=null,N=t(he=>{let Ce=he.target;if(!Ce)return;let ye=Ce.closest("button");if(!ye)return;let te=ye.closest('[data-row-key^="workspace:"]');if(!te)return;let re=te.getAttribute("data-row-key")?.replace(/^workspace:/,"");if(!re)return;let pe=(te.querySelector(".title")??te.querySelector("[class*='title']"))?.textContent?.trim()||re;v={workspaceId:re,title:pe}},"onPointerDown");document.addEventListener("pointerdown",N,!0);let le=t(()=>{let he=document.querySelectorAll('[role="menu"]');for(let Ce of he){if(Ce.querySelector('[data-dsham-archive-workspace="true"]'))continue;let ye=Array.from(Ce.querySelectorAll('button[role="menuitem"]'));if(ye.length===0)continue;let te=ye.find(ae=>{let ge=ae.textContent??"";return ge.includes("\u5220\u9664\u5DE5\u4F5C\u533A")||ge.includes("Delete workspace")||ge.includes("\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0447\u0435\u0435")});if(!te)continue;let re=ye.find(ae=>ae!==te)??te,Te=te.parentElement;if(!Te)continue;let pe=v;if(!pe)continue;let W=(e.workspaces.list?.getSnapshot?.()?.items??[]).find(ae=>ae.workspaceId===pe.workspaceId),J=e.sessions.list?.getSnapshot?.()?.byId??{},B=new Set(e.workspaces.list?.getSnapshot?.()?.archivedSessionIds??[]),je=(W?.sessionIds??[]).filter(ae=>nn(ae,J,B)).length,de=document.createElement("div");de.className=Te.className;let me=document.createElement("button");me.type="button",me.setAttribute("role","menuitem"),me.dataset.dshamArchiveWorkspace="true",me.className=re.className.replace(/\b(?:is-danger|danger)\b/g,"").trim();let De=re.querySelector("span"),Ve=re.querySelectorAll("span")[1],Pe=document.createElement("span");Pe.setAttribute("aria-hidden","true"),De?.className&&(Pe.className=De.className),Pe.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="M2.5 3.5h11v2.5h-11z"/><path d="M3.5 6v7.5h9V6"/><path d="M6.5 8.5h3"/></svg>';let be=document.createElement("span");Ve?.className&&(be.className=Ve.className),be.textContent=f("menu.archiveWorkspace"),me.append(Pe,be),de.append(me),je===0&&(me.disabled=!0,me.style.opacity="0.5",me.style.cursor="not-allowed"),me.addEventListener("click",ae=>{ae.preventDefault(),ae.stopPropagation(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),lt({workspaceId:pe.workspaceId,title:pe.title,count:je})}),Te.parentNode?.insertBefore(de,Te)}},"checkAndInject"),ve=new MutationObserver(le);return ve.observe(document.body,{childList:!0,subtree:!0}),()=>{document.removeEventListener("pointerdown",N,!0),ve.disconnect()}}t(ct,"setupWorkspaceMenuInjector");function Rt(){return typeof e.slots.entries!="function"?!1:e.slots.entries("sidebar.workspaces").some(f=>f.children?.[we]!==void 0)}t(Rt,"hostSidebarDeclaresSessionMenu");let L,ke,Ge,K,Tt=t(()=>{let f=Rt()?"menu":"waiting";f!==L&&(L=f,f==="menu"&&(ke??=e.slots.inject(we,()=>e.slots.register({name:we,id:"archive-manager.delete-session",order:500,locale:Oe,inject:t(()=>({}),"inject")},qe)),Ge??=e.slots.inject("shell.overlay",()=>e.slots.register({name:"shell.overlay",id:"archive-manager.delete-session",locale:Oe,inject:t(()=>({t:e.locale.bind(Oe)}),"inject")},$e)),K??=e.slots.inject("shell.overlay",()=>e.slots.register({name:"shell.overlay",id:"archive-manager.archive-workspace",locale:Oe,inject:t(()=>({t:e.locale.bind(Oe)}),"inject")},ie))))},"reconcileSidebar");Tt(),e.effect(()=>ct(e.locale.bind(Oe)),"archive-manager: workspace menu injector");let xe=typeof e.on=="function"?e.on("slots/changed",f=>{if(f==="sidebar.workspaces")try{Tt()}catch(v){console.warn("archive-manager: sidebar mode switch failed",v)}}):void 0;e.effect(()=>()=>{xe?.(),ke?.(),Ge?.(),K?.()},"archive-manager: sidebar mode"),e.slots.inject("settings.section",()=>e.slots.register({name:"settings.section",id:"archived-sessions",order:45,label:t(()=>e.locale.bind(Oe)("archived.badge"),"label"),icon:"archive",locale:Oe,inject:t(()=>({archiveSessions:Fe,archiveSession:t((f,v)=>e.workspaces.archiveSession(f,v),"archiveSession"),sessionStore:on(e.sessions.list),workspaceStore:on(e.workspaces.list),unarchiveSession:G,deleteSession:oe,unarchiveSessions:cn,deleteArchivedSessions:qt,archivedSessionMetadata:Be,openConversation:m,focusSessionWorkspace:b,viewState:i,favoriteSessions:ft,setSessionFavorite:wt,organizeBatch:vt,diagnoseSession:O,repairSession:h,sessionDetails:D,searchSessionContent:gt,searchArchivedContent:Re,previewArchivedSession:Le,t:e.locale.bind(Oe)}),"inject")},jn))}t(Fr,"applyWorkspaceBrowser");async function Br(e,s,i,u){try{await s(e)}catch(g){i(pr(g,u))}}return t(Br,"forkWithFeedback"),o.__test={forkWithFeedback:Br,unarchivedSessionIds:Yn,ArchiveSelectionToolbar:Wn,ArchivedSessionsSection:jn,zh:Qn,en:Xn,displayTitle:Ie,sessionVisible:bt,indexSubagentDescendants:Lt,isUnknownSessionError:Bt,deriveGroups:xr,deriveFlat:Cr,deriveSearchResults:Ir,deriveArchivedGroups:Jn,sortArchivedGroups:Zn,deriveArchivedBatchIds:At,archivedSessionIdsInGroups:Vn,pruneArchivedSelection:Kn,toggleArchivedSelection:an,archivedDeleteFeedback:$n,isWorkspaceTaskCandidate:nn,archiveableWorkspaceSessionCount:Ln,archiveWorkspaceDialogTarget:gr,archiveWorkspaceDialogFailureState:fr,activeSessionActivity:Ut,activeSessionRefusal:Pn,activeArchiveFromMessage:Mn,archiveSessionsViaOfficial:ln,unarchiveSessionsViaOfficial:ts,createUnarchiveSession:es,createWorkspaceViewStore:ir,migrateWorkspaceViewPersist:Nn,WORKSPACE_VIEW_PERSIST_KEY:Ft,LEGACY_WORKSPACE_VIEW_PERSIST_KEY:Tn,bindObservable:on,groupByWorkspace:On,byRecency:Et,ARCHIVE_MANAGER_REMOTE:it,currentSessionId:Ze},o.apply=Lr,o.inject=Or,r.exports}t(Ea,"startArchiveClient");
|
|
33
33
|
|
|
34
34
|
return module.exports.startArchiveClient(require);
|
|
35
35
|
}
|