Feature Guides / AI Chat & Inline Edit

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.

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:

ActionEffect
RefactorImprove naming, structure, and readability with behavior fully unchanged
ExplainAdd concise inline comments
DocumentGenerate standard doc comments (JSDoc / docstring / rustdoc)
TestGenerate unit tests using the project's mainstream test framework
Find similarExtract 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:

ModelRetention method
Kimi K3Thinking persists; intensity controlled by reasoning_effort
GLM-5.2thinking parameter carries clear_thinking: false
Kimi K2.6thinking parameter carries keep: "all"

You can tune related behavior in lxz.config.json:

  • ide.inline_edit_context_lines (default 5): how many context lines Inline Edit carries when rewriting.
  • ide.chat_position (default right_panel): position of the AI chat panel.

See Configuration for the full list of options.