feat: Support for Chat Flow & Agent Support for binding a single chat flow (#765)

Co-authored-by: Yu Yang <72337138+tomasyu985@users.noreply.github.com>
Co-authored-by: zengxiaohui <csu.zengxiaohui@gmail.com>
Co-authored-by: lijunwen.gigoo <lijunwen.gigoo@bytedance.com>
Co-authored-by: lvxinyu.1117 <lvxinyu.1117@bytedance.com>
Co-authored-by: liuyunchao.0510 <liuyunchao.0510@bytedance.com>
Co-authored-by: haozhenfei <37089575+haozhenfei@users.noreply.github.com>
Co-authored-by: July <jiangxujin@bytedance.com>
Co-authored-by: tecvan-fe <fanwenjie.fe@bytedance.com>
This commit is contained in:
Zhj
2025-08-28 21:53:32 +08:00
committed by GitHub
parent bbc615a18e
commit d70101c979
503 changed files with 48036 additions and 3427 deletions

View File

@@ -26,8 +26,9 @@ import {
} from '@coze-arch/coze-design';
import { responsiveTableColumn, formatDate } from '@coze-arch/bot-utils';
import {
ResType,
WorkflowMode,
type ResourceInfo,
type ResType,
} from '@coze-arch/bot-api/plugin_develop';
import { type LibraryEntityConfig } from '../types';
@@ -53,6 +54,16 @@ const getResTypeLabelFromConfigMap = (
if (item.res_type === undefined) {
return '-';
}
// 单独判断一下 Chatflow 类型
if (
item.res_type === ResType.Workflow &&
item.res_sub_type === WorkflowMode.ChatFlow
) {
const label = I18n.t('wf_chatflow_76');
return label;
}
const target = entityConfigs.find(config =>
config.target.includes(item.res_type as ResType),
)?.typeFilter;

View File

@@ -77,18 +77,15 @@ export const useWorkflowConfig: UseEntityConfigHook = ({
>
{I18n.t('library_resource_type_workflow')}
</Menu.Item>
{/* The open-source version does not support conversation streaming for the time being */}
{!IS_OPEN_SOURCE ? (
<Menu.Item
data-testid="workspace.library.header.create.chatflow"
icon={<IconCozChat />}
onClick={() => {
openCreateModal(WorkflowMode.ChatFlow);
}}
>
{I18n.t('wf_chatflow_76')}
</Menu.Item>
) : null}
<Menu.Item
data-testid="workspace.library.header.create.chatflow"
icon={<IconCozChat />}
onClick={() => {
openCreateModal(WorkflowMode.ChatFlow);
}}
>
{I18n.t('wf_chatflow_76')}
</Menu.Item>
</>
),
target: [ResType.Workflow, ResType.Imageflow],