-
Notifications
You must be signed in to change notification settings - Fork 61
feat(console): improve extension plugin loading robustness #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Modified Extension.vue to pass i18n, API, and Cache context to plugins. This enables plugins to use main app's resources directly for seamless integration. - Import useI18n from vue-i18n and Cache from ./cache - Initialize i18n in component setup - Create context object with i18n, API, and Cache - Pass context as second parameter to plugin.mount()
Added comprehensive AI-related translations for both English and Chinese locales. This enables the AI plugin to use main app's i18n directly for seamless language switching. - Added ai.title, ai.subtitle sections - Added ai.settings with all configuration labels - Added ai.button with action labels - Added ai.status for connection states - Added ai.input, ai.option for user inputs - Added ai.welcome for welcome messages - Added ai.provider for provider descriptions - Added ai.message for user feedback messages
- Remove unused 'language' key from ai.settings (plugin no longer has language option) - Add 'copiedSuccess' message for clipboard copy feedback - Ensure consistency between English and Chinese translations Plugin language is now fully controlled by main app settings, with no duplicate language selection in plugin UI.
Added handleStore() calls in GetStores and getLoaderByStoreName to automatically fill empty socket URLs using GetExtensionSocketPath(). This ensures stores loaded from config file get correct socket paths without hardcoding user-specific paths, making the configuration portable across different users and systems. Fixes issue where AI extension showed "Not Ready" status due to outdated socket path in stores.yaml configuration.
|
| }; | ||
| try { | ||
| plugin.mount(container, context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已有的插件只有一个参数,这样会导致不兼容。另外 i18n 应该是在插件里实现。不可能把所有插件的 i18n 都写在 core 里。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
收到这个问题!
|
这个pr的提交存在一些问题, 我会把它的修改合并到另外一个pr里. 减少复杂度 |



What type of PR is this?
feat(console): improve extension plugin loading robustness
What this PR does / why we need it: