[PR #30717] revert: "fix: fix assign value stand as default (#30651)" #32937

Closed
opened 2026-02-21 20:52:21 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30717

State: closed
Merged: Yes


Reverts langgenius/dify#30651

The original fix seems correct on its own. However, for chatflows with multiple answer nodes, the message_replace command only preserves the output of the last executed answer node.

The follow DSL is an example:

DSL
app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: muitiple-answer-streaming
  use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.5.0
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        attachment_image_file_size_limit: 2
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        file_upload_limit: 10
        image_file_batch_limit: 10
        image_file_size_limit: 10
        single_chunk_attachment_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 3
    opening_statement: ''
    retriever_resource:
      enabled: true
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: start
        targetType: answer
      id: 1767856713829-source-1767856720538-target
      source: '1767856713829'
      sourceHandle: source
      target: '1767856720538'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: start
        targetType: code
      id: 1767856713829-source-1767856724231-target
      source: '1767856713829'
      sourceHandle: source
      target: '1767856724231'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: answer
      id: 1767856724231-source-answer-target
      source: '1767856724231'
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        selected: false
        title: User Input
        type: start
        variables: []
      height: 73
      id: '1767856713829'
      position:
        x: 79
        y: 282
      positionAbsolute:
        x: 79
        y: 282
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        answer: Answer 1
        selected: false
        title: Answer
        type: answer
        variables: []
      height: 100
      id: answer
      position:
        x: 680
        y: 303
      positionAbsolute:
        x: 680
        y: 303
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        answer: Answer 2
        selected: false
        title: Answer 2
        type: answer
        variables: []
      height: 100
      id: '1767856720538'
      position:
        x: 378
        y: 411
      positionAbsolute:
        x: 378
        y: 411
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        code: "\ndef main():\n    import time\n    time.sleep(1)\n    return {\n \
          \   }\n"
        code_language: python3
        outputs: {}
        selected: false
        title: Code
        type: code
        variables: []
      height: 52
      id: '1767856724231'
      position:
        x: 387
        y: 303
      positionAbsolute:
        x: 387
        y: 303
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    viewport:
      x: 235.59889940157154
      y: -27.649150847507997
      zoom: 1.0139594797900295
  rag_pipeline_variables: []
**Original Pull Request:** https://github.com/langgenius/dify/pull/30717 **State:** closed **Merged:** Yes --- Reverts langgenius/dify#30651 The original fix seems correct on its own. However, for chatflows with multiple answer nodes, the `message_replace` command only preserves the output of the last executed answer node. The follow DSL is an example: <details> <summary> DSL </summary> ```yaml app: description: '' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: muitiple-answer-streaming use_icon_as_answer_icon: false dependencies: [] kind: app version: 0.5.0 workflow: conversation_variables: [] environment_variables: [] features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url enabled: false fileUploadConfig: attachment_image_file_size_limit: 2 audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 file_upload_limit: 10 image_file_batch_limit: 10 image_file_size_limit: 10 single_chunk_attachment_limit: 10 video_file_size_limit: 100 workflow_file_upload_limit: 10 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: true sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false isInLoop: false sourceType: start targetType: answer id: 1767856713829-source-1767856720538-target source: '1767856713829' sourceHandle: source target: '1767856720538' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: start targetType: code id: 1767856713829-source-1767856724231-target source: '1767856713829' sourceHandle: source target: '1767856724231' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: answer id: 1767856724231-source-answer-target source: '1767856724231' sourceHandle: source target: answer targetHandle: target type: custom zIndex: 0 nodes: - data: selected: false title: User Input type: start variables: [] height: 73 id: '1767856713829' position: x: 79 y: 282 positionAbsolute: x: 79 y: 282 selected: true sourcePosition: right targetPosition: left type: custom width: 242 - data: answer: Answer 1 selected: false title: Answer type: answer variables: [] height: 100 id: answer position: x: 680 y: 303 positionAbsolute: x: 680 y: 303 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: answer: Answer 2 selected: false title: Answer 2 type: answer variables: [] height: 100 id: '1767856720538' position: x: 378 y: 411 positionAbsolute: x: 378 y: 411 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: code: "\ndef main():\n import time\n time.sleep(1)\n return {\n \ \ }\n" code_language: python3 outputs: {} selected: false title: Code type: code variables: [] height: 52 id: '1767856724231' position: x: 387 y: 303 positionAbsolute: x: 387 y: 303 selected: false sourcePosition: right targetPosition: left type: custom width: 242 viewport: x: 235.59889940157154 y: -27.649150847507997 zoom: 1.0139594797900295 rag_pipeline_variables: [] ``` </details>
yindo added the pull-request label 2026-02-21 20:52:21 -05:00
yindo closed this issue 2026-02-21 20:52:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32937