guantao 19 часов назад
Родитель
Сommit
92a520ba06
2 измененных файлов с 2 добавлено и 82 удалено
  1. 0 65
      examples/process_pipeline/ui/app.js
  2. 2 17
      examples/process_pipeline/ui/index.html

+ 0 - 65
examples/process_pipeline/ui/app.js

@@ -39,7 +39,6 @@ if (selectForcePhase && groupPlatforms) {
 
 const jsonStrategy = document.getElementById('json-strategy');
 const jsonBlueprint = document.getElementById('json-blueprint');
-const jsonCaps = document.getElementById('json-caps');
 const jsonSource = document.getElementById('json-source');
 const jsonRaw = document.getElementById('json-raw');
 
@@ -987,24 +986,6 @@ window.jumpToCase = function (caseId) {
     }
 };
 
-async function fetchMemo(index) {
-    const elTextarea = document.getElementById('memo-textarea');
-    const elStatus = document.getElementById('memo-status');
-    if (!elTextarea) return;
-    elTextarea.value = 'Loading...';
-    elTextarea.disabled = true;
-    try {
-        const res = await fetch(`/api/requirements/${index}/memo`);
-        const data = await res.json();
-        elTextarea.value = data.memo || '';
-        elStatus.textContent = '';
-    } catch (e) {
-        elTextarea.value = '';
-        console.error("Failed to fetch memo", e);
-    }
-    elTextarea.disabled = false;
-}
-
 async function fetchPromptsList() {
     try {
         const res = await fetch('/api/prompts');
@@ -1278,8 +1259,6 @@ async function fetchRequirementData(index) {
                 }
             };
         }
-        jsonCaps.innerHTML = renderAggregatedPerCaseData(casesList, 'capabilities');
-
         const btnUpload = document.getElementById('btn-upload-source-ex');
         const fileInput = document.getElementById('input-upload-source-ex');
         if (btnUpload && fileInput) {
@@ -1423,10 +1402,8 @@ function selectRequirement(index) {
     // Fetch data
     if (jsonStrategy) jsonStrategy.textContent = 'Loading...';
     if (jsonBlueprint) jsonBlueprint.textContent = 'Loading...';
-    if (jsonCaps) jsonCaps.textContent = 'Loading...';
     if (jsonRaw) jsonRaw.textContent = 'Loading...';
     fetchRequirementData(index);
-    fetchMemo(index);
 }
 
 function updateDetailBannerStatus(status) {
@@ -1567,12 +1544,6 @@ function setupEventListeners() {
         }
     });
 
-    // Toggle Memo
-    document.getElementById('btn-toggle-memo').addEventListener('click', () => {
-        const memo = document.getElementById('memo-container');
-        memo.classList.toggle('hidden');
-    });
-
     // Refresh Data without changing page position
     const btnRefresh = document.getElementById('btn-refresh-data');
     if (btnRefresh) {
@@ -1806,42 +1777,6 @@ function setupEventListeners() {
         modalLogs.classList.add('hidden');
     });
 
-    const btnSaveMemo = document.getElementById('btn-save-memo');
-    if (btnSaveMemo) {
-        btnSaveMemo.addEventListener('click', async () => {
-            if (currentSelectedIndex === null) return;
-            const elTextarea = document.getElementById('memo-textarea');
-            const elStatus = document.getElementById('memo-status');
-            elStatus.textContent = 'Saving...';
-            elStatus.style.color = 'var(--text-muted)';
-
-            try {
-                const res = await fetch(`/api/requirements/${currentSelectedIndex}/memo`, {
-                    method: 'POST',
-                    headers: { 'Content-Type': 'application/json' },
-                    body: JSON.stringify({ memo: elTextarea.value })
-                });
-                if (res.ok) {
-                    elStatus.textContent = 'Saved!';
-                    elStatus.style.color = 'var(--success)';
-                    setTimeout(() => elStatus.textContent = '', 2000);
-
-                    const req = requirements.find(r => r.index === currentSelectedIndex);
-                    if (req) {
-                        req.memo = elTextarea.value;
-                        renderTaskList(requirements);
-                    }
-                } else {
-                    throw new Error("Bad response");
-                }
-            } catch (e) {
-                console.error("Failed to save memo", e);
-                elStatus.textContent = 'Save failed';
-                elStatus.style.color = 'var(--danger)';
-            }
-        });
-    }
-
     const btnOpenPrompts = document.getElementById('btn-open-prompts');
     if (btnOpenPrompts) {
         btnOpenPrompts.addEventListener('click', () => {

+ 2 - 17
examples/process_pipeline/ui/index.html

@@ -143,7 +143,6 @@
                 <!-- Merged Tabs in Topbar -->
                 <div class="data-tabs-pill" style="display: flex; gap: 6px; margin-right: 15px;">
                     <button class="tab-btn-pill active" data-target="tab-raw">Case 案例</button>
-                    <button class="tab-btn-pill" data-target="tab-caps">Capability 能力</button>
                     <button class="tab-btn-pill" data-target="tab-blueprint">Strategy 工序</button>
                 </div>
                 <!-- Search Input -->
@@ -151,11 +150,10 @@
                 
                 <label style="display: flex; align-items: center; cursor: pointer; gap: 4px; margin-right: 15px;">
                     <input type="checkbox" id="check-claude-sdk" checked>
-                    <span style="font-size: 0.85rem; color: var(--text-muted);">使用 Anthropic SDK (Max)</span>
+                    <span style="font-size: 0.85rem; color: var(--text-muted);">使用 Claude Agent SDK (Max)</span>
                 </label>
 
                 <button class="btn btn-secondary btn-small" id="btn-refresh-data" title="局部刷新当前数据,保持页面位置">🔄 刷新数据</button>
-                <button class="btn btn-secondary btn-small" id="btn-toggle-memo" title="切换需求笔记面板">📝 笔记</button>
                 <button class="btn btn-primary btn-small" id="btn-open-run-modal">🚀 运行流水线</button>
             </div>
         </header>
@@ -180,26 +178,13 @@
                         停止</button>
                 </div>
 
-                <div class="memo-container hidden" id="memo-container">
-                    <div class="memo-header">
-                        <div class="memo-title">📝 需求笔记</div>
-                        <div style="display:flex; align-items:center; gap:10px;">
-                            <span class="save-status" id="memo-status"></span>
-                            <button class="btn btn-small btn-primary" id="btn-save-memo"
-                                style="padding: 4px 12px; min-width: 60px">保存</button>
-                        </div>
-                    </div>
-                    <textarea class="memo-textarea" id="memo-textarea" placeholder="在此处添加该需求的说明、背景或问题..."></textarea>
-                </div>
 
 
                 <div class="tab-content-container">
                     <div class="tab-content active" id="tab-raw">
                         <div class="content-viewer" id="json-raw">加载中...</div>
                     </div>
-                    <div class="tab-content" id="tab-caps">
-                        <div class="content-viewer" id="json-caps">加载中...</div>
-                    </div>
+
                     <div class="tab-content" id="tab-blueprint">
                         <div class="content-viewer" id="json-blueprint">加载中...</div>
                     </div>