refactor: simplify settings (remove github/maxContext), add topology back to menu

This commit is contained in:
Jay
2026-04-21 14:36:05 +09:00
parent a72800ba58
commit 3fdd732e50
2 changed files with 13 additions and 21 deletions
+4 -14
View File
@@ -99,32 +99,22 @@
"connectAiLab.ollamaUrl": {
"type": "string",
"default": "http://127.0.0.1:11434",
"description": "Ollama 서버 URL (기본값: http://127.0.0.1:11434)"
"description": "🤖 AI 서버 주소 (보통 자동으로 잡히니 건드리지 않아도 됩니다)"
},
"connectAiLab.defaultModel": {
"type": "string",
"default": "gemma4:e2b",
"description": "기본 AI 모델 이름 (예: gemma4:e2b, llama3.3, deepseek-r1)"
},
"connectAiLab.maxContextFiles": {
"type": "number",
"default": 200,
"description": "프로젝트 컨텍스트에 포함할 최대 파일 수"
"description": "🧠 사용할 AI 모델 이름 (예: gemma4:e2b, llama3.3, deepseek-r1)"
},
"connectAiLab.requestTimeout": {
"type": "number",
"default": 300,
"description": "AI 응답 대기 시간 (초, 기본값: 300초)"
},
"connectAiLab.secondBrainRepo": {
"type": "string",
"default": "",
"description": "🧠 Second Brain — 지식 저장소 GitHub URL (예: https://github.com/user/my-knowledge). 여기에 입력한 깃허브의 마크다운(.md) 파일들이 AI의 지식 기반이 됩니다."
"description": "AI 응답 대기 시간 (초, 기본 300초 = 5분)"
},
"connectAiLab.localBrainPath": {
"type": "string",
"default": "",
"description": "📁 로컬 동기화 폴더 경로 — (선택) 숨김 폴더 대신, 내 PC의 특정 폴더(예: /Users/jay/Desktop/MyBrain)를 지정하면 해당 폴더가 깃허브와 완벽히 양방향 동기화(Auto Pull & Push) 됩니다."
"description": "📁 내 지식 폴더 경로 — 내 PC의 특정 폴더(예: 바탕화면/MyBrain)를 지정하면, 그 안의 .md 파일들이 AI의 지식이 됩니다. 비워두면 기본 폴더를 자동 생성합니다."
}
}
}
+9 -7
View File
@@ -20,9 +20,8 @@ function getConfig() {
return {
ollamaBase: cfg.get<string>('ollamaUrl', 'http://127.0.0.1:11434'),
defaultModel: cfg.get<string>('defaultModel', 'gemma4:e2b'),
maxTreeFiles: cfg.get<number>('maxContextFiles', 200),
maxTreeFiles: 200,
timeout: cfg.get<number>('requestTimeout', 300) * 1000,
secondBrainRepo: cfg.get<string>('secondBrainRepo', ''),
localBrainPath: cfg.get<string>('localBrainPath', '')
};
}
@@ -1015,6 +1014,7 @@ class SidebarChatProvider implements vscode.WebviewViewProvider {
{ label: `📂 내 지식 파일 보기 (${fileCount}개)`, description: fileCount > 0 ? '내가 넣어둔 지식 목록 확인' : '아직 지식이 없습니다', action: 'listFiles' },
{ label: '📁 내 뇌 폴더 변경하기', description: `현재: ${brainDir}`, action: 'changeFolder' },
{ label: '🔄 지식 새로고침', description: '폴더 내용을 다시 읽어옵니다', action: 'resync' },
{ label: '🌐 내 지식 지도 보기', description: '지식들이 어떻게 연결되어 있는지 시각화', action: 'viewGraph' },
];
const pick = await vscode.window.showQuickPick(items, { placeHolder: '🧠 내 지식 관리' });
@@ -1075,6 +1075,10 @@ class SidebarChatProvider implements vscode.WebviewViewProvider {
this._view.webview.postMessage({ type: 'response', value: `🔄 **지식 새로고침 완료!** ${refreshedFiles.length}개 파일이 연결되어 있습니다.\n\n지식 모드가 ON 되었습니다.` });
break;
}
case 'viewGraph': {
vscode.commands.executeCommand('connect-ai-lab.showBrainNetwork');
break;
}
}
}
@@ -1088,20 +1092,18 @@ class SidebarChatProvider implements vscode.WebviewViewProvider {
return;
}
let { secondBrainRepo } = getConfig();
let secondBrainRepo = vscode.workspace.getConfiguration('connectAiLab').get<string>('secondBrainRepo', '');
// UX 극대화: 안 채워져 있으면 에러 내뱉지 말고 입력창 띄우기!
if (!secondBrainRepo) {
const inputUrl = await vscode.window.showInputBox({
prompt: '🧠 뇌를 연결할 깃허브 저장소 주소를 입력하세요 (Second Brain URL)',
prompt: '🧠 뇌를 연결할 깃허브 저장소 주소를 입력하세요',
placeHolder: '예: https://github.com/사용자/레포지토리'
});
if (!inputUrl) { return; } // 사용자가 취소한 경우 종료
if (!inputUrl) { return; }
// 설정창에 자동 입력 및 저장
await vscode.workspace.getConfiguration('connectAiLab').update('secondBrainRepo', inputUrl, vscode.ConfigurationTarget.Global);
secondBrainRepo = inputUrl;
vscode.window.showInformationMessage('✅ 깃허브 주소가 자동 저장되었습니다. 즉시 동기화를 시작합니다!');
}
this._isSyncingBrain = true;