chore: remove unused code

This commit is contained in:
AkaraChen 2024-12-31 13:50:31 +08:00
parent f81bbee6b6
commit 066595f3aa

View File

@ -15,7 +15,6 @@ import Field from './field'
import type { ComponentProps } from 'react' import type { ComponentProps } from 'react'
import { useDefaultModel, useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks' import { useDefaultModel, useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'
import Editor from './prompt/editor' import Editor from './prompt/editor'
import { strategyParamToCredientialForm } from '../../agent/panel'
import { useWorkflowStore } from '../../../store' import { useWorkflowStore } from '../../../store'
export type Strategy = { export type Strategy = {
@ -144,7 +143,7 @@ export const AgentStrategy = (props: AgentStrategyProps) => {
onChange={onChange} onChange={onChange}
onGenerated={handleGenerated} onGenerated={handleGenerated}
title={schema.label[language]} title={schema.label[language]}
headerClassName='bg-transparent px-0 text-text-secondary system-sm-semibold-uppercase !text-base' headerClassName='bg-transparent px-0 text-text-secondary system-sm-semibold-uppercase'
containerClassName='bg-transparent' containerClassName='bg-transparent'
gradientBorder={false} gradientBorder={false}
isSupportPromptGenerator={!!schema.auto_generate?.type} isSupportPromptGenerator={!!schema.auto_generate?.type}
@ -173,26 +172,7 @@ export const AgentStrategy = (props: AgentStrategyProps) => {
strategy strategy
? <div> ? <div>
<Form<CustomField> <Form<CustomField>
formSchemas={[ formSchemas={formSchema}
...formSchema,
...[{
name: 'instruction2',
type: 'string',
required: true,
label: {
en_US: 'Instruction2',
zh_Hans: '指令2',
pt_BR: 'Instruction2',
},
auto_generate: {
type: 'prompt_instruction',
},
template: {
enabled: true,
},
// @ts-expect-error just for test
}].map(strategyParamToCredientialForm),
]}
value={formValue} value={formValue}
onChange={onFormValueChange} onChange={onFormValueChange}
validating={false} validating={false}