fix(chat): 未配置模型时显示居中的警告卡片 / display prominent warning card when no model is configured (#1651) - #1657
Closed
Zaidzezo wants to merge 1 commit into
Closed
fix(chat): 未配置模型时显示居中的警告卡片 / display prominent warning card when no model is configured (#1651)#1657Zaidzezo wants to merge 1 commit into
Zaidzezo wants to merge 1 commit into
Conversation
Member
|
感谢pr,不过这个卡片感觉风格和整体不搭,没有支持i18n |
Author
嗨!跟你沟通一下: 我已经修复了弹窗配置(Modal config)的问题,补全了 i18n 多语言翻译,并顺便把 UI 样式跟网站设计规范做了对齐。 代码我已经整理好并提交了 PR,你有空可以看一下具体的 diff。如果有需要调整的地方随时跟我说 Hey! Just a heads-up: I've fixed the modal configuration issue and updated the i18n translations, along with aligning the UI styles to match our design system. I've opened a PR with all the changes so you can review the concrete code diff whenever you have a moment. Let me know if you want any adjustments! |
Collaborator
|
superseded by #1659 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… (#1651)
Checklist / 检查清单
Description / 描述
Replaced the default empty chat workspace view with a prominent centered warning card when no AI models are configured, providing immediate visibility and a direct action link to the settings page.
当未配置 AI 模型时,将默认的空白聊天界面替换为居中的提示卡片,以便清晰提示用户并提供指向设置页面的快捷按钮。
Related Issue / 关联 Issue
Fixes #1651
Changes Made / 修改内容
Added a
noModelsConfiguredstate check insrc/pages/options/routes/Agent/Chat/index.tsxwhenmodelsLoadedis true andmodels.length === 0.Rendered a styled alert card with an
AlertCircleicon, clear guidance text, and a primary action button leading directly to#/settings/model.Ensured the warning card only displays when no models exist, maintaining the normal conversation layout when models are configured.
在
src/pages/options/routes/Agent/Chat/index.tsx中添加了noModelsConfigured状态判断(当modelsLoaded为 true 且models.length === 0时生效)。渲染了一个包含
AlertCircle图标、明确提示文案以及直接跳转至#/settings/model按钮的警告卡片。确保仅在未配置任何模型时显示该卡片,配置模型后恢复正常的对话界面布局。
Screenshots / 截图