lantern-harness 0.1.32 → 0.1.33

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 (80) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/500.html +4 -4
  3. package/dist/_astro/Base.Dlgbb4Ry.css +1 -0
  4. package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.4j--gBo-.js → Base.astro_astro_type_script_index_0_lang.BQ1EoZdo.js} +2 -2
  5. package/dist/_astro/{CaseExecBoard.CTuf_Nom.js → CaseExecBoard.CTVdi8MV.js} +1 -1
  6. package/dist/_astro/CaseGenerateApp.CJK7V6iA.js +10 -0
  7. package/dist/_astro/{CasesLibrary.C-T3VrPa.js → CasesLibrary.Don-Cnus.js} +10 -10
  8. package/dist/_astro/ChatApp.BTcAJ7PK.js +226 -0
  9. package/dist/_astro/{ColumnResize.BgYkV9Iy.js → ColumnResize._Iq05ix_.js} +1 -1
  10. package/dist/_astro/{DashboardBoard.B5Qo5Y3e.js → DashboardBoard.BaJyXPXA.js} +1 -1
  11. package/dist/_astro/{DocsFileBrowser.DnxVsmed.js → DocsFileBrowser.D2Cff2LP.js} +1 -1
  12. package/dist/_astro/{KnowledgeLibrary.DARUegK8.js → KnowledgeLibrary.CWxIHa8I.js} +1 -1
  13. package/dist/_astro/{NavLibraries.FAj9zUuq.js → NavLibraries.CZlA6Z1w.js} +1 -1
  14. package/dist/_astro/{PluginsPage.F0oMYJri.js → PluginsPage.CyjR13X6.js} +1 -1
  15. package/dist/_astro/PluginsPage.DMEvFLnP.js +1 -0
  16. package/dist/_astro/{PmBugsBoard.uNPzbw-N.js → PmBugsBoard.ChL0RBVn.js} +1 -1
  17. package/dist/_astro/{PmIterationsBoard.CjR8L71i.js → PmIterationsBoard.hTKVnMgh.js} +1 -1
  18. package/dist/_astro/{PmProjectDetail.Cpug99Lt.js → PmProjectDetail.Saj76lNM.js} +1 -1
  19. package/dist/_astro/{PmProjectsBoard.VLqrwucj.js → PmProjectsBoard.CCtClGM1.js} +1 -1
  20. package/dist/_astro/PmRequirementsBoard.BNNq671Z.js +1 -0
  21. package/dist/_astro/{PmRequirementsBoard.CdP4gEzq.js → PmRequirementsBoard.DGXYC1Te.js} +1 -1
  22. package/dist/_astro/{PmShared.ChKKU3Ww.js → PmShared.BuhrL7Gb.js} +1 -1
  23. package/dist/_astro/PromptsLibrary.DJtTAFz_.js +1 -0
  24. package/dist/_astro/{ReportsPage.iSM5TWMq.js → ReportsPage.BjD8w0zS.js} +1 -1
  25. package/dist/_astro/ReqAnalysisBoard.BsQ4A1Lt.js +39 -0
  26. package/dist/_astro/{RequirementsLibrary.X89V8-QF.js → RequirementsLibrary.WxAFCP3X.js} +1 -1
  27. package/dist/_astro/{SettingsDialog.BlokCWBn.js → SettingsDialog.CR7rv0mg.js} +1 -1
  28. package/dist/_astro/SpaceSwitcher.BCZbiL7o.js +7 -0
  29. package/dist/_astro/{TasksBoard.Z8rBCO1F.js → TasksBoard.CdWQSwlg.js} +1 -1
  30. package/dist/_astro/{TemplatesLibrary.DBHSAPQ0.js → TemplatesLibrary.y_RtSjYC.js} +1 -1
  31. package/dist/_astro/{TestStatsBoard.BtqoPuLc.js → TestStatsBoard.C3vkF9vc.js} +1 -1
  32. package/dist/_astro/{TodosBoard.ETI63YgA.js → TodosBoard.CSupMlTp.js} +1 -1
  33. package/dist/_astro/{UiAutoBoard.DxrlgvI7.js → UiAutoBoard._og5jRon.js} +3 -3
  34. package/dist/_astro/app-version.DpWEt8o3.js +1 -0
  35. package/dist/_astro/{case-gen-run.BNNfA12U.js → case-gen-run.DDhoxXlU.js} +1 -1
  36. package/dist/_astro/{plugins.SqANn3ZB.js → plugins.CVnHeKyf.js} +1 -1
  37. package/dist/_astro/prompts-meta.Dnmq-SnF.js +2 -0
  38. package/dist/_astro/req-analysis.D9EOpleR.js +31 -0
  39. package/dist/_astro/story-review.COs6QaUe.js +14 -0
  40. package/dist/case-exec/index.html +5 -5
  41. package/dist/cases/generate/index.html +5 -5
  42. package/dist/cases/library/index.html +5 -5
  43. package/dist/dashboard/index.html +5 -5
  44. package/dist/docs/changelog/index.html +57 -38
  45. package/dist/docs/install/index.html +4 -4
  46. package/dist/docs/manual/index.html +14 -14
  47. package/dist/knowledge/index.html +5 -5
  48. package/dist/plugins/index.html +5 -5
  49. package/dist/pm/bugs/index.html +5 -5
  50. package/dist/pm/iterations/index.html +5 -5
  51. package/dist/pm/projects/detail/index.html +5 -5
  52. package/dist/pm/projects/index.html +5 -5
  53. package/dist/pm/requirements/index.html +5 -5
  54. package/dist/prompts/index.html +5 -5
  55. package/dist/reports/index.html +5 -5
  56. package/dist/requirement-analysis/index.html +5 -5
  57. package/dist/requirements/index.html +5 -5
  58. package/dist/tasks/index.html +5 -5
  59. package/dist/templates/index.html +5 -5
  60. package/dist/test-automation/index.html +5 -5
  61. package/dist/test-stats/index.html +5 -5
  62. package/dist/todos/index.html +5 -5
  63. package/dist/workbench/index.html +5 -5
  64. package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +10 -10
  65. package/lh-plugins/lh-req-analysis.mjs +60 -3
  66. package/lh-plugins/plugin-prompts.mjs +2 -0
  67. package/lh-plugins/req-analysis-prompt.mjs +30 -4
  68. package/package.json +1 -1
  69. package/dist/_astro/Base.9LLJ6KVG.css +0 -1
  70. package/dist/_astro/CaseGenerateApp.18SE0dLJ.js +0 -10
  71. package/dist/_astro/ChatApp.BpFXgd8K.js +0 -226
  72. package/dist/_astro/PluginsPage.DKPA2zw8.js +0 -1
  73. package/dist/_astro/PmRequirementsBoard.B5ypu68O.js +0 -1
  74. package/dist/_astro/PromptsLibrary.BlWPVm1Z.js +0 -1
  75. package/dist/_astro/ReqAnalysisBoard.CeQbq7Qh.js +0 -39
  76. package/dist/_astro/SpaceSwitcher.MmSkP3wb.js +0 -7
  77. package/dist/_astro/app-version.CLOjRiPN.js +0 -1
  78. package/dist/_astro/prompts-meta.C_MeYq8G.js +0 -2
  79. package/dist/_astro/req-analysis.Dbe_gqPz.js +0 -24
  80. package/dist/_astro/story-review.CNZnYMvW.js +0 -15
@@ -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.4j--gBo-.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.BQ1EoZdo.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>`),主题必须从同一个键读,
@@ -98,7 +98,7 @@
98
98
  }
99
99
  } catch (e) {}
100
100
  })();
101
- </script><link rel="stylesheet" href="/_astro/Base.9LLJ6KVG.css"><script type="module" src="/_astro/page.Bx2KSkeL.js"></script><style>[data-astro-transition-scope="astro-bbhp3f5g-3"] { view-transition-name: astro-bbhp3f5g-3; }@layer astro { ::view-transition-old(astro-bbhp3f5g-3) {
101
+ </script><link rel="stylesheet" href="/_astro/Base.Dlgbb4Ry.css"><script type="module" src="/_astro/page.Bx2KSkeL.js"></script><style>[data-astro-transition-scope="astro-bbhp3f5g-3"] { view-transition-name: astro-bbhp3f5g-3; }@layer astro { ::view-transition-old(astro-bbhp3f5g-3) {
102
102
  animation-duration: 180ms;
103
103
  animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
104
104
  animation-fill-mode: both;
@@ -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.32">v0.1.32<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.MmSkP3wb.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.FAj9zUuq.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.33">v0.1.33<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.BCZbiL7o.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.CZlA6Z1w.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.BlokCWBn.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.CR7rv0mg.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 data-astro-transition-persist="workbench-chat" class="tw-workbench-host"><astro-island uid="XhrnG" component-url="/_astro/ChatApp.BpFXgd8K.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;slashDocs&quot;:[1,[]]}" 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 data-astro-transition-persist="workbench-chat" class="tw-workbench-host"><astro-island uid="XhrnG" component-url="/_astro/ChatApp.BTcAJ7PK.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{&quot;slashDocs&quot;:[1,[]]}" 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
  * 切页滚回顶部。
@@ -237,7 +237,7 @@ version: '1.0' # 可选
237
237
  | 测试技能 | 自动化测试 | 关 | 侧栏进入自动化测试:自动识别并挂载 Playwright / pytest / Selenium 项目,按项目自带任务运行,运行 / 停止用例、实时日志与 HTML 报告;「生成」Tab 先出可编辑步骤计划、再由 AI 驱动浏览器绑定定位器,写入时一次生成 spec + 页面对象 + 登录态文件(需本地服务) |
238
238
  | 需求管理 | 需求文档库 | 关 | 侧栏进入需求文档库;关闭后入口隐藏,生成用例时不再引用需求文档;磁盘文件仍保留 |
239
239
  | 需求管理 | 需求分析 | 关 | 侧栏进入需求分析:按需求文档结构播种条目并拆查询/修改子点与用户故事;条目可展开对照原文;审查待确认可补充/忽略/落成故事(需本地服务) |
240
- | 需求管理 | 用户故事审查 | 关 | 需求分析页多出「用户故事审查」与「审查结果 / 忽略」Tab,待确认清单可补写、补充、忽略;开启「需求分析」时默认一并打开(需本地服务) |
240
+ | 需求管理 | 用户故事审查 | 关 | 需求分析页多出「审查结果 / 忽略」Tab;生成用户故事成功后自动初审,结果页可重新审查 / 全量扫描;待确认可补写、补充、忽略;开启「需求分析」时默认一并打开(需本地服务) |
241
241
  | 需求管理 | 生成测试点 | 关 | 多出「测试点」Tab,按五维拆测试点并标 P0–P3,可导出 XMind / Markdown;重新生成前确认;开启「需求分析」时默认一并打开(需本地服务) |
242
242
  | 记忆与检索 | 知识库检索 | 关 | 工作台输入 `@` 引用 `知识库管理/`、`测试模板库/` 与工作区文档 |
243
243
  | 记忆与检索 | 会话记忆 | 关 | 长期记忆 / 项目关键 / 项目日志等记忆轨 + 待确认队列;`.lantern/local/memories/`(需本地服务) |
@@ -419,22 +419,22 @@ version: '1.0' # 可选
419
419
 
420
420
  - **数据位置**:落在当前数据空间的 `需求分析/需求分析.json`(`{ version, docs, seq, storySeq }`),第一次写入才建目录 / 文件;切换空间各用各的。`需求分析/` 与「项目管理」的那几个目录一样,不会被侧栏当成同名分组目录搬走。
421
421
  - **来源只读**:「新建分析」与工作台左栏的来源下拉列「需求文档库」里可拆解的文档(`.md` / `.txt` / `.docx` / `.xlsx` 等;不支持的格式置灰说明);**不会改原文档**。下拉可拆解的排前面,同档按**上传/创建时间新→旧**排序(与文档库「创建时间」同一口径)。
422
- - **历史分析**:左栏顶部列出已有分析(按更新时间倒序),点一条切换;同一份来源文档重复选一次会复用已有记录(不会每次新建一份),换一份来源文档才会新建。
423
- - **分步执行(不自动串联)**:左栏按顺序点——**拆解需求** → **生成用户故事** →(可选)**用户故事审查** →(可选)**生成测试点**。拆解需求不会自动生成故事,也不会自动审查。
424
- - **拆解需求**:需求条目**跟需求文档结构**走(Ideal 小模块行 / Markdown 章节先播种),模型只在父级下补「查询 / 修改」子点与原文摘录,禁止另造文档没有的条目标题;本步不写用户故事。
425
- - **生成用户故事**:须先**拆解成功**(状态为已拆解);拆解失败或中断时按钮不可用。**按已整理的查/改需求点**分批生成并挂全 `sourceRefs`(可多点并一条故事,但不得漏 id);同一点击内再对照原始需求做一次二次卡控补漏。正常情况不必再点重新生成,接着做审查质检。一条只做一件事;服务端分配 `US-001` 递增编号。生成失败会清空本轮故事,此时不可审查、不可生成测试点。
426
- - **用户故事审查 / 生成测试点**:须已有成功生成的用户故事;故事为空或仍为「待拆解」时按钮不可用。
422
+ - **历史分析**:详情顶栏「返回列表」右侧用下拉切换已有分析(可搜索;选项第二行显示状态 / 条目数 / 故事数);同一份来源文档重复选一次会复用已有记录(不会每次新建一份),换一份来源文档才会新建。列表页仍按更新时间倒序浏览全部记录。
423
+ - **分步执行**:左栏按顺序点——**拆解需求** → **生成用户故事** →(可选)**生成测试点**。拆解不会自动生成故事。若「用户故事审查」插件开着,**生成用户故事成功后会自动初审**(切到「审查结果」Tab);左栏不再单独放审查按钮。
424
+ - **拆解需求**:需求条目**跟需求文档结构**走,按表头特征播种父级(不是猜文档类型):① Ideal 行表(`大模块/大类` + `小模块/功能点` + `优化/问题内容/需求描述` 等列名别名);② 功能规格竖表(`功能名称` + `功能描述`,可兼编号);③ 需求清单横表(`模块` + `需求内容/需求点`;**不会**把「字段名称 / 字段类型」定义表当成需求);都没有时再按 Markdown / Word 的 `##`/`###` 章节,最后才用 `【短名】`。表解析出 ≥3 条时优先用表。模型只在父级下补「查询 / 修改」子点与原文摘录,禁止另造文档没有的条目标题;本步不写用户故事。生成用户故事 / 审查 / 测试点仍吃结构化 RO,不必随表头改口径。
425
+ - **生成用户故事**:须先**拆解成功**(状态为已拆解);拆解失败或中断时按钮不可用。**按已整理的查/改需求点**分批生成并挂全 `sourceRefs`(可多点并一条故事,但不得漏 id);同一点击内再对照原始需求做一次二次卡控补漏。成功后若审查插件开着会自动审查。一条只做一件事;服务端分配 `US-001` 递增编号。生成失败会清空本轮故事,此时不自动审查、不可生成测试点。
426
+ - **生成测试点**:须已有成功生成的用户故事;故事为空或仍为「待拆解」时按钮不可用。
427
427
  - **Tab 顺序**:需求条目 → 用户故事 → 审查结果 → 测试点(默认停在需求条目)。
428
- - **需求条目 Tab**:可展开卡片——头为文档条目标题与覆盖汇总;展开见**已整理的需求点**(按文档原文顺序;每个子点可再展开看对应原文摘录)、**文档该条原文**,以及覆盖该点的用户故事(可点回故事列表)。每个查/改子点可点**变更需求点**:新增(多行需求内容交给模型拆点子点,插到当前点下方,同父级 id 序号顺延)、修改原文、或删除(二次确认后顺延编号并摘掉故事引用)。
428
+ - **需求条目 Tab**:可展开卡片——头为文档条目标题与覆盖汇总;展开见**已整理的需求点**(按文档原文顺序;每个子点可再展开看对应原文摘录)、**文档该条原文**,以及覆盖该点的用户故事(可点回故事列表)。每个查/改子点可点**变更需求点**:新增(多行需求内容交给模型拆点子点,插到当前点下方,同父级 id 序号顺延)、修改原文、或删除(二次确认后顺延编号并摘掉故事引用)。**拆解需求**时会同时整理原文结构(读「提示词管理」里的 `原文结构提示词.md`,模型只分组,句子必须是来源里的原句,结果记在这份分析上)。页签右侧导出**原文 XMind**或**原文 Markdown**(大类 → 需求标题 → 需求编号 → 原文步骤;编号在步骤上面)。表尾的输入参数、输出参数、流程、提出人等字段不导出。还没拆解出结构时导出按钮会提示先拆解需求。原文 XMind 为向右逻辑图骨架(从左往右,折线竖脊接到各子项),标题和编号白底细边框,步骤不单独设样式。仅在该 Tab 且这份分析有来源文档时显示。
429
429
  - **用户故事**:按关联需求点的文档序排列;卡片上来源显示 `RO-id + 标题`(可点到对应子点并展开原文);字段不全显示「待补全」提示,不刷进审查主清单。
430
430
  - **用例「引用需求点」**:填真实 `RO-…` id,格式「编号 + 标题/原文」;有测试点清单时在 RO 之后加「;TP-xxx」,用来确定条目内的先后。入库时会去掉误填的 `US-…` / 测试点分组前缀;用于排序与追溯,不影响覆盖判定。
431
431
  - **长文档分批**:拆解需求仍按 `^## ` 章节切段(单批不超过 12k 字)。生成用户故事以需求点批次为主(按父级 / 每批约 12 个子点),原文二次卡控时才按章节切段对照。
432
- - **审查(待确认)**:需手点「用户故事审查」。**初审一次全量**挖待确认;之后点「复审用户故事」只刷新上轮清单(问题仍在则更新、已改掉则消失),**默认不再扩表**。真要再挖新问题,在审查结果页点「重新全量扫描」(已忽略仍不回潮)。主清单只报需要人确认的事(需求点未覆盖、原文不清、需业务拍板等),不是「需求缺字段」质检。规则层算覆盖率;模型层只补待确认。故事缺角色 / 异常等改在故事卡提示。
432
+ - **审查(待确认)**:生成用户故事成功后**自动初审**(一次全量挖待确认)。之后在「审查结果」页点「重新审查」只刷新上轮清单(问题仍在则更新、已改掉则消失),**默认不再扩表**;真要再挖新问题点「重新全量扫描」(已忽略仍不回潮)。还没有报告时可用空态「开始审查」。主清单只报需要人确认的事(需求点未覆盖、原文不清、需业务拍板等),不是「需求缺字段」质检。规则层算覆盖率;模型层只补待确认。故事缺角色 / 异常等改在故事卡提示。
433
433
  - **缺口操作**:勾选后可「补写选中缺口」(AI 改故事)、「补充」(手动加故事)、「忽略 / 批量忽略」。审查结果页左侧待确认、右侧忽略列表,可恢复或「落成用户故事」;再审查不会把已忽略项灌回。
434
434
  - **编辑故事**:卡片展开即七段式,可逐段改、增删行、上下移 / 删故事。
435
435
  - **源文档变了**:指纹变化后提示重新拆解需求;确认后旧故事、体检、测试点与忽略一并清掉,按文档结构重新播种条目。
436
- - **生成测试点**:主链路仍是故事 → 五维测试点;重新生成前会确认。正式点优先,扩展点可标 supplemental。
437
- - **提示词**:日常只改「提示词管理」里的 `需求分析提示词.md`(「## 拆解需求」/「## 生成用户故事」;旧文件仅有「## 拆解」时两步共用该段,靠工具限权)与 `用户故事审查提示词.md`。完整参考稿在仓库 `prompt/` 同名文件。你改过的内容不会被覆盖;未改动的短种子会跟着代码缺省升级。
436
+ - **生成测试点**:主链路仍是故事 → 五维测试点;重新生成前会确认。正式点优先,扩展点可标 supplemental。导出 XMind 与原文结构同一套向右逻辑图骨架(折线竖脊、根深蓝 / 需求蓝 / 维度白底细边框,测试点叶子不单独设样式)。
437
+ - **提示词**:日常只改「提示词管理」里的 `需求分析提示词.md`(「## 拆解需求」/「## 生成用户故事」;旧文件仅有「## 拆解」时两步共用该段,靠工具限权)、`原文结构提示词.md`(拆解需求时一并读取,只管原文怎么分大类,不并进拆解段落)与 `用户故事审查提示词.md`。需求分析与审查的完整参考稿在仓库 `prompt/` 同名文件。你改过的内容不会被覆盖;未改动的短种子会跟着代码缺省升级。
438
438
  - 拆解需求 / 生成用户故事 / 审查 / 补写 / 测试点都走当前配置的模型(BYOK),没配模型时按钮会拦下来并提示先配置。
439
439
 
440
440
  ### 用例质量评审与场景遗漏补全
@@ -19,6 +19,8 @@ import { ensurePluginPrompt, isPluginOnInSpace, readPluginPrompt } from './plugi
19
19
  import {
20
20
  REQ_ANALYSIS_PROMPT_FILE,
21
21
  REQ_ANALYSIS_PROMPT_TEMPLATE,
22
+ SOURCE_STRUCTURE_PROMPT_FILE,
23
+ SOURCE_STRUCTURE_PROMPT_TEMPLATE,
22
24
  parseReqPromptSections,
23
25
  } from './req-analysis-prompt.mjs';
24
26
 
@@ -126,6 +128,23 @@ function headingToMarkdown(level, inner) {
126
128
  return `\n\n${hashes} ${text}\n`;
127
129
  }
128
130
 
131
+ /**
132
+ * 整张 HTML 表先压成「一行一条、单元格用 ` | `」——必须在把 `</p>` 换成换行之前做,
133
+ * 否则单元格里的段落会把一行拆成「键\n| 值\n|」,表头解析全失效。
134
+ */
135
+ function htmlTableToMarkdown(tableHtml) {
136
+ const rows = [];
137
+ for (const tr of String(tableHtml ?? '').matchAll(/<tr[^>]*>([\s\S]*?)<\/tr>/gi)) {
138
+ const cells = [...tr[1].matchAll(/<t[dh][^>]*>([\s\S]*?)<\/t[dh]>/gi)].map((m) =>
139
+ htmlInlineText(m[1]),
140
+ );
141
+ // 保留空单元格占位,避免竖表 / 清单表列错位
142
+ if (!cells.length || cells.every((c) => !c)) continue;
143
+ rows.push(cells.join(' | '));
144
+ }
145
+ return rows.length ? `\n\n${rows.join('\n')}\n\n` : '\n\n';
146
+ }
147
+
129
148
  /**
130
149
  * Word(docx)正文抽取:按标题 / 段落 / 表格拼成纯文本,标题层级压成 `#` / `##` / `###`。
131
150
  * 用 `convertToHtml` 而不是 `extractRawText`:后者会丢掉标题样式,文档结构一没了,
@@ -146,9 +165,8 @@ async function extractDocx(fileAbs) {
146
165
  const line = htmlInlineText(inner);
147
166
  return line ? `\n- ${line}` : '';
148
167
  })
149
- // 表格:一行一条,单元格用 ` | ` 隔开,保留字段对照关系
150
- .replace(/<\/tr>/g, '\n')
151
- .replace(/<\/t[dh]>/g, ' | ')
168
+ // 表格整段替换(先于 </p>→换行),保证「功能名称 | xxx」落在同一行
169
+ .replace(/<table[^>]*>[\s\S]*?<\/table>/gi, (table) => htmlTableToMarkdown(table))
152
170
  .replace(/<br\s*\/?>/g, '\n')
153
171
  .replace(/<\/(p|div|section)>/g, '\n')
154
172
  .replace(/<[^>]+>/g, '')
@@ -545,6 +563,7 @@ function normalizeDoc(raw) {
545
563
  .filter(Boolean)
546
564
  .slice(0, 50);
547
565
  }
566
+ doc.sourceExport = normalizeSourceExport(raw.sourceExport);
548
567
 
549
568
  const seenOutline = new Set();
550
569
  const outline = (Array.isArray(raw.outline) ? raw.outline : [])
@@ -688,9 +707,33 @@ function normalizePatch(base, raw) {
688
707
  .filter(Boolean)
689
708
  .slice(0, 50);
690
709
  }
710
+ if ('sourceExport' in raw) patch.sourceExport = normalizeSourceExport(raw.sourceExport);
691
711
  return patch;
692
712
  }
693
713
 
714
+ function normalizeSourceExport(raw) {
715
+ if (!raw || typeof raw !== 'object') return null;
716
+ const groups = [];
717
+ for (const group of Array.isArray(raw.groups) ? raw.groups : []) {
718
+ if (!group || typeof group !== 'object') continue;
719
+ const category = text(group.category, 200);
720
+ const items = [];
721
+ for (const item of Array.isArray(group.items) ? group.items : []) {
722
+ if (!item || typeof item !== 'object') continue;
723
+ const title = text(item.title, 200);
724
+ const body = text(item.body, 4000);
725
+ if (!title && !body) continue;
726
+ items.push({ title: title || body.slice(0, 40), body: body || title });
727
+ if (items.length >= 80) break;
728
+ }
729
+ if (!category || !items.length) continue;
730
+ groups.push({ category, items });
731
+ if (groups.length >= 40) break;
732
+ }
733
+ if (!groups.length) return null;
734
+ return { at: text(raw.at, 40) || new Date().toISOString(), groups };
735
+ }
736
+
694
737
  /**
695
738
  * @returns {import('vite').Plugin}
696
739
  */
@@ -722,14 +765,23 @@ export function lhReqAnalysisPlugin() {
722
765
  // 「重新打开插件会重新生成」不能只靠开关那一下,这里也兜一层
723
766
  if (isPluginOnInSpace('reqAnalysis', root)) {
724
767
  ensurePluginPrompt(REQ_ANALYSIS_PROMPT_FILE, REQ_ANALYSIS_PROMPT_TEMPLATE, root);
768
+ ensurePluginPrompt(
769
+ SOURCE_STRUCTURE_PROMPT_FILE,
770
+ SOURCE_STRUCTURE_PROMPT_TEMPLATE,
771
+ root,
772
+ );
725
773
  }
726
774
  const content = readPluginPrompt(REQ_ANALYSIS_PROMPT_FILE, root);
727
775
  const sections = parseReqPromptSections(content);
776
+ const structure = readPluginPrompt(SOURCE_STRUCTURE_PROMPT_FILE, root);
728
777
  return sendJson(res, 200, {
729
778
  ok: true,
730
779
  file: REQ_ANALYSIS_PROMPT_FILE,
731
780
  exists: Boolean(content.trim()),
781
+ structureFile: SOURCE_STRUCTURE_PROMPT_FILE,
732
782
  ...sections,
783
+ // 整理原文结构用单独的「原文结构提示词.md」,不读需求分析提示词里的段落
784
+ structure,
733
785
  });
734
786
  }
735
787
 
@@ -750,6 +802,11 @@ export function lhReqAnalysisPlugin() {
750
802
  REQ_ANALYSIS_PROMPT_TEMPLATE,
751
803
  root,
752
804
  );
805
+ ensurePluginPrompt(
806
+ SOURCE_STRUCTURE_PROMPT_FILE,
807
+ SOURCE_STRUCTURE_PROMPT_TEMPLATE,
808
+ root,
809
+ );
753
810
  return sendJson(res, 200, { ok: true, enabled: true, ...out });
754
811
  }
755
812
 
@@ -57,6 +57,7 @@ export const PLUGIN_PROMPT_FILES = Object.freeze({
57
57
  '工作汇报提示词.md': 'reports',
58
58
  'Playwright提示词.md': 'uiAuto',
59
59
  '需求分析提示词.md': 'reqAnalysis',
60
+ '原文结构提示词.md': 'reqAnalysis',
60
61
  '用户故事审查提示词.md': 'storyReview',
61
62
  '测试点生成提示词.md': 'testPoints',
62
63
  '用例质量评审提示词.md': 'caseReview',
@@ -65,6 +66,7 @@ export const PLUGIN_PROMPT_FILES = Object.freeze({
65
66
 
66
67
  export const UI_AUTO_PROMPT_FILE = 'Playwright提示词.md';
67
68
  export const REQ_ANALYSIS_PROMPT_FILE = '需求分析提示词.md';
69
+ export const SOURCE_STRUCTURE_PROMPT_FILE = '原文结构提示词.md';
68
70
  export const STORY_REVIEW_PROMPT_FILE = '用户故事审查提示词.md';
69
71
  export const TEST_POINTS_PROMPT_FILE = '测试点生成提示词.md';
70
72
  export const CASE_REVIEW_PROMPT_FILE = '用例质量评审提示词.md';
@@ -6,9 +6,9 @@
6
6
  * 打开插件时缺文件才写入下方短 TEMPLATE;两段为 `## 拆解需求` / `## 生成用户故事`。
7
7
  */
8
8
 
9
- import { REQ_ANALYSIS_PROMPT_FILE } from './plugin-prompts.mjs';
9
+ import { REQ_ANALYSIS_PROMPT_FILE, SOURCE_STRUCTURE_PROMPT_FILE } from './plugin-prompts.mjs';
10
10
 
11
- export { REQ_ANALYSIS_PROMPT_FILE };
11
+ export { REQ_ANALYSIS_PROMPT_FILE, SOURCE_STRUCTURE_PROMPT_FILE };
12
12
 
13
13
  export const DECOMPOSE_SECTION = '拆解需求';
14
14
  export const STORIES_SECTION = '生成用户故事';
@@ -40,7 +40,7 @@ export const REQ_ANALYSIS_PROMPT_TEMPLATE = `# 需求分析提示词
40
40
  */
41
41
  export function parseReqPromptSections(text) {
42
42
  const raw = String(text ?? '');
43
- const out = { decompose: '', stories: '', audit: '', fix: '' };
43
+ const out = { decompose: '', stories: '', structure: '', audit: '', fix: '' };
44
44
  if (!raw.trim()) return out;
45
45
  let current = '';
46
46
  let buffer = [];
@@ -48,6 +48,7 @@ export function parseReqPromptSections(text) {
48
48
  const body = buffer.join('\n').trim();
49
49
  if (current === 'decompose') out.decompose = body;
50
50
  else if (current === 'stories') out.stories = body;
51
+ else if (current === 'structure') out.structure = body;
51
52
  else if (current === 'legacy') {
52
53
  // 旧单段「## 拆解」:两边都用,靠运行时工具白名单限权
53
54
  if (body) {
@@ -63,7 +64,8 @@ export function parseReqPromptSections(text) {
63
64
  if (heading) {
64
65
  flush();
65
66
  const name = heading[1].trim();
66
- if (/拆解需求|整理需求|整理条目/.test(name)) current = 'decompose';
67
+ if (/原文结构/.test(name)) current = 'structure';
68
+ else if (/拆解需求|整理需求|整理条目/.test(name)) current = 'decompose';
67
69
  else if (/生成用户故事/.test(name)) current = 'stories';
68
70
  else if (/^拆解$/.test(name) || /^(拆分|分析)$/.test(name)) current = 'legacy';
69
71
  else if (/拆解|拆分/.test(name) && !/需求|故事|审查|补写/.test(name)) current = 'legacy';
@@ -80,3 +82,27 @@ export function parseReqPromptSections(text) {
80
82
  if (out.stories && !out.decompose) out.decompose = out.stories;
81
83
  return out;
82
84
  }
85
+
86
+ /**
87
+ * 缺文件时写入「提示词管理/原文结构提示词.md」。
88
+ * 日常只改空间里那一份;这里只在文件不存在、或用户没改过种子时补上。
89
+ */
90
+ export const SOURCE_STRUCTURE_PROMPT_TEMPLATE = `# 原文结构提示词
91
+
92
+ 整理需求原文的目录,方便按大类阅读。只输出 JSON,不要解释。
93
+
94
+ ## 规则
95
+
96
+ - 只做分组。\`category\`、\`title\`、\`body\` 都必须是原文里连续出现的原句,一个字都不要改写。
97
+ - \`category\` 是大类或模块(例如「工单系统」)。文档没有单独写出大类时,用原文里最接近的模块名;实在没有就不要编。
98
+ - \`title\` 是该条需求的短标题,用原文标题,不要自己起名。
99
+ - \`body\` 是这条标题下面的原文段落。标题行本身不要再写进 body。
100
+ - 不同文档的标题层级不一样,按语义归组,不要假设「# 一定是大类、## 一定是标题」。
101
+ - 对不上原文的条目不要输出。
102
+
103
+ ## 输出
104
+
105
+ \`\`\`json
106
+ {"groups":[{"category":"原文中的大类","items":[{"title":"原文中的需求标题","body":"标题下的原文段落"}]}]}
107
+ \`\`\`
108
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lantern-harness",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "AI 工作台:对话与插件工具、内容库、模板库、会话记忆,数据留在本机。",