chore: format all frontend files (#430)
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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)',
|
||||
};
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import {
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
export {
|
||||
Content,
|
||||
Header,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 = ({
|
||||
|
||||
@@ -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 = ({
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/// <reference types='@coze-arch/bot-typings' />
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user