feat: use structured output, import CSV, bugfixes

This commit is contained in:
Vasily Zubarev
2025-03-21 18:42:14 +01:00
parent 33727a431e
commit f6dc617eae
35 changed files with 735 additions and 195 deletions

View File

@@ -1,5 +1,6 @@
"use client"
import { FormError } from "@/components/forms/error"
import { Button } from "@/components/ui/button"
import { Card } from "@/components/ui/card"
import { Download, Loader2 } from "lucide-react"
@@ -51,7 +52,7 @@ export default function BackupSettingsPage() {
)}
</Button>
</form>
{restoreState?.error && <p className="text-red-500">{restoreState.error}</p>}
{restoreState?.error && <FormError>{restoreState.error}</FormError>}
</Card>
</div>
)

View File

@@ -17,7 +17,7 @@ export default async function FieldsSettingsPage() {
items={fieldsWithActions}
columns={[
{ key: "name", label: "Name", editable: true },
{ key: "type", label: "Type", editable: true },
{ key: "type", label: "Type", defaultValue: "string", editable: true },
{ key: "llm_prompt", label: "LLM Prompt", editable: true },
]}
onDelete={async (code) => {

View File

@@ -41,7 +41,7 @@ const settingsCategories = [
export default function SettingsLayout({ children }: { children: React.ReactNode }) {
return (
<>
<div className="hidden space-y-6 p-10 pb-16 md:block">
<div className="space-y-6 p-10 pb-16">
<div className="space-y-0.5">
<h2 className="text-2xl font-bold tracking-tight">Settings</h2>
<p className="text-muted-foreground">Customize your settings here</p>

View File

@@ -1,13 +1,15 @@
import LLMSettingsForm from "@/components/settings/llm-settings-form"
import { getFields } from "@/data/fields"
import { getSettings } from "@/data/settings"
export default async function LlmSettingsPage() {
const settings = await getSettings()
const fields = await getFields()
return (
<>
<div className="w-full max-w-2xl">
<LLMSettingsForm settings={settings} />
<LLMSettingsForm settings={settings} fields={fields} />
</div>
</>
)