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

@@ -117,7 +117,9 @@ export const useSendUseToolMessage = () => {
componentsFormValues: Record<string, TValue>;
options?: SendMessageOptions;
onBeforeSendTemplateShortcut?: (
params: OnBeforeSendTemplateShortcutParams,
params: OnBeforeSendTemplateShortcutParams & {
shortcut: ShortCutCommand;
},
) => OnBeforeSendTemplateShortcutParams;
withoutComponentsList?: boolean;
}) => {
@@ -170,6 +172,7 @@ export const useSendUseToolMessage = () => {
const handledParams = onBeforeSendTemplateShortcut?.({
message: cloneDeep(message),
options: cloneDeep(options),
shortcut,
}) || {
message,
options,

View File

@@ -18,10 +18,10 @@
import { type CSSProperties, type FC, useRef, useState } from 'react';
import cls from 'classnames';
import { type ShortCutCommand } from '@coze-agent-ide/tool-config';
import { useMessageWidth } from '@coze-common/chat-area';
import { OverflowList, Popover } from '@coze-arch/bot-semi';
import { SendType } from '@coze-arch/bot-api/playground_api';
import { type ShortCutCommand } from '@coze-agent-ide/tool-config';
import {
enableSendTypePanelHideTemplate,
@@ -53,7 +53,9 @@ interface ChatShortCutBarProps {
wrapperStyle?: CSSProperties;
toolTipFooterSlot?: React.ReactNode;
onBeforeSendTemplateShortcut?: (
params: OnBeforeSendTemplateShortcutParams,
params: OnBeforeSendTemplateShortcutParams & {
shortcut: ShortCutCommand;
},
) => OnBeforeSendTemplateShortcutParams;
onBeforeSendTextMessage?: (
params: OnBeforeSendQueryShortcutParams,

View File

@@ -19,7 +19,7 @@ import { exhaustiveCheckSimple } from '@coze-common/chat-area-utils';
import { type UIMode } from '../shortcut-bar/types';
export const getUIModeByBizScene: (props: {
bizScene: 'debug' | 'store' | 'home' | 'agentApp';
bizScene: 'debug' | 'store' | 'home' | 'agentApp' | 'websdk';
showBackground: boolean;
}) => UIMode = ({ bizScene, showBackground }) => {
if (bizScene === 'agentApp') {
@@ -32,7 +32,7 @@ export const getUIModeByBizScene: (props: {
return 'white';
}
if (bizScene === 'store' || bizScene === 'debug') {
if (bizScene === 'store' || bizScene === 'debug' || bizScene === 'websdk') {
if (showBackground) {
return 'blur';
}