lantern-harness 0.1.2 → 0.1.4
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 +106 -0
- package/README.md +9 -9
- package/builtin/session/lh-nav-groups.mjs +106 -9
- package/builtin/session/lh-spaces.mjs +102 -0
- package/cli/data-root.mjs +110 -3
- package/cli/lantern.mjs +36 -7
- package/cli/server.mjs +8 -0
- package/cli/spaces.mjs +91 -5
- package/config/app.defaults.json +7 -2
- package/dist/500.html +19 -5
- package/dist/_astro/Base.C_AmDbI9.css +1 -0
- package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.lxEwQ1R4.js → Base.astro_astro_type_script_index_0_lang.-g0SuFCa.js} +1 -1
- package/dist/_astro/CaseExecBoard.CNZh0sre.js +1 -0
- package/dist/_astro/CaseGenerateApp.BQalnGiC.js +9 -0
- package/dist/_astro/CasesLibrary.u7ek8rOp.js +1 -0
- package/dist/_astro/ChatApp.Dk5uOXr0.js +273 -0
- package/dist/_astro/ColumnResize.Bs6GL3DJ.js +1 -0
- package/dist/_astro/ConfirmDialog.Dbyjb4-6.js +1 -0
- package/dist/_astro/DatePicker.CMfX7F6z.js +1 -0
- package/dist/_astro/DocsFileBrowser.CHVgH1vj.js +1 -0
- package/dist/_astro/DocsPager.DaiWchhj.js +1 -0
- package/dist/_astro/DrawerField.KANqQwFl.js +1 -0
- package/dist/_astro/KnowledgeLibrary.DSxgeW4L.js +1 -0
- package/dist/_astro/NamePromptDialog.DZSZ5Y16.js +1 -0
- package/dist/_astro/NavLibraries.BN5smOBt.js +1 -0
- package/dist/_astro/PluginsPage.BB18crT3.js +1 -0
- package/dist/_astro/PluginsPage.Oh8hWup8.js +39 -0
- package/dist/_astro/PromptsLibrary.DWgox1du.js +1 -0
- package/dist/_astro/ReportsPage.BlHA_AtE.js +1 -0
- package/dist/_astro/RequirementsLibrary.2o-KMk7K.js +1 -0
- package/dist/_astro/SearchableSelect.BMl1Bp59.js +1 -0
- package/dist/_astro/SelectDropdown.flhHcwyd.js +1 -0
- package/dist/_astro/SettingsDialog.Cs8z0Hhb.js +1 -0
- package/dist/_astro/SpaceSwitcher.DicPqrSH.js +7 -0
- package/dist/_astro/TagSelect.u8DTop7v.js +1 -0
- package/dist/_astro/TasksBoard.dgJxOpVG.js +1 -0
- package/dist/_astro/TemplatesLibrary.BfC9HIuu.js +1 -0
- package/dist/_astro/TestStatsBoard.Dg23e0O_.js +1 -0
- package/dist/_astro/TodosBoard.CyvTZybr.js +1 -0
- package/dist/_astro/active-element-history.CeefGkFQ.js +1 -0
- package/dist/_astro/app-config.Crg0VdkS.js +1 -0
- package/dist/_astro/case-exec.HjGrOY_O.js +1 -0
- package/dist/_astro/doc-roots.DAJP9Svr.js +1 -0
- package/dist/_astro/i18n.C8FKLrB5.js +7 -0
- package/dist/_astro/listbox.Di-t5U37.js +1 -0
- package/dist/_astro/menu.Bkluqxic.js +1 -0
- package/dist/_astro/{open-docs-in-session.D3JCwMWB.js → open-docs-in-session.BC5D-BoF.js} +1 -1
- package/dist/_astro/plugins.CNOYmeAe.js +1 -0
- package/dist/_astro/portal.Cm9XlIPf.js +5 -0
- package/dist/_astro/project-docs.Cd2gKPKh.js +1 -0
- package/dist/_astro/report-prompt.Cmw4XzfY.js +1 -0
- package/dist/_astro/{settings.BoQ0e0m1.js → settings.DBIYsQY-.js} +2 -2
- package/dist/_astro/tasks.WhfT-DnC.js +1 -0
- package/dist/_astro/test-stats.BIHEJz5c.js +1 -0
- package/dist/_astro/use-text-value.BuY0Cm1z.js +1 -0
- package/dist/_astro/use-tree-walker.CfTHFX43.js +1 -0
- package/dist/_astro/useListAnim.CpGB1cft.js +1 -0
- package/dist/_astro/view-prefs.C9Mtta1E.js +1 -0
- package/dist/case-exec/index.html +263 -0
- package/dist/cases/generate/index.html +20 -6
- package/dist/cases/library/index.html +20 -6
- package/dist/docs/changelog/index.html +121 -6
- package/dist/docs/install/index.html +35 -11
- package/dist/docs/manual/index.html +149 -14
- package/dist/index.html +20 -6
- package/dist/knowledge/index.html +20 -6
- 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 +19 -5
- package/dist/plugins/index.html +20 -6
- package/dist/prompts/index.html +20 -6
- package/dist/reports/index.html +263 -0
- package/dist/requirements/index.html +20 -6
- package/dist/tasks/index.html +263 -0
- package/dist/templates/index.html +20 -6
- 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 +19 -5
- 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 +19 -5
- 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 +19 -5
- 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 +19 -5
- 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 +19 -5
- package/dist/test-stats/index.html +263 -0
- package/dist/todos/index.html +263 -0
- package/docs//345/205/250/345/261/200/346/217/222/344/273/266.md +2 -2
- package/docs//345/256/211/350/243/205/346/211/213/345/206/214.md +13 -11
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +125 -26
- package/lh-plugins/lh-project-docs.mjs +3 -1
- package/lh-plugins/lh-reports.mjs +413 -0
- package/lh-plugins/lh-stats.mjs +409 -0
- package/lh-plugins/lh-tasks.mjs +224 -0
- package/lh-plugins/lh-todos.mjs +295 -0
- package/lh-plugins/lh-work-store.mjs +81 -0
- package/lh-plugins/storage-domain.mjs +54 -3
- package/package.json +2 -1
- package/config/seeds//346/217/220/347/244/272/350/257/215/347/256/241/347/220/206//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/217/220/347/244/272/350/257/215v1.0.md +0 -155
- package/dist/_astro/Base.B9f_iFAZ.css +0 -1
- package/dist/_astro/CaseGenerateApp.Br4uKjun.js +0 -9
- package/dist/_astro/CasesLibrary.CpPoVQ4P.js +0 -1
- package/dist/_astro/ChatApp.CYSPlSNP.js +0 -258
- package/dist/_astro/ConfirmDialog.BYz4HREM.js +0 -1
- package/dist/_astro/DocsFileBrowser.DkE26UTR.js +0 -1
- package/dist/_astro/KnowledgeLibrary.DZinlAWn.js +0 -1
- package/dist/_astro/NamePromptDialog.DGBlDH_k.js +0 -1
- package/dist/_astro/NavLibraries.EayBsg5g.js +0 -1
- package/dist/_astro/PluginsPage.BNzpPg2H.js +0 -39
- package/dist/_astro/PluginsPage.CY61glLU.js +0 -1
- package/dist/_astro/PromptsLibrary.DfrrCjs7.js +0 -1
- package/dist/_astro/RequirementsLibrary.Dt0Gj6Nr.js +0 -1
- package/dist/_astro/SearchableSelect.DMS2XmXc.js +0 -1
- package/dist/_astro/SelectDropdown.Dc7QaPbH.js +0 -1
- package/dist/_astro/SettingsDialog.DC0e7580.js +0 -1
- package/dist/_astro/SpaceSwitcher.Yy2w8MDF.js +0 -7
- package/dist/_astro/TemplatesLibrary.uK-SjK1z.js +0 -1
- package/dist/_astro/app-config.CpjKWnzM.js +0 -1
- package/dist/_astro/i18n.BVvhz-vw.js +0 -7
- package/dist/_astro/listbox.DdDDDJ5Z.js +0 -1
- package/dist/_astro/menu.CqkL87bV.js +0 -1
- package/dist/_astro/plugins.CrpY8UI9.js +0 -1
- package/dist/_astro/portal.C3KrUREL.js +0 -5
- package/dist/_astro/use-text-value.C0IDspmh.js +0 -1
- package/dist/_astro/use-tree-walker.oRTnhHS-.js +0 -1
- package/dist/_astro/useListAnim.CnbC_9MC.js +0 -1
package/cli/lantern.mjs
CHANGED
|
@@ -146,8 +146,8 @@ function printHelp() {
|
|
|
146
146
|
lantern help 显示本帮助
|
|
147
147
|
lantern version 显示当前版本号
|
|
148
148
|
lantern list 显示可用版本列表
|
|
149
|
-
lantern update
|
|
150
|
-
lantern update <版本>
|
|
149
|
+
lantern update 更新到最新版本(自动重启在跑的服务)
|
|
150
|
+
lantern update <版本> 更新到指定版本(自动重启在跑的服务)
|
|
151
151
|
lantern uninstall 卸载本机 lantern(保留数据空间)
|
|
152
152
|
lantern wipe 删除当前数据空间(需确认)
|
|
153
153
|
|
|
@@ -273,7 +273,7 @@ async function runForegroundServer(dataRoot) {
|
|
|
273
273
|
process.on('SIGINT', shutdown);
|
|
274
274
|
process.on('SIGTERM', shutdown);
|
|
275
275
|
console.log('');
|
|
276
|
-
console.log(
|
|
276
|
+
console.log(`Lantern Harness v${readPkgVersion()} 已启动`);
|
|
277
277
|
console.log(` 地址:${url}`);
|
|
278
278
|
console.log(` 当前空间:${root}`);
|
|
279
279
|
console.log(' 按 Ctrl+C 停止');
|
|
@@ -317,18 +317,19 @@ function cmdStart({ foreground = false, dir = null } = {}) {
|
|
|
317
317
|
const state = getAliveRun();
|
|
318
318
|
if (state) {
|
|
319
319
|
console.log('');
|
|
320
|
-
console.log(
|
|
320
|
+
console.log(`Lantern Harness v${readPkgVersion()} 已在后台启动`);
|
|
321
321
|
console.log(` 地址:${state.url}`);
|
|
322
322
|
console.log(` 当前空间:${state.dataRoot}`);
|
|
323
|
-
console.log(` 日志:${logPath}`);
|
|
324
323
|
console.log(' 停止:lantern stop');
|
|
324
|
+
console.log(' 更新:lantern update');
|
|
325
|
+
console.log(' 更多命令:lantern help');
|
|
325
326
|
console.log('');
|
|
326
327
|
return;
|
|
327
328
|
}
|
|
328
329
|
}
|
|
329
330
|
const state = getAliveRun();
|
|
330
331
|
if (state) {
|
|
331
|
-
console.log(`Lantern Harness 已启动:${state.url}`);
|
|
332
|
+
console.log(`Lantern Harness v${readPkgVersion()} 已启动:${state.url}`);
|
|
332
333
|
return;
|
|
333
334
|
}
|
|
334
335
|
console.error('启动超时或失败,请查看日志:');
|
|
@@ -523,11 +524,39 @@ function cmdUpdate(version) {
|
|
|
523
524
|
const pm = getPackageManager();
|
|
524
525
|
const spec = version ? `${PKG_NAME}@${version}` : `${PKG_NAME}@latest`;
|
|
525
526
|
console.log(version ? `正在更新到 ${spec} …` : `正在更新到最新版本(${spec})…`);
|
|
527
|
+
|
|
528
|
+
// 更新前先停掉后台服务:
|
|
529
|
+
// 1) 进程里跑的是旧代码 + 旧 dist,不停就算装完了页面也还是旧版本;
|
|
530
|
+
// 2) Windows 上文件被运行中的进程占用时,全局安装替换目录可能直接失败。
|
|
531
|
+
const running = getAliveRun();
|
|
532
|
+
if (running) {
|
|
533
|
+
console.log(`正在停止后台服务(pid ${running.pid})…`);
|
|
534
|
+
cmdStop();
|
|
535
|
+
}
|
|
536
|
+
|
|
526
537
|
const r = spawnSync(pm, pmGlobalArgs(pm, 'install', spec), {
|
|
527
538
|
stdio: 'inherit',
|
|
528
539
|
shell: process.platform === 'win32',
|
|
529
540
|
});
|
|
530
|
-
|
|
541
|
+
const code = r.status === null ? 1 : r.status;
|
|
542
|
+
if (code !== 0) {
|
|
543
|
+
console.error('更新失败。');
|
|
544
|
+
if (running) {
|
|
545
|
+
console.log('正在用更新前的版本恢复启动 …');
|
|
546
|
+
cmdStart({ foreground: false });
|
|
547
|
+
}
|
|
548
|
+
process.exit(code);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
const next = readPkgVersion();
|
|
552
|
+
if (!running) {
|
|
553
|
+
console.log('');
|
|
554
|
+
console.log(`已更新到 ${next},下次 lantern web 会使用新版本。`);
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
console.log(`已更新到 ${next},正在后台重启 …`);
|
|
559
|
+
cmdStart({ foreground: false });
|
|
531
560
|
}
|
|
532
561
|
|
|
533
562
|
// ── 数据空间(多空间数据隔离)────────────────────────────────
|
package/cli/server.mjs
CHANGED
|
@@ -16,6 +16,10 @@ import { lhSpillPlugin } from '../builtin/session/lh-spill.mjs';
|
|
|
16
16
|
import { lhKbPlugin } from '../lh-plugins/lh-kb.mjs';
|
|
17
17
|
import { lhMemoryPlugin } from '../lh-plugins/lh-memory.mjs';
|
|
18
18
|
import { lhResourcesPlugin } from '../lh-plugins/lh-resources.mjs';
|
|
19
|
+
import { lhTodosPlugin } from '../lh-plugins/lh-todos.mjs';
|
|
20
|
+
import { lhTasksPlugin } from '../lh-plugins/lh-tasks.mjs';
|
|
21
|
+
import { lhReportsPlugin } from '../lh-plugins/lh-reports.mjs';
|
|
22
|
+
import { lhStatsPlugin } from '../lh-plugins/lh-stats.mjs';
|
|
19
23
|
import { lhWebPlugin } from '../builtin/session/lh-web.mjs';
|
|
20
24
|
import { tbSessionRunsPlugin } from '../builtin/session/session-runs.mjs';
|
|
21
25
|
import { lhSpacesPlugin } from '../builtin/session/lh-spaces.mjs';
|
|
@@ -48,6 +52,10 @@ function attachPlugins(app, dataRoot) {
|
|
|
48
52
|
const plugins = [
|
|
49
53
|
tbSessionRunsPlugin(),
|
|
50
54
|
lhSpacesPlugin(),
|
|
55
|
+
lhTodosPlugin(),
|
|
56
|
+
lhTasksPlugin(),
|
|
57
|
+
lhReportsPlugin(),
|
|
58
|
+
lhStatsPlugin(),
|
|
51
59
|
lhNavGroupsPlugin(),
|
|
52
60
|
lhConfigPlugin(),
|
|
53
61
|
lhResourcesPlugin(),
|
package/cli/spaces.mjs
CHANGED
|
@@ -791,6 +791,10 @@ export function copySpace(id, nextName, baseRoot) {
|
|
|
791
791
|
return { ok: false, error: `复制失败:${e instanceof Error ? e.message : String(e)}` };
|
|
792
792
|
}
|
|
793
793
|
|
|
794
|
+
// 复制品里的工作区注册表还指着源空间的绝对路径,必须改指新目录,
|
|
795
|
+
// 否则新空间打开时「工作区」停在被复制的那个空间上。
|
|
796
|
+
retargetCopiedWorkspaces(dir, resolved.space.path);
|
|
797
|
+
|
|
794
798
|
const entry = {
|
|
795
799
|
id: newSpaceId(),
|
|
796
800
|
name: clean.name,
|
|
@@ -809,6 +813,69 @@ export function copySpace(id, nextName, baseRoot) {
|
|
|
809
813
|
return { ok: true, space: entry };
|
|
810
814
|
}
|
|
811
815
|
|
|
816
|
+
/**
|
|
817
|
+
* 把复制品里的工作区注册表改指新目录。
|
|
818
|
+
*
|
|
819
|
+
* 源空间的 `workspaces.json` 记的是源目录的绝对路径(`active` 与 `ws_project` 条目);
|
|
820
|
+
* 直接拷过来后,源目录仍真实存在,`ensureWorkspaceRegistry` 的「父目录 / 不存在」清理都不会命中,
|
|
821
|
+
* 于是新空间的工作区停在源空间上。这里把指向源目录的条目改名到新目录,其余条目保持不动。
|
|
822
|
+
*/
|
|
823
|
+
function retargetCopiedWorkspaces(newDir, sourceDir) {
|
|
824
|
+
const fp = path.join(newDir, LOCAL_REL, 'workspaces.json');
|
|
825
|
+
const target = path.resolve(newDir);
|
|
826
|
+
const source = path.resolve(sourceDir);
|
|
827
|
+
const folderName = (abs) => path.basename(abs) || abs;
|
|
828
|
+
let raw;
|
|
829
|
+
try {
|
|
830
|
+
raw = JSON.parse(fs.readFileSync(fp, 'utf8'));
|
|
831
|
+
} catch {
|
|
832
|
+
// 源空间没有工作区注册表(或已损坏):不补,首次打开会按空间根自建
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
if (!raw || typeof raw !== 'object') return;
|
|
836
|
+
|
|
837
|
+
const items = (Array.isArray(raw.items) ? raw.items : []).map((it) => {
|
|
838
|
+
const p = String(it?.path ?? '');
|
|
839
|
+
if (!p || path.resolve(p) !== source) return it;
|
|
840
|
+
return {
|
|
841
|
+
...it,
|
|
842
|
+
id: 'ws_project',
|
|
843
|
+
path: target,
|
|
844
|
+
name: folderName(target),
|
|
845
|
+
addedAt: Number(it?.addedAt) || 0,
|
|
846
|
+
};
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
// 复制品必须有自己的根工作区(源注册表里没有源目录条目时补一条)
|
|
850
|
+
if (!items.some((it) => path.resolve(String(it?.path ?? '')) === target)) {
|
|
851
|
+
items.unshift({ id: 'ws_project', path: target, name: folderName(target), addedAt: 0 });
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
const activeRaw = String(raw.active ?? '');
|
|
855
|
+
const active =
|
|
856
|
+
!activeRaw || path.resolve(activeRaw) === source ? target : path.resolve(activeRaw);
|
|
857
|
+
|
|
858
|
+
try {
|
|
859
|
+
fs.writeFileSync(
|
|
860
|
+
fp,
|
|
861
|
+
`${JSON.stringify(
|
|
862
|
+
{
|
|
863
|
+
active,
|
|
864
|
+
// 插件开发借用包根是临时态,不跟着复制
|
|
865
|
+
activeHarness: false,
|
|
866
|
+
items,
|
|
867
|
+
updatedAt: Date.now(),
|
|
868
|
+
},
|
|
869
|
+
null,
|
|
870
|
+
2,
|
|
871
|
+
)}\n`,
|
|
872
|
+
'utf8',
|
|
873
|
+
);
|
|
874
|
+
} catch {
|
|
875
|
+
// 写不进去不影响空间可用性,下次打开会按空间根自愈
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
812
879
|
/**
|
|
813
880
|
* 从列表移除空间。
|
|
814
881
|
* @param {{ id: string, purge?: boolean, baseRoot: string }} opts purge=true 时连磁盘数据一起删
|
|
@@ -830,8 +897,11 @@ export function removeSpace({ id, purge = false, baseRoot }) {
|
|
|
830
897
|
if (!purge) return { ok: true, purged: false, space };
|
|
831
898
|
|
|
832
899
|
// 用户手工纳入的外部文件夹:没有空间元数据就不是我们铺的目录,
|
|
833
|
-
//
|
|
834
|
-
|
|
900
|
+
// 只移出列表,绝不代删(那可能是他自己的资料文件夹)。
|
|
901
|
+
// 例外:目录里已经有 `.lantern` 元数据(会话 / 配置 / 记忆),说明确实被本应用
|
|
902
|
+
// 当成数据空间用过——用户点「删除数据」后还留着空壳只会让人以为没删掉。
|
|
903
|
+
const hasLanternMeta = fs.existsSync(spaceMetaDir(space.path));
|
|
904
|
+
if (space.external && !resolveManifestPath(space.path) && !hasLanternMeta) {
|
|
835
905
|
return {
|
|
836
906
|
ok: true,
|
|
837
907
|
purged: false,
|
|
@@ -917,8 +987,21 @@ export function forgetRegistryRoot(root) {
|
|
|
917
987
|
*/
|
|
918
988
|
const COPY_SKIP_DIRS = new Set(['node_modules', '.git', '.astro', 'dist']);
|
|
919
989
|
|
|
920
|
-
/**
|
|
921
|
-
|
|
990
|
+
/**
|
|
991
|
+
* 复制空间时额外跳过的「派生缓存」(相对空间根,posix 路径)。
|
|
992
|
+
*
|
|
993
|
+
* 这些都能从源数据重建,且复制时若正好被服务进程写着,拷过来只可能是半份 / 不一致的:
|
|
994
|
+
* 会话检索索引用 sqlite(可能带 WAL / shm),spill 只是工具结果的溢出缓存。
|
|
995
|
+
*/
|
|
996
|
+
const COPY_SKIP_LOCAL_FILES = new Set([
|
|
997
|
+
`${LOCAL_REL}/session-query.sqlite`,
|
|
998
|
+
`${LOCAL_REL}/session-query.sqlite-wal`,
|
|
999
|
+
`${LOCAL_REL}/session-query.sqlite-shm`,
|
|
1000
|
+
]);
|
|
1001
|
+
const COPY_SKIP_LOCAL_DIRS = new Set([`${LOCAL_REL}/spill`]);
|
|
1002
|
+
|
|
1003
|
+
/** 递归复制目录(跳过 .DS_Store、构建/版本控制目录与派生缓存,保留符号链接本身而非解引用) */
|
|
1004
|
+
export function copyDirSync(from, to, rel = '') {
|
|
922
1005
|
const src = path.resolve(from);
|
|
923
1006
|
const dest = path.resolve(to);
|
|
924
1007
|
|
|
@@ -931,14 +1014,17 @@ export function copyDirSync(from, to) {
|
|
|
931
1014
|
for (const ent of fs.readdirSync(src, { withFileTypes: true })) {
|
|
932
1015
|
if (ent.name === '.DS_Store') continue;
|
|
933
1016
|
if (ent.isDirectory() && COPY_SKIP_DIRS.has(ent.name)) continue;
|
|
1017
|
+
const nextRel = rel ? `${rel}/${ent.name}` : ent.name;
|
|
934
1018
|
const s = path.join(src, ent.name);
|
|
935
1019
|
const d = path.join(dest, ent.name);
|
|
936
1020
|
if (ent.isSymbolicLink()) {
|
|
937
1021
|
const link = fs.readlinkSync(s);
|
|
938
1022
|
fs.symlinkSync(link, d);
|
|
939
1023
|
} else if (ent.isDirectory()) {
|
|
940
|
-
|
|
1024
|
+
if (COPY_SKIP_LOCAL_DIRS.has(nextRel)) continue;
|
|
1025
|
+
copyDirSync(s, d, nextRel);
|
|
941
1026
|
} else {
|
|
1027
|
+
if (COPY_SKIP_LOCAL_FILES.has(nextRel)) continue;
|
|
942
1028
|
fs.copyFileSync(s, d);
|
|
943
1029
|
}
|
|
944
1030
|
}
|
package/config/app.defaults.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"plugins": {
|
|
17
17
|
"cases": false,
|
|
18
18
|
"caseGen": false,
|
|
19
|
-
"prompts":
|
|
19
|
+
"prompts": true,
|
|
20
20
|
"promptGen": false,
|
|
21
21
|
"knowledgeLib": false,
|
|
22
22
|
"knowledgeGen": false,
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
"templates": false,
|
|
25
25
|
"knowledge": false,
|
|
26
26
|
"memory": false,
|
|
27
|
-
"pluginDev": false
|
|
27
|
+
"pluginDev": false,
|
|
28
|
+
"todos": false,
|
|
29
|
+
"tasks": false,
|
|
30
|
+
"reports": false,
|
|
31
|
+
"testStats": false,
|
|
32
|
+
"caseExec": false
|
|
28
33
|
}
|
|
29
34
|
}
|
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.-g0SuFCa.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
|
var raw = localStorage.getItem('tw.app.config.v1');
|
|
@@ -42,7 +42,12 @@
|
|
|
42
42
|
var savedCfg = JSON.parse(cfgRaw) || {};
|
|
43
43
|
var plugins = savedCfg.plugins || {};
|
|
44
44
|
if (plugins.cases === false) document.documentElement.dataset.pluginOffCases = '1';
|
|
45
|
-
if (plugins.
|
|
45
|
+
if (plugins.todos === false) document.documentElement.dataset.pluginOffTodos = '1';
|
|
46
|
+
if (plugins.tasks === false) document.documentElement.dataset.pluginOffTasks = '1';
|
|
47
|
+
if (plugins.reports !== true) document.documentElement.dataset.pluginOffReports = '1';
|
|
48
|
+
if (plugins.testStats !== true)
|
|
49
|
+
document.documentElement.dataset.pluginOffTestStats = '1';
|
|
50
|
+
if (plugins.caseExec !== true) document.documentElement.dataset.pluginOffCaseExec = '1';
|
|
46
51
|
if (plugins.knowledgeLib === false)
|
|
47
52
|
document.documentElement.dataset.pluginOffKnowledgeLib = '1';
|
|
48
53
|
if (plugins.requirements === false)
|
|
@@ -63,7 +68,7 @@
|
|
|
63
68
|
}
|
|
64
69
|
} catch (e) {}
|
|
65
70
|
})();
|
|
66
|
-
</script><link rel="stylesheet" href="/_astro/Base.
|
|
71
|
+
</script><link rel="stylesheet" href="/_astro/Base.C_AmDbI9.css"><style>.tw-error-page[data-astro-cid-qnkxrarz]{text-align:center;background:var(--tw-surface-page);flex-direction:column;justify-content:center;align-items:center;gap:.75rem;min-height:100vh;padding:2rem 1.25rem;display:flex}.tw-error-title[data-astro-cid-qnkxrarz]{color:var(--tw-label-primary);margin:0;font-size:1.25rem;font-weight:650}.tw-error-desc[data-astro-cid-qnkxrarz]{color:var(--tw-label-secondary);margin:0;font-size:.875rem;line-height:1.5}.tw-error-pre[data-astro-cid-qnkxrarz]{border:1px solid var(--tw-border);background:color-mix(in srgb, var(--tw-surface-panel,#fff) 90%, transparent);text-align:left;max-width:28rem;max-height:8rem;color:var(--tw-label-secondary);white-space:pre-wrap;word-break:break-word;border-radius:.5rem;margin:.25rem 0 0;padding:.65rem .85rem;font-size:.7rem;line-height:1.5;overflow:auto}.tw-error-actions[data-astro-cid-qnkxrarz]{flex-wrap:wrap;justify-content:center;align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.tw-error-btn[data-astro-cid-qnkxrarz]{cursor:pointer;border:1px solid #0000;border-radius:.5rem;justify-content:center;align-items:center;height:2.25rem;padding:0 1rem;font-size:.8125rem;font-weight:550;text-decoration:none;display:inline-flex}.tw-error-btn--primary[data-astro-cid-qnkxrarz]{color:#fff;background:#4176e6}.tw-error-btn--primary[data-astro-cid-qnkxrarz]:hover{background:#3565c7}.tw-error-btn--ghost[data-astro-cid-qnkxrarz]{color:var(--tw-label-secondary);border-color:var(--tw-border);background:0 0}.tw-error-btn--ghost[data-astro-cid-qnkxrarz]:hover{color:var(--tw-label-primary)}
|
|
67
72
|
</style><script type="module" src="/_astro/page.Bx2KSkeL.js"></script><style>[data-astro-transition-scope="astro-bbhp3f5g-3"] { view-transition-name: astro-bbhp3f5g-3; }@layer astro { ::view-transition-old(astro-bbhp3f5g-3) {
|
|
68
73
|
animation-duration: 180ms;
|
|
69
74
|
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
@@ -100,7 +105,7 @@
|
|
|
100
105
|
animation-duration: 180ms;
|
|
101
106
|
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
102
107
|
animation-fill-mode: both;
|
|
103
|
-
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"><span class="tw-nav-brand-mark" aria-hidden="true"><img class="tw-nav-brand-mark-img" src="/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.2">v0.1.2</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.Yy2w8MDF.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="/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="/prompts/" class="tw-nav-item" data-plugin-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="/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.EayBsg5g.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="/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.DC0e7580.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>
|
|
108
|
+
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"><span class="tw-nav-brand-mark" aria-hidden="true"><img class="tw-nav-brand-mark-img" src="/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.4">v0.1.4</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.DicPqrSH.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="/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="/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.BN5smOBt.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" 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.Cs8z0Hhb.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>
|
|
104
109
|
(function () {
|
|
105
110
|
var root = document.documentElement;
|
|
106
111
|
var btn = document.getElementById('tw-nav-toggle');
|
|
@@ -131,6 +136,11 @@
|
|
|
131
136
|
var en = {
|
|
132
137
|
'nav.brand': 'Lantern Harness',
|
|
133
138
|
'nav.home': 'My Workbench',
|
|
139
|
+
'nav.tasks': 'Tasks',
|
|
140
|
+
'nav.todos': 'Todos',
|
|
141
|
+
'nav.reports': 'Work Report',
|
|
142
|
+
'nav.testStats': 'Test Statistics',
|
|
143
|
+
'nav.caseExec': 'Case Execution',
|
|
134
144
|
'nav.caseManage': 'Test Cases',
|
|
135
145
|
'nav.prompts': 'Prompts',
|
|
136
146
|
'nav.knowledge': 'Knowledge Mgmt',
|
|
@@ -221,8 +231,12 @@
|
|
|
221
231
|
if (cur.dataset.spaceService) nextRoot.dataset.spaceService = cur.dataset.spaceService;
|
|
222
232
|
// 插件开关同理:不搬过去会先亮出被隐藏的侧栏入口,等 page-load 再收起
|
|
223
233
|
[
|
|
234
|
+
'pluginOffTasks',
|
|
235
|
+
'pluginOffTodos',
|
|
236
|
+
'pluginOffReports',
|
|
237
|
+
'pluginOffTestStats',
|
|
238
|
+
'pluginOffCaseExec',
|
|
224
239
|
'pluginOffCases',
|
|
225
|
-
'pluginOffPrompts',
|
|
226
240
|
'pluginOffKnowledgeLib',
|
|
227
241
|
'pluginOffRequirements',
|
|
228
242
|
'pluginOffTemplates',
|