| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 |
- /**
- * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
- * SPDX-License-Identifier: MIT
- */
- import { WorkflowJSON } from '@flowgram.ai/free-layout-core';
- export const mockJSON: WorkflowJSON = {
- nodes: [
- {
- id: 'start_0',
- type: 'start',
- meta: {
- position: {
- x: 180,
- y: 381.75,
- },
- },
- data: {
- title: 'Start',
- },
- },
- {
- id: 'condition_0',
- type: 'condition',
- meta: {
- position: {
- x: 640,
- y: 363.25,
- },
- },
- data: {
- title: 'Condition',
- },
- },
- {
- id: 'end_0',
- type: 'end',
- meta: {
- position: {
- x: 2220,
- y: 381.75,
- },
- },
- data: {
- title: 'End',
- },
- },
- {
- id: 'loop_H8M3U',
- type: 'loop',
- meta: {
- position: {
- x: 1020,
- y: 547.96875,
- },
- },
- data: {
- title: 'Loop_2',
- },
- blocks: [
- {
- id: 'llm_CBdCg',
- type: 'llm',
- meta: {
- position: {
- x: 180,
- y: 0,
- },
- },
- data: {
- title: 'LLM_4',
- },
- },
- {
- id: 'llm_gZafu',
- type: 'llm',
- meta: {
- position: {
- x: 640,
- y: 0,
- },
- },
- data: {
- title: 'LLM_5',
- },
- },
- ],
- edges: [
- {
- sourceNodeID: 'llm_CBdCg',
- targetNodeID: 'llm_gZafu',
- },
- ],
- },
- {
- id: '159623',
- type: 'comment',
- meta: {
- position: {
- x: 640,
- y: 522.46875,
- },
- },
- data: {
- size: {
- width: 240,
- height: 150,
- },
- note: 'hi ~\n\nthis is a comment node\n\n- flowgram.ai',
- },
- },
- {
- id: 'group_V-_st',
- type: 'group',
- meta: {
- position: {
- x: 1020,
- y: 96.25,
- },
- },
- data: {
- title: 'LLM_Group',
- color: 'Violet',
- parentID: 'root',
- blockIDs: ['llm_0', 'llm_l_TcE'],
- },
- },
- {
- id: 'llm_0',
- type: 'llm',
- meta: {
- position: {
- x: 640,
- y: 0,
- },
- },
- data: {
- title: 'LLM_0',
- },
- },
- {
- id: 'llm_l_TcE',
- type: 'llm',
- meta: {
- position: {
- x: 180,
- y: 0,
- },
- },
- data: {
- title: 'LLM_1',
- },
- },
- ],
- edges: [
- {
- sourceNodeID: 'start_0',
- targetNodeID: 'condition_0',
- },
- {
- sourceNodeID: 'condition_0',
- targetNodeID: 'llm_l_TcE',
- sourcePortID: 'if_0',
- },
- {
- sourceNodeID: 'condition_0',
- targetNodeID: 'loop_H8M3U',
- sourcePortID: 'if_f0rOAt',
- },
- {
- sourceNodeID: 'llm_0',
- targetNodeID: 'end_0',
- },
- {
- sourceNodeID: 'loop_H8M3U',
- targetNodeID: 'end_0',
- },
- {
- sourceNodeID: 'llm_l_TcE',
- targetNodeID: 'llm_0',
- },
- ],
- };
- export const mockJSON2: WorkflowJSON = {
- nodes: [
- {
- id: 'start_0',
- type: 'start',
- meta: {
- position: {
- x: 0,
- y: 0,
- },
- },
- data: {
- title: 'Start changed',
- },
- },
- {
- id: 'condition_0',
- type: 'condition',
- meta: {
- position: {
- x: 235.74542284219706,
- y: -157.7680906713165,
- },
- },
- data: {
- title: 'Condition changed',
- },
- },
- {
- id: 'end_0',
- type: 'end',
- meta: {
- position: {
- x: 310.0959023539669,
- y: 190.25,
- },
- },
- data: {
- title: 'End',
- },
- },
- {
- id: 'loop_H8M3U',
- type: 'loop',
- meta: {
- position: {
- x: 1020,
- y: 547.96875,
- },
- },
- data: {
- title: 'Loop_2 changed',
- },
- blocks: [
- {
- id: 'llm_CBdCg',
- type: 'llm',
- meta: {
- position: {
- x: 180,
- y: 0,
- },
- },
- data: {
- title: 'LLM_4 chnaged',
- },
- },
- {
- id: 'llm_gZafu',
- type: 'llm changed',
- meta: {
- position: {
- x: 9.626852659110725,
- y: 121.49956408020925,
- },
- },
- data: {
- title: 'LLM_5',
- },
- },
- ],
- edges: [
- {
- sourceNodeID: 'llm_CBdCg',
- targetNodeID: 'llm_gZafu',
- },
- ],
- },
- {
- id: '159623',
- type: 'comment',
- meta: {
- position: {
- x: 300,
- y: 486.2002234088928,
- },
- },
- data: {
- size: {
- width: 240,
- height: 150,
- },
- note: 'hi ~\n\nthis is a comment node changed\n\n- flowgram.ai',
- },
- },
- {
- id: 'group_V-_st',
- type: 'group',
- meta: {
- position: {
- x: 869.4856146469051,
- y: 56.4254577157803,
- },
- },
- data: {
- title: 'LLM_Group changed',
- color: 'Violet',
- parentID: 'root',
- blockIDs: ['llm_0', 'llm_l_TcE'],
- },
- },
- {
- id: 'llm_0',
- type: 'llm',
- meta: {
- position: {
- x: 640,
- y: 0,
- },
- },
- data: {
- title: 'LLM_0 changed',
- },
- },
- {
- id: 'llm_l_TcE',
- type: 'llm',
- meta: {
- position: {
- x: 180,
- y: 0,
- },
- },
- data: {
- title: 'LLM_1',
- },
- },
- ],
- edges: [
- {
- sourceNodeID: 'start_0',
- targetNodeID: 'condition_0',
- },
- {
- sourceNodeID: 'condition_0',
- targetNodeID: 'llm_l_TcE',
- sourcePortID: 'if_0',
- },
- {
- sourceNodeID: 'condition_0',
- targetNodeID: 'loop_H8M3U',
- sourcePortID: 'if_f0rOAt',
- },
- {
- sourceNodeID: 'llm_0',
- targetNodeID: 'end_0',
- },
- {
- sourceNodeID: 'loop_H8M3U',
- targetNodeID: 'end_0',
- },
- {
- sourceNodeID: 'llm_l_TcE',
- targetNodeID: 'llm_0',
- },
- ],
- };
- export const mockSimpleJSON: WorkflowJSON = {
- nodes: [
- {
- id: 'start_0',
- type: 'start',
- meta: {
- position: { x: 0, y: 0 },
- },
- data: {
- title: 'start',
- },
- },
- {
- id: 'end_0',
- type: 'end',
- meta: {
- position: { x: 800, y: 0 },
- },
- data: {
- title: 'end',
- },
- },
- ],
- edges: [
- {
- sourceNodeID: 'start_0',
- targetNodeID: 'end_0',
- },
- ],
- };
- export const mockSimpleJSON2: WorkflowJSON = {
- nodes: [
- {
- id: 'start_0',
- type: 'start',
- meta: {
- position: { x: 1, y: 1 },
- },
- data: {
- title: 'start changed',
- },
- },
- {
- id: 'end_0',
- type: 'end',
- meta: {
- position: { x: 801, y: 1 },
- },
- data: {
- title: 'end changed',
- },
- },
- ],
- edges: [
- {
- sourceNodeID: 'start_0',
- targetNodeID: 'end_0',
- },
- ],
- };
|