[PR #592] [MERGED] Support the new workflow for @llamaindex/server #621

Closed
opened 2026-02-15 20:15:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/create-llama/pull/592
Author: @leehuwuj
Created: 5/2/2025
Status: Merged
Merged: 5/7/2025
Merged by: @marcusschiesser

Base: mainHead: lee/use-llamaflow


📝 Commits (10+)

  • c360e3e use the new llama-flow workflow
  • a5b027b update create-llama
  • cdc5349 update deep research workflow to use llama-flow
  • 6063a9b update ts config to avoid overhead checking python
  • 1e806db Refactor workflows to use startAgentEvent and remove workflowInputEvent. Clean up unused imports and improve error handling for missing user input.
  • fc10ab0 Refactor runWorkflow to utilize AgentInputData and improve error handling for missing user input. Replace workflowInputEvent with startAgentEvent and enhance chat history management. Add callbacks for suggested questions event.
  • 216b94c Implement code artifact workflow and update TypeScript helpers. Introduce new code_workflow.ts for managing code generation and updates, and create a factory function in workflow.ts. Modify TypeScript helper to copy all .ts files instead of just workflow.ts. Update chat handler to utilize AgentInputData for improved data handling.
  • 8ac0693 Refactor runWorkflow to utilize the run function for workflow execution, replacing the previous context creation method. This change simplifies the workflow stream initialization and enhances code clarity.
  • caf5cbc Refactor workflows to replace stopEvent with stopAgentEvent and enhance event handling in code_workflow.ts and workflow.ts. Update grammar in enhancedPrompt for clarity and improve response handling in agentStreamEvent.
  • b4faf3c Refactor financial report workflow to streamline event handling and improve memory management. Replace custom event classes with workflowEvent for better clarity and maintainability. Update workflow definition to utilize getWorkflow function, enhancing code organization and readability.

📊 Changes

15 files changed (+261 additions, -250 deletions)

View changed files

.changeset/smart-clocks-guess.md (+5 -0)
📝 .prettierignore (+6 -0)
📝 eslint.config.mjs (+3 -0)
📝 packages/server/package.json (+1 -1)
📝 packages/server/src/events.ts (+21 -27)
📝 packages/server/src/handlers/chat.ts (+33 -11)
📝 packages/server/src/index.ts (+0 -1)
📝 packages/server/src/server.ts (+3 -3)
📝 packages/server/src/types.ts (+3 -15)
📝 packages/server/src/utils/gen-ui.ts (+6 -4)
📝 packages/server/src/utils/request.ts (+3 -3)
packages/server/src/utils/stream.ts (+80 -0)
📝 packages/server/src/utils/suggestion.ts (+4 -4)
📝 packages/server/src/utils/workflow.ts (+67 -175)
📝 pnpm-lock.yaml (+26 -6)

📄 Description

Summary by CodeRabbit

  • New Features

    • Introduced a new workflow engine for the server, replacing the previous engine.
  • Refactor

    • Unified and streamlined workflow event handling and streaming logic for improved maintainability.
    • Updated event definitions and input structures for workflows.
    • Simplified type usage and removed deprecated types and dependencies.
  • Chores

    • Updated ignore patterns to exclude Python-related files and directories from formatting and linting.
    • Adjusted dependencies to use the new workflow package.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/create-llama/pull/592 **Author:** [@leehuwuj](https://github.com/leehuwuj) **Created:** 5/2/2025 **Status:** ✅ Merged **Merged:** 5/7/2025 **Merged by:** [@marcusschiesser](https://github.com/marcusschiesser) **Base:** `main` ← **Head:** `lee/use-llamaflow` --- ### 📝 Commits (10+) - [`c360e3e`](https://github.com/run-llama/create-llama/commit/c360e3ea6362c9ea8487f403b330bf801a63a075) use the new llama-flow workflow - [`a5b027b`](https://github.com/run-llama/create-llama/commit/a5b027b026e1c9b332d350ee40c4c6d89c43402f) update create-llama - [`cdc5349`](https://github.com/run-llama/create-llama/commit/cdc53497dccee7f2197ff2fdc7404ada599ef930) update deep research workflow to use llama-flow - [`6063a9b`](https://github.com/run-llama/create-llama/commit/6063a9b10a6c224ffba4347087b969df6ece1e49) update ts config to avoid overhead checking python - [`1e806db`](https://github.com/run-llama/create-llama/commit/1e806db53cd11ef929ea5a04a4356029972dacc0) Refactor workflows to use startAgentEvent and remove workflowInputEvent. Clean up unused imports and improve error handling for missing user input. - [`fc10ab0`](https://github.com/run-llama/create-llama/commit/fc10ab0e56ae8799bd2e447a5dd89b25233c5ac3) Refactor runWorkflow to utilize AgentInputData and improve error handling for missing user input. Replace workflowInputEvent with startAgentEvent and enhance chat history management. Add callbacks for suggested questions event. - [`216b94c`](https://github.com/run-llama/create-llama/commit/216b94cabb4d024289710c008a8ec042269df6ab) Implement code artifact workflow and update TypeScript helpers. Introduce new `code_workflow.ts` for managing code generation and updates, and create a factory function in `workflow.ts`. Modify TypeScript helper to copy all `.ts` files instead of just `workflow.ts`. Update chat handler to utilize `AgentInputData` for improved data handling. - [`8ac0693`](https://github.com/run-llama/create-llama/commit/8ac069335340a77fc364a5d38d4ac099d0bcc0fa) Refactor runWorkflow to utilize the run function for workflow execution, replacing the previous context creation method. This change simplifies the workflow stream initialization and enhances code clarity. - [`caf5cbc`](https://github.com/run-llama/create-llama/commit/caf5cbcfdd308addda84a43a73147e7685439d18) Refactor workflows to replace stopEvent with stopAgentEvent and enhance event handling in code_workflow.ts and workflow.ts. Update grammar in enhancedPrompt for clarity and improve response handling in agentStreamEvent. - [`b4faf3c`](https://github.com/run-llama/create-llama/commit/b4faf3c9459d75a7db65b927ff485b1799417a01) Refactor financial report workflow to streamline event handling and improve memory management. Replace custom event classes with workflowEvent for better clarity and maintainability. Update workflow definition to utilize getWorkflow function, enhancing code organization and readability. ### 📊 Changes **15 files changed** (+261 additions, -250 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/smart-clocks-guess.md` (+5 -0) 📝 `.prettierignore` (+6 -0) 📝 `eslint.config.mjs` (+3 -0) 📝 `packages/server/package.json` (+1 -1) 📝 `packages/server/src/events.ts` (+21 -27) 📝 `packages/server/src/handlers/chat.ts` (+33 -11) 📝 `packages/server/src/index.ts` (+0 -1) 📝 `packages/server/src/server.ts` (+3 -3) 📝 `packages/server/src/types.ts` (+3 -15) 📝 `packages/server/src/utils/gen-ui.ts` (+6 -4) 📝 `packages/server/src/utils/request.ts` (+3 -3) ➕ `packages/server/src/utils/stream.ts` (+80 -0) 📝 `packages/server/src/utils/suggestion.ts` (+4 -4) 📝 `packages/server/src/utils/workflow.ts` (+67 -175) 📝 `pnpm-lock.yaml` (+26 -6) </details> ### 📄 Description <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new workflow engine for the server, replacing the previous engine. - **Refactor** - Unified and streamlined workflow event handling and streaming logic for improved maintainability. - Updated event definitions and input structures for workflows. - Simplified type usage and removed deprecated types and dependencies. - **Chores** - Updated ignore patterns to exclude Python-related files and directories from formatting and linting. - Adjusted dependencies to use the new workflow package. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:15:36 -05:00
yindo closed this issue 2026-02-15 20:15:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/create-llama#621