module Web.View.AgentRegistrations.New where import Web.View.Prelude data NewView = NewView { agent :: !AgentRegistration , hubs :: ![Hub] } instance View NewView where html NewView { .. } = [hsx|

Register Agent

{renderForm agent hubs}
|] renderForm :: AgentRegistration -> [Hub] -> Html renderForm agent hubs = formFor agent [hsx|
{(textField #hubId) { fieldLabel = "Hub", fieldClass = "block w-full border-gray-300 rounded-md shadow-sm" }}
{(textField #name) { fieldLabel = "Name" }}
{(textField #slug) { fieldLabel = "Slug (unique identifier)" }}
{(textareaField #description) { fieldLabel = "Description" }}
{(textField #modelName) { fieldLabel = "Model Name" }}
{(textareaField #systemPrompt) { fieldLabel = "System Prompt (optional)" }}
{submitButton { label = "Register Agent" }} Cancel
|]