Skip to content

Chat Interface

The assistant's chat interface lives on the AI Chat page (AiChat.tsx). It provides a multi-turn conversational experience with streaming responses, code rendering, and full history persistence.

Sending Messages

Type a message in the input field at the bottom and press Enter (or click the send button). The assistant streams the response token-by-token so you see output immediately rather than waiting for the full completion.

TIP

Use Shift + Enter to insert a newline without sending. This is useful for pasting multi-line code or composing longer prompts.

Streaming Responses

Responses arrive via server-sent events from the configured LLM provider. While streaming:

  • A pulsing indicator shows the model is generating.
  • You can scroll freely without losing your place.
  • Cancellation is supported — click the stop button to halt generation mid-stream.

Code Block Rendering

Code blocks in responses are syntax-highlighted automatically based on the language tag. Each code block includes:

ActionDescription
CopyCopies the raw code to clipboard
ApplyOpens a diff preview to merge generated code into an existing file
ExportSaves the block as a standalone file

Multi-Turn Conversations

The assistant maintains the full conversation context across turns. Earlier messages are included in the prompt up to the provider's context window limit. When the context is approaching capacity, xyva automatically summarizes older turns to preserve the most relevant information.

INFO

Context window sizes vary by provider — from 8k tokens (small Ollama models) to 1M+ tokens (Gemini 2.5 Pro). The assistant shows remaining capacity in the status bar.

Chat History

All conversations are persisted to the local Electron user-data directory. The history sidebar lists previous sessions by date and first message. You can:

  • Resume a previous chat (full context is restored).
  • Delete a session you no longer need.
  • Search across all history by keyword.

No conversation data is sent to external services or stored remotely. History survives app updates and restarts.

Keyboard Shortcuts

ShortcutAction
EnterSend message
Shift+EnterNew line
Ctrl+LClear current chat
Ctrl+KFocus search in history
EscapeCancel streaming response

Local-first QA orchestration.