Release/v0.2.2 (#260)

* [modify] migration script

* [add] migration script

* fix(web): change form message

* fix(web): the memoryContent field is compatible with numbers and strings

* feat(web): code node hidden

* fix(model):
1. create a basic model to check if the name and provider are duplicated.
2. The result shows error models because the provider created API Keys for all matching models.

---------

Co-authored-by: Mark <zhuwenhui5566@163.com>
Co-authored-by: zhaoying <yzhao96@best-inc.com>
Co-authored-by: yingzhao <zhaoyingyz@126.com>
Co-authored-by: Timebomb2018 <18868801967@163.com>
This commit is contained in:
Ke Sun
2026-01-30 15:10:22 +08:00
committed by GitHub
parent f1503b2238
commit e7370489e8
7 changed files with 132 additions and 33 deletions

View File

@@ -126,12 +126,16 @@ const Agent = forwardRef<AgentRef>((_props, ref) => {
getApplicationConfig(id as string).then(res => {
const response = res as Config
let allTools = Array.isArray(response.tools) ? response.tools : []
const memoryContent = response.memory?.memory_content
const parsedMemoryContent = memoryContent === null || memoryContent === ''
? undefined
: !isNaN(Number(memoryContent)) ? Number(memoryContent) : memoryContent
form.setFieldsValue({
...response,
tools: allTools,
memory: {
...response.memory,
memory_content: response.memory?.memory_content ? Number(response.memory?.memory_content) : undefined
memory_content: parsedMemoryContent
}
})
setData({

View File

@@ -72,7 +72,7 @@ const KeyConfigModal = forwardRef<KeyConfigModalRef, KeyConfigModalProps>(({
<Form.Item
name="api_key"
label={t('modelNew.api_key')}
rules={[{ required: true, message: t('common.inputPlaceholder', { title: t('modelNew.apiKey') }) }]}
rules={[{ required: true, message: t('common.inputPlaceholder', { title: t('modelNew.api_key') }) }]}
>
<Input.Password placeholder={t('common.pleaseEnter')} />
</Form.Item>

View File

@@ -431,32 +431,32 @@ export const nodeLibrary: NodeLibrary[] = [
}
}
},
{ type: "code", icon: codeExecutionIcon,
config: {
input_variables: {
type: 'inputList',
defaultValue: [{ name: 'arg1' }, { name: 'arg2' }]
},
language: {
type: 'select',
defaultValue: 'python3'
},
code: {
type: 'messageEditor',
isArray: false,
language: ['python3', 'javascript'],
titleVariant: 'borderless',
defaultValue: `def main(arg1: str, arg2: str):
return {
"result": arg1 + arg2,
}`
},
output_variables: {
type: 'outputList',
defaultValue: [{name: 'result', type: 'string'}]
},
}
},
// { type: "code", icon: codeExecutionIcon,
// config: {
// input_variables: {
// type: 'inputList',
// defaultValue: [{ name: 'arg1' }, { name: 'arg2' }]
// },
// language: {
// type: 'select',
// defaultValue: 'python3'
// },
// code: {
// type: 'messageEditor',
// isArray: false,
// language: ['python3', 'javascript'],
// titleVariant: 'borderless',
// defaultValue: `def main(arg1: str, arg2: str):
// return {
// "result": arg1 + arg2,
// }`
// },
// output_variables: {
// type: 'outputList',
// defaultValue: [{name: 'result', type: 'string'}]
// },
// }
// },
{ type: "jinja-render", icon: templateRenderingIcon,
config: {
mapping: {