Cortask

Chat

The Chat page (/) is the primary interface for interacting with the AI agent. It requires an active workspace -- if none exists, you will be prompted to create one.

Session Management

Sessions are listed in two places: the left sidebar under "Chats" and the header tab bar.

  • New session -- click the "+" button in the sidebar header or the tab bar. This creates an unsaved session that becomes persisted once the first message is sent.
  • Switch sessions -- click any session in the sidebar list or header tabs.
  • Delete a session -- open the context menu (three-dot icon) on a session in the sidebar and select Delete.
  • Export a session -- open the same context menu and select Export. The session is downloaded as a Markdown file.

Sessions from external channels (Telegram, Discord, WhatsApp) display the respective channel logo instead of the default chat icon.

Sending Messages

The chat input sits at the bottom of the chat column inside a rounded card. It includes:

  • Text area -- auto-resizes up to 200px. Press Enter to send, Shift+Enter for a new line.
  • Attachments -- click the paperclip icon or paste images from the clipboard. Accepted types: PNG, JPEG, GIF, WebP. Thumbnails appear above the text area and can be removed individually.
  • File context -- files selected in the workspace sidebar file tree are shown as a count badge above the input. These files are sent as context with the next message.
  • Model selector -- a dropdown in the toolbar shows the current model. Clicking it opens a grouped list of enabled models from all configured providers. Switching models here also sets the default for the provider.
  • Permission mode toggle -- switches between "Safe mode" (yellow dot, requires approval for tool actions) and "Auto mode" (green dot, automatic approval).

Streaming Responses

While the agent is responding:

  • Thinking -- a collapsible "Thinking..." indicator appears with a spinner. Click it to expand the raw thinking text. Once complete it collapses to "Thought".
  • Text -- assistant text streams in with a blinking cursor. Markdown is rendered with GFM support (tables, code blocks, lists).
  • Tool calls -- each tool invocation appears as a compact row showing a status dot (spinner while running, green when done), the tool name, and a brief summary of the input. Click the row to expand and see the full input and output. The output is hidden for artifacts and file references that render separately.
  • Stop button -- the send button transforms into a red stop button during streaming. Clicking it cancels the current run.

Permission Dialogs

In Safe mode, when the agent wants to execute a tool that requires approval, an inline permission card appears in the message list with a yellow "Permission Required" header. It shows the tool description and offers Allow and Deny buttons. Once resolved, the card collapses to a small "Allowed" or "Denied" indicator.

Questionnaires

The agent can present interactive questionnaires inline in the chat. These render as form cards with input fields based on the schema the agent provides. You can fill in values and submit, or skip the questionnaire. Submitted responses are shown in a read-only state.

Artifacts and Preview Panel

When the agent produces an artifact (HTML page, code file, image, etc.) or creates a file, it renders as a clickable card in the chat. Clicking it opens the preview panel, which supports:

  • HTML -- rendered in a sandboxed iframe.
  • Markdown -- rendered with GFM support.
  • Images -- displayed with max-width/max-height constraints.
  • PDF -- embedded in an iframe.
  • Text/Code -- displayed as preformatted text.

For text-based file types, the preview panel has View and Edit tabs. In Edit mode, changes are shown in a monospace textarea and a Save button appears when there are unsaved modifications.

The panel is resizable by dragging the left edge, with a minimum width of 280px. Width is persisted in local storage.

File reference cards in chat also offer a download/open button -- in the desktop app this opens the file in the system default application; in the browser it downloads the file.

Prompt Templates

The template button (grid icon) in the chat toolbar opens a popup listing saved prompt templates grouped by category. Features:

  • Select a template -- clicking fills the input with the template content.
  • Save current input -- when the input has text, an option appears to save it as a new template.
  • Create new -- opens a dialog with name, category, and content fields.
  • Edit/Delete -- hover a template to reveal edit and delete controls.