This commit is contained in:
team3
2026-06-07 16:34:17 +02:00
parent ab8c577899
commit 58fd209174
8 changed files with 437 additions and 189 deletions

View File

@@ -165,6 +165,16 @@ export async function styleElement(id, provider = 'claude') {
return res.json()
}
export async function refineSuggestion(id, suggestion, instruction, provider = 'claude') {
const res = await fetch(`${BASE}/elements/${id}/refine`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ suggestion, instruction, provider }),
})
if (!res.ok) throw new Error(`Überarbeitung fehlgeschlagen (${res.status})`)
return res.json()
}
export async function checkElement(id, provider = 'claude') {
const res = await fetch(`${BASE}/elements/${id}/check`, {
method: 'POST',