Skip to content

Feat/workflow#2161

Open
TyperBody wants to merge 22 commits into
masterfrom
feat/workflow
Open

Feat/workflow#2161
TyperBody wants to merge 22 commits into
masterfrom
feat/workflow

Conversation

@TyperBody
Copy link
Copy Markdown
Member

@TyperBody TyperBody commented May 6, 2026

概述 / Overview

请在此部分填写你实现/解决/优化的内容:
Summary of what you implemented/solved/optimized:

本次 PR 将原有基于 流水线 + 正则路由 的消息处理机制,替换为基于 工作流节点编排 的实现方式。

This PR replaces the original message processing mechanism based on pipeline + regex routing with an implementation based on workflow node orchestration.

主要改进 / Main improvements:

  • 使用 interaction:code_bot 作为交互入口 / Use interaction:code_bot as the interaction entry
  • 通过工作流节点替代原有的正则匹配与路由逻辑 / Replace regex matching and routing logic with workflow nodes
  • 保留并复用以下能力 / Retain and reuse the following capabilities:
    • Coze Bot / MCP 工具 / Coze Bot / MCP tools
    • 记忆存储(memory_store)/ Memory storage
    • 知识库节点 / Knowledge base node
    • 输入/输出变量与会话 ID / Input/output variables and session ID
    • 代码执行与 HTTP/HTTPS 请求节点 / Code execution and HTTP/HTTPS request nodes
  • 支持大规模有序节点序列(1–585),便于扩展和维护 / Support large-scale ordered node sequences (1–585) for easy expansion and maintenance

更改前后对比截图 / Screenshots

修改前 / Before:

修改后 / After:
Image_1778090121579_839.png

Image_1778090117240_860.png

Image_1778090115070_465.png

Image_1778090109508_424.png

Image_1778090111001_716.png

e9b13ce82e0037b941a04267c5599ad9

检查清单 / Checklist

PR 作者完成 / For PR author

请在方括号间写x以打勾 / Please tick the box with x

  • 阅读仓库贡献指引了吗? / Have you read the contribution guide?
  • 与项目所有者沟通过了吗? / Have you communicated with the project maintainer?
  • 我确定已自行测试所作的更改,确保功能符合预期。 / I have tested the changes and ensured they work as expected.

项目维护者完成 / For project maintainer

  • 相关 issues 链接了吗? / Have you linked the related issues?
  • 配置项写好了吗?迁移写好了吗?生效了吗? / Have you written the configuration items? Have you written the migration? Has it taken effect?
  • 依赖加到 pyproject.toml 和 core/bootutils/deps.py 了吗 / Have you added the dependencies to pyproject.toml and core/bootutils/deps.py?
  • 文档编写了吗? / Have you written the documentation?
  • workflow i18n语言欠缺 / Workflow i18n language support missing
  • 节点连线美观优化 / Node connection appearance optimization
  • LLM请求走不走面板的bug / Bug where LLM requests bypass the panel
  • LLM回调模型的补充 / LLM callback model supplement
  • 冗余代码的删除 / Redundant code removal
  • LLM请求失败回复配置 / LLM request failure response configuration
  • 复杂情况下节点的测试(建议进行预发布) / Node testing under complex conditions (pre-release recommended)

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. eh: Feature enhance: 新功能添加 / add new features m: Platform 机器人管理相关 / Bots management pd: Need testing pending: 待测试的PR / PR waiting to be tested labels May 6, 2026
Comment thread web/src/app/home/components/dynamic-form/DynamicFormComponent.tsx Fixed
Comment thread web/src/app/home/workflows/WorkflowDetailContent.tsx Fixed
Comment thread src/langbot/pkg/workflow/nodes/plugin_call.py Fixed
Comment thread src/langbot/pkg/persistence/migrations/dbm026_workflow_tables.py Fixed
Comment thread src/langbot/pkg/workflow/executor.py Fixed
Comment thread src/langbot/pkg/workflow/executor.py Fixed
Comment thread tests/unit_tests/workflow/test_executor.py Fixed
Comment thread tests/unit_tests/workflow/test_executor.py Fixed
Comment thread tests/unit_tests/workflow/test_registry.py Fixed
Comment thread tests/unit_tests/workflow/test_registry.py Fixed
Comment thread src/langbot/pkg/api/http/service/workflow.py Fixed
Comment thread src/langbot/pkg/api/http/controller/groups/workflows/workflows.py Fixed
@TyperBody TyperBody requested review from RockChinQ, fdc310 and wangcham May 7, 2026 16:58
Comment thread src/langbot/pkg/api/http/controller/groups/workflows/workflows.py Fixed
Comment thread src/langbot/pkg/api/http/controller/groups/workflows/workflows.py Fixed
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels May 7, 2026
@TyperBody
Copy link
Copy Markdown
Member Author

i18n问题还是存在
希望帮忙修复

@fdc310
Copy link
Copy Markdown
Member

fdc310 commented May 8, 2026

i18n问题还是存在 希望帮忙修复

咕咕咕,我吗

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 14, 2026
Comment thread web/batch_translate_zh_hant.py Fixed
Comment thread web/batch_translate_zh_hant.py Fixed
Comment thread web/batch_translate_zh_hant.py Fixed
Comment thread web/fix_ru_mixed_text.py Fixed
Comment thread web/ai_translate_workflows.py Fixed
Comment thread web/analyze_missing_translations.py Fixed
Comment thread web/apply_workflows_translations.py Fixed
Comment thread web/batch_translate_workflows.py Fixed
Comment thread web/batch_translate_workflows.py Fixed
@TyperBody
Copy link
Copy Markdown
Member Author

靠 ai翻译i18n的杂鱼文件上传上去了

async def initialize(self) -> None:
# Workflow CRUD
@self.route('', methods=['GET', 'POST'], auth_type=group.AuthType.USER_TOKEN_OR_API_KEY)
async def _() -> str:
@self.route(
'/<workflow_uuid>', methods=['GET', 'PUT', 'DELETE'], auth_type=group.AuthType.USER_TOKEN_OR_API_KEY
)
async def _(workflow_uuid: str) -> str:
@self.route(
'/<workflow_uuid>/extensions', methods=['GET', 'PUT'], auth_type=group.AuthType.USER_TOKEN_OR_API_KEY
)
async def _(workflow_uuid: str) -> str:
Comment thread tests/unit_tests/workflow/test_registry.py Fixed
setSaving,
setLoading,
reset,
nodeTypes,
Comment thread src/langbot/pkg/workflow/__init__.py Fixed
Comment thread src/langbot/pkg/workflow/__init__.py Fixed
Comment thread src/langbot/pkg/workflow/nodes/plugin_call.py Fixed
'WorkflowNode',
'workflow_node',
# Registry
'NodeTypeRegistry',
# Registry
'NodeTypeRegistry',
# Executor
'WorkflowExecutor',
# Executor
'WorkflowExecutor',
# Debug
'DebugWorkflowExecutor',
'WorkflowExecutor',
# Debug
'DebugWorkflowExecutor',
'DebugExecutionState',
# Debug
'DebugWorkflowExecutor',
'DebugExecutionState',
'ExecutionLog',
Comment thread src/langbot/pkg/workflow/executor.py Fixed
Comment on lines +14 to +23
from langbot_plugin.api.entities.builtin.workflow import (
ExecutionContext,
ExecutionStep,
ExecutionStatus,
MessageContext,
NodeDefinition,
NodeState,
NodeStatus,
PortDefinition,
)
Comment thread src/langbot/pkg/workflow/nodes/http_request.py Fixed

from __future__ import annotations

from typing import Any, Optional
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import ModelsDialog from '@/app/home/components/models-dialog/ModelsDialog';
import PromptEditorComponent from '@/app/home/components/dynamic-form/PromptEditorComponent';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eh: Feature enhance: 新功能添加 / add new features m: Platform 机器人管理相关 / Bots management pd: Need testing pending: 待测试的PR / PR waiting to be tested size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants