Skip to content

fix(chat): 未配置模型时显示居中的警告卡片 / display prominent warning card when no model is configured (#1651) - #1657

Closed
Zaidzezo wants to merge 1 commit into
scriptscat:mainfrom
Zaidzezo:main
Closed

fix(chat): 未配置模型时显示居中的警告卡片 / display prominent warning card when no model is configured (#1651)#1657
Zaidzezo wants to merge 1 commit into
scriptscat:mainfrom
Zaidzezo:main

Conversation

@Zaidzezo

@Zaidzezo Zaidzezo commented Aug 7, 2026

Copy link
Copy Markdown

… (#1651)

Checklist / 检查清单

  • Fixes mentioned issues / 修复已提及的问题
  • Code reviewed by human / 代码通过人工检查
  • Changes tested / 已完成测试

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 noModelsConfigured state check in src/pages/options/routes/Agent/Chat/index.tsx when modelsLoaded is true and models.length === 0.

  • Rendered a styled alert card with an AlertCircle icon, 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 / 截图

Screenshot 2026-08-07 231731

@CodFrm

CodFrm commented Aug 7, 2026

Copy link
Copy Markdown
Member

感谢pr,不过这个卡片感觉风格和整体不搭,没有支持i18n

@Zaidzezo

Zaidzezo commented Aug 8, 2026

Copy link
Copy Markdown
Author

感谢pr,不过这个卡片感觉风格和整体不搭,没有支持i18n

嗨!跟你沟通一下: 我已经修复了弹窗配置(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!

@cyfung1031

Copy link
Copy Markdown
Collaborator

superseded by #1659

@cyfung1031 cyfung1031 closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 调整重要提示的位置

3 participants