add conversation expire config & user query text to dingtalk card (#2147)

* add conversation expire config

* add user query text to card

* fix(pipeline): move session limit to AI config

* test(pipeline): cover AI session limit config

* refactor(pipeline): merge session expire-time into AI runner stage

Move the session validity duration field out of the standalone
session-limit stage into the runner stage so it actually renders in the
AI tab (the tab only shows the runner stage and the stage matching the
selected runner — any other stage is filtered out). Read path, default
config, metadata description, and tests updated accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(pipeline): expire conversations from last update time

* fix(n8n): sync generated conversation id into payload

---------

Co-authored-by: RockChinQ <rockchinq@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bruce
2026-05-01 18:13:55 +08:00
committed by GitHub
parent d9378c3a88
commit b9662250a6
7 changed files with 163 additions and 3 deletions
@@ -38,7 +38,8 @@
},
"ai": {
"runner": {
"runner": "local-agent"
"runner": "local-agent",
"expire-time": 0
},
"local-agent": {
"model": {
@@ -47,6 +47,26 @@ stages:
label:
en_US: Langflow API
zh_Hans: Langflow API
- name: expire-time
label:
en_US: Conversation expire time (seconds)
zh_Hans: 单个对话过期时间(秒)
description:
en_US: >-
Maximum idle time of a single conversation, measured from the last
message/preprocess update time. When a new message arrives and the
current conversation has been idle for longer than this value, the
existing external conversation id is discarded and a new one is
started automatically — the user does not need to trigger a reset
manually. Set to 0 to disable expiry (conversations live until the
user or another mechanism resets them).
zh_Hans: >-
单个对话的最长空闲时间,从最后一条消息/preprocess 更新时间开始计算。
当新消息到达且当前对话空闲时间已超过该值时,旧的外部对话 ID 会被自动丢弃并开启新对话,
用户无需手动重置。设置为 0 表示不限制过期时间(对话会一直保留,直到用户或其他机制主动重置)。
type: integer
required: true
default: 0
- name: local-agent
label:
en_US: Local Agent
@@ -539,4 +559,4 @@ stages:
zh_Hans: 可选的流程调整参数
type: json
required: false
default: '{}'
default: '{}'
@@ -72,4 +72,4 @@ stages:
- name: wait
label:
en_US: Wait
zh_Hans: 等待
zh_Hans: 等待