feat(app): activate plugin registry with Claude provider adapter
Create plugins/index.ts bootstrap and claude-provider.ts implementing the AIProviderAdapter interface from @aiui/core. The Claude provider wraps the existing proxy streaming logic as an async generator. Plugin initialization is called in main.ts before app mount. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
ebaee4c2b9
commit
ad4612a5c2
@@ -0,0 +1,26 @@
|
||||
import { registerPlugin } from '@aiui/core'
|
||||
|
||||
export async function initializePlugins(): Promise<void> {
|
||||
// Register built-in AI provider
|
||||
const { claudeProvider } = await import('./claude-provider')
|
||||
registerPlugin(claudeProvider)
|
||||
await claudeProvider.init({
|
||||
settings: {
|
||||
get: () => undefined,
|
||||
set: () => {},
|
||||
},
|
||||
events: {
|
||||
emit: () => {},
|
||||
on: () => () => {},
|
||||
},
|
||||
logger: {
|
||||
info: console.info.bind(console, '[AIUI plugin]'),
|
||||
warn: console.warn.bind(console, '[AIUI plugin]'),
|
||||
error: console.error.bind(console, '[AIUI plugin]'),
|
||||
},
|
||||
})
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
console.log('[AIUI] Plugins initialized:', claudeProvider.id)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user