diff --git a/demo/index.html b/demo/index.html
index b9b6a7b..9111fb3 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -119,6 +119,18 @@
.sidebar-section .skills-header {
background: #fdf8ff;
}
+ .sidebar-section .mission3-header {
+ background: #eef5fc;
+ }
+ .sidebar-section .mission3-header:hover {
+ background: #dfeaf6;
+ }
+ .sidebar-section .mission4-header {
+ background: #eef7f0;
+ }
+ .sidebar-section .mission4-header:hover {
+ background: #dceee2;
+ }
/* ── Section collapse (top-level toggle) ── */
.sidebar-section .sidebar-header {
cursor: pointer;
@@ -395,8 +407,8 @@
@@ -410,13 +422,13 @@
▶ 🤖 AGENT SKILLS
● 会话中
-
-
-
+
+
+
-
-
+
+
@@ -424,6 +436,44 @@
+
+
+
+
+
+
@@ -663,6 +713,309 @@ var SKILLS = [
];
+var MISSION3 = [
+ {
+ id: "m3-env",
+ icon: "🔧",
+ name: "测试环境准备",
+ commands: [
+ {
+ label: "设置 UTF-8 控制台编码",
+ engine: "powershell",
+ cmd: "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8\nWrite-Host \"当前控制台编码: $([Console]::OutputEncoding.WebName)\"\nWrite-Host \"(应为 utf-8,否则含中文 JSON 解析会失败)\""
+ },
+ {
+ label: "确认 gitlink-cli 版本",
+ engine: "powershell",
+ cmd: ".\\gitlink-cli.exe version"
+ },
+ {
+ label: "确认认证状态",
+ engine: "powershell",
+ cmd: ".\\gitlink-cli.exe auth status"
+ },
+ {
+ label: "确认 JSON 输出正常",
+ engine: "powershell",
+ cmd: ".\\gitlink-cli.exe issue +list --owner zzx-coder --repo test-repo --state open --limit 3 --format json | ConvertFrom-Json"
+ },
+ {
+ label: "加载公共库 common.psm1",
+ engine: "powershell",
+ cmd: "Import-Module \".\\workflows\\lib\\common.psm1\" -Force -WarningAction SilentlyContinue\nCheck-Auth"
+ },
+ {
+ label: "确认测试仓库可访问",
+ engine: "powershell",
+ cmd: ".\\gitlink-cli.exe repo +info --owner zzx-coder --repo test-repo --format json | ConvertFrom-Json"
+ }
+ ]
+ },
+ {
+ id: "m3-community",
+ icon: "🤝",
+ name: "社区运营自动化 (01-community-ops)",
+ commands: [
+ {
+ label: "基础只读模式验证 (DryRun)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\01-community-ops.ps1 -Owner zzx-coder -Repo test-repo -DryRun"
+ },
+ {
+ label: "查看命令行参数 (Help)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\01-community-ops.ps1 -Help"
+ },
+ {
+ label: "Issue 数据拉取验证",
+ engine: "powershell",
+ cmd: "# 拉取 open / closed Issue 与已合并 PR(来自测试 2.1.3)\n$openResult = .\\gitlink-cli.exe issue +list --owner zzx-coder --repo test-repo --state open --limit 100 --format json | ConvertFrom-Json\n$closedResult = .\\gitlink-cli.exe issue +list --owner zzx-coder --repo test-repo --state closed --limit 100 --format json | ConvertFrom-Json\n$prResult = .\\gitlink-cli.exe pr +list --owner zzx-coder --repo test-repo --state merged --limit 100 --format json | ConvertFrom-Json\n$prData = if ($prResult.data.issues) { @($prResult.data.issues) } else { @($prResult.data.pulls) }\nWrite-Host \"Open issues: $(@($openResult.data.issues).Count)\"\nWrite-Host \"Closed issues: $(@($closedResult.data.issues).Count)\"\nWrite-Host \"Merged PRs: $($prData.Count)\""
+ }
+ ]
+ },
+ {
+ id: "m3-gate",
+ icon: "🛡",
+ name: "代码质量看门人 (02-code-quality-gatekeeper)",
+ commands: [
+ {
+ label: "审查所有 open PR (DryRun)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\02-code-quality-gatekeeper.ps1 -Owner zzx-coder -Repo test-repo -DryRun"
+ },
+ {
+ label: "审查指定 PR #13 (DryRun)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\02-code-quality-gatekeeper.ps1 -Owner zzx-coder -Repo test-repo -PrId 13 -DryRun"
+ },
+ {
+ label: "自定义质量阈值 70 (DryRun)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\02-code-quality-gatekeeper.ps1 -Owner zzx-coder -Repo test-repo -Threshold 70 -DryRun"
+ },
+ {
+ label: "查看帮助信息 (Help)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\02-code-quality-gatekeeper.ps1 -Help"
+ }
+ ]
+ },
+ {
+ id: "m3-init",
+ icon: "🚀",
+ name: "项目一键初始化 (03-project-init)",
+ commands: [
+ {
+ label: "预览模式 (DryRun,推荐首选)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\03-project-init.ps1 -Owner zzx-coder -Name test-init-dryrun -Description \"自动化测试仓库\" -Lang go -DryRun"
+ },
+ {
+ label: "底层命令逐步骤验证 (只读安全)",
+ engine: "powershell",
+ cmd: "# 底层命令逐步骤验证(只读安全,来自测试 2.3.2)\nWrite-Host \"=== Step 1: List repos ===\" -ForegroundColor White\n$repoList = .\\gitlink-cli.exe repo +list --user zzx-coder --limit 5 --format json | ConvertFrom-Json\n$repoCount = if ($repoList.data.projects) { @($repoList.data.projects).Count } else { @($repoList.data).Count }\nWrite-Host \"Repos: $repoCount\" -ForegroundColor Green\n\nWrite-Host \"`n=== Step 2: Check Wiki access ===\" -ForegroundColor White\n$wikiResult = .\\gitlink-cli.exe wiki +list --owner zzx-coder --repo test-repo --format json | ConvertFrom-Json\nWrite-Host \"Wiki accessible: $($wikiResult.ok)\" -ForegroundColor Green\n\nWrite-Host \"`n=== Step 3: Check branch help ===\" -ForegroundColor White\n.\\gitlink-cli.exe branch --help\n\nWrite-Host \"`n=== Step 4: Check releases ===\" -ForegroundColor White\n$relResult = .\\gitlink-cli.exe release +list --owner zzx-coder --repo test-repo --limit 5 --format json | ConvertFrom-Json\nWrite-Host \"Release API accessible: $($relResult.ok)\" -ForegroundColor Green\n\nWrite-Host \"`n=== Step 5: Check milestone ===\" -ForegroundColor White\n.\\gitlink-cli.exe milestone --help"
+ },
+ {
+ label: "实际创建仓库 (可选·需谨慎)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\03-project-init.ps1 -Owner zzx-coder -Name \"test-init-real\" -Description \"测试仓库-可安全删除\" -Lang go"
+ }
+ ]
+ },
+ {
+ id: "m3-multirepo",
+ icon: "🔗",
+ name: "多仓库协同 (04-multi-repo-collab)",
+ commands: [
+ {
+ label: "生成组织仪表盘",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\04-multi-repo-collab.ps1 -Org zzx-coder -Output dashboard.html"
+ },
+ {
+ label: "指定仓库列表过滤",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\04-multi-repo-collab.ps1 -Org zzx-coder -Repos \"test-repo\" -Output dashboard-filtered.html"
+ },
+ {
+ label: "查看帮助和参数",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\04-multi-repo-collab.ps1 -Help"
+ }
+ ]
+ },
+ {
+ id: "m3-contrib",
+ icon: "🏆",
+ name: "贡献者成长体系 (05-contributor-growth)",
+ commands: [
+ {
+ label: "Dry-Run 预览模式",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\05-contributor-growth.ps1 -Owner zzx-coder -Repo test-repo -Sample 5 -DryRun"
+ },
+ {
+ label: "底层数据采集验证",
+ engine: "powershell",
+ cmd: "# 底层数据采集验证(来自测试 2.5.2)\n$openIssues = .\\gitlink-cli.exe issue +list --owner zzx-coder --repo test-repo --state open --limit 100 --format json | ConvertFrom-Json\n$closedIssues = .\\gitlink-cli.exe issue +list --owner zzx-coder --repo test-repo --state closed --limit 100 --format json | ConvertFrom-Json\n$prsMerged = .\\gitlink-cli.exe pr +list --owner zzx-coder --repo test-repo --state merged --limit 100 --format json | ConvertFrom-Json\n$members = .\\gitlink-cli.exe repo +members --owner zzx-coder --repo test-repo --limit 100 --format json | ConvertFrom-Json\n$prData = if ($prsMerged.data.issues) { @($prsMerged.data.issues) } else { @($prsMerged.data.pulls) }\n$memberData = if ($members.data.members) { @($members.data.members) } else { @($members.data) }\nWrite-Host \"Issues - Open: $(@($openIssues.data.issues).Count), Closed: $(@($closedIssues.data.issues).Count)\" -ForegroundColor Green\nWrite-Host \"Merged PRs: $($prData.Count)\" -ForegroundColor Green\nWrite-Host \"Members: $($memberData.Count)\" -ForegroundColor Green\n$allIssues = @($openIssues.data.issues) + @($closedIssues.data.issues)\n$authors = @{}\nforeach ($issue in $allIssues) {\n $author = if ($issue.author.login) { $issue.author.login } elseif ($issue.author.username) { $issue.author.username } else { $null }\n if ($author) { if (-not $authors.ContainsKey($author)) { $authors[$author] = 0 }; $authors[$author]++ }\n}\nWrite-Host \"Unique contributors: $($authors.Count)\" -ForegroundColor Green\nforeach ($kv in ($authors.GetEnumerator() | Sort-Object Value -Descending | Select-Object -First 5)) {\n Write-Host \" @$($kv.Key): $($kv.Value) issues\"\n}"
+ },
+ {
+ label: "颁发徽章 (可选·需谨慎)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\05-contributor-growth.ps1 -Owner zzx-coder -Repo test-repo -Sample 5 -Award"
+ }
+ ]
+ },
+ {
+ id: "m3-skill",
+ icon: "🤖",
+ name: "技能工作流 (Agent · gitlink-workflow)",
+ prompts: [
+ {
+ label: "工作流总入口(触发 7 选项菜单)",
+ engine: "claude",
+ prompt: "请帮我执行自动化工作流\n测试仓库:zzx-coder/test-repo"
+ },
+ {
+ label: "快捷触发:社区运营",
+ engine: "claude",
+ prompt: "帮我跑一下社区运营\n测试仓库:zzx-coder/test-repo"
+ },
+ {
+ label: "项目健康度报告 (gitlink-health)",
+ engine: "claude",
+ prompt: "请使用 gitlink-health Skill,为 zzx-coder/test-repo 仓库生成项目健康度报告。"
+ },
+ {
+ label: "健康度路径规则验证",
+ engine: "claude",
+ prompt: "请把健康度报告保存到桌面上。\n测试仓库:zzx-coder/test-repo"
+ },
+ {
+ label: "新人引导 AI 分析模式 (onboard)",
+ engine: "claude",
+ prompt: "请使用 gitlink-onboard Skill 的 AI 分析模式,扫描 zzx-coder/test-repo 的所有 open Issue,\n识别适合新手贡献的 Good First Issue。\n展示分析结果表格后,让我选择要对哪些 Issue 添加引导评论。"
+ },
+ {
+ label: "新人引导直接模式 (#11 dry-run)",
+ engine: "claude",
+ prompt: "请为 Issue #11 添加新人引导评论,先用 dry-run 预览。\n测试仓库:zzx-coder/test-repo"
+ },
+ {
+ label: "FAQ 模式 A:生成知识库",
+ engine: "claude",
+ prompt: "请使用 gitlink-faq Skill 的模式 A,为 zzx-coder/test-repo 生成 Issue 知识库。\n同时采集 open + closed 所有 Issue,合并去重,逐批读取详情,按类型分类和聚类,\n生成知识库 Markdown 预览后等我确认再发布到 Wiki。"
+ },
+ {
+ label: "FAQ 模式 B:重复检测",
+ engine: "claude",
+ prompt: "请检查 zzx-coder/test-repo 有没有和 \"登录功能\" 相关的已有 Issue,看看是否有重复的。\n对找到的候选 Issue,自动读取详情和 journals,给出分析结论。"
+ },
+ {
+ label: "FAQ 模式 C:Wiki 增量更新",
+ engine: "claude",
+ prompt: "请把 Issue #11 补充到已有的 Issue 知识库 Wiki 页面中。\n测试仓库:zzx-coder/test-repo"
+ }
+ ]
+ },
+ {
+ id: "m3-smoke",
+ icon: "🧪",
+ name: "端到端冒烟测试 (15 步)",
+ commands: [
+ {
+ label: "运行冒烟测试(连通性验证)",
+ engine: "powershell",
+ cmd: "# 端到端冒烟测试(来自测试 5.1,15 步连通性验证)\n$ErrorActionPreference = \"Continue\"\n$owner = \"zzx-coder\"; $repo = \"test-repo\"\n$pass = 0; $fail = 0\nfunction Test-Step {\n param([string]$Name, [ScriptBlock]$Script)\n Write-Host \"[TEST] $Name ... \" -NoNewline -ForegroundColor Cyan\n try { $result = & $Script; if ($result) { Write-Host \"PASS\" -ForegroundColor Green; $global:pass++ } else { Write-Host \"FAIL\" -ForegroundColor Red; $global:fail++ } }\n catch { Write-Host \"FAIL ($($_.Exception.Message))\" -ForegroundColor Red; $global:fail++ }\n}\nWrite-Host \"`n====== GitLink CLI 子任务三冒烟测试 ======\" -ForegroundColor White\nWrite-Host \"Target: $owner/$repo`n\"\nTest-Step \"Auth status\" { $r = .\\gitlink-cli.exe auth status 2>&1 | Out-String; $r -match \"logged in\" -or $r -match \"token\" }\nTest-Step \"01-Community: issue +list open\" { $r = .\\gitlink-cli.exe issue +list --owner $owner --repo $repo --state open --limit 5 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"01-Community: pr +list merged\" { $r = .\\gitlink-cli.exe pr +list --owner $owner --repo $repo --state merged --limit 5 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"02-Gatekeeper: issue +view #11\" { $r = .\\gitlink-cli.exe issue +view --owner $owner --repo $repo --number 11 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"03-Init: repo +list\" { $r = .\\gitlink-cli.exe repo +list --user $owner --limit 5 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"03-Init: wiki +list\" { $r = .\\gitlink-cli.exe wiki +list --owner $owner --repo $repo --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"04-MultiRepo: org repos\" { $r = .\\gitlink-cli.exe repo +list --user $owner --limit 10 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"04-MultiRepo: release +list\" { $r = .\\gitlink-cli.exe release +list --owner $owner --repo $repo --limit 5 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"05-Contrib: repo +members\" { $r = .\\gitlink-cli.exe repo +members --owner $owner --repo $repo --limit 50 --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"CI: ci +builds\" { $r = .\\gitlink-cli.exe ci +builds --owner $owner --repo $repo --format json | ConvertFrom-Json; $r.ok }\nTest-Step \"Branch: branch help\" { $r = .\\gitlink-cli.exe branch --help 2>&1 | Out-String; $r -match \"Usage\" -or $r -match \"branch\" }\nTest-Step \"Milestone: milestone help\" { $r = .\\gitlink-cli.exe milestone --help 2>&1 | Out-String; $r -match \"Usage\" -or $r -match \"milestone\" }\nTest-Step \"Webhook: webhook help\" { $r = .\\gitlink-cli.exe webhook --help 2>&1 | Out-String; $r -match \"Usage\" -or $r -match \"webhook\" }\nTest-Step \"Research: search +repos\" { $r = .\\gitlink-cli.exe search +repos --q \"agent\" --limit 5 --format json | ConvertFrom-Json; $r.ok }\nWrite-Host \"`n====== Results ======\" -ForegroundColor White\nWrite-Host \" PASS: $pass\" -ForegroundColor Green\nWrite-Host \" FAIL: $fail\" -ForegroundColor Red\nWrite-Host \" TOTAL: $($pass + $fail)\" -ForegroundColor Cyan"
+ }
+ ]
+ }
+];
+
+var MISSION4 = [
+ {
+ id: "m4-insights",
+ icon: "🔭",
+ name: "项目洞察 (06-research-insights)",
+ commands: [
+ {
+ label: "生成项目洞悉报告(热度/技术栈/活动)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\academic\\06-research-insights.ps1 -Owner zzx-coder -Repo test-repo"
+ }
+ ]
+ },
+ {
+ id: "m4-compliance",
+ icon: "✅",
+ name: "合规与复现性检查 (08-research-compliance)",
+ commands: [
+ {
+ label: "生成 8 维复现性评分卡",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\academic\\08-research-compliance.ps1 -Owner zzx-coder -Repo test-repo"
+ }
+ ]
+ },
+ {
+ id: "m4-progress",
+ icon: "📈",
+ name: "进度跟踪与预警 (10-research-progress)",
+ commands: [
+ {
+ label: "生成周度进度报告(含异常预警)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\academic\\10-research-progress.ps1 -Owner zzx-coder -Repo test-repo"
+ }
+ ]
+ },
+ {
+ id: "m4-citation",
+ icon: "📄",
+ name: "论文引用生成 (11-research-citation)",
+ commands: [
+ {
+ label: "生成全部 5 种引用格式 (all)",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\academic\\11-research-citation.ps1 -Owner zzx-coder -Repo test-repo -Format all"
+ },
+ {
+ label: "BibTeX 格式",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\academic\\11-research-citation.ps1 -Owner zzx-coder -Repo test-repo -Format bibtex"
+ },
+ {
+ label: "APA 格式",
+ engine: "powershell",
+ cmd: "powershell -ExecutionPolicy Bypass -File .\\workflows\\academic\\11-research-citation.ps1 -Owner zzx-coder -Repo test-repo -Format apa"
+ }
+ ]
+ },
+ {
+ id: "m4-research",
+ icon: "🔬",
+ name: "科研辅助 Agent (gitlink-research)",
+ prompts: [
+ {
+ label: "科研功能总入口(6 选项菜单)",
+ engine: "claude",
+ prompt: "请使用科研辅助功能\n(请展示 6 选项菜单:项目洞察 / 热点追踪 / 合规复现 / 协作匹配 / 进度预警 / 论文引用,等我选择)\n测试仓库:zzx-coder/test-repo"
+ },
+ {
+ label: "合规与复现性检查",
+ engine: "claude",
+ prompt: "请检查 zzx-coder/test-repo 项目的合规与复现性"
+ },
+ {
+ label: "论文引用生成(BibTeX)",
+ engine: "claude",
+ prompt: "请生成 zzx-coder/test-repo 项目的论文引用(BibTeX 格式)"
+ }
+ ]
+ }
+];
+
+
// ═══════════════════════════════════════════════
// DOM refs
// ═══════════════════════════════════════════════
@@ -673,13 +1026,14 @@ var btnRun = document.getElementById('btn-run');
var btnCancel = document.getElementById('btn-cancel');
var cliModsContainer = document.getElementById('cli-modules-container');
var skillsModsContainer = document.getElementById('skills-modules-container');
+var mission3ModsContainer = document.getElementById('mission3-modules-container');
+var mission4ModsContainer = document.getElementById('mission4-modules-container');
var statusDot = document.getElementById('status-dot');
var statusText = document.getElementById('status-text');
var toast = document.getElementById('toast');
var isRunning = false;
var currentEngine = 'powershell'; // 'powershell' | 'claude'
-var cliExecMode = 'direct'; // CLI section mode
-var skillsExecMode = 'direct'; // Skills section mode
+var execModes = { cli:'direct', skills:'direct', mission3:'direct', mission4:'direct' }; // 每个 section 的执行模式
var claudeSessionId = null; // Claude Code session ID for multi-turn
var currentAgent = 'claude'; // 'claude' | 'codex' | 'zcode'
var AGENT_META = {
@@ -699,7 +1053,7 @@ function toggleSection(sectionId) {
// ═══════════════════════════════════════════════
// Build Sidebar (CLI + Skills sections)
// ═══════════════════════════════════════════════
-function buildModuleGroup(container, modules, section, isSkill) {
+function buildModuleGroup(container, modules, section) {
if (!container) return;
modules.forEach(function(mod, idx) {
var div = document.createElement('div');
@@ -732,23 +1086,19 @@ function buildModuleGroup(container, modules, section, isSkill) {
}
function buildSidebar() {
- buildModuleGroup(cliModsContainer, MODULES, 'cli', false);
- buildModuleGroup(skillsModsContainer, SKILLS, 'skills', true);
+ buildModuleGroup(cliModsContainer, MODULES, 'cli');
+ buildModuleGroup(skillsModsContainer, SKILLS, 'skills');
+ buildModuleGroup(mission3ModsContainer, MISSION3, 'mission3');
+ buildModuleGroup(mission4ModsContainer, MISSION4, 'mission4');
}
// ═══════════════════════════════════════════════
// Execution Mode Toggles
// ═══════════════════════════════════════════════
-function setCliExecMode(mode) {
- cliExecMode = mode;
- document.getElementById('cli-mode-direct').className = (mode === 'direct') ? 'active' : '';
- document.getElementById('cli-mode-input').className = (mode === 'input') ? 'active' : '';
-}
-
-function setSkillsExecMode(mode) {
- skillsExecMode = mode;
- document.getElementById('skills-mode-direct').className = (mode === 'direct') ? 'active' : '';
- document.getElementById('skills-mode-input').className = (mode === 'input') ? 'active' : '';
+function setSectionExecMode(section, mode) {
+ execModes[section] = mode;
+ document.getElementById(section + '-mode-direct').className = (mode === 'direct') ? 'active' : '';
+ document.getElementById(section + '-mode-input').className = (mode === 'input') ? 'active' : '';
}
// ═══════════════════════════════════════════════
@@ -796,10 +1146,11 @@ function setAgent(agent) {
currentAgent = agent;
- // Update button active states
- document.getElementById('agent-claude').className = 'agent-claude' + (agent === 'claude' ? ' active' : '');
- document.getElementById('agent-codex').className = 'agent-codex' + (agent === 'codex' ? ' active' : '');
- document.getElementById('agent-zcode').className = 'agent-zcode' + (agent === 'zcode' ? ' active' : '');
+ // Update button active states (支持多 section 共享同一 currentAgent)
+ var btns = document.querySelectorAll('.agent-btn');
+ for (var i = 0; i < btns.length; i++) {
+ btns[i].classList.toggle('active', btns[i].getAttribute('data-agent') === agent);
+ }
// Clear terminal output (but keep session)
terminal.innerHTML = '';
@@ -836,14 +1187,15 @@ function onPresetSelect(selectEl, moduleId) {
return;
}
- // Determine section: 'cli' or 'skills'
- var isSkill = moduleId.indexOf('skills-') === 0;
+ // Determine section: 'cli' | 'skills' | 'mission3' | 'mission4'
+ var section = moduleId.substring(0, moduleId.indexOf('-mod-'));
+ var dataMap = { cli: MODULES, skills: SKILLS, mission3: MISSION3, mission4: MISSION4 };
+ var list = dataMap[section] || MODULES;
// Find module
- var list = isSkill ? SKILLS : MODULES;
var mod = null;
for (var i = 0; i < list.length; i++) {
- if ((isSkill ? 'skills-mod-' : 'cli-mod-') + list[i].id === moduleId) { mod = list[i]; break; }
+ if (section + '-mod-' + list[i].id === moduleId) { mod = list[i]; break; }
}
if (!mod) return;
@@ -851,18 +1203,20 @@ function onPresetSelect(selectEl, moduleId) {
if (!item) return;
var content = item.cmd || item.prompt;
+ // 每个 item 可自带 engine;默认 skills 走 claude,其余走 powershell
+ var engine = item.engine || (section === 'skills' ? 'claude' : 'powershell');
// Show preview
var previewEl = document.getElementById('preview-' + moduleId);
if (previewEl) { previewEl.textContent = content; }
- var mode = isSkill ? skillsExecMode : cliExecMode;
+ var mode = execModes[section] || 'direct';
if (mode === 'direct') {
// Execute immediately
selectEl.value = '';
if (previewEl) { previewEl.textContent = ''; }
- if (isSkill) {
+ if (engine === 'claude') {
setEngine('claude');
executeDirectClaude(content);
} else {
@@ -871,7 +1225,7 @@ function onPresetSelect(selectEl, moduleId) {
}
} else {
// Fill input for editing
- if (isSkill) { setEngine('claude'); } else { setEngine('powershell'); }
+ setEngine(engine);
cmdInput.value = content;
autoResizeTextarea();
cmdInput.focus();
diff --git a/demo/server.py b/demo/server.py
index c4a506e..1c265cd 100644
--- a/demo/server.py
+++ b/demo/server.py
@@ -220,6 +220,10 @@ class DemoHandler(http.server.BaseHTTPRequestHandler):
tmp = None
proc = None
try:
+ # 注入 UTF-8 编码设置:避免 PowerShell 默认 GBK 解码含中文 JSON 导致
+ # ConvertFrom-Json 报 ArgumentException。对已有该设置的命令重复无害。
+ command = "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8\n" + command
+
tmp = tempfile.NamedTemporaryFile(
mode="w", suffix=".ps1", delete=False, encoding="utf-8-sig"
)
diff --git a/doc/dashboard.html b/doc/dashboard.html
index 7e5dc42..11e3376 100644
--- a/doc/dashboard.html
+++ b/doc/dashboard.html
@@ -2,63 +2,428 @@
-
-gitlink-cli 功能全景
+
+gitlink-cli · 功能全景
-
-
gitlink-cli 功能全景
-
所有 Shortcuts 分类展示 · 点击分类展开 · 点击命令查看示例
-
-
-
-📦仓库管理8 个命令▶
repo +list公开仓库列表▶
gitlink-cli repo +list --user zhangsan
repo +info公开仓库详情▶
gitlink-cli repo +info --owner Gitlink --repo forgeplus
repo +create需认证创建仓库▶
gitlink-cli repo +create --name my-project --description "项目描述"
repo +fork需认证Fork 仓库▶
gitlink-cli repo +fork --owner Gitlink --repo forgeplus
repo +delete需认证删除仓库(不可逆)▶
gitlink-cli repo +delete --owner myuser --repo old-project
repo +batch-create需认证批量创建仓库▶
gitlink-cli repo +batch-create --from repos.csv
repo +batch-update需认证批量更新仓库▶
gitlink-cli repo +batch-update --from updates.csv
repo +add-member需认证添加仓库成员▶
gitlink-cli repo +add-member --owner myuser --repo myrepo --user newmember --role developer
🌿分支管理5 个命令▶
branch +list公开分支列表▶
gitlink-cli branch +list --owner Gitlink --repo forgeplus
branch +create需认证创建分支▶
gitlink-cli branch +create --name feature/new-feature
branch +delete需认证删除分支(不可逆)▶
gitlink-cli branch +delete --name feature/old-feature
branch +protect需认证保护分支▶
gitlink-cli branch +protect --name main
branch +unprotect需认证取消保护▶
gitlink-cli branch +unprotect --name main
🐛Issue 管理7 个命令▶
issue +list公开Issue 列表▶
gitlink-cli issue +list --owner Gitlink --repo forgeplus --state open
issue +view公开Issue 详情▶
gitlink-cli issue +view --owner Gitlink --repo forgeplus --number 4
issue +create需认证创建 Issue▶
gitlink-cli issue +create --owner myuser --repo myrepo --title "Bug: 登录失败" --body "复现步骤"
issue +update需认证更新 Issue▶
gitlink-cli issue +update --number 4 --title "新标题" --body "更新描述"
issue +close需认证关闭 Issue▶
gitlink-cli issue +close --number 4
issue +batch-close需认证批量关闭 Issue▶
gitlink-cli issue +batch-close --numbers 123,124 --dry-run
issue +comment需认证添加评论▶
gitlink-cli issue +comment --number 4 --body "已修复"
🔀Pull Request9 个命令▶
pr +list公开PR 列表▶
gitlink-cli pr +list --owner Gitlink --repo forgeplus --state open
pr +view公开PR 详情▶
gitlink-cli pr +view --id 3
pr +create需认证创建 PR▶
gitlink-cli pr +create --title "feat: 新功能" --head feature/x --base master
pr +merge需认证合并 PR▶
gitlink-cli pr +merge --id 3 --method squash
pr +close需认证关闭 PR▶
gitlink-cli pr +close --id 3
pr +files公开变更文件列表▶
gitlink-cli pr +files --id 3
pr +diff公开查看提交列表▶
gitlink-cli pr +diff --id 3
pr +comment需认证PR 评论▶
gitlink-cli pr +comment --id 3 --body "LGTM"
pr +review需认证代码审查▶
gitlink-cli pr +review --id 3 --event COMMENT --body "整体 LGTM"
🚀版本发布4 个命令▶
release +list公开发布列表▶
gitlink-cli release +list --owner Gitlink --repo forgeplus
release +view公开发布详情▶
gitlink-cli release +view --id <version_id>
release +create需认证创建发布▶
gitlink-cli release +create --tag v1.0.0 --name "v1.0.0" --target master
release +delete需认证删除发布(不可逆)▶
gitlink-cli release +delete --id <version_id>
📖Wiki 管理5 个命令▶
wiki +list公开Wiki 页面列表▶
gitlink-cli wiki +list --owner Gitlink --repo forgeplus
wiki +view公开查看页面内容▶
gitlink-cli wiki +view --owner Gitlink --repo forgeplus --title "Home"
wiki +create需认证创建页面▶
gitlink-cli wiki +create --owner myuser --repo myrepo --title "API 文档" --file ./api.md
wiki +update需认证更新页面▶
gitlink-cli wiki +update --owner myuser --repo myrepo --title "设计文档" --add "新内容"
wiki +delete需认证删除页面▶
gitlink-cli wiki +delete --owner myuser --repo myrepo --title "废弃页面"
⚙️CI/CD4 个命令▶
ci +builds需认证构建列表▶
gitlink-cli ci +builds --owner myuser --repo myrepo
ci +logs需认证构建日志▶
gitlink-cli ci +logs --build 42 --stage 1 --step 1
ci +restart需认证重启构建▶
gitlink-cli ci +restart --build 42
ci +stop需认证停止构建▶
gitlink-cli ci +stop --build 42
🔔Webhook7 个命令▶
webhook +list需认证Webhook 列表▶
gitlink-cli webhook +list --owner myuser --repo myrepo
webhook +info需认证Webhook 详情▶
gitlink-cli webhook +info --owner myuser --repo myrepo --id 123
webhook +events公开支持的事件类型▶
gitlink-cli webhook +events
webhook +create需认证创建 Webhook▶
gitlink-cli webhook +create --url https://example.com/hook --events push
webhook +update需认证更新 Webhook▶
gitlink-cli webhook +update --id 123 --events push,pull_request
webhook +test需认证测试 Webhook▶
gitlink-cli webhook +test --id 123 --event push
webhook +delete需认证删除 Webhook▶
gitlink-cli webhook +delete --id 123
🏢组织管理5 个命令▶
org +info公开组织详情▶
gitlink-cli org +info --id Gitlink
org +members公开成员列表▶
gitlink-cli org +members --id Gitlink
org +create需认证创建组织▶
gitlink-cli org +create --name my-org --description "我的组织"
org +batch-add需认证批量添加成员▶
gitlink-cli org +batch-add --id my-org --users "user1,user2"
👤用户与搜索4 个命令▶
user +info公开用户详情▶
gitlink-cli user +info --login zhangsan
search +repos公开搜索仓库▶
gitlink-cli search +repos --keyword "machine learning"
search +users公开搜索用户▶
gitlink-cli search +users --keyword "zhangsan"
🛡️安全与合规6 个命令▶
compliance +scan公开全量扫描▶
gitlink-cli compliance +scan
compliance +license公开许可证合规检查▶
gitlink-cli compliance +license
compliance +deps公开依赖许可证检查▶
gitlink-cli compliance +deps
compliance +secrets公开敏感信息扫描▶
gitlink-cli compliance +secrets
compliance +exposure公开PII 与暴露面扫描▶
gitlink-cli compliance +exposure
compliance +vocab公开敏感词汇扫描▶
gitlink-cli compliance +vocab
👋新人引导1 个命令▶
onboard +welcome需认证添加引导评论▶
gitlink-cli onboard +welcome --issues "3,7,15"
👥团队管理3 个命令▶
team +list公开团队列表▶
gitlink-cli team +list --org my-org
team +create需认证创建团队▶
gitlink-cli team +create --org my-org --name dev-team
team +add-member需认证添加成员▶
gitlink-cli team +add-member --org my-org --team dev-team --user newmember
📊贡献报告1 个命令▶
contrib +report公开贡献统计报告▶
gitlink-cli contrib +report --owner myuser --repo myrepo
-生成时间: 2026-06-23 15:54 · 运行 /code-insight 重新生成
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+