-
Notifications
You must be signed in to change notification settings - Fork 625
feat: support rebrand #778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d7d95eb
bb92fa7
0254a54
cdc49c4
9fed8b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| "_comment": "Demo公司品牌配置示例", | ||
| "app": { | ||
| "name": "BananaAI", | ||
| "productName": "DemoAI助手", | ||
| "appId": "com.banana.ai-assistant", | ||
| "description": "DemoAI助手,您的智能工作伙伴", | ||
| "author": "Demo科技有限公司", | ||
| "website": "https://banana.com", | ||
| "copyright": "© 2025 Demo科技有限公司", | ||
| "executableName": "BananaAI" | ||
| }, | ||
| "update": { | ||
| "baseUrl": "https://updates.banana.com/" | ||
| }, | ||
| "i18n": { | ||
| "appTitle": { | ||
| "en-US": "Banana AI Assistant", | ||
| "zh-CN": "DemoAI助手", | ||
| "zh-TW": "DemoAI助手", | ||
| "zh-HK": "DemoAI助手", | ||
| "ja-JP": "バナナAIアシスタント", | ||
| "ko-KR": "바나나 AI 어시스턴트", | ||
| "ru-RU": "Банановый ИИ Помощник", | ||
| "fr-FR": "Assistant IA Banane", | ||
| "fa-IR": "دستیار هوش مصنوعی موز" | ||
| }, | ||
| "appDescription": { | ||
| "en-US": "Banana AI Assistant is your intelligent work partner", | ||
| "zh-CN": "DemoAI助手是您的智能工作伙伴", | ||
| "zh-TW": "DemoAI助手是您的智能工作夥伴", | ||
| "zh-HK": "DemoAI助手是您的智能工作夥伴", | ||
| "ja-JP": "バナナAIアシスタントは、あなたの知的な仕事のパートナーです", | ||
| "ko-KR": "바나나 AI 어시스턴트는 당신의 지능형 업무 파트너입니다", | ||
| "ru-RU": "Банановый ИИ Помощник - ваш умный рабочий партнер", | ||
| "fr-FR": "L'Assistant IA Banane est votre partenaire de travail intelligent", | ||
| "fa-IR": "دستیار هوش مصنوعی موز شریک هوشمند کاری شماست" | ||
| }, | ||
| "websiteText": { | ||
| "en-US": "Visit Banana Website", | ||
| "zh-CN": "访问Demo官网", | ||
| "zh-TW": "造訪Demo官網", | ||
| "zh-HK": "訪問Demo官網", | ||
| "ja-JP": "バナナウェブサイトを訪問", | ||
| "ko-KR": "바나나 웹사이트 방문", | ||
| "ru-RU": "Посетить сайт Банана", | ||
| "fr-FR": "Visitez le site Banane", | ||
| "fa-IR": "وبسایت موز را ببینید" | ||
| } | ||
| }, | ||
| "github": { | ||
| "repository": "banana-company/ai-assistant" | ||
| }, | ||
| "mcp": { | ||
| "serverDescriptionSuffix": "Demo内置", | ||
| "serverDescriptionSuffixEn": "Banana built-in" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| { | ||
| "_comment": "请修改以下配置为您的品牌信息", | ||
| "app": { | ||
| "name": "DeepChat", | ||
| "productName": "DeepChat", | ||
| "appId": "com.wefonk.deepchat", | ||
| "description": "DeepChat,一个简单易用的AI客户端", | ||
| "author": "ThinkInAIXYZ", | ||
| "website": "https://deepchatai.cn", | ||
| "copyright": "© 2025 ThinkInAIXYZ", | ||
| "executableName": "DeepChat" | ||
| }, | ||
| "update": { | ||
| "baseUrl": "https://cdn.deepchatai.cn/upgrade/" | ||
| }, | ||
| "i18n": { | ||
| "appTitle": { | ||
| "en-US": "DeepChat", | ||
| "zh-CN": "DeepChat", | ||
| "zh-TW": "DeepChat", | ||
| "zh-HK": "DeepChat", | ||
| "ja-JP": "DeepChat", | ||
| "ko-KR": "DeepChat", | ||
| "ru-RU": "DeepChat", | ||
| "fr-FR": "DeepChat", | ||
| "fa-IR": "DeepChat" | ||
| }, | ||
| "appDescription": { | ||
| "en-US": "DeepChat is a cross-platform AI client, dedicated to making AI accessible to more people.", | ||
| "zh-CN": "DeepChat是一个跨平台AI客户端,致力于让更多人便捷地使用AI。", | ||
| "zh-TW": "DeepChat 是一款跨平台 AI 應用程式,致力於讓更多人輕鬆使用 AI。", | ||
| "zh-HK": "DeepChat是一個跨平台AI客戶端,致力於讓更多人便捷地使用AI。", | ||
| "ja-JP": "DeepChatは、より多くの人々にAIへのアクセスを提供することを目的としたクロスプラットフォームAIクライアントです。", | ||
| "ko-KR": "DeepChat은 더 많은 사람들이 AI에 접근할 수 있도록 하는 크로스 플랫폼 AI 클라이언트입니다。", | ||
| "ru-RU": "DeepChat - это кроссплатформенный AI-клиент, предназначенный для того, чтобы сделать AI доступным для большего количества людей.", | ||
| "fr-FR": "DeepChat est un client IA multiplateforme, dédié à rendre l'IA accessible à plus de personnes.", | ||
| "fa-IR": "دیپ چت یک کلاینت هوش مصنوعی چندپلتفرمه که هدفش در دسترس قرار دادن هوش مصنوعی برای افراد بیشتری است." | ||
| }, | ||
| "websiteText": { | ||
| "en-US": "Visit Our Website", | ||
| "zh-CN": "访问我们的网站", | ||
| "zh-TW": "造訪我們的網站", | ||
| "zh-HK": "訪問我們的網站", | ||
| "ja-JP": "ウェブサイトを訪問", | ||
| "ko-KR": "웹사이트 방문", | ||
| "ru-RU": "Посетить наш сайт", | ||
| "fr-FR": "Visitez notre site web", | ||
| "fa-IR": "وبسایت ما را ببینید" | ||
| }, | ||
| "welcomeTitle": { | ||
| "en-US": "Welcome to MyApp", | ||
| "zh-CN": "欢迎使用 MyApp", | ||
| "zh-TW": "歡迎使用 MyApp", | ||
| "zh-HK": "歡迎使用 MyApp", | ||
| "ja-JP": "MyAppへようこそ", | ||
| "ko-KR": "MyApp에 오신 것을 환영합니다", | ||
| "ru-RU": "Добро пожаловать в MyApp", | ||
| "fr-FR": "Bienvenue sur MyApp", | ||
| "fa-IR": "به MyApp خوش آمدید" | ||
| }, | ||
| "welcomeSetupDescription": { | ||
| "en-US": "Let's start setting up MyApp", | ||
| "zh-CN": "让我们开始设置 MyApp", | ||
| "zh-TW": "讓我們開始設定 MyApp", | ||
| "zh-HK": "讓我們開始設置 MyApp", | ||
| "ja-JP": "MyAppの設定を始めましょう", | ||
| "ko-KR": "MyApp 설정을 시작합시다", | ||
| "ru-RU": "Начнем настройку MyApp", | ||
| "fr-FR": "Commençons la configuration de MyApp", | ||
| "fa-IR": "بیایید تنظیم MyApp را شروع کنیم" | ||
| } | ||
| }, | ||
| "github": { | ||
| "repository": "ThinkInAIXYZ/deepchat" | ||
| }, | ||
| "mcp": { | ||
| "serverDescriptionSuffix": "DeepChat内置", | ||
| "serverDescriptionSuffixEn": "DeepChat built-in" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,211 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DeepChat 品牌定制指南 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 这是一个简单的品牌定制解决方案,用于将 DeepChat 应用定制为您自己的品牌。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 使用场景 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. **Fork 这个代码仓库**到您的 GitHub 账号 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. **准备品牌资源**(图标、Logo 等) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. **配置品牌信息** | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. **执行一次性替换** | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5. **构建您的定制版本** | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 操作步骤 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 1. 准备品牌资源 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 将以下文件放入 `scripts/brand-assets/` 目录: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `icon.png` - 应用图标 (512x512 PNG) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `icon.ico` - Windows 图标文件 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `logo.png` - 亮色主题 Logo (建议 256x256) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `logo-dark.png` - 暗色主题 Logo (建议 256x256) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 2. 配置品牌信息 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 编辑根目录下的 `brand-config.template.json` 文件: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```json | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "app": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "name": "MyAI", // 应用包名 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "productName": "我的AI助手", // 产品显示名称 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appId": "com.mycompany.ai-assistant", // 应用ID (reverse domain 格式) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "description": "我的AI助手,智能工作伙伴", // 应用描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "author": "我的公司", // 作者/公司名称 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "website": "https://mycompany.com", // 官方网站 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "copyright": "© 2025 我的公司", // 版权信息 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "executableName": "MyAI" // 可执行文件名 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "update": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "baseUrl": "https://updates.mycompany.com/" // 更新服务器URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "i18n": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appTitle": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "en-US": "My AI Assistant", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "zh-CN": "我的AI助手" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| // ... 其他语言 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appDescription": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "en-US": "My AI Assistant is your intelligent work partner", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "zh-CN": "我的AI助手是您的智能工作伙伴" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| // ... 其他语言 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 3. 执行品牌替换 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 运行替换脚本: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| node scripts/rebrand.js | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 这个脚本会自动替换以下文件中的品牌信息: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `package.json` - 包配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `electron-builder.yml` - 构建配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `electron-builder-macx64.yml` - macOS x64 构建配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `src/main/index.ts` - 主进程配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `src/main/presenter/upgradePresenter/index.ts` - 更新服务配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `src/renderer/src/i18n/*/about.json` - 国际化文件 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `src/main/presenter/configPresenter/mcpConfHelper.ts` - MCP 服务描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 以及复制品牌资源文件到相应位置。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+66
to
+77
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Document HTML <title> replacements (index, shell, floating) to match behavior The PR promises HTML title updates across index.html, shell/index.html, and floating/index.html, but this list omits them. Add them so users know to expect window title changes. 这个脚本会自动替换以下文件中的品牌信息:
- `package.json` - 包配置
- `electron-builder.yml` - 构建配置
- `electron-builder-macx64.yml` - macOS x64 构建配置
- `src/main/index.ts` - 主进程配置
- `src/main/presenter/upgradePresenter/index.ts` - 更新服务配置
- `src/renderer/src/i18n/*/about.json` - 国际化文件
- `src/main/presenter/configPresenter/mcpConfHelper.ts` - MCP 服务描述
+ - `src/renderer/index.html` - 页面标题 <title>
+ - `src/renderer/shell/index.html` - Shell 窗口标题 <title>(格式:Brand - Shell)
+ - `src/renderer/floating/index.html` - 悬浮窗标题 <title>
以及复制品牌资源文件到相应位置。📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 4. 验证结果 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 检查修改是否正确: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 查看修改的文件 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| git status | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 查看具体修改内容 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| git diff | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 测试运行 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run dev | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 5. 构建应用 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 构建所需平台 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run build:mac:arm64 # macOS ARM64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run build:win:x64 # Windows x64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run build:linux:x64 # Linux x64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 配置说明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 必需配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.name` - 应用包名,用于 package.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.productName` - 产品显示名称 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.appId` - 应用ID,必须是 reverse domain 格式(如 com.company.app) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.description` - 应用描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.author` - 作者或公司名称 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 可选配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.website` - 官方网站URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.copyright` - 版权信息 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `app.executableName` - 可执行文件名(Windows) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `update.baseUrl` - 自定义更新服务器 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `i18n.*` - 多语言文本 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `github.repository` - GitHub 仓库地址 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `mcp.serverDescriptionSuffix` - MCP 服务描述后缀 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 示例:Demo公司 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 以下是为"Demo公司"配置的示例: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```json | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "app": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "name": "BananaAI", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "productName": "DemoAI助手", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appId": "com.banana.ai-assistant", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "description": "DemoAI助手,您的智能工作伙伴", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "author": "Demo科技有限公司", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "website": "https://banana.com", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "copyright": "© 2025 Demo科技有限公司", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "executableName": "BananaAI" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "update": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "baseUrl": "https://updates.banana.com/" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "i18n": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appTitle": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "en-US": "Banana AI Assistant", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "zh-CN": "DemoAI助手" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appDescription": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "en-US": "Banana AI Assistant is your intelligent work partner", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "zh-CN": "DemoAI助手是您的智能工作伙伴" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "mcp": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "serverDescriptionSuffix": "Demo内置", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "serverDescriptionSuffixEn": "Banana built-in" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 注意事项 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. **备份重要配置**:执行替换前建议提交当前代码或创建备份 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. **检查 App ID 格式**:必须使用 reverse domain 格式,如 `com.company.app` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. **准备高质量资源**:图标和 Logo 应该符合各平台设计规范 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. **测试完整性**:替换后进行完整的功能测试 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5. **更新服务器**:如果使用自定义更新服务器,需要确保服务器正常运行 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 恢复原始配置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 如果需要恢复到原始的 DeepChat 配置: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 恢复所有修改的文件 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| git checkout . | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 或恢复特定文件 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| git checkout package.json electron-builder.yml | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 故障排除 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 常见问题 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. **配置文件格式错误** | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 检查 JSON 语法是否正确 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 确保所有字符串都用双引号包围 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. **资源文件未找到** | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 检查文件是否放在正确的位置 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 确认文件名和扩展名正确 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. **构建失败** | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 检查 App ID 格式是否正确 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 验证所有必需字段都已填写 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 获取帮助 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 如果遇到问题,可以: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. 检查控制台输出的错误信息 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. 确认配置文件格式正确 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. 验证资源文件是否存在 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 总结 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 这个简化的品牌定制方案可以让您: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ✅ **快速定制**:几分钟内完成品牌替换 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ✅ **一次性操作**:执行一次就完成所有替换 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ✅ **完全定制**:应用名称、图标、描述等全面定制 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ✅ **易于使用**:无需复杂的品牌管理,直接修改代码 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 非常适合 fork 代码库后的一次性品牌定制需求。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||||||||||||
| # 品牌资源文件目录 | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 请将您的品牌资源文件放在此目录下: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## 必需文件 | ||||||||||||||||||||||||||||||||||||
| - `icon.png` - 应用图标 (512x512 PNG) | ||||||||||||||||||||||||||||||||||||
| - `icon.ico` - Windows 图标文件 | ||||||||||||||||||||||||||||||||||||
| - `logo.png` - 亮色主题 Logo (建议 256x256) | ||||||||||||||||||||||||||||||||||||
| - `logo-dark.png` - 暗色主题 Logo (建议 256x256) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## 文件要求 | ||||||||||||||||||||||||||||||||||||
| - 图标文件应该是高质量的,符合各平台设计规范 | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+5
to
+12
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docs say “required files” but PR goal makes assets optional — tighten wording Your PR objective explicitly states brand assets are optional to support text‑only rebranding. This file currently lists them as “必需文件” (required), which contradicts that and may confuse users. Apply this diff to align the guidance: -## 必需文件
+## 可选文件(如需自定义图标/Logo)
+- 以下资源为可选项。若未提供,本工具将仅替换文本品牌信息:
- `icon.png` - 应用图标 (512x512 PNG)
- `icon.ico` - Windows 图标文件
- `logo.png` - 亮色主题 Logo (建议 256x256)
- `logo-dark.png` - 暗色主题 Logo (建议 256x256)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
| - PNG 文件应该有透明背景 | ||||||||||||||||||||||||||||||||||||
| - ICO 文件包含多种尺寸 (16x16, 32x32, 48x48, 128x128, 256x256) | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Assets are optional — reflect this in the workflow section
Step 1 implies assets are strictly required. Make this explicitly optional to avoid blocking text-only rebrands.
📝 Committable suggestion
🤖 Prompt for AI Agents