chore: format all frontend files (#430)

This commit is contained in:
tecvan
2025-07-31 23:15:48 +08:00
committed by GitHub
parent 8b078ff013
commit 6995cec404
8787 changed files with 11975 additions and 10924 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum BotE2e {
BotTab = 'bot.tab',
BotListSearch = 'bot.list.search.input',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum CommonE2e {
PictureUpload = 'common.picture.upload',
CommonFilePicker = 'common.file.picker',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { KnowledgeE2e } from './knowledge-e2e';
export { BotE2e } from './bot-e2e';
export { CommonE2e } from './common-e2e';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum KnowledgeE2e {
KnowledgeTab = 'knowledge.tab',
// Knowledge Base List

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum VariableE2e {
VariableTreeDeleteBtn = 'variable.tree.delete.btn',
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import { unstable_batchedUpdates } from 'react-dom';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ExternalStore } from './external-store';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import type { SetRequired } from 'type-fest';
import type { Draft } from 'immer';
@@ -57,7 +57,11 @@ export interface FeatureTypeInternalThisType<Type> {
export type Disposer = () => void;
export class FeatureRegistry<Type, Module, Context = undefined> extends ExternalStore<{
export class FeatureRegistry<
Type,
Module,
Context = undefined,
> extends ExternalStore<{
featureMap: Map<string, FeatureConfig<Type, Module>>;
}> {
protected name: string;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useSyncExternalStore } from 'use-sync-external-store/shim';
import type { IExternalStore } from './external-store';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference types='@coze-arch/bot-typings' />

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DemoComponent } from '../src';
export default {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { defineConfig } from '@coze-arch/vitest-config';
export default defineConfig({

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, describe, test, vi } from 'vitest';
import { dataReporter } from '../src/reporter/data-reporter';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention */
import React, { useState } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, describe, test, vi } from 'vitest';
import { reporterFun } from '../src/reporter/utils';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { type FC, type PropsWithChildren } from 'react';
import { logger, ErrorBoundary } from '@coze-arch/logger';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum DataNamespace {
KNOWLEDGE = 'knowledge',
DATABASE = 'database',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {
DataErrorBoundary,
ErrorFallbackComponent,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import type { ErrorEvent, CustomEvent } from '@coze-arch/logger';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { dataReporter } from './data-reporter';

View File

@@ -13,12 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
reporter,
type CustomEvent,
type ErrorEvent,
} from '@coze-arch/logger';
import { reporter, type CustomEvent, type ErrorEvent } from '@coze-arch/logger';
import { type DataNamespace } from '../constants';
export const reporterFun = <EventEnum extends string>(

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare module '*.less' {
const resource: { [key: string]: string };
export = resource;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DataErrorBoundary, DataNamespace } from '../src';
export default {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { defineConfig } from '@coze-arch/vitest-config';
export default defineConfig({

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, vi, describe, test } from 'vitest';
import { fireEvent, render, screen } from '@testing-library/react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, describe, test } from 'vitest';
import { isValidUrl, completeUrl } from '../src/url';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, vi, describe, test } from 'vitest';
import { fireEvent, render, screen } from '@testing-library/react';
import { type SelectProps } from '@coze-arch/coze-design';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useState } from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import { Input, type InputProps, withField } from '@coze-arch/coze-design';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import cs from 'classnames';
import { useReactive } from 'ahooks';
import { Select, type SelectProps } from '@coze-arch/coze-design';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { forwardRef } from 'react';
import cs from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
interface DatabasePageQuery {
page_mode?: 'modal' | 'normal';
from?: 'bot' | 'workflow' | 'library' | 'create';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DataSourceType } from '@coze-arch/bot-api/memory';
import { DocumentSource } from '@coze-arch/bot-api/knowledge';
import { UnitType } from '@coze-data/knowledge-resource-processor-core';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useState } from 'react';
import cls from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { isValidUrl, completeUrl } from './url';
export { getFormatTypeFromUnitType } from './knowledge-page';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { UnitType } from '@coze-data/knowledge-resource-processor-core';
import { FormatType } from '@coze-arch/bot-api/knowledge';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum FilterKnowledgeType {
ALL = 'ALL',
TEXT = 'TEXT',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference types='@coze-arch/bot-typings' />
/// <reference types='@coze-arch/bot-env/typings' />

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { FormatType } from '@coze-arch/bot-api/memory';
import { type DocumentSource } from '@coze-arch/bot-api/knowledge';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
getDataTypeOptions,
DataTypeSelect,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { defineConfig } from '@coze-arch/vitest-config';
export default defineConfig({