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
- Left drawer → + next to the workspace selector → pick Workspace.
- Set name, icon (text / SVG / URL / icon / image), and an optional home markdown.
- Optionally set workspace variables (each
key=valuepair 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
- Open a workspace.
- Left drawer → Assistants section → +.
- Set name, description (markdown).
- Pick provider and model.
- Write prompt. Variables come from two places: workspace
vars(always available) and assistantpromptVars(asked each time the assistant is used in a dialog). - Pick a prompt template. The shipped
defaulttemplate combines{{system_prompt}},{{history}},{{input}},{{tools}},{{currentTime}},{{workspace_vars}},{{input_vars}}. - Enable plugins from the chips area.
- 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:
- In a workspace, left drawer → Dialogs → +.
- Pick an assistant (defaults to workspace's
defaultAssistantId). - Type and send. Send-key defaults to
Ctrl+Enter(configurable in Settings). - 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:
- Workspace vars:
workspace.vars, available everywhere in the workspace. - Assistant prompt vars: defined on the assistant; collected at dialog start (or in the dialog UI) and saved in
dialog.inputVars. - 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.