Downcity
Chrome Extension

Install and Connect

How to build, load, and connect the Chrome extension to one or more Downcity Servers

Install and Connect

Prerequisites

Before using the extension, you will usually want these running:

studio start
studio agent start

If you load the extension from this repo, build it first:

npm run build:extension

Load It in Chrome

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked
  4. Choose products/chrome-extension/dist

First-Time Configuration

The extension ships with one default connection:

  • Protocol: http
  • Host: 127.0.0.1
  • Port: 5315
  • Base Path: empty

If your Server lives elsewhere, open the extension settings page. The page is now organized into:

  • Server Connections: manage multiple connections
  • Authentication: configure the Bearer Token for the current connection
  • Default Routing: choose the default Agent / Session for the current connection
  • Default Ask: set the popup's default Ask

How to Add Multiple Connections

In the settings page:

  1. Click 新建连接
  2. Fill in the connection name, Host, and Port
  3. If the remote service uses HTTPS or sits behind a sub-path, also set Protocol and Base Path
  4. Add a Bearer Token if that Server requires one
  5. Save

After that, the popup can switch between those connections directly.

How to Get a Token

If the target Server requires unified auth, create a token in the local terminal:

studio token create my-token

If you prefer the interactive flow, run:

studio token

Then paste the returned token into Bearer Token.

How Agent and Session Selection Works

The extension first loads the Agent list for the current connection, then loads the available Sessions under that Agent.

If no Session is available, it usually means:

  • that chat channel has no session history yet
  • the Agent is not running
  • the connection address is wrong
  • the remote Console is not listening publicly, or the server firewall blocks the port

For a server deployment, you can either start Console once with studio start --public, or persist public mode with studio public on.

After Updating the Extension

Whenever extension code changes, rebuild it:

npm run build:extension

Then go back to chrome://extensions and press the refresh button for the unpacked extension.