lantern-harness 0.1.9 → 0.1.11
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 +90 -0
- package/README.md +6 -6
- package/builtin/session/lh-fs.mjs +32 -14
- package/dist/500.html +258 -22
- package/dist/_astro/Base.Bgxs1QQl.css +1 -0
- package/dist/_astro/Base.astro_astro_type_script_index_0_lang.CvbRi7Tl.js +1 -0
- package/dist/_astro/CaseExecBoard.Dttqp0wg.js +1 -0
- package/dist/_astro/CaseGenerateApp.DqW_nWMc.js +9 -0
- package/dist/_astro/CasesLibrary.8aMUUGp_.js +1 -0
- package/dist/_astro/ChatApp.BLxf0h1d.js +219 -0
- package/dist/_astro/ColumnResize.BEkEW7qw.js +1 -0
- package/dist/_astro/{ConfirmDialog.CBVsDJ8f.js → ConfirmDialog.BZzZWDci.js} +1 -1
- package/dist/_astro/{DashboardBoard.DCtfrrJz.js → DashboardBoard.CkSbhEDI.js} +3 -3
- package/dist/_astro/DatePicker.Bkl71M49.js +1 -0
- package/dist/_astro/DocsFileBrowser.MKVCfZrE.js +1 -0
- package/dist/_astro/DocsPager.DJY4foYL.js +1 -0
- package/dist/_astro/{DrawerField.CWMLhcPX.js → DrawerField.CHRg77LG.js} +1 -1
- package/dist/_astro/{ExcelFieldTags.B_XMwNNx.js → ExcelFieldTags.DXMeaDa5.js} +4 -4
- package/dist/_astro/KnowledgeLibrary.B-p1aoQN.js +1 -0
- package/dist/_astro/NamePromptDialog.Wa9O530a.js +1 -0
- package/dist/_astro/NavLibraries.C6LImMO_.js +1 -0
- package/dist/_astro/OverflowHint.D6v4Uj2N.js +1 -0
- package/dist/_astro/PluginsPage.-97n3x2U.js +39 -0
- package/dist/_astro/PluginsPage.DkmRPfbU.js +1 -0
- package/dist/_astro/PmBugsBoard.CMT4-eoB.js +1 -0
- package/dist/_astro/PmIterationsBoard.BQM_dzdZ.js +1 -0
- package/dist/_astro/PmProjectDetail.CzU80pat.js +1 -0
- package/dist/_astro/PmProjectsBoard.Cxsa7SYQ.js +1 -0
- package/dist/_astro/PmRequirementsBoard.4_JMDDN0.js +1 -0
- package/dist/_astro/PmRequirementsBoard.B8HL07cw.js +1 -0
- package/dist/_astro/PmShared.Ca2Ao7v_.js +1 -0
- package/dist/_astro/PromptsLibrary.C9BcIxKK.js +1 -0
- package/dist/_astro/ReportsPage.Fh5DRKLT.js +1 -0
- package/dist/_astro/RequirementsLibrary.CBkuWE8X.js +1 -0
- package/dist/_astro/SearchableSelect.DnjoSslK.js +1 -0
- package/dist/_astro/SelectDropdown.CuuDHa8s.js +1 -0
- package/dist/_astro/SettingsDialog.CVB5Gtk4.js +1 -0
- package/dist/_astro/SlideOverDrawer.B7B5Wu8I.js +1 -0
- package/dist/_astro/{SpaceSwitcher.CI3KDBOA.js → SpaceSwitcher.BVQLt_tL.js} +2 -2
- package/dist/_astro/TagSelect.CuN5RdF4.js +1 -0
- package/dist/_astro/TasksBoard.Bu-fpIZ7.js +1 -0
- package/dist/_astro/TemplatesLibrary.DSylQGlN.js +1 -0
- package/dist/_astro/TestStatsBoard.CPyKW4wc.js +1 -0
- package/dist/_astro/Toast.R8_2OWRX.js +1 -0
- package/dist/_astro/TodosBoard.8kvRTEW-.js +1 -0
- package/dist/_astro/UiAutoBoard.DFTiDqCp.js +9 -0
- package/dist/_astro/active-element-history.CED-m1Zp.js +1 -0
- package/dist/_astro/app-config.BUPzGl9f.js +1 -0
- package/dist/_astro/{client.Be_SakrB.js → client.BHNTqLjv.js} +3 -3
- package/dist/_astro/dialog.BAPTk9a_.js +1 -0
- package/dist/_astro/hydrate-cache.BXX604Bw.js +1 -0
- package/dist/_astro/{i18n.B52gLzii.js → i18n.BGPnP1Bg.js} +1 -1
- package/dist/_astro/index.astro_astro_type_script_index_0_lang.LPL9mPQY.js +1 -0
- package/dist/_astro/jsx-runtime.DUg_B_vD.js +1 -0
- package/dist/_astro/{lib.DJNDi_Ht.js → lib.CgXLzMMd.js} +15 -15
- package/dist/_astro/listbox.C96OCanh.js +1 -0
- package/dist/_astro/markdown-client.DRva7DS9.js +58 -0
- package/dist/_astro/menu.IPWdRoNM.js +1 -0
- package/dist/_astro/{open-docs-in-session.Xg3OSOfc.js → open-docs-in-session.CyFNgh1I.js} +1 -1
- package/dist/_astro/{plugins.BDZqJNOy.js → plugins.C2BMfzv1.js} +1 -1
- package/dist/_astro/{pm.Bl3hz9fF.js → pm.CagBA-ht.js} +2 -2
- package/dist/_astro/{portal.Cm9XlIPf.js → portal.C0hAhXDF.js} +2 -2
- package/dist/_astro/prompts-meta.Bua-j14I.js +2 -0
- package/dist/_astro/react-dom.DLW9pGCF.js +1 -0
- package/dist/_astro/{react-dom.CqAxpHMt.js → react.Blvh0GOs.js} +1 -1
- package/dist/_astro/report-prompt.CAfZ6RIo.js +1 -0
- package/dist/_astro/{settings.C6NWuiFO.js → settings.Ceefeil5.js} +2 -2
- package/dist/_astro/{spaces-client.k_ciWMai.js → spaces-client.BocUabwy.js} +1 -1
- package/dist/_astro/ui-auto-prompt.CX8fju7r.js +3 -0
- package/dist/_astro/ui-auto.BmC9JJ_X.js +1 -0
- package/dist/_astro/update.CtF8vsag.js +1 -0
- package/dist/_astro/use-text-value.DBQvHeNl.js +1 -0
- package/dist/_astro/use-tree-walker.DFU2AaAP.js +1 -0
- package/dist/_astro/useListAnim.BoerpmsB.js +1 -0
- package/dist/_astro/{view-prefs.Dyu_lmN2.js → view-prefs.BEAZRcxF.js} +1 -1
- package/dist/case-exec/index.html +458 -22
- package/dist/cases/generate/index.html +258 -22
- package/dist/cases/library/index.html +458 -22
- package/dist/dashboard/index.html +458 -22
- package/dist/docs/changelog/index.html +373 -23
- package/dist/docs/install/index.html +258 -22
- package/dist/docs/manual/index.html +314 -35
- package/dist/index.html +2 -281
- package/dist/knowledge/index.html +458 -22
- 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 +258 -22
- package/dist/plugins/index.html +258 -22
- package/dist/pm/bugs/index.html +458 -22
- package/dist/pm/iterations/index.html +458 -22
- package/dist/pm/projects/detail/index.html +458 -22
- package/dist/pm/projects/index.html +458 -22
- package/dist/pm/requirements/index.html +458 -22
- package/dist/prompts/index.html +458 -22
- package/dist/reports/index.html +458 -22
- package/dist/requirements/index.html +458 -22
- package/dist/tasks/index.html +458 -22
- package/dist/templates/index.html +458 -22
- 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 +258 -22
- 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 +258 -22
- 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 +258 -22
- 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 +258 -22
- 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 +258 -22
- package/dist/test-automation/index.html +717 -0
- package/dist/test-stats/index.html +458 -22
- package/dist/todos/index.html +458 -22
- package/dist/workbench/index.html +517 -0
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +80 -43
- package/lh-plugins/lh-project-docs.mjs +14 -0
- package/lh-plugins/lh-uiauto.mjs +1445 -386
- package/lh-plugins/plugin-prompts.mjs +200 -0
- package/lh-plugins/storage-domain.mjs +6 -0
- package/lh-plugins/uiauto-adapters/index.mjs +57 -0
- package/lh-plugins/uiauto-adapters/playwright.mjs +215 -0
- package/lh-plugins/uiauto-adapters/pytest.mjs +151 -0
- package/lh-plugins/uiauto-adapters/selenium.mjs +163 -0
- package/lh-plugins/uiauto-adapters/shared.mjs +371 -0
- package/lh-plugins/uiauto-adapters/tasks.mjs +369 -0
- package/lh-plugins/uiauto-explorer/apps.mjs +332 -0
- package/lh-plugins/uiauto-explorer/diff.mjs +159 -0
- package/lh-plugins/uiauto-explorer/emit-files.mjs +506 -0
- package/lh-plugins/uiauto-explorer/emit-python.mjs +160 -0
- package/lh-plugins/uiauto-explorer/emit-ts.mjs +118 -0
- package/lh-plugins/uiauto-explorer/emit.mjs +15 -0
- package/lh-plugins/uiauto-explorer/ir.mjs +114 -0
- package/lh-plugins/uiauto-explorer/locators.mjs +267 -0
- package/lh-plugins/uiauto-explorer/merge.mjs +235 -0
- package/lh-plugins/uiauto-explorer/plan.mjs +165 -0
- package/lh-plugins/uiauto-explorer/runner.mjs +370 -0
- package/lh-plugins/uiauto-explorer/sessions.mjs +1373 -0
- package/lh-plugins/uiauto-explorer/snapshot.mjs +492 -0
- package/lh-plugins/uiauto-prompt.mjs +122 -0
- package/lh-plugins/uiauto-report.mjs +111 -0
- package/package.json +1 -1
- package/dist/_astro/Base.4X_wsSoR.css +0 -1
- package/dist/_astro/Base.astro_astro_type_script_index_0_lang.Dy7fJoxu.js +0 -1
- package/dist/_astro/CaseExecBoard.DKdfW5fM.js +0 -1
- package/dist/_astro/CaseGenerateApp.Bm8AyH9s.js +0 -9
- package/dist/_astro/CasesLibrary.CvVJZ74h.js +0 -1
- package/dist/_astro/ChatApp.BS-wLBRa.js +0 -276
- package/dist/_astro/ColumnResize.Bs6GL3DJ.js +0 -1
- package/dist/_astro/DatePicker.CMfX7F6z.js +0 -1
- package/dist/_astro/DocsFileBrowser.BtRoZ787.js +0 -1
- package/dist/_astro/DocsPager.C20ue_JZ.js +0 -1
- package/dist/_astro/KnowledgeLibrary.CV4DyStj.js +0 -1
- package/dist/_astro/NamePromptDialog.Dl5kSnQI.js +0 -1
- package/dist/_astro/NavLibraries.DmD2lZBZ.js +0 -1
- package/dist/_astro/OverflowHint.lzmplP5j.js +0 -1
- package/dist/_astro/PluginsPage.B59AMDrB.js +0 -1
- package/dist/_astro/PluginsPage.BEAPymNL.js +0 -39
- package/dist/_astro/PmBugsBoard.CPEyBp0l.js +0 -1
- package/dist/_astro/PmIterationsBoard.zCeLpcBo.js +0 -1
- package/dist/_astro/PmProjectDetail.ejIam5sD.js +0 -1
- package/dist/_astro/PmProjectsBoard.DbXzir8o.js +0 -1
- package/dist/_astro/PmRequirementsBoard.CynewRfv.js +0 -1
- package/dist/_astro/PmRequirementsBoard.D9eUMJWI.js +0 -1
- package/dist/_astro/PmShared.BxTHKdjY.js +0 -1
- package/dist/_astro/PromptsLibrary.Bkruu80b.js +0 -1
- package/dist/_astro/ReportsPage.BoBQshMQ.js +0 -1
- package/dist/_astro/RequirementsLibrary.BC0A8qdk.js +0 -1
- package/dist/_astro/SearchableSelect.CXa1hiDd.js +0 -1
- package/dist/_astro/SelectDropdown.Buv7rQJ_.js +0 -1
- package/dist/_astro/SettingsDialog.Dc-9QNJI.js +0 -1
- package/dist/_astro/SlideOverDrawer.TPbGEoWn.js +0 -1
- package/dist/_astro/TagSelect.u8DTop7v.js +0 -1
- package/dist/_astro/TasksBoard.Bb--oVV8.js +0 -1
- package/dist/_astro/TemplatesLibrary.D1wZq94E.js +0 -1
- package/dist/_astro/TestStatsBoard.DlVezlXl.js +0 -1
- package/dist/_astro/TodosBoard.S84wqcWY.js +0 -1
- package/dist/_astro/UiAutoBoard.BKp9ifxg.js +0 -1
- package/dist/_astro/active-element-history.CeefGkFQ.js +0 -1
- package/dist/_astro/app-config.DUyozIL9.js +0 -1
- package/dist/_astro/dialog.DXHznyjD.js +0 -1
- package/dist/_astro/jsx-runtime.BUXbF_vF.js +0 -1
- package/dist/_astro/listbox.Di-t5U37.js +0 -1
- package/dist/_astro/menu.Bkluqxic.js +0 -1
- package/dist/_astro/prompts-meta.F4wwkjUA.js +0 -2
- package/dist/_astro/report-prompt.Cmw4XzfY.js +0 -1
- package/dist/_astro/update.Bl_HfSe6.js +0 -1
- package/dist/_astro/use-text-value.BuY0Cm1z.js +0 -1
- package/dist/_astro/use-tree-walker.CfTHFX43.js +0 -1
- package/dist/_astro/useListAnim.CpGB1cft.js +0 -1
- package/dist/ui-automation/index.html +0 -281
|
@@ -3,39 +3,45 @@
|
|
|
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.CvbRi7Tl.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>`),主题必须从同一个键读,
|
|
10
|
+
// 否则深色下刷新会先按浅色画一帧、等脚本跑完才变黑(闪白)。
|
|
11
|
+
var earlySpaceId = (
|
|
12
|
+
sessionStorage.getItem('tw.space.active-id') ||
|
|
13
|
+
localStorage.getItem('tw.space.active-id') ||
|
|
14
|
+
''
|
|
15
|
+
).trim();
|
|
16
|
+
var raw =
|
|
17
|
+
(earlySpaceId ? localStorage.getItem('tw.app.config.v1::' + earlySpaceId) : null) ||
|
|
18
|
+
localStorage.getItem('tw.app.config.v1');
|
|
19
|
+
var cfg = raw ? JSON.parse(raw) : null;
|
|
20
|
+
var g = (cfg && cfg.general) || {};
|
|
21
|
+
var root = document.documentElement;
|
|
10
22
|
if (raw) {
|
|
11
|
-
var cfg = JSON.parse(raw);
|
|
12
|
-
var g = (cfg && cfg.general) || {};
|
|
13
|
-
var root = document.documentElement;
|
|
14
23
|
var size = typeof g.sessionFontSize === 'number' ? Math.round(g.sessionFontSize) : 14;
|
|
15
24
|
if (size < 12) size = 12;
|
|
16
25
|
if (size > 22) size = 22;
|
|
17
26
|
var px = size + 'px';
|
|
18
27
|
root.style.setProperty('--tw-ui-font-size', px);
|
|
19
28
|
root.style.setProperty('--tw-session-font-size', px);
|
|
20
|
-
var appearance = g.appearance;
|
|
21
|
-
var theme =
|
|
22
|
-
appearance === 'dark' || appearance === 'light'
|
|
23
|
-
? appearance
|
|
24
|
-
: window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
25
|
-
? 'dark'
|
|
26
|
-
: 'light';
|
|
27
|
-
root.dataset.theme = theme;
|
|
28
|
-
root.style.colorScheme = theme;
|
|
29
29
|
if (g.language === 'en') root.lang = 'en';
|
|
30
30
|
}
|
|
31
|
+
// 没有配置时按系统偏好定主题:早一帧定下来,页面就不会先亮后暗
|
|
32
|
+
var appearance = g.appearance;
|
|
33
|
+
var theme =
|
|
34
|
+
appearance === 'dark' || appearance === 'light'
|
|
35
|
+
? appearance
|
|
36
|
+
: window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
37
|
+
? 'dark'
|
|
38
|
+
: 'light';
|
|
39
|
+
root.dataset.theme = theme;
|
|
40
|
+
root.style.colorScheme = theme;
|
|
31
41
|
if (localStorage.getItem('tw.nav.collapsed') === '1') {
|
|
32
42
|
document.documentElement.dataset.navCollapsed = '1';
|
|
33
43
|
}
|
|
34
|
-
var spaceId =
|
|
35
|
-
sessionStorage.getItem('tw.space.active-id') ||
|
|
36
|
-
localStorage.getItem('tw.space.active-id') ||
|
|
37
|
-
''
|
|
38
|
-
).trim();
|
|
44
|
+
var spaceId = earlySpaceId;
|
|
39
45
|
var cfgKey = spaceId ? 'tw.app.config.v1::' + spaceId : 'tw.app.config.v1';
|
|
40
46
|
var cfgRaw = localStorage.getItem(cfgKey) || localStorage.getItem('tw.app.config.v1');
|
|
41
47
|
if (cfgRaw) {
|
|
@@ -76,10 +82,240 @@
|
|
|
76
82
|
}
|
|
77
83
|
} catch (e) {}
|
|
78
84
|
})();
|
|
79
|
-
</script><link rel="stylesheet" href="/_astro/Base.
|
|
85
|
+
</script><link rel="stylesheet" href="/_astro/Base.Bgxs1QQl.css"><style>.tw-docs[data-astro-cid-lpetmyok]{grid-template-columns:11.5rem minmax(0,1fr);gap:0;min-height:100vh;display:grid}.tw-docs-rail[data-astro-cid-lpetmyok]{background:color-mix(in srgb, var(--tw-surface-rail-solid) 55%, var(--tw-surface-panel))}.tw-docs-rail-inner[data-astro-cid-lpetmyok]{max-height:100vh;padding:1.75rem .85rem 2.5rem 1.25rem;position:sticky;top:0;overflow-y:auto}.tw-docs-rail-title[data-astro-cid-lpetmyok]{letter-spacing:.08em;text-transform:uppercase;color:var(--tw-label-tertiary);margin:0 0 .65rem .55rem;font-size:.6875rem;font-weight:650}.tw-docs-rail-nav[data-astro-cid-lpetmyok]{flex-direction:column;gap:.2rem;display:flex}.tw-docs-rail-ext[data-astro-cid-lpetmyok]{border-top:1px solid var(--tw-border);flex-direction:column;gap:.2rem;margin-top:.85rem;padding-top:.55rem;display:flex}.tw-docs-rail-link[data-astro-cid-lpetmyok]{color:var(--tw-label-secondary);border-radius:8px;padding:.45rem .65rem;font-size:.875rem;line-height:1.35;text-decoration:none;transition:background .12s,color .12s;display:block}.tw-docs-rail-link[data-astro-cid-lpetmyok]:hover{color:var(--tw-label-primary);background:color-mix(in srgb, var(--tw-accent) 8%, transparent)}.tw-docs-rail-link[data-astro-cid-lpetmyok].is-active{color:var(--tw-accent);background:var(--tw-accent-soft);font-weight:600}.tw-docs-rail-link--ext[data-astro-cid-lpetmyok]:after{content:"↗";opacity:.65;margin-left:.35rem;font-size:.8em}.tw-docs-main[data-astro-cid-lpetmyok]{border-left:1px solid var(--tw-border);min-width:0}@media (width<=860px){.tw-docs[data-astro-cid-lpetmyok]{grid-template-columns:1fr}.tw-docs-rail[data-astro-cid-lpetmyok]{border-bottom:1px solid var(--tw-border)}.tw-docs-rail-inner[data-astro-cid-lpetmyok]{max-height:none;padding:1rem 1rem .75rem;position:static}.tw-docs-main[data-astro-cid-lpetmyok]{border-left:none}.tw-docs-rail-nav[data-astro-cid-lpetmyok]{flex-flow:wrap;gap:.35rem}.tw-docs-rail-title[data-astro-cid-lpetmyok]{width:100%;margin:0 0 .45rem .15rem}}
|
|
80
86
|
</style><script type="module" src="/_astro/page.Bx2KSkeL.js"></script><style>[data-astro-transition-scope="astro-v4xhcqov-3"] { view-transition-name: astro-v4xhcqov-3; }@layer astro { ::view-transition-old(astro-v4xhcqov-3) { animation: none; opacity: 0; mix-blend-mode: normal; }::view-transition-new(astro-v4xhcqov-3) { animation: none; mix-blend-mode: normal; }::view-transition-group(astro-v4xhcqov-3) { animation: none } }[data-astro-transition-fallback="old"] [data-astro-transition-scope="astro-v4xhcqov-3"],
|
|
81
87
|
[data-astro-transition-fallback="old"][data-astro-transition-scope="astro-v4xhcqov-3"] { animation: none; mix-blend-mode: normal; }[data-astro-transition-fallback="new"] [data-astro-transition-scope="astro-v4xhcqov-3"],
|
|
82
|
-
[data-astro-transition-fallback="new"][data-astro-transition-scope="astro-v4xhcqov-3"] { animation: none; mix-blend-mode: normal; }</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"><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.9">v0.1.9<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.CI3KDBOA.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.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="/" 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.DmD2lZBZ.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.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></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 is-active font-medium" 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.Dc-9QNJI.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.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>
|
|
88
|
+
[data-astro-transition-fallback="new"][data-astro-transition-scope="astro-v4xhcqov-3"] { animation: none; mix-blend-mode: normal; }</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.11">v0.1.11<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.BVQLt_tL.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.C6LImMO_.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";
|
|
89
|
+
const cacheKey = "tw.hydrate.nav";
|
|
90
|
+
const fixActive = true;
|
|
91
|
+
const capture = false;
|
|
92
|
+
|
|
93
|
+
(function () {
|
|
94
|
+
try {
|
|
95
|
+
var target = document.querySelector(host);
|
|
96
|
+
if (!target) return;
|
|
97
|
+
var spaceId = (
|
|
98
|
+
sessionStorage.getItem('tw.space.active-id') ||
|
|
99
|
+
localStorage.getItem('tw.space.active-id') ||
|
|
100
|
+
''
|
|
101
|
+
).trim();
|
|
102
|
+
var key = spaceId ? cacheKey + '::' + spaceId : cacheKey;
|
|
103
|
+
var html = localStorage.getItem(key);
|
|
104
|
+
var island = target.querySelector('astro-island');
|
|
105
|
+
|
|
106
|
+
// 「插件未启用」这类提示不该被缓存,否则启用后刷新还会先闪一下旧提示
|
|
107
|
+
if (html && html.indexOf('tw-lib-notice') !== -1) {
|
|
108
|
+
try {
|
|
109
|
+
localStorage.removeItem(key);
|
|
110
|
+
} catch (e) {
|
|
111
|
+
/* ignore */
|
|
112
|
+
}
|
|
113
|
+
html = null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (html) {
|
|
117
|
+
var tpl = document.createElement('template');
|
|
118
|
+
tpl.innerHTML = html;
|
|
119
|
+
var nodes = Array.prototype.slice.call(tpl.content.children || []);
|
|
120
|
+
if (nodes.length) {
|
|
121
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
122
|
+
nodes[i].setAttribute('data-hydrate-cache', '');
|
|
123
|
+
nodes[i].setAttribute('aria-hidden', 'true');
|
|
124
|
+
}
|
|
125
|
+
// 片段并列插入:挂在岛屿前面,挂载后由 CSS 隐藏
|
|
126
|
+
var frag = document.createDocumentFragment();
|
|
127
|
+
for (var j = 0; j < nodes.length; j++) frag.appendChild(nodes[j]);
|
|
128
|
+
if (island && island.parentNode === target) target.insertBefore(frag, island);
|
|
129
|
+
else target.appendChild(frag);
|
|
130
|
+
|
|
131
|
+
if (fixActive) {
|
|
132
|
+
// 缓存里的高亮是上一次停留的页面,按当前路径重新点亮
|
|
133
|
+
var here = location.pathname.replace(/\/+$/, '') || '/';
|
|
134
|
+
var marks = target.querySelectorAll(
|
|
135
|
+
'[data-hydrate-cache].is-active, [data-hydrate-cache] .is-active',
|
|
136
|
+
);
|
|
137
|
+
for (var k = 0; k < marks.length; k++) marks[k].classList.remove('is-active');
|
|
138
|
+
var links = target.querySelectorAll('[data-hydrate-cache] a.tw-nav-item-main');
|
|
139
|
+
for (var m = 0; m < links.length; m++) {
|
|
140
|
+
var href = (links[m].getAttribute('href') || '').split(/[?#]/)[0].replace(/\/+$/, '');
|
|
141
|
+
if (href && href === here) {
|
|
142
|
+
var row = links[m].closest('.tw-nav-item');
|
|
143
|
+
if (row) row.classList.add('is-active');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (!island) return;
|
|
151
|
+
|
|
152
|
+
/*
|
|
153
|
+
* 缓存已经铺上了:先给 host 打个标记,CSS 会把岛屿整块藏起来(缓存独占),
|
|
154
|
+
* 等真实内容就绪再撤。没有缓存时不打标记,走原来的 loading 骨架。
|
|
155
|
+
*/
|
|
156
|
+
var pendingMarked = false;
|
|
157
|
+
function markPending() {
|
|
158
|
+
if (pendingMarked || !html) return;
|
|
159
|
+
pendingMarked = true;
|
|
160
|
+
target.setAttribute('data-hydrate-pending', '');
|
|
161
|
+
// 兜底:页面一直加载不出来时别把岛屿永远藏着
|
|
162
|
+
setTimeout(function () {
|
|
163
|
+
target.removeAttribute('data-hydrate-pending');
|
|
164
|
+
}, 8000);
|
|
165
|
+
}
|
|
166
|
+
function unmarkPending() {
|
|
167
|
+
target.removeAttribute('data-hydrate-pending');
|
|
168
|
+
}
|
|
169
|
+
markPending();
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 岛屿处于首屏 loading:此时缓存片段继续占位(CSS 同时把岛屿藏起来)。
|
|
173
|
+
* `.tw-lib-spin` / `aria-busy` 是各页面 loading 骨架的统一特征。
|
|
174
|
+
*/
|
|
175
|
+
function isPending() {
|
|
176
|
+
return Boolean(
|
|
177
|
+
island.querySelector('.tw-hydrate-pending, [aria-busy="true"], .tw-lib-spin'),
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** 真实内容就绪后撤掉缓存片段,避免和岛屿内容叠成两份 */
|
|
182
|
+
function dropCache() {
|
|
183
|
+
var kids = Array.prototype.slice.call(target.children);
|
|
184
|
+
for (var i = 0; i < kids.length; i++) {
|
|
185
|
+
if (kids[i].hasAttribute && kids[i].hasAttribute('data-hydrate-cache')) {
|
|
186
|
+
kids[i].parentNode.removeChild(kids[i]);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
var timer = 0;
|
|
192
|
+
var settled = false;
|
|
193
|
+
var saved = '';
|
|
194
|
+
/** 单页缓存上限:列表页的 DOM 可能有两三百 KB,超过就不存(仍走正常加载) */
|
|
195
|
+
var MAX_HTML = 600000;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 所有页面的刷新缓存共用一份预算(3MB):超了就先扔最大的旧页面缓存,
|
|
199
|
+
* 不去碰 nav / 自动化测试的缓存(这两处最常驻,扔了会明显闪)。
|
|
200
|
+
* 不做这一步的话 localStorage 5MB 配额会被几个大列表页吃光。
|
|
201
|
+
*/
|
|
202
|
+
var PAGE_CACHE_BUDGET = 3 * 1024 * 1024;
|
|
203
|
+
function trimOtherPageCaches(needBytes) {
|
|
204
|
+
var entries = [];
|
|
205
|
+
for (var i = 0; i < localStorage.length; i++) {
|
|
206
|
+
var k = localStorage.key(i);
|
|
207
|
+
if (!k || k === key) continue;
|
|
208
|
+
if (k.indexOf('tw.hydrate.') !== 0) continue;
|
|
209
|
+
if (k.indexOf('tw.hydrate.nav') === 0 || k.indexOf('tw.hydrate.ui-auto') === 0) continue;
|
|
210
|
+
entries.push({ k: k, len: (localStorage.getItem(k) || '').length });
|
|
211
|
+
}
|
|
212
|
+
var total = entries.reduce(function (sum, e) {
|
|
213
|
+
return sum + e.len;
|
|
214
|
+
}, needBytes);
|
|
215
|
+
entries.sort(function (a, b) {
|
|
216
|
+
return b.len - a.len;
|
|
217
|
+
});
|
|
218
|
+
for (var j = 0; j < entries.length && total > PAGE_CACHE_BUDGET; j++) {
|
|
219
|
+
try {
|
|
220
|
+
localStorage.removeItem(entries[j].k);
|
|
221
|
+
total -= entries[j].len;
|
|
222
|
+
} catch (e) {
|
|
223
|
+
/* ignore */
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function saveCache(html) {
|
|
229
|
+
if (!html || html === saved || html.length > MAX_HTML) return;
|
|
230
|
+
trimOtherPageCaches(html.length);
|
|
231
|
+
try {
|
|
232
|
+
localStorage.setItem(key, html);
|
|
233
|
+
saved = html;
|
|
234
|
+
return;
|
|
235
|
+
} catch (e) {
|
|
236
|
+
// 配额满:腾掉其它页面缓存再试一次
|
|
237
|
+
}
|
|
238
|
+
trimOtherPageCaches(html.length);
|
|
239
|
+
try {
|
|
240
|
+
localStorage.setItem(key, html);
|
|
241
|
+
saved = html;
|
|
242
|
+
} catch (e) {
|
|
243
|
+
/* 隐私模式 / 配额仍然不足:放弃缓存 */
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** 把当前渲染结果存一份(页面在数据变化后离开时也调用,缓存不会停在首屏) */
|
|
248
|
+
function persistNow() {
|
|
249
|
+
if (!capture) return;
|
|
250
|
+
if (!island.firstElementChild || isPending()) return;
|
|
251
|
+
// 只渲染了提示(插件关闭 / 服务未就绪)时不缓存
|
|
252
|
+
var first = island.firstElementChild;
|
|
253
|
+
if (first && first.classList && first.classList.contains('tw-lib-notice')) return;
|
|
254
|
+
saveCache(island.innerHTML.trim());
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function flush() {
|
|
258
|
+
timer = 0;
|
|
259
|
+
if (settled) return;
|
|
260
|
+
if (!island.firstElementChild) return;
|
|
261
|
+
if (isPending()) return;
|
|
262
|
+
|
|
263
|
+
dropCache();
|
|
264
|
+
unmarkPending();
|
|
265
|
+
persistNow();
|
|
266
|
+
settled = true;
|
|
267
|
+
mo.disconnect();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// 离开页面 / 切到后台时再存一次:列表增删改之后,下次刷新看到的是最新一屏
|
|
271
|
+
window.addEventListener('pagehide', persistNow);
|
|
272
|
+
document.addEventListener('visibilitychange', function () {
|
|
273
|
+
if (document.visibilityState === 'hidden') persistNow();
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
function schedule() {
|
|
277
|
+
if (settled || timer) return;
|
|
278
|
+
timer = setTimeout(flush, 400);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
var mo = new MutationObserver(schedule);
|
|
282
|
+
mo.observe(island, { childList: true, subtree: true, characterData: true });
|
|
283
|
+
schedule();
|
|
284
|
+
} catch (e) {
|
|
285
|
+
// 缓存坏了就当没有
|
|
286
|
+
}
|
|
287
|
+
})();
|
|
288
|
+
})();</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 is-active font-medium" 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.CVB5Gtk4.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>
|
|
289
|
+
(function () {
|
|
290
|
+
try {
|
|
291
|
+
var raw = localStorage.getItem('tw.app.model.v1');
|
|
292
|
+
if (!raw) return;
|
|
293
|
+
var model = JSON.parse(raw) || {};
|
|
294
|
+
var list = Array.isArray(model.providers) ? model.providers : [];
|
|
295
|
+
var active = null;
|
|
296
|
+
for (var i = 0; i < list.length; i++) {
|
|
297
|
+
if (list[i] && list[i].id === model.activeId) {
|
|
298
|
+
active = list[i];
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (!active && list.length) active = list[0];
|
|
303
|
+
var name = active && active.name ? String(active.name).trim() : '';
|
|
304
|
+
if (!name) return;
|
|
305
|
+
var el = document.querySelector('.tw-nav-provider-name');
|
|
306
|
+
if (!el) return;
|
|
307
|
+
el.textContent = name;
|
|
308
|
+
var chip = el.closest('.tw-nav-provider-chip');
|
|
309
|
+
if (chip) {
|
|
310
|
+
chip.classList.remove('is-empty');
|
|
311
|
+
var m = active.model ? ' · ' + String(active.model).trim() : '';
|
|
312
|
+
chip.setAttribute('data-hint', name + m);
|
|
313
|
+
}
|
|
314
|
+
} catch (e) {
|
|
315
|
+
/* ignore */
|
|
316
|
+
}
|
|
317
|
+
})();
|
|
318
|
+
</script><script data-astro-rerun>
|
|
83
319
|
(function () {
|
|
84
320
|
var root = document.documentElement;
|
|
85
321
|
var btn = document.getElementById('tw-nav-toggle');
|
|
@@ -225,7 +461,7 @@
|
|
|
225
461
|
<li><strong>源码 / dev 模式</strong>:只提示、不执行更新,请在仓库里 <code>git pull</code> 后重新 <code>pnpm build</code>;<strong>npx 模式</strong>:更新会转为全局安装并重启,之后不再走 npx 缓存。</li>
|
|
226
462
|
</ul>
|
|
227
463
|
<h2>我的工作台</h2>
|
|
228
|
-
<p
|
|
464
|
+
<p>侧栏进入「我的工作台」(<code>/workbench/</code>;站点根 <code>/</code> 是「自动化测试」入口,开启该插件时默认落在那里)。空会话居中展示品牌与标志语「提灯的人不问路」,并隐藏会话标题与「对话 / 回合 / 记忆」Tab;发出首条消息后顶栏与 Tab 出现。</p>
|
|
229
465
|
<ul>
|
|
230
466
|
<li><strong>Tab 记忆</strong>:在「对话 / 回合 / 待办 / 记忆」之间切换后,刷新或重新进入页面仍停在原 Tab;选择按当前数据空间记在浏览器本地。空会话没有 Tab 栏,自动回到「对话」。</li>
|
|
231
467
|
</ul>
|
|
@@ -334,7 +570,7 @@
|
|
|
334
570
|
<p>目录<strong>按插件开关懒建</strong>:新建 / 首次选中的数据空间只有隐藏的 <code>.lantern/</code> 元数据,启用对应内容库插件后才出现上表目录并补入种子文件;旧版本留下的空目录(只有 <code>.gitkeep</code>)会自动收起,已有文件的目录不动。<strong><code>提示词管理/</code> 是唯一例外</strong>:每个空间都有默认提示词,因此该目录与 <code>默认提示词.md</code> 会始终铺好。</p>
|
|
335
571
|
</blockquote>
|
|
336
572
|
<blockquote>
|
|
337
|
-
<p>待办、任务、工作汇报、测试统计、用例执行统计、项目管理的四个插件的数据也直接放在空间里,跟侧栏入口对应:<code>待办事项/待办.json</code>、<code>任务管理/任务.json</code>、<code>工作汇报/日报 · 周报 · 月报/</code>、<code>测试统计/测试统计.json</code>、<code>用例执行统计/用例执行统计.json</code>、<code>项目列表/项目列表.json</code>、<code>迭代管理/迭代管理.json</code>、<code>需求管理/需求管理.json</code>、<code>缺陷管理/缺陷管理.json</code>、<code
|
|
573
|
+
<p>待办、任务、工作汇报、测试统计、用例执行统计、项目管理的四个插件的数据也直接放在空间里,跟侧栏入口对应:<code>待办事项/待办.json</code>、<code>任务管理/任务.json</code>、<code>工作汇报/日报 · 周报 · 月报/</code>、<code>测试统计/测试统计.json</code>、<code>用例执行统计/用例执行统计.json</code>、<code>项目列表/项目列表.json</code>、<code>迭代管理/迭代管理.json</code>、<code>需求管理/需求管理.json</code>、<code>缺陷管理/缺陷管理.json</code>、<code>自动化测试/自动化测试.json</code>。这些目录只在真的有数据时创建,没有数据就保持干净:打开开关、进入页面都不会预建空目录 / 空文件,第一次写入(新增记录、保存汇报文件)时才落盘。旧版放在 <code>.lantern/local/todos.json</code>、<code>tasks.json</code> 的数据读取时仍能直接看到,第一次写入时自动搬进 <code>待办事项/</code>、<code>任务管理/</code>;旧版四插件共用的 <code>项目管理/项目管理.json</code> 也会在首次读取或打开开关时自动拆到四个目录。</p>
|
|
338
574
|
</blockquote>
|
|
339
575
|
<blockquote>
|
|
340
576
|
<p>「空间管理」默认展示全部空间:右上角「+ 新增空间」新建并立即写入默认提示词;每行的「编辑」可修改空间名称、提示词要求与默认提示词正文,保存后工作台立即生效。</p>
|
|
@@ -399,7 +635,7 @@
|
|
|
399
635
|
</tr>
|
|
400
636
|
<tr>
|
|
401
637
|
<td>提示词管理</td>
|
|
402
|
-
<td
|
|
638
|
+
<td>双击本地打开;删除(系统提示词不可删;插件开启期间,插件引用的提示词也不可删);「关联插件」列标出归属;行内可复制 / 改名(悬停文件名右侧出现改名按钮,重名会拦下);「生成提示词」跳转工作台</td>
|
|
403
639
|
</tr>
|
|
404
640
|
<tr>
|
|
405
641
|
<td>知识库管理</td>
|
|
@@ -418,6 +654,8 @@
|
|
|
418
654
|
<p>双击本地打开、读写文件依赖本地文件服务(<code>lantern web</code> 或 <code>pnpm dev</code>);静态站仅能浏览与下载。</p>
|
|
419
655
|
</blockquote>
|
|
420
656
|
<p>用例管理 / 提示词管理 / 知识库管理的列表都支持搜索与「按修改时间 / 按文件名」排序;<strong>搜索词与排序方式会记住</strong>,刷新或重新进入页面仍是上次的样子(三个库各记各的,按当前数据空间分开存)。</p>
|
|
657
|
+
<p>提示词列表在「文件名」右侧多一列<strong>关联插件</strong>:<code>工作汇报提示词.md</code> 显示「工作汇报」、<code>Playwright提示词.md</code> 显示「自动化测试」、<code>默认提示词.md</code> 显示「系统默认」,其它提示词一律显示「未关联」。<strong>按实际挂载的也算关联</strong>:在自动化测试「挂载提示词」里给某个项目选了 <code>pytest提示词.md</code> 后,这里同样显示「自动化测试」;在工作汇报页把提示词换成自定义文件,则显示「工作汇报」。各项目各挂各的,互不影响。只有<strong>此刻真的被挂载</strong>的那份才会再标一个「引用中」——一个项目只挂一份,换掉挂载后上一份立刻变回普通提示词(<code>Playwright提示词.md</code> 没人挂时只显示「自动化测试」,不带「引用中」)。<code>引用中</code> 的行 <code>删除 / 改名</code> 置灰并锁定(服务端也会拒绝,避免绕过界面),先换挂载或关掉对应插件再操作;插件自带的那份提示词在插件开启期间也保持锁定(插件要拿它做种子 / 模板),关掉插件后可删,再打开会重新生成种子。文件没删的话,再次打开插件会继续引用原来那份,不会被模板盖掉。</p>
|
|
658
|
+
<p>每行还能直接经营:操作列在「在会话中打开」右侧有<strong>复制</strong>(同名同目录复制一份,先弹命名,默认 <code>原名(副本)</code>;同名会拦下)与<strong>删除</strong>(带图标),三者同一行对齐;文件名右侧悬停出现<strong>改名</strong>按钮,只改主名、扩展名锁定,同一目录下重名同样拦下并提示。改名 / 删除后列表立即刷新。移出自动化测试项目时,它挂载的提示词会自动取消挂载,这里立刻回到「未关联」(同页在线时即时刷新,不用等切页)。</p>
|
|
421
659
|
<h3>测试模板库格式</h3>
|
|
422
660
|
<table>
|
|
423
661
|
<thead>
|
|
@@ -582,7 +820,7 @@ version: '1.0' # 可选
|
|
|
582
820
|
<td>测试统计</td>
|
|
583
821
|
<td>自动化测试</td>
|
|
584
822
|
<td>关</td>
|
|
585
|
-
<td
|
|
823
|
+
<td>侧栏进入自动化测试:自动识别并挂载 Playwright / pytest / Selenium 项目,按项目自带任务(脚本 / Makefile / marker)运行,运行 / 停止用例、实时日志与 HTML 报告;「生成」Tab 是全屏工作区(左需求步骤、右上探索活动 / 代码 / 变更、右下控制台 / 网络 / 试跑,宽高都可拖),可先出可编辑步骤计划、再由 AI 驱动浏览器绑定定位器,脚本在项目内 <code>.lantern-ai</code> 草稿里试跑 / 调试;写入时一次生成 spec + 页面对象 + 登录态文件,写入后看 diff 并按项目配置验收(需本地服务)</td>
|
|
586
824
|
</tr>
|
|
587
825
|
<tr>
|
|
588
826
|
<td>仪表盘</td>
|
|
@@ -692,16 +930,57 @@ version: '1.0' # 可选
|
|
|
692
930
|
<li>顶部汇总显示记录数、项目数、已执行 / 用例总数与整体执行率;支持按项目 / 日期搜索,支持勾选本页后批量删除(二次确认),行尾也可删除单条。搜索词会记住(刷新 / 重新进入页面仍按上次的关键词过滤)。列表默认每页 20 条,可切换每页条数;列宽可拖表头右边缘调整,列窄时「执行比例」的进度条也会保留最小宽度,不会压成一条线。</li>
|
|
693
931
|
</ul>
|
|
694
932
|
<h3>自动化测试</h3>
|
|
695
|
-
<p>「我的插件」→「测试统计」→「自动化测试」开启后,侧栏出现「自动化测试」入口(<code>/
|
|
933
|
+
<p>「我的插件」→「测试统计」→「自动化测试」开启后,侧栏出现「自动化测试」入口(<code>/test-automation/</code>)。开启后打开应用根地址 <code>/</code> 会<strong>默认落在这一页</strong>;插件被关掉时根地址回落到工作台,工作台本身在 <code>/workbench/</code>。</p>
|
|
696
934
|
<ul>
|
|
697
|
-
<li>挂载目标项目里<strong
|
|
698
|
-
<li
|
|
699
|
-
<li
|
|
700
|
-
<li
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
<li
|
|
704
|
-
<li
|
|
935
|
+
<li>挂载目标项目里<strong>已有的测试项目</strong>,不新增依赖、也不改项目文件:点「挂载项目」在卡片里展开目录面板(不是弹窗,按钮带箭头,再点一次收起),用「浏览…」调系统原生选目录,也可以直接粘贴 / 输入绝对路径(系统不允许弹窗时照样能挂载),点「挂载」即可:框架按 <code>playwright.config.ts</code>、<code>requirements.txt: pytest</code>、<code>pom.xml: selenium</code> 这类证据自动识别,挂完直接选中该项目、停在「运行」页。同一个目录重复挂载会切到已有记录。还没挂载任何项目时,面板常驻在空状态下方,打开页面就能填。首期支持:<ul>
|
|
936
|
+
<li><strong>Playwright</strong>(<code>playwright.config.*</code> 或依赖 <code>@playwright/test</code>)</li>
|
|
937
|
+
<li><strong>pytest</strong>(<code>pytest.ini</code> / <code>pyproject.toml</code> / <code>conftest.py</code> / 依赖 <code>pytest</code>;按依赖自动区分接口与 UI,<code>requests</code> / <code>httpx</code> 为接口自动化,<code>selenium</code> / <code>playwright</code> 为 UI 自动化)</li>
|
|
938
|
+
<li><strong>Selenium</strong>(Java 的 <code>pom.xml</code> / <code>build.gradle(.kts)</code> 含 selenium 依赖,或 Node 依赖 <code>selenium-webdriver</code> / <code>webdriverio</code>)</li>
|
|
939
|
+
</ul>
|
|
940
|
+
</li>
|
|
941
|
+
<li><strong>运行任务</strong>是个下拉,对齐 Jenkins 的 choice 参数:除了「全量运行」(框架默认命令),还会把项目里<strong>原本就声明好的跑法</strong>列出来,挂载时扫一次,不用自己背命令:<ul>
|
|
942
|
+
<li>Playwright / Node:<code>package.json</code> 的 <code>scripts</code>,筛 <code>test</code>、<code>test:*</code>、<code>e2e*</code>、<code>smoke*</code> 这类名字(<code>lint</code> / <code>format</code> / <code>--ui</code> / <code>--debug</code> 这类打开界面或会导致挂住的跳过),显示成 <code>npm run test:smoke</code>(pnpm / yarn 自动换),执行时透传 <code>--reporter=list,json,html</code> 以拿到 JSON 汇总</li>
|
|
943
|
+
<li>pytest:<code>Makefile</code> 里带 <code>## 说明</code> 的测试目标(<code>make smoke</code>)+ <code>pyproject.toml</code> / <code>pytest.ini</code> 的 markers(<code>pytest -m smoke</code>),解释器按 <code>.venv</code> → <code>uv</code> / <code>poetry</code> → <code>python3</code> 自动选</li>
|
|
944
|
+
<li>Selenium:<code>pom.xml</code> 的 <code><profiles></code>(<code>mvn test -Psmoke</code>);Node 项目退回 <code>package.json</code> 脚本</li>
|
|
945
|
+
<li>下拉里的任务名统一显示成「<strong>名称(命令)</strong>」,例如 <code>smoke(make smoke)</code>、<code>test:smoke(npm run test:smoke)</code>;自定义命令没填名称就直接显示命令</li>
|
|
946
|
+
<li>下拉右侧的「<strong>配置</strong>」按钮打开运行配置弹窗,命令再多也只在弹窗里滚动,不会把卡片撑高:<ul>
|
|
947
|
+
<li>上半「自定义命令」:自己写「名称 + 命令」(比如 <code>uv run pytest -m "smoke or regression"</code>),在项目目录下<strong>用 shell 执行</strong>,支持引号与 <code>&&</code>,可删除;名称可以不填,不填时下拉里直接显示命令</li>
|
|
948
|
+
<li>下半「自动发现」:挂载时扫出来的任务,每行显示短名 + 完整命令 + 来源说明(过长自动省略号),可以<strong>修改</strong>(改名 / 改命令,改完标「已改」,命令按原样执行、不再追加框架参数)或<strong>删除</strong>;改动只存差异(<code>taskOverrides</code> / <code>hiddenTasks</code>),项目配置变了也不串。右上角「<strong>重新扫描</strong>」会立刻重扫项目配置(比如刚在 <code>package.json</code> 里补了脚本),有改动时旁边还有「恢复默认」一键清空</li>
|
|
949
|
+
<li>面板底部不再放「完成」按钮:点右上 ✕、点遮罩或按 Esc 关闭即可,面板配色跟随深浅主题</li>
|
|
950
|
+
</ul>
|
|
951
|
+
</li>
|
|
952
|
+
</ul>
|
|
953
|
+
</li>
|
|
954
|
+
<li>运行状态直接落在「运行」按钮上(按钮固定在运行条最右侧):运行中显示「运行中…」并禁用、旁边出现「停止」;跑完后按钮变成「重新运行」,并用绿 / 红 / 黄小圆点标出上次是通过 / 失败 / 中断。失败策略(仅上次失败 / 失败即停)由框架自身限制,界面上不再提供。文件、<code>-k</code> / <code>-m</code>、headed、并发这些筛选控件先收起,后续再定。同一项目同时只允许一个运行,全局最多同时跑 2 个。</li>
|
|
955
|
+
<li>移出最后一个项目后页面不跳走:仍在同一张卡片里,只是没有挂载内容,顶栏和「挂载」面板都还在。侧栏菜单与页面首屏会用上次渲染的缓存先铺一遍,刷新不再空白闪烁,数据挂载后自动刷新(空闲时每 15 秒对一次)。</li>
|
|
956
|
+
<li>停止:先向进程组发 SIGTERM,5 秒未退出再 SIGKILL,浏览器 / 子进程会一起结束,状态记为「已取消」。</li>
|
|
957
|
+
<li>日志:运行中每秒增量拉取,显示在卡片内的浅色日志面板里并默认自动滚底(往上翻时暂停,滚回底部自动恢复,不再有「自动滚动」勾选框);结束后保留原始日志,历史里点「日志」可回看。常见失败会额外给一句可操作提示(缺浏览器内核、没装 pytest、Maven 依赖下载失败等)。</li>
|
|
958
|
+
<li>报告:运行结束后把项目自己生成的 HTML 报告快照到 <code>自动化测试/<项目名>/报告/<runId>/</code>(Playwright 的 <code>playwright-report/</code>、Gradle 的 <code>build/reports/tests/test</code> 等;pytest 声明 <code>pytest-html</code> 时直接写进该目录),点「查看报告」在新标签打开,历史记录不会被下次运行覆盖;汇总条显示总数 / 通过 / 失败 / 跳过 / 耗时与本次命令(命令里的本机绝对路径收掉,只显示 <code>playwright test …</code> 这样的命令名 + 参数),Playwright 失败时可直接「重跑失败用例」(<code>--last-failed</code>)。</li>
|
|
959
|
+
<li>目录:页面上有「运行」「生成」「历史」三个 Tab,顶部是一行(下划线 Tab + 固定宽度提示词框 + 项目下拉 + 框架只读徽标 + 打开方式 + 挂载 + 更多菜单),不再有左侧项目文件树;提示词框只显示当前挂载的文件名(超长省略号 + 气泡),点它打开挂载弹窗;项目下拉宽度固定,菜单每一项第二行显示真实目录(过长省略号 + 气泡),整项悬停右侧出现删除按钮,点它会二次确认后移出项目(只删挂载记录,项目文件与历史报告都留,<strong>该项目的提示词同时取消挂载</strong>,提示词管理里对应的「引用中」立即消失);更多菜单里有「复制项目路径 / 在访达中显示 / 重新指定目录 / 移出项目」;除「生成」里用户确认写入脚本外,插件不会修改项目文件。</li>
|
|
960
|
+
<li><strong>打开方式</strong>:顶栏右侧是一个分裂按钮——左侧显示当前应用的真实图标(默认 VS Code,点一下就用它打开项目目录),右侧箭头展开本机已安装的应用列表(VS Code / Cursor / Xcode / Sourcetree / iTerm / 终端 / 访达等,只列真装了的)。图标由后端从 <code>.app</code> 的 <code>.icns</code> 转成 PNG 缓存在本机配置目录 <code>.lantern/local/uiauto/app-icons/</code>,升级应用后自动重抽;选中项记在浏览器本地,下次沿用。</li>
|
|
961
|
+
<li><strong>生成</strong>(AI 写脚本):切到「生成」Tab 后整页铺满(隐藏页面标题、去掉卡片外边距与描边)。布局是左右两栏:左边「需求 / 步骤计划」占满整列全高(300–560px,可拖分隔条调宽),右边上半是「探索活动 / 代码 / 变更」+ 最近一步截图,下半是可拖高(160px–65vh)、可收起到 36px 的「控制台 / 网络 / 试跑」面板;面板 Tab 行正中有展开 / 收起图标,收起 / 展开带高度过渡。<ul>
|
|
962
|
+
<li><strong>探索不自动试跑</strong>:探索阶段模型只提交步骤、不调用 <code>ui_test_verify</code>;试跑由你在右下「试跑」里发起,失败才会带着日志让模型修步骤。</li>
|
|
963
|
+
<li><strong>先出计划、再探索</strong>:需求框高度可拖(输入框下方的小把手,72–420px,按空间记住)。输入需求点左边的「生成步骤」,模型只做测试设计,产出一份「动作 + 目标描述」的计划(不含定位器),可以手动上移 / 下移 / 删除 / 新增 / 改描述(改动 400ms 防抖保存)。<strong>没有步骤时「开始探索」不可点</strong>,避免模型跳过计划直接乱点。</li>
|
|
964
|
+
<li><strong>探索时才绑定定位器</strong>:模型真的开一个浏览器把流程点一遍(默认有头,可以围观;也可以切无头),按无障碍快照里的临时 <code>ref</code> 操作,每步用 <code>locator_probe</code> 把 <code>ref</code> 换成定位器并校验「唯一 + 指的就是刚才点的元素」,带 <code>stepId</code> 时结果直接回填到左侧对应步骤(状态变「已绑定」并显示 <code>role=button name="登录"</code> 这样的摘要;没绑上会写原因)。随后由同一份步骤 JSON 渲染 TS(<code>@playwright/test</code>)或 pytest(<code>playwright.sync_api</code>)脚本,两种语言共用步骤,换语言只重新出码、不重跑模型。</li>
|
|
965
|
+
<li>定位器优先级按官方建议:<code>data-testid</code> → <code>getByRole</code> → <code>getByLabel</code> / <code>getByPlaceholder</code> → <code>getByText</code> → 稳定属性 → 短 CSS;只能靠长 CSS 或第 N 个同名元素时提示「低置信度」,不承诺全自动自愈。</li>
|
|
966
|
+
<li>账号等敏感值写成 <code>${ENV_NAME}</code>,出码变成 <code>process.env.NAME</code> / <code>os.environ.get("NAME")</code>,不会把凭据写进脚本;活动日志里填写 / 选择的值会打码,只保留 <code>${ENV}</code> 占位。</li>
|
|
967
|
+
<li><strong>生成会话</strong>:需求、步骤计划、定位器绑定、试跑记录与每步截图只对本机有意义,存在本机缓存 <code>.lantern/local/uiauto/sessions/</code>(不进 <code>自动化测试/</code> 内容目录,也不随空间同步);旧版本留在 <code>自动化测试/sessions/</code> 的会话会在插件启动后自动搬过来。</li>
|
|
968
|
+
<li><strong>草稿工作区</strong>:试跑写在项目内 <code>.lantern-ai/<会话>/</code>(目录自带 <code>.gitignore</code>,内容为 <code>*</code>),结构是 <code>playwright.config.ts</code>(继承项目配置,只把 <code>testDir</code> 指向 <code>./draft</code>)、<code>draft/<标题>.spec.ts</code>、<code>results/</code>。<strong>跑完不删</strong>:失败现场可以「打开草稿」「打开目录」、看 trace,也可以「调试运行」(<code>--headed --trace=on</code>)或「Playwright UI」(长驻进程,面板里给地址,可「结束 UI」;离开页面 / 服务退出会自动结束)。「清理草稿」手动清,超过 7 天的草稿在下次建会话时顺手清掉。</li>
|
|
969
|
+
<li>流程分三步、不自动串起来:<strong>生成步骤 → 开始探索 → 生成代码 → 试跑</strong>。探索只负责在浏览器里把流程点一遍并产出步骤;结束后按步骤出码(左栏「生成代码」可手动重出),<strong>不会自动试跑</strong>。试跑是右下「试跑」子 Tab 里的动作:失败时让模型只改步骤(定位器 / 等待 / 断言),最多 3 轮;没配模型就只跑一次、保留日志。页面行为本身不符合需求时保留失败并提示疑似缺陷,不会为了跑绿改断言。右下「试跑」子 Tab 显示状态、耗时、草稿 / trace 路径与上述调试按钮。</li>
|
|
970
|
+
<li>确认路径后再「写入项目」:一条用例会同时产出<strong>整组文件</strong>——主用例(spec)、按页面拆出的 page object(<code>tests/pages/<Page>.ts</code> / <code>tests/pages/<page>_page.py</code>)、项目有登录态时再加一个 <code>tests/fixtures/auth-state.ts</code> 常量文件。右上「代码」Tab 左侧是文件清单(标出「用例 / 页面 / 登录态」),右侧预览与可编辑的写入路径,左下按钮明确写「写入 N 个文件」;路径都在项目目录内、写入前整批预检。<strong>目标文件已存在时默认合并,不整文件覆盖</strong>:spec 只在原有文件末尾追加这个新用例(缺的 <code>import</code> 补到 import 区,<code>test.use</code> / <code>BASE_URL</code> 不重复),page object 只在类里补缺失的方法,登录态文件已有 <code>STORAGE_STATE</code> 就不动;合并写不进去(例如文件名撞上别的类)才按冲突处理,整批不写,此时勾选「整文件覆盖」再重试。写盘中途失败会按 before 回滚已写过的文件,不留半套。写入时记录 before / after,右上「变更」Tab 立刻出精确到行的 diff(新增绿 / 删除红 / 3 行上下文,追加的条目标「追加」),并能「打开文件」「打开目录」;下面还有一段只读的「项目工作区其它改动」(<code>git status</code>,过滤 <code>node_modules</code> / <code>.lantern-ai</code> 等噪音)。</li>
|
|
971
|
+
<li>写入后点「<strong>按项目配置验收</strong>」:用项目自己的 Playwright / pytest 命令跑正式文件(不再走草稿配置)。若文件被项目 <code>testMatch</code> 排除,会明确提示「没被项目配置识别为用例」,而不是笼统判失败。</li>
|
|
972
|
+
<li><strong>提示词</strong>:打开「自动化测试」开关时,会往当前空间的 <code>提示词管理/Playwright提示词.md</code> 写一份种子。这份文件分「规划阶段 / 探索阶段 / 生成代码」三段:前两段分别用于「生成步骤」和「开始探索」,第三段约束出码要跟随项目原有的目录结构、语法风格与代码规范(复用已有 page object / fixture,按项目 formatter 与命名来,已有文件只追加不重排);支持占位符 <code>{{project}}</code> / <code>{{dir}}</code> / <code>{{language}}</code> / <code>{{plan}}</code>。顶栏项目下拉<strong>左边</strong>是一个固定宽度的提示词框:只显示当前项目挂载的那份文件名,超出省略号、悬停弹气泡显示全名,<strong>不做下拉、旁边也没有添加按钮</strong>;点它就打开「挂载提示词」弹窗——只列出<strong>能用来生成的</strong>提示词(自动化测试自己那份 + 用户在提示词管理里自己建的 <code>.md</code>,工作汇报 / 默认提示词这类别的用途不显示),选一份点「挂载」即挂到当前项目并存盘,<strong>挂上即被引用</strong>——提示词管理里立刻标「引用中」。弹窗里没有「跟随插件默认」,也没有新建入口;要新建提示词去「提示词管理 / 工作台」建,回到本页就能选到。<strong>项目没挂提示词时页面会被拦住</strong>:自动弹出「先挂载提示词」,没有取消按钮、点遮罩也关不掉,必须选一份挂上才能继续用(列表里一份提示词都没有时不做拦截,避免选无可选)。挂载结果<strong>按项目保存、一个项目只挂一份</strong>:Playwright 项目和 pytest 项目可以各挂各的,换项目自动带出上次选的那份;在弹窗里换一份就替换掉原来那份,<strong>上一份立刻取消引用</strong>(提示词管理里不再标「引用中」,也恢复可删 / 可改名);项目里存的那份被删 / 改名时,同样按「未挂载」拦截,重新挂一份即可。</li>
|
|
973
|
+
<li><strong>新增提示词</strong>:在「提示词管理」或工作台里新建 / 编辑(<code>提示词管理</code> 支持直接复制一份再用改名按钮改成想要的名字),回到本页(切走再切回或刷新)就能在挂载弹窗里选到;自动化测试页不再内置新建入口。</li>
|
|
974
|
+
<li><strong>平台约定</strong>:提示词一律以「提示词管理」里的文件为准,代码里写死的只是几行极简兜底。点「生成步骤」/「开始探索」前读不到提示词(文件不存在,或没有可用的规划 / 探索段)时,会弹错误 toast 并停下,不会悄悄用兜底文案顶上。<strong>升级规则</strong>:你改过的内容一个字都不动;没改过的种子(内容与上次插件写入一致)会跟着插件内置模板自动升级,不留旧文案;老版本留下的种子第一次见到只登记指纹、不覆盖。插件开启期间这份文件不可删除 / 改名,关掉插件后可以删,再打开会重新生成种子。种子指纹记在 <code>.lantern/local/plugin-prompts.json</code>。</li>
|
|
975
|
+
<li>项目里已有 <code>auth-admin.json</code> / <code>auth-user.json</code> 会自动当登录态复用(填 <code>-</code> 表示不用)。需要验证码 / 2FA 时点「手动登录」:模型会在下一个工具调用前停住,你在已经弹出的浏览器窗口里把登录做完,再点「我已登录,继续」放行;这个按钮只在探索阶段、有头浏览器时出现(规划阶段没有浏览器窗口,不显示)。</li>
|
|
976
|
+
<li>重新点「生成步骤」或「开始探索」等于开新一轮:服务端会清掉上一轮的步骤 IR、试跑结果与活动日志,代码页 / 试跑面板同步清空,不会把上一条用例的脚本当成这次的产出。探索活动会跟着会话存下来,切走的 Tab 再回来、刷新页面都还能看到上一轮的过程。</li>
|
|
977
|
+
<li>步骤计划里只写测试动作(打开页面 / 点击 / 填写 / 断言 / 等待等),<strong>不会有「截图」步骤</strong>:截图只是探索时给你看的过程记录,不会进脚本。</li>
|
|
978
|
+
<li>依赖项目自己装好的 Playwright(或 pytest-playwright),Harness 不额外下载浏览器;草稿放在被挂载项目的 <code>.lantern-ai/</code>。</li>
|
|
979
|
+
</ul>
|
|
980
|
+
</li>
|
|
981
|
+
<li>数据按项目分目录:<code>自动化测试/自动化测试.json</code> 记项目与运行历史,每个项目的报告 / 结果 / 原始日志各在自己的目录里(<code>自动化测试/<项目名>/报告/</code>、<code>结果/</code>、<code>日志/</code>),同名项目会自动加后缀;切换空间各用各的。</li>
|
|
982
|
+
<li>旧版本的 <code>UI自动化/</code> 目录与平铺的 <code>报告/ 结果/ 日志/</code> 在首次读取时自动改名 / 搬迁到新结构,不需要重新打开插件开关,历史报告链接也不会失效。老数据没有框架字段时按 Playwright 处理。</li>
|
|
983
|
+
<li>首次运行前请先在项目目录装好依赖 / 解释器:插件<strong>不自动</strong> <code>npm install</code> / <code>playwright install</code> / <code>pip install</code> / <code>mvn</code>,环境未就绪时卡片上会直接给提示。</li>
|
|
705
984
|
</ul>
|
|
706
985
|
<h3>仪表盘</h3>
|
|
707
986
|
<p>「我的插件」→「仪表盘」→「仪表盘」开启后,侧栏出现「仪表盘」入口(<code>/dashboard/</code>;新空间默认在最前面,已有空间按已保存的菜单顺序追加,可在侧栏拖动调整)。</p>
|
|
@@ -796,7 +1075,7 @@ version: '1.0' # 可选
|
|
|
796
1075
|
<p>工作区默认是<strong>当前空间目录</strong>。插件开发会把工作区切到 harness 源码根(<code>pnpm dev</code> 时即仓库根):这是唯一允许把「空间上级目录」设为工作区的例外,且只临时占用、不会出现在「工作区」列表里;其它上级目录仍会被拒绝。读不到仓库源码时,先确认是否落在「工作区内修改」及以上。</p>
|
|
797
1076
|
</blockquote>
|
|
798
1077
|
<p>本地工具(需本地服务):文件读写与 <code>glob</code> / <code>grep</code> 搜索、<code>bash</code> / PowerShell(含持久会话与后台任务)、网页搜索与抓取、Office 转 PDF(需本机 LibreOffice)、<code>present</code> 交付清单、超大结果落盘(spill)、按需加载工作区 Skill;另外会自动加载工作区 <code>AGENTS.md</code> / <code>CLAUDE.md</code> 并注入当前时间。</p>
|
|
799
|
-
</div></article></div></div></main></div><script>
|
|
1078
|
+
</div></article></div></div></main><astro-island uid="1ae4mb" component-url="/_astro/Toast.R8_2OWRX.js" component-export="GlobalToastHost" renderer-url="/_astro/client.BHNTqLjv.js" props="{"data-astro-transition-persist":[0,"astro-34g7cspi-4"]}" ssr client="only" opts="{"name":"GlobalToastHost","value":"react"}" data-astro-transition-persist="astro-34g7cspi-4"></astro-island></div><script>
|
|
800
1079
|
(function () {
|
|
801
1080
|
/**
|
|
802
1081
|
* 切页滚回顶部。
|