refactor: remove dead code and unoptimized structures

This commit is contained in:
2026-05-06 12:12:37 +09:00
parent ef8fd086dd
commit 9115935eaf
7 changed files with 2 additions and 210 deletions
-17
View File
@@ -85,11 +85,6 @@ export function shouldAutoPushBrain(): boolean {
const cfg = vscode.workspace.getConfiguration('g1nation');
return cfg.get<boolean>('autoPushBrain', false);
}
export function getSecondBrainRepo(): string {
return getConfig().secondBrainRepo;
}
export function getBrainProfiles(): BrainProfile[] {
return getConfig().brainProfiles;
}
@@ -107,18 +102,6 @@ export function _isBrainDirExplicitlySet(): boolean {
return getBrainProfiles().length > 0;
}
export function isTextAttachment(fileName: string, mimeType: string): boolean {
const lower = fileName.toLowerCase();
const textExtensions = [
'.txt', '.md', '.csv', '.json', '.js', '.ts', '.jsx', '.tsx',
'.html', '.css', '.py', '.java', '.rs', '.go', '.yaml', '.yml',
'.xml', '.toml', '.sql', '.sh'
];
return mimeType.startsWith('text/')
|| mimeType === 'application/json'
|| textExtensions.some((ext) => lower.endsWith(ext));
}
export function findBrainFiles(dir: string): string[] {
let results: string[] = [];
if (!fs.existsSync(dir)) return results;