Skip to content

๐Ÿคฏ LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

๐ŸŒ chore: translate non-English comments to English in scripts (#16000)

LobeHub Bot5862a3ead8b2
diff --git a/.github/scripts/pr-comment.js b/.github/scripts/pr-comment.js
index a56e36b6a77..8b7480e90c3 100644
--- a/.github/scripts/pr-comment.js
+++ b/.github/scripts/pr-comment.js
@@ -6,7 +6,7 @@ const prComment = async ({ github, context, releaseUrl, artifactsUrl, version, t
const COMMENT_IDENTIFIER = '<!-- DESKTOP-BUILD-COMMENT -->';
/**
- * ็”Ÿๆˆ่ฏ„่ฎบๅ†…ๅฎน
+ * Generate comment body content
*/
const generateCommentBody = async () => {
try {
diff --git a/scripts/create-test-tasks.js b/scripts/create-test-tasks.js
index 13c265f5b73..89a51700afc 100644
--- a/scripts/create-test-tasks.js
+++ b/scripts/create-test-tasks.js
@@ -15,7 +15,7 @@ const api = (path, json) =>
async function main() {
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 1. ๅฎŒๆ•ดไปปๅŠกๆ ‘๏ผˆ3ๅฑ‚ๅตŒๅฅ— + ๆททๅˆ็Šถๆ€๏ผ‰
+ // 1. Full task tree (3-level nesting + mixed states)
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
const root = await api('task.create', {
name: 'Launch v2.0 Release',
@@ -30,7 +30,7 @@ async function main() {
content: 'Kickoff meeting completed, all teams aligned',
});
- // ๅญไปปๅŠก1๏ผšFrontend๏ผˆๆœ‰่‡ชๅทฑ็š„3ไธชๅญไปปๅŠก๏ผ‰
+ // Subtask 1: Frontend (with its own 3 subtasks)
const frontend = await api('task.create', {
name: 'Frontend overhaul',
instruction: 'Redesign all major pages with new component library.',
@@ -60,7 +60,7 @@ async function main() {
assigneeAgentId: agentId,
});
- // ๅญไปปๅŠก2๏ผšBackend๏ผˆๆœ‰2ไธชๅญไปปๅŠก๏ผŒ1ไธชๅทฒๅฎŒๆˆ๏ผ‰
+ // Subtask 2: Backend (with 2 subtasks, 1 completed)
const backend = await api('task.create', {
name: 'Backend API v2',
instruction: 'Implement v2 API endpoints with breaking changes.',
@@ -84,7 +84,7 @@ async function main() {
assigneeAgentId: agentId,
});
- // ๅญไปปๅŠก3๏ผšๅถๅญ่Š‚็‚น
+ // Subtask 3: Leaf node
await api('task.create', {
name: 'Write release notes',
instruction: 'Draft user-facing release notes covering all v2 changes.',
@@ -93,7 +93,7 @@ async function main() {
assigneeAgentId: agentId,
});
- // ๅญไปปๅŠก4๏ผšๅทฒๅฎŒๆˆ
+ // Subtask 4: Completed
const designReview = await api('task.create', {
name: 'Design review',
instruction: 'Review all new designs with the team.',
@@ -104,7 +104,7 @@ async function main() {
await api('task.updateStatus', { id: designReview.id, status: 'completed' });
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 2. ็ดงๆ€ฅไปปๅŠก๏ผˆๆ— ๅญไปปๅŠก๏ผ‰
+ // 2. Urgent task (no subtasks)
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
await api('task.create', {
name: 'Fix production login bug',
@@ -115,7 +115,7 @@ async function main() {
});
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 3. ๅทฒๅฎŒๆˆ็š„็‹ฌ็ซ‹ไปปๅŠก๏ผˆๅธฆ่ฏ„่ฎบ๏ผ‰
+ // 3. Completed standalone task (with comments)
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
const cicd = await api('task.create', {
name: 'Setup CI/CD pipeline',
@@ -127,7 +127,7 @@ async function main() {
await api('task.addComment', { id: cicd.id, content: 'Pipeline is live, all checks green' });
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 4. ๆ— ไผ˜ๅ…ˆ็บง backlog ไปปๅŠก
+ // 4. No-priority backlog task
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
await api('task.create', {
name: 'Evaluate new database options',
@@ -138,7 +138,7 @@ async function main() {
});
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 5. Markdown ้•ฟๆ่ฟฐไปปๅŠก
+ // 5. Markdown long-description task
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
await api('task.create', {
name: 'Update API documentation',
@@ -164,7 +164,7 @@ async function main() {
});
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 6. ๅทฒๅ–ๆถˆ็š„ไปปๅŠก
+ // 6. Cancelled task
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
const canceled = await api('task.create', {
name: 'Migrate to Redis cluster',
@@ -175,7 +175,7 @@ async function main() {
await api('task.updateStatus', { id: canceled.id, status: 'canceled' });
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
- // 7. ็ฎ€ๅ•็ˆถๅญๅ…ณ็ณป๏ผˆ2ไธชๅญไปปๅŠก๏ผ‰
+ // 7. Simple parent-child relationship (2 subtasks)
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
const okr = await api('task.create', {
name: 'Q2 OKR planning',
diff --git a/scripts/generate-oidc-jwk.mjs b/scripts/generate-oidc-jwk.mjs
index e8890cf274a..2950e529832 100755
--- a/scripts/generate-oidc-jwk.mjs
+++ b/scripts/generate-oidc-jwk.mjs
@@ -1,17 +1,17 @@
#!/usr/bin/env node
/**
- * OIDC JWKS ๅฏ†้’ฅ็”Ÿๆˆ่„šๆœฌ
- * ็”จไบŽ็”Ÿๆˆ OIDC Provider ไฝฟ็”จ็š„ RSA ๅฏ†้’ฅๅฏนๅนถ่ฝฌๆขไธบ JWKS ๆ ผๅผ
+ * OIDC JWKS key generation script
+ * Generates an RSA key pair for use by the OIDC Provider and converts it to JWKS format
*
- * ไฝฟ็”จๆ–นๆณ•:
+ * Usage:
* node scripts/generate-oidc-jwk.mjs
*
- * ๅฐ†่พ“ๅ‡บ็š„ๅ•่กŒ JSON ๅญ—็ฌฆไธฒ่ฎพ็ฝฎไธบ็Žฏๅขƒๅ˜้‡ OIDC_JWKS_KEY
+ * Set the output single-line JSON string as the environment variable OIDC_JWKS_KEY
*/
import { exportJWK, generateKeyPair } from 'jose';
import crypto from 'node:crypto';
-// ็”Ÿๆˆๅฏ†้’ฅ ID
+// Generate key ID
function generateKeyId() {
return crypto.randomBytes(8).toString('hex');
}
@@ -20,29 +20,29 @@ async function generateJwks() {
try {
console.error('ๆญฃๅœจ็”Ÿๆˆ RSA ๅฏ†้’ฅๅฏน...');
- // ็”Ÿๆˆ RS256 ๅฏ†้’ฅๅฏน
+ // Generate RS256 key pair
const { privateKey } = await generateKeyPair('RS256', {
extractable: true,
});
- // ๅฏผๅ‡บไธบ JWK ๆ ผๅผ
+ // Export as JWK format
const jwk = await exportJWK(privateKey);
- // ๆทปๅŠ ๅฟ…่ฆ็š„ๅญ—ๆฎต
- jwk.use = 'sig'; // ็”จ้€”: ็ญพๅ
- jwk.kid = generateKeyId(); // ๅฏ†้’ฅ ID
- jwk.alg = 'RS256'; // ็ฎ—ๆณ•
+ // Add required fields
+ jwk.use = 'sig'; // Purpose: signature
+ jwk.kid = generateKeyId(); // Key ID
+ jwk.alg = 'RS256'; // Algorithm
- // ๅˆ›ๅปบ JWKS (JSON Web Key Set)
+ // Create JWKS (JSON Web Key Set)
const jwks = { keys: [jwk] };
- // ่ฝฌๆขไธบJSONๅญ—็ฌฆไธฒ
+ // Convert to JSON string
const jwksString = JSON.stringify(jwks);
- // ่พ“ๅ‡บ JWKS JSON ๅ•่กŒๅญ—็ฌฆไธฒ
+ // Output JWKS JSON as a single-line string
console.log(jwksString);
- // ๆŽงๅˆถๅฐๆ็คบ
+ // Console output
console.error('\nโœ… JWKS ๅทฒ็”Ÿๆˆ');
console.error('่ฏทๅฐ†ไธŠ้ข่พ“ๅ‡บ็š„ JSON ๅญ—็ฌฆไธฒ็›ดๆŽฅ่ฎพ็ฝฎไธบ็Žฏๅขƒๅ˜้‡ OIDC_JWKS_KEY');
console.error('ไพ‹ๅฆ‚ๅœจ .env ๆ–‡ไปถไธญๆทปๅŠ :');
@@ -57,6 +57,6 @@ async function generateJwks() {
}
}
-// ๆ‰ง่กŒไธปๅ‡ฝๆ•ฐ
+// Execute main function
// eslint-disable-next-line unicorn/prefer-top-level-await
generateJwks();
diff --git a/scripts/vercelIgnoredBuildStep.js b/scripts/vercelIgnoredBuildStep.js
index dd6859c2ebc..480904825b8 100644
--- a/scripts/vercelIgnoredBuildStep.js
+++ b/scripts/vercelIgnoredBuildStep.js
@@ -1,10 +1,10 @@
const { execSync } = require('node:child_process');
-// ่Žทๅ–ๅฝ“ๅ‰ๅˆ†ๆ”ฏๅ
+// Get current branch name
const branchName = process.env.VERCEL_GIT_COMMIT_REF || '';
function shouldProceedBuild() {
- // ๅฆ‚ๆžœๆ˜ฏ lighthouse ๅˆ†ๆ”ฏๆˆ–ไปฅ testgru ๅผ€ๅคด็š„ๅˆ†ๆ”ฏ๏ผŒๅ–ๆถˆๆž„ๅปบ
+ // If the branch is 'lighthouse' or starts with a skip prefix, cancel the build
if (
branchName === 'lighthouse' ||
['gru', 'automatic', 'reproduction'].some((item) =>
@@ -15,7 +15,7 @@ function shouldProceedBuild() {
}
try {
- // ๆฃ€ๆŸฅๆ–‡ไปถๅ˜ๆ›ด๏ผŒๆŽ’้™ค็‰นๅฎšๆ–‡ไปถๅ’Œ็›ฎๅฝ•
+ // Check file changes, excluding specific files and directories
const diffCommand =
'git diff HEAD^ HEAD --quiet -- \
":!./*.md" \