VS Code Extensions
A

AI Editor - Text Analysis

by cleartext

AI-powered text analysis extension for clear and professional writing

Downloads

54

Rating

— (0)

Version

0.0.3

Last updated

Jun 16, 2026

VS Code extension for incremental text analysis in Markdown, plaintext, and optionally code comments.

Wiki

Project wiki with architecture and component relationships: WIKI.md

What It Does

  • Checks changed text on onDidChangeTextDocument with debounce
  • Runs full-document analysis on command and optionally on save
  • Publishes issues through the VS Code Diagnostics API
  • Shows hover messages for detected problems
  • Adds Quick Fix actions:
    • Apply suggestion: ...
    • Ask AI to rewrite this
    • Игнорировать
  • Can analyze through local regex rules and an optional server API
  • Opens an optional AI chat webview

Commands

Command Description
aiEditor.checkDocument Analyze the entire active document
aiEditor.openAIChat Open the AI chat panel

Settings

{
  "aiEditor.enabledMarkdown": true,
  "aiEditor.enabledPlaintext": true,
  "aiEditor.enabledComments": true,
  "aiEditor.ignoreWords": [],
  "aiEditor.analyzeOnSave": true,
  "aiEditor.analysisDebounceMs": 700,
  "aiEditor.diagnosticLevel": "Warning",
  "aiEditor.serverUrl": "https://www.cleartext.ru:9080"
}
Setting Description
aiEditor.enabledMarkdown Enable analysis for Markdown files
aiEditor.enabledPlaintext Enable analysis for plaintext files
aiEditor.enabledComments Enable comment-only analysis inside code files
aiEditor.ignoreWords Terms that should not be flagged
aiEditor.analyzeOnSave Run an additional full-document pass on save
aiEditor.analysisDebounceMs Debounce delay for incremental analysis
aiEditor.diagnosticLevel Base diagnostics level in the editor
aiEditor.serverUrl REST API base URL for /analyze, /rewrite and queued AI rewrite endpoints

Analysis Model

  • Markdown and plaintext: analyzes the changed sentence or nearby fragment
  • Code files: when enabledComments is on, analyzes only comment blocks
  • Manual command and save hook: analyze the whole document

API Contract

POST /analyze

Request:

{
  "text": "В данный момент осуществляется проверка текста.",
  "max_issues": 100
}

Response:

{
  "issues": [
    {
      "start": 0,
      "end": 26,
      "type": "style",
      "message": "Канцеляризм",
      "suggestion": "Сейчас проверяем текст.",
      "severity": "warning"
    }
  ]
}

POST /rewrite

Request:

{
  "text": "В данный момент осуществляется проверка текста.",
  "aggressive": false
}

Response:

{
  "rewritten": "Сейчас проверяем текст."
}

POST /api/v1/ai-rewrite/jobs

Request:

{
  "text": "В данный момент осуществляется проверка текста.",
  "issue_type": "канцеляризм",
  "issue_fragment": "В данный момент"
}

Response:

{
  "job_id": "8db4d498-2b0e-4c73-9e5e-0d9da85d6d47",
  "status": "queued",
  "poll_after_ms": 1200
}

GET /api/v1/ai-rewrite/jobs/{job_id}

Response:

{
  "job_id": "8db4d498-2b0e-4c73-9e5e-0d9da85d6d47",
  "status": "completed",
  "rewritten_text": "Сейчас проверяем текст."
}

Development

npm run compile

Related extensions