Say on the Profile page that drafting from the website needs an AI provider

The Draft button is disabled, with a link to Settings → AI provider,
until one is set up; the Overview lists the AI provider first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 14:54:04 -07:00
co-authored by Claude Opus 5.5
parent cd24f2a06d
commit 434a9093b0
4 changed files with 30 additions and 4 deletions
+3 -3
View File
@@ -84,10 +84,10 @@ func (s *Server) dashboard(w http.ResponseWriter, r *http.Request) {
conns := s.connections()
steps := []step{
{Label: "Company profile", Done: p.IsSet(), Link: "/profile",
Detail: ifElse(p.IsSet(), p.Name, "Describe the company, its products and its customers")},
{Label: "AI provider", Done: aiErr == nil, Link: "/settings/ai",
Detail: ifElse(aiErr == nil, aiCfg.Provider+" · "+aiCfg.Model, "Choose Anthropic or a server on your network")},
Detail: ifElse(aiErr == nil, aiCfg.Provider+" · "+aiCfg.Model, "Choose Anthropic or a server on your network; the profile draft and posts need it")},
{Label: "Company profile", Done: p.IsSet(), Link: "/profile",
Detail: ifElse(p.IsSet(), p.Name, "Describe the company, its products and its customers (the AI can draft it from your website)")},
{Label: "Inventory", Done: len(entries) > 0, Link: "/inventory",
Detail: inventorySummary(counts)},
{Label: "Social accounts", Done: s.Secrets.Has(secrets.XAccessToken) || s.Secrets.Has(secrets.LinkedInAccessToken) || s.Secrets.Has(secrets.RedditAccessToken),