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 AgentSetting (#12807)

LobeHub Bot39e36320b22f
diff --git a/src/features/AgentSetting/AgentModal/index.tsx b/src/features/AgentSetting/AgentModal/index.tsx
index 8aa11f295be..1ffeea4d7dc 100644
--- a/src/features/AgentSetting/AgentModal/index.tsx
+++ b/src/features/AgentSetting/AgentModal/index.tsx
@@ -341,12 +341,12 @@ const AgentModal = memo(() => {
itemsType={'group'}
variant={'borderless'}
onFinish={(values) => {
- // 清理 params 中的 undefined 和 null 值,确保禁用的参数被正确移除
+ // Clean up undefined and null values in params to ensure disabled parameters are properly removed
const cleanedValues = { ...values };
if (cleanedValues.params) {
const cleanedParams = { ...cleanedValues.params };
(Object.keys(cleanedParams) as Array<keyof typeof cleanedParams>).forEach((key) => {
- // 使用 null 作为禁用标记(JSON 可以序列化 null,而 undefined 会被忽略)
+ // Use null as disabled marker (JSON can serialize null, while undefined will be ignored)
if (cleanedParams[key] === undefined) {
cleanedParams[key] = null as any;
}
diff --git a/src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx b/src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx
index ea36f7b16cb..04bbf2afdd2 100644
--- a/src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx
+++ b/src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx
@@ -45,7 +45,7 @@ const OpeningQuestions = memo(() => {
const openingQuestions = useStore(selectors.openingQuestions);
const updateConfig = useStore((s) => s.setAgentConfig);
- // 乐观更新,不然会抖
+ // Optimistic update to avoid jitter
const [questions, setQuestions] = useMergeState(openingQuestions, {
onChange: (questions: string[]) => updateConfig({ openingQuestions: questions }),
value: openingQuestions,
@@ -75,7 +75,7 @@ const OpeningQuestions = memo(() => {
[openingQuestions, setQuestions],
);
- // 处理拖拽排序后的逻辑
+ // Handle logic after drag-and-drop sorting
const handleSortEnd = useCallback(
(items: QuestionItem[]) => {
setQuestions(items.map((item) => item.content));
diff --git a/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx b/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx
index 4d1029423de..970aeefbc0d 100644
--- a/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx
+++ b/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx
@@ -25,7 +25,7 @@ const MarketList = memo<{ id: string }>(({ id }) => {
<Switch
loading={pluginManifestLoading[id]}
checked={
- // 如果在加载中,说明激活了
+ // If loading, it means it's activated
pluginManifestLoading[id] || !hasPlugin ? false : plugins.includes(id)
}
onChange={(checked) => {
diff --git a/src/features/AgentSetting/AgentPlugin/PluginAction/index.tsx b/src/features/AgentSetting/AgentPlugin/PluginAction/index.tsx
index ee1a12e915f..9ad6c80a683 100644
--- a/src/features/AgentSetting/AgentPlugin/PluginAction/index.tsx
+++ b/src/features/AgentSetting/AgentPlugin/PluginAction/index.tsx
@@ -20,7 +20,7 @@ const PluginSwitch = memo<{ identifier: string }>(({ identifier }) => {
<Switch
loading={pluginManifestLoading[identifier]}
checked={
- // 如果在加载中,说明激活了
+ // If loading, it means it's activated
pluginManifestLoading[identifier] || !hasPlugin
? false
: userEnabledPlugins.includes(identifier)
diff --git a/src/features/AgentSetting/AgentPlugin/index.tsx b/src/features/AgentSetting/AgentPlugin/index.tsx
index a2025e7dd5f..1dfdb6912e5 100644
--- a/src/features/AgentSetting/AgentPlugin/index.tsx
+++ b/src/features/AgentSetting/AgentPlugin/index.tsx
@@ -71,7 +71,7 @@ const AgentPlugin = memo(() => {
// =========== Deprecated Plugin List =========== //
- // 检查出不在 installedPlugins 中的插件
+ // Find plugins that are not in installedPlugins
const deprecatedList = userEnabledPlugins
.filter((pluginId) => !installedPlugins.some((p) => p.identifier === pluginId))
.map((id) => ({
diff --git a/src/features/AgentSetting/store/action.ts b/src/features/AgentSetting/store/action.ts
index 9af81bbea9d..9b09df59cea 100644
--- a/src/features/AgentSetting/store/action.ts
+++ b/src/features/AgentSetting/store/action.ts
@@ -30,26 +30,26 @@ import { metaDataReducer } from './reducers/meta';
export interface PublicAction {
/**
- * 自动完成代理描述
- * @param id - 代理的 ID
- * @returns 一个 Promise,用于异步操作完成后的处理
+ * Autocomplete agent description
+ * @param id - Agent ID
+ * @returns A Promise for handling after asynchronous operation completes
*/
autocompleteAgentDescription: () => Promise<void>;
autocompleteAgentTags: () => Promise<void>;
/**
- * 自动完成代理标题
- * @param id - 代理的 ID
- * @returns 一个 Promise,用于异步操作完成后的处理
+ * Autocomplete agent title
+ * @param id - Agent ID
+ * @returns A Promise for handling after asynchronous operation completes
*/
autocompleteAgentTitle: () => Promise<void>;
/**
- * 自动完成助理元数据
+ * Autocomplete assistant metadata
*/
autocompleteAllMeta: (replace?: boolean) => void;
autocompleteMeta: (key: keyof MetaData) => void;
/**
- * 自动选择表情
- * @param id - 表情的 ID
+ * Auto pick emoji
+ * @param id - Emoji ID
*/
autoPickEmoji: () => Promise<void>;
}
@@ -72,14 +72,14 @@ export interface Action extends PublicAction {
toggleAgentPlugin: (pluginId: string, state?: boolean) => void;
/**
- * 更新加载状态
- * @param key - SessionLoadingState 的键
- * @param value - 加载状态的值
+ * Update loading state
+ * @param key - Key of SessionLoadingState
+ * @param value - Value of the loading state
*/
updateLoadingState: (key: keyof LoadingState, value: boolean) => void;
/**
- * 更新保存状态
- * @param status - 保存状态
+ * Update save status
+ * @param status - Save status
*/
updateSaveStatus: (status: SaveStatus) => void;
}
@@ -118,7 +118,7 @@ export const store: StateCreator<Store, [['zustand/devtools', never]]> = (set, g
const preValue = meta.description;
- // 替换为 ...
+ // Replace with ...
dispatchMeta({ type: 'update', value: { description: '...' } });
chatService.fetchPresetTaskResult({
@@ -145,7 +145,7 @@ export const store: StateCreator<Store, [['zustand/devtools', never]]> = (set, g
const preValue = meta.tags;
- // 替换为 ...
+ // Replace with ...
dispatchMeta({ type: 'update', value: { tags: ['...'] } });
// Get current agent for agentMeta
@@ -176,7 +176,7 @@ export const store: StateCreator<Store, [['zustand/devtools', never]]> = (set, g
const previousTitle = meta.title;
- // 替换为 ...
+ // Replace with ...
dispatchMeta({ type: 'update', value: { title: '...' } });
chatService.fetchPresetTaskResult({