lantern-harness 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -10
- package/cli/ai-testbench.mjs +0 -0
- package/dist/500.html +3 -3
- package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.DMNdQAFX.js → Base.astro_astro_type_script_index_0_lang.DZ45xGEk.js} +1 -1
- package/dist/_astro/{ChatApp.DeOJ7uAF.js → ChatApp.D9NIekGO.js} +1 -1
- package/dist/_astro/{PluginsPage.BxscT2eI.js → PluginsPage.Bhyuqbq0.js} +1 -1
- package/dist/_astro/PluginsPage.C6ecLD6o.js +1 -0
- package/dist/_astro/{PromptsLibrary.BGLzT5qB.js → PromptsLibrary.CEQ2PSE6.js} +1 -1
- package/dist/_astro/{ReqAnalysisBoard.wlVfu2Hi.js → ReqAnalysisBoard.MZap7sCK.js} +1 -1
- package/dist/_astro/{SettingsDialog.C2qXt7Cw.js → SettingsDialog.CDlXEl-R.js} +1 -1
- package/dist/_astro/app-version.fDqj9z2r.js +1 -0
- package/dist/_astro/{story-review.Ct1XRMjk.js → story-review.C5gzEzBP.js} +1 -1
- package/dist/_astro/{update.DXCPfU4a.js → update.Fq2CGmCX.js} +1 -1
- package/dist/case-exec/index.html +3 -3
- package/dist/cases/generate/index.html +3 -3
- package/dist/cases/library/index.html +3 -3
- package/dist/dashboard/index.html +3 -3
- package/dist/docs/changelog/index.html +27 -13
- package/dist/docs/install/index.html +3 -3
- package/dist/docs/manual/index.html +4 -3
- package/dist/knowledge/index.html +3 -3
- 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
- package/dist/plugins/index.html +4 -4
- package/dist/pm/bugs/index.html +3 -3
- package/dist/pm/iterations/index.html +3 -3
- package/dist/pm/projects/detail/index.html +3 -3
- package/dist/pm/projects/index.html +3 -3
- package/dist/pm/requirements/index.html +3 -3
- package/dist/prompts/index.html +4 -4
- package/dist/reports/index.html +3 -3
- package/dist/requirement-analysis/index.html +4 -4
- package/dist/requirements/index.html +3 -3
- package/dist/tasks/index.html +3 -3
- package/dist/templates/index.html +3 -3
- 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
- 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
- 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
- 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
- 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
- package/dist/test-automation/index.html +3 -3
- package/dist/test-stats/index.html +3 -3
- package/dist/todos/index.html +3 -3
- package/dist/workbench/index.html +4 -4
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +1 -0
- package/lh-plugins/lh-update.mjs +11 -2
- package/package.json +18 -16
- package/dist/_astro/PluginsPage.uNmdj9oC.js +0 -1
- package/dist/_astro/app-version.v6jLgARE.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# 版本日志
|
|
2
2
|
|
|
3
|
-
## [0.1.
|
|
3
|
+
## [0.1.18] - 2026-10-23
|
|
4
|
+
|
|
5
|
+
给更新接口补上服务端硬约束:升级必须由页面上的「更新并重启」显式确认,旧版本页面或脚本再也无法在后台把服务停掉升级。
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
|
|
9
|
+
- **杜绝不知情升级**:`POST /__tb_update` 现在必须带 `confirm: true`,否则直接 400 拒绝;只有设置页「更新并重启」会携带该标记。此前 0.1.15 / 0.1.16 的旧前端仍会在页面加载时自动发更新请求,导致服务停掉重启,这次从服务端堵住
|
|
10
|
+
|
|
11
|
+
## [0.1.17] - 2026-10-23
|
|
4
12
|
|
|
5
13
|
本次把「有新版本」从后台静默安装改成只提示、由你点按钮升级;需求文档库会自动过滤 Office / 系统临时文件,待办的状态分组顺序也按「未结束优先」重排。
|
|
6
14
|
|
|
@@ -11,19 +19,14 @@
|
|
|
11
19
|
- **需求文档库过滤临时文件**:`.DS_Store`、`.gitkeep`、Office / WPS 的 `~$xxx.docx`、Word 的 `~WRL*.tmp`、LibreOffice 的 `.~lock.*#` 不再出现在列表与文件夹计数里(文件仍保留在磁盘)
|
|
12
20
|
- **单击非预览文档不再报错**:需求文档库里 `.docx / .xlsx / .csv` 单击不再提示「仅 .md / .txt 支持预览」,双击仍交给本机程序打开
|
|
13
21
|
|
|
14
|
-
## [0.1.
|
|
22
|
+
## [0.1.16] - 2026-10-23
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
新增「用例质量评审」「场景遗漏补全」两个测试技能插件:在用例管理里就能对整份用例做分级质检、挖漏测场景,并把要改的地方直接带到工作台会话里改原文件;同时把全站表格 / 列表的列宽拖拽、固定列与横向滚动记忆统一成「用例执行统计」这一套。
|
|
17
25
|
|
|
18
26
|
### 新增
|
|
19
27
|
|
|
20
28
|
- **用例质量评审**:用例管理文件行多出「评审」列(上次分数 / 补全条数 / 是否过期)与「评审」按钮,抽屉分「质量评审 / 场景补全 / 用例表格」三个 Tab。规则层先算七项量化指标与硬伤,模型层逐条给五维分(需求覆盖 25 / 步骤可执行 25 / 预期可判定 20 / 数据与边界 15 / 规范完整 15)与可直接照改的扣分建议;总分按权重加权,≥85 可用、60–84 待修改、<60 错误无效。报告存 `<空间>/用例评审/用例评审.json`,可导出 Markdown
|
|
21
29
|
- **场景遗漏补全**:评审抽屉的「场景补全」Tab 按非功能 / 安全边界与容错 / 兼容性 / 隐藏业务规则四类挖人工最容易漏的场景,每条给出为什么容易漏与前置 / 步骤 / 预期 / 优先级;勾选后把建议带进这条用例绑定的工作台会话写回原文件,写前自动备份
|
|
22
|
-
- **评审结论可一键跳工作台改**:逐条明细悬停标题右侧出现「修改」,带着编号、扣分原因与建议跳到该用例绑定的会话(没有就新建),由模型按文件表头改原文件;也能按当前筛选「批量修改」
|
|
23
|
-
- **用例表格(评审抽屉)**:固定六列为编号 / 标题 / 步骤 / 预期 / 判定 / 建议,步骤与预期默认两行、超出省略号 + 悬停气泡,表头右边缘可拖拽改列宽
|
|
24
|
-
- **工作台任务卡**:评审 / 补全带过来的大批改法不再整段灌进输入框,改成输入框上方的胶囊,点开可预览、编辑、移除;发送时正文随消息一起带上
|
|
25
|
-
- **输入框记忆**:切到别的页面再回工作台,上次没发出去的文字还在(按空间分开存,防抖写入并在页面隐藏 / 卸载时补写)
|
|
26
|
-
- **需求分析实时进度**:拆解按批次、审查与生成测试点按阶段显示「第 N/M 批」与当前动作,可随时中断;生成测试点后自动切到「测试点」Tab,右上角提示也换成对应文案
|
|
27
30
|
- **全站表格列宽与固定列统一**:表格 / 列表一律照「用例执行统计」来——勾选列与关键字段列贴左固定、操作列贴右固定,操作列前留一个填充列吸掉剩余宽度;表头右边缘拖拽改列宽,按页面分别记住(用例执行统计、测试统计、任务、待办、用例评审表、用例 / 提示词 / 知识库列表)。已去掉双击复位,误触双击不会再悄悄改列宽
|
|
28
31
|
- **横向滚动位置记忆**:刷新、切页回来都停在上次的横向位置;恢复在首帧绘制前完成,不再先闪一遍「本应被固定列遮住」的内容
|
|
29
32
|
- **列表列宽可调**:用例管理 / 提示词管理 / 知识库管理的列表也能拖动表头右边缘改列宽,按库分别记住;操作列按钮改为居中并与表头对齐
|
|
@@ -32,13 +35,28 @@
|
|
|
32
35
|
|
|
33
36
|
- **整批判成「错误无效」**:模型一边给 77–86 分一边把每条都标成错误无效,旧逻辑无条件采信模型的 `verdict`,于是 48 条用例全被判无效。现在判定只由「硬伤证据 + 加权分」决定,模型想判无效必须在 `hard` 里写清证据;提示词同步要求分数与判定自洽。读旧报告时也会按分数重算一次,不必重跑模型
|
|
34
37
|
- **标题显示成「(无标题)」**:`测试项目 / 测试分项目` 这类两级表头的模板,之前把迭代名当成了用例标题。现在 `测试分项目` 优认为标题、`测试项目` 归到所属模块,标题下也不再重复显示与文件名相同的迭代名
|
|
35
|
-
- **用例表格被撑高**:修改建议列原来只吃剩余宽度,抽屉里被挤成一条竖线,一行建议竖排十几行。现在各列都有默认像素宽度(可拖),并且修掉 `block` 覆盖 `line-clamp` 导致两行截断失效的问题
|
|
36
38
|
- **详情行错位**:逐条明细的「修改」按钮与编号、标题、得分不在同一基线上;状态徽标宽度随「可用 / 待修改 / 错误无效」变化,编号列左右跳动
|
|
37
|
-
- **挂载提示词后列表里看不到**:新建提示词后没重新读提示词库,出现「挂载成功但可选列表里没有、界面还显示未挂载」;现在写完配置再广播刷新,并重新拉一次列表。挂载弹窗加了搜索、限高与滚动,弹出时不再触发右侧滚动条
|
|
38
39
|
- **操作列表头与按钮错开**:文档库操作列只传了宽度、把默认的 `text-right` 覆盖掉了,表头左对齐而按钮右对齐
|
|
39
40
|
- **固定列分隔线消失 / 断成虚线**:之前线挂在「是否滚动过」上,滚回左端或惯性回弹到 0 就整条消失;列表里又用内阴影画,只有文字那么高,行与行之间断开。现在只要真的横向滚出去就一直画着,改用整行拉满的绝对定位线,表格与列表都是连续一根
|
|
40
41
|
- **待办「待办名称」与表头对不齐**:表体这一格漏了 `68px` 的固定列偏移,压在勾选列与行号列上,固定线跑到比表头更左的位置;补齐偏移与内边距后表头表体完全重合
|
|
41
42
|
- **深色主题表格**:列宽手柄的竖线在深色表头上隐形,现在换亮色;单元格聚焦时不再变成白底浅字
|
|
43
|
+
|
|
44
|
+
## [0.1.15] - 2026-10-23
|
|
45
|
+
|
|
46
|
+
工作台补上输入框记忆与「任务卡」胶囊,需求分析的拆解 / 审查 / 生成测试点都能看到实时进度并可中断;评审抽屉新增固定的用例表格视图,逐条结论可一键带回工作台改原文件。
|
|
47
|
+
|
|
48
|
+
### 新增
|
|
49
|
+
|
|
50
|
+
- **评审结论可一键跳工作台改**:逐条明细悬停标题右侧出现「修改」,带着编号、扣分原因与建议跳到该用例绑定的会话(没有就新建),由模型按文件表头改原文件;也能按当前筛选「批量修改」
|
|
51
|
+
- **用例表格(评审抽屉)**:固定六列为编号 / 标题 / 步骤 / 预期 / 判定 / 建议,步骤与预期默认两行、超出省略号 + 悬停气泡,表头右边缘可拖拽改列宽
|
|
52
|
+
- **工作台任务卡**:评审 / 补全带过来的大批改法不再整段灌进输入框,改成输入框上方的胶囊,点开可预览、编辑、移除;发送时正文随消息一起带上
|
|
53
|
+
- **输入框记忆**:切到别的页面再回工作台,上次没发出去的文字还在(按空间分开存,防抖写入并在页面隐藏 / 卸载时补写)
|
|
54
|
+
- **需求分析实时进度**:拆解按批次、审查与生成测试点按阶段显示「第 N/M 批」与当前动作,可随时中断;生成测试点后自动切到「测试点」Tab,右上角提示也换成对应文案
|
|
55
|
+
|
|
56
|
+
### 修复
|
|
57
|
+
|
|
58
|
+
- **用例表格被撑高**:修改建议列原来只吃剩余宽度,抽屉里被挤成一条竖线,一行建议竖排十几行。现在各列都有默认像素宽度(可拖),并且修掉 `block` 覆盖 `line-clamp` 导致两行截断失效的问题
|
|
59
|
+
- **挂载提示词后列表里看不到**:新建提示词后没重新读提示词库,出现「挂载成功但可选列表里没有、界面还显示未挂载」;现在写完配置再广播刷新,并重新拉一次列表。挂载弹窗加了搜索、限高与滚动,弹出时不再触发右侧滚动条
|
|
42
60
|
- **删除图标不统一**:全站删除按钮常态即红色(`tw-icon-danger`),不再是悬停才红
|
|
43
61
|
|
|
44
62
|
## [0.1.14] - 2026-10-21
|
package/cli/ai-testbench.mjs
CHANGED
|
File without changes
|
package/dist/500.html
CHANGED
|
@@ -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.
|
|
6
|
+
</script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.DZ45xGEk.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>`),主题必须从同一个键读,
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
animation-duration: 180ms;
|
|
136
136
|
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
137
137
|
animation-fill-mode: both;
|
|
138
|
-
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.16">v0.1.16<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="{"data-astro-transition-persist":[0,"astro-gyrtbwwo-1"]}" ssr client="only" opts="{"name":"SpaceSwitcher","value":"react"}" 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" 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="{"data-astro-transition-persist":[0,"astro-iywf7oe7-2"]}" ssr client="only" opts="{"name":"NavLibraries","value":"react"}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island><script>(function(){const host = ".tw-nav-libraries";
|
|
138
|
+
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.18">v0.1.18<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="{"data-astro-transition-persist":[0,"astro-gyrtbwwo-1"]}" ssr client="only" opts="{"name":"SpaceSwitcher","value":"react"}" 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" 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="{"data-astro-transition-persist":[0,"astro-iywf7oe7-2"]}" ssr client="only" opts="{"name":"NavLibraries","value":"react"}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island><script>(function(){const host = ".tw-nav-libraries";
|
|
139
139
|
const cacheKey = "tw.hydrate.nav";
|
|
140
140
|
const fixActive = true;
|
|
141
141
|
const capture = false;
|
|
@@ -365,7 +365,7 @@ const syncNavGroups = true;
|
|
|
365
365
|
// 缓存坏了就当没有
|
|
366
366
|
}
|
|
367
367
|
})();
|
|
368
|
-
})();</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.
|
|
368
|
+
})();</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.CDlXEl-R.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{}" ssr client="load" opts="{"name":"SettingsDialog","value":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>
|
|
369
369
|
(function () {
|
|
370
370
|
try {
|
|
371
371
|
var raw = localStorage.getItem('tw.app.model.v1');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./app-config.CF1xVPmo.js";import{i as t,o as n}from"./plugins.DYyAjBXb.js";import{t as r}from"./settings.BvxRxdqa.js";import{t as i}from"./app-version.
|
|
1
|
+
import{i as e}from"./app-config.CF1xVPmo.js";import{i as t,o as n}from"./plugins.DYyAjBXb.js";import{t as r}from"./settings.BvxRxdqa.js";import{t as i}from"./app-version.fDqj9z2r.js";import{t as ee}from"./update.Fq2CGmCX.js";var te=100,ne=420,a=14,re=150,o=6,ie=3200,ae=180,s=null,c=null,l=null,u=null,d=null,f=!1,p=0,m=0,h=0,g=0,_=!1,v=0,y=null,b=null,x=0,S=!1,C=null,w=!1;function T(e){if(!e.isConnected||e.closest(`[data-closed]`)||e.checkVisibility&&!e.checkVisibility({checkVisibilityCSS:!0}))return!0;let t=e.getBoundingClientRect();return t.width===0&&t.height===0}function E(e){let t=e.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2;if(n<0||r<0||n>window.innerWidth||r>window.innerHeight)return!1;let i=document.elementFromPoint(n,r);return i?!(i===e||e.contains(i)||i.contains(e)):!1}function D(e){let t=e.getBoundingClientRect();y&&y.left===t.left&&y.top===t.top&&y.width===t.width&&y.height===t.height||(j(),M())}function O(e){let t=e.getBoundingClientRect();return t.bottom<=0||t.top>=window.innerHeight||t.right<=0||t.left>=window.innerWidth}function oe(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function k(){g&&=(cancelAnimationFrame(g),0)}function A(){b=null,x&&=(window.clearTimeout(x),0)}function se(){k();let e=()=>{g=0;let t=u;t&&(T(t)||O(t)||E(t)||S&&C&&!oe(t.getBoundingClientRect(),C.x,C.y)||!S&&!t.contains(document.activeElement)?L():(D(t),g=requestAnimationFrame(e)))};g=requestAnimationFrame(e)}function ce(){s&&s.isConnected||(s=document.createElement(`div`),s.setAttribute(`role`,`tooltip`),s.className=`tw-tooltip tw-tooltip-anim pointer-events-none fixed rounded-md px-2 py-1 text-[12px] leading-5 break-all text-stone-700 shadow-lg`,s.style.zIndex=String(te),s.dataset.closed=``,c=document.createElement(`span`),c.setAttribute(`aria-hidden`,`true`),c.className=`tw-tooltip-arrow absolute h-2 w-2`,c.style.transform=`translateX(-50%) rotate(45deg)`,l=document.createTextNode(``),s.append(c,l),document.body.appendChild(s))}function j(){if(!u)return;let e=u.getBoundingClientRect(),t=Math.min(Math.max(e.width,160),ne),n=e.bottom+72>window.innerHeight-8,r=n?e.top-o:e.bottom+o,i=Math.max(8,Math.min(e.left,Math.max(8,window.innerWidth-t-8)));d={top:r,left:i,maxWidth:t,openUp:n,arrowLeft:Math.max(a,Math.min(e.left+e.width/2-i,t-a))},y={left:e.left,top:e.top,width:e.width,height:e.height}}function M(){s&&c&&d&&(s.style.top=`${d.top}px`,s.style.left=`${d.left}px`,s.style.maxWidth=`${d.maxWidth}px`,s.classList.toggle(`is-up`,d.openUp),s.classList.toggle(`is-down`,!d.openUp),c.classList.toggle(`is-up`,d.openUp),c.classList.toggle(`is-down`,!d.openUp),c.style.left=`${d.arrowLeft}px`,c.style.top=d.openUp?``:`-5px`,c.style.bottom=d.openUp?`-5px`:``)}function N(e){let t=e.innerText||``;return e.querySelectorAll(`[class*="sr-only"]`).forEach(e=>{let n=e.innerText;n&&(t=t.replace(n,``))}),t.replace(/\s+/g,` `).trim()}function le(e){return e.scrollWidth>e.clientWidth+1}function P(e){return e.dataset.hintAlways!==void 0||e.dataset.hintFit===void 0&&!N(e)||le(e)}function F(e){return!!e.dataset.hint&&P(e)}function I(e,t){let n=e.dataset.hint??``;if(!n||!P(e))return;let r=e.getBoundingClientRect();if(!r.width||!r.height||e.checkVisibility&&!e.checkVisibility({checkVisibilityCSS:!0})||E(e)||(ce(),!s||!l))return;u=e,S=t,m&&=(window.clearTimeout(m),0),l.data=n,j(),M(),s.style.display=``,f||(s.dataset.closed=``),cancelAnimationFrame(p);let i=++v;p=requestAnimationFrame(()=>{p=requestAnimationFrame(()=>{s&&i===v&&u===e&&(f=!0,delete s.dataset.closed)})}),se(),h&&window.clearTimeout(h),h=window.setTimeout(()=>{h=0,u===e&&L()},ie)}function L(){k(),A(),v+=1,p&&=(cancelAnimationFrame(p),0),u=null,S=!1,y=null,h&&=(window.clearTimeout(h),0),s&&(f=!1,s.dataset.closed=``,m&&window.clearTimeout(m),m=window.setTimeout(()=>{m=0,!f&&s&&(s.style.display=`none`)},re))}function R(e){if(!(e instanceof Element))return null;let t=e.closest(`[data-hint]`);return t instanceof HTMLElement?t:null}function z(e){w=!0,(e.clientX!==0||e.clientY!==0)&&(C={x:e.clientX,y:e.clientY});let t=R(e.target);t!==u&&(!t||!F(t)?(A(),u&&L()):t!==b&&(A(),b=t,x=window.setTimeout(()=>{x=0;let e=b;b=null,e&&e!==u&&I(e,!0)},ae)))}function B(e){let t=R(e.target);if(t&&t===b&&A(),!t||t!==u)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||L()}function V(e){if(w)return;let t=R(e.target);t!==u&&(!t||!F(t)?u&&L():I(t,!1))}function H(e){let t=R(e.target);if(!t||t!==u)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||L()}function U(){A(),u&&L()}function W(){u&&(T(u)||O(u)||E(u)?L():D(u))}function ue(e){C={x:e.clientX,y:e.clientY},w=!0}function de(){w=!0,A(),u&&L()}function fe(e){w=!1,e.key===`Escape`&&u&&L()}function pe(){typeof document>`u`||_||(_=!0,document.addEventListener(`mouseover`,z,!0),document.addEventListener(`mouseout`,B,!0),document.addEventListener(`pointermove`,ue,{capture:!0,passive:!0}),document.addEventListener(`pointerdown`,de,!0),document.addEventListener(`focusin`,V,!0),document.addEventListener(`focusout`,H,!0),document.addEventListener(`click`,U,!0),document.addEventListener(`keydown`,fe,!0),window.addEventListener(`scroll`,W,!0),window.addEventListener(`resize`,W),window.addEventListener(`blur`,()=>{u&&L()}),document.addEventListener(`visibilitychange`,()=>{document.hidden&&u&&L()}),document.documentElement.addEventListener(`mouseleave`,()=>{u&&L()}),document.addEventListener(`astro:after-swap`,()=>{k(),v+=1,p&&=(cancelAnimationFrame(p),0),h&&=(window.clearTimeout(h),0),u=null,f=!1,y=null,s?.isConnected&&s.remove(),s=null,c=null,l=null}))}var me=[`dashboard`,`tasks`,`todos`,`projects`,`iterations`,`pmRequirements`,`bugs`,`reports`,`testStats`,`caseExec`,`cases`,`prompts`,`knowledgeLib`,`requirements`,`templates`];function he(e){return`pluginOff${e.charAt(0).toUpperCase()}${e.slice(1)}`}function G(){let e=document.documentElement;for(let n of me){let r=he(n);t(n)?delete e.dataset[r]:e.dataset[r]=`1`}}function ge(){G(),n(()=>G()),e().then(()=>G()),document.addEventListener(`astro:page-load`,G)}var _e=`tw-update-dot`,ve=3e5,K=`tw.update.badge.checked-at.v1`,ye=15e3,be=4,q=0,J=null,Y=!1,X=`tw.update.stale.reload.v1`;function xe(e){let t=e.status?.phase;return t===`installing`||t===`restarting`}function Se(e){if(e.mode!==`dev`&&!xe(e)&&e.current&&e.current!==i){try{let e=Number(localStorage.getItem(X))||0;if(Date.now()-e<6e4)return;localStorage.setItem(X,String(Date.now()))}catch{}window.location.reload()}}function Ce(){try{return Number(localStorage.getItem(K))||0}catch{return 0}}function Z(){try{localStorage.setItem(K,String(Date.now()))}catch{}}function we(e,t,n){e.hidden=!n,e.closest(`.tw-nav-brand-ver`)?.classList.toggle(`has-update`,n),n&&e.setAttribute(`aria-label`,t?`有新版本可用 v${t}`:`有新版本可更新`)}function Te(e,t){q>=be||(q+=1,J!==null&&window.clearTimeout(J),J=window.setTimeout(()=>{J=null,Q(e,t)},ye))}async function Q(e,t){if(!Y){Y=!0;try{let n=await ee(t);if(!n){Te(e,t);return}q=0,Z();let r=!!n.current&&n.current!==i;we(e,n.latest,!!n.hasUpdate||r),n.hasUpdate||Se(n)}finally{Y=!1}}}function $(){let e=document.getElementById(_e);if(!e)return;e.dataset.bound!==`1`&&(e.dataset.bound=`1`,e.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation(),window.dispatchEvent(new CustomEvent(r,{detail:{tab:`general`}}))}));let t=Date.now()-Ce()>ve;q=0,Q(e,t)}function Ee(){document.addEventListener(`astro:page-load`,$),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&$()}),document.readyState!==`loading`&&$()}pe(),ge(),Ee();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/lib.S37S0T6S.js","_astro/react.Blvh0GOs.js","_astro/jszip.min.Bh2Mgo40.js","_astro/export.joBT53eb.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{s as e,t}from"./react.Blvh0GOs.js";import{B as n,H as r,U as i,V as a,W as o,i as s,p as c,r as l,t as u,u as d,z as f}from"./app-config.CF1xVPmo.js";import{a as p,i as m,o as h,s as g,t as _}from"./plugins.DYyAjBXb.js";import{a as v,n as y}from"./view-prefs.D1snIG5o.js";import{t as b}from"./react-dom.DLW9pGCF.js";import{i as x,n as S,r as C,t as w}from"./dialog.DZHZCe_T.js";import{i as T,n as E,r as D,t as O}from"./menu.Dnrpz489.js";import{t as k}from"./jsx-runtime.DUg_B_vD.js";import{t as A}from"./ConfirmDialog.CsMwWevK.js";import{t as ee}from"./DatePicker.Bkl71M49.js";import{t as te}from"./OverflowHint.pvo2Xc8R.js";import{t as j}from"./SelectDropdown.Cb-QtC-D.js";import{showToast as M}from"./Toast.BO2NFckG.js";import{a as ne,i as re,n as ie,o as ae,r as N,t as P}from"./case-types.DS1EQ5yP.js";import{n as oe,t as se}from"./SearchableSelect.mvcBwegf.js";import{a as ce,i as le,t as ue}from"./export.joBT53eb.js";import{a as F,c as de,i as fe,n as I,o as L,r as pe,s as me,t as he}from"./ExcelFieldTags.ytbpKt-Z.js";import{a as ge,i as _e,r as ve,s as ye,t as R}from"./llm.BZEzE0x2.js";import{_ as be,d as xe,f as Se,g as Ce,l as we,r as Te,s as Ee}from"./project-docs.Cd2gKPKh.js";import{n as De,t as Oe}from"./doc-roots.DAJP9Svr.js";import{a as ke,l as Ae,n as je,r as Me,t as Ne}from"./prompts-meta.C_MeYq8G.js";import{d as Pe,f as Fe,l as Ie,m as Le,o as Re,p as ze,r as Be,s as Ve,y as He}from"./settings.BvxRxdqa.js";import{C as Ue,D as We,E as z,O as Ge,S as Ke,T as qe,_ as Je,a as Ye,b as Xe,c as Ze,d as Qe,f as $e,g as et,h as tt,i as nt,l as rt,m as it,n as at,o as ot,p as st,r as ct,s as lt,u as ut,v as dt,w as ft,x as pt,y as mt}from"./open-docs-in-session.B6uyOxPn.js";import{t as ht}from"./SlideOverDrawer.HqVYaIjP.js";import{C as gt,f as _t,h as vt}from"./req-analysis.CkLx8c9E.js";import{a as yt,c as bt,i as xt,n as St,o as Ct,r as wt,s as Tt}from"./composer-task.DJmluzPT.js";import{n as Et}from"./i18n.B3BVhlok.js";import{n as Dt,t as Ot}from"./PromptMountDialog.YH2odDZx.js";import{_ as kt,a as At,b as jt,c as Mt,d as Nt,f as Pt,g as Ft,h as It,i as Lt,l as Rt,m as zt,n as Bt,o as Vt,p as Ht,r as Ut,s as Wt,t as Gt,u as Kt,v as qt,y as Jt}from"./fs-tools.3F9MFrLf.js";import{C as Yt,D as Xt,I as B,O as Zt,S as Qt,T as $t,a as en,b as tn,d as nn,g as rn,h as an,j as V,l as on,r as sn,s as cn,t as ln,w as un,x as dn,y as fn}from"./pm.CagBA-ht.js";import{A as pn,C as mn,D as hn,N as gn,O as _n,P as vn,S as yn,T as bn,_ as H,a as xn,b as Sn,c as Cn,d as wn,g as Tn,i as En,l as Dn,m as On,n as kn,o as An,r as jn,t as U,u as W,v as Mn,x as Nn,y as Pn}from"./tasks.BNBkrFC3.js";import{_ as Fn,a as In,c as Ln,d as Rn,f as zn,g as Bn,h as Vn,i as Hn,l as Un,m as Wn,n as Gn,o as Kn,p as qn,r as Jn,s as Yn,t as Xn,u as Zn,v as Qn,y as $n}from"./bash-tools.CPS0ZiKi.js";import{_ as er,a as G,b as tr,d as nr,f as rr,g as ir,h as ar,i as or,l as sr,m as cr,n as lr,o as ur,p as dr,r as fr,s as pr,t as mr,u as hr,v as gr,y as _r}from"./PluginsPage.
|
|
2
|
+
import{s as e,t}from"./react.Blvh0GOs.js";import{B as n,H as r,U as i,V as a,W as o,i as s,p as c,r as l,t as u,u as d,z as f}from"./app-config.CF1xVPmo.js";import{a as p,i as m,o as h,s as g,t as _}from"./plugins.DYyAjBXb.js";import{a as v,n as y}from"./view-prefs.D1snIG5o.js";import{t as b}from"./react-dom.DLW9pGCF.js";import{i as x,n as S,r as C,t as w}from"./dialog.DZHZCe_T.js";import{i as T,n as E,r as D,t as O}from"./menu.Dnrpz489.js";import{t as k}from"./jsx-runtime.DUg_B_vD.js";import{t as A}from"./ConfirmDialog.CsMwWevK.js";import{t as ee}from"./DatePicker.Bkl71M49.js";import{t as te}from"./OverflowHint.pvo2Xc8R.js";import{t as j}from"./SelectDropdown.Cb-QtC-D.js";import{showToast as M}from"./Toast.BO2NFckG.js";import{a as ne,i as re,n as ie,o as ae,r as N,t as P}from"./case-types.DS1EQ5yP.js";import{n as oe,t as se}from"./SearchableSelect.mvcBwegf.js";import{a as ce,i as le,t as ue}from"./export.joBT53eb.js";import{a as F,c as de,i as fe,n as I,o as L,r as pe,s as me,t as he}from"./ExcelFieldTags.ytbpKt-Z.js";import{a as ge,i as _e,r as ve,s as ye,t as R}from"./llm.BZEzE0x2.js";import{_ as be,d as xe,f as Se,g as Ce,l as we,r as Te,s as Ee}from"./project-docs.Cd2gKPKh.js";import{n as De,t as Oe}from"./doc-roots.DAJP9Svr.js";import{a as ke,l as Ae,n as je,r as Me,t as Ne}from"./prompts-meta.C_MeYq8G.js";import{d as Pe,f as Fe,l as Ie,m as Le,o as Re,p as ze,r as Be,s as Ve,y as He}from"./settings.BvxRxdqa.js";import{C as Ue,D as We,E as z,O as Ge,S as Ke,T as qe,_ as Je,a as Ye,b as Xe,c as Ze,d as Qe,f as $e,g as et,h as tt,i as nt,l as rt,m as it,n as at,o as ot,p as st,r as ct,s as lt,u as ut,v as dt,w as ft,x as pt,y as mt}from"./open-docs-in-session.B6uyOxPn.js";import{t as ht}from"./SlideOverDrawer.HqVYaIjP.js";import{C as gt,f as _t,h as vt}from"./req-analysis.CkLx8c9E.js";import{a as yt,c as bt,i as xt,n as St,o as Ct,r as wt,s as Tt}from"./composer-task.DJmluzPT.js";import{n as Et}from"./i18n.B3BVhlok.js";import{n as Dt,t as Ot}from"./PromptMountDialog.YH2odDZx.js";import{_ as kt,a as At,b as jt,c as Mt,d as Nt,f as Pt,g as Ft,h as It,i as Lt,l as Rt,m as zt,n as Bt,o as Vt,p as Ht,r as Ut,s as Wt,t as Gt,u as Kt,v as qt,y as Jt}from"./fs-tools.3F9MFrLf.js";import{C as Yt,D as Xt,I as B,O as Zt,S as Qt,T as $t,a as en,b as tn,d as nn,g as rn,h as an,j as V,l as on,r as sn,s as cn,t as ln,w as un,x as dn,y as fn}from"./pm.CagBA-ht.js";import{A as pn,C as mn,D as hn,N as gn,O as _n,P as vn,S as yn,T as bn,_ as H,a as xn,b as Sn,c as Cn,d as wn,g as Tn,i as En,l as Dn,m as On,n as kn,o as An,r as jn,t as U,u as W,v as Mn,x as Nn,y as Pn}from"./tasks.BNBkrFC3.js";import{_ as Fn,a as In,c as Ln,d as Rn,f as zn,g as Bn,h as Vn,i as Hn,l as Un,m as Wn,n as Gn,o as Kn,p as qn,r as Jn,s as Yn,t as Xn,u as Zn,v as Qn,y as $n}from"./bash-tools.CPS0ZiKi.js";import{_ as er,a as G,b as tr,d as nr,f as rr,g as ir,h as ar,i as or,l as sr,m as cr,n as lr,o as ur,p as dr,r as fr,s as pr,t as mr,u as hr,v as gr,y as _r}from"./PluginsPage.Bhyuqbq0.js";import{c as vr,n as yr,t as br}from"./report-prompt.CAfZ6RIo.js";import{i as xr}from"./ui-auto-prompt.QcLCZoV6.js";import{h as Sr}from"./ui-auto.BmC9JJ_X.js";import{c as Cr,v as wr}from"./story-review.C5gzEzBP.js";import{t as Tr}from"./NamePromptDialog.CS1pTTVl.js";var K=e(t(),1),Er=e(b(),1),q=`/__tb_sessions/runs`;async function Dr(e){try{return(await fetch(q,{signal:e??AbortSignal.timeout(1500)})).ok}catch{return!1}}async function Or(e){let t=await fetch(q,{signal:e??AbortSignal.timeout(3e3)});if(!t.ok)return[];let n=await t.json();return Array.isArray(n.runs)?n.runs:[]}async function kr(e){let t=await fetch(q,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));return t.ok?{ok:!0}:{ok:!1,error:n.error||`HTTP ${t.status}`}}async function Ar(e){await fetch(`${q}/${encodeURIComponent(e)}/stop`,{method:`POST`}).catch(()=>{})}async function jr(e){try{let t=await fetch(`${q}/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(3e3)});return t.status===404?{ok:!1}:t.ok?await t.json():null}catch{return null}}function Mr(e){return e===`completed`||e===`stopped`||e===`error`}function Nr(e,t,n,r){let i=new AbortController,a=`${q}/${encodeURIComponent(e)}/events?after=${Math.max(0,t)}`;return(async()=>{try{let e=await fetch(a,{headers:{Accept:`text/event-stream`},signal:i.signal});if(!e.ok||!e.body){r?.(Error(`SSE ${e.status}`));return}let t=e.body.getReader(),o=new TextDecoder,s=``;for(;;){let{done:e,value:a}=await t.read();if(e){i.signal.aborted||r?.(Error(`SSE disconnected`));break}s+=o.decode(a,{stream:!0});let c=s.split(`
|
|
3
3
|
`);s=c.pop()??``;for(let e of c){let t=e.trim();if(!t.startsWith(`data:`))continue;let r=t.slice(5).trim();if(r)try{n(JSON.parse(r))}catch{}}}}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;r?.(e instanceof Error?e:Error(String(e)))}})(),()=>i.abort()}function Pr(e,t,n){let r=!1,i=Math.max(0,t),a=0,o=null,s,c=n.maxAttempts??10,l=()=>{r=!0,s!=null&&clearTimeout(s),s=void 0,o?.(),o=null},u=()=>{r||n.signal?.aborted||(o?.(),o=Nr(e,i,e=>{typeof e.seq==`number`&&Number.isFinite(e.seq)&&(i=Math.max(i,e.seq)),n.onEvent(e),e.type===`status`&&Mr(e.status)&&(n.onTerminal?.(e),l())},t=>{r||n.signal?.aborted||(async()=>{a+=1;try{let r=await jr(e);if(r?.ok&&typeof r.seq==`number`&&(i=Math.max(i,r.seq)),r?.ok&&Mr(r.status)){let e={type:`status`,status:r.status,seq:r.seq,assistant:r.assistant};n.onEvent(e),n.onTerminal?.(e),l();return}if(r&&r.ok===!1){n.onGaveUp?.(Error(t.message||`run not found`)),l();return}}catch{}if(a>=c){n.onGaveUp?.(t),l();return}let r=Math.min(4e3,250*a);s=setTimeout(u,r)})()}))},d=()=>l();return n.signal?.addEventListener(`abort`,d),u(),()=>{n.signal?.removeEventListener(`abort`,d),l()}}function Fr(e){for(let t of e)if(t.role===`user`&&typeof t.content==`string`){let e=t.content.trim();if(e)return e}return``}function Ir(e,t){let n=(e||``).trim()||`新对话`;return n===`新对话`||n===Ue(t)}function Lr(e){let t=String(e??``).trim().replace(/^["「『]+|["」』]+$/g,``).replace(/\s+/g,` `).replace(/^标题[::]\s*/i,``);return t=t.replace(/[。.!!]+$/g,``).trim(),t?t.length>28?`${t.slice(0,28)}…`:t:``}async function Rr(e,t,n){let r=t.trim().slice(0,800);if(!r)return null;let i=[{role:`system`,content:`你为对话生成侧栏短标题。只输出标题本身:中文优先,不超过 16 个字,无引号、无标点收尾、无解释。`},{role:`user`,content:`用户首条消息:\n${r}\n\n请给出标题:`}];try{return Lr(await ve(e,i,n))||null}catch{return null}}function zr(e){let t=Array.isArray(e.messages)?e.messages:[],n=0,r=0,i=0,a=0,o=0;for(let e of t){if(!e||typeof e!=`object`)continue;let t=e;t.role===`user`?n+=1:t.role===`assistant`&&(r+=1);let s=t.usage;if(s&&typeof s==`object`){let e=s;typeof e.promptTokens==`number`&&(i+=e.promptTokens),typeof e.completionTokens==`number`&&(a+=e.completionTokens),typeof e.totalTokens==`number`?o+=e.totalTokens:(typeof e.promptTokens==`number`||typeof e.completionTokens==`number`)&&(o+=(Number(e.promptTokens)||0)+(Number(e.completionTokens)||0))}}let s=e.goal,c=!!(s&&s.status!==`cleared`&&s.text?.trim());return{sessionId:e.id,title:e.title||`新对话`,messageCount:t.length,userCount:n,assistantCount:r,promptTokens:i,completionTokens:a,totalTokens:o,createdAt:e.createdAt,updatedAt:e.updatedAt,hasGoal:c,todoCount:Array.isArray(e.todos)?e.todos.length:0}}function Br(e){let t=new Date(e.createdAt).toLocaleString(),n=new Date(e.updatedAt).toLocaleString();return[`会话:${e.title}`,`消息 ${e.messageCount}(用户 ${e.userCount} / 助手 ${e.assistantCount})`,`用量≈ 输入 ${e.promptTokens} · 输出 ${e.completionTokens} · 合计 ${e.totalTokens}`,`待办 ${e.todoCount} · 目标 ${e.hasGoal?`有`:`无`}`,`创建 ${t}`,`更新 ${n}`].join(`
|
|
4
4
|
`)}var Vr=new Map,Hr=new Map,Ur=40;function Wr(e,t,n=``){return`${e}:${t}:${n}`}function Gr(e){for(;e.size>Ur;){let t=e.keys().next().value;if(t===void 0)break;e.delete(t)}}function Kr(e,t,n,r,i=``){let a=e===`outline`?Vr:Hr,o=Wr(t,n,i),s=a.get(t);if(s&&s.stamp===o)return s.value;let c=r();return a.set(t,{stamp:o,value:c}),Gr(a),c}var qr=`/__tb_sessions/log`;function Jr(e){let t=String(e.userContent??``).trim(),n=String(e.assistantContent??``).trim(),r=String(e.reasoning??``).trim(),i=[];if(t&&i.push({role:`user`,content:t}),n||r){let e={role:`assistant`,content:n};r&&(e.reasoning_content=r),i.push(e)}return i}async function Yr(e){try{let t=await fetch(qr,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:AbortSignal.timeout(5e3)}),n=await t.json().catch(()=>({}));return t.ok?{ok:!0,path:n.path}:{ok:!1,error:n.error||`HTTP ${t.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function Xr(e){return String(e??``).trim()}function Zr(e,t=80){let n=Xr(e).replace(/\s+/g,` `);return n?n.length>t?`${n.slice(0,t)}…`:n:``}function Qr(e,t=40){let n=[],r=null;for(let i=0;i<e.length;i++){let a=e[i];if(a.role===`user`){let e=Xr(a.content),t=Zr(e);if(!t)continue;r&&n.push({index:n.length+1,userPreview:r.preview,assistantPreview:``,userText:r.text,assistantText:``,userTime:r.time,endMessageIndex:r.messageIndex}),r={text:e,preview:t,time:typeof a.time==`number`?a.time:void 0,messageIndex:i}}else if(a.role===`assistant`&&r){let e=Xr(a.content),t=Xr(a.reasoning)||void 0;n.push({index:n.length+1,userPreview:r.preview,assistantPreview:Zr(e)||(t?`(含思考)`:``),userText:r.text,assistantText:e,reasoning:t,reasoningDuration:typeof a.reasoningDuration==`number`?a.reasoningDuration:void 0,userTime:r.time,assistantTime:typeof a.time==`number`?a.time:void 0,endMessageIndex:i}),r=null}if(n.length>=t)break}return r&&n.length<t&&n.push({index:n.length+1,userPreview:r.preview,assistantPreview:``,userText:r.text,assistantText:``,userTime:r.time,endMessageIndex:r.messageIndex}),n}function $r(e,t){let n=String(t??``).trim();return!n||n===`inherit`||n===e.model?e:{...e,model:n}}var ei=`/__tb_fs`,ti=`你可以使用 office_to_pdf:优先用本机 LibreOffice 转为 PDF;若未安装,则对 docx/xlsx/pptx 降级抽取正文为同目录 .extracted.md(需写权限)。`,ni={type:`function`,function:{name:`office_to_pdf`,description:`Convert Office docs to PDF via LibreOffice when available; otherwise extract text to .extracted.md for docx/xlsx/pptx.`,parameters:{type:`object`,properties:{path:{type:`string`,description:`Input file path relative to workspace (or absolute when allowed)`},outDir:{type:`string`,description:`Optional output directory (default: same as input)`}},required:[`path`]}}};async function ri(e,t,n){if(e!==`office_to_pdf`)return JSON.stringify({error:`unknown tool: ${e}`});let r={};try{r=JSON.parse(t||`{}`)}catch{return JSON.stringify({ok:!1,error:`invalid JSON arguments`})}let i=String(r.path??``).trim();if(!i)return JSON.stringify({ok:!1,error:`path is required`});try{let e=await(await fetch(`${ei}/office-to-pdf`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:i,outDir:typeof r.outDir==`string`?r.outDir:void 0,access:n}),signal:AbortSignal.timeout(13e4)})).json().catch(()=>({}));return JSON.stringify(e,null,2)}catch(e){return JSON.stringify({ok:!1,error:e instanceof Error?e.message:String(e)})}}var ii=`/__tb_fs`,ai=`你可以使用 load_workspace_dependencies:查询本机 node / npm / pnpm / python 等可执行文件绝对路径(需本地 fs 服务)。`,oi={type:`function`,function:{name:`load_workspace_dependencies`,description:`Resolve absolute paths of common runtimes/package managers on this machine (node, npm, pnpm, python, …).`,parameters:{type:`object`,properties:{}}}};async function si(e){if(e!==`load_workspace_dependencies`)return JSON.stringify({error:`unknown tool: ${e}`});try{let e=await fetch(`${ii}/workspace-dependencies`,{signal:AbortSignal.timeout(8e3)}),t=await e.json().catch(()=>({}));if(!e.ok){let n=typeof t==`object`&&t&&`error`in t?String(t.error):`HTTP ${e.status}`;return JSON.stringify({ok:!1,error:n})}return JSON.stringify(t,null,2)}catch(e){return JSON.stringify({ok:!1,error:e instanceof Error?e.message:String(e)})}}function ci(e){return Array.isArray(e)}function li(e){return ci(e)?e.some(e=>e.type===`image_url`):!1}function ui(e){let t=e.filter(e=>e.type===`text`).map(e=>e.text),n=e.filter(e=>e.type===`image_url`).length,r=n>0?`[image-offload] 已卸载 ${n} 张图片(超预算,仅保留最近附图)。`:``;return[{type:`text`,text:[...t,r].filter(Boolean).join(`
|
|
5
5
|
`)||r||`(图片已卸载)`}]}function di(e,t={}){let n=Math.max(0,Math.floor(t.keepRecentImageMessages??1)),r=[];for(let t=0;t<e.length;t++){let n=e[t];n.role===`user`&&li(n.content)&&r.push(t)}if(r.length<=n)return e;let i=new Set(r.slice(-n)),a=!1,o=e.map((e,t)=>e.role!==`user`||!li(e.content)||i.has(t)||!ci(e.content)?e:(a=!0,{...e,content:ui(e.content)}));return a?o:e}function fi(e){return e.reqSource?e.reqSource:e.reqPath?{kind:`doc`,path:e.reqPath}:void 0}function pi(e){let t=[e.templateTitle||e.templateId?.split(`/`).pop()||`默认模板`,e.outputFormat.toUpperCase()],n=fi(e);return n?.kind===`stories`?t.push(`${e.docTitle||`用户故事`} · ${n.storyIds.length} 条故事`):n?.kind===`doc`&&t.push(n.path.split(`/`).pop()||n.path),e.testPointIds?.length&&t.push(`${e.testPointIds.length} 条测试点`),t.join(` · `)}function mi(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/)?.[1]??e.match(/\{[\s\S]*\}/)?.[0]??e.match(/\[[\s\S]*\]/)?.[0];if(!t)return null;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0)return{docTitle:``,cases:e,coverageRate:null,uncovered:[],writeNote:``};if(e&&typeof e==`object`){let t=e,n=t.用例??t.cases??t.items;if(!Array.isArray(n)||n.length===0)return null;let r=t.需求名称??t.文档名称??t.docTitle??t.title,i=typeof r==`string`?r.trim():``,a=t.覆盖需求率??t.coverageRate??t.coverage,o=null;if(typeof a==`number`&&Number.isFinite(a))o=Math.max(0,Math.min(100,Math.round(a)));else if(typeof a==`string`&&a.trim()){let e=parseInt(a.replace(/%/g,``),10);Number.isFinite(e)&&(o=Math.max(0,Math.min(100,e)))}let s=t.未覆盖说明??t.uncovered??t.omissions,c=Array.isArray(s)?s.map(e=>String(e).trim()).filter(Boolean):typeof s==`string`&&s.trim()?[s.trim()]:[],l=t.编写说明??t.note??t.summary,u=typeof l==`string`?l.trim():``;return{docTitle:i,cases:n,coverageRate:o,uncovered:c,writeNote:u}}}catch{return null}return null}function hi(e){return e.replace(/[\\/:*?"<>|]/g,`_`).replace(/\s+/g,`-`).slice(0,48)||`cases`}function gi(e,t){let n=[];for(let r of t){let t=e.filter(e=>!String(e[r]??``).trim()).length;t===e.length?n.push(`字段「${r}」全部为空`):t>Math.max(2,Math.floor(e.length*.3))&&n.push(`字段「${r}」有 ${t}/${e.length} 条为空`)}return n}function _i(e,t=``){let n=N(e.caseType).label,r=e.templateHeaders.length>0?e.templateHeaders:[...ue],i=e.outputFormat===`md`?`最终结果将保存为 Markdown 表格文件`:e.outputFormat===`csv`?`最终结果将保存为 CSV 文件`:`最终结果将保存为 Excel 文件`,a=e.promptBody.trim();if(!a)throw Error(`请先在生成测试用例插件中选择提示词`);return`${a}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e,t}from"./react.Blvh0GOs.js";import{i as n}from"./app-config.CF1xVPmo.js";import{a as r,l as i,o as a,r as o,t as s}from"./plugins.DYyAjBXb.js";import{o as c}from"./case-exec.BipZCK6G.js";import{t as l}from"./jsx-runtime.DUg_B_vD.js";import{t as u}from"./OverflowHint.pvo2Xc8R.js";import{showToast as d}from"./Toast.BO2NFckG.js";import"./settings.BvxRxdqa.js";import{E as f,T as ee}from"./case-review.DYyZat83.js";import{w as p}from"./req-analysis.CkLx8c9E.js";import{s as m}from"./fs-tools.3F9MFrLf.js";import{P as h,v as g}from"./pm.CagBA-ht.js";import{s as _,w as v}from"./tasks.BNBkrFC3.js";import{c as y}from"./report-prompt.CAfZ6RIo.js";import{a as te}from"./ui-auto-prompt.QcLCZoV6.js";import{_ as b,o as x}from"./story-review.
|
|
1
|
+
import{s as e,t}from"./react.Blvh0GOs.js";import{i as n}from"./app-config.CF1xVPmo.js";import{a as r,l as i,o as a,r as o,t as s}from"./plugins.DYyAjBXb.js";import{o as c}from"./case-exec.BipZCK6G.js";import{t as l}from"./jsx-runtime.DUg_B_vD.js";import{t as u}from"./OverflowHint.pvo2Xc8R.js";import{showToast as d}from"./Toast.BO2NFckG.js";import"./settings.BvxRxdqa.js";import{E as f,T as ee}from"./case-review.DYyZat83.js";import{w as p}from"./req-analysis.CkLx8c9E.js";import{s as m}from"./fs-tools.3F9MFrLf.js";import{P as h,v as g}from"./pm.CagBA-ht.js";import{s as _,w as v}from"./tasks.BNBkrFC3.js";import{c as y}from"./report-prompt.CAfZ6RIo.js";import{a as te}from"./ui-auto-prompt.QcLCZoV6.js";import{_ as b,o as x}from"./story-review.C5gzEzBP.js";import{r as S}from"./test-stats.MEm3K2rB.js";var C=e(t(),1),w=`/__tb_memory`,T=3e3,E=`你可以使用跨会话长期记忆(本机五轨:user / memory / key / project / daily):
|
|
2
2
|
- 系统可能已在 <memory_snapshot> 注入用户档案、全局事实与项目关键记忆;优先参考。
|
|
3
3
|
- 查历史进展:memory_search 或 memory_read(project / daily 不自动注入)。
|
|
4
4
|
- 用户明确要求记住偏好/全局事实/项目约定:调用 memory_suggest(进待确认,确认后才注入)。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as default}from"./PluginsPage.Bhyuqbq0.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,t}from"./react.Blvh0GOs.js";import{i as n,p as r}from"./app-config.CF1xVPmo.js";import{a as i,i as a,n as o,o as s,s as c}from"./plugins.DYyAjBXb.js";import{t as l}from"./jsx-runtime.DUg_B_vD.js";import{t as ee}from"./ConfirmDialog.CsMwWevK.js";import{showToast as u}from"./Toast.BO2NFckG.js";import{i as te}from"./case-types.DS1EQ5yP.js";import{_ as ne,f as re,l as ie,m as ae,n as d,r as oe,s as f,u as p}from"./project-docs.Cd2gKPKh.js";import{n as se}from"./doc-roots.DAJP9Svr.js";import{a as ce,c as m,d as le,i as h,l as g,o as _,s as v,u as y}from"./prompts-meta.C_MeYq8G.js";import{i as ue,n as de,r as fe,t as pe}from"./DocsFileBrowser.-dkkxR4X.js";import{t as me,u as he}from"./open-docs-in-session.B6uyOxPn.js";import{E as ge,T as _e,i as ve,r as ye}from"./case-review.DYyZat83.js";import{a as be,w as xe}from"./req-analysis.CkLx8c9E.js";import{r as Se}from"./report-prompt.CAfZ6RIo.js";import{g as Ce,s as we}from"./ui-auto.BmC9JJ_X.js";import{_ as Te,d as Ee,o as De,t as Oe}from"./story-review.Ct1XRMjk.js";import{t as b}from"./NamePromptDialog.CS1pTTVl.js";import{m as x}from"./PmShared.DbDseTcc.js";var S=e(t(),1),C=`tw.prompts.mounted.v1`;function ke(){try{let e=sessionStorage.getItem(r(C));if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`)return{};let n={};for(let[e,r]of Object.entries(t))typeof e==`string`&&typeof r==`string`&&(n[e]=r);return n}catch{return{}}}function Ae(e){try{sessionStorage.setItem(r(C),JSON.stringify(e))}catch{}}var w=l(),je=10;async function T(e=`.`){let{entries:t}=await f(`prompts`,e),n=[];for(let e of t)e.type===`file`?n.push(e):n.push(...await T(e.path));return n}function Me({path:e,enabled:t,mounted:n}){let r=y(e,n);if(!r)return(0,w.jsx)(`span`,{className:`text-[11px] text-stone-400`,children:`未关联`});if(r===`system`)return(0,w.jsx)(`span`,{className:`text-[11px] text-stone-600`,children:`系统默认`});let i=o(r)?.name??r,a=t[r]===!0,s=_(e,n);return(0,w.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[(0,w.jsx)(`span`,{className:`truncate text-[11px] text-stone-600`,children:i}),s&&a?(0,w.jsx)(`span`,{className:`shrink-0 rounded bg-(--tw-accent-soft) px-1 text-[10px] text-(--tw-accent)`,children:`引用中`}):null]})}function E(){let e=fe(`prompts`),[t,r]=(0,S.useState)(!1),[l,f]=(0,S.useState)(!0),[_,C]=(0,S.useState)(e?!0:null),[E,Ne]=(0,S.useState)(()=>e??[]),[D,O]=(0,S.useState)(null),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)({}),[N,P]=(0,S.useState)(null),[F,I]=(0,S.useState)(()=>i()),[L,Pe]=(0,S.useState)(()=>ke()),[R,z]=(0,S.useState)(null),[B,V]=(0,S.useState)(null),[H,U]=(0,S.useState)(``),W=de(E,je,`prompts`),G=(0,S.useRef)(!1),K=(0,S.useRef)(!1),q=(0,S.useRef)(!1),J=(0,S.useRef)(!1),Y=(0,S.useRef)(!1),X=(0,S.useCallback)(async()=>{O(null);try{let e=await T(`.`);Ne(e),ue(`prompts`,e)}catch(e){O(e instanceof Error?e.message:String(e))}},[]);(0,S.useEffect)(()=>{_&&F.reqAnalysis===!0&&!G.current&&(E.some(e=>e.name===`需求分析提示词.md`)||(G.current=!0,xe(!0).then(()=>X()).catch(()=>void 0)))},[_,F.reqAnalysis,E,X]),(0,S.useEffect)(()=>{_&&F.storyReview===!0&&!K.current&&(E.some(e=>e.name===`用户故事审查提示词.md`)||(K.current=!0,De(!0).then(()=>X()).catch(()=>void 0)))},[_,F.storyReview,E,X]),(0,S.useEffect)(()=>{_&&F.testPoints===!0&&!q.current&&(E.some(e=>e.name===`测试点生成提示词.md`)||(q.current=!0,Te(!0).then(()=>X()).catch(()=>void 0)))},[_,F.testPoints,E,X]),(0,S.useEffect)(()=>{_&&F.caseReview===!0&&!J.current&&(E.some(e=>e.name===`用例质量评审提示词.md`)||(J.current=!0,ge(!0).then(()=>X()).catch(()=>void 0)))},[_,F.caseReview,E,X]),(0,S.useEffect)(()=>{_&&F.caseBlindspot===!0&&!Y.current&&(E.some(e=>e.name===`场景遗漏补全提示词.md`)||(Y.current=!0,_e(!0).then(()=>X()).catch(()=>void 0)))},[_,F.caseBlindspot,E,X]),(0,S.useEffect)(()=>{let e=s(e=>{f(!!e.prompts),I(e)});return n().then(()=>{f(a(`prompts`)),I(i()),r(!0)}),e},[]),(0,S.useEffect)(()=>{t&&l&&(async()=>{await oe(`prompts`)?(await he().catch(()=>null),await X(),C(!0)):C(!1)})()},[t,l,X]);let Z=(0,S.useCallback)(async()=>{let e=await we(),t=a(`reports`),n=t?await Se().catch(()=>null):null;Pe(r=>{let i={};if(e)for(let t of e)i[m(t)]=`uiAuto`;else for(let[e,t]of Object.entries(r))t===`uiAuto`&&(i[e]=t);if(t){if(n?.promptFile)i[m(n.promptFile)]=`reports`;else for(let[e,t]of Object.entries(r))t===`reports`&&(i[e]=t)}if(F.reqAnalysis&&(i[m(be)]=`reqAnalysis`),F.storyReview&&(i[m(Oe)]=`storyReview`),F.testPoints&&(i[m(Ee)]=`testPoints`),F.caseReview&&(i[m(ve)]=`caseReview`),F.caseBlindspot&&(i[m(ye)]=`caseBlindspot`),F.caseGen)for(let e of te()){let t=(e.promptPath??``).trim();t&&(i[m(t)]=`caseGen`)}return Ae(i),i})},[F.reqAnalysis,F.storyReview,F.testPoints,F.caseReview,F.caseBlindspot,F.caseGen]);(0,S.useEffect)(()=>{if(!t||!l)return;Z();let e=()=>{document.visibilityState===`visible`&&Z()};document.addEventListener(`visibilitychange`,e);let n=Ce(()=>void Z());return()=>{document.removeEventListener(`visibilitychange`,e),n()}},[t,l,F.uiAuto,F.reports,F.reqAnalysis,F.storyReview,F.testPoints,F.caseReview,F.caseBlindspot,F.caseGen,Z]);let Q=(0,S.useMemo)(()=>Object.keys(j).filter(e=>j[e]),[j]),$=(0,S.useCallback)(e=>{let t=y(e,L);return!t||t===`system`||le(e)?``:F[t]===!0?t:``},[L,F]);async function Fe(e){A(!0),O(null);try{await ie(`prompts`,e.path)}catch(e){O(e instanceof Error?e.message:String(e))}finally{A(!1)}}async function Ie(e){A(!0),O(null);try{await me(`prompts`,e)}catch(e){O(e instanceof Error?e.message:String(e)),A(!1)}}function Le(e){if(v(e.path)){O(`默认提示词不可删除`);return}if(h(e.path,F)){O(g(e.path,F));return}let t=$(e.path);if(t){let e=o(t)?.name??t;O(`这份提示词正被「${e}」的项目挂载,先在那里换一份再删除`)}else P({kind:`one`,entry:e})}function Re(e){if(v(e.path)){O(`默认提示词不可改名`);return}if(h(e.path,F)){O(g(e.path,F));return}let t=$(e.path);if(t){let e=o(t)?.name??t;O(`这份提示词正被「${e}」的项目挂载,先在那里换一份再改名`)}else z(e),U(``)}function ze(e){V(e),U(``)}async function Be(){let e=N;if(e){P(null),A(!0),O(null);try{if(e.kind===`one`)await d(`prompts`,e.entry.path);else{let t=0;for(let n of e.paths)v(n)||h(n,F)||$(n)?t+=1:await d(`prompts`,n);t&&O(`有 ${t} 个提示词仍被插件或项目引用,已跳过;先解除引用再删。`),M({})}await X(),u(e.kind===`one`?`已删除「${e.entry.name}」`:`已删除 ${e.paths.length} 个提示词`,`success`)}catch(e){let t=e instanceof Error?e.message:String(e);O(t),u(`删除失败:${t}`,`error`)}finally{A(!1)}}}function Ve(){a(`promptGen`)?window.location.href=`/workbench/?plugin=promptGen`:O(c(`promptGen`))}let He=(0,S.useCallback)((e,t,n=``)=>{let r=(e===`.`?t:`${e}/${t}`).toLowerCase(),i=E.find(e=>e.path.toLowerCase()===r&&e.path.toLowerCase()!==n.toLowerCase());return i?i.name:``},[E]);async function Ue(e){let t=R;if(!t)return;let n=e.trim();if(!n||n===t.name){z(null),U(``);return}let r=He(p(t.path),n,t.path);if(r)U(`已存在同名文件「${r}」,换个名字再试`);else{A(!0),U(``);try{await ae(`prompts`,t.path,n),z(null),await X(),u(`已重命名为「${n}」`,`success`)}catch(e){let t=e instanceof Error?e.message:String(e);U(t),u(`重命名失败:${t}`,`error`)}finally{A(!1)}}}async function We(e){let t=B;if(!t)return;let n=e.trim();if(!n)return;let r=He(p(t.path),n);if(r)U(`已存在同名文件「${r}」,换个名字再试`);else{A(!0),U(``);try{let{content:e}=await re(`prompts`,t.path);await ne(`prompts`,p(t.path)===`.`?n:`${p(t.path)}/${n}`,e),V(null),await X(),u(`已复制为「${n}」`,`success`)}catch(e){let t=e instanceof Error?e.message:String(e);U(t),u(`复制失败:${t}`,`error`)}finally{A(!1)}}}let Ge=N?.kind===`one`?`删除「${N.entry.name}」?将从 ${se(`prompts`)} 中移除。`:N?.kind===`batch`?`确认删除已选中的 ${N.paths.length} 个提示词?此操作不可恢复。`:``;return t?l?_===null?(0,w.jsx)(`div`,{className:`rounded-xl border border-stone-200 bg-white overflow-hidden flex flex-col min-h-0`,"aria-busy":`true`,"aria-label":`正在连接本地文档服务`,children:(0,w.jsx)(`div`,{className:`flex-1 min-h-0 flex items-center justify-center`,children:(0,w.jsx)(`span`,{className:`tw-lib-spin`,"aria-hidden":`true`})})}):_?(0,w.jsxs)(`section`,{className:`rounded-xl border border-stone-200 bg-white overflow-hidden flex flex-col min-h-0`,children:[(0,w.jsxs)(`div`,{className:`shrink-0 px-4 py-3 border-b border-stone-100 flex items-center gap-2 flex-wrap`,children:[(0,w.jsxs)(`div`,{className:`text-sm text-stone-600 flex-1 min-w-0`,children:[W.query.trim()?(0,w.jsxs)(w.Fragment,{children:[`匹配 `,(0,w.jsx)(`span`,{className:`font-medium text-stone-800`,children:W.filtered.length}),` 个`,(0,w.jsxs)(`span`,{className:`text-stone-400`,children:[` · 共 `,E.length]})]}):(0,w.jsxs)(w.Fragment,{children:[`共 `,(0,w.jsx)(`span`,{className:`font-medium text-stone-800`,children:E.length}),` 个提示词`]}),Q.length>0?(0,w.jsxs)(`span`,{className:`text-stone-400`,children:[` · 已选 `,Q.length]}):null]}),(0,w.jsx)(`button`,{type:`button`,disabled:k||Q.length===0,onClick:()=>P({kind:`batch`,paths:Q}),className:`h-8 px-3 shrink-0 whitespace-nowrap text-sm font-medium text-red-600 border border-red-200 rounded-lg hover:bg-red-50 disabled:opacity-40`,children:`批量删除`}),(0,w.jsx)(`button`,{type:`button`,disabled:k,onClick:Ve,className:`h-8 px-3 shrink-0 whitespace-nowrap text-sm font-medium text-white bg-[#4176e6] rounded-lg hover:bg-[#3565c7] disabled:opacity-40`,children:`生成提示词`})]}),D?(0,w.jsx)(`div`,{className:`shrink-0 mx-4 mt-3 px-3 py-2 text-sm text-red-700 bg-red-50 border border-red-200 rounded-lg`,children:D}):null,(0,w.jsx)(pe,{resizeKey:`docs:prompts:cols:v1`,files:E,filtered:W.filtered,pageFiles:W.pageFiles,query:W.query,onQuery:W.setQuery,sortBy:W.sortBy,onSortBy:W.setSortBy,page:W.page,totalPages:W.totalPages,pageSize:W.pageSize,onPage:W.setPage,onPageSize:W.setPageSize,busy:k,emptyText:`暂无提示词,点击「生成提示词」前往我的工作台。`,searchPlaceholder:`搜索文件名或路径…`,selectable:e=>!ce(e.path,F)&&!$(e.path),selected:j,onToggleRow:e=>M(t=>({...t,[e]:!t[e]})),onSelectPage:(e,t)=>M(n=>{let r={...n};for(let n of e)t?r[n]=!0:delete r[n];return r}),onRowDoubleClick:e=>void Fe(e),extraColumn:{header:`关联插件`,render:e=>(0,w.jsx)(Me,{path:e.path,enabled:F,mounted:L})},renderNameAction:e=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,disabled:k,"aria-label":`重命名 ${e.name}`,onClick:()=>Re(e),className:`inline-flex h-6 w-6 items-center justify-center rounded text-stone-400 transition-colors hover:bg-[#e8f0fe] hover:text-[#4176e6] disabled:opacity-40`,children:(0,w.jsx)(x,{name:`pencil`,size:12})}),(0,w.jsx)(`button`,{type:`button`,disabled:k,"aria-label":`复制 ${e.name}`,onClick:()=>ze(e),className:`inline-flex h-6 w-6 items-center justify-center rounded text-stone-400 transition-colors hover:bg-[#e8f0fe] hover:text-[#4176e6] disabled:opacity-40`,children:(0,w.jsx)(x,{name:`copy`,size:12})})]}),renderActions:e=>{let t=ce(e.path,F)||!!$(e.path);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,disabled:k,onClick:()=>void Ie(e),className:`inline-flex h-6 items-center whitespace-nowrap rounded bg-[#4176e6] px-2 text-xs text-white hover:bg-[#3565c7] cursor-pointer disabled:opacity-40`,children:`在会话中打开`}),(0,w.jsx)(`button`,{type:`button`,disabled:k||t,"aria-label":`删除 ${e.name}`,onClick:()=>Le(e),className:`tw-icon-danger inline-flex h-6 w-6 items-center justify-center rounded`,children:(0,w.jsx)(x,{name:`trash`,size:12})})]})}}),(0,w.jsx)(b,{open:R!=null,title:`重命名提示词`,label:`文件名称`,initialValue:R?.name??``,lockExtension:!0,confirmLabel:`保存`,error:H,onClose:()=>{z(null),U(``)},onConfirm:e=>void Ue(e)}),(0,w.jsx)(b,{open:B!=null,title:`复制提示词`,label:`新文件名称`,initialValue:B?B.name.replace(/(\.[^.]+)?$/,e=>`(副本)${e}`):``,lockExtension:!0,confirmLabel:`复制`,error:H,onClose:()=>{V(null),U(``)},onConfirm:e=>void We(e)}),(0,w.jsx)(ee,{open:N!=null,title:N?.kind===`batch`?`批量删除`:`删除提示词`,message:Ge,confirmLabel:`删除`,cancelLabel:`取消`,danger:!0,onClose:()=>P(null),onConfirm:()=>void Be()})]}):(0,w.jsx)(`div`,{className:`tw-lib-notice rounded-xl border border-amber-200 bg-amber-50 px-5 py-8 text-sm text-amber-900`,children:`提示词管理需要本地文档服务,当前未就绪。`}):(0,w.jsx)(`div`,{className:`tw-lib-notice rounded-xl border border-amber-200 bg-amber-50 px-5 py-8 text-sm text-amber-900`,children:c(`prompts`)}):(0,w.jsx)(`div`,{className:`rounded-xl border border-stone-200 bg-white overflow-hidden flex flex-col min-h-0`,"aria-busy":`true`,"aria-label":`正在读取插件开关`,children:(0,w.jsx)(`div`,{className:`flex-1 min-h-0 flex items-center justify-center`,children:(0,w.jsx)(`span`,{className:`tw-lib-spin`,"aria-hidden":`true`})})})}export{E as default};
|
|
1
|
+
import{s as e,t}from"./react.Blvh0GOs.js";import{i as n,p as r}from"./app-config.CF1xVPmo.js";import{a as i,i as a,n as o,o as s,s as c}from"./plugins.DYyAjBXb.js";import{t as l}from"./jsx-runtime.DUg_B_vD.js";import{t as ee}from"./ConfirmDialog.CsMwWevK.js";import{showToast as u}from"./Toast.BO2NFckG.js";import{i as te}from"./case-types.DS1EQ5yP.js";import{_ as ne,f as re,l as ie,m as ae,n as d,r as oe,s as f,u as p}from"./project-docs.Cd2gKPKh.js";import{n as se}from"./doc-roots.DAJP9Svr.js";import{a as ce,c as m,d as le,i as h,l as g,o as _,s as v,u as y}from"./prompts-meta.C_MeYq8G.js";import{i as ue,n as de,r as fe,t as pe}from"./DocsFileBrowser.-dkkxR4X.js";import{t as me,u as he}from"./open-docs-in-session.B6uyOxPn.js";import{E as ge,T as _e,i as ve,r as ye}from"./case-review.DYyZat83.js";import{a as be,w as xe}from"./req-analysis.CkLx8c9E.js";import{r as Se}from"./report-prompt.CAfZ6RIo.js";import{g as Ce,s as we}from"./ui-auto.BmC9JJ_X.js";import{_ as Te,d as Ee,o as De,t as Oe}from"./story-review.C5gzEzBP.js";import{t as b}from"./NamePromptDialog.CS1pTTVl.js";import{m as x}from"./PmShared.DbDseTcc.js";var S=e(t(),1),C=`tw.prompts.mounted.v1`;function ke(){try{let e=sessionStorage.getItem(r(C));if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`)return{};let n={};for(let[e,r]of Object.entries(t))typeof e==`string`&&typeof r==`string`&&(n[e]=r);return n}catch{return{}}}function Ae(e){try{sessionStorage.setItem(r(C),JSON.stringify(e))}catch{}}var w=l(),je=10;async function T(e=`.`){let{entries:t}=await f(`prompts`,e),n=[];for(let e of t)e.type===`file`?n.push(e):n.push(...await T(e.path));return n}function Me({path:e,enabled:t,mounted:n}){let r=y(e,n);if(!r)return(0,w.jsx)(`span`,{className:`text-[11px] text-stone-400`,children:`未关联`});if(r===`system`)return(0,w.jsx)(`span`,{className:`text-[11px] text-stone-600`,children:`系统默认`});let i=o(r)?.name??r,a=t[r]===!0,s=_(e,n);return(0,w.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[(0,w.jsx)(`span`,{className:`truncate text-[11px] text-stone-600`,children:i}),s&&a?(0,w.jsx)(`span`,{className:`shrink-0 rounded bg-(--tw-accent-soft) px-1 text-[10px] text-(--tw-accent)`,children:`引用中`}):null]})}function E(){let e=fe(`prompts`),[t,r]=(0,S.useState)(!1),[l,f]=(0,S.useState)(!0),[_,C]=(0,S.useState)(e?!0:null),[E,Ne]=(0,S.useState)(()=>e??[]),[D,O]=(0,S.useState)(null),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)({}),[N,P]=(0,S.useState)(null),[F,I]=(0,S.useState)(()=>i()),[L,Pe]=(0,S.useState)(()=>ke()),[R,z]=(0,S.useState)(null),[B,V]=(0,S.useState)(null),[H,U]=(0,S.useState)(``),W=de(E,je,`prompts`),G=(0,S.useRef)(!1),K=(0,S.useRef)(!1),q=(0,S.useRef)(!1),J=(0,S.useRef)(!1),Y=(0,S.useRef)(!1),X=(0,S.useCallback)(async()=>{O(null);try{let e=await T(`.`);Ne(e),ue(`prompts`,e)}catch(e){O(e instanceof Error?e.message:String(e))}},[]);(0,S.useEffect)(()=>{_&&F.reqAnalysis===!0&&!G.current&&(E.some(e=>e.name===`需求分析提示词.md`)||(G.current=!0,xe(!0).then(()=>X()).catch(()=>void 0)))},[_,F.reqAnalysis,E,X]),(0,S.useEffect)(()=>{_&&F.storyReview===!0&&!K.current&&(E.some(e=>e.name===`用户故事审查提示词.md`)||(K.current=!0,De(!0).then(()=>X()).catch(()=>void 0)))},[_,F.storyReview,E,X]),(0,S.useEffect)(()=>{_&&F.testPoints===!0&&!q.current&&(E.some(e=>e.name===`测试点生成提示词.md`)||(q.current=!0,Te(!0).then(()=>X()).catch(()=>void 0)))},[_,F.testPoints,E,X]),(0,S.useEffect)(()=>{_&&F.caseReview===!0&&!J.current&&(E.some(e=>e.name===`用例质量评审提示词.md`)||(J.current=!0,ge(!0).then(()=>X()).catch(()=>void 0)))},[_,F.caseReview,E,X]),(0,S.useEffect)(()=>{_&&F.caseBlindspot===!0&&!Y.current&&(E.some(e=>e.name===`场景遗漏补全提示词.md`)||(Y.current=!0,_e(!0).then(()=>X()).catch(()=>void 0)))},[_,F.caseBlindspot,E,X]),(0,S.useEffect)(()=>{let e=s(e=>{f(!!e.prompts),I(e)});return n().then(()=>{f(a(`prompts`)),I(i()),r(!0)}),e},[]),(0,S.useEffect)(()=>{t&&l&&(async()=>{await oe(`prompts`)?(await he().catch(()=>null),await X(),C(!0)):C(!1)})()},[t,l,X]);let Z=(0,S.useCallback)(async()=>{let e=await we(),t=a(`reports`),n=t?await Se().catch(()=>null):null;Pe(r=>{let i={};if(e)for(let t of e)i[m(t)]=`uiAuto`;else for(let[e,t]of Object.entries(r))t===`uiAuto`&&(i[e]=t);if(t){if(n?.promptFile)i[m(n.promptFile)]=`reports`;else for(let[e,t]of Object.entries(r))t===`reports`&&(i[e]=t)}if(F.reqAnalysis&&(i[m(be)]=`reqAnalysis`),F.storyReview&&(i[m(Oe)]=`storyReview`),F.testPoints&&(i[m(Ee)]=`testPoints`),F.caseReview&&(i[m(ve)]=`caseReview`),F.caseBlindspot&&(i[m(ye)]=`caseBlindspot`),F.caseGen)for(let e of te()){let t=(e.promptPath??``).trim();t&&(i[m(t)]=`caseGen`)}return Ae(i),i})},[F.reqAnalysis,F.storyReview,F.testPoints,F.caseReview,F.caseBlindspot,F.caseGen]);(0,S.useEffect)(()=>{if(!t||!l)return;Z();let e=()=>{document.visibilityState===`visible`&&Z()};document.addEventListener(`visibilitychange`,e);let n=Ce(()=>void Z());return()=>{document.removeEventListener(`visibilitychange`,e),n()}},[t,l,F.uiAuto,F.reports,F.reqAnalysis,F.storyReview,F.testPoints,F.caseReview,F.caseBlindspot,F.caseGen,Z]);let Q=(0,S.useMemo)(()=>Object.keys(j).filter(e=>j[e]),[j]),$=(0,S.useCallback)(e=>{let t=y(e,L);return!t||t===`system`||le(e)?``:F[t]===!0?t:``},[L,F]);async function Fe(e){A(!0),O(null);try{await ie(`prompts`,e.path)}catch(e){O(e instanceof Error?e.message:String(e))}finally{A(!1)}}async function Ie(e){A(!0),O(null);try{await me(`prompts`,e)}catch(e){O(e instanceof Error?e.message:String(e)),A(!1)}}function Le(e){if(v(e.path)){O(`默认提示词不可删除`);return}if(h(e.path,F)){O(g(e.path,F));return}let t=$(e.path);if(t){let e=o(t)?.name??t;O(`这份提示词正被「${e}」的项目挂载,先在那里换一份再删除`)}else P({kind:`one`,entry:e})}function Re(e){if(v(e.path)){O(`默认提示词不可改名`);return}if(h(e.path,F)){O(g(e.path,F));return}let t=$(e.path);if(t){let e=o(t)?.name??t;O(`这份提示词正被「${e}」的项目挂载,先在那里换一份再改名`)}else z(e),U(``)}function ze(e){V(e),U(``)}async function Be(){let e=N;if(e){P(null),A(!0),O(null);try{if(e.kind===`one`)await d(`prompts`,e.entry.path);else{let t=0;for(let n of e.paths)v(n)||h(n,F)||$(n)?t+=1:await d(`prompts`,n);t&&O(`有 ${t} 个提示词仍被插件或项目引用,已跳过;先解除引用再删。`),M({})}await X(),u(e.kind===`one`?`已删除「${e.entry.name}」`:`已删除 ${e.paths.length} 个提示词`,`success`)}catch(e){let t=e instanceof Error?e.message:String(e);O(t),u(`删除失败:${t}`,`error`)}finally{A(!1)}}}function Ve(){a(`promptGen`)?window.location.href=`/workbench/?plugin=promptGen`:O(c(`promptGen`))}let He=(0,S.useCallback)((e,t,n=``)=>{let r=(e===`.`?t:`${e}/${t}`).toLowerCase(),i=E.find(e=>e.path.toLowerCase()===r&&e.path.toLowerCase()!==n.toLowerCase());return i?i.name:``},[E]);async function Ue(e){let t=R;if(!t)return;let n=e.trim();if(!n||n===t.name){z(null),U(``);return}let r=He(p(t.path),n,t.path);if(r)U(`已存在同名文件「${r}」,换个名字再试`);else{A(!0),U(``);try{await ae(`prompts`,t.path,n),z(null),await X(),u(`已重命名为「${n}」`,`success`)}catch(e){let t=e instanceof Error?e.message:String(e);U(t),u(`重命名失败:${t}`,`error`)}finally{A(!1)}}}async function We(e){let t=B;if(!t)return;let n=e.trim();if(!n)return;let r=He(p(t.path),n);if(r)U(`已存在同名文件「${r}」,换个名字再试`);else{A(!0),U(``);try{let{content:e}=await re(`prompts`,t.path);await ne(`prompts`,p(t.path)===`.`?n:`${p(t.path)}/${n}`,e),V(null),await X(),u(`已复制为「${n}」`,`success`)}catch(e){let t=e instanceof Error?e.message:String(e);U(t),u(`复制失败:${t}`,`error`)}finally{A(!1)}}}let Ge=N?.kind===`one`?`删除「${N.entry.name}」?将从 ${se(`prompts`)} 中移除。`:N?.kind===`batch`?`确认删除已选中的 ${N.paths.length} 个提示词?此操作不可恢复。`:``;return t?l?_===null?(0,w.jsx)(`div`,{className:`rounded-xl border border-stone-200 bg-white overflow-hidden flex flex-col min-h-0`,"aria-busy":`true`,"aria-label":`正在连接本地文档服务`,children:(0,w.jsx)(`div`,{className:`flex-1 min-h-0 flex items-center justify-center`,children:(0,w.jsx)(`span`,{className:`tw-lib-spin`,"aria-hidden":`true`})})}):_?(0,w.jsxs)(`section`,{className:`rounded-xl border border-stone-200 bg-white overflow-hidden flex flex-col min-h-0`,children:[(0,w.jsxs)(`div`,{className:`shrink-0 px-4 py-3 border-b border-stone-100 flex items-center gap-2 flex-wrap`,children:[(0,w.jsxs)(`div`,{className:`text-sm text-stone-600 flex-1 min-w-0`,children:[W.query.trim()?(0,w.jsxs)(w.Fragment,{children:[`匹配 `,(0,w.jsx)(`span`,{className:`font-medium text-stone-800`,children:W.filtered.length}),` 个`,(0,w.jsxs)(`span`,{className:`text-stone-400`,children:[` · 共 `,E.length]})]}):(0,w.jsxs)(w.Fragment,{children:[`共 `,(0,w.jsx)(`span`,{className:`font-medium text-stone-800`,children:E.length}),` 个提示词`]}),Q.length>0?(0,w.jsxs)(`span`,{className:`text-stone-400`,children:[` · 已选 `,Q.length]}):null]}),(0,w.jsx)(`button`,{type:`button`,disabled:k||Q.length===0,onClick:()=>P({kind:`batch`,paths:Q}),className:`h-8 px-3 shrink-0 whitespace-nowrap text-sm font-medium text-red-600 border border-red-200 rounded-lg hover:bg-red-50 disabled:opacity-40`,children:`批量删除`}),(0,w.jsx)(`button`,{type:`button`,disabled:k,onClick:Ve,className:`h-8 px-3 shrink-0 whitespace-nowrap text-sm font-medium text-white bg-[#4176e6] rounded-lg hover:bg-[#3565c7] disabled:opacity-40`,children:`生成提示词`})]}),D?(0,w.jsx)(`div`,{className:`shrink-0 mx-4 mt-3 px-3 py-2 text-sm text-red-700 bg-red-50 border border-red-200 rounded-lg`,children:D}):null,(0,w.jsx)(pe,{resizeKey:`docs:prompts:cols:v1`,files:E,filtered:W.filtered,pageFiles:W.pageFiles,query:W.query,onQuery:W.setQuery,sortBy:W.sortBy,onSortBy:W.setSortBy,page:W.page,totalPages:W.totalPages,pageSize:W.pageSize,onPage:W.setPage,onPageSize:W.setPageSize,busy:k,emptyText:`暂无提示词,点击「生成提示词」前往我的工作台。`,searchPlaceholder:`搜索文件名或路径…`,selectable:e=>!ce(e.path,F)&&!$(e.path),selected:j,onToggleRow:e=>M(t=>({...t,[e]:!t[e]})),onSelectPage:(e,t)=>M(n=>{let r={...n};for(let n of e)t?r[n]=!0:delete r[n];return r}),onRowDoubleClick:e=>void Fe(e),extraColumn:{header:`关联插件`,render:e=>(0,w.jsx)(Me,{path:e.path,enabled:F,mounted:L})},renderNameAction:e=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,disabled:k,"aria-label":`重命名 ${e.name}`,onClick:()=>Re(e),className:`inline-flex h-6 w-6 items-center justify-center rounded text-stone-400 transition-colors hover:bg-[#e8f0fe] hover:text-[#4176e6] disabled:opacity-40`,children:(0,w.jsx)(x,{name:`pencil`,size:12})}),(0,w.jsx)(`button`,{type:`button`,disabled:k,"aria-label":`复制 ${e.name}`,onClick:()=>ze(e),className:`inline-flex h-6 w-6 items-center justify-center rounded text-stone-400 transition-colors hover:bg-[#e8f0fe] hover:text-[#4176e6] disabled:opacity-40`,children:(0,w.jsx)(x,{name:`copy`,size:12})})]}),renderActions:e=>{let t=ce(e.path,F)||!!$(e.path);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,disabled:k,onClick:()=>void Ie(e),className:`inline-flex h-6 items-center whitespace-nowrap rounded bg-[#4176e6] px-2 text-xs text-white hover:bg-[#3565c7] cursor-pointer disabled:opacity-40`,children:`在会话中打开`}),(0,w.jsx)(`button`,{type:`button`,disabled:k||t,"aria-label":`删除 ${e.name}`,onClick:()=>Le(e),className:`tw-icon-danger inline-flex h-6 w-6 items-center justify-center rounded`,children:(0,w.jsx)(x,{name:`trash`,size:12})})]})}}),(0,w.jsx)(b,{open:R!=null,title:`重命名提示词`,label:`文件名称`,initialValue:R?.name??``,lockExtension:!0,confirmLabel:`保存`,error:H,onClose:()=>{z(null),U(``)},onConfirm:e=>void Ue(e)}),(0,w.jsx)(b,{open:B!=null,title:`复制提示词`,label:`新文件名称`,initialValue:B?B.name.replace(/(\.[^.]+)?$/,e=>`(副本)${e}`):``,lockExtension:!0,confirmLabel:`复制`,error:H,onClose:()=>{V(null),U(``)},onConfirm:e=>void We(e)}),(0,w.jsx)(ee,{open:N!=null,title:N?.kind===`batch`?`批量删除`:`删除提示词`,message:Ge,confirmLabel:`删除`,cancelLabel:`取消`,danger:!0,onClose:()=>P(null),onConfirm:()=>void Be()})]}):(0,w.jsx)(`div`,{className:`tw-lib-notice rounded-xl border border-amber-200 bg-amber-50 px-5 py-8 text-sm text-amber-900`,children:`提示词管理需要本地文档服务,当前未就绪。`}):(0,w.jsx)(`div`,{className:`tw-lib-notice rounded-xl border border-amber-200 bg-amber-50 px-5 py-8 text-sm text-amber-900`,children:c(`prompts`)}):(0,w.jsx)(`div`,{className:`rounded-xl border border-stone-200 bg-white overflow-hidden flex flex-col min-h-0`,"aria-busy":`true`,"aria-label":`正在读取插件开关`,children:(0,w.jsx)(`div`,{className:`flex-1 min-h-0 flex items-center justify-center`,children:(0,w.jsx)(`span`,{className:`tw-lib-spin`,"aria-hidden":`true`})})})}export{E as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e,t}from"./react.Blvh0GOs.js";import{i as n}from"./app-config.CF1xVPmo.js";import{s as r}from"./plugins.DYyAjBXb.js";import{a as i,i as a,n as o,o as s,r as c,t as l}from"./view-prefs.D1snIG5o.js";import{t as u}from"./jsx-runtime.DUg_B_vD.js";import{t as d}from"./ConfirmDialog.CsMwWevK.js";import{t as f}from"./OverflowHint.pvo2Xc8R.js";import{t as ee}from"./SelectDropdown.Cb-QtC-D.js";import{showToast as p}from"./Toast.BO2NFckG.js";import{s as te}from"./llm.BZEzE0x2.js";import{f as ne,l as re,p as ie}from"./settings.BvxRxdqa.js";import{E as m,S as ae,T as oe,_ as se,a as ce,b as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,l as ge,m as h,n as g,o as _,p as _e,r as ve,s as ye,t as v,u as be,v as xe,w as Se,x as Ce,y as we}from"./req-analysis.CkLx8c9E.js";import{_ as Te,a as Ee,c as De,d as Oe,f as ke,g as Ae,h as je,i as Me,l as y,m as Ne,n as Pe,o as Fe,p as Ie,r as Le,s as Re,u as b}from"./story-review.
|
|
1
|
+
import{s as e,t}from"./react.Blvh0GOs.js";import{i as n}from"./app-config.CF1xVPmo.js";import{s as r}from"./plugins.DYyAjBXb.js";import{a as i,i as a,n as o,o as s,r as c,t as l}from"./view-prefs.D1snIG5o.js";import{t as u}from"./jsx-runtime.DUg_B_vD.js";import{t as d}from"./ConfirmDialog.CsMwWevK.js";import{t as f}from"./OverflowHint.pvo2Xc8R.js";import{t as ee}from"./SelectDropdown.Cb-QtC-D.js";import{showToast as p}from"./Toast.BO2NFckG.js";import{s as te}from"./llm.BZEzE0x2.js";import{f as ne,l as re,p as ie}from"./settings.BvxRxdqa.js";import{E as m,S as ae,T as oe,_ as se,a as ce,b as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,l as ge,m as h,n as g,o as _,p as _e,r as ve,s as ye,t as v,u as be,v as xe,w as Se,x as Ce,y as we}from"./req-analysis.CkLx8c9E.js";import{_ as Te,a as Ee,c as De,d as Oe,f as ke,g as Ae,h as je,i as Me,l as y,m as Ne,n as Pe,o as Fe,p as Ie,r as Le,s as Re,u as b}from"./story-review.C5gzEzBP.js";import{t as ze}from"./hydrate-cache.CmC22o_H.js";import{O as Be,S as x,_ as Ve,g as He,m as S,u as Ue}from"./PmShared.DbDseTcc.js";var C=e(t(),1),We=`可用工具(只调用这些,不要自己编工具名):
|
|
2
2
|
- req_set_outline:提交本批「需求条目」,返回每个条目的 id。
|
|
3
3
|
- req_set_stories:提交「用户故事」;补写时提交合并后的完整故事集(带原 id 原地更新)。
|
|
4
4
|
- req_save_check:提交体检结果(缺口清单 + 结论)。
|