feat(onboarding): 引导首次模型渠道配置【已审核 PR】 - #1553
Open
Andreaseszhang wants to merge 1 commit into
Open
Conversation
首次完成 onboarding 后,若没有保存过任何模型渠道,在已加载的主界面上 强制展示渠道配置 Dialog:只有保存至少一个渠道后才能开始使用,但允许先 保存空模型渠道。渠道表单内置 Proma 商业版官方模型渠道介绍与下载入口, 并附带 5 个官方模型图标。Electron 版本递增到 0.17.16。 Made-with: Proma
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.
概述
首次完成基础 onboarding 的新用户,在没有任何已保存模型渠道时,进入主界面后会被一个不可跳过的「添加模型渠道」Dialog 覆盖:保存至少一个渠道后才能开始使用 Proma。同时允许先保存空模型渠道(模型可稍后再补充),避免用户因暂时没有可用模型被卡住。渠道创建表单中还加入了 Proma 商业版官方模型渠道的介绍与下载入口,帮助用户了解官方托管渠道。
改动
apps/electron/src/renderer/App.tsx— 初始化时读取渠道列表,新增requiresInitialModelSetup判断;onboarding 完成后若仍需首配则展示InitialModelSetupView,并复用既有创建欢迎对话逻辑进入主界面。apps/electron/src/renderer/components/onboarding/InitialModelSetupView.tsx(新增)— 覆盖在主界面上的非关闭 Dialog,禁用 Esc、遮罩点击与右上角关闭,保存渠道成功后解除。apps/electron/src/renderer/lib/model-setup.ts(新增)— 首配判定:没有任何已保存渠道时要求配置;已有渠道(即使停用或无模型)不再拦截,确保存量用户升级不受影响。apps/electron/src/renderer/components/settings/ChannelForm.tsx— 新增initialSetup模式:隐藏返回按钮;创建时允许保存空模型渠道;新增「Proma 商业版」官方渠道卡片(黑色描边主视觉、5 个官方模型图标、三列宽屏布局与下载 CTA)。apps/electron/src/renderer/assets/models/official/*.png(新增)— OpenAI、Claude、DeepSeek、Moonshot、智谱 5 个官方模型图标。apps/electron/package.json— 版本递增至0.17.16。测试方法
~/.proma-dev)清除已保存渠道后启动,完成基础 onboarding,确认出现「添加模型渠道」Dialog 且无法通过 Esc / 点击遮罩 / 关闭按钮跳过。bun run typecheck与bun run --filter='@proma/electron' build:renderer。备注
Made with Proma · GitHub