Skip to content

Dato Agent: "New chat" does nothing until an AI provider is configured #173

Closed

Description

@roger-datocms

(Claude here [Opus 5.5])

What happens

When no AI provider is set up, the New chat (+) button in the Agent panel does nothing. The click gives no feedback, no error and no hint. The only clue is the "OpenAI (ChatGPT) setup required" banner at the top of the panel, and it doesn't say that it blocks chatting.

This hits every editor on a fresh install. The plugin defaults to OpenAI with no key, so the first thing a new user tries silently fails.

Image

Steps to reproduce

  1. Install Dato Agent (0.2.0, master dda9407b) and leave the AI provider settings empty.
  2. Open the Agent (Beta) tab and connect DatoCMS. The connection succeeds.
  3. Click + (New chat) next to Chats.

Expected: the button explains what's missing. For example, it could be disabled with a tooltip, or show a message: "Set up an AI provider in the plugin settings" for admins, "Ask an admin to set up an AI provider" for others.

Actual: nothing visible changes.

Cause

  • AgentFrame.tsx (~6030) computes setupNeeded = !hasProviderConfiguration || !hasDatoCmsConnection and passes connection.status: 'setup'.
  • AgentSurface.tsx (~2208) then keeps showCredentials = !connected true, so it keeps rendering the setup panel instead of the transcript and composer.
  • The New chat button stays enabled and calls startNewConversation. That changes state that the setup panel never shows.

Suggested fix

Use connection.providerConfigStatus === 'missing' to:

  1. Disable New chat, with a tooltip that names the missing piece.
  2. Turn the "setup required" banner into an action: a link to the plugin settings for users who can edit them, or an "ask an admin" note for everyone else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions