chore: external @opentiny/vue and @opentiny/tiny-robot-svgs#191
chore: external @opentiny/vue and @opentiny/tiny-robot-svgs#191hexqi merged 3 commits intoopentiny:developfrom
Conversation
WalkthroughConsolidates many Changes
Sequence Diagram(s)(no sequence diagram provided — changes are import consolidations and deletions without new runtime control-flow) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
packages/components/src/mcp-server-picker/components/PluginCard.vue (1)
49-61: Avoid mutating props’ nested state inside the child componentDirectly setting
tool.enabled = enabledmutates data owned by the parent and risks state inconsistencies. Emitting events is sufficient—let the parent update the source of truth. This keeps a clean one-way data flow without breaking current behavior since you already emit per-tool updates.Apply this diff:
if (expandable.value) { props.plugin.tools.forEach((tool) => { if (tool.enabled !== enabled) { - tool.enabled = enabled // 通知父组件工具状态已改变 emit('toggle-tool', tool.id, enabled) } }) }If you want to keep instant visual feedback, consider managing a local, non-prop, reactive mirror for tools’ enabled states and syncing via emits—happy to sketch that if useful.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (32)
packages/components/package.json(0 hunks)packages/components/src/action-group/ActionGroup.vue(1 hunks)packages/components/src/attachments/components/FileCard.vue(1 hunks)packages/components/src/feedback/index.vue(1 hunks)packages/components/src/history/index.vue(1 hunks)packages/components/src/mcp-server-picker/components/FormEditor.vue(1 hunks)packages/components/src/mcp-server-picker/components/PluginCard.vue(1 hunks)packages/components/src/mcp-server-picker/components/PluginModal.vue(1 hunks)packages/components/src/mcp-server-picker/index.vue(1 hunks)packages/components/src/question/components/CommonQuestions.vue(0 hunks)packages/components/src/question/components/HotQuestions.vue(0 hunks)packages/components/src/question/composables/useQuestions.ts(0 hunks)packages/components/src/question/index.less(0 hunks)packages/components/src/question/index.ts(0 hunks)packages/components/src/question/index.type.ts(0 hunks)packages/components/src/question/index.vue(0 hunks)packages/components/src/question/vars.less(0 hunks)packages/components/src/sender/components/ActionButtons.vue(1 hunks)packages/components/src/sender/index.vue(1 hunks)packages/components/src/suggestion/components/CategoryNav.vue(0 hunks)packages/components/src/suggestion/components/SuggestionCapsule.vue(0 hunks)packages/components/src/suggestion/components/SuggestionPanel.vue(0 hunks)packages/components/src/suggestion/composables/useKeyboardNavigation.ts(0 hunks)packages/components/src/suggestion/composables/useSuggestionFilter.ts(0 hunks)packages/components/src/suggestion/composables/useTriggerDetection.ts(0 hunks)packages/components/src/suggestion/index.less(0 hunks)packages/components/src/suggestion/index.ts(0 hunks)packages/components/src/suggestion/index.type.ts(0 hunks)packages/components/src/suggestion/index.vue(0 hunks)packages/components/src/suggestion/utils/dom.ts(0 hunks)packages/components/src/suggestion/vars.less(0 hunks)packages/components/vite.config.ts(1 hunks)
💤 Files with no reviewable changes (21)
- packages/components/src/suggestion/vars.less
- packages/components/src/suggestion/components/SuggestionPanel.vue
- packages/components/src/question/composables/useQuestions.ts
- packages/components/src/suggestion/components/SuggestionCapsule.vue
- packages/components/src/suggestion/components/CategoryNav.vue
- packages/components/src/suggestion/composables/useKeyboardNavigation.ts
- packages/components/src/question/index.type.ts
- packages/components/src/suggestion/index.type.ts
- packages/components/src/question/index.ts
- packages/components/src/suggestion/composables/useSuggestionFilter.ts
- packages/components/src/question/components/HotQuestions.vue
- packages/components/src/question/components/CommonQuestions.vue
- packages/components/package.json
- packages/components/src/suggestion/utils/dom.ts
- packages/components/src/suggestion/index.vue
- packages/components/src/suggestion/index.less
- packages/components/src/suggestion/index.ts
- packages/components/src/question/index.less
- packages/components/src/suggestion/composables/useTriggerDetection.ts
- packages/components/src/question/index.vue
- packages/components/src/question/vars.less
🔇 Additional comments (11)
packages/components/src/sender/components/ActionButtons.vue (1)
3-3: Barrel import for TinyTooltip looks goodUsing a named import from @opentiny/vue aligns with the consolidation effort and will continue to work with the tag via <script setup> auto-registration.
packages/components/src/mcp-server-picker/components/PluginModal.vue (1)
3-3: Radio group migration is correctSwitching to a named import from @opentiny/vue for TinyRadioGroup matches the new externalization strategy. Template usage with remains compatible.
packages/components/src/attachments/components/FileCard.vue (1)
3-3: Tooltip import consolidation LGTMImporting TinyTooltip from the @opentiny/vue barrel is consistent with the PR’s goal. Template usage with remains compatible with <script setup>.
packages/components/src/action-group/ActionGroup.vue (1)
3-3: TinyTooltip import migrated to @opentiny/vue — good change.Template usage stays the same (). This keeps imports consistent with the new externalization strategy.
packages/components/src/mcp-server-picker/index.vue (1)
2-2: Grouped imports from @opentiny/vue are consistent and correct.Consolidation of TinyTabs, TinyTabItem, TinyInput, TinySelect, TinyOption matches the repo-wide pattern; template bindings remain unchanged.
packages/components/src/mcp-server-picker/components/FormEditor.vue (1)
2-2: TinyRadioGroup import migration looks correct.Template continues to use , which is compatible with the named export in script setup.
packages/components/src/history/index.vue (1)
3-3: TinyInput and TinyTooltip migrated to @opentiny/vue — LGTM.No behavioral changes; template tags map correctly under script-setup.
packages/components/src/mcp-server-picker/components/PluginCard.vue (4)
2-2: Consolidated imports from @opentiny/vue look goodSwitching TinySwitch and TinyPopconfirm to named exports from the aggregator is aligned with the PR objective and keeps usage unchanged in the template.
156-159: Remove TypeScript type annotation in template event handlerType annotations inside template expressions are not supported by Vue’s template compiler and can break builds. Use a plain parameter or move typing to script logic.
Apply this diff:
- @update:model-value="(enabled: boolean) => handleToolToggle(tool.id, enabled)" + @update:model-value="enabled => handleToolToggle(tool.id, enabled)"
2-2: Verify @opentiny/vue exports and purge subpackage importsQuick summary: the sandbox search returned no matches — please confirm locally that @opentiny/vue actually exports TinySwitch/TinyPopconfirm and remove any @opentiny/vue-switch / @opentiny/vue-popconfirm imports.
Files to check:
- packages/components/src/mcp-server-picker/components/PluginCard.vue — currently:
import { TinySwitch, TinyPopconfirm } from '@opentiny/vue'If the aggregator exports Switch/Popconfirm instead, change to:
import { Switch as TinySwitch, Popconfirm as TinyPopconfirm } from '@opentiny/vue'Run these checks locally:
- Search for deprecated subpackage imports:
rg -n --hidden --glob '!.git' "@opentiny/vue-(switch|popconfirm)" || true- Find aggregator imports referencing TinySwitch/TinyPopconfirm:
rg -n --hidden --glob '!.git' "from ['"]@opentiny/vue['"][^\\n]*\{[^}]Tiny(Switch|Popconfirm)[^}]\}" || true- List all imports from the aggregator to spot uses that may need aliasing:
rg -n --hidden --glob '!.git' "from ['"]@opentiny/vue['"]" -S || true- Inspect the installed package's exports/types (if node_modules present):
jq .exports node_modules/@opentiny/vue/package.json || cat node_modules/@opentiny/vue/package.jsonPlease run the above and confirm whether to keep the current import, switch to aliased names, and/or remove subpackage imports.
103-121: Verify TinySwitch/TinyPopconfirm APIs in the aggregated UI packageCouldn't find TinySwitch or TinyPopconfirm component source files in this repo, so I couldn't confirm their props/events. Observed usages you should verify against the aggregator/component library:
- packages/components/src/mcp-server-picker/components/PluginCard.vue
- TinyPopconfirm — lines ~103–111: title="确定删除该插件吗?", type="info", trigger="click", @confirm="handleDelete"
- TinySwitch — lines ~116–121: :model-value="pluginState.checked", :indeterminate="pluginState.indeterminate", @update:model-value="handlePluginToggle"
- TinySwitch — lines ~156–159: :model-value="tool.enabled", @update:model-value="(enabled: boolean) => handleToolToggle(tool.id, enabled)"
- docs/demos/drag-overlay/basic.vue — TinySwitch v-model usage (~line 73)
- docs/demos/suggestion/pills-popper.vue — ref typed as InstanceType (~line 74)
Please confirm in the aggregator (or the upstream component package / node_modules) that:
- TinySwitch still emits update:modelValue (template listener @update:model-value is acceptable) and supports the indeterminate prop.
- TinyPopconfirm still accepts title, type="info", trigger="click" and emits the confirm event.
…0.0 in package.json files
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/components/package.json (1)
23-25: If @opentiny/vue is rollup-externalized, consider making it a peerDependencyExternalizing a package typically pairs better with declaring it as a peerDependency to avoid duplicate installs/mismatched versions in consuming apps. If that’s the intent, move it from dependencies to peerDependencies; otherwise keeping it in dependencies is acceptable if you want it installed transitively.
Proposed change (within this hunk):
- "@opentiny/vue": "^3.20.0", + // "@opentiny/vue" moved to peerDependenciesAnd add it to peerDependencies (outside this hunk, illustrative):
{ "peerDependencies": { "vue": "^3.3.11", "@opentiny/vue": "^3.20.0" } }Please confirm whether the Vite/Rollup config intentionally externals @opentiny/vue for consumers, in which case the peer dependency route is preferable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/package.json(1 hunks)packages/components/package.json(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/package.json
🔇 Additional comments (1)
packages/components/package.json (1)
24-24: Downgrade to @opentiny/vue ^3.20.0 — LGTMThis aligns with the prior review feedback and the repo-wide consolidation to the barrel. No further concerns here.
Summary by CodeRabbit
Refactor
Chores
Note: Projects using the removed features will need updates or replacements.