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,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 { useShallow } from 'zustand/react/shallow';
import { getBotDetailIsReadonlyByState } from '../utils/get-read-only';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useBotSkillStore } from '../store/bot-skill';
export const useChatBackgroundState = () => {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { avatarBackgroundWebSocket } from './utils/avatar-background-socket';
export { useBotDetailIsReadonly } from './hooks/use-bot-detail-readonly';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
REPORT_EVENTS as ReportEventNames,
createReportEvent,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { logger } from '@coze-arch/logger';
import { getFlags } from '@coze-arch/bot-flags';
import { PlaygroundApi } from '@coze-arch/bot-api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type BackgroundImageInfo } from '@coze-arch/bot-api/developer_api';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type HostedObserverConfig } from '@coze-studio/autosave';
import { type BotSkillStore } from '@/store/bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';
import type { KnowledgeConfig } from '@/types/skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type LayoutInfo } from '@coze-arch/idl/developer_api';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type OnboardingInfo } from '@coze-arch/bot-api/playground_api';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { cloneDeep } from 'lodash-es';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';
import type { BotSuggestionConfig } from '@/types/skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';
import { type BotSkillStore, useBotSkillStore } from '@/store/bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { REPORT_EVENTS as ReportEventNames } from '@coze-arch/report-events';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';
import { CustomError } from '@coze-arch/bot-error';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { merge } from 'lodash-es';
import { type BotInfoForUpdate } from '@coze-arch/idl/playground_api';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { cloneDeep, uniqBy } from 'lodash-es';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AutosaveManager } from '@coze-studio/autosave';
import { useBotSkillStore, type BotSkillStore } from '@/store/bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { personaSaveManager } from './persona';
import { modelSaveManager } from './model';
import { botSkillSaveManager } from './bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ModelInfo } from '@coze-arch/bot-api/developer_api';
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ModelInfo } from '@coze-arch/bot-api/developer_api';
import { AutosaveManager } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';
import { ItemTypeExtra } from '../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useSpaceStore } from '@coze-arch/bot-studio-store';
import { PlaygroundApi } from '@coze-arch/bot-api';
import { AutosaveManager, type SaveRequest } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DebounceTime, type HostedObserverConfig } from '@coze-studio/autosave';
import {

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { PlaygroundApi } from '@coze-arch/bot-api';
import { type SaveRequest } from '@coze-studio/autosave';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { autosaveManager } from './auto-save/index';
export { personaSaveManager } from './auto-save/persona';
export { botSkillSaveManager } from './auto-save/bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type HookInfo } from '@coze-arch/idl/playground_api';
import { ItemType } from '@coze-arch/bot-api/developer_api';

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ItemType } from '@coze-arch/bot-api/developer_api';
import { useBotSkillStore } from '@/store/bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useSpaceStore } from '@coze-arch/bot-studio-store';
import { type MultiAgentConnectorType } from '@coze-arch/bot-api/playground_api';
import { PlaygroundApi } from '@coze-arch/bot-api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type UpdateDraftBotInfoAgwResponse } from '@coze-arch/idl/playground_api';
import { type UserQueryCollectConf } from '@coze-arch/bot-api/developer_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { saveFetcher, updateBotRequest } from '../utils/save-fetcher';
import { ItemTypeExtra } from '../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useBotSkillStore } from '@/store/bot-skill';
import { saveFetcher, updateBotRequest } from '../utils/save-fetcher';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { cloneDeep, merge } from 'lodash-es';
import { useBotSkillStore } from '@/store/bot-skill';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ItemType } from '@coze-arch/bot-api/developer_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dayjs from 'dayjs';
import { REPORT_EVENTS as ReportEventNames } from '@coze-arch/report-events';
import { reporter } from '@coze-arch/logger';

View File

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

View File

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

View File

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

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 { BotTableRWMode } from '@coze-arch/bot-api/memory';
import {

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools, subscribeWithSelector } from 'zustand/middleware';
import { create } from 'zustand';
import { isFunction } from 'lodash-es';

View File

@@ -331,7 +331,7 @@ export const transformVo2Dto = {
flow_mode: w.flow_mode,
workflow_name: w.name,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}) as any,
} as any),
),
knowledge: (knowledge: KnowledgeConfig): BotInfoForUpdate['knowledge'] => ({

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { logger } from '@coze-arch/logger';
import { useSpaceStore } from '@coze-arch/bot-studio-store';
import { SpaceType } from '@coze-arch/bot-api/developer_api';

View File

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

View File

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

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useAuditInfoStore } from '@/store/audit-info';
import { useQueryCollectStore } from './query-collect';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* To fulfill a miraculous function
* In multi agent mode, replying.

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools } from 'zustand/middleware';
import { create } from 'zustand';
import { isNil } from 'lodash-es';

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 type { AgentBizInfo } from '../../types/agent';

View File

@@ -13,6 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { useMultiAgentStore, type MultiAgentStore } from './store';
export { DEFAULT_AGENT_BIZ_INFO } from './defaults';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools, subscribeWithSelector } from 'zustand/middleware';
import { create } from 'zustand';
import { nanoid } from 'nanoid';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { nanoid } from 'nanoid';
import { omit } 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 { type TabDisplayItems, TabStatus } from '@coze-arch/idl/developer_api';
export const DEFAULT_BOT_SKILL_BLOCK_COLLAPSIBLE_STATE =

View File

@@ -13,6 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { usePageRuntimeStore, type PageRuntime } from './store';
export { DEFAULT_BOT_SKILL_BLOCK_COLLAPSIBLE_STATE } from './defaults';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools, subscribeWithSelector } from 'zustand/middleware';
import { create } from 'zustand';
import { size } from 'lodash-es';
@@ -110,7 +110,7 @@ export const usePageRuntimeStore = create<PageRuntime & PageRuntimeAction>()(
/**
* Get the status of the user's active expand/collapse bot capability module
* ⚠️ Called only when opening my bot edit page for the first time
* @see
* @see
*/
getBotSkillBlockCollapsibleState: async () => {
try {
@@ -138,7 +138,7 @@ export const usePageRuntimeStore = create<PageRuntime & PageRuntimeAction>()(
/**
* Stores the status of the user's active expand/retract bot capability module
* ⚠️ Only record when active
* @see
* @see
*/
setBotSkillBlockCollapsibleState: (
$params: TabDisplayItems,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools, subscribeWithSelector } from 'zustand/middleware';
import { create } from 'zustand';
import { produce } from 'immer';
@@ -79,11 +79,11 @@ export const usePersonaStore = create<PersonaStore & PersonaAction>()(
prompt_type: PromptType.SYSTEM,
isOptimize: false,
record_id: '',
}) as unknown as RequiredBotPrompt,
} as unknown as RequiredBotPrompt),
transformVo2Dto: persona =>
({
prompt: persona?.data || '',
}) as unknown as BotInfoForUpdate['prompt_info'],
} as unknown as BotInfoForUpdate['prompt_info']),
initStore: botData => {
const { setPersonaByImmer, transformDto2Vo } = get();
botData &&

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools, subscribeWithSelector } from 'zustand/middleware';
import { create } from 'zustand';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type PartialRequired } from '@coze-arch/bot-typings/common';
import type { DraftBotApi } from '@coze-arch/bot-api/playground_api';
import type {

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Model, ModelInfo } from '@coze-arch/bot-api/developer_api';
/** Model Settings */

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { BotPrompt, PromptType } from '@coze-arch/bot-api/developer_api';
export interface RequiredBotPrompt extends BotPrompt {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ShortCutStruct } from '@coze-agent-ide/tool-config/src/shortcut-config/type';
import {
type PluginStatus,
@@ -29,10 +29,7 @@ import {
type RecallStrategy,
type DefaultUserInputType,
} from '@coze-arch/bot-api/playground_api';
import {
type BotTableRWMode,
type FieldItem,
} from '@coze-arch/bot-api/memory';
import { type BotTableRWMode, type FieldItem } from '@coze-arch/bot-api/memory';
import { type Dataset } from '@coze-arch/bot-api/knowledge';
import type {
FileboxInfo,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type RemoveOptional<T> = {
[K in keyof T]-?: T[K];
};

View File

@@ -13,15 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { withSlardarIdButton } from '@coze-studio/bot-utils';
import { logger } from '@coze-arch/logger';
import { I18n } from '@coze-arch/i18n';
import { arrayBufferToObject } from '@coze-arch/bot-utils';
import {
type GenPicMessage,
PicType,
} from '@coze-arch/bot-api/playground_api';
import { type GenPicMessage, PicType } from '@coze-arch/bot-api/playground_api';
import { PlaygroundApi } from '@coze-arch/bot-api';
import webSocketManager, {
type Connection,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { globalVars } from '@coze-arch/web-context';
export const getExecuteDraftBotRequestId = (): string =>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { withSlardarIdButton } from '@coze-studio/bot-utils';
import { I18n } from '@coze-arch/i18n';
import { Toast } from '@coze-arch/bot-semi';

View File

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

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { usePageRuntimeStore } from '../store/page-runtime';
import { useCollaborationStore, EditLockStatus } from '../store/collaboration';

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 { Toast } from '@coze-arch/bot-semi';
import { MultiAgentSessionType } from '@coze-arch/bot-api/playground_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Branch, type Committer } from '@coze-arch/bot-api/developer_api';
import { useCollaborationStore } from '../store/collaboration';

View File

@@ -13,4 +13,3 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { omit } from 'lodash-es';
import type { PluginApi } from '@coze-arch/bot-api/playground_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { PromptType } from '@coze-arch/bot-api/developer_api';
export function replacedBotPrompt(data) {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type BotPrompt, PromptType } from '@coze-arch/bot-api/developer_api';
import { usePersonaStore } from '../store/persona';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type create } from 'zustand';
export interface SetterAction<T> {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCollaborationStore } from '../store/collaboration';
export function createStorage<T extends object>(

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 { UIToast } from '@coze-arch/bot-semi';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type VariableItem, VariableKeyErrType } from '../types/skill';
export function uniqMemoryList(