dispatch("showAlternateMsg", { id: alternatives[Math.max(0, currentIdx - 1)] })} disabled={currentIdx === 0 || loading} >
{currentIdx + 1} / {alternatives.length}
dispatch("showAlternateMsg", { id: alternatives[Math.min(alternatives.length - 1, currentIdx + 1)], })} disabled={currentIdx === alternatives.length - 1 || loading} >
{#if !loading && message.children}
{ if (confirm("Are you sure you want to delete this branch?")) { fetch(`${base}/api/conversation/${page.params.id}/message/${message.id}`, { method: "DELETE", }).then(async (r) => { if (r.ok) { await invalidate(UrlDependency.Conversation); } else { $error = (await r.json()).message; } }); } }} >
{/if}