-
Notifications
You must be signed in to change notification settings - Fork 6.6k
add ai generate node #5506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4.12.3-dev
Are you sure you want to change the base?
add ai generate node #5506
Conversation
Preview sandbox Image:
|
Preview mcp_server Image:
|
Preview fastgpt Image:
|
TestGru AssignmentSummary
Files
Tip You can |
@@ -660,6 +660,37 @@ export const compareSnapshot = ( | |||
return isEqual(node1, node2); | |||
}; | |||
|
|||
export const extractCodeFromMarkdown = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是通用的逻辑,单独拉个 目录来处理
@@ -14,7 +14,9 @@ export enum UsageSourceEnum { | |||
pdfParse = 'pdfParse', | |||
mcp = 'mcp', | |||
evaluation = 'evaluation', | |||
optimize_prompt = 'optimize_prompt' | |||
optimize_prompt = 'optimize_prompt', | |||
code_copilot = 'code_copilot', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
仅保留 code_copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么会放到 common 里
@@ -100,7 +100,7 @@ export const useReference = ({ | |||
.map((output) => { | |||
return { | |||
label: t(output.label as any), | |||
value: output.id, | |||
value: output.key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好像就是 id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看看是改了啥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目录调整下,这个应该是属于 NodeCode 里的,nodes/NodeCode/Copliot.tsx
loadingText={t('app:testing')} | ||
onClick={handleTestCode} | ||
> | ||
{t('app:test_code')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试功能没做好的话,就先不展示了
@@ -289,6 +291,24 @@ const NodeCard = (props: Props) => { | |||
<Box color={'red.600'}>{t(error as any)}</Box> | |||
</Flex> | |||
)} | |||
{node?.flowNodeType === FlowNodeTypeEnum.code && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: 看看能不能优化成一行,避免很多 IF,或者改成从顶层传入
@@ -143,7 +143,7 @@ export const getEditorVariables = ({ | |||
.map((output) => { | |||
return { | |||
label: t((output.label as any) || ''), | |||
key: output.id, | |||
key: output.key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
检查
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不算 ai 通用的,放到 core/workflow 里
No description provided.