Workspaces, Assistants & Dialogs

Workspace

A workspace is a folder for assistants + dialogs + artifacts. The data model (src/utils/types.ts):

interface Workspace {
  id: string
  name: string
  avatar: Avatar
  type: 'workspace'
  parentId: string     // '$root' for top-level
  vars: Record<string, string>       // workspace-level variables
  indexContent: string                  // markdown home page content
  defaultAssistantId?: string
  lastDialogId?: string
  listOpen: { assistants: boolean, artifacts: boolean, dialogs: boolean }
}

vars are interpolated into assistant prompts via {{varName}} placeholders. The home content is a markdown page that shows up when you open the workspace at /workspaces/:wid/.

Creating a workspace

  1. Left drawer → + next to the workspace selector → pick Workspace.
  2. Set name, icon (text / SVG / URL / icon / image), and an optional home markdown.
  3. Optionally set workspace variables (each key=value pair is referenced as {{key}} in any assistant prompt in this workspace).

Assistant

An assistant is a saved bundle of (provider, model, prompt, plugins, modelSettings):

interface Assistant {
  id: string
  name: string
  avatar: Avatar
  prompt: string               // raw user prompt; will be combined with promptTemplate
  promptVars: PromptVar[]      // input vars collected before each dialog
  promptTemplate: string       // "default" or a custom template that uses {{}} placeholders
  provider: Provider
  model?: Model
  modelSettings: { temperature, topP, presencePenalty, frequencyPenalty, maxSteps, maxRetries }
  workspaceId: string
  plugins: AssistantPlugins    // enabled plugin ids + their per-assistant settings
  promptRole: 'system' | 'user' | 'assistant'
  contextNum?: number          // max prior messages to include
  stream: boolean
  description?: string
  author?: string
  homepage?: string
}

Creating an assistant

  1. Open a workspace.
  2. Left drawer → Assistants section → +.
  3. Set name, description (markdown).
  4. Pick provider and model.
  5. Write prompt. Variables come from two places: workspace vars (always available) and assistant promptVars (asked each time the assistant is used in a dialog).
  6. Pick a prompt template. The shipped default template combines {{system_prompt}}, {{history}}, {{input}}, {{tools}}, {{currentTime}}, {{workspace_vars}}, {{input_vars}}.
  7. Enable plugins from the chips area.
  8. Set model settings: temperature (default 0.6), topP (1.0), maxSteps (4), maxRetries (1).

Dialog

A dialog is a single conversation thread. Branching is built in: see Architecture — branching chat.

Creating a dialog:

  1. In a workspace, left drawer → Dialogs → +.
  2. Pick an assistant (defaults to workspace's defaultAssistantId).
  3. Type and send. Send-key defaults to Ctrl+Enter (configurable in Settings).
  4. Right-click the dialog header to create a sibling dialog (parallel conversation with same assistant).

Per-conversation overrides

The header shows the current model name. Click it to open a menu:

  • Pick a different model (sets dialog.modelOverride)
  • Use the assistant's default model (clears override)
  • Use the global default (no assistant model set)
  • Pick a model from your Common Models list

Mid-conversation:

  • Click any past assistant message to edit and regenerate. This creates a new branch and switches the route to it.
  • Use the chat-router (sidebar of branch buttons in the dialog) to navigate between branches.
  • Press the regenerate shortcut to re-run the last assistant message.

Prompt variables

There are three layers:

  1. Workspace vars: workspace.vars, available everywhere in the workspace.
  2. Assistant prompt vars: defined on the assistant; collected at dialog start (or in the dialog UI) and saved in dialog.inputVars.
  3. Dialog input vars: per-dialog overrides of the assistant's prompt vars.

Placeholders are {{varName}}. The default prompt template wires {{workspace_vars}} and {{input_vars}} as JSON.

Artifacts

An artifact is a long-lived editable document inside a workspace. Versions are stored in artifacts[].versions[]. The artifact plugin can auto-extract an artifact from a finished assistant reply (toggle in Settings → Automatically Extract Artifact). The editor is reachable at /workspaces/:wid/artifacts/:aid via the workspace's Artifacts section.