Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e9d87b7
feat: replace demo flow with weather-based city outfit and travel adv…
louisyoungx Dec 19, 2025
427224e
style: adjust tool container and minimap positioning
louisyoungx Dec 19, 2025
6dd0301
feat: add chat panel with left docking support
louisyoungx Dec 19, 2025
79ef0e9
feat(chat): integrate AI assistant with mock messages and suggestions
louisyoungx Dec 19, 2025
d3a5039
feat: integrate AI agent plugin with OpenAI-compatible API and stream…
louisyoungx Dec 19, 2025
7be48a4
feat(chat): add markdown rendering with Mermaid diagram support
louisyoungx Dec 19, 2025
2eaf7ff
feat(chat-panel): add CodeHighlighter for code block rendering
louisyoungx Dec 19, 2025
62356a4
refactor(chat): extract conversation history building logic to servic…
louisyoungx Dec 22, 2025
45da061
refactor: update agent system prompt with security guidelines and int…
louisyoungx Dec 22, 2025
0ff38b5
refactor(agent-plugin): replace symbol token with interface-based dep…
louisyoungx Dec 22, 2025
fb559e9
refactor: remove unused sendMessage method and ChatCompletionResponse…
louisyoungx Dec 22, 2025
e144107
feat(chat): implement ReAct loop with tool calling and streaming UI
louisyoungx Dec 22, 2025
d4863fe
refactor(chat): update message bubble styling and tool call card design
louisyoungx Dec 22, 2025
1f04684
refactor(agent): extract message creation and formatting utilities in…
louisyoungx Dec 22, 2025
7dad904
refactor(chat): move message state management from component to servi…
louisyoungx Dec 22, 2025
e76d2de
refactor(chat-panel): modularize component structure and extract hooks
louisyoungx Dec 22, 2025
0453ea4
feat(chat): add request cancellation support
louisyoungx Dec 22, 2025
08285b4
refactor: move message-parser to message-content component directory
louisyoungx Dec 22, 2025
2ae62bb
refactor(agent-plugin): migrate tool system to dependency injection p…
louisyoungx Dec 22, 2025
6142a5c
refactor(agent-plugin): rename ToolRegistry to WorkflowAgentToolRegistry
louisyoungx Dec 23, 2025
bfeb3f3
refactor(agent): replace ReActConfig with parameter object and remove…
louisyoungx Dec 23, 2025
cd1065d
refactor(agent-plugin): move system prompt from TypeScript to Markdow…
louisyoungx Dec 23, 2025
ab7350a
feat(agent): add workflow info tool with structure and schema retrieval
louisyoungx Dec 23, 2025
3217efc
refactor(agent): split monolithic WorkflowInfoTool into dedicated sin…
louisyoungx Dec 23, 2025
5c0c285
feat(agent): add node validation and schema retrieval tools
louisyoungx Dec 23, 2025
d78f8e4
feat: add tools for creating LLM nodes and edges
louisyoungx Dec 23, 2025
2d536dd
feat(agent): increase ReAct loop limit to 100 iterations and add auto…
louisyoungx Dec 23, 2025
6927fca
feat(tool): add UpdateStartNode tool for modifying start node parameters
louisyoungx Dec 23, 2025
9a12f87
refactor(agent-plugin): unify node tools with BaseNodeTool and add LL…
louisyoungx Dec 23, 2025
6bb5912
feat: add remove tool for deleting nodes and edges
louisyoungx Dec 24, 2025
96a32a8
feat(agent-plugin): add tool call parameter update step for streaming
louisyoungx Dec 24, 2025
caacc18
feat: add description field support for form content and node tools
louisyoungx Dec 24, 2025
08802aa
feat: add condition and end node tools with enhanced edge creation
louisyoungx Dec 24, 2025
c6fb9d4
feat(agent): add CodeNode tool and improve chat streaming logic
louisyoungx Dec 24, 2025
dbbee9b
feat(agent): enhance todo operations and filter tool calls from LLM m…
louisyoungx Dec 24, 2025
3ef089a
refactor: split RemoveTool into separate RemoveNodeTool and RemoveEdg…
louisyoungx Dec 24, 2025
32cd5ba
feat(agent-plugin): add HTTP node tool for workflow automation
louisyoungx Dec 24, 2025
92b1149
feat(agent): add custom tool rendering and AskUserQuestion tool
louisyoungx Dec 25, 2025
98f6c2e
refactor(agent): execute tool calls concurrently for improved perform…
louisyoungx Dec 25, 2025
c49acd1
feat(tool-call-card): add status indicators for running, cancelled an…
louisyoungx Dec 25, 2025
dd8020c
feat(chat): add message actions with copy and retry functionality
louisyoungx Dec 25, 2025
e26260c
feat(chat): add empty state UI and improve message interactions
louisyoungx Dec 25, 2025
a3b853c
feat(chat): add message retry functionality with improved UI spacing
louisyoungx Dec 25, 2025
bd2ebfc
feat(chat): add message editing functionality with inline input
louisyoungx Dec 25, 2025
b4952be
refactor(chat-panel): extract empty state and edit logic into dedicat…
louisyoungx Dec 25, 2025
0d4e590
feat(chat): add schema restore confirmation for message retry and edi…
louisyoungx Dec 25, 2025
f70c19c
refactor(chat): optimize message rendering with Bubble.List and impro…
louisyoungx Dec 25, 2025
5675a82
feat: add LLM node render component and improve node selection behavior
louisyoungx Dec 25, 2025
7afa041
feat(agent-plugin): add generic node render support for all builtin n…
louisyoungx Dec 25, 2025
bd0b958
feat: add workflow validation before test run and improve tool call UI
louisyoungx Dec 25, 2025
3f9d72e
refactor(agent-plugin): unify tool result types and remove redundant …
louisyoungx Dec 26, 2025
dd5c693
style: improve tool-call-card visuals and refine workflow validation …
louisyoungx Dec 26, 2025
3c0be68
feat(agent): improve tool call handling and error resilience
louisyoungx Dec 26, 2025
4da5ac3
feat: add loop control nodes and enhance workflow container support
louisyoungx Dec 29, 2025
3314df9
style: adjust font size and overflow behavior in UI components
louisyoungx Dec 29, 2025
9646906
fix(agent): tool display delay
louisyoungx Dec 29, 2025
fc29f46
feat(agent): implement intelligent conversation summarization and con…
louisyoungx Dec 29, 2025
22d2eb1
refactor(agent-plugin): split agent-service and related logic into se…
louisyoungx Dec 29, 2025
13cdda0
feat: increase maxTokens limit and refactor validation parameters in …
louisyoungx Dec 30, 2025
5a99179
refactor(agent): reorganize plugin directory structure
louisyoungx Dec 30, 2025
21027f3
feat(agent): enhance summary prompt structure and detail for improved…
louisyoungx Dec 30, 2025
51c7131
feat(agent): update model and maxTokens for improved performance; ref…
louisyoungx Dec 30, 2025
9d5ac7d
feat(agent): add tool activation system and batch edge creation
louisyoungx Dec 30, 2025
bfe8dda
refactor(agent): replace UIChatMessage with UIMessage and introduce M…
louisyoungx Dec 31, 2025
5fd8b52
refactor(agent): consolidate tool interfaces and remove deprecated st…
louisyoungx Dec 31, 2025
30c2fb4
refactor(agent): move tool execution logic to registry and add activa…
louisyoungx Dec 31, 2025
0556ba9
refactor(agent-plugin): migrate tool definitions from JSON schema to Zod
louisyoungx Jan 12, 2026
01ba2c9
feat: migrate LLM client to Vercel AI SDK with multi-provider support
louisyoungx Jan 12, 2026
1007846
refactor(agent-plugin): migrate from string-based content to structur…
louisyoungx Jan 12, 2026
6bfdb58
refactor(agent-plugin): optimize loading state management and message…
louisyoungx Jan 12, 2026
7234a0a
feat(agent-plugin): upgrade AI SDK to v3/v6 and adapt streaming/tool …
louisyoungx Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apps/demo-free-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@
"react": "^18",
"react-dom": "^18",
"styled-components": "^5",
"classnames": "^2.5.1"
"classnames": "^2.5.1",
"@ant-design/x": "^2.1.1",
"@ant-design/x-markdown": "^2.1.1",
"antd": "^6.1.1",
"zod": "^3.24.4",
"@ai-sdk/anthropic": "^3.0.0",
"@ai-sdk/google": "^3.0.0",
"@ai-sdk/openai": "^3.0.0",
"@ai-sdk/provider-utils": "^4.0.0",
"ai": "^6.0.12"
},
"devDependencies": {
"@flowgram.ai/ts-config": "workspace:*",
Expand Down
8 changes: 8 additions & 0 deletions apps/demo-free-layout/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ export default defineConfig({
* ignore warnings from @coze-editor/editor/language-typescript
*/
ignoreWarnings: [/Critical dependency: the request of a dependency is an expression/],
module: {
rules: [
{
resourceQuery: /raw/,
type: 'asset/source',
},
],
},
},
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

import { Tooltip, IconButton } from '@douyinfe/semi-ui';
import { IconComment } from '@douyinfe/semi-icons';

import { useChatPanel } from '../../../../plugins/panel-manager-plugin/hooks';

export const ChatButton = () => {
const { toggle } = useChatPanel();
return (
<Tooltip content="Chat">
<IconButton
type="tertiary"
theme="borderless"
icon={<IconComment />}
onClick={() => toggle()}
/>
</Tooltip>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

.emptyState {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 20px;
}

.emptyContent {
text-align: center;
max-width: 480px;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}

.emptyIcon {
font-size: 64px;
line-height: 1;
margin-bottom: 12px;
color: #cbcbcb;
}

.emptyTitle {
font-size: 18px;
font-weight: 600;
color: #1a1a1a;
line-height: 1.4;
}

.emptyDescription {
font-size: 14px;
color: #666;
line-height: 1.8;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

import React from 'react';

import { IconComment } from '@douyinfe/semi-icons';

import styles from './index.module.css';

export const ChatEmptyState: React.FC = () => (
<div className={styles.emptyState}>
<div className={styles.emptyContent}>
<div className={styles.emptyIcon}>
<IconComment style={{ fontSize: '64px' }} />
</div>
<div className={styles.emptyTitle}>你好!我是 FlowGram AI 助手</div>
<div className={styles.emptyDescription}>
我可以帮你创建和编辑流程图,
<br />
有什么我可以帮助你的吗?
</div>
</div>
</div>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

.header {
padding: 8px 16px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
}

.title {
margin: 0;
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

import React from 'react';

import { IconButton } from '@douyinfe/semi-ui';
import { IconClose } from '@douyinfe/semi-icons';

import styles from './index.module.css';

interface ChatHeaderProps {
onClose: () => void;
}

export const ChatHeader: React.FC<ChatHeaderProps> = ({ onClose }) => (
<div className={styles.header}>
<h3 className={styles.title}>FlowGram AI 助手</h3>
<IconButton type="tertiary" theme="borderless" icon={<IconClose />} onClick={onClose} />
</div>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

.sender {
padding: 16px;
flex-shrink: 0;
background: #fff;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

import React from 'react';

import { Sender } from '@ant-design/x';

import { useChatInput } from '../../hooks';

import styles from './index.module.css';

interface ChatInputProps {
value?: string;
onChange?: (value: string) => void;
onSubmit?: (value: string) => void;
onCancel?: () => void;
loading?: boolean;
}

export const ChatInput: React.FC<ChatInputProps> = (props) => {
const internal = useChatInput();

// 如果传入了 props,使用外部控制(用于编辑模式)
// 否则使用内部状态(用于新消息输入)
const value = props.value ?? internal.value;
const onChange = props.onChange ?? internal.setValue;
const onSubmit = props.onSubmit ?? internal.send;
const onCancel = props.onCancel ?? internal.cancel;
const loading = props.loading ?? internal.isLoading;

return (
<div className={styles.sender}>
<Sender
placeholder="输入消息..."
value={value}
onChange={onChange}
onCancel={onCancel}
onSubmit={onSubmit}
loading={loading}
/>
</div>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/

.messages {
flex: 1;
padding-left: 16px;
display: flex;
flex-direction: column;
gap: 12px;
min-height: 0;
overflow: hidden;
}

.messages :global(.ant-bubble-list) {
flex: 1;
min-height: 0;
}

.messages :global(.ant-bubble-list-scroll-box)::-webkit-scrollbar {
width: 6px;
}

.messages :global(.ant-bubble-list-scroll-box)::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}

.messages :global(.ant-bubble-list-scroll-box)::-webkit-scrollbar-thumb {
background: #888;
border-radius: 3px;
}

.messages :global(.ant-bubble-list-scroll-box)::-webkit-scrollbar-thumb:hover {
background: #555;
}

.userMessageWrapper {
display: flex;
justify-content: flex-end;
width: 100%;
}

.userMessageContent {
cursor: pointer;
background: rgba(0, 0, 0, 0.06);
padding: 8px 12px;
border-radius: 8px;
width: fit-content;
white-space: pre-line;
}
Loading