feat(template): 修复在切换模板语言后,模板选择器不响应式更新
问题描述
- 在模板管理器,对语言进行切换后,点击关闭按钮,关闭模板管理器的弹窗,发现模板选择器没有响应式更新(如果是点击遮罩层不会出现此bug,因为点击遮罩层把模板选择器也手动关闭了)
- 同时模板选择器选中的模板名也没有更新。
相关修复
- 在关闭模板管理后,对模板选择器的模板列表进行更新
- 在模板选择器中,对展示的模板进行更新
未修复问题
模板选择器中模板的描述词过长,会导致组件宽度超出外部容器,内容被截断。暂时未找到好的方式修复
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| prompt-optimizer | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 27, 2025 1:37am |
bugbot run
Bug: Null/Undefined Handling in Array Comparison
The
deepCompareTemplateContentfunction's array comparison logic assumes array elements are valid objects withroleandcontentproperties. Without null/undefined checks, accessingitem.roleoritem.contentcan cause aTypeErrorif an array element isnull,undefined, or lacks these properties.
packages/ui/src/components/TemplateSelect.vue#L230-L235Fix in CursorWas this report helpful? Give feedback by reacting with 👍 or 👎
过度工程化,不需要处理
感谢 Su-u-un 发现的bug并提出修复 !