Skip to content

Commit c1af791

Browse files
committed
Remove unused dependencies and clean up commented-out code in complex_workflow.js
1 parent a6ad4fa commit c1af791

File tree

2 files changed

+0
-64
lines changed

2 files changed

+0
-64
lines changed

playground/react/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"@langchain/openai": "^0.6.11",
2424
"@langchain/tavily": "^0.1.1",
2525
"ai": "^5.0.33",
26-
"crypto-browserify": "^3.12.1",
2726
"kaibanjs": "file:../..",
2827
"langchain": "^0.3.33",
2928
"mathjs": "^13.0.3",

playground/react/src/teams/workflow_driven/complex_workflow.js

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,6 @@ const oddStep = createStep({
4444
},
4545
});
4646

47-
// const processItemStep = createStep({
48-
// id: 'process-item',
49-
// inputSchema: z.number(),
50-
// outputSchema: z.object({
51-
// original: z.number(),
52-
// processed: z.string(),
53-
// doubled: z.number(),
54-
// }),
55-
// execute: async ({ inputData }) => {
56-
// const num = inputData;
57-
// return {
58-
// original: num,
59-
// processed: `processed_${num}`,
60-
// doubled: num * 2,
61-
// };
62-
// },
63-
// });
64-
6547
const finalStep = createStep({
6648
id: 'final',
6749
inputSchema: z.any(),
@@ -158,49 +140,4 @@ const team = new Team({
158140
},
159141
});
160142

161-
// ============================================================================
162-
// ALTERNATIVE: WORKFLOW WITH FOREACH (following official examples)
163-
// ============================================================================
164-
165-
// Example of a workflow that uses foreach correctly
166-
// This would be a separate workflow that receives an array as input
167-
// const createForeachWorkflow = () => {
168-
// const foreachWorkflow = createWorkflow({
169-
// id: 'foreach-workflow',
170-
// inputSchema: z.array(z.number()), // ✅ Receives array as input
171-
// outputSchema: z.array(
172-
// z.object({
173-
// original: z.number(),
174-
// processed: z.string(),
175-
// doubled: z.number(),
176-
// })
177-
// ),
178-
// });
179-
180-
// foreachWorkflow.foreach(processItemStep, { concurrency: 2 });
181-
// foreachWorkflow.commit();
182-
183-
// return foreachWorkflow;
184-
// };
185-
186-
// Example usage of foreach workflow:
187-
// const foreachAgent = new Agent({
188-
// name: 'Foreach Processor',
189-
// type: 'WorkflowDrivenAgent',
190-
// workflow: createForeachWorkflow(),
191-
// });
192-
//
193-
// const foreachTask = new Task({
194-
// description: 'Process array of numbers',
195-
// expectedOutput: 'Processed array results',
196-
// agent: foreachAgent,
197-
// });
198-
//
199-
// const foreachTeam = new Team({
200-
// name: 'Foreach Team',
201-
// agents: [foreachAgent],
202-
// tasks: [foreachTask],
203-
// inputs: [1, 2, 3, 4, 5], // ✅ Array input
204-
// });
205-
206143
export default team;

0 commit comments

Comments
 (0)