Home Explore Blog CI



zed

1st chunk of `docs/src/ai/text-threads.md`
663a5320bfd910f6c880fb40af719033b0edbf5015ccb93400000001000003d7
# Text Threads

## Overview {#overview}

Text threads in the [Agent Panel](./agent-panel.md) function similarly to any other editor. You can use custom key bindings and work with multiple cursors, allowing for seamless transitions between coding and engaging in discussions with the language models.

However, the text threads differ with the inclusion of message blocks. These blocks serve as containers for text that correspond to different roles within the context. These roles include:

- `You`
- `Assistant`
- `System`

To begin, type a message in a `You` block.



As you type, the remaining tokens count for the selected model is updated.

Inserting text from an editor is as simple as highlighting the text and running `assistant: quote selection` ({#kb assistant::QuoteSelection}); Zed will wrap it in a fenced code block if it is code.


Title: Text Threads Overview
Summary
Text threads in the Agent Panel are similar to other editors but include message blocks for different roles: You, Assistant, and System. Users can type messages in the 'You' block, and the token count updates dynamically. Text from an editor can be inserted using 'assistant: quote selection', which wraps code in a fenced code block.