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.
*/
import { type FC } from 'react';
import { Avatar } 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 React, { type HTMLAttributes, forwardRef } from 'react';
import classNames from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } 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.
*/
export const highlightFilterStyle = {
border: '1px solid var(--semi-color-focus-border)',
};

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { default as Plugin } from './pages/plugin';
export { default as Tool } from './pages/tool';
export { default as MocksetDetail } from './pages/mockset';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate, useParams } from 'react-router-dom';
import React from 'react';
@@ -47,7 +47,9 @@ const DatabaseDetailPage = () => {
// eslint-disable-next-line max-params
toResource: (resource, resourceID, query, opts) =>
navigate(
`/space/${params.spaceID}/${resource}/${resourceID}?${qs.stringify(query)}`,
`/space/${params.spaceID}/${resource}/${resourceID}?${qs.stringify(
query,
)}`,
opts,
),
}}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useRequest } from 'ahooks';
import {
type IntelligenceBasicInfo,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { Typography } 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.
*/
/* eslint @coze-arch/max-line-per-function: ["error", {"max": 500}] */
/* eslint-disable complexity */
import { useNavigate } from 'react-router-dom';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { useRef, type FC } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { I18n, type I18nKeysNoOptionsType } 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 { type FC } from 'react';
import { Typography } 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 { SearchScope } from '@coze-arch/idl/intelligence_api';
import {

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Dispatch, type SetStateAction } from 'react';
import { cloneDeep, merge } from 'lodash-es';

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { type SetStateAction, type Dispatch, type ReactNode } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect, useRef } from 'react';
import axios, { type CancelTokenSource } from 'axios';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { type Dispatch, type SetStateAction, useEffect } from 'react';

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { produce } from 'immer';
import {
type IntelligenceBasicInfo,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { exhaustiveCheckForRecord } from '@coze-common/chat-area-utils';
import { SearchScope } from '@coze-arch/idl/intelligence_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';
import { DevelopCustomPublishStatus, DevelopCustomTypeStatus } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SearchScope } from '@coze-arch/idl/intelligence_api';
import { DevelopCustomPublishStatus } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import mitt, { type Emitter } from 'mitt';
import { uniqBy } from 'lodash-es';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate, useParams } from 'react-router-dom';
import qs from 'qs';
@@ -63,12 +63,16 @@ export const KnowledgePreviewPage = () => {
// eslint-disable-next-line max-params
toResource: (resource, resourceID, query, opts) =>
navigate(
`/space/${params.spaceID}/${resource}/${resourceID}?${qs.stringify(query)}`,
`/space/${params.spaceID}/${resource}/${resourceID}?${qs.stringify(
query,
)}`,
opts,
),
upload: (query, opts) =>
navigate(
`/space/${params.spaceID}/knowledge/${params.datasetID}/upload?${qs.stringify(query)}`,
`/space/${params.spaceID}/knowledge/${
params.datasetID
}/upload?${qs.stringify(query)}`,
opts,
),
}}

View File

@@ -67,12 +67,16 @@ export const KnowledgeUploadPage = () => {
// eslint-disable-next-line max-params
toResource: (resource, resourceID, query, opts) =>
navigate(
`/space/${params.spaceID}/${resource}/${resourceID}?${qs.stringify(query)}`,
`/space/${params.spaceID}/${resource}/${resourceID}?${qs.stringify(
query,
)}`,
opts,
),
upload: (query, opts) =>
navigate(
`/space/${params.spaceID}/knowledge/${params.datasetID}/upload?${qs.stringify(query)}`,
`/space/${params.spaceID}/knowledge/${
params.datasetID
}/upload?${qs.stringify(query)}`,
opts,
),
}}

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React 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 { I18n } from '@coze-arch/i18n';
import {
PublishStatus,

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type MouseEvent } from 'react';
import { useSize } from 'ahooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode } from 'react';
import { type ResourceInfo } from '@coze-arch/idl/plugin_develop';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { useRequest } from 'ahooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { useRequest } from 'ahooks';
@@ -166,7 +166,9 @@ export const useKnowledgeConfig: UseEntityConfigHook = ({
} = useCreateKnowledgeModalV2({
onFinish: (datasetID, unitType, shouldUpload) => {
navigate(
`/space/${spaceId}/knowledge/${datasetID}${shouldUpload ? '/upload' : ''}?type=${unitType}&from=create`,
`/space/${spaceId}/knowledge/${datasetID}${
shouldUpload ? '/upload' : ''
}?type=${unitType}&from=create`,
);
closeCreateKnowledgeModal();
},

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate } from 'react-router-dom';
import { useRef } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useWorkflowResourceAction } from '@coze-workflow/components';
import { useUserInfo } from '@coze-foundation/account-adapter';
import { ResType, WorkflowMode } from '@coze-arch/idl/plugin_develop';

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode } from 'react';
import { type CascaderData } 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 { MockSetList } from '@coze-agent-ide/bot-plugin/page';
const Plugin = ({

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MockSetDetail } from '@coze-agent-ide/bot-plugin/page';
const Plugin = ({

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { PluginDetailPage } from '@coze-agent-ide/bot-plugin/page';
export default PluginDetailPage;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ToolDetailPage } from '@coze-agent-ide/bot-plugin/page';
export default ToolDetailPage;

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 qs from 'qs';
import { pick } from 'lodash-es';
import { type PluginNavType } from '@coze-studio/bot-plugin-store/src/context';
@@ -53,13 +53,17 @@ export function resourceNavigate(
),
mocksetList: (toolID, query, opts) =>
navigate(
`${navBase}/plugin/${pluginID}/tool/${toolID}/plugin-mock-set?${qs.stringify(query)}`,
`${navBase}/plugin/${pluginID}/tool/${toolID}/plugin-mock-set?${qs.stringify(
query,
)}`,
opts,
),
// eslint-disable-next-line max-params
mocksetDetail: (toolID, mocksetID, query, opts) =>
navigate(
`${navBase}/plugin/${pluginID}/tool/${toolID}/plugin-mock-set/${mocksetID}?${qs.stringify(query)}`,
`${navBase}/plugin/${pluginID}/tool/${toolID}/plugin-mock-set/${mocksetID}?${qs.stringify(
query,
)}`,
opts,
),
cloudIDE: (query, opts) =>

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({