lantern-harness 0.1.26 → 0.1.28
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 +31 -0
- package/dist/500.html +4 -4
- package/dist/_astro/{Base.Bilfw8As.css → Base.BbqRC8BF.css} +1 -1
- package/dist/_astro/{Base.astro_astro_type_script_index_0_lang._n0VHShs.js → Base.astro_astro_type_script_index_0_lang.CrXreVpw.js} +2 -2
- package/dist/_astro/{ChatApp.C_nGSCqd.js → ChatApp.Y5LwY4qZ.js} +1 -1
- package/dist/_astro/{DashboardBoard.g_53rLV5.js → DashboardBoard.DAUPgVh3.js} +1 -1
- package/dist/_astro/{PluginsPage.Crrq4Ibd.js → PluginsPage.C11wTsH4.js} +1 -1
- package/dist/_astro/PluginsPage.DWAMKQXl.js +1 -0
- package/dist/_astro/{PromptsLibrary.uvoZTwhi.js → PromptsLibrary.BQVt94VI.js} +1 -1
- package/dist/_astro/{ReqAnalysisBoard.Bz2de2Vj.js → ReqAnalysisBoard.C-lpty5D.js} +1 -1
- package/dist/_astro/{SettingsDialog.CC5S6knQ.js → SettingsDialog.CMEBX59L.js} +1 -1
- package/dist/_astro/app-version.q6kHEFsx.js +1 -0
- package/dist/_astro/{story-review.B5I45C1T.js → story-review.Ckqr7i5_.js} +1 -1
- package/dist/case-exec/index.html +4 -4
- package/dist/cases/generate/index.html +4 -4
- package/dist/cases/library/index.html +5 -5
- package/dist/dashboard/index.html +5 -5
- package/dist/docs/changelog/index.html +60 -33
- package/dist/docs/install/index.html +16 -16
- package/dist/docs/manual/index.html +40 -40
- package/dist/knowledge/index.html +5 -5
- package/dist/plugins/index.html +5 -5
- package/dist/pm/bugs/index.html +4 -4
- package/dist/pm/iterations/index.html +4 -4
- package/dist/pm/projects/detail/index.html +4 -4
- package/dist/pm/projects/index.html +4 -4
- package/dist/pm/requirements/index.html +4 -4
- package/dist/prompts/index.html +5 -5
- package/dist/reports/index.html +5 -5
- package/dist/requirement-analysis/index.html +5 -5
- package/dist/requirements/index.html +5 -5
- package/dist/tasks/index.html +4 -4
- package/dist/templates/index.html +5 -5
- package/dist/test-automation/index.html +4 -4
- package/dist/test-stats/index.html +4 -4
- package/dist/todos/index.html +4 -4
- package/dist/workbench/index.html +5 -5
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +15 -15
- package/lh-plugins/lh-pm.mjs +49 -33
- package/package.json +1 -1
- package/dist/_astro/PluginsPage.DzI3Xfa3.js +0 -1
- package/dist/_astro/app-version.D-te3dRV.js +0 -1
- package/docs/lantern-harness.code-workspace +0 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./app-config.DAIyT--R.js";import{i as t,o as n}from"./plugins.Di6uuouN.js";import{t as r}from"./settings.DbhUT6Ao.js";import{t as i}from"./app-version.
|
|
2
|
-
`)?`pre-wrap`:``,j(),M(),s.style.display=``,f||(s.dataset.closed=``),cancelAnimationFrame(p);let i=++v;p=requestAnimationFrame(()=>{p=requestAnimationFrame(()=>{s&&i===v&&u===e&&(f=!0,delete s.dataset.closed)})}),se(),h&&window.clearTimeout(h),h=window.setTimeout(()=>{h=0,u===e&&L()},ie)}function L(){k(),A(),v+=1,p&&=(cancelAnimationFrame(p),0),u=null,S=!1,y=null,h&&=(window.clearTimeout(h),0),s&&(f=!1,s.dataset.closed=``,m&&window.clearTimeout(m),m=window.setTimeout(()=>{m=0,!f&&s&&(s.style.display=`none`)},re))}function R(e){if(!(e instanceof Element))return null;let t=e.closest(`[data-hint]`);return t instanceof HTMLElement?t:null}function z(e){w=!0,(e.clientX!==0||e.clientY!==0)&&(C={x:e.clientX,y:e.clientY});let t=R(e.target);t!==u&&(!t||!F(t)?(A(),u&&L()):t!==b&&(A(),b=t,x=window.setTimeout(()=>{x=0;let e=b;b=null,e&&e!==u&&I(e,!0)},ae)))}function B(e){let t=R(e.target);if(t&&t===b&&A(),!t||t!==u)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||L()}function V(e){if(w)return;let t=R(e.target);t!==u&&(!t||!F(t)?u&&L():I(t,!1))}function H(e){let t=R(e.target);if(!t||t!==u)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||L()}function U(){A(),u&&L()}function W(){u&&(T(u)||O(u)||E(u)?L():D(u))}function ue(e){C={x:e.clientX,y:e.clientY},w=!0}function de(){w=!0,A(),u&&L()}function fe(e){w=!1,e.key===`Escape`&&u&&L()}function pe(){typeof document>`u`||_||(_=!0,document.addEventListener(`mouseover`,z,!0),document.addEventListener(`mouseout`,B,!0),document.addEventListener(`pointermove`,ue,{capture:!0,passive:!0}),document.addEventListener(`pointerdown`,de,!0),document.addEventListener(`focusin`,V,!0),document.addEventListener(`focusout`,H,!0),document.addEventListener(`click`,U,!0),document.addEventListener(`keydown`,fe,!0),window.addEventListener(`scroll`,W,!0),window.addEventListener(`resize`,W),window.addEventListener(`blur`,()=>{u&&L()}),document.addEventListener(`visibilitychange`,()=>{document.hidden&&u&&L()}),document.documentElement.addEventListener(`mouseleave`,()=>{u&&L()}),document.addEventListener(`astro:after-swap`,()=>{k(),v+=1,p&&=(cancelAnimationFrame(p),0),h&&=(window.clearTimeout(h),0),u=null,f=!1,y=null,s?.isConnected&&s.remove(),s=null,c=null,l=null}))}var me=[`dashboard`,`tasks`,`todos`,`projects`,`iterations`,`pmRequirements`,`bugs`,`reports`,`testStats`,`caseExec`,`cases`,`prompts`,`knowledgeLib`,`requirements`,`templates`];function he(e){return`pluginOff${e.charAt(0).toUpperCase()}${e.slice(1)}`}function G(){let e=document.documentElement;for(let n of me){let r=he(n);t(n)?delete e.dataset[r]:e.dataset[r]=`1`}}function ge(){G(),n(()=>G()),e().then(()=>G()),document.addEventListener(`astro:page-load`,G)}var _e=`tw-update-dot`,ve=3e5,K=`tw.update.badge.checked-at.v1`,ye=15e3,be=4,q=0,J=null,Y=!1,X=`tw.update.stale.reload.v1`;function xe(e){let t=e.status?.phase;return t===`installing`||t===`restarting`}function Se(e){if(e.mode
|
|
1
|
+
import{i as e}from"./app-config.DAIyT--R.js";import{i as t,o as n}from"./plugins.Di6uuouN.js";import{t as r}from"./settings.DbhUT6Ao.js";import{t as i}from"./app-version.q6kHEFsx.js";import{t as ee}from"./update.Fq2CGmCX.js";var te=100,ne=420,a=14,re=150,o=6,ie=3200,ae=180,s=null,c=null,l=null,u=null,d=null,f=!1,p=0,m=0,h=0,g=0,_=!1,v=0,y=null,b=null,x=0,S=!1,C=null,w=!1;function T(e){if(!e.isConnected||e.closest(`[data-closed]`)||e.checkVisibility&&!e.checkVisibility({checkVisibilityCSS:!0}))return!0;let t=e.getBoundingClientRect();return t.width===0&&t.height===0}function E(e){let t=e.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2;if(n<0||r<0||n>window.innerWidth||r>window.innerHeight)return!1;let i=document.elementFromPoint(n,r);return i?!(i===e||e.contains(i)||i.contains(e)):!1}function D(e){let t=e.getBoundingClientRect();y&&y.left===t.left&&y.top===t.top&&y.width===t.width&&y.height===t.height||(j(),M())}function O(e){let t=e.getBoundingClientRect();return t.bottom<=0||t.top>=window.innerHeight||t.right<=0||t.left>=window.innerWidth}function oe(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function k(){g&&=(cancelAnimationFrame(g),0)}function A(){b=null,x&&=(window.clearTimeout(x),0)}function se(){k();let e=()=>{g=0;let t=u;t&&(T(t)||O(t)||E(t)||S&&C&&!oe(t.getBoundingClientRect(),C.x,C.y)||!S&&!t.contains(document.activeElement)?L():(D(t),g=requestAnimationFrame(e)))};g=requestAnimationFrame(e)}function ce(){s&&s.isConnected||(s=document.createElement(`div`),s.setAttribute(`role`,`tooltip`),s.className=`tw-tooltip tw-tooltip-anim pointer-events-none fixed rounded-md px-2 py-1 text-[12px] leading-5 break-all text-stone-700 shadow-lg`,s.style.zIndex=String(te),s.style.maxHeight=`40vh`,s.style.overflowY=`auto`,s.dataset.closed=``,c=document.createElement(`span`),c.setAttribute(`aria-hidden`,`true`),c.className=`tw-tooltip-arrow absolute h-2 w-2`,c.style.transform=`translateX(-50%) rotate(45deg)`,l=document.createTextNode(``),s.append(c,l),document.body.appendChild(s))}function j(){if(!u)return;let e=u.getBoundingClientRect(),t=Math.min(Math.max(e.width,160),ne),n=e.bottom+72>window.innerHeight-8,r=n?e.top-o:e.bottom+o,i=Math.max(8,Math.min(e.left,Math.max(8,window.innerWidth-t-8)));d={top:r,left:i,maxWidth:t,openUp:n,arrowLeft:Math.max(a,Math.min(e.left+e.width/2-i,t-a))},y={left:e.left,top:e.top,width:e.width,height:e.height}}function M(){s&&c&&d&&(s.style.top=`${d.top}px`,s.style.left=`${d.left}px`,s.style.maxWidth=`${d.maxWidth}px`,s.classList.toggle(`is-up`,d.openUp),s.classList.toggle(`is-down`,!d.openUp),c.classList.toggle(`is-up`,d.openUp),c.classList.toggle(`is-down`,!d.openUp),c.style.left=`${d.arrowLeft}px`,c.style.top=d.openUp?``:`-5px`,c.style.bottom=d.openUp?`-5px`:``)}function N(e){let t=e.innerText||``;return e.querySelectorAll(`[class*="sr-only"]`).forEach(e=>{let n=e.innerText;n&&(t=t.replace(n,``))}),t.replace(/\s+/g,` `).trim()}function le(e){return e.scrollWidth>e.clientWidth+1||e.scrollHeight>e.clientHeight+1}function P(e){return e.dataset.hintAlways!==void 0||e.dataset.hintFit===void 0&&!N(e)||le(e)}function F(e){return!!e.dataset.hint&&P(e)}function I(e,t){let n=e.dataset.hint??``;if(!n||!P(e))return;let r=e.getBoundingClientRect();if(!r.width||!r.height||e.checkVisibility&&!e.checkVisibility({checkVisibilityCSS:!0})||E(e)||(ce(),!s||!l))return;u=e,S=t,m&&=(window.clearTimeout(m),0),l.data=n,s.style.whiteSpace=n.includes(`
|
|
2
|
+
`)?`pre-wrap`:``,j(),M(),s.style.display=``,f||(s.dataset.closed=``),cancelAnimationFrame(p);let i=++v;p=requestAnimationFrame(()=>{p=requestAnimationFrame(()=>{s&&i===v&&u===e&&(f=!0,delete s.dataset.closed)})}),se(),h&&window.clearTimeout(h),h=window.setTimeout(()=>{h=0,u===e&&L()},ie)}function L(){k(),A(),v+=1,p&&=(cancelAnimationFrame(p),0),u=null,S=!1,y=null,h&&=(window.clearTimeout(h),0),s&&(f=!1,s.dataset.closed=``,m&&window.clearTimeout(m),m=window.setTimeout(()=>{m=0,!f&&s&&(s.style.display=`none`)},re))}function R(e){if(!(e instanceof Element))return null;let t=e.closest(`[data-hint]`);return t instanceof HTMLElement?t:null}function z(e){w=!0,(e.clientX!==0||e.clientY!==0)&&(C={x:e.clientX,y:e.clientY});let t=R(e.target);t!==u&&(!t||!F(t)?(A(),u&&L()):t!==b&&(A(),b=t,x=window.setTimeout(()=>{x=0;let e=b;b=null,e&&e!==u&&I(e,!0)},ae)))}function B(e){let t=R(e.target);if(t&&t===b&&A(),!t||t!==u)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||L()}function V(e){if(w)return;let t=R(e.target);t!==u&&(!t||!F(t)?u&&L():I(t,!1))}function H(e){let t=R(e.target);if(!t||t!==u)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||L()}function U(){A(),u&&L()}function W(){u&&(T(u)||O(u)||E(u)?L():D(u))}function ue(e){C={x:e.clientX,y:e.clientY},w=!0}function de(){w=!0,A(),u&&L()}function fe(e){w=!1,e.key===`Escape`&&u&&L()}function pe(){typeof document>`u`||_||(_=!0,document.addEventListener(`mouseover`,z,!0),document.addEventListener(`mouseout`,B,!0),document.addEventListener(`pointermove`,ue,{capture:!0,passive:!0}),document.addEventListener(`pointerdown`,de,!0),document.addEventListener(`focusin`,V,!0),document.addEventListener(`focusout`,H,!0),document.addEventListener(`click`,U,!0),document.addEventListener(`keydown`,fe,!0),window.addEventListener(`scroll`,W,!0),window.addEventListener(`resize`,W),window.addEventListener(`blur`,()=>{u&&L()}),document.addEventListener(`visibilitychange`,()=>{document.hidden&&u&&L()}),document.documentElement.addEventListener(`mouseleave`,()=>{u&&L()}),document.addEventListener(`astro:after-swap`,()=>{k(),v+=1,p&&=(cancelAnimationFrame(p),0),h&&=(window.clearTimeout(h),0),u=null,f=!1,y=null,s?.isConnected&&s.remove(),s=null,c=null,l=null}))}var me=[`dashboard`,`tasks`,`todos`,`projects`,`iterations`,`pmRequirements`,`bugs`,`reports`,`testStats`,`caseExec`,`cases`,`prompts`,`knowledgeLib`,`requirements`,`templates`];function he(e){return`pluginOff${e.charAt(0).toUpperCase()}${e.slice(1)}`}function G(){let e=document.documentElement;for(let n of me){let r=he(n);t(n)?delete e.dataset[r]:e.dataset[r]=`1`}}function ge(){G(),n(()=>G()),e().then(()=>G()),document.addEventListener(`astro:page-load`,G)}var _e=`tw-update-dot`,ve=3e5,K=`tw.update.badge.checked-at.v1`,ye=15e3,be=4,q=0,J=null,Y=!1,X=`tw.update.stale.reload.v1`;function xe(e){let t=e.status?.phase;return t===`installing`||t===`restarting`}function Se(e){if(e.mode===`dev`&&!xe(e)&&e.current&&e.current!==i){try{let e=Number(localStorage.getItem(X))||0;if(Date.now()-e<6e4)return;localStorage.setItem(X,String(Date.now()))}catch{}window.location.reload()}}function Ce(){try{return Number(localStorage.getItem(K))||0}catch{return 0}}function Z(){try{localStorage.setItem(K,String(Date.now()))}catch{}}function we(e,t,n){e.hidden=!n,e.closest(`.tw-nav-brand-ver`)?.classList.toggle(`has-update`,n),n&&e.setAttribute(`aria-label`,t?`有新版本可用 v${t}`:`有新版本可更新`)}function Te(e,t){q>=be||(q+=1,J!==null&&window.clearTimeout(J),J=window.setTimeout(()=>{J=null,Q(e,t)},ye))}async function Q(e,t){if(!Y){Y=!0;try{let n=await ee(t);if(!n){Te(e,t);return}q=0,Z();let r=!!n.current&&n.current!==i;we(e,n.latest,!!n.hasUpdate||r),r&&Se(n)}finally{Y=!1}}}function $(){let e=document.getElementById(_e);if(!e)return;e.dataset.bound!==`1`&&(e.dataset.bound=`1`,e.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation(),window.dispatchEvent(new CustomEvent(r,{detail:{tab:`general`}}))}));let t=Date.now()-Ce()>ve;q=0,Q(e,t)}function Ee(){document.addEventListener(`astro:page-load`,$),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&$()}),document.readyState!==`loading`&&$()}pe(),ge(),Ee();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/lib.S37S0T6S.js","_astro/react.Blvh0GOs.js","_astro/jszip.min.Bh2Mgo40.js","_astro/export.joBT53eb.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{s as e,t}from"./react.Blvh0GOs.js";import{B as n,H as r,U as i,V as a,W as o,i as s,p as c,r as l,t as u,u as d,z as f}from"./app-config.DAIyT--R.js";import{a as p,i as m,o as h,s as g,t as _}from"./plugins.Di6uuouN.js";import{l as v,n as y,r as b}from"./case-exec.BipZCK6G.js";import{n as x,o as S}from"./view-prefs.DkS1ldnh.js";import{t as C}from"./react-dom.DLW9pGCF.js";import{i as w,n as T,r as E,t as D}from"./dialog.DZHZCe_T.js";import{i as ee,n as te,r as ne,t as re}from"./menu.Dnrpz489.js";import{t as O}from"./jsx-runtime.DUg_B_vD.js";import{t as k}from"./ConfirmDialog.D5qXeML0.js";import{t as ie}from"./DatePicker.Bkl71M49.js";import{t as A}from"./OverflowHint.pvo2Xc8R.js";import{t as ae}from"./SelectDropdown.apWlFGbA.js";import{showToast as j}from"./Toast.BO2NFckG.js";import{a as oe,i as se,n as M,o as N,r as ce,t as le}from"./case-types.B6MLX3iE.js";import{a as ue,c as P,o as de,s as fe,t as pe}from"./case-gen-run.Byxy6M5X.js";import{a as F,i as me,t as I}from"./export.joBT53eb.js";import{i as he,n as ge,r as _e}from"./case-template.F1Nv08GV.js";import{Z as ve,g as ye,k as be,w as xe}from"./req-analysis.CIZ_cIJQ.js";import{c as L,f as R,p as Se,r as Ce,u as we,v as Te}from"./project-docs.DAw9bzgk.js";import{a as Ee,i as De,r as Oe,s as ke,t as Ae}from"./llm.DyweO-KK.js";import{n as je,t as Me}from"./doc-roots.DAJP9Svr.js";import{a as Ne,l as Pe,n as Fe,r as Ie,t as Le}from"./prompts-meta.C_MeYq8G.js";import{a as Re,b as ze,c as Be,f as Ve,h as He,m as Ue,p as We,r as Ge,s as Ke,u as qe}from"./settings.DbhUT6Ao.js";import{t as Je}from"./ExcelFieldTags.CXif3Ilh.js";import{t as Ye}from"./MultiSelectDropdown.BHxW9XLR.js";import{t as Xe}from"./SearchableSelect.D3ODywC4.js";import{A as Ze,C as Qe,D as $e,E as et,O as z,S as tt,T as nt,_ as rt,a as it,b as at,c as ot,d as st,f as ct,g as lt,h as ut,i as dt,k as ft,l as pt,m as mt,n as ht,o as gt,p as _t,r as vt,s as yt,u as bt,v as xt,w as St,x as Ct,y as wt}from"./open-docs-in-session.D608wzlx.js";import{t as Tt}from"./NamePromptDialog.Csfnh5eM.js";import{C as Et,E as Dt,M as Ot,O as kt,R as At,S as jt,T as B,a as Mt,d as Nt,g as Pt,h as Ft,k as It,l as Lt,r as Rt,s as zt,t as V,w as Bt,x as Vt,y as Ht}from"./pm.BXmOiFfW.js";import{t as Ut}from"./SlideOverDrawer.C1IVOc_8.js";import{a as Wt,c as Gt,i as Kt,n as qt,o as Jt,r as Yt,s as Xt}from"./composer-task.DJmluzPT.js";import{n as Zt}from"./i18n.ele1lM9e.js";import{n as Qt,t as $t}from"./PromptMountDialog.CpTT6L0a.js";import{_ as en,a as tn,b as nn,c as rn,d as an,f as on,g as sn,h as cn,i as ln,l as un,m as dn,n as fn,o as pn,p as mn,r as hn,s as gn,t as _n,u as vn,v as yn,y as bn}from"./fs-tools.3F9MFrLf.js";import{C as xn,D as Sn,E as Cn,F as wn,O as Tn,P as En,S as H,T as Dn,_ as On,a as kn,b as An,c as jn,d as Mn,g as Nn,i as Pn,j as Fn,k as In,l as Ln,m as Rn,n as U,o as zn,r as Bn,t as Vn,u as Hn,v as Un,x as Wn,y as Gn}from"./tasks.jfnSAEmg.js";import{_ as Kn,a as W,c as qn,d as Jn,f as Yn,g as Xn,h as Zn,i as Qn,l as $n,m as er,n as tr,o as nr,p as rr,r as ir,s as ar,t as or,u as sr,v as cr,y as lr}from"./bash-tools.D4DBYc9k.js";import{_ as ur,a as dr,b as fr,d as pr,f as mr,g as hr,h as gr,i as _r,l as vr,m as yr,n as br,o as G,p as xr,r as Sr,s as Cr,t as wr,u as Tr,v as Er,y as Dr}from"./PluginsPage.
|
|
2
|
+
import{s as e,t}from"./react.Blvh0GOs.js";import{B as n,H as r,U as i,V as a,W as o,i as s,p as c,r as l,t as u,u as d,z as f}from"./app-config.DAIyT--R.js";import{a as p,i as m,o as h,s as g,t as _}from"./plugins.Di6uuouN.js";import{l as v,n as y,r as b}from"./case-exec.BipZCK6G.js";import{n as x,o as S}from"./view-prefs.DkS1ldnh.js";import{t as C}from"./react-dom.DLW9pGCF.js";import{i as w,n as T,r as E,t as D}from"./dialog.DZHZCe_T.js";import{i as ee,n as te,r as ne,t as re}from"./menu.Dnrpz489.js";import{t as O}from"./jsx-runtime.DUg_B_vD.js";import{t as k}from"./ConfirmDialog.D5qXeML0.js";import{t as ie}from"./DatePicker.Bkl71M49.js";import{t as A}from"./OverflowHint.pvo2Xc8R.js";import{t as ae}from"./SelectDropdown.apWlFGbA.js";import{showToast as j}from"./Toast.BO2NFckG.js";import{a as oe,i as se,n as M,o as N,r as ce,t as le}from"./case-types.B6MLX3iE.js";import{a as ue,c as P,o as de,s as fe,t as pe}from"./case-gen-run.Byxy6M5X.js";import{a as F,i as me,t as I}from"./export.joBT53eb.js";import{i as he,n as ge,r as _e}from"./case-template.F1Nv08GV.js";import{Z as ve,g as ye,k as be,w as xe}from"./req-analysis.CIZ_cIJQ.js";import{c as L,f as R,p as Se,r as Ce,u as we,v as Te}from"./project-docs.DAw9bzgk.js";import{a as Ee,i as De,r as Oe,s as ke,t as Ae}from"./llm.DyweO-KK.js";import{n as je,t as Me}from"./doc-roots.DAJP9Svr.js";import{a as Ne,l as Pe,n as Fe,r as Ie,t as Le}from"./prompts-meta.C_MeYq8G.js";import{a as Re,b as ze,c as Be,f as Ve,h as He,m as Ue,p as We,r as Ge,s as Ke,u as qe}from"./settings.DbhUT6Ao.js";import{t as Je}from"./ExcelFieldTags.CXif3Ilh.js";import{t as Ye}from"./MultiSelectDropdown.BHxW9XLR.js";import{t as Xe}from"./SearchableSelect.D3ODywC4.js";import{A as Ze,C as Qe,D as $e,E as et,O as z,S as tt,T as nt,_ as rt,a as it,b as at,c as ot,d as st,f as ct,g as lt,h as ut,i as dt,k as ft,l as pt,m as mt,n as ht,o as gt,p as _t,r as vt,s as yt,u as bt,v as xt,w as St,x as Ct,y as wt}from"./open-docs-in-session.D608wzlx.js";import{t as Tt}from"./NamePromptDialog.Csfnh5eM.js";import{C as Et,E as Dt,M as Ot,O as kt,R as At,S as jt,T as B,a as Mt,d as Nt,g as Pt,h as Ft,k as It,l as Lt,r as Rt,s as zt,t as V,w as Bt,x as Vt,y as Ht}from"./pm.BXmOiFfW.js";import{t as Ut}from"./SlideOverDrawer.C1IVOc_8.js";import{a as Wt,c as Gt,i as Kt,n as qt,o as Jt,r as Yt,s as Xt}from"./composer-task.DJmluzPT.js";import{n as Zt}from"./i18n.ele1lM9e.js";import{n as Qt,t as $t}from"./PromptMountDialog.CpTT6L0a.js";import{_ as en,a as tn,b as nn,c as rn,d as an,f as on,g as sn,h as cn,i as ln,l as un,m as dn,n as fn,o as pn,p as mn,r as hn,s as gn,t as _n,u as vn,v as yn,y as bn}from"./fs-tools.3F9MFrLf.js";import{C as xn,D as Sn,E as Cn,F as wn,O as Tn,P as En,S as H,T as Dn,_ as On,a as kn,b as An,c as jn,d as Mn,g as Nn,i as Pn,j as Fn,k as In,l as Ln,m as Rn,n as U,o as zn,r as Bn,t as Vn,u as Hn,v as Un,x as Wn,y as Gn}from"./tasks.jfnSAEmg.js";import{_ as Kn,a as W,c as qn,d as Jn,f as Yn,g as Xn,h as Zn,i as Qn,l as $n,m as er,n as tr,o as nr,p as rr,r as ir,s as ar,t as or,u as sr,v as cr,y as lr}from"./bash-tools.D4DBYc9k.js";import{_ as ur,a as dr,b as fr,d as pr,f as mr,g as hr,h as gr,i as _r,l as vr,m as yr,n as br,o as G,p as xr,r as Sr,s as Cr,t as wr,u as Tr,v as Er,y as Dr}from"./PluginsPage.C11wTsH4.js";import{c as Or,n as kr,t as Ar}from"./report-prompt.CAfZ6RIo.js";import{a as jr}from"./test-stats.MEm3K2rB.js";import{i as Mr}from"./ui-auto-prompt.l_EXfDs5.js";import{h as Nr}from"./ui-auto.BmC9JJ_X.js";import{b as Pr,l as Fr,v as Ir}from"./story-review.Ckqr7i5_.js";var K=e(t(),1),Lr=e(C(),1),Rr=`/__tb_sessions/runs`;async function zr(e){try{return(await fetch(Rr,{signal:e??AbortSignal.timeout(1500)})).ok}catch{return!1}}async function Br(e){let t=await fetch(Rr,{signal:e??AbortSignal.timeout(3e3)});if(!t.ok)return[];let n=await t.json();return Array.isArray(n.runs)?n.runs:[]}async function Vr(e){let t=await fetch(Rr,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));return t.ok?{ok:!0}:{ok:!1,error:n.error||`HTTP ${t.status}`}}async function Hr(e){await fetch(`${Rr}/${encodeURIComponent(e)}/stop`,{method:`POST`}).catch(()=>{})}async function Ur(e){try{let t=await fetch(`${Rr}/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(3e3)});return t.status===404?{ok:!1}:t.ok?await t.json():null}catch{return null}}function Wr(e){return e===`completed`||e===`stopped`||e===`error`}function Gr(e,t,n,r){let i=new AbortController,a=`${Rr}/${encodeURIComponent(e)}/events?after=${Math.max(0,t)}`;return(async()=>{try{let e=await fetch(a,{headers:{Accept:`text/event-stream`},signal:i.signal});if(!e.ok||!e.body){r?.(Error(`SSE ${e.status}`));return}let t=e.body.getReader(),o=new TextDecoder,s=``;for(;;){let{done:e,value:a}=await t.read();if(e){i.signal.aborted||r?.(Error(`SSE disconnected`));break}s+=o.decode(a,{stream:!0});let c=s.split(`
|
|
3
3
|
`);s=c.pop()??``;for(let e of c){let t=e.trim();if(!t.startsWith(`data:`))continue;let r=t.slice(5).trim();if(r)try{n(JSON.parse(r))}catch{}}}}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;r?.(e instanceof Error?e:Error(String(e)))}})(),()=>i.abort()}function Kr(e,t,n){let r=!1,i=Math.max(0,t),a=0,o=null,s,c=n.maxAttempts??10,l=()=>{r=!0,s!=null&&clearTimeout(s),s=void 0,o?.(),o=null},u=()=>{r||n.signal?.aborted||(o?.(),o=Gr(e,i,e=>{typeof e.seq==`number`&&Number.isFinite(e.seq)&&(i=Math.max(i,e.seq)),n.onEvent(e),e.type===`status`&&Wr(e.status)&&(n.onTerminal?.(e),l())},t=>{r||n.signal?.aborted||(async()=>{a+=1;try{let r=await Ur(e);if(r?.ok&&typeof r.seq==`number`&&(i=Math.max(i,r.seq)),r?.ok&&Wr(r.status)){let e={type:`status`,status:r.status,seq:r.seq,assistant:r.assistant};n.onEvent(e),n.onTerminal?.(e),l();return}if(r&&r.ok===!1){n.onGaveUp?.(Error(t.message||`run not found`)),l();return}}catch{}if(a>=c){n.onGaveUp?.(t),l();return}let r=Math.min(4e3,250*a);s=setTimeout(u,r)})()}))},d=()=>l();return n.signal?.addEventListener(`abort`,d),u(),()=>{n.signal?.removeEventListener(`abort`,d),l()}}function qr(e){for(let t of e)if(t.role===`user`&&typeof t.content==`string`){let e=t.content.trim();if(e)return e}return``}function Jr(e,t){let n=(e||``).trim()||`新对话`;return n===`新对话`||n===nt(t)}function Yr(e){let t=String(e??``).trim().replace(/^["「『]+|["」』]+$/g,``).replace(/\s+/g,` `).replace(/^标题[::]\s*/i,``);return t=t.replace(/[。.!!]+$/g,``).trim(),t?t.length>28?`${t.slice(0,28)}…`:t:``}async function Xr(e,t,n){let r=t.trim().slice(0,800);if(!r)return null;let i=[{role:`system`,content:`你为对话生成侧栏短标题。只输出标题本身:中文优先,不超过 16 个字,无引号、无标点收尾、无解释。`},{role:`user`,content:`用户首条消息:\n${r}\n\n请给出标题:`}];try{return Yr(await Oe(e,i,n))||null}catch{return null}}function Zr(e){let t=Array.isArray(e.messages)?e.messages:[],n=0,r=0,i=0,a=0,o=0;for(let e of t){if(!e||typeof e!=`object`)continue;let t=e;t.role===`user`?n+=1:t.role===`assistant`&&(r+=1);let s=t.usage;if(s&&typeof s==`object`){let e=s;typeof e.promptTokens==`number`&&(i+=e.promptTokens),typeof e.completionTokens==`number`&&(a+=e.completionTokens),typeof e.totalTokens==`number`?o+=e.totalTokens:(typeof e.promptTokens==`number`||typeof e.completionTokens==`number`)&&(o+=(Number(e.promptTokens)||0)+(Number(e.completionTokens)||0))}}let s=e.goal,c=!!(s&&s.status!==`cleared`&&s.text?.trim());return{sessionId:e.id,title:e.title||`新对话`,messageCount:t.length,userCount:n,assistantCount:r,promptTokens:i,completionTokens:a,totalTokens:o,createdAt:e.createdAt,updatedAt:e.updatedAt,hasGoal:c,todoCount:Array.isArray(e.todos)?e.todos.length:0}}function Qr(e){let t=new Date(e.createdAt).toLocaleString(),n=new Date(e.updatedAt).toLocaleString();return[`会话:${e.title}`,`消息 ${e.messageCount}(用户 ${e.userCount} / 助手 ${e.assistantCount})`,`用量≈ 输入 ${e.promptTokens} · 输出 ${e.completionTokens} · 合计 ${e.totalTokens}`,`待办 ${e.todoCount} · 目标 ${e.hasGoal?`有`:`无`}`,`创建 ${t}`,`更新 ${n}`].join(`
|
|
4
4
|
`)}var $r=new Map,ei=new Map,ti=40;function ni(e,t,n=``){return`${e}:${t}:${n}`}function ri(e){for(;e.size>ti;){let t=e.keys().next().value;if(t===void 0)break;e.delete(t)}}function ii(e,t,n,r,i=``){let a=e===`outline`?$r:ei,o=ni(t,n,i),s=a.get(t);if(s&&s.stamp===o)return s.value;let c=r();return a.set(t,{stamp:o,value:c}),ri(a),c}var ai=`/__tb_sessions/log`;function oi(e){let t=String(e.userContent??``).trim(),n=String(e.assistantContent??``).trim(),r=String(e.reasoning??``).trim(),i=[];if(t&&i.push({role:`user`,content:t}),n||r){let e={role:`assistant`,content:n};r&&(e.reasoning_content=r),i.push(e)}return i}async function si(e){try{let t=await fetch(ai,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:AbortSignal.timeout(5e3)}),n=await t.json().catch(()=>({}));return t.ok?{ok:!0,path:n.path}:{ok:!1,error:n.error||`HTTP ${t.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function ci(e){return String(e??``).trim()}function li(e,t=80){let n=ci(e).replace(/\s+/g,` `);return n?n.length>t?`${n.slice(0,t)}…`:n:``}function ui(e,t=40){let n=[],r=null;for(let i=0;i<e.length;i++){let a=e[i];if(a.role===`user`){let e=ci(a.content),t=li(e);if(!t)continue;r&&n.push({index:n.length+1,userPreview:r.preview,assistantPreview:``,userText:r.text,assistantText:``,userTime:r.time,endMessageIndex:r.messageIndex}),r={text:e,preview:t,time:typeof a.time==`number`?a.time:void 0,messageIndex:i}}else if(a.role===`assistant`&&r){let e=ci(a.content),t=ci(a.reasoning)||void 0;n.push({index:n.length+1,userPreview:r.preview,assistantPreview:li(e)||(t?`(含思考)`:``),userText:r.text,assistantText:e,reasoning:t,reasoningDuration:typeof a.reasoningDuration==`number`?a.reasoningDuration:void 0,userTime:r.time,assistantTime:typeof a.time==`number`?a.time:void 0,endMessageIndex:i}),r=null}if(n.length>=t)break}return r&&n.length<t&&n.push({index:n.length+1,userPreview:r.preview,assistantPreview:``,userText:r.text,assistantText:``,userTime:r.time,endMessageIndex:r.messageIndex}),n}function di(e,t){let n=String(t??``).trim();return!n||n===`inherit`||n===e.model?e:{...e,model:n}}var fi=`/__tb_fs`,pi=`你可以使用 office_to_pdf:优先用本机 LibreOffice 转为 PDF;若未安装,则对 docx/xlsx/pptx 降级抽取正文为同目录 .extracted.md(需写权限)。`,mi={type:`function`,function:{name:`office_to_pdf`,description:`Convert Office docs to PDF via LibreOffice when available; otherwise extract text to .extracted.md for docx/xlsx/pptx.`,parameters:{type:`object`,properties:{path:{type:`string`,description:`Input file path relative to workspace (or absolute when allowed)`},outDir:{type:`string`,description:`Optional output directory (default: same as input)`}},required:[`path`]}}};async function hi(e,t,n){if(e!==`office_to_pdf`)return JSON.stringify({error:`unknown tool: ${e}`});let r={};try{r=JSON.parse(t||`{}`)}catch{return JSON.stringify({ok:!1,error:`invalid JSON arguments`})}let i=String(r.path??``).trim();if(!i)return JSON.stringify({ok:!1,error:`path is required`});try{let e=await(await fetch(`${fi}/office-to-pdf`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:i,outDir:typeof r.outDir==`string`?r.outDir:void 0,access:n}),signal:AbortSignal.timeout(13e4)})).json().catch(()=>({}));return JSON.stringify(e,null,2)}catch(e){return JSON.stringify({ok:!1,error:e instanceof Error?e.message:String(e)})}}var gi=`/__tb_fs`,_i=`你可以使用 load_workspace_dependencies:查询本机 node / npm / pnpm / python 等可执行文件绝对路径(需本地 fs 服务)。`,vi={type:`function`,function:{name:`load_workspace_dependencies`,description:`Resolve absolute paths of common runtimes/package managers on this machine (node, npm, pnpm, python, …).`,parameters:{type:`object`,properties:{}}}};async function yi(e){if(e!==`load_workspace_dependencies`)return JSON.stringify({error:`unknown tool: ${e}`});try{let e=await fetch(`${gi}/workspace-dependencies`,{signal:AbortSignal.timeout(8e3)}),t=await e.json().catch(()=>({}));if(!e.ok){let n=typeof t==`object`&&t&&`error`in t?String(t.error):`HTTP ${e.status}`;return JSON.stringify({ok:!1,error:n})}return JSON.stringify(t,null,2)}catch(e){return JSON.stringify({ok:!1,error:e instanceof Error?e.message:String(e)})}}function bi(e){return Array.isArray(e)}function xi(e){return bi(e)?e.some(e=>e.type===`image_url`):!1}function Si(e){let t=e.filter(e=>e.type===`text`).map(e=>e.text),n=e.filter(e=>e.type===`image_url`).length,r=n>0?`[image-offload] 已卸载 ${n} 张图片(超预算,仅保留最近附图)。`:``;return[{type:`text`,text:[...t,r].filter(Boolean).join(`
|
|
5
5
|
`)||r||`(图片已卸载)`}]}function Ci(e,t={}){let n=Math.max(0,Math.floor(t.keepRecentImageMessages??1)),r=[];for(let t=0;t<e.length;t++){let n=e[t];n.role===`user`&&xi(n.content)&&r.push(t)}if(r.length<=n)return e;let i=new Set(r.slice(-n)),a=!1,o=e.map((e,t)=>e.role!==`user`||!xi(e.content)||i.has(t)||!bi(e.content)?e:(a=!0,{...e,content:Si(e.content)}));return a?o:e}var wi=/(\s*(TP-[A-Za-z0-9_-]+)\s*)|\(\s*(TP-[A-Za-z0-9_-]+)\s*\)/i;function Ti(e){let t=String(e||``).replace(/\r\n/g,`
|