This commit is contained in:
team3
2026-07-01 22:01:32 +02:00
parent fa718b7d6c
commit b5398f73d2
17 changed files with 1580 additions and 522 deletions

View File

@@ -47,11 +47,11 @@ export async function fetchBlocksStatus(topic) {
return res.json()
}
export async function createBlocks(topic, instructions = '', provider = 'claude', sourceType = 'thema', sourceOrt = '', abPhase = null, abStep = null, toStep = null) {
export async function createBlocks(topic, instructions = '', provider = 'claude', sourceType = 'thema', sourceOrt = '', abPhase = null, abStep = null, toStep = null, research = true) {
const res = await fetch(`${BASE}/blocks`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ topic, instructions, provider, source_type: sourceType, source_location: sourceOrt, ab_phase: abPhase, ab_step: abStep, to_step: toStep }),
body: JSON.stringify({ topic, instructions, provider, source_type: sourceType, source_location: sourceOrt, ab_phase: abPhase, ab_step: abStep, to_step: toStep, research }),
})
return jsonOrThrow(res)
}
@@ -147,6 +147,24 @@ export async function fetchBlocksOverview(topic) {
return jsonOrThrow(res)
}
// Live card counts per kanban column ({} when the streaming inventory is not in use).
export async function fetchKanban(topic) {
const res = await fetch(`${BASE}/blocks/kanban?topic=${encodeURIComponent(topic)}`)
return jsonOrThrow(res)
}
// Currently running agents for a topic + their runtime in seconds.
export async function fetchAgents(topic) {
const res = await fetch(`${BASE}/blocks/agents?topic=${encodeURIComponent(topic)}`)
return jsonOrThrow(res)
}
// Attach one more research agent to the running kanban flow.
export async function addResearch(topic) {
const res = await fetch(`${BASE}/blocks/research?topic=${encodeURIComponent(topic)}`, { method: 'POST' })
return jsonOrThrow(res)
}
export async function cancelGuide(id) {
await fetch(`${BASE}/guides/${id}/cancel`, { method: 'POST' })
}