AI Chat & Inline Edit
LingXizhi offers two AI interaction paths: the sidebar chat handles Q&A, design discussion, and multi-round tasks, while Inline Edit makes instant rewrites to selected code. Both share the same model configuration, so you can switch freely per scenario.
Sidebar Chat
The AI panel on the right has six tabs:
- Chat: multi-round conversation with streaming output; tool calls are visible in real time.
- Tools: a full record of tool calls in the current session, with the call count shown as a badge on the tab.
- RUSH: the deep task panel; its badge shows live stage progress (e.g.
2/5). See RUSH Deep Task. - Changes: the list of file changes produced by the AI — review each item before accepting.
- Spec / Cloud: spec management and cloud sandbox tasks.
Both chat and tool calls stream back over SSE, so even long tasks show their intermediate progress in real time.
Choosing a model: chat uses the current model from "Settings → Models", with native support for 15+ mainstream models including Kimi K3 and GLM-5.2. See Models & Context.
Inline Edit (Ctrl+K)
Select code and press Ctrl + K, then describe your change in natural language in the input box, or pick a preset action directly. The request automatically carries the current file path and language, so the model produces a syntactically valid rewrite. The five preset actions:
| Action | Effect |
|---|---|
| Refactor | Improve naming, structure, and readability with behavior fully unchanged |
| Explain | Add concise inline comments |
| Document | Generate standard doc comments (JSDoc / docstring / rustdoc) |
| Test | Generate unit tests using the project's mainstream test framework |
| Find similar | Extract repeated patterns into a reusable shared function |
Results appear as an inline diff card: only the changed region is expanded — click "Accept" to apply, or press Esc to discard. With no code selected, Inline Edit generates a continuation suggestion (Ghost Text) at the cursor.
Inline Edit vs RUSH: use Inline Edit for single-point changes and small-scope rewrites — it responds faster and does not count against Agent runs; for tasks spanning 3+ files that need planning and verification, use RUSH.
Preserved Thinking
With thinking mode enabled, preserving thinking content across multiple turns prevents reasoning quality from degrading. Retention differs by model, and LingXizhi adapts automatically per model:
| Model | Retention method |
|---|---|
| Kimi K3 | Thinking persists; intensity controlled by reasoning_effort |
| GLM-5.2 | thinking parameter carries clear_thinking: false |
| Kimi K2.6 | thinking parameter carries keep: "all" |
Related Configuration
You can tune related behavior in lxz.config.json:
ide.inline_edit_context_lines(default5): how many context lines Inline Edit carries when rewriting.ide.chat_position(defaultright_panel): position of the AI chat panel.
See Configuration for the full list of options.