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 packages/types and packages/web-crawler (#10267)

LobeHub Bot4e4933d86187
diff --git a/packages/types/src/agent/chatConfig.ts b/packages/types/src/agent/chatConfig.ts
index 2286e73643e..cc34ffb7815 100644
--- a/packages/types/src/agent/chatConfig.ts
+++ b/packages/types/src/agent/chatConfig.ts
@@ -17,16 +17,16 @@ export interface LobeAgentChatConfig {
enableMaxTokens?: boolean;
/**
- * 是否开启流式输出
+ * Whether to enable streaming output
*/
enableStreaming?: boolean;
/**
- * 是否开启推理
+ * Whether to enable reasoning
*/
enableReasoning?: boolean;
/**
- * 自定义推理强度
+ * Custom reasoning effort level
*/
enableReasoningEffort?: boolean;
reasoningBudgetToken?: number;
@@ -34,25 +34,25 @@ export interface LobeAgentChatConfig {
gpt5ReasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
gpt5_1ReasoningEffort?: 'none' | 'low' | 'medium' | 'high';
/**
- * 输出文本详细程度控制
+ * Output text verbosity control
*/
textVerbosity?: 'low' | 'medium' | 'high';
thinking?: 'disabled' | 'auto' | 'enabled';
thinkingBudget?: number;
/**
- * 禁用上下文缓存
+ * Disable context caching
*/
disableContextCaching?: boolean;
/**
- * 历史消息条数
+ * Number of historical messages
*/
historyCount?: number;
/**
- * 开启历史记录条数
+ * Enable historical message count
*/
enableHistoryCount?: boolean;
/**
- * 历史消息长度压缩阈值
+ * Enable history message compression threshold
*/
enableCompressHistory?: boolean;
diff --git a/packages/types/src/document/index.ts b/packages/types/src/document/index.ts
index 1cbd4a13535..6536149ba07 100644
--- a/packages/types/src/document/index.ts
+++ b/packages/types/src/document/index.ts
@@ -56,12 +56,12 @@ export interface LobeDocument {
source: string;
/**
- * 文档来源类型
+ * Document source type
*/
sourceType: DocumentSourceType;
/**
- * 文档标题 (如果可用)。
+ * Document title (if available)
*/
title?: string;
@@ -168,12 +168,12 @@ export enum DocumentSourceType {
API = 'api',
/**
- * 编辑器创建的文档
+ * Document created in editor
*/
EDITOR = 'editor',
/**
- * 本地或上传的文件
+ * Local or uploaded file
*/
FILE = 'file',
diff --git a/packages/types/src/fetch.ts b/packages/types/src/fetch.ts
index 281ad54b1ac..de9d7722913 100644
--- a/packages/types/src/fetch.ts
+++ b/packages/types/src/fetch.ts
@@ -2,15 +2,15 @@
import type { ILobeAgentRuntimeErrorType } from '@lobechat/model-runtime';
export const ChatErrorType = {
- // ******* 业务错误语义 ******* //
+ // ******* Business Error Semantics ******* //
InvalidAccessCode: 'InvalidAccessCode', // is in valid password
InvalidClerkUser: 'InvalidClerkUser', // is not Clerk User
FreePlanLimit: 'FreePlanLimit', // is not Clerk User
- SubscriptionPlanLimit: 'SubscriptionPlanLimit', // 订阅用户超限
- SubscriptionKeyMismatch: 'SubscriptionKeyMismatch', // 订阅 key 不匹配
+ SubscriptionPlanLimit: 'SubscriptionPlanLimit', // Subscription user limit exceeded
+ SubscriptionKeyMismatch: 'SubscriptionKeyMismatch', // Subscription key mismatch
- SupervisorDecisionFailed: 'SupervisorDecisionFailed', // 主持人决策失败
+ SupervisorDecisionFailed: 'SupervisorDecisionFailed', // Supervisor decision failed
InvalidUserKey: 'InvalidUserKey', // is not valid User key
CreateMessageError: 'CreateMessageError',
@@ -18,20 +18,20 @@ export const ChatErrorType = {
* @deprecated
*/
NoOpenAIAPIKey: 'NoOpenAIAPIKey',
- OllamaServiceUnavailable: 'OllamaServiceUnavailable', // 未启动/检测到 Ollama 服务
+ OllamaServiceUnavailable: 'OllamaServiceUnavailable', // Ollama service not started/detected
PluginFailToTransformArguments: 'PluginFailToTransformArguments',
UnknownChatFetchError: 'UnknownChatFetchError',
SystemTimeNotMatchError: 'SystemTimeNotMatchError',
- // ******* 客户端错误 ******* //
+ // ******* Client Errors ******* //
BadRequest: 400,
Unauthorized: 401,
Forbidden: 403,
- ContentNotFound: 404, // 没找到接口
- MethodNotAllowed: 405, // 不支持
+ ContentNotFound: 404, // Endpoint not found
+ MethodNotAllowed: 405, // Method not supported
TooManyRequests: 429,
- // ******* 服务端错误 ******* //InvalidPluginArgumentsTransform
+ // ******* Server Errors ******* //InvalidPluginArgumentsTransform
InternalServerError: 500,
BadGateway: 502,
ServiceUnavailable: 503,
diff --git a/packages/types/src/hotkey.ts b/packages/types/src/hotkey.ts
index 37e286227e7..7acf81de6ea 100644
--- a/packages/types/src/hotkey.ts
+++ b/packages/types/src/hotkey.ts
@@ -84,7 +84,7 @@ export const HotkeyGroupEnum = {
export const HotkeyScopeEnum = {
Chat: 'chat',
Files: 'files',
- // 默认全局注册的快捷键 scope
+ // Default globally registered hotkey scope
// https://react-hotkeys-hook.vercel.app/docs/documentation/hotkeys-provider
Global: 'global',
@@ -96,13 +96,13 @@ export type HotkeyGroupId = (typeof HotkeyGroupEnum)[keyof typeof HotkeyGroupEnu
export type HotkeyScopeId = (typeof HotkeyScopeEnum)[keyof typeof HotkeyScopeEnum];
export interface HotkeyItem {
- // 快捷键分组用于展示
+ // Hotkey grouping for display purposes
group: HotkeyGroupId;
id: HotkeyId;
keys: string;
- // 是否为不可编辑的快捷键
+ // Whether the hotkey is non-editable
nonEditable?: boolean;
- // 快捷键作用域
+ // Hotkey scope
scopes?: HotkeyScopeId[];
}
@@ -119,7 +119,7 @@ export interface DesktopHotkeyItem {
id: DesktopHotkeyId;
keys: string;
- // 是否为不可编辑的快捷键
+ // Whether the hotkey is non-editable
nonEditable?: boolean;
}
diff --git a/packages/types/src/importer.ts b/packages/types/src/importer.ts
index 543a3b95d16..ae9836eecf3 100644
--- a/packages/types/src/importer.ts
+++ b/packages/types/src/importer.ts
@@ -26,11 +26,11 @@ export interface ImportMessage {
createdAt: number;
error?: ChatMessageError;
- // 扩展字段
+ // Extended fields
extra?: {
model?: string;
provider?: string;
- // 翻译
+ // Translation
translate?: ChatTranslate | false | null;
// TTS
tts?: ChatTTS;
diff --git a/packages/types/src/message/common/metadata.ts b/packages/types/src/message/common/metadata.ts
index d37cce0a049..4ffa2114451 100644
--- a/packages/types/src/message/common/metadata.ts
+++ b/packages/types/src/message/common/metadata.ts
@@ -109,8 +109,8 @@ export interface MessageMetadata extends ModelUsage, ModelPerformance {
activeBranchIndex?: number;
activeColumn?: boolean;
/**
- * 消息折叠状态
- * true: 折叠, false/undefined: 展开
+ * Message collapse state
+ * true: collapsed, false/undefined: expanded
*/
collapsed?: boolean;
compare?: boolean;
diff --git a/packages/types/src/message/common/tools.ts b/packages/types/src/message/common/tools.ts
index 8cd28fcb55e..292faac92ec 100644
--- a/packages/types/src/message/common/tools.ts
+++ b/packages/types/src/message/common/tools.ts
@@ -112,7 +112,7 @@ export const ChatToolPayloadSchema = z.object({
});
/**
- * 聊天消息错误对象
+ * Chat message error object
*/
export interface ChatMessagePluginError {
body?: any;
diff --git a/packages/types/src/meta.ts b/packages/types/src/meta.ts
index 09c12b54d1a..25279a865c0 100644
--- a/packages/types/src/meta.ts
+++ b/packages/types/src/meta.ts
@@ -2,11 +2,11 @@ import { z } from 'zod';
export const LobeMetaDataSchema = z.object({
/**
- * 角色头像
+ * Character avatar
*/
avatar: z.string().optional(),
/**
- * 背景色
+ * Background color
*/
backgroundColor: z.string().optional(),
description: z.string().optional(),
@@ -17,7 +17,7 @@ export const LobeMetaDataSchema = z.object({
tags: z.array(z.string()).optional(),
/**
- * 名称
+ * Name
*/
title: z.string().optional(),
});
diff --git a/packages/types/src/topic/topic.ts b/packages/types/src/topic/topic.ts
index a87c2e041ed..5701d7ebb59 100644
--- a/packages/types/src/topic/topic.ts
+++ b/packages/types/src/topic/topic.ts
@@ -1,6 +1,6 @@
import type { BaseDataModel } from '../meta';
-// 类型定义
+// Type definitions
export type TimeGroupId =
| 'today'
| 'yesterday'
diff --git a/packages/web-crawler/src/type.ts b/packages/web-crawler/src/type.ts
index 34b451f317b..5c996d42d83 100644
--- a/packages/web-crawler/src/type.ts
+++ b/packages/web-crawler/src/type.ts
@@ -16,7 +16,7 @@ export interface CrawlErrorResult {
}
export interface FilterOptions {
- // 是否启用Readability
+ // Whether to enable Readability
enableReadability?: boolean;
pureText?: boolean;
@@ -34,12 +34,12 @@ export type CrawlImpl<Params = object> = (
) => Promise<CrawlSuccessResult | undefined>;
export interface CrawlUrlRule {
- // 内容过滤配置(可选)
+ // Content filtering configuration (optional)
filterOptions?: FilterOptions;
impls?: CrawlImplType[];
- // URL匹配模式,仅支持正则表达式
+ // URL matching pattern, only supports regular expressions
urlPattern: string;
- // URL转换模板(可选),如果提供则进行URL转换
+ // URL transformation template (optional), performs URL conversion if provided
urlTransform?: string;
}