feat: plugin config editor form

This commit is contained in:
Junyan Qin
2025-05-09 18:52:04 +08:00
parent a5f3331c24
commit 7c15f3ba12
9 changed files with 135 additions and 16 deletions
@@ -183,13 +183,6 @@ export default function BotForm({
setAdapterNameToDynamicConfigMap(adapterNameToDynamicConfigMap);
}
async function onCreateMode() { }
function onEditMode() {
console.log('onEditMode', form.getValues());
}
async function getBotConfig(botId: string): Promise<z.infer<typeof formSchema>> {
const bot = (await httpClient.getBot(botId)).bot;
return {
@@ -503,7 +496,7 @@ export default function BotForm({
</Button>
</>
)}
<Button type="button" onClick={() => onFormCancel()}>
<Button type="button" variant="outline" onClick={() => onFormCancel()}>
</Button>
</div>