fix: web style

This commit is contained in:
hjlarry 2026-04-11 10:46:52 +08:00
parent 341fdc8201
commit 8e38a19de7
50 changed files with 140 additions and 175 deletions

View File

@ -103,7 +103,7 @@ const CardView: FC<ICardViewProps> = ({ appId, isInPanel, className }) => {
})
}
}
toast(t(`actionMsg.${message}`, { ns: 'common' }) as string, { type })
}

View File

@ -21,6 +21,7 @@ import type {
TextToSpeechConfig,
} from '@/models/debug'
import type { VisionSettings } from '@/types/app'
import type { PublishWorkflowParams } from '@/types/workflow'
import { useBoolean, useGetState } from 'ahooks'
import { clone } from 'es-toolkit/object'
import { produce } from 'immer'
@ -480,34 +481,40 @@ export const useConfiguration = (): ConfigurationViewModel => {
resolvedModelModeType,
])
const onPublish = useCallback(async (modelAndParameter?: ModelAndParameter, features?: FeaturesData) => createPublishHandler({
appId,
chatPromptConfig,
citationConfig,
completionParamsState,
completionPromptConfig,
contextVar,
contextVarEmpty,
dataSets,
datasetConfigs,
externalDataToolsConfig,
hasSetBlockStatus,
introduction,
isAdvancedMode,
isFunctionCall,
mode,
modelConfig,
moreLikeThisConfig,
promptEmpty,
promptMode,
resolvedModelModeType,
setCanReturnToSimpleMode,
setPublishedConfig,
speechToTextConfig,
suggestedQuestionsAfterAnswerConfig,
t,
textToSpeechConfig,
})(updateAppModelConfig, modelAndParameter, features), [
const onPublish = useCallback(async (params?: ModelAndParameter | PublishWorkflowParams, features?: FeaturesData) => {
const modelAndParameter = params && 'model' in params && 'provider' in params && 'parameters' in params
? params
: undefined
return createPublishHandler({
appId,
chatPromptConfig,
citationConfig,
completionParamsState,
completionPromptConfig,
contextVar,
contextVarEmpty,
dataSets,
datasetConfigs,
externalDataToolsConfig,
hasSetBlockStatus,
introduction,
isAdvancedMode,
isFunctionCall,
mode,
modelConfig,
moreLikeThisConfig,
promptEmpty,
promptMode,
resolvedModelModeType,
setCanReturnToSimpleMode,
setPublishedConfig,
speechToTextConfig,
suggestedQuestionsAfterAnswerConfig,
t,
textToSpeechConfig,
})(updateAppModelConfig, modelAndParameter, features)
}, [
appId,
chatPromptConfig,
citationConfig,

View File

@ -386,7 +386,7 @@ describe('List', () => {
describe('Edge Cases', () => {
it('should handle multiple renders without issues', () => {
const { rerender, unmount } = renderWithNuqs(<List />)
const { unmount } = renderWithNuqs(<List />)
expect(screen.getByText('app.types.all')).toBeInTheDocument()
unmount()

View File

@ -83,6 +83,7 @@ describe('EmbeddedChatbot Header', () => {
allow_email_code_login: false,
allow_email_password_login: false,
},
enable_collaboration_mode: false,
enable_trial_app: false,
enable_explore_banner: false,
}

View File

@ -141,5 +141,3 @@ export const Avatar = ({
</AvatarRoot>
)
}
export default Avatar

View File

@ -1,7 +1,7 @@
import type { FC } from 'react'
import type { AvatarSize } from '@/app/components/base/ui/avatar'
import { memo } from 'react'
import Avatar from '@/app/components/base/ui/avatar'
import { Avatar } from '@/app/components/base/ui/avatar'
import { getUserColor } from '@/app/components/workflow/collaboration/utils/user-color'
import { useAppContext } from '@/context/app-context'

View File

@ -1,6 +1,7 @@
import type { ReactNode } from 'react'
import type { WorkflowProps } from '@/app/components/workflow'
import { fireEvent, render, screen } from '@testing-library/react'
import { ChatVarType } from '@/app/components/workflow/panel/chat-variable-panel/type'
import WorkflowMain from '../workflow-main'
const mockSetFeatures = vi.fn()
@ -116,9 +117,23 @@ vi.mock('@/app/components/workflow', () => ({
<button
type="button"
onClick={() => onWorkflowDataUpdate?.({
nodes: [],
edges: [],
features: { file_upload: { enabled: true } },
conversation_variables: [{ id: 'conversation-1' }],
environment_variables: [{ id: 'env-1' }],
conversation_variables: [{
id: 'conversation-1',
name: 'conversation-1',
value_type: ChatVarType.String,
value: '',
description: '',
}],
environment_variables: [{
id: 'env-1',
name: 'env-1',
value: '',
value_type: 'string',
description: '',
}],
})}
>
update-workflow-data
@ -126,14 +141,22 @@ vi.mock('@/app/components/workflow', () => ({
<button
type="button"
onClick={() => onWorkflowDataUpdate?.({
conversation_variables: [{ id: 'conversation-only' }],
nodes: [],
edges: [],
conversation_variables: [{
id: 'conversation-only',
name: 'conversation-only',
value_type: ChatVarType.String,
value: '',
description: '',
}],
})}
>
update-conversation-only
</button>
<button
type="button"
onClick={() => onWorkflowDataUpdate?.({})}
onClick={() => onWorkflowDataUpdate?.({ nodes: [], edges: [] })}
>
update-empty-payload
</button>

View File

@ -240,7 +240,7 @@ const WorkflowMain = ({
invalidateConversationVarValues,
} = useInspectVarsCrud()
const hooksStore = useMemo<Partial<HooksStoreShape>>(() => {
const hooksStore = useMemo(() => {
return {
syncWorkflowDraftWhenPageClose,
doSyncWorkflowDraft,
@ -326,7 +326,7 @@ const WorkflowMain = ({
edges={edges}
viewport={viewport}
onWorkflowDataUpdate={handleWorkflowDataUpdate}
hooksStore={hooksStore}
hooksStore={hooksStore as unknown as Partial<HooksStoreShape>}
cursors={filteredCursors}
myUserId={myUserId}
onlineUsers={onlineUsers}

View File

@ -134,7 +134,7 @@ const DelayedFeatures = () => {
return <Features />
}
const renderFeatures = (options?: Omit<Parameters<typeof renderWorkflowFlowComponent>[1], 'nodes' | 'edges'>) => {
const renderFeatures = (options?: Omit<NonNullable<Parameters<typeof renderWorkflowFlowComponent>[1]>, 'nodes' | 'edges'>) => {
const mergedInitialStoreState = {
appId: 'app-1',
...(options?.initialStoreState || {}),

View File

@ -1,4 +1,4 @@
export type EventHandler<T = unknown> = (data: T) => void
type EventHandler<T = unknown> = (data: T) => void
export class EventEmitter {
private events: Map<string, Set<EventHandler<unknown>>> = new Map()

View File

@ -9,15 +9,6 @@ export type OnlineUser = {
sid: string
}
export type WorkflowOnlineUsers = {
workflow_id: string
users: OnlineUser[]
}
export type OnlineUserListResponse = {
data: WorkflowOnlineUsers[]
}
export type CursorPosition = {
x: number
y: number
@ -48,11 +39,6 @@ export type CollaborationState = {
error?: string
}
export type GraphSyncData = {
nodes: Node[]
edges: Edge[]
}
export type CollaborationEventType
= | 'mouse_move'
| 'vars_and_features_update'

View File

@ -1,34 +0,0 @@
export type CollaborationEvent<TData = unknown> = {
type: string
data: TData
timestamp: number
}
export type GraphUpdateEvent = {
type: 'graph_update'
} & CollaborationEvent<Uint8Array>
export type CursorMoveEvent = {
type: 'cursor_move'
} & CollaborationEvent<{
x: number
y: number
userId: string
}>
export type UserConnectEvent = {
type: 'user_connect'
} & CollaborationEvent<{
workflow_id: string
}>
export type OnlineUsersEvent = {
type: 'online_users'
} & CollaborationEvent<{
users: Array<{
user_id: string
username: string
avatar: string
sid: string
}>
}>

View File

@ -1,7 +1,7 @@
import type { FC, PointerEvent as ReactPointerEvent } from 'react'
import { memo, useCallback, useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import Avatar from '@/app/components/base/ui/avatar'
import { Avatar } from '@/app/components/base/ui/avatar'
import { useAppContext } from '@/context/app-context'
import { cn } from '@/utils/classnames'
import { MentionInput } from './mention-input'

View File

@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next'
import Textarea from 'react-textarea-autosize'
import Button from '@/app/components/base/button'
import EnterKey from '@/app/components/base/icons/src/public/common/EnterKey'
import Avatar from '@/app/components/base/ui/avatar'
import { Avatar } from '@/app/components/base/ui/avatar'
import { useParams } from '@/next/navigation'
import { fetchMentionableUsers } from '@/service/workflow-comment'
import { cn } from '@/utils/classnames'

View File

@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next'
import { useReactFlow, useViewport } from 'reactflow'
import Divider from '@/app/components/base/divider'
import InlineDeleteConfirm from '@/app/components/base/inline-delete-confirm'
import Avatar from '@/app/components/base/ui/avatar'
import { Avatar } from '@/app/components/base/ui/avatar'
import {
DropdownMenu,
DropdownMenuContent,

View File

@ -3,7 +3,7 @@ import type { OnlineUser } from '../collaboration/types/collaboration'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
import { useEffect, useState } from 'react'
import { useReactFlow } from 'reactflow'
import Avatar from '@/app/components/base/ui/avatar'
import { Avatar } from '@/app/components/base/ui/avatar'
import {
Popover,
PopoverContent,

View File

@ -1,8 +1,6 @@
import type { FileUpload } from '../../base/features/types'
import type { TriggerType } from '@/app/components/workflow/header/test-run-menu'
import type {
BlockEnum,
CommonNodeType,
Node,
NodeDefault,
ToolWithProvider,
@ -11,7 +9,7 @@ import type {
import type { IOtherOptions } from '@/service/base'
import type { SchemaTypeDefinition } from '@/service/use-common'
import type { FlowType } from '@/types/common'
import type { FetchWorkflowDraftResponse, VarInInspect } from '@/types/workflow'
import type { VarInInspect } from '@/types/workflow'
import { noop } from 'es-toolkit/function'
import { useContext } from 'react'
import {
@ -20,17 +18,9 @@ import {
import { createStore } from 'zustand/vanilla'
import { HooksStoreContext } from './provider'
export type AvailableNodeDefault = NodeDefault<CommonNodeType<Record<string, unknown>>>
export type WorkflowRunOptions = {
mode?: TriggerType
scheduleNodeId?: string
webhookNodeId?: string
pluginNodeId?: string
allNodeIds?: string[]
}
export type AvailableNodesMetaData = {
nodes: AvailableNodeDefault[]
nodesMap?: Partial<Record<BlockEnum, AvailableNodeDefault>>
nodes: NodeDefault[]
nodesMap?: Record<BlockEnum, NodeDefault<any>>
}
export type SyncDraftCallback = {
onSuccess?: () => void
@ -46,9 +36,9 @@ export type CommonHooksFnMap = {
handleRefreshWorkflowDraft: () => void
handleBackupDraft: () => void
handleLoadBackupDraft: () => void
handleRestoreFromPublishedWorkflow: (publishedWorkflow: FetchWorkflowDraftResponse) => void
handleRun: (params: unknown, callback?: IOtherOptions, options?: WorkflowRunOptions) => void | Promise<void>
handleStopRun: (taskId: string) => void
handleRestoreFromPublishedWorkflow: (...args: any[]) => void
handleRun: (params: any, callback?: IOtherOptions, options?: any) => void
handleStopRun: (...args: any[]) => void
handleStartWorkflowRun: () => void
handleWorkflowStartRunInWorkflow: () => void
handleWorkflowStartRunInChatflow: () => void
@ -64,7 +54,7 @@ export type CommonHooksFnMap = {
hasNodeInspectVars: (nodeId: string) => boolean
hasSetInspectVar: (nodeId: string, name: string, sysVars: VarInInspect[], conversationVars: VarInInspect[]) => boolean
fetchInspectVarValue: (selector: ValueSelector, schemaTypeDefinitions: SchemaTypeDefinition[]) => Promise<void>
editInspectVarValue: (nodeId: string, varId: string, value: unknown) => Promise<void>
editInspectVarValue: (nodeId: string, varId: string, value: any) => Promise<void>
renameInspectVarName: (nodeId: string, oldName: string, newName: string) => Promise<void>
appendNodeInspectVars: (nodeId: string, payload: VarInInspect[], allNodes: Node[]) => void
deleteInspectVar: (nodeId: string, varId: string) => Promise<void>
@ -78,7 +68,7 @@ export type CommonHooksFnMap = {
configsMap?: {
flowId: string
flowType: FlowType
fileSettings?: FileUpload
fileSettings: FileUpload
}
}
@ -92,9 +82,9 @@ export const createHooksStore = ({
handleRefreshWorkflowDraft = noop,
handleBackupDraft = noop,
handleLoadBackupDraft = noop,
handleRestoreFromPublishedWorkflow = (_publishedWorkflow: FetchWorkflowDraftResponse) => noop(),
handleRestoreFromPublishedWorkflow = noop,
handleRun = noop,
handleStopRun = (_taskId: string) => noop(),
handleStopRun = noop,
handleStartWorkflowRun = noop,
handleWorkflowStartRunInWorkflow = noop,
handleWorkflowStartRunInChatflow = noop,

View File

@ -1,5 +1,4 @@
export * from './use-auto-generate-webhook-url'
export * from './use-auto-generate-webhook-url'
export * from './use-available-blocks'
export * from './use-checklist'
export * from './use-DSL'
@ -13,7 +12,6 @@ export * from './use-nodes-sync-draft'
export * from './use-panel-interactions'
export * from './use-selection-interactions'
export * from './use-serial-async-callback'
export * from './use-serial-async-callback'
export * from './use-set-workflow-vars-with-value'
export * from './use-shortcuts'
export * from './use-tool-icon'

View File

@ -13,7 +13,7 @@ import { useNodesSyncDraft } from './use-nodes-sync-draft'
type RestoreCallbacks = SyncCallback
export const usePerformRestore = () => {
const usePerformRestore = () => {
const { doSyncWorkflowDraft } = useNodesSyncDraft()
const appDetail = useAppStore.getState().appDetail
const featuresStore = useFeaturesStore()

View File

@ -36,8 +36,8 @@ const {
mockVariableTriggerState: {
savePayload: undefined as EnvironmentVariable | undefined,
},
mockUpdateEnvironmentVariables: vi.fn(() => Promise.resolve({})),
mockGetSocket: vi.fn(() => null),
mockUpdateEnvironmentVariables: vi.fn<(payload: { appId: string, environmentVariables: EnvironmentVariable[] }) => Promise<unknown>>(() => Promise.resolve({})),
mockGetSocket: vi.fn<(appId: string) => { emit: (event: string, payload: unknown) => void } | null>(() => null),
}))
vi.mock('@/app/components/workflow/hooks/use-nodes-sync-draft', () => ({

View File

@ -184,7 +184,8 @@ const UpdateDSLModal = ({
if (isImportCompleted(status)) {
await handleCompletedImport(status, app_id)
// Notify other collaboration clients about the workflow update
collaborationManager.emitWorkflowUpdate(app_id)
if (app_id)
collaborationManager.emitWorkflowUpdate(app_id)
}
else if (status === DSLImportStatus.FAILED) {
setLoading(false)

View File

@ -25,4 +25,3 @@ export const workflowOnlineUsersContract = base
}
}>())
.output(type<WorkflowOnlineUsersResponse>())

View File

@ -110,7 +110,7 @@ export type CreateReplyParams = {
mentioned_user_ids?: string[]
}
export const workflowCommentListContract = base
const workflowCommentListContract = base
.route({
path: '/apps/{appId}/workflow/comments',
method: 'GET',
@ -122,7 +122,7 @@ export const workflowCommentListContract = base
}>())
.output(type<{ data: WorkflowCommentList[] }>())
export const workflowCommentCreateContract = base
const workflowCommentCreateContract = base
.route({
path: '/apps/{appId}/workflow/comments',
method: 'POST',
@ -135,7 +135,7 @@ export const workflowCommentCreateContract = base
}>())
.output(type<WorkflowCommentCreateRes>())
export const workflowCommentDetailContract = base
const workflowCommentDetailContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}',
method: 'GET',
@ -148,7 +148,7 @@ export const workflowCommentDetailContract = base
}>())
.output(type<WorkflowCommentDetail>())
export const workflowCommentUpdateContract = base
const workflowCommentUpdateContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}',
method: 'PUT',
@ -162,7 +162,7 @@ export const workflowCommentUpdateContract = base
}>())
.output(type<WorkflowCommentUpdateRes>())
export const workflowCommentDeleteContract = base
const workflowCommentDeleteContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}',
method: 'DELETE',
@ -175,7 +175,7 @@ export const workflowCommentDeleteContract = base
}>())
.output(type<CommonResponse>())
export const workflowCommentResolveContract = base
const workflowCommentResolveContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}/resolve',
method: 'POST',
@ -188,7 +188,7 @@ export const workflowCommentResolveContract = base
}>())
.output(type<WorkflowCommentResolveRes>())
export const workflowCommentReplyCreateContract = base
const workflowCommentReplyCreateContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}/replies',
method: 'POST',
@ -202,7 +202,7 @@ export const workflowCommentReplyCreateContract = base
}>())
.output(type<WorkflowCommentReply>())
export const workflowCommentReplyUpdateContract = base
const workflowCommentReplyUpdateContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}/replies/{replyId}',
method: 'PUT',
@ -217,7 +217,7 @@ export const workflowCommentReplyUpdateContract = base
}>())
.output(type<WorkflowCommentReply>())
export const workflowCommentReplyDeleteContract = base
const workflowCommentReplyDeleteContract = base
.route({
path: '/apps/{appId}/workflow/comments/{commentId}/replies/{replyId}',
method: 'DELETE',
@ -231,7 +231,7 @@ export const workflowCommentReplyDeleteContract = base
}>())
.output(type<CommonResponse>())
export const workflowCommentMentionUsersContract = base
const workflowCommentMentionUsersContract = base
.route({
path: '/apps/{appId}/workflow/comments/mention-users',
method: 'GET',

View File

@ -116,6 +116,7 @@ const clientSchema = {
*/
NEXT_PUBLIC_SENTRY_DSN: z.string().optional(),
NEXT_PUBLIC_SITE_ABOUT: z.string().optional(),
NEXT_PUBLIC_SOCKET_URL: z.string().optional(),
NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS: z.email().optional(),
NEXT_PUBLIC_SUPPORT_MAIL_LOGIN: coercedBoolean.default(false),
/**
@ -186,6 +187,7 @@ export const env = createEnv({
NEXT_PUBLIC_PUBLIC_API_PREFIX: isServer ? process.env.NEXT_PUBLIC_PUBLIC_API_PREFIX : getRuntimeEnvFromBody('publicApiPrefix'),
NEXT_PUBLIC_SENTRY_DSN: isServer ? process.env.NEXT_PUBLIC_SENTRY_DSN : getRuntimeEnvFromBody('sentryDsn'),
NEXT_PUBLIC_SITE_ABOUT: isServer ? process.env.NEXT_PUBLIC_SITE_ABOUT : getRuntimeEnvFromBody('siteAbout'),
NEXT_PUBLIC_SOCKET_URL: isServer ? process.env.NEXT_PUBLIC_SOCKET_URL : getRuntimeEnvFromBody('socketUrl'),
NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS: isServer ? process.env.NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS : getRuntimeEnvFromBody('supportEmailAddress'),
NEXT_PUBLIC_SUPPORT_MAIL_LOGIN: isServer ? process.env.NEXT_PUBLIC_SUPPORT_MAIL_LOGIN : getRuntimeEnvFromBody('supportMailLogin'),
NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS: isServer ? process.env.NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS : getRuntimeEnvFromBody('textGenerationTimeoutMs'),

View File

@ -2639,7 +2639,7 @@
},
"app/components/base/icons/src/public/other/index.ts": {
"no-barrel-files/no-barrel-files": {
"count": 5
"count": 6
}
},
"app/components/base/icons/src/public/thought/index.ts": {
@ -8312,6 +8312,11 @@
"count": 1
}
},
"app/components/workflow/hooks-store/store.ts": {
"ts/no-explicit-any": {
"count": 2
}
},
"app/components/workflow/hooks/__tests__/use-checklist.spec.ts": {
"react/error-boundaries": {
"count": 1
@ -8319,7 +8324,7 @@
},
"app/components/workflow/hooks/index.ts": {
"no-barrel-files/no-barrel-files": {
"count": 25
"count": 27
}
},
"app/components/workflow/hooks/use-checklist.ts": {
@ -12034,4 +12039,4 @@
"count": 2
}
}
}
}

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "المحتوى المخزن",
"chatVariable.updatedAt": "تم التحديث في ",
"collaboration.historyAction.generic": "قام متعاون بعملية تراجع/إعادة",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "حذف الرد",
"comments.actions.editReply": "تعديل الرد",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "إغلاق التعليق",
"comments.aria.deleteComment": "حذف المناقشة",
"comments.aria.nextComment": "التعليق التالي",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Gespeicherter Inhalt",
"chatVariable.updatedAt": "Aktualisiert am ",
"collaboration.historyAction.generic": "Ein Mitbearbeiter hat Rückgängig/Wiederholen ausgeführt",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Antwort löschen",
"comments.actions.editReply": "Antwort bearbeiten",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Kommentar schließen",
"comments.aria.deleteComment": "Kommentar löschen",
"comments.aria.nextComment": "Nächster Kommentar",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Stored content",
"chatVariable.updatedAt": "Updated at ",
"collaboration.historyAction.generic": "A collaborator performed an undo/redo action",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Contenido almacenado",
"chatVariable.updatedAt": "Actualizado el ",
"collaboration.historyAction.generic": "Un colaborador realizó deshacer/rehacer",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Eliminar respuesta",
"comments.actions.editReply": "Editar respuesta",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Cerrar comentario",
"comments.aria.deleteComment": "Eliminar comentario",
"comments.aria.nextComment": "Comentario siguiente",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "محتوای ذخیره‌شده",
"chatVariable.updatedAt": "به‌روزرسانی شده در ",
"collaboration.historyAction.generic": "یک همکار عملیات برگرداندن/انجام مجدد را انجام داد",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "حذف پاسخ",
"comments.actions.editReply": "ویرایش پاسخ",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "بستن دیدگاه",
"comments.aria.deleteComment": "حذف دیدگاه",
"comments.aria.nextComment": "دیدگاه بعدی",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Contenu stocké",
"chatVariable.updatedAt": "Mis à jour le ",
"collaboration.historyAction.generic": "Un collaborateur a effectué une annulation/une réexécution",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Supprimer la réponse",
"comments.actions.editReply": "Modifier la réponse",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Fermer le commentaire",
"comments.aria.deleteComment": "Supprimer le commentaire",
"comments.aria.nextComment": "Commentaire suivant",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "संग्रहीत सामग्री",
"chatVariable.updatedAt": "अपडेट किया गया ",
"collaboration.historyAction.generic": "एक सहयोगी ने Undo/Redo किया",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "जवाब हटाएं",
"comments.actions.editReply": "जवाब संपादित करें",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "टिप्पणी बंद करें",
"comments.aria.deleteComment": "टिप्पणी हटाएं",
"comments.aria.nextComment": "अगली टिप्पणी",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Konten yang disimpan",
"chatVariable.updatedAt": "Diperbarui pada",
"collaboration.historyAction.generic": "Seorang kolaborator melakukan urungkan/ulang",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Hapus balasan",
"comments.actions.editReply": "Edit balasan",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Tutup komentar",
"comments.aria.deleteComment": "Hapus komentar",
"comments.aria.nextComment": "Komentar berikutnya",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Contenuto memorizzato",
"chatVariable.updatedAt": "Aggiornato il ",
"collaboration.historyAction.generic": "Un collaboratore ha eseguito annulla/ripristina",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Elimina risposta",
"comments.actions.editReply": "Modifica risposta",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Chiudi commento",
"comments.aria.deleteComment": "Elimina commento",
"comments.aria.nextComment": "Commento successivo",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "保存内容",
"chatVariable.updatedAt": "最終更新:",
"collaboration.historyAction.generic": "共同編集者が元に戻す/やり直しを実行しました",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "返信を削除",
"comments.actions.editReply": "返信を編集",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "コメントを閉じる",
"comments.aria.deleteComment": "スレッドを削除",
"comments.aria.nextComment": "次のコメント",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "저장된 내용",
"chatVariable.updatedAt": "업데이트 시간: ",
"collaboration.historyAction.generic": "공동 작업자가 실행 취소/다시 실행을 수행했습니다",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "답글 삭제",
"comments.actions.editReply": "답글 편집",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "댓글 닫기",
"comments.aria.deleteComment": "댓글 삭제",
"comments.aria.nextComment": "다음 댓글",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Przechowywana zawartość",
"chatVariable.updatedAt": "Zaktualizowano ",
"collaboration.historyAction.generic": "Współpracownik wykonał cofnięcie/ponowienie",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Conteúdo armazenado",
"chatVariable.updatedAt": "Atualizado em ",
"collaboration.historyAction.generic": "Um colaborador realizou desfazer/refazer",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Conținut stocat",
"chatVariable.updatedAt": "Actualizat la ",
"collaboration.historyAction.generic": "Un colaborator a efectuat anulare/refacere",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Сохраненный контент",
"chatVariable.updatedAt": "Обновлено в ",
"collaboration.historyAction.generic": "Участник выполнил отмену/повтор",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Shranjena vsebina",
"chatVariable.updatedAt": "Posodobljeno ob",
"collaboration.historyAction.generic": "Sodelavec je izvedel razveljavitev/ponovitev",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "เนื้อหาที่เก็บไว้",
"chatVariable.updatedAt": "อัพเดทเมื่อ",
"collaboration.historyAction.generic": "ผู้ร่วมงานได้ทำการยกเลิก/ทำซ้ำ",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Depolanan içerik",
"chatVariable.updatedAt": "Güncellenme zamanı: ",
"collaboration.historyAction.generic": "Bir işbirlikçi geri alma/yeniden yapma gerçekleştirdi",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Збережений вміст",
"chatVariable.updatedAt": "Оновлено ",
"collaboration.historyAction.generic": "Співавтор виконав скасування/повторення",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "Nội dung đã lưu",
"chatVariable.updatedAt": "Cập nhật lúc ",
"collaboration.historyAction.generic": "Một cộng tác viên đã thực hiện hoàn tác/làm lại",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "Delete reply",
"comments.actions.editReply": "Edit reply",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "Close comment",
"comments.aria.deleteComment": "Delete thread",
"comments.aria.nextComment": "Next comment",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "存储内容",
"chatVariable.updatedAt": "更新时间 ",
"collaboration.historyAction.generic": "协作者执行了撤销/重做操作",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "删除回复",
"comments.actions.editReply": "编辑回复",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "关闭评论",
"comments.aria.deleteComment": "删除讨论",
"comments.aria.nextComment": "下一条评论",

View File

@ -110,9 +110,9 @@
"chatVariable.storedContent": "已儲存內容",
"chatVariable.updatedAt": "更新於 ",
"collaboration.historyAction.generic": "協作者執行了復原/重做操作",
"comments.actions.addComment": "Add Comment",
"comments.actions.deleteReply": "刪除回覆",
"comments.actions.editReply": "編輯回覆",
"comments.actions.addComment": "Add Comment",
"comments.aria.closeComment": "關閉評論",
"comments.aria.deleteComment": "刪除評論",
"comments.aria.nextComment": "下一則評論",

View File

@ -13,12 +13,11 @@ export const fetchWorkflowOnlineUsers = async ({ workflowIds }: { workflowIds: s
if (!workflowIds.length)
return {}
const params = { workflow_ids: workflowIds.join(',') }
const response = await consoleClient.apps.workflowOnlineUsers({
query: params,
query: { workflow_ids: workflowIds.join(',') },
})
if (!response || !response.data)
if (!response?.data)
return {}
if (Array.isArray(response.data)) {

View File

@ -5,7 +5,6 @@ import type {
UserProfile as ContractUserProfile,
WorkflowCommentCreateRes as ContractWorkflowCommentCreateRes,
WorkflowCommentDetail as ContractWorkflowCommentDetail,
WorkflowCommentDetailMention as ContractWorkflowCommentDetailMention,
WorkflowCommentDetailReply as ContractWorkflowCommentDetailReply,
WorkflowCommentList as ContractWorkflowCommentList,
WorkflowCommentReply as ContractWorkflowCommentReply,
@ -15,18 +14,17 @@ import type {
import type { CommonResponse } from '@/models/common'
import { consoleClient } from './client'
export type CreateCommentParams = ContractCreateCommentParams
export type CreateReplyParams = ContractCreateReplyParams
export type UpdateCommentParams = ContractUpdateCommentParams
type CreateCommentParams = ContractCreateCommentParams
type CreateReplyParams = ContractCreateReplyParams
type UpdateCommentParams = ContractUpdateCommentParams
export type UserProfile = ContractUserProfile
export type WorkflowCommentCreateRes = ContractWorkflowCommentCreateRes
type WorkflowCommentCreateRes = ContractWorkflowCommentCreateRes
export type WorkflowCommentDetail = ContractWorkflowCommentDetail
export type WorkflowCommentDetailMention = ContractWorkflowCommentDetailMention
export type WorkflowCommentDetailReply = ContractWorkflowCommentDetailReply
export type WorkflowCommentList = ContractWorkflowCommentList
export type WorkflowCommentReply = ContractWorkflowCommentReply
export type WorkflowCommentResolveRes = ContractWorkflowCommentResolveRes
export type WorkflowCommentUpdateRes = ContractWorkflowCommentUpdateRes
type WorkflowCommentReply = ContractWorkflowCommentReply
type WorkflowCommentResolveRes = ContractWorkflowCommentResolveRes
type WorkflowCommentUpdateRes = ContractWorkflowCommentUpdateRes
export const fetchWorkflowComments = async (appId: string): Promise<WorkflowCommentList[]> => {
const response = await consoleClient.workflowComments.list({

View File

@ -100,14 +100,6 @@ export const fetchNodeInspectVars = async (flowType: FlowType, flowId: string, n
return items
}
// Environment Variables API
export const fetchEnvironmentVariables = async (appId: string): Promise<EnvironmentVariable[]> => {
const response = await consoleClient.workflowDraft.environmentVariables({
params: { appId },
})
return response.items
}
export const updateEnvironmentVariables = ({ appId, environmentVariables }: {
appId: string
environmentVariables: EnvironmentVariable[]