From 814e32ef0e44dd05cfd95948249712b8155a330e Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 21 Apr 2026 14:54:15 +0900 Subject: [PATCH] feat: re-add github sync to simplified menu with clear UX wording --- src/extension.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index 8b21dc8..4cda6b7 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1010,9 +1010,13 @@ class SidebarChatProvider implements vscode.WebviewViewProvider { const brainFiles = fs.existsSync(brainDir) ? this._findBrainFiles(brainDir) : []; const fileCount = brainFiles.length; + const currentRepo = vscode.workspace.getConfiguration('connectAiLab').get('secondBrainRepo', ''); + const repoLabel = currentRepo ? currentRepo.split('/').pop() : 'μ—†μŒ'; + const items: any[] = [ { label: `πŸ“‚ λ‚΄ 지식 파일 보기 (${fileCount}개)`, description: fileCount > 0 ? 'λ‚΄κ°€ λ„£μ–΄λ‘” 지식 λͺ©λ‘ 확인' : '아직 지식이 μ—†μŠ΅λ‹ˆλ‹€', action: 'listFiles' }, { label: 'πŸ“ λ‚΄ λ‡Œ 폴더 λ³€κ²½ν•˜κΈ°', description: `ν˜„μž¬: ${brainDir}`, action: 'changeFolder' }, + { label: `πŸ”— κΉƒν—ˆλΈŒμ—μ„œ 지식 κ°€μ Έμ˜€κΈ°`, description: `연결됨: ${repoLabel}`, action: 'githubSync' }, { label: 'πŸ”„ 지식 μƒˆλ‘œκ³ μΉ¨', description: '폴더 λ‚΄μš©μ„ λ‹€μ‹œ μ½μ–΄μ˜΅λ‹ˆλ‹€', action: 'resync' }, { label: '🌐 λ‚΄ 지식 지도 보기', description: '지식듀이 μ–΄λ–»κ²Œ μ—°κ²°λ˜μ–΄ μžˆλŠ”μ§€ μ‹œκ°ν™”', action: 'viewGraph' }, ]; @@ -1079,6 +1083,10 @@ class SidebarChatProvider implements vscode.WebviewViewProvider { vscode.commands.executeCommand('connect-ai-lab.showBrainNetwork'); break; } + case 'githubSync': { + await this._syncSecondBrain(); + break; + } } }