Skip to content

Commit c4e3db1

Browse files
authored
Merge pull request #5 from rennzhang/rennzhang/check-gh-pr-author
feat: add Doubao platform support
2 parents 63ee682 + 03c9683 commit c4e3db1

14 files changed

Lines changed: 954 additions & 31 deletions

File tree

.github/workflows/deploy-website.yml

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,34 +130,80 @@ jobs:
130130
name: website-build
131131
path: ${{ env.WEBSITE_DIR }}
132132

133+
- name: Resolve preview deploy eligibility
134+
id: preview_eligibility
135+
shell: bash
136+
env:
137+
CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
138+
CF_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
139+
run: |
140+
if [[ -n "${CF_API_TOKEN}" && -n "${CF_ACCOUNT_ID}" ]]; then
141+
echo "can_deploy=true" >> "$GITHUB_OUTPUT"
142+
else
143+
echo "can_deploy=false" >> "$GITHUB_OUTPUT"
144+
fi
145+
133146
- name: Deploy Preview to Cloudflare
134147
id: deploy
148+
if: ${{ steps.preview_eligibility.outputs.can_deploy == 'true' }}
135149
working-directory: ${{ env.WEBSITE_DIR }}
136150
run: pnpm dlx @opennextjs/cloudflare deploy --env preview
137151
env:
138152
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
139153
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
140154

141155
- name: Upsert PR comment with preview URL (no spam)
156+
if: ${{ always() && (steps.deploy.outcome == 'success' || steps.deploy.outcome == 'skipped') && github.event.pull_request.head.repo.fork == false }}
142157
uses: actions/github-script@v8
143158
env:
144159
MARKER: ${{ env.PREVIEW_COMMENT_MARKER }}
145160
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
161+
DEPLOY_OUTCOME: ${{ steps.deploy.outcome }}
162+
HEAD_IS_FORK: ${{ github.event.pull_request.head.repo.fork }}
163+
HAS_CF_SECRETS: ${{ steps.preview_eligibility.outputs.can_deploy }}
146164
with:
147165
script: |
148166
const marker = process.env.MARKER;
149-
const url = process.env.DEPLOYMENT_URL || "Check the Cloudflare dashboard for the preview URL.";
167+
const url = process.env.DEPLOYMENT_URL || "";
168+
const deployOutcome = (process.env.DEPLOY_OUTCOME || "").toLowerCase();
169+
const isFork = (process.env.HEAD_IS_FORK || "").toLowerCase() === "true";
170+
const hasCfSecrets = (process.env.HAS_CF_SECRETS || "").toLowerCase() === "true";
171+
172+
const baseMeta = `- Branch: \`${context.payload.pull_request.head.ref}\`
173+
- Commit: \`${context.sha}\``;
174+
175+
let body;
176+
if (deployOutcome === "success") {
177+
body = `${marker}
178+
## 🚀 Preview Deployment Ready!
179+
180+
Preview URL: ${url || "Check the Cloudflare dashboard for the preview URL."}
150181
151-
const body = `${marker}
152-
## 🚀 Preview Deployment Ready!
182+
${baseMeta}
153183
154-
Preview URL: ${url}
184+
(This comment will be updated on new pushes.)
185+
`;
186+
} else if (!hasCfSecrets && isFork) {
187+
body = `${marker}
188+
## ℹ️ Preview Deployment Skipped
155189
156-
- Branch: \`${context.payload.pull_request.head.ref}\`
157-
- Commit: \`${context.sha}\`
190+
This PR comes from a fork, and repository Cloudflare secrets are not exposed to \`pull_request\` workflows.
158191
159-
(This comment will be updated on new pushes.)
160-
`;
192+
${baseMeta}
193+
194+
(This comment will be updated on new pushes.)
195+
`;
196+
} else {
197+
body = `${marker}
198+
## ℹ️ Preview Deployment Skipped
199+
200+
Preview deployment was skipped because required Cloudflare secrets are missing.
201+
202+
${baseMeta}
203+
204+
(This comment will be updated on new pushes.)
205+
`;
206+
}
161207
162208
const { owner, repo } = context.repo;
163209
const issue_number = context.issue.number;

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Your AI conversations deserve a better clipboard.
2222
[![Gemini](https://img.shields.io/badge/Gemini-8E75B2?style=for-the-badge&logo=google&logoColor=white)](https://gemini.google.com)
2323
[![DeepSeek](https://img.shields.io/badge/DeepSeek-0066FF?style=for-the-badge&logo=deepseek&logoColor=white)](https://chat.deepseek.com)
2424
[![Grok](https://img.shields.io/badge/Grok-000000?style=for-the-badge&logo=x&logoColor=white)](https://grok.com)
25+
[![Doubao](https://img.shields.io/badge/豆包-4e6ef2?style=for-the-badge&logoColor=white)](https://www.doubao.com)
2526
[![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com)
2627

2728
<br />
@@ -167,7 +168,7 @@ Then load the unpacked extension from `apps/browser-extension/dist/chrome-mv3-de
167168

168169
### Usage
169170

170-
1. Navigate to any supported platform (ChatGPT, Claude, Gemini, DeepSeek, Grok, GitHub)
171+
1. Navigate to any supported platform (ChatGPT, Claude, Gemini, DeepSeek, Grok, Doubao, GitHub)
171172
2. Start or open a conversation
172173
3. Click the **CtxPort copy button** that appears in the chat, or press `Alt+Shift+C`
173174
4. Paste your Context Bundle wherever you need it
@@ -183,6 +184,7 @@ For sidebar list copy: hover over any conversation in the left sidebar to reveal
183184
- [x] Gemini support
184185
- [x] DeepSeek support
185186
- [x] Grok support
187+
- [x] Doubao (豆包) support
186188
- [x] GitHub Issues & PRs support
187189
- [x] Sidebar list copy
188190
- [x] Multiple copy formats

README_cn.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
[![Gemini](https://img.shields.io/badge/Gemini-8E75B2?style=for-the-badge&logo=google&logoColor=white)](https://gemini.google.com)
2323
[![DeepSeek](https://img.shields.io/badge/DeepSeek-0066FF?style=for-the-badge&logo=deepseek&logoColor=white)](https://chat.deepseek.com)
2424
[![Grok](https://img.shields.io/badge/Grok-000000?style=for-the-badge&logo=x&logoColor=white)](https://grok.com)
25+
[![Doubao](https://img.shields.io/badge/豆包-4e6ef2?style=for-the-badge&logoColor=white)](https://www.doubao.com)
2526
[![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com)
2627

2728
<br />
@@ -167,7 +168,7 @@ pnpm dev:ext
167168

168169
### 使用方法
169170

170-
1. 打开任何支持的平台(ChatGPT, Claude, Gemini, DeepSeek, Grok, GitHub)
171+
1. 打开任何支持的平台(ChatGPT, Claude, Gemini, DeepSeek, Grok, 豆包, GitHub)
171172
2. 开始或打开一段对话
172173
3. 点击对话中出现的 **CtxPort 复制按钮**,或按 `Alt+Shift+C`
173174
4. 将 Context Bundle 粘贴到任何你需要的地方
@@ -183,6 +184,7 @@ pnpm dev:ext
183184
- [x] Gemini 支持
184185
- [x] DeepSeek 支持
185186
- [x] Grok 支持
187+
- [x] 豆包 (Doubao) 支持
186188
- [x] GitHub Issues & PRs 支持
187189
- [x] 侧边栏列表复制
188190
- [x] 多种复制格式

apps/web/content/en/supported-platforms.mdx

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Supported Platforms"
3-
description: "CtxPort supported platforms: ChatGPT, Claude, Gemini, DeepSeek, Grok, and GitHub. Full feature matrix for each platform."
3+
description: "CtxPort supported platforms: ChatGPT, Claude, Gemini, DeepSeek, Grok, Doubao, and GitHub. Full feature matrix for each platform."
44
---
55

66
# Supported Platforms
@@ -54,6 +54,16 @@ CtxPort works with the most popular AI chat platforms and GitHub. Here's what's
5454
- All four copy formats (Full, User Only, Code Only, Compact)
5555
- Context menu support
5656

57+
## Doubao
58+
59+
**URL:** [www.doubao.com](https://www.doubao.com)
60+
61+
- In-chat copy button
62+
- Sidebar list copy (hover to copy without opening)
63+
- Keyboard shortcut (Alt+Shift+C)
64+
- All four copy formats (Full, User Only, Code Only, Compact)
65+
- Context menu support
66+
5767
## GitHub
5868

5969
**URL:** [github.com](https://github.com)
@@ -65,12 +75,12 @@ CtxPort works with the most popular AI chat platforms and GitHub. Here's what's
6575

6676
## Feature Support Matrix
6777

68-
| Feature | ChatGPT | Claude | Gemini | DeepSeek | Grok | GitHub |
69-
|---------|---------|--------|--------|----------|------|--------|
70-
| In-chat copy button | Yes | Yes | Yes | Yes | Yes | Yes |
71-
| Sidebar list copy | Yes | Yes |||||
72-
| Keyboard shortcut | Yes | Yes | Yes | Yes | Yes | Yes |
73-
| Full format | Yes | Yes | Yes | Yes | Yes | Yes |
74-
| User Only format | Yes | Yes | Yes | Yes | Yes | Yes |
75-
| Code Only format | Yes | Yes | Yes | Yes | Yes | Yes |
76-
| Compact format | Yes | Yes | Yes | Yes | Yes | Yes |
78+
| Feature | ChatGPT | Claude | Gemini | DeepSeek | Grok | Doubao | GitHub |
79+
|---------|---------|--------|--------|----------|------|--------|--------|
80+
| In-chat copy button | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
81+
| Sidebar list copy | Yes | Yes |||| Yes | |
82+
| Keyboard shortcut | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
83+
| Full format | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
84+
| User Only format | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
85+
| Code Only format | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
86+
| Compact format | Yes | Yes | Yes | Yes | Yes | Yes | Yes |

apps/web/content/zh/supported-platforms.mdx

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "支持平台"
3-
description: "CtxPort 支持的平台:ChatGPT、Claude、Gemini、DeepSeek、Grok GitHub。各平台功能支持详情。"
3+
description: "CtxPort 支持的平台:ChatGPT、Claude、Gemini、DeepSeek、Grok、豆包和 GitHub。各平台功能支持详情。"
44
---
55

66
# 支持平台
@@ -54,6 +54,16 @@ CtxPort 支持最主流的 AI 聊天平台和 GitHub。以下是各平台的功
5454
- 四种复制格式(Full、User Only、Code Only、Compact)
5555
- 右键菜单支持
5656

57+
## 豆包
58+
59+
**地址:** [www.doubao.com](https://www.doubao.com)
60+
61+
- 对话内复制按钮
62+
- 侧边栏列表复制(悬停即可复制,无需打开对话)
63+
- 键盘快捷键(Alt+Shift+C)
64+
- 四种复制格式(Full、User Only、Code Only、Compact)
65+
- 右键菜单支持
66+
5767
## GitHub
5868

5969
**地址:** [github.com](https://github.com)
@@ -65,12 +75,12 @@ CtxPort 支持最主流的 AI 聊天平台和 GitHub。以下是各平台的功
6575

6676
## 功能支持对照表
6777

68-
| 功能 | ChatGPT | Claude | Gemini | DeepSeek | Grok | GitHub |
69-
|------|---------|--------|--------|----------|------|--------|
70-
| 对话内复制按钮 | Yes | Yes | Yes | Yes | Yes | Yes |
71-
| 侧边栏列表复制 | Yes | Yes |||||
72-
| 键盘快捷键 | Yes | Yes | Yes | Yes | Yes | Yes |
73-
| Full 格式 | Yes | Yes | Yes | Yes | Yes | Yes |
74-
| User Only 格式 | Yes | Yes | Yes | Yes | Yes | Yes |
75-
| Code Only 格式 | Yes | Yes | Yes | Yes | Yes | Yes |
76-
| Compact 格式 | Yes | Yes | Yes | Yes | Yes | Yes |
78+
| 功能 | ChatGPT | Claude | Gemini | DeepSeek | Grok | 豆包 | GitHub |
79+
|------|---------|--------|--------|----------|------|------|--------|
80+
| 对话内复制按钮 | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
81+
| 侧边栏列表复制 | Yes | Yes |||| Yes | |
82+
| 键盘快捷键 | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
83+
| Full 格式 | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
84+
| User Only 格式 | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
85+
| Code Only 格式 | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
86+
| Compact 格式 | Yes | Yes | Yes | Yes | Yes | Yes | Yes |

apps/web/src/components/home/landing-page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const PLATFORMS = [
4343
"Gemini",
4444
"DeepSeek",
4545
"Grok",
46+
"Doubao",
4647
"GitHub",
4748
] as const;
4849

@@ -621,6 +622,10 @@ function PlatformsSection() {
621622
name: t("web.home.platforms.grok.name"),
622623
desc: t("web.home.platforms.grok.desc"),
623624
},
625+
{
626+
name: t("web.home.platforms.doubao.name"),
627+
desc: t("web.home.platforms.doubao.desc"),
628+
},
624629
{
625630
name: t("web.home.platforms.github.name"),
626631
desc: t("web.home.platforms.github.desc"),

apps/web/src/components/structured-data.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const softwareApp = {
55
"@type": "SoftwareApplication",
66
name: "CtxPort",
77
description:
8-
"Copy AI conversations as structured Markdown Context Bundles. One-click copy from ChatGPT, Claude, Gemini, DeepSeek, Grok and more.",
8+
"Copy AI conversations as structured Markdown Context Bundles. One-click copy from ChatGPT, Claude, Gemini, DeepSeek, Grok, Doubao and more.",
99
url: siteConfig.url,
1010
applicationCategory: "BrowserApplication",
1111
operatingSystem: "Chrome",

packages/core-plugins/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export {
2525
chatgptPlugin,
2626
claudePlugin,
2727
deepseekPlugin,
28+
doubaoPlugin,
2829
geminiPlugin,
2930
githubPlugin,
3031
grokPlugin,
@@ -34,13 +35,15 @@ export {
3435
import { chatgptPlugin } from "./plugins/chatgpt/plugin";
3536
import { claudePlugin } from "./plugins/claude/plugin";
3637
import { deepseekPlugin } from "./plugins/deepseek/plugin";
38+
import { doubaoPlugin } from "./plugins/doubao/plugin";
3739
import { geminiPlugin } from "./plugins/gemini/plugin";
3840
import { githubPlugin } from "./plugins/github/plugin";
3941
import { grokPlugin } from "./plugins/grok/plugin";
4042
export const EXTENSION_HOST_PERMISSIONS = [
4143
...chatgptPlugin.urls.hosts,
4244
...claudePlugin.urls.hosts,
4345
...deepseekPlugin.urls.hosts,
46+
...doubaoPlugin.urls.hosts,
4447
...geminiPlugin.urls.hosts,
4548
...githubPlugin.urls.hosts,
4649
...grokPlugin.urls.hosts,

0 commit comments

Comments
 (0)