chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useRef, useEffect } from 'react';
|
||||
|
||||
export function useUnmountSignal() {
|
||||
@@ -35,7 +35,7 @@ export function useUnmountSignal() {
|
||||
return controllerRef.current.signal;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 得是 any
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- must be any
|
||||
export function abortable<T extends (...args: any[]) => any | Promise<any>>(
|
||||
func: T,
|
||||
abortSignal: AbortSignal,
|
||||
|
||||
@@ -35,7 +35,7 @@ const LimitCount: React.FC<LimitCountProps> = ({ maxLen, len }) => (
|
||||
);
|
||||
|
||||
export interface InputWithCountProps extends InputProps {
|
||||
// 设置字数限制并显示字数统计
|
||||
// Set word limits and display word count
|
||||
getValueLength?: (value?: InputProps['value'] | string) => number;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export const getDatabasePageQuery = (): DatabasePageQuery => {
|
||||
};
|
||||
};
|
||||
|
||||
/** 获取 databse 页面模式,如果等于 'modal' 则需要使用全屏形态 */
|
||||
/** Get the Databse page mode, if it is equal to'modal ', you need to use the full-screen mode */
|
||||
export const getDatabasePageMode = (): DatabasePageQuery['page_mode'] => {
|
||||
if (isDatabasePathname()) {
|
||||
return getDatabasePageQuery()?.page_mode;
|
||||
@@ -44,6 +44,6 @@ export const getDatabasePageMode = (): DatabasePageQuery['page_mode'] => {
|
||||
return 'normal';
|
||||
};
|
||||
|
||||
/** 当前 Database 页面模式是弹窗(全屏)形式 */
|
||||
/** The current Database page mode is a pop-up (full screen) format */
|
||||
export const databasePageModeIsModal = (): boolean =>
|
||||
getDatabasePageMode() === 'modal';
|
||||
|
||||
@@ -21,7 +21,7 @@ import { type DocumentSource } from '@coze-arch/bot-api/knowledge';
|
||||
import { isFeishuOrLarkDocumentSource } from './feishu-lark';
|
||||
|
||||
/**
|
||||
* FIXME: 由于后端限制,前端需要在Feishu/Lark路径上去除30天的更新频率,等后续后端解决后即可去掉
|
||||
* FIXME: Due to backend limitations, the front end needs to remove the 30-day update frequency on the Feishu/Lark path, which can be removed after the subsequent backend is resolved.
|
||||
*/
|
||||
export const getUpdateIntervalOptions = (
|
||||
params: {
|
||||
@@ -84,7 +84,7 @@ export const getAppendUpdateIntervalOptions = () => [
|
||||
},
|
||||
];
|
||||
|
||||
// table类型暂时禁用追加更新的更新类型,待后续支持后下掉区分逻辑
|
||||
// Table type Temporarily disables the update type of additional updates, and drops the distinction logic after subsequent support
|
||||
export const getUpdateTypeOptions = (type: FormatType) => [
|
||||
{
|
||||
value: 1,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
const DOMAIN_REGEXP = /^([0-9a-zA-Z-]{1,}\.)+([a-zA-Z]{2,})$/;
|
||||
|
||||
export function isValidUrl(url: string): boolean {
|
||||
@@ -24,7 +24,7 @@ export function isValidUrl(url: string): boolean {
|
||||
// cp-disable-next-line
|
||||
(url.indexOf('https://') !== -1 || url.indexOf('http://') !== -1)
|
||||
);
|
||||
// eslint-disable-next-line @coze-arch/use-error-in-catch -- 根据函数功能无需 throw error
|
||||
// eslint-disable-next-line @coze-arch/use-error-in-catch -- no need to throw error according to function function
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user