packages/cli/src/acp-integration/session/rewrite/README.md
⚠️ Temporary Solution — subject to change or removal at any time.
This is a stopgap implementation. We are considering a hook-based approach that would be more decoupled and extensible. Ideas and suggestions for a better design are very welcome.
When a coding agent is integrated into vertical business scenarios (data analysis, ops, report generation, etc.), the raw output often contains technical details (file paths, tool calls, internal reasoning) that end users don't care about. By configuring a rewrite prompt, the output can be transformed into business-friendly language.
agent_message_chunk with _meta.rewritten: true_meta.rewrittenAdd to settings.json:
{
"messageRewrite": {
"enabled": true,
"target": "all",
"promptFile": ".qwen/rewrite-prompt.txt",
"model": "qwen3-plus",
"contextTurns": 1,
"timeoutMs": 60000
}
}
timeoutMs sets the per-rewrite LLM call timeout in milliseconds. Defaults to 30000.