refactor: remove dead code and unoptimized structures
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user