🤯 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🌐 chore: translate non-English comments to English in chat-input-features (#13119)
LobeHub Bot15cda726a00f
diff --git a/src/features/ChatInput/ActionBar/Params/Controls.tsx b/src/features/ChatInput/ActionBar/Params/Controls.tsxindex 322ec058ea8..c70d06d265a 100644--- a/src/features/ChatInput/ActionBar/Params/Controls.tsx+++ b/src/features/ChatInput/ActionBar/Params/Controls.tsx@@ -249,17 +249,17 @@ const Controls = memo<ControlsProps>(({ setUpdating, updating }) => {form.setFieldValue(namePath, nextValue);}- // 立即保存变更 - 手动构造配置对象确保使用最新值+ // Save changes immediately - manually construct config object to ensure latest values are usedsetUpdating(true);const currentValues = form.getFieldsValue();const prevParams = (currentValues.params ?? {}) as Record<ParamKey, number | undefined>;const currentParams: Record<ParamKey, number | undefined> = { ...prevParams };if (newValue === undefined) {- // 显式删除该属性,而不是设置为 undefined- // 这样可以确保 Form 表单状态同步+ // Explicitly delete the property instead of setting it to undefined+ // This ensures the Form state stays in syncdelete currentParams[key];- // 使用 null 作为禁用标记(数据库会保留 null,前端据此判断复选框状态)+ // Use null as a disabled marker (the database preserves null, and the frontend uses it to determine checkbox state)currentParams[key] = null as any;} else {currentParams[key] = newValue;@@ -276,7 +276,7 @@ const Controls = memo<ControlsProps>(({ setUpdating, updating }) => {[form, setUpdating, updateAgentConfig],);- // 使用 useMemo 确保防抖函数只创建一次+ // Use useMemo to ensure the debounce function is only created onceconst handleValuesChange = useCallback(debounce(async (values) => {setUpdating(true);diff --git a/src/features/ChatInput/ActionBar/STT/common.tsx b/src/features/ChatInput/ActionBar/STT/common.tsxindex ab34475215d..4ab1a7d5715 100644--- a/src/features/ChatInput/ActionBar/STT/common.tsx+++ b/src/features/ChatInput/ActionBar/STT/common.tsx@@ -55,7 +55,7 @@ const CommonSTT = memo<{variant={mobile ? 'outlined' : 'borderless'}dropdown={{menu: {- // @ts-expect-error 等待 antd 修复+ // @ts-expect-error waiting for antd to fix thisactiveKey: 'time',items: [{diff --git a/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx b/src/features/ChatInput/ActionBar/components/ActionDropdown.tsxindex 8967c697192..b85c560f0f0 100644--- a/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx+++ b/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx@@ -61,7 +61,7 @@ export interface ActionDropdownProps extends Omit<DropdownMenuProps, 'items'> {minWidth?: number | string;popupRender?: (menu: ReactNode) => ReactNode;/**- * 是否在挂载时预渲染弹层,避免首次触发展开时的渲染卡顿+ * Whether to pre-render the dropdown overlay on mount, to avoid rendering lag on first expand*/prefetch?: boolean;trigger?: PopoverTrigger;diff --git a/src/features/ChatInput/hooks/useAgentEnableSearch.ts b/src/features/ChatInput/hooks/useAgentEnableSearch.tsindex d08e183546e..3c285ec51eb 100644--- a/src/features/ChatInput/hooks/useAgentEnableSearch.ts+++ b/src/features/ChatInput/hooks/useAgentEnableSearch.ts@@ -20,9 +20,9 @@ export const useAgentEnableSearch = () => {const searchImpl = useAiInfraStore(aiModelSelectors.modelBuiltinSearchImpl(model, provider));- // 只要是内置的搜索实现,一定可以联网搜索+ // If using a built-in search implementation, web search is always availableif (searchImpl === 'internal') return true;- // 如果是关闭状态,一定不能联网搜索+ // If the search mode is off, web search is never availablereturn agentSearchMode !== 'off';};diff --git a/src/features/DataImporter/ImportDetail.tsx b/src/features/DataImporter/ImportDetail.tsxindex 7a0c9928fc8..85ca64b036c 100644--- a/src/features/DataImporter/ImportDetail.tsx+++ b/src/features/DataImporter/ImportDetail.tsx@@ -100,7 +100,7 @@ const ImportPreviewModal = ({const tables = getNonEmptyTables(importData);const totalRecords = getTotalRecords(tables);- // 表格列定义+ // Table column definitionsconst columns = [{dataIndex: 'name',diff --git a/src/features/FileViewer/Renderer/PDF/HighlightLayer.tsx b/src/features/FileViewer/Renderer/PDF/HighlightLayer.tsxindex eb6edafcdbd..528fd5b5594 100644--- a/src/features/FileViewer/Renderer/PDF/HighlightLayer.tsx+++ b/src/features/FileViewer/Renderer/PDF/HighlightLayer.tsx@@ -12,10 +12,10 @@ interface HighlightRectProps {const HighlightRect: FC<HighlightRectProps> = ({ coordinates, highlight }) => {const { points } = coordinates;- // 假设points数组包含矩形的四个顶点坐标+ // Assume the points array contains the four vertex coordinates of the rectangleconst [topLeft, topRight, bottomRight, bottomLeft] = points;- // 计算矩形的属性+ // Calculate rectangle propertiesconst minX = Math.min(topLeft[0], topRight[0], bottomRight[0], bottomLeft[0]);const minY = Math.min(topLeft[1], topRight[1], bottomRight[1], bottomLeft[1]);const width = Math.max(topLeft[0], topRight[0], bottomRight[0], bottomLeft[0]) - minX;diff --git a/src/features/Pages/PageLayout/style.ts b/src/features/Pages/PageLayout/style.tsindex f668cde86b8..431e17cd31e 100644--- a/src/features/Pages/PageLayout/style.ts+++ b/src/features/Pages/PageLayout/style.ts@@ -1,7 +1,7 @@import { createStaticStyles } from 'antd-style';export const styles = createStaticStyles(({ css, cssVar }) => ({- // 主容器+ // Main containermainContainer: css`position: relative;overflow: hidden;diff --git a/src/features/PluginsUI/Render/DefaultType/IFrameRender/index.tsx b/src/features/PluginsUI/Render/DefaultType/IFrameRender/index.tsxindex 0f49369d8ff..17650e5ce5d 100644--- a/src/features/PluginsUI/Render/DefaultType/IFrameRender/index.tsx+++ b/src/features/PluginsUI/Render/DefaultType/IFrameRender/index.tsx@@ -16,7 +16,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, width = 800, height = 300,const iframeRef = useRef<HTMLIFrameElement>(null);const [loading, setLoading] = useState(true);- // 当 props 发生变化时,主动向 iframe 发送数据+ // When props change, proactively send data to the iframeuseOnPluginReadyForInteraction(() => {const iframeWin = iframeRef.current?.contentWindow;@@ -46,7 +46,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, width = 800, height = 300,width={width}style={{border: 0,- // iframe 在 color-scheme:dark 模式下无法透明+ // iframe cannot be transparent in color-scheme:dark mode// refs: https://www.jianshu.com/p/bc5a37bb6a7bcolorScheme: 'light',maxWidth: '100%',diff --git a/src/features/PluginsUI/Render/DefaultType/SystemJsRender/index.tsx b/src/features/PluginsUI/Render/DefaultType/SystemJsRender/index.tsxindex bd6be24722c..5fd05df01cd 100644--- a/src/features/PluginsUI/Render/DefaultType/SystemJsRender/index.tsx+++ b/src/features/PluginsUI/Render/DefaultType/SystemJsRender/index.tsx@@ -21,7 +21,7 @@ const SystemJsRender = memo<SystemJsRenderProps>(({ url, ...props }) => {.then((module1) => {setComp(module1.default);RenderCache[url] = module1.default;- // 使用module1模块+ // Use the module1 module}).catch((error) => {setComp(undefined);diff --git a/src/features/PluginsUI/Render/DefaultType/SystemJsRender/utils.ts b/src/features/PluginsUI/Render/DefaultType/SystemJsRender/utils.tsindex a62d0aa3160..e61d0538da5 100644--- a/src/features/PluginsUI/Render/DefaultType/SystemJsRender/utils.ts+++ b/src/features/PluginsUI/Render/DefaultType/SystemJsRender/utils.ts@@ -1,6 +1,6 @@/**- * 本动态加载模块使用 SystemJS 实现,在 Lobe Chat 中缓存了 React、ReactDOM、antd、antd-style 四个模块。+ * This dynamic loading module is implemented using SystemJS, caching four modules in Lobe Chat: React, ReactDOM, antd, and antd-style.*/import 'systemjs';diff --git a/src/features/PluginsUI/Render/StandaloneType/Iframe.tsx b/src/features/PluginsUI/Render/StandaloneType/Iframe.tsxindex 0d4b9ead9c4..d93bb82e3de 100644--- a/src/features/PluginsUI/Render/StandaloneType/Iframe.tsx+++ b/src/features/PluginsUI/Render/StandaloneType/Iframe.tsx@@ -148,7 +148,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, id, payload, width = 600, hwidth={width}style={{border: 0,- // iframe 在 color-scheme:dark 模式下无法透明+ // iframe cannot be transparent in color-scheme:dark mode// refs: https://www.jianshu.com/p/bc5a37bb6a7bcolorScheme: 'light',maxWidth: '100%',diff --git a/src/features/ShareModal/SharePdf/PdfPreview.tsx b/src/features/ShareModal/SharePdf/PdfPreview.tsxindex 90ca25352a6..d386993aefa 100644--- a/src/features/ShareModal/SharePdf/PdfPreview.tsx+++ b/src/features/ShareModal/SharePdf/PdfPreview.tsx@@ -259,7 +259,7 @@ const PdfPreview = memo<PdfPreviewProps>(({ loading, pdfData, onGeneratePdf }) =</Document></div>- {/* 页脚导航 */}+ {/* Footer navigation */}{pdfData && numPages > 1 && (<div className={localStyles.footerNavigation}><Flexbox horizontal align="center" gap={8} justify="center">@@ -297,7 +297,7 @@ const PdfPreview = memo<PdfPreviewProps>(({ loading, pdfData, onGeneratePdf }) =)}</div>- {/* 全屏模态框 */}+ {/* Fullscreen modal */}<Modalcenteredfooter={null}@@ -320,7 +320,7 @@ const PdfPreview = memo<PdfPreviewProps>(({ loading, pdfData, onGeneratePdf }) =</Document></div>- {/* 全屏模式下的导航 */}+ {/* Navigation in fullscreen mode */}{numPages > 1 && (<div className={localStyles.fullscreenNavigation}><Flexbox horizontal align="center" gap={12}>