Skip to content

Releases: wentongCloud/prompt-formatting-tool

v1.3.0

Choose a tag to compare

@wentongCloud wentongCloud released this 28 Sep 07:33

Inline code spans
Escape sequences inside … / … are treated as character descriptions, not structural escapes
Format side: prose and code spans peel in lockstep (same layer count, strict single-layer decode) and never further, so Escape line breaks as \n survives verbatim
Compress side: a literal \n inside a span is never expanded into a physical line break (symmetric with format); invalid escapes like C:\users no longer trigger extra peeling

Extension loading
Build emits a root manifest.json pointing at the dist bundle — "Load unpacked" now works from the project root, not just dist
Toolbar click opens the tool page via a runtime-relative URL
New npm run test:extension verifies both loading directories

Docs
New CHANGELOG.md; README + AGENTS.md updated with inline-code-span semantics

v1.2.1

Choose a tag to compare

@wentongCloud wentongCloud released this 23 Aug 02:01

Compression Correctness

  • Bare quotes are now always escaped — the gate protects only already-escaped \", so compressed output is always a valid JSON string body
  • Raw leading/trailing newlines no longer leak into compressed output (only horizontal edge whitespace is preserved)
  • Multi-line Markdown mixed with compressed fragments is denoised first: a targeted peel removes only the literal \n/\" layer (never touching \t/\\) before encoding — exactly one escape layer, idempotent
  • Escaped \n is treated as a line boundary: line-leading indent after it is trimmed instead of folded into a space

TOON

  • Generic headers: name[N]{fields}:, field-less arrays name[N]:, single objects name{fields}:
  • Line-aware layout: table rows kept whole (not comma-split); nested - fields[·]{·}: blocks indented via a declaration-counted block stack; sibling blocks stay at the same indent level

Docs

  • Added AGENTS.md architecture doc; README compression semantics updated

66/66 unit tests green.

v1.2.0

Choose a tag to compare

@wentongCloud wentongCloud released this 20 Aug 00:38

Escape & Compression

  • Gated pass-through encoding: existing escapes (\" \\ \n \r \b \f \uXXXX) are protected and never double-escaped; repeated compression stays idempotent
  • Literal \t is no longer decoded as a tab — Windows paths and regex (C:\tmp) survive compress → format round trips
  • Real tabs → \t (only runs of 2+ fold to a single space); CR/CRLF normalized to LF
  • Compression now applies the same denoising as formatting ("content": " wrapper and wrapping quotes stripped)

Formatting

  • Plain-text prompts collapse runs of 2+ spaces/tabs into a single space (line-leading indentation and trailing whitespace preserved; fenced blocks untouched)
  • Bare ``` fences recognized as code blocks
  • Malformed JSON repaired via jsonrepair (unquoted keys, trailing commas, truncation, 20+ cases)

Extension & Engineering

  • Fixed Copy button on the extension page (clipboardWrite + fallback + error toast)
  • Internationalized toolbar title (zh_CN / en); CJK-aware token estimation with memoization
  • Core logic split from one 871-line module into five single-purpose modules (escape / json / html / toon / transform) with one-directional dependencies
  • 59/59 unit tests green

v1.1.1 · Stability & cleanup

Choose a tag to compare

@wentongCloud wentongCloud released this 16 Aug 01:59

Fixes & Improvements

  • Fixed manual input-format lock being silently overridden by auto-detection
  • Removed duplicated code paths (edge-whitespace handling, TOON string escaping)
  • Build optimized for modern Chrome (esnext target)
  • English page metadata; refreshed README screenshot

v1.1.0 · Multi-format support

Choose a tag to compare

@wentongCloud wentongCloud released this 16 Aug 01:40

New Features

  • Automatic input format detection with manual override: Prompt / JSON / TOON / HTML
  • TOON formatting: indented row expansion and string quoting governance, preserving business spaces, smart quotes, cell order and coordinates
  • Dedicated JSON / HTML pretty-printing; output syntax highlighting adapts to the detected format
  • Precise copy of selected output text (plain text + rich text)
  • Input stats now show estimated token count
  • UI switched to English

v1.0.1 · 转义处理修复

Choose a tag to compare

@wentongCloud wentongCloud released this 12 Aug 22:12

修复与改进

  • 支持多级换行转义:\\n、\\\n、\\\\n
  • 有效 JSON 优先结构化格式化:Tab 缩进,字符串内保持有效的 \n 转义
  • 防止重复转义误伤普通反斜杠内容
  • 新增回归测试,单元测试 13/13 通过

安装

下载附件 zip 解压 → chrome://extensions 开发者模式 → 加载已解压的扩展程序

v1.0.0 · 首个公开发布

Choose a tag to compare

@wentongCloud wentongCloud released this 11 Aug 09:49

Prompt 内容格式化 / 压缩工具,Chrome 扩展 + Web 双形态。

核心功能

  • 格式化:行文本(JSON 转义)→ 可读 Markdown,自动美化内嵌 JSON / HTML 结构
  • 压缩:Markdown → JSON 安全单行文本,与格式化严格互逆
  • 自动过滤:粘贴时剥离 "content": " / ", 等 JSON 包装碎片
  • Ant Design:small 尺寸、light 主题、Ant Icons

安装

  • Chrome 扩展:下载附件 zip 解压 → chrome://extensions 开发者模式 → 加载已解压的扩展程序
  • Web:npm install && npm run dev 访问 http://localhost:5173