()
| 51 | let _manager: SharedAssistantManager | null = null |
| 52 | |
| 53 | export function getManager(): SharedAssistantManager { |
| 54 | if (!_manager) { |
| 55 | _manager = new SharedAssistantManager({ |
| 56 | fs: nodeFs, |
| 57 | assistantsDir: path.join(getPathProvider().getAiDataDir(), 'assistants'), |
| 58 | builtinRawConfigs: [ |
| 59 | { id: 'general_cn', content: builtinGeneralZhRaw }, |
| 60 | { id: 'general_en', content: builtinGeneralEnRaw }, |
| 61 | { id: 'general_ja', content: builtinGeneralJaRaw }, |
| 62 | ], |
| 63 | logger: aiLogger, |
| 64 | generateId: () => `custom_${randomUUID().replace(/-/g, '').slice(0, 12)}`, |
| 65 | }) |
| 66 | } |
| 67 | return _manager |
| 68 | } |
| 69 | |
| 70 | // ==================== Public API (preserves existing function signatures) ==================== |
| 71 |
no test coverage detected