lantern-harness 0.1.17 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +68 -9
  2. package/dist/500.html +3 -3
  3. package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.CaBtSEmL.js → Base.astro_astro_type_script_index_0_lang.BMvdPyIE.js} +1 -1
  4. package/dist/_astro/CaseGenerateApp.DLcUOrpS.js +9 -0
  5. package/dist/_astro/CasesLibrary.BERmgS2j.js +19 -0
  6. package/dist/_astro/{ChatApp.BoTr-jsm.js → ChatApp.azDLrlxw.js} +8 -8
  7. package/dist/_astro/KnowledgeLibrary.D0r8ieOZ.js +1 -0
  8. package/dist/_astro/PluginsPage.BNlpKMUM.js +1 -0
  9. package/dist/_astro/{PluginsPage.DtMHumy8.js → PluginsPage.Du4g_yr4.js} +1 -1
  10. package/dist/_astro/PromptsLibrary.17cDZsjQ.js +1 -0
  11. package/dist/_astro/ReqAnalysisBoard.CBgma-zG.js +29 -0
  12. package/dist/_astro/{RequirementsLibrary.CgzwlAXi.js → RequirementsLibrary.B5TE-2Ds.js} +1 -1
  13. package/dist/_astro/{SettingsDialog.OaLXsUUu.js → SettingsDialog.BMa8eGFr.js} +1 -1
  14. package/dist/_astro/{SpaceSwitcher.DMoqOVpS.js → SpaceSwitcher.B8dzGxrR.js} +1 -1
  15. package/dist/_astro/{TemplatesLibrary.B5KmjjFw.js → TemplatesLibrary.DazYm5Sh.js} +1 -1
  16. package/dist/_astro/{UiAutoBoard.DJljpjXT.js → UiAutoBoard.BwKG4DcV.js} +1 -1
  17. package/dist/_astro/app-version.CdxtY1WM.js +1 -0
  18. package/dist/_astro/project-docs.DAw9bzgk.js +1 -0
  19. package/dist/_astro/req-analysis.DGQa1vaH.js +6 -0
  20. package/dist/_astro/{story-review.DT3vpEfU.js → story-review.BjrulZG8.js} +1 -1
  21. package/dist/_astro/{ui-auto-prompt.QcLCZoV6.js → ui-auto-prompt.l_EXfDs5.js} +2 -2
  22. package/dist/_astro/{update.DXCPfU4a.js → update.Fq2CGmCX.js} +1 -1
  23. package/dist/case-exec/index.html +3 -3
  24. package/dist/cases/generate/index.html +4 -4
  25. package/dist/cases/library/index.html +4 -4
  26. package/dist/dashboard/index.html +3 -3
  27. package/dist/docs/changelog/index.html +66 -13
  28. package/dist/docs/install/index.html +3 -3
  29. package/dist/docs/manual/index.html +9 -7
  30. package/dist/knowledge/index.html +4 -4
  31. package/dist/knowledge//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/347/274/226/345/206/231/350/247/204/350/214/203/index.html +3 -3
  32. package/dist/plugins/index.html +4 -4
  33. package/dist/pm/bugs/index.html +3 -3
  34. package/dist/pm/iterations/index.html +3 -3
  35. package/dist/pm/projects/detail/index.html +3 -3
  36. package/dist/pm/projects/index.html +3 -3
  37. package/dist/pm/requirements/index.html +3 -3
  38. package/dist/prompts/index.html +4 -4
  39. package/dist/reports/index.html +3 -3
  40. package/dist/requirement-analysis/index.html +4 -4
  41. package/dist/requirements/index.html +4 -4
  42. package/dist/tasks/index.html +3 -3
  43. package/dist/templates/index.html +4 -4
  44. package/dist/templates//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +3 -3
  45. package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +3 -3
  46. package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +3 -3
  47. package/dist/templates//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +3 -3
  48. package/dist/templates//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +3 -3
  49. package/dist/test-automation/index.html +4 -4
  50. package/dist/test-stats/index.html +3 -3
  51. package/dist/todos/index.html +3 -3
  52. package/dist/workbench/index.html +4 -4
  53. package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +6 -4
  54. package/lh-plugins/case-review-prompt.mjs +67 -54
  55. package/lh-plugins/lh-reports.mjs +65 -6
  56. package/lh-plugins/lh-req-analysis.mjs +9 -1
  57. package/lh-plugins/lh-update.mjs +11 -2
  58. package/lh-plugins/req-analysis-prompt.mjs +13 -10
  59. package/lh-plugins/story-review-prompt.mjs +26 -16
  60. package/lh-plugins/test-points-prompt.mjs +13 -9
  61. package/lh-plugins/uiauto-prompt.mjs +30 -23
  62. package/package.json +1 -1
  63. package/dist/_astro/CaseGenerateApp.D2ftaUXT.js +0 -9
  64. package/dist/_astro/CasesLibrary.DWXEje9u.js +0 -19
  65. package/dist/_astro/KnowledgeLibrary.Dw-IX3Zt.js +0 -1
  66. package/dist/_astro/PluginsPage.ev2imTDc.js +0 -1
  67. package/dist/_astro/PromptsLibrary.D6uvqZFz.js +0 -1
  68. package/dist/_astro/ReqAnalysisBoard.BVi6hHme.js +0 -28
  69. package/dist/_astro/app-version.zuhxTsqO.js +0 -1
  70. package/dist/_astro/project-docs.Cd2gKPKh.js +0 -1
  71. package/dist/_astro/req-analysis.CkLx8c9E.js +0 -6
@@ -3,7 +3,7 @@
3
3
  try {
4
4
  if ('scrollRestoration' in history) history.scrollRestoration = 'manual';
5
5
  } catch (e) {}
6
- </script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.CaBtSEmL.js"></script><meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback" content="animate"><script type="module" src="/_astro/ClientRouter.astro_astro_type_script_index_0_lang.CO1cjG9V.js"></script><script>
6
+ </script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.BMvdPyIE.js"></script><meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback" content="animate"><script type="module" src="/_astro/ClientRouter.astro_astro_type_script_index_0_lang.CO1cjG9V.js"></script><script>
7
7
  (function () {
8
8
  try {
9
9
  // 配置按空间分键(`tw.app.config.v1::<spaceId>`),主题必须从同一个键读,
@@ -134,7 +134,7 @@
134
134
  animation-duration: 180ms;
135
135
  animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
136
136
  animation-fill-mode: both;
137
- animation-name: astroFadeIn; }</style></head><body class="tw-body antialiased"><div class="tw-shell min-h-screen"><aside class="tw-nav-aside fixed inset-y-0 left-0 flex flex-col z-45" id="tw-nav-aside"><div class="tw-nav-brand"><div class="tw-nav-brand-row"><a href="/" class="tw-nav-brand-link min-w-0 flex-1" data-astro-reload><span class="tw-nav-brand-mark" aria-hidden="true"><img class="tw-nav-brand-mark-img" src="/brand/brand-mark.png" alt="" width="36" height="36"></span><span class="tw-nav-brand-text"><span class="tw-nav-brand-title-row"><span class="tw-nav-brand-title" data-i18n="nav.brand">Lantern Harness</span><span class="tw-nav-brand-ver" data-hint="平台版本 v0.1.17">v0.1.17<span class="tw-nav-brand-dot" id="tw-update-dot" role="button" tabindex="-1" aria-label="有新版本可更新" hidden></span></span></span></span></a></div></div><div class="tw-nav-space-slot"><div class="tw-nav-space tw-nav-space-ph" id="tw-nav-space-ph" aria-hidden="true"><div class="tw-nav-space-ph-box"><span class="tw-nav-space-ph-ico"></span><span class="tw-nav-space-ph-lines"><span class="tw-nav-space-ph-bar is-cap"></span><span class="tw-nav-space-ph-bar is-name"></span></span></div></div><style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).only=e,window.dispatchEvent(new Event(`astro:only`))})();</script><script>(function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i=/* @__PURE__ */ new Set([`__proto__`,`constructor`,`prototype`]);{let e={0:e=>a(e),1:e=>n(e),2:e=>new RegExp(e),3:e=>new Date(e),4:e=>new Map(n(e)),5:e=>new Set(n(e)),6:e=>BigInt(e),7:e=>new URL(e),8:e=>new Uint8Array(e),9:e=>new Uint16Array(e),10:e=>new Uint32Array(e),11:e=>1/0*e},t=t=>{let[n,r]=t;return n in e?e[n](r):void 0},n=e=>e.map(t),a=e=>typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]));class o extends HTMLElement{constructor(...e){super(...e),r(this,`Component`,void 0),r(this,`hydrator`,void 0),r(this,`hydrate`,async()=>{var e;if(!this.hydrator||!this.isConnected)return;let t=(e=this.parentElement)==null?void 0:e.closest(`astro-island[ssr]`);if(t){t.addEventListener(`astro:hydrate`,this.hydrate,{once:!0});return}let n=this.querySelectorAll(`astro-slot`),r={},i=this.querySelectorAll(`template[data-astro-template]`);for(let e of i){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`data-astro-template`)||`default`]=e.innerHTML,e.remove())}for(let e of n){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`name`)||`default`]=e.innerHTML)}let o;try{o=this.hasAttribute(`props`)?a(JSON.parse(this.getAttribute(`props`))):{}}catch(e){let t=this.getAttribute(`component-url`)||`<unknown>`,n=this.getAttribute(`component-export`);throw n&&(t+=` (export ${n})`),console.error(`[hydrate] Error parsing props for component ${t}`,this.getAttribute(`props`),e),e}await this.hydrator(this)(this.Component,o,r,{client:this.getAttribute(`client`)}),this.removeAttribute(`ssr`),this.dispatchEvent(new CustomEvent(`astro:hydrate`))}),r(this,`unmount`,()=>{this.isConnected||this.dispatchEvent(new CustomEvent(`astro:unmount`))})}disconnectedCallback(){document.removeEventListener(`astro:after-swap`,this.unmount),document.addEventListener(`astro:after-swap`,this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute(`await-children`)||document.readyState===`interactive`||document.readyState===`complete`)this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener(`DOMContentLoaded`,e),t.disconnect(),this.childrenConnectedCallback()},t=new MutationObserver(()=>{var t;((t=this.lastChild)==null?void 0:t.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue===`astro:end`&&(this.lastChild.remove(),e())});t.observe(this,{childList:!0}),document.addEventListener(`DOMContentLoaded`,e)}}async childrenConnectedCallback(){let e=this.getAttribute(`before-hydration-url`);e&&await import(e),this.start()}getRetryImportUrl(e){let t=new URL(e,document.baseURI);return t.searchParams.set(`astro-retry`,Date.now().toString()),t.toString()}async importWithRetry(e){try{return await import(e)}catch(t){return await new Promise(e=>setTimeout(e,1e3)),import(this.getRetryImportUrl(e))}}handleHydrationError(e){let t=this.getAttribute(`component-url`),n=new CustomEvent(`astro:hydration-error`,{cancelable:!0,bubbles:!0,composed:!0,detail:{error:e,componentUrl:t}});this.dispatchEvent(n)&&console.error(`[astro-island] Error hydrating ${t}`,e)}async start(){let e=JSON.parse(this.getAttribute(`opts`)),t=this.getAttribute(`client`);if(Astro[t]===void 0)window.addEventListener(`astro:${t}`,()=>this.start(),{once:!0});else try{await Astro[t](async()=>{let e=this.getAttribute(`renderer-url`);try{let[t,{default:n}]=await Promise.all([this.importWithRetry(this.getAttribute(`component-url`)),e?this.importWithRetry(e):Promise.resolve({default:()=>()=>{}})]),r=this.getAttribute(`component-export`)||`default`;if(r.includes(`.`)){this.Component=t;for(let e of r.split(`.`)){if(i.has(e)||!this.Component||typeof this.Component!=`object`&&typeof this.Component!=`function`||!Object.hasOwn(this.Component,e))throw Error(`Invalid component export path: ${r}`);this.Component=this.Component[e]}}else{if(i.has(r))throw Error(`Invalid component export path: ${r}`);this.Component=t[r]}return this.hydrator=n,this.hydrate}catch(e){return this.handleHydrationError(e),()=>{}}},e,this)}catch(e){this.handleHydrationError(e)}}attributeChangedCallback(){this.hydrate()}}r(o,`observedAttributes`,[`props`]),customElements.get(`astro-island`)||customElements.define(`astro-island`,o)}})();</script><astro-island uid="2wH2Dz" component-url="/_astro/SpaceSwitcher.DMoqOVpS.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-gyrtbwwo-1&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;SpaceSwitcher&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-gyrtbwwo-1"></astro-island></div><button type="button" id="tw-nav-toggle" class="tw-nav-toggle" aria-label="收起或展开左侧导航" aria-expanded="true" aria-controls="tw-nav-aside"><svg class="tw-nav-toggle-icon is-collapse" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6"></path></svg><svg class="tw-nav-toggle-icon is-expand" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"></path></svg></button><nav class="tw-nav-list flex-1 overflow-y-auto"><a href="/workbench/" class="tw-nav-item is-active font-medium" data-i18n-hint="nav.home" data-hint="我的工作台"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 10.5 12 3l9 7.5"></path><path d="M5 9.5V20h14V9.5"></path></svg><span class="tw-nav-label" data-i18n="nav.home">我的工作台</span></a><div class="tw-nav-libraries"><div class="tw-nav-libraries-ph"><a href="/dashboard/" class="tw-nav-item" data-plugin-nav="dashboard"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.5"></rect><rect x="14" y="3" width="7" height="7" rx="1.5"></rect><rect x="3" y="14" width="7" height="7" rx="1.5"></rect><rect x="14" y="14" width="7" height="7" rx="1.5"></rect></svg><span class="tw-nav-label" data-i18n="nav.dashboard">仪表盘</span></a><a href="/tasks/" class="tw-nav-item" data-plugin-nav="tasks"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 5h10"></path><path d="M9 12h10"></path><path d="M9 19h10"></path><path d="M4 5h.01"></path><path d="M4 12h.01"></path><path d="M4 19h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.tasks">任务管理</span></a><a href="/todos/" class="tw-nav-item" data-plugin-nav="todos"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M8 6h13"></path><path d="M8 12h13"></path><path d="M8 18h13"></path><path d="M3 6h.01"></path><path d="M3 12h.01"></path><path d="M3 18h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.todos">待办事项</span></a><a href="/pm/projects/" class="tw-nav-item" data-plugin-nav="projects"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"></path></svg><span class="tw-nav-label" data-i18n="nav.projects">项目列表</span></a><a href="/pm/iterations/" class="tw-nav-item" data-plugin-nav="iterations"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="5" width="18" height="16" rx="2"></rect><path d="M8 3v4"></path><path d="M16 3v4"></path><path d="M3 10h18"></path></svg><span class="tw-nav-label" data-i18n="nav.iterations">迭代管理</span></a><a href="/pm/requirements/" class="tw-nav-item" data-plugin-nav="pmRequirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.requirementsMgmt">需求管理</span></a><a href="/pm/bugs/" class="tw-nav-item" data-plugin-nav="bugs"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="14" r="5"></circle><path d="M9 6l2 2"></path><path d="M15 6l-2 2"></path><path d="M7 11H4"></path><path d="M20 11h-3"></path><path d="M7 17H4"></path><path d="M20 17h-3"></path></svg><span class="tw-nav-label" data-i18n="nav.bugs">缺陷管理</span></a><a href="/reports/" class="tw-nav-item" data-plugin-nav="reports"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.reports">工作汇报</span></a><a href="/test-stats/" class="tw-nav-item" data-plugin-nav="testStats"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 20V10"></path><path d="M10 20V4"></path><path d="M16 20v-7"></path><path d="M22 20H2"></path></svg><span class="tw-nav-label" data-i18n="nav.testStats">测试统计</span></a><a href="/case-exec/" class="tw-nav-item" data-plugin-nav="caseExec"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><circle cx="12" cy="12" r="5"></circle><circle cx="12" cy="12" r="1.4"></circle></svg><span class="tw-nav-label" data-i18n="nav.caseExec">用例执行统计</span></a><a href="/cases/library/" class="tw-nav-item" data-plugin-nav="cases"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg><span class="tw-nav-label" data-i18n="nav.caseManage">用例管理</span></a><a href="/knowledge/" class="tw-nav-item" data-plugin-nav="knowledgeLib"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg><span class="tw-nav-label" data-i18n="nav.knowledge">知识库管理</span></a><a href="/requirements/" class="tw-nav-item" data-plugin-nav="requirements" data-i18n-hint="nav.requirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h6"></path></svg><span class="tw-nav-label" data-i18n="nav.requirements">需求文档库</span></a><a href="/templates/" class="tw-nav-item" data-plugin-nav="templates" data-i18n-hint="nav.templates"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 3 3 8l9 5 9-5-9-5z"></path><path d="m3 13 9 5 9-5"></path></svg><span class="tw-nav-label" data-i18n="nav.templates">测试模板库</span></a></div><astro-island uid="Z1lgSd4" component-url="/_astro/NavLibraries.D1J9BwYo.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-iywf7oe7-2&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;NavLibraries&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island><script>(function(){const host = ".tw-nav-libraries";
137
+ animation-name: astroFadeIn; }</style></head><body class="tw-body antialiased"><div class="tw-shell min-h-screen"><aside class="tw-nav-aside fixed inset-y-0 left-0 flex flex-col z-45" id="tw-nav-aside"><div class="tw-nav-brand"><div class="tw-nav-brand-row"><a href="/" class="tw-nav-brand-link min-w-0 flex-1" data-astro-reload><span class="tw-nav-brand-mark" aria-hidden="true"><img class="tw-nav-brand-mark-img" src="/brand/brand-mark.png" alt="" width="36" height="36"></span><span class="tw-nav-brand-text"><span class="tw-nav-brand-title-row"><span class="tw-nav-brand-title" data-i18n="nav.brand">Lantern Harness</span><span class="tw-nav-brand-ver" data-hint="平台版本 v0.1.19">v0.1.19<span class="tw-nav-brand-dot" id="tw-update-dot" role="button" tabindex="-1" aria-label="有新版本可更新" hidden></span></span></span></span></a></div></div><div class="tw-nav-space-slot"><div class="tw-nav-space tw-nav-space-ph" id="tw-nav-space-ph" aria-hidden="true"><div class="tw-nav-space-ph-box"><span class="tw-nav-space-ph-ico"></span><span class="tw-nav-space-ph-lines"><span class="tw-nav-space-ph-bar is-cap"></span><span class="tw-nav-space-ph-bar is-name"></span></span></div></div><style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).only=e,window.dispatchEvent(new Event(`astro:only`))})();</script><script>(function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i=/* @__PURE__ */ new Set([`__proto__`,`constructor`,`prototype`]);{let e={0:e=>a(e),1:e=>n(e),2:e=>new RegExp(e),3:e=>new Date(e),4:e=>new Map(n(e)),5:e=>new Set(n(e)),6:e=>BigInt(e),7:e=>new URL(e),8:e=>new Uint8Array(e),9:e=>new Uint16Array(e),10:e=>new Uint32Array(e),11:e=>1/0*e},t=t=>{let[n,r]=t;return n in e?e[n](r):void 0},n=e=>e.map(t),a=e=>typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]));class o extends HTMLElement{constructor(...e){super(...e),r(this,`Component`,void 0),r(this,`hydrator`,void 0),r(this,`hydrate`,async()=>{var e;if(!this.hydrator||!this.isConnected)return;let t=(e=this.parentElement)==null?void 0:e.closest(`astro-island[ssr]`);if(t){t.addEventListener(`astro:hydrate`,this.hydrate,{once:!0});return}let n=this.querySelectorAll(`astro-slot`),r={},i=this.querySelectorAll(`template[data-astro-template]`);for(let e of i){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`data-astro-template`)||`default`]=e.innerHTML,e.remove())}for(let e of n){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`name`)||`default`]=e.innerHTML)}let o;try{o=this.hasAttribute(`props`)?a(JSON.parse(this.getAttribute(`props`))):{}}catch(e){let t=this.getAttribute(`component-url`)||`<unknown>`,n=this.getAttribute(`component-export`);throw n&&(t+=` (export ${n})`),console.error(`[hydrate] Error parsing props for component ${t}`,this.getAttribute(`props`),e),e}await this.hydrator(this)(this.Component,o,r,{client:this.getAttribute(`client`)}),this.removeAttribute(`ssr`),this.dispatchEvent(new CustomEvent(`astro:hydrate`))}),r(this,`unmount`,()=>{this.isConnected||this.dispatchEvent(new CustomEvent(`astro:unmount`))})}disconnectedCallback(){document.removeEventListener(`astro:after-swap`,this.unmount),document.addEventListener(`astro:after-swap`,this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute(`await-children`)||document.readyState===`interactive`||document.readyState===`complete`)this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener(`DOMContentLoaded`,e),t.disconnect(),this.childrenConnectedCallback()},t=new MutationObserver(()=>{var t;((t=this.lastChild)==null?void 0:t.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue===`astro:end`&&(this.lastChild.remove(),e())});t.observe(this,{childList:!0}),document.addEventListener(`DOMContentLoaded`,e)}}async childrenConnectedCallback(){let e=this.getAttribute(`before-hydration-url`);e&&await import(e),this.start()}getRetryImportUrl(e){let t=new URL(e,document.baseURI);return t.searchParams.set(`astro-retry`,Date.now().toString()),t.toString()}async importWithRetry(e){try{return await import(e)}catch(t){return await new Promise(e=>setTimeout(e,1e3)),import(this.getRetryImportUrl(e))}}handleHydrationError(e){let t=this.getAttribute(`component-url`),n=new CustomEvent(`astro:hydration-error`,{cancelable:!0,bubbles:!0,composed:!0,detail:{error:e,componentUrl:t}});this.dispatchEvent(n)&&console.error(`[astro-island] Error hydrating ${t}`,e)}async start(){let e=JSON.parse(this.getAttribute(`opts`)),t=this.getAttribute(`client`);if(Astro[t]===void 0)window.addEventListener(`astro:${t}`,()=>this.start(),{once:!0});else try{await Astro[t](async()=>{let e=this.getAttribute(`renderer-url`);try{let[t,{default:n}]=await Promise.all([this.importWithRetry(this.getAttribute(`component-url`)),e?this.importWithRetry(e):Promise.resolve({default:()=>()=>{}})]),r=this.getAttribute(`component-export`)||`default`;if(r.includes(`.`)){this.Component=t;for(let e of r.split(`.`)){if(i.has(e)||!this.Component||typeof this.Component!=`object`&&typeof this.Component!=`function`||!Object.hasOwn(this.Component,e))throw Error(`Invalid component export path: ${r}`);this.Component=this.Component[e]}}else{if(i.has(r))throw Error(`Invalid component export path: ${r}`);this.Component=t[r]}return this.hydrator=n,this.hydrate}catch(e){return this.handleHydrationError(e),()=>{}}},e,this)}catch(e){this.handleHydrationError(e)}}attributeChangedCallback(){this.hydrate()}}r(o,`observedAttributes`,[`props`]),customElements.get(`astro-island`)||customElements.define(`astro-island`,o)}})();</script><astro-island uid="2wH2Dz" component-url="/_astro/SpaceSwitcher.B8dzGxrR.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-gyrtbwwo-1&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;SpaceSwitcher&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-gyrtbwwo-1"></astro-island></div><button type="button" id="tw-nav-toggle" class="tw-nav-toggle" aria-label="收起或展开左侧导航" aria-expanded="true" aria-controls="tw-nav-aside"><svg class="tw-nav-toggle-icon is-collapse" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6"></path></svg><svg class="tw-nav-toggle-icon is-expand" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"></path></svg></button><nav class="tw-nav-list flex-1 overflow-y-auto"><a href="/workbench/" class="tw-nav-item is-active font-medium" data-i18n-hint="nav.home" data-hint="我的工作台"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 10.5 12 3l9 7.5"></path><path d="M5 9.5V20h14V9.5"></path></svg><span class="tw-nav-label" data-i18n="nav.home">我的工作台</span></a><div class="tw-nav-libraries"><div class="tw-nav-libraries-ph"><a href="/dashboard/" class="tw-nav-item" data-plugin-nav="dashboard"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.5"></rect><rect x="14" y="3" width="7" height="7" rx="1.5"></rect><rect x="3" y="14" width="7" height="7" rx="1.5"></rect><rect x="14" y="14" width="7" height="7" rx="1.5"></rect></svg><span class="tw-nav-label" data-i18n="nav.dashboard">仪表盘</span></a><a href="/tasks/" class="tw-nav-item" data-plugin-nav="tasks"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 5h10"></path><path d="M9 12h10"></path><path d="M9 19h10"></path><path d="M4 5h.01"></path><path d="M4 12h.01"></path><path d="M4 19h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.tasks">任务管理</span></a><a href="/todos/" class="tw-nav-item" data-plugin-nav="todos"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M8 6h13"></path><path d="M8 12h13"></path><path d="M8 18h13"></path><path d="M3 6h.01"></path><path d="M3 12h.01"></path><path d="M3 18h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.todos">待办事项</span></a><a href="/pm/projects/" class="tw-nav-item" data-plugin-nav="projects"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"></path></svg><span class="tw-nav-label" data-i18n="nav.projects">项目列表</span></a><a href="/pm/iterations/" class="tw-nav-item" data-plugin-nav="iterations"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="5" width="18" height="16" rx="2"></rect><path d="M8 3v4"></path><path d="M16 3v4"></path><path d="M3 10h18"></path></svg><span class="tw-nav-label" data-i18n="nav.iterations">迭代管理</span></a><a href="/pm/requirements/" class="tw-nav-item" data-plugin-nav="pmRequirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.requirementsMgmt">需求管理</span></a><a href="/pm/bugs/" class="tw-nav-item" data-plugin-nav="bugs"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="14" r="5"></circle><path d="M9 6l2 2"></path><path d="M15 6l-2 2"></path><path d="M7 11H4"></path><path d="M20 11h-3"></path><path d="M7 17H4"></path><path d="M20 17h-3"></path></svg><span class="tw-nav-label" data-i18n="nav.bugs">缺陷管理</span></a><a href="/reports/" class="tw-nav-item" data-plugin-nav="reports"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.reports">工作汇报</span></a><a href="/test-stats/" class="tw-nav-item" data-plugin-nav="testStats"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 20V10"></path><path d="M10 20V4"></path><path d="M16 20v-7"></path><path d="M22 20H2"></path></svg><span class="tw-nav-label" data-i18n="nav.testStats">测试统计</span></a><a href="/case-exec/" class="tw-nav-item" data-plugin-nav="caseExec"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><circle cx="12" cy="12" r="5"></circle><circle cx="12" cy="12" r="1.4"></circle></svg><span class="tw-nav-label" data-i18n="nav.caseExec">用例执行统计</span></a><a href="/cases/library/" class="tw-nav-item" data-plugin-nav="cases"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg><span class="tw-nav-label" data-i18n="nav.caseManage">用例管理</span></a><a href="/knowledge/" class="tw-nav-item" data-plugin-nav="knowledgeLib"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg><span class="tw-nav-label" data-i18n="nav.knowledge">知识库管理</span></a><a href="/requirements/" class="tw-nav-item" data-plugin-nav="requirements" data-i18n-hint="nav.requirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h6"></path></svg><span class="tw-nav-label" data-i18n="nav.requirements">需求文档库</span></a><a href="/templates/" class="tw-nav-item" data-plugin-nav="templates" data-i18n-hint="nav.templates"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 3 3 8l9 5 9-5-9-5z"></path><path d="m3 13 9 5 9-5"></path></svg><span class="tw-nav-label" data-i18n="nav.templates">测试模板库</span></a></div><astro-island uid="Z1lgSd4" component-url="/_astro/NavLibraries.D1J9BwYo.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-iywf7oe7-2&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;NavLibraries&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island><script>(function(){const host = ".tw-nav-libraries";
138
138
  const cacheKey = "tw.hydrate.nav";
139
139
  const fixActive = true;
140
140
  const capture = false;
@@ -364,7 +364,7 @@ const syncNavGroups = true;
364
364
  // 缓存坏了就当没有
365
365
  }
366
366
  })();
367
- })();</script></div><a href="/prompts/" class="tw-nav-item" data-plugin-nav="prompts" data-pinned-nav="prompts"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="tw-nav-label" data-i18n="nav.prompts">提示词管理</span></a><a href="/docs/manual/" class="tw-nav-item" data-hint="帮助中心" data-i18n-hint="nav.helpCenter"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M5 4.5h9.5L19 9v10.5H5V4.5Z" stroke-linejoin="round"></path><path d="M14.5 4.5V9H19" stroke-linejoin="round"></path><path d="M8 13h8M8 16.5h6" stroke-linecap="round"></path></svg><span class="tw-nav-label" data-i18n="nav.helpCenter">帮助中心</span></a></nav><div class="tw-nav-foot"><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).load=e,window.dispatchEvent(new Event(`astro:load`))})();</script><astro-island uid="Z12jkyC" prefix="r1" component-url="/_astro/SettingsDialog.OaLXsUUu.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{}" ssr client="load" opts="{&quot;name&quot;:&quot;SettingsDialog&quot;,&quot;value&quot;:true}" await-children><div class="tw-nav-foot-row"><button type="button" class="tw-nav-settings-btn" data-hint="设置"><svg class="tw-nav-ico w-4.5 h-4.5 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.2.6.7 1 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"></path></svg><span data-i18n="nav.settings">设置</span></button><button type="button" class="tw-nav-provider-chip is-empty" data-hint="未配置模型"><span class="tw-nav-provider-dot" aria-hidden="true"></span><span class="tw-nav-provider-name">未配置</span></button></div><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--astro:end--></astro-island></div></aside><script data-astro-rerun>
367
+ })();</script></div><a href="/prompts/" class="tw-nav-item" data-plugin-nav="prompts" data-pinned-nav="prompts"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="tw-nav-label" data-i18n="nav.prompts">提示词管理</span></a><a href="/docs/manual/" class="tw-nav-item" data-hint="帮助中心" data-i18n-hint="nav.helpCenter"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M5 4.5h9.5L19 9v10.5H5V4.5Z" stroke-linejoin="round"></path><path d="M14.5 4.5V9H19" stroke-linejoin="round"></path><path d="M8 13h8M8 16.5h6" stroke-linecap="round"></path></svg><span class="tw-nav-label" data-i18n="nav.helpCenter">帮助中心</span></a></nav><div class="tw-nav-foot"><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).load=e,window.dispatchEvent(new Event(`astro:load`))})();</script><astro-island uid="Z12jkyC" prefix="r1" component-url="/_astro/SettingsDialog.BMa8eGFr.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{}" ssr client="load" opts="{&quot;name&quot;:&quot;SettingsDialog&quot;,&quot;value&quot;:true}" await-children><div class="tw-nav-foot-row"><button type="button" class="tw-nav-settings-btn" data-hint="设置"><svg class="tw-nav-ico w-4.5 h-4.5 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.2.6.7 1 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"></path></svg><span data-i18n="nav.settings">设置</span></button><button type="button" class="tw-nav-provider-chip is-empty" data-hint="未配置模型"><span class="tw-nav-provider-dot" aria-hidden="true"></span><span class="tw-nav-provider-name">未配置</span></button></div><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--astro:end--></astro-island></div></aside><script data-astro-rerun>
368
368
  (function () {
369
369
  try {
370
370
  var raw = localStorage.getItem('tw.app.model.v1');
@@ -471,7 +471,7 @@ const syncNavGroups = true;
471
471
  });
472
472
  } catch (e) {}
473
473
  })();
474
- </script><main data-astro-transition-scope="astro-bbhp3f5g-3" class="tw-main min-h-screen"><div id="tw-route-loading" class="tw-route-loading is-hidden" role="status" aria-live="polite" aria-label="页面加载中"><span class="tw-route-loading-spin" aria-hidden="true"></span></div><div class="tw-workbench-host"><astro-island uid="1DjyQy" component-url="/_astro/ChatApp.BoTr-jsm.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;slashDocs&quot;:[1,[[0,{&quot;collection&quot;:[0,&quot;knowledge&quot;],&quot;id&quot;:[0,&quot;功能测试用例编写规范&quot;],&quot;title&quot;:[0,&quot;功能测试用例编写规范&quot;],&quot;category&quot;:[0,&quot;测试规范&quot;],&quot;description&quot;:[0,&quot;统一功能测试用例编写口径与质量标准&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;知识库管理/功能测试用例编写规范.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;功能测试报告/功能测试报告模板&quot;],&quot;title&quot;:[0,&quot;功能测试报告模板&quot;],&quot;category&quot;:[0,&quot;功能测试报告&quot;],&quot;description&quot;:[0,&quot;版本迭代功能测试报告结构模板,含执行统计、缺陷分析与上线风险评估。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/功能测试报告/功能测试报告模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;接口测试报告/接口测试报告模板&quot;],&quot;title&quot;:[0,&quot;接口测试报告模板&quot;],&quot;category&quot;:[0,&quot;接口测试报告&quot;],&quot;description&quot;:[0,&quot;接口测试报告结构模板,含接口覆盖统计、失败分析与性能基线记录。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/接口测试报告/接口测试报告模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;性能测试报告/性能测试报告模板&quot;],&quot;title&quot;:[0,&quot;性能测试报告模板&quot;],&quot;category&quot;:[0,&quot;性能测试报告&quot;],&quot;description&quot;:[0,&quot;性能测试报告结构模板,含负载模型、结果汇总、资源监控与瓶颈分析。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/性能测试报告/性能测试报告模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;性能测试用例/性能测试用例模板&quot;],&quot;title&quot;:[0,&quot;性能测试用例(场景)模板&quot;],&quot;category&quot;:[0,&quot;性能测试用例&quot;],&quot;description&quot;:[0,&quot;性能测试场景设计模板,含负载模型、加压策略与通过标准的定义方式。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/性能测试用例/性能测试用例模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;自动化测试用例/自动化测试用例模板&quot;],&quot;title&quot;:[0,&quot;自动化测试用例模板&quot;],&quot;category&quot;:[0,&quot;自动化测试用例&quot;],&quot;description&quot;:[0,&quot;自动化脚本设计模板,强调步骤稳定、断言明确、数据可参数化与环境依赖。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/自动化测试用例/自动化测试用例模板.md&quot;]}]]]}" ssr client="only" opts="{&quot;name&quot;:&quot;ChatApp&quot;,&quot;value&quot;:&quot;react&quot;}"></astro-island></div></main><astro-island uid="1ae4mb" component-url="/_astro/Toast.BO2NFckG.js" component-export="GlobalToastHost" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-34g7cspi-4&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;GlobalToastHost&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-34g7cspi-4"></astro-island></div><script>
474
+ </script><main data-astro-transition-scope="astro-bbhp3f5g-3" class="tw-main min-h-screen"><div id="tw-route-loading" class="tw-route-loading is-hidden" role="status" aria-live="polite" aria-label="页面加载中"><span class="tw-route-loading-spin" aria-hidden="true"></span></div><div class="tw-workbench-host"><astro-island uid="1DjyQy" component-url="/_astro/ChatApp.azDLrlxw.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;slashDocs&quot;:[1,[[0,{&quot;collection&quot;:[0,&quot;knowledge&quot;],&quot;id&quot;:[0,&quot;功能测试用例编写规范&quot;],&quot;title&quot;:[0,&quot;功能测试用例编写规范&quot;],&quot;category&quot;:[0,&quot;测试规范&quot;],&quot;description&quot;:[0,&quot;统一功能测试用例编写口径与质量标准&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;知识库管理/功能测试用例编写规范.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;功能测试报告/功能测试报告模板&quot;],&quot;title&quot;:[0,&quot;功能测试报告模板&quot;],&quot;category&quot;:[0,&quot;功能测试报告&quot;],&quot;description&quot;:[0,&quot;版本迭代功能测试报告结构模板,含执行统计、缺陷分析与上线风险评估。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/功能测试报告/功能测试报告模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;接口测试报告/接口测试报告模板&quot;],&quot;title&quot;:[0,&quot;接口测试报告模板&quot;],&quot;category&quot;:[0,&quot;接口测试报告&quot;],&quot;description&quot;:[0,&quot;接口测试报告结构模板,含接口覆盖统计、失败分析与性能基线记录。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/接口测试报告/接口测试报告模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;性能测试报告/性能测试报告模板&quot;],&quot;title&quot;:[0,&quot;性能测试报告模板&quot;],&quot;category&quot;:[0,&quot;性能测试报告&quot;],&quot;description&quot;:[0,&quot;性能测试报告结构模板,含负载模型、结果汇总、资源监控与瓶颈分析。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/性能测试报告/性能测试报告模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;性能测试用例/性能测试用例模板&quot;],&quot;title&quot;:[0,&quot;性能测试用例(场景)模板&quot;],&quot;category&quot;:[0,&quot;性能测试用例&quot;],&quot;description&quot;:[0,&quot;性能测试场景设计模板,含负载模型、加压策略与通过标准的定义方式。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/性能测试用例/性能测试用例模板.md&quot;]}],[0,{&quot;collection&quot;:[0,&quot;templates&quot;],&quot;id&quot;:[0,&quot;自动化测试用例/自动化测试用例模板&quot;],&quot;title&quot;:[0,&quot;自动化测试用例模板&quot;],&quot;category&quot;:[0,&quot;自动化测试用例&quot;],&quot;description&quot;:[0,&quot;自动化脚本设计模板,强调步骤稳定、断言明确、数据可参数化与环境依赖。&quot;],&quot;format&quot;:[0,&quot;md&quot;],&quot;path&quot;:[0,&quot;测试模板库/自动化测试用例/自动化测试用例模板.md&quot;]}]]]}" ssr client="only" opts="{&quot;name&quot;:&quot;ChatApp&quot;,&quot;value&quot;:&quot;react&quot;}"></astro-island></div></main><astro-island uid="1ae4mb" component-url="/_astro/Toast.BO2NFckG.js" component-export="GlobalToastHost" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-34g7cspi-4&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;GlobalToastHost&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-34g7cspi-4"></astro-island></div><script>
475
475
  (function () {
476
476
  /**
477
477
  * 切页滚回顶部。
@@ -33,6 +33,7 @@
33
33
 
34
34
  - **检查更新**:向 npm registry(跟随 `npm config get registry`,读不到时用官方源)查最新版本,结果缓存 30 分钟;检查失败只提示「无法检查更新」,不影响使用。
35
35
  - **不会自动升级**:发现新版本只在侧栏版本号旁亮小圆点、在设置页显示「更新并重启」,**不会在后台自动安装**;升不升、什么时候升由你点按钮决定。
36
+ - **只能显式触发**:服务端更新接口要求带确认标记(`confirm: true`),只有页面上的「更新并重启」会带上;旧版本页面、脚本等顺手发出的请求一律被拒绝,不会把服务停掉。
36
37
  - **有新版本**:侧栏版本号旁出现小圆点,点圆点直接打开该设置项;点「更新并重启」后服务会停掉、全局安装新版本、再用原端口和数据空间重启,页面轮询等待后显示「已更新到 vX」,可点「刷新页面」。
37
38
  - **更新进行中**:按钮禁用并显示进度;期间页面请求短暂失败属正常现象,不会弹错误条。
38
39
  - **更新失败**:显示错误与日志路径(`~/.config/lantern-harness/logs/server.log`),旧版本会自动恢复启动;也可以回终端执行 `lantern update`。
@@ -175,7 +176,7 @@
175
176
 
176
177
  > 双击本地打开、读写文件依赖本地文件服务(`lantern web` 或 `pnpm dev`);静态站仅能浏览与下载。
177
178
 
178
- > 需求文档库的列表与文件夹计数会自动忽略系统 / 办公软件生成的临时文件:`.DS_Store`、`.gitkeep`、Office / WPS 的 `~$xxx.docx` 锁文件、Word 的 `~WRL*.tmp`、LibreOffice 的 `.~lock.*#`。这些文件仍保留在磁盘上,只是不显示、不计入数量;关掉对应的 Office 文档后 `~$` 文件会自动消失。
179
+ > 需求文档库的列表、文件夹计数以及**需求分析的来源文档下拉**,都会自动忽略系统 / 办公软件生成的临时文件:`.DS_Store`、`.gitkeep`、Office / WPS 的 `~$xxx.docx` 锁文件、Word 的 `~WRL*.tmp`、LibreOffice 的 `.~lock.*#`。这些文件仍保留在磁盘上,只是不显示、不计入数量;关掉对应的 Office 文档后 `~$` 文件会自动消失。
179
180
 
180
181
  用例管理 / 提示词管理 / 知识库管理的列表都支持搜索与「按修改时间 / 按文件名」排序;**搜索词与排序方式会记住**,刷新或重新进入页面仍是上次的样子(三个库各记各的,按当前数据空间分开存)。列宽也能调:拖动表头「评审 / 创建时间 / 修改时间 / 大小 / 操作」的右边缘改宽度;文件名那一列自动吃掉剩余宽度,调完不会在右边留空。列宽按库分别记住(`docs:cases:cols` 这类 key),刷新后保持。勾选列与文件名贴左固定、操作列贴右固定,横向滚动时不会滚丢;滚到哪儿也记着,刷新或切页回来仍是上次的位置。
181
182
 
@@ -308,7 +309,7 @@ version: '1.0' # 可选
308
309
 
309
310
  「我的插件」→「待办与效率」→「工作汇报」开启后,侧栏出现「工作汇报」入口(`/reports/`),并管理当前空间的提示词与汇报目录。
310
311
 
311
- - **打开插件**:把内置的最小模板写成当前空间的 `提示词管理/工作汇报提示词.md`(文件已存在时不覆盖,保留用户改过的内容)。`工作汇报/日报 · 周报 · 月报` 目录**不预建**,等真正写入汇报文件时才出现。
312
+ - **打开插件**:把内置的种子模板写成当前空间的 `提示词管理/工作汇报提示词.md`(文件已存在时不覆盖,保留用户改过的内容)。`工作汇报/日报 · 周报 · 月报` 目录**不预建**,等真正写入汇报文件时才出现。
312
313
  - **工作台注入**:插件开启期间,发送消息时会把**当前选中的那份**提示词追加到系统提示词里(就是页面下拉里选的那份,默认 `工作汇报提示词.md`),用于把零散记录整理成日报 / 周报 / 月报等。工作台在进入页面时读取一次,所以换完提示词后「去工作台写汇报」或刷新页面即生效。
313
314
  - **关闭插件**:侧栏入口隐藏,工作台不再注入;**提示词文件保留在「提示词管理」里**(改过的内容不会丢),已生成的汇报文件与目录也保留。重新打开还是原来那份,不会按模板覆盖。
314
315
  - **换提示词**:工作汇报页刷新按钮左侧的下拉框可以从「提示词管理」里选任意一份 `.md` / `.txt` 作为汇报提示词,选择结果跟当前空间保存;选中的文件被改名或删除时,会自动回退到 `工作汇报提示词.md`(或名字里带「工作汇报」的那份),不会出现空提示词。
@@ -377,12 +378,13 @@ version: '1.0' # 可选
377
378
  - 流程分三步、不自动串起来:**生成步骤 → 开始探索 → 生成代码 → 试跑**。探索只负责在浏览器里把流程点一遍并产出步骤;结束后按步骤出码(左栏「生成代码」可手动重出),**不会自动试跑**。试跑是右下「试跑」子 Tab 里的动作:失败时让模型只改步骤(定位器 / 等待 / 断言),最多 3 轮;没配模型就只跑一次、保留日志。页面行为本身不符合需求时保留失败并提示疑似缺陷,不会为了跑绿改断言。右下「试跑」子 Tab 显示状态、耗时、草稿 / trace 路径与上述调试按钮。
378
379
  - 确认路径后再「写入项目」:一条用例会同时产出**整组文件**——主用例(spec)、按页面拆出的 page object(`tests/pages/<Page>.ts` / `tests/pages/<page>_page.py`)、项目有登录态时再加一个 `tests/fixtures/auth-state.ts` 常量文件。右上「代码」Tab 左侧是文件清单(标出「用例 / 页面 / 登录态」),右侧预览与可编辑的写入路径,左下按钮明确写「写入 N 个文件」;路径都在项目目录内、写入前整批预检。**目标文件已存在时默认合并,不整文件覆盖**:spec 只在原有文件末尾追加这个新用例(缺的 `import` 补到 import 区,`test.use` / `BASE_URL` 不重复),page object 只在类里补缺失的方法,登录态文件已有 `STORAGE_STATE` 就不动;合并写不进去(例如文件名撞上别的类)才按冲突处理,整批不写,此时勾选「整文件覆盖」再重试。写盘中途失败会按 before 回滚已写过的文件,不留半套。写入时记录 before / after,右上「变更」Tab 立刻出精确到行的 diff(新增绿 / 删除红 / 3 行上下文,追加的条目标「追加」),并能「打开文件」「打开目录」;下面还有一段只读的「项目工作区其它改动」(`git status`,过滤 `node_modules` / `.lantern-ai` 等噪音)。
379
380
  - 写入后点「**按项目配置验收**」:用项目自己的 Playwright / pytest 命令跑正式文件(不再走草稿配置)。若文件被项目 `testMatch` 排除,会明确提示「没被项目配置识别为用例」,而不是笼统判失败。
380
- - **提示词**:打开「自动化测试」开关时,会往当前空间的 `提示词管理/Playwright提示词.md` 写一份种子。这份文件分「规划阶段 / 探索阶段 / 生成代码」三段:前两段分别用于「生成步骤」和「开始探索」,第三段约束出码要跟随项目原有的目录结构、语法风格与代码规范(复用已有 page object / fixture,按项目 formatter 与命名来,已有文件只追加不重排);支持占位符 `{{project}}` / `{{dir}}` / `{{language}}` / `{{plan}}`。顶栏项目下拉**左边**是一个固定宽度的提示词框:只显示当前项目挂载的那份文件名,超出省略号、悬停弹气泡显示全名,**不做下拉、旁边也没有添加按钮**;点它就打开「挂载提示词」弹窗——只列出**能用来生成的**提示词(自动化测试自己那份 + 用户在提示词管理里自己建的 `.md`,工作汇报 / 默认提示词这类别的用途不显示),选一份点「挂载」即挂到当前项目并存盘,**挂上即被引用**——提示词管理里立刻标「引用中」。弹窗里没有「跟随插件默认」,也没有新建入口;要新建提示词去「提示词管理 / 工作台」建,回到本页就能选到。**项目没挂提示词时内容区会被拦住**:顶栏提示词框标黄显示「未挂载提示词 · 点击挂载」,运行 / 生成 / 历史三个 Tab 都不显示内容,只给一句对应说明(运行要跑、生成要出码、历史需重跑)和「挂载提示词」按钮。**不再一进页面 / 一切项目就自动弹窗**——点按钮或提示词框才打开弹窗,随时可以取消,取消后保持未挂载、回到原来的拦截说明。挂载结果**按项目保存、一个项目只挂一份**:Playwright 项目和 pytest 项目可以各挂各的,换项目自动带出上次选的那份;在弹窗里换一份就替换掉原来那份,**上一份立刻取消引用**(提示词管理里不再标「引用中」,也恢复可删 / 可改名);项目里存的那份被删 / 改名时,同样按「未挂载」拦截,重新挂一份即可。
381
+ - **提示词**:打开「自动化测试」开关时,会往当前空间的 `提示词管理/Playwright提示词.md` 写一份种子。这份文件分「规划阶段 / 探索阶段 / 生成代码」三段:前两段分别用于「生成步骤」和「开始探索」,第三段是出码约定——出码与写入项目由平台按模板完成(模型没有读写项目文件的工具),这段只约束模型交给平台的用例标题、定位器与环境变量写法,并说明文件落点(TS 读项目 `playwright.config` 的 `testDir`,Python 固定 `tests/`)、page object / 登录态由模板生成、已有文件默认只在末尾追加合并;支持占位符 `{{project}}` / `{{dir}}` / `{{language}}` / `{{plan}}`(只在前两段生效)。顶栏项目下拉**左边**是一个固定宽度的提示词框:只显示当前项目挂载的那份文件名,超出省略号、悬停弹气泡显示全名,**不做下拉、旁边也没有添加按钮**;点它就打开「挂载提示词」弹窗——只列出**能用来生成的**提示词(自动化测试自己那份 + 用户在提示词管理里自己建的 `.md`,工作汇报 / 默认提示词这类别的用途不显示),选一份点「挂载」即挂到当前项目并存盘,**挂上即被引用**——提示词管理里立刻标「引用中」。弹窗里没有「跟随插件默认」,也没有新建入口;要新建提示词去「提示词管理 / 工作台」建,回到本页就能选到。**项目没挂提示词时内容区会被拦住**:顶栏提示词框标黄显示「未挂载提示词 · 点击挂载」,运行 / 生成 / 历史三个 Tab 都不显示内容,只给一句对应说明(运行要跑、生成要出码、历史需重跑)和「挂载提示词」按钮。**不再一进页面 / 一切项目就自动弹窗**——点按钮或提示词框才打开弹窗,随时可以取消,取消后保持未挂载、回到原来的拦截说明。挂载结果**按项目保存、一个项目只挂一份**:Playwright 项目和 pytest 项目可以各挂各的,换项目自动带出上次选的那份;在弹窗里换一份就替换掉原来那份,**上一份立刻取消引用**(提示词管理里不再标「引用中」,也恢复可删 / 可改名);项目里存的那份被删 / 改名时,同样按「未挂载」拦截,重新挂一份即可。
381
382
  - **新增提示词**:在「提示词管理」或工作台里新建 / 编辑(`提示词管理` 支持直接复制一份再用改名按钮改成想要的名字),回到本页(切走再切回或刷新)就能在挂载弹窗里选到;自动化测试页不再内置新建入口。
382
383
  - **平台约定**:提示词一律以「提示词管理」里的文件为准,代码里写死的只是几行极简兜底。点「生成步骤」/「开始探索」前读不到提示词(文件不存在,或没有可用的规划 / 探索段)时,会弹错误 toast 并停下,不会悄悄用兜底文案顶上。**升级规则**:你改过的内容一个字都不动;没改过的种子(内容与上次插件写入一致)会跟着插件内置模板自动升级,不留旧文案;老版本留下的种子第一次见到只登记指纹、不覆盖。插件开启期间这份文件不可删除 / 改名,关掉插件后可以删,再打开会重新生成种子。种子指纹记在 `.lantern/local/plugin-prompts.json`。
383
384
  - 项目里已有 `auth-admin.json` / `auth-user.json` 会自动当登录态复用(填 `-` 表示不用)。需要验证码 / 2FA 时点「手动登录」:模型会在下一个工具调用前停住,你在已经弹出的浏览器窗口里把登录做完,再点「我已登录,继续」放行;这个按钮只在探索阶段、有头浏览器时出现(规划阶段没有浏览器窗口,不显示)。
384
385
  - 重新点「生成步骤」或「开始探索」等于开新一轮:服务端会清掉上一轮的步骤 IR、试跑结果与活动日志,代码页 / 试跑面板同步清空,不会把上一条用例的脚本当成这次的产出。探索活动会跟着会话存下来,切走的 Tab 再回来、刷新页面都还能看到上一轮的过程。
385
- - 步骤计划里只写测试动作(打开页面 / 点击 / 填写 / 断言 / 等待等),**不会有「截图」步骤**:截图只是探索时给你看的过程记录,不会进脚本。
386
+ - 步骤计划里只写测试动作(打开页面 / 点击 / 填写 / 断言 / 等待等),**不会有「截图」步骤**(计划不接受截图动作,提交了会被丢掉);探索时的截图用截图工具,那只是给你看的过程记录。步骤 IR 本身允许 `screenshot` 动作,一旦提交会出成 `page.screenshot` 写进脚本,所以提示词里明确要求不要用。
387
+ - **不合法的步骤会被静默丢掉**:动作不在枚举里,或 `click` / `fill` / `select` / `press` / `hover` / `expect` 没带定位器时,这一步直接不落盘、也不报错。提交步骤的返回里 `stepCount` 报的是**实际保留**条数(被丢掉的会在提示里说明),提交后模型会自己核对,避免出码少步骤。
386
388
  - 依赖项目自己装好的 Playwright(或 pytest-playwright),Harness 不额外下载浏览器;草稿放在被挂载项目的 `.lantern-ai/`。
387
389
  - 数据按项目分目录:`自动化测试/自动化测试.json` 记项目与运行历史,每个项目的报告 / 结果 / 原始日志各在自己的目录里(`自动化测试/<项目名>/报告/`、`结果/`、`日志/`),同名项目会自动加后缀;切换空间各用各的。
388
390
  - 旧版本的 `UI自动化/` 目录与平铺的 `报告/ 结果/ 日志/` 在首次读取时自动改名 / 搬迁到新结构,不需要重新打开插件开关,历史报告链接也不会失效。老数据没有框架字段时按 Playwright 处理。
@@ -6,9 +6,11 @@
6
6
  * 每次评审 / 探测 / 补全前各读一次,改完提示词不用重启服务。
7
7
  *
8
8
  * - 用例质量评审提示词.md:一段 `## 评审`
9
- * 占位符:{{cases}} 待评审用例、{{requirement}} 对照需求、{{template}} 用例模板字段
9
+ * 对照需求 / 用例字段 / 字段对照 / 待评审用例由运行时随用户消息给出,正文不必写占位符;
10
+ * 仍支持 {{cases}}(替换为条数)、{{requirement}}、{{template}}、{{fields}},但内容会与用户消息重复
10
11
  * - 场景遗漏补全提示词.md:两段 `## 探测`、`## 补全`
11
- * 占位符:{{cases}} 已有用例、{{requirement}} 对照需求、{{fields}} 字段对照、{{selected}} 勾选待补全项
12
+ * 占位符:{{cases}} 已有用例(探测段)、{{selected}} 勾选待补全项(补全段)
13
+ * 对照需求与字段对照不占位,由运行时以「对照需求 / 字段对照」小节随用户消息给出
12
14
  */
13
15
 
14
16
  import { BLINDSPOT_PROMPT_FILE, CASE_REVIEW_PROMPT_FILE } from './plugin-prompts.mjs';
@@ -23,98 +25,109 @@ export const CASE_REVIEW_PROMPT_TEMPLATE = `# 用例质量评审提示词
23
25
 
24
26
  > 这份提示词由「用例质量评审」插件生成并引用。
25
27
  > 插件开启期间不能删除本文件;关闭插件后可以删掉,再次打开会重新生成。
26
- > 可用占位符:\`{{cases}}\` 待评审用例、\`{{requirement}}\` 对照需求、\`{{template}}\` 用例模板字段、\`{{fields}}\` 字段对照。
28
+ > 运行时用户消息里已带「对照需求 / 用例字段 / 字段对照 / 待评审用例」,正文不用写占位符;\`{{cases}}\`(替换为条数)、\`{{requirement}}\`、\`{{template}}\`、\`{{fields}}\` 仍可用,但内容会与用户消息重复。
27
29
 
28
30
  ## 评审
29
31
 
30
- 你是 AI 生成用例的最后一道质检关。只做判定、打分与提出改进建议,不要改写用户的用例。
32
+ 你是 AI 生成用例的最后一道质检关。只做判定、打分与改进建议,不改写用户的用例。
31
33
 
32
- 工作方式(必须遵守):
33
- 1. 先把全部用例通读一遍,再逐条判定;不要只看单条就下结论。
34
- 2. 先看「字段对照」:用例文件的表头常是项目自己的叫法(如标题列是 \`测试项目\`、预期列是 \`期望内容标准\`),这些列的内容就是标题 / 预期,**不要**因为字段名不叫「用例标题」就判为空。
35
- 3. 调用 \`case_save_review\` 一次提交整批结果,不要一条调一次。
36
- 4. 七项量化指标(总数 / 字段完整率 / 步骤可执行率 / 预期可判定率 / 需求覆盖率 / 重复率 / 优先级合规率)由系统按规则计算,不要重复报,也不要自己算。
37
- 5. 提交后用中文简述:一共几条、三档各几条、最该先改的几条是哪几条。
38
-
39
- 三档判定(系统最终按下面的规则重算,你给的时候要自洽):
40
- - 可用(usable):维度加权分 ≥ 85,照着能执行,预期能判定;小瑕疵不影响使用。
41
- - 待修改(revise):加权分 60–84,能看懂但执行会卡住或结论会扯皮(步骤跳步、预期模糊、前置缺失)。
42
- - 错误无效(invalid):加权分 < 60,或命中下面的硬伤。系统按「需求覆盖 25 / 步骤可执行 25 / 预期可判定 20 / 数据与边界 15 / 规范完整 15」加权算分,所以你想判无效时,必须把相关维度的分压低,或者给出 \`hard\` 证据。
34
+ 工作方式:
35
+ 1. 先通读全部用例,再逐条判定。
36
+ 2. 先看「字段对照」:文件表头常是项目自己的叫法(标题列可能叫 \`测试项目\`,预期列可能叫 \`期望内容标准\`),这些列的内容就是标题 / 预期,不要因为字段名不叫「用例标题」就判为空。
37
+ 3. 用户消息里每条用例以 \`### 序号\` 开头,序号只是位置,不是用例编号;\`用例编号:\` 这一行才是编号。
38
+ 4. 每条用例都要给一条判定,提交的条数必须等于待评审条数,不要漏条。
39
+ 5. 调用 \`case_save_review\` 一次提交整批,不要一条调一次;整体结论写在这个工具的 \`summary\` 参数里,最终回答不会存进报告。
40
+ 6. 用例总数 / 字段完整率 / 步骤可执行率 / 预期可判定率 / 需求覆盖率 / 重复用例率 / 优先级合规率 / 硬伤用例数由系统按规则计算,不要重复报,也不要自己算;未挂对照需求时需求覆盖率不计算。
43
41
 
44
- 硬伤(命中任意一条直接判「错误无效」,不受分数影响):
45
- - 用例标题 / 测试步骤 / 预期结果为空,或只有「同上」「同前」这类占位。
46
- - 与对照需求冲突(角色、字段、状态、分支与需求不一致)。
47
- - 预期结果与测试步骤无关(步骤做 A,预期写 B)。
48
- - 与另一条用例完全重复(标题与步骤一致),却又占着不同编号。
49
- - 命中硬伤时**必须**在 \`hard\` 里写一句证据(与需求哪条冲突 / 和哪条用例重复);只写「有硬伤」不算证据。
50
- - 不要用 \`verdict\` 表达严重程度:分数 86 却给 invalid 会被系统按 86 分重算,页面只会出现自相矛盾的结果。
42
+ 三档判定(系统最终按加权分与 \`hard\` 重算,你的 \`verdict\` 只作参考):
43
+ - 可用(usable):加权分 ≥ 85,照着能执行,预期能判定;小瑕疵不影响使用。
44
+ - 待修改(revise):加权分 60–84,能看懂但执行会卡住或结论会扯皮(步骤跳步、预期模糊、前置缺失)。
45
+ - 错误无效(invalid):加权分 < 60,或命中硬伤。想把一条判成无效,就给出 \`hard\` 证据,或把相关维度的分压低;只写 invalid 而分数够高,系统会按分数改判。
51
46
 
52
- 五个维度各自 0–100 分(系统会按权重 需求覆盖 25 / 步骤可执行 25 / 预期可判定 20 / 数据与边界 15 / 规范完整 15 合成总分):
47
+ 五个维度各给 0–100 的整数分,系统按权重合成总分(需求覆盖 25 / 步骤可执行 25 / 预期可判定 20 / 数据与边界 15 / 规范完整 15):
53
48
  - 需求覆盖:这条用例对应的需求点是否明确、是否覆盖主流程与关键分支。挂了对照需求时看是否真能对上;没挂需求时看用例自身是否写清了模块与业务目的。
54
49
  - 步骤可执行:是否一步一个动作、有编号、可照着点;跳步(少了进入路径)、把多个校验塞成一步、只有一句「验证功能」都要扣分。
55
50
  - 预期可判定:预期是否可被第三方判定。写「正常」「正确」「符合预期」「显示成功」这类没有状态码 / 具体文案 / 具体数值的,一律扣分;有阈值就应写出数值。
56
51
  - 数据与边界:前置条件是否给出需要的账号、角色、数据与状态;是否覆盖空值、上下限、刚好越界、重复提交等边界。
57
52
  - 规范完整:编号格式、标题是否一句话说清、优先级与类型是否填、字段是否与本项目模板一致。
58
53
 
54
+ 硬伤(命中任意一条直接判无效;空标题 / 空步骤 / 空预期 / 「同上」占位系统已自动识别,不必重复报,重点补下面三类语义硬伤):
55
+ - 与对照需求冲突(角色、字段、状态、分支与需求不一致)。
56
+ - 预期结果与测试步骤无关(步骤做 A,预期写 B)。
57
+ - 与另一条用例完全重复(标题与步骤一致),却占着不同编号。
58
+ - 命中时必须在 \`hard\` 里写清证据(和需求哪条冲突、和哪条用例重复),用户要靠这句话定位;只写「有硬伤」用户看不懂,等于没写。
59
+
59
60
  每条提交这些字段:
60
- - \`no\`:用例编号(原样,不要改写)。
61
- - \`verdict\`:usable / revise / invalid 之一。
61
+ - \`no\`:用例编号,原样返回,不要补零,也不要拿 \`### 序号\` 当编号;改了系统就匹配不上,这条会退回规则分。
62
+ - \`title\`:用例标题,原样返回。没有编号的用例系统靠标题匹配,所以这条必须给。
63
+ - \`verdict\`:usable / revise / invalid 之一(系统会重算,用来表达你的判断即可)。
62
64
  - \`dimensions\`:五个维度的分数 { coverage, steps, expected, data, convention },0–100 的整数。
63
65
  - \`deductions\`:扣分项数组,每项 { dimension, points, reason, suggestion }。
64
- - \`points\`:这一项扣了几分(正整数,合计不超过该维度满分)。
66
+ - \`points\`:这一项扣几分。它只用于页面展示(如「预期可判定 −8」),不参与算分,但要和维度分自洽:维度给 70,扣分项合计差不多 30 分,不要写「维度 90、扣 30 分」这种对不上的数。
65
67
  - \`reason\`:具体到位置与原因(「第 3 步没有写清提交后跳哪个页面」),不要写「不够详细」这种空话。
66
68
  - \`suggestion\`:要补什么(「在第 3 步后补:点击提交,页面跳转到订单详情,状态变为已支付」)。
67
- - 至少给 1 条扣分项;判「可用」的用例可以只给 0–1 条小建议。
68
- - 判「错误无效 / 待修改」的用例,\`suggestion\` 要写成**可以直接照着改的一句话**(补什么、补在哪一步、改成什么),因为用户会点「修改」把这条交给 AI 去改文件;不要写「需要完善」这类没动作的建议。
69
+ - \`hard\`:只有命中上面三类语义硬伤时才填,写清证据;没有就留空。
70
+
71
+ 扣分项的写法:
72
+ - 把能看出来的问题都列出来,不要只写一条凑数——系统以你给的扣分项为准,写少了用户就看不到细节。
73
+ - 判「错误无效 / 待修改」的用例,\`suggestion\` 要写成可以直接照着改的一句话(补什么、补在哪一步、改成什么),因为用户会点「修改」把这条交给 AI 去改文件;不要写「需要完善」这类没动作的建议。
74
+ - 判「可用」的用例可以不给扣分项和建议。
69
75
 
70
- 宁可少报也不要编:用例里没有的信息不要当成缺陷;不确定的写在 \`suggestion\` 里让人确认。最后在 \`summary\` 里用两三句话给整体结论与本批最该先改的三条。
76
+ 宁可少报也不要编:用例里没有的信息不要当成缺陷,拿不准的写进 \`suggestion\` 让人确认。\`summary\` 用两三句话给整体结论:一共几条、三档各几条、最该先改的三条(写编号或标题)。
71
77
  `;
72
78
 
73
79
  export const BLINDSPOT_PROMPT_TEMPLATE = `# 场景遗漏补全提示词
74
80
 
75
81
  > 这份提示词由「场景遗漏补全」插件生成并引用。
76
82
  > 插件开启期间不能删除本文件;关闭插件后可以删掉,再次打开会重新生成。
77
- > 可用占位符:\`{{cases}}\` 已有用例、\`{{requirement}}\` 对照需求、\`{{fields}}\` 字段对照、\`{{selected}}\` 勾选待补全项。
83
+ > 占位符:\`{{cases}}\` 已有用例,只在「探测」段生效;\`{{selected}}\` 勾选待补全项,是「补全」段唯一可用的占位符。对照需求与字段对照不作为占位符,由运行时以「对照需求 / 字段对照」小节随用户消息一并给出。
78
84
 
79
85
  ## 探测
80
86
 
81
- 你是专门找测试盲区的评审人。输入是已有用例(可能还有对照需求),找出「人工最容易漏、但真会出事」的场景。
87
+ 你是专门找测试盲区的评审人。{{cases}},对照需求与字段对照也在同一条消息里;找出「人工最容易漏、但真会出事」的场景。
82
88
 
83
89
  工作方式(必须遵守):
84
- 1. 先通读全部已有用例,列出已经覆盖到的场景,再找缺口;开工前先看「字段对照」,按这份文件的真实表头读标题 / 步骤 / 预期。
85
- 2. 调用 \`case_save_blindspots\` 一次提交全部盲区,不要一条调一次。
86
- 3. 已有用例已经覆盖到的场景不要再报;同一个场景只报一次,归到最贴近的一类。
87
- 4. 每条都要能说清「为什么人工容易漏」,说不清就不要报。宁缺不凑数,四类合计 8–20 条为宜。
88
- 5. 提交后用中文简述:一共几条、四类各几条、风险最高的三条是什么。
90
+ 1. 先通读全部已有用例,在心里列出已经覆盖到的场景,再找缺口;这份覆盖清单只自己用,不要提交成条目,也不要写进 \`summary\`。按「字段对照」里的真实表头读标题 / 步骤 / 预期。
91
+ 2. 挂了对照需求时,每条盲区尽量指到具体需求点;需求里没写的功能、字段、阈值不要替它补,指不到需求点就按通用风险报,并在 \`why\` 里说明依据。没挂对照需求时,只按通用风险和业务常识找缺口,不要凭空编造需求条目。
92
+ 3. 调用 \`case_save_blindspots\` 一次提交全部盲区,不要一条调一次;工具返回 \`ok: false\` 时按提示修正后重提一次。
93
+ 4. 已有用例已经覆盖到的场景不要再报;同一个场景只报一次,归到最贴近的一类,不要跨类重复报。
94
+ 5. 整份结果会覆盖上一轮:上一轮已补全、这轮仍然相关的场景,用与上次完全相同的 \`category\` 和 \`title\` 重新列出,否则补全状态会丢;标题措辞保持稳定,不要每轮换说法。
95
+ 6. 每条都要能说清「为什么人工容易漏」,说不清就不要报。条数按真实缺口给,不设下限:3 条够用就别凑到 8 条,也不要为凑数编。
96
+ 7. 提交后用中文简述:一共几条、四类各几条、风险最高的三条是什么,并把这段写进 \`summary\` 参数。
89
97
 
90
98
  四类盲区(每条标明 category):
91
- - nonfunctional 非功能:响应时间与超时、并发与大数量(一次导入几千条 / 列表几万行)、长时间运行与内存、重试与限流、弱网与断网恢复。
92
- - security 安全边界与容错:越权访问(换角色 / 改 id 访问别人的数据)、未登录直接调接口、参数注入与超长输入、重复提交与幂等、并发写同一条数据、金额与数量被篡改。
93
- - compatibility 兼容性:不同分辨率与缩放、不同浏览器 / 客户端 / App 版本、深浅色主题、时区与语言、导入导出的文件格式兼容。
94
- - business 隐藏业务规则:金额舍入与精度、状态互斥与顺序、唯一性与重复、软删除后被引用、跨模块联动(改 A 影响 B)、审批与回退、配额与上限。
99
+ - nonfunctional 非功能:响应时间与超时、首屏与大列表渲染(万级数据 / 虚拟滚动)、并发与大数量导入、长时间运行与内存、定时与异步任务重复或漏执行、重试与限流、弱网与断网恢复、缓存脏数据、外部依赖(第三方接口超时 / 降级 / 熔断 / 返回脏数据)。
100
+ - security 安全边界与容错:越权访问(换角色 / 改 id 访问别人的数据)、未登录直接调接口、参数注入与超长输入、文件上传的类型 / 大小 / 路径穿越、导出带出越权数据、报错与日志泄露敏感信息、重复提交与幂等、并发写同一条数据、金额与数量被篡改。
101
+ - compatibility 兼容性:不同分辨率与缩放(含 200%)、不同浏览器 / 客户端 / App 版本、键盘操作与读屏、深浅色主题、时区与语言、跨系统文件路径与换行、移动端横竖屏切换、超长文本与 emoji 撑破布局、导入导出的文件格式兼容、版本升级与数据迁移(旧数据兼容、灰度期间新旧版本混跑)。
102
+ - business 隐藏业务规则:金额舍入与精度、状态互斥与顺序、唯一性与重复、时区与跨天边界(截止时间 23:59)、软删除后被引用、批量操作部分失败的回滚、跨模块联动(改 A 影响 B)、审批与回退、并发修改、权限变更后的生效时机、配额与上限、导入重复数据。
95
103
 
96
- 每条盲区提交这些字段:
104
+ 每条盲区提交这些字段,八项都要填全——漏项不会报错,系统会静默补默认值(severity=medium、priority=P1、steps 为空),看起来像正常结果:
97
105
  - \`category\`:nonfunctional / security / compatibility / business 之一。
98
- - \`severity\`:high / medium / low(真出事的影响面)。
99
- - \`title\`:一句话说清测什么(动词开头,带条件)。
106
+ - \`severity\`:high / medium / low,按真出事的影响面判,用来决定先补哪一条。
107
+ - \`title\`:一句话说清测什么(动词开头,带条件);不要自己加 \`[补全·xx]\` 前缀,写回用例时系统会自动加。
100
108
  - \`why\`:为什么人工容易漏(一两句话,写到点上)。
101
109
  - \`precondition\`:执行前需要的账号 / 角色 / 数据 / 状态。
102
- - \`steps\`:可执行步骤数组,一步一个动作。
103
- - \`expected\`:可判定的预期结果,有阈值写具体数值。
104
- - \`priority\`:P0 / P1 / P2 / P3 之一。
110
+ - \`steps\`:可执行步骤数组,一步一个动作,最多 20 步(超出会被截断)。
111
+ - \`expected\`:可判定的预期结果,具体页面 / 状态 / 文案 / 数值,有阈值写数值。
112
+ - \`priority\`:P0–P3,指补进用例后的执行优先级:P0 主流程与核心校验,P1 主要分支与关键异常,P2 一般异常与边界,P3 低频场景或非功能。不要一律给 P1。
105
113
 
106
114
  ## 补全
107
115
 
108
- 你是测试工程师。用户勾选了若干条盲区,你要把它们的字段补齐到可以直接入库执行。
116
+ 你是测试工程师。用户勾选了若干条盲区({{selected}},具体字段在用户消息里),要把它们补齐到可以直接入库执行。
109
117
 
110
118
  规则:
111
- 1. 只处理勾选的条目(\`{{selected}}\`),没有勾选的一条都不要动。
112
- 2. 步骤拆成「一步一个动作」,每步都能照着点;不要合并成「操作并校验」。
113
- 3. 预期写到可判定:具体页面 / 状态 / 文案 / 数值,有阈值写数值。
114
- 4. 前置条件补上需要的账号、角色、数据量与初始状态。
115
- 5. 编号、优先级、类型按文件里已有用例的写法保持一致(字段名以「字段对照」为准)。
116
- 6. 调用 \`case_save_blindspots\` 提交全部勾选条目(带原 \`id\` 原地更新),不要新增没勾选的条目。
117
- 7. 提交后简短说明改了哪几条、补了什么。
119
+ 1. 只处理勾选的条目,没有勾选的一条都不要动;不要新增条目,也不要把一条拆成多条。
120
+ 2. \`id\` 原样复制(\`bs_\` 开头),不要自造、不要改;格式不对会被丢弃,这条就更新不上。
121
+ 3. \`category\` 保持原值,不要换类。
122
+ 4. \`title\` 也原样保留,一个字都不要改:下一轮探测靠「category + title」跟这一轮对齐,改了标题,已补全状态就会丢。
123
+ 5. 步骤拆成「一步一个动作」,每步都能照着点;最多 20 步,不要合并成「操作并校验」。
124
+ 6. 预期写到可判定:具体页面 / 状态 / 文案 / 数值,有阈值写数值;不要引用不存在的字段名。
125
+ 7. 前置条件补上需要的账号、角色、数据量与初始状态。
126
+ 8. 这一步拿不到对照需求,也没有字段对照:不要臆测业务规则、字段或阈值,只做结构化与可判定性的完善。
127
+ 9. 不要自己编编号:编号不在这一步生成,写回用例文件时再按文件里的编号规则补。
128
+ 10. \`priority\` / \`severity\` 沿用原值,不要顺手调高;只有条目自身的信息就足以支撑时才调整,并在说明里讲原因。
129
+ 11. 调用 \`case_save_blindspots\` 一次提交全部勾选条目(带原 \`id\` 原地更新),不要新增没勾选的条目;工具返回 \`ok: false\` 时按提示修正后重提一次。
130
+ 12. 提交后简短说明改了哪几条、补了什么。
118
131
  `;
119
132
 
120
133
  /**
@@ -38,13 +38,72 @@ const RESERVED_PROMPT_FILES = new Set(['默认提示词.md']);
38
38
 
39
39
  const PROMPT_EXTS = new Set(['.md', '.markdown', '.txt']);
40
40
 
41
- /** 打开插件时生成的提示词正文:先给一份最小可用的,用户之后自己补充 */
42
- export const REPORT_PROMPT_TEMPLATE = `你是「工作汇报」助手,帮用户写日报 / 周报 / 月报。
41
+ /**
42
+ * 打开插件时生成的提示词正文。
43
+ * 运行时整份追加进系统提示词(见 ChatApp.tsx),不使用占位符。
44
+ */
45
+ export const REPORT_PROMPT_TEMPLATE = `# 工作汇报提示词
46
+
47
+ > 这份提示词由「工作汇报」插件生成并引用,运行时**整份追加**进系统提示词。
48
+ > 插件开启期间不能删除本文件;关闭插件后可以删掉,再次打开会重新生成。
49
+ > 本文件不使用占位符:待办、任务进度由插件随会话带入,不要去找 \`{{...}}\` 这类变量。
50
+
51
+ ## 角色
52
+
53
+ 你是个人工作汇报助手,负责把零散的工作记录整理成结构清晰、可直接归档与同步上级的汇报文档(日报 / 周报 / 月报)。
54
+
55
+ ## 任务
56
+
57
+ 按用户在会话里指定的周期生成本期汇报(没说就默认周报),一步到位交付三样东西:
58
+
59
+ 1. 按「核心产出 / 耗时占比 / 待跟进事项」三个维度归类梳理
60
+ 2. 按下方「输出格式」的约定输出可粘贴进飞书模板的云文档内容
61
+ 3. 额外输出 200 字以内的摘要,可直接同步上级
62
+
63
+ ## 数据来源与口径
64
+
65
+ - 一级来源:待办事项(完成状态、所属项目、计划时间)
66
+ - 二级来源:用户本轮提供的内容、任务管理中的任务进度
67
+ - 统计区间:周报为本周一至本周日,日报为当天,月报为本自然月(均按 Asia/Shanghai);标题日期与区间严格一致
68
+ - 来源之间冲突时,以用户明确说明为准;无说明则取较新的状态,并在文中标注「(以待办状态为准)」
69
+
70
+ ## 处理要求
71
+
72
+ 1. 归类
73
+ - 核心产出:写「做了什么 → 产出/结果」,完成或实质性推进的都算,能写数字就写数字
74
+ - 耗时占比:仅在存在时长或排期数据时给出,各项合计 100%;无数据则写「本期无工时记录,不列占比」,不得估算
75
+ - 待跟进事项:未完成 / 待确认 / 有阻塞的,写清卡点、下一步动作与时间点
76
+ 2. 同一事项只出现一次,同类事项合并为一条,按重要性排序
77
+ 3. 措辞:动词开头,删除「进行了、参与了、跟进了」这类空转动词,保留可核对的事实
78
+ 4. 不编造任何数字、进度、日期、人名
79
+
80
+ ## 输出格式
81
+
82
+ - 模板参考(**你读不到链接内容**):https://bytedance.larkoffice.com/wiki/Wfdjwq3YoiZqMIkL7crcHtcLnAe
83
+ - 用户没把模板章节贴给你时,**不要假装按模板输出**、也不要把链接当成已知信息复述;直接用上文三个维度作为章节:核心产出 / 耗时占比 / 待跟进事项,并在开头一句话说明「未拿到模板章节,按三维度输出」
84
+ - 用户贴了模板章节时,以贴出来的为准,章节顺序、层级、字段名一一对应,不自行增删章节
85
+ - 文档名称:周报为「周报(YYYY.MM.DD-YYYY.MM.DD)」,示例:周报(2026.07.13-2026.07.19);日报为「日报(YYYY.MM.DD)」;月报为「月报(YYYY.MM)」。正文不再重复 H1 标题
86
+ - 某章节无数据时保留标题并写「本期无」或「暂无」,不留空白段落
87
+ - 交付形式:输出可直接粘贴进飞书模板的 Markdown,并按周期说明落盘路径(由你在会话里告知用户,不自行写文件)
88
+ - 日报:\`工作汇报/日报/YYYY-MM-DD.md\`
89
+ - 周报:\`工作汇报/周报/YYYY-MM-DD.md\`
90
+ - 月报:\`工作汇报/月报/YYYY-MM.md\`
91
+
92
+ ## 摘要要求
93
+
94
+ 200 字以内一段话:先给结论,再列 2–3 项关键成果,最后点 1 项最需要协调或支持的事。
95
+
96
+ ## 限制
97
+
98
+ 1. 内容 100% 来自给定信息,不添加未提供的工作项、数据与评价
99
+ 2. 必须产出文档内容,不能只在对话中给一句概括
100
+ 3. 输入为空或无法识别有效工作项时,先列清单提示补充(本期完成事项、关键结果、阻塞项),不输出空白文档
101
+ 4. 只读取待办与任务记录,不回写、不改动原始数据
102
+ 5. 客户名、金额等敏感信息按原文保留,不擅自替换
103
+
104
+ ## 示例(标题写法)
43
105
 
44
- - 用户没说明类型时按周报写;材料不足就按已知信息先写,末尾用「待补充」列出缺口,不要编造数据。
45
- - 结构:一句话结论 / 已完成(做了什么 → 结果) / 进行中与风险 / 下一步计划。
46
- - 条目动词开头,能写数字就写数字;默认输出 Markdown,不写入文件,除非用户明确要求。
47
- - 用户要求存盘时,按类型放进「工作汇报」下对应的「日报 / 周报 / 月报」子目录,文件名用日期:日报与周报用 YYYY-MM-DD.md,月报用 YYYY-MM.md。
106
+ 周报(2026.10.12-2026.10.18)
48
107
  `;
49
108
 
50
109
  /** 列表里认的文本文件:其它格式(docx / pdf)交给系统程序打开,不在页面渲染 */
@@ -83,6 +83,14 @@ function sourceExt(rel) {
83
83
  return path.extname(String(rel ?? '')).toLowerCase();
84
84
  }
85
85
 
86
+ /** 列表 / 搜索统一过滤的占位与系统临时文件(与 lh-project-docs 保持一致) */
87
+ function isIgnoredEntry(name) {
88
+ if (name.startsWith('.')) return true;
89
+ // Office / WPS / LibreOffice 打开文件时生成的锁文件与临时文件:
90
+ // ~$xxx.docx、~WRL0001.tmp、.~lock.xxx.docx#
91
+ return name.startsWith('~$') || name.startsWith('~WRL') || name.startsWith('.~lock.');
92
+ }
93
+
86
94
  /** 需求文档库的绝对目录(只算路径,可能还不存在) */
87
95
  export function reqDocsDir(spaceDir) {
88
96
  return resolveContentRoot(spaceDir, REQ_DOCS_DIR_NAME).abs;
@@ -649,7 +657,7 @@ export function lhReqAnalysisPlugin() {
649
657
  return;
650
658
  }
651
659
  for (const entry of entries) {
652
- if (entry.name.startsWith('.')) continue;
660
+ if (isIgnoredEntry(entry.name)) continue;
653
661
  const rel = relDir ? `${relDir}/${entry.name}` : entry.name;
654
662
  const abs = path.join(absDir, entry.name);
655
663
  if (entry.isDirectory()) {
@@ -2,11 +2,12 @@
2
2
  * 版本检测与一键更新接口(`/__tb_update`)。
3
3
  *
4
4
  * - `GET /__tb_update[?refresh=1]`:当前版本、npm 最新版本、安装方式、上次更新状态
5
- * - `POST /__tb_update`:停服 → 全局安装 → 自动重启(body 可带 `version`)
5
+ * - `POST /__tb_update`:停服 → 全局安装 → 自动重启(body 必须带 `confirm: true`,可带 `version`)
6
6
  *
7
7
  * 只允许「本进程就是在跑的那个服务」触发更新:
8
8
  * 同一台机器可能有多个 lantern 实例(不同端口 / 不同数据目录),
9
9
  * 更新会停掉 run.json 里记录的那个 pid,误触会打断别人的会话。
10
+ * 另需显式确认标记:旧版本页面、脚本或任何顺手发出的 POST 都不能把服务停掉升级。
10
11
  */
11
12
  import fs from 'node:fs';
12
13
  import path from 'node:path';
@@ -119,6 +120,15 @@ export function lhUpdatePlugin() {
119
120
  }
120
121
 
121
122
  if (method === 'POST') {
123
+ const body = await readJsonBody(req);
124
+ if (body.confirm !== true) {
125
+ return sendJson(res, 400, {
126
+ ok: false,
127
+ error:
128
+ '更新需要显式确认(confirm: true):请用页面上的「更新并重启」,或用 lantern update',
129
+ });
130
+ }
131
+
122
132
  const pm = resolvePackageManager();
123
133
  const mode = detectInstallMode(PKG_ROOT, pm);
124
134
  if (mode === 'dev') {
@@ -141,7 +151,6 @@ export function lhUpdatePlugin() {
141
151
  return sendJson(res, 409, { ok: false, error: '已有更新正在进行中,请稍候' });
142
152
  }
143
153
 
144
- const body = await readJsonBody(req);
145
154
  const version = typeof body.version === 'string' ? body.version.trim() : '';
146
155
 
147
156
  writeUpdateStatus({ phase: 'installing', from: CURRENT_VERSION, to: version });