惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
博客园 - 叶小钗
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
有赞技术团队
有赞技术团队
U
Unit 42
博客园 - 司徒正美
博客园 - 聂微东

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0
New npm package for automatic recovery of broken streamin...
Hayden BleaselDX Engineer · 2025-12-03 · via Vercel News

Remend is a new standalone package that brings intelligent incomplete Markdown handling to any application.

Previously part of Streamdown's Markdown termination logic, Remend is now a standalone library (npm i remend) you can use in any application.

Link to headingWhy it matters

AI models stream Markdown token-by-token, which often produces incomplete syntax that breaks rendering. For example:

  • Unclosed fences

  • Half-finished bold/italic markers

  • Unterminated links or lists

Without correction, these patterns fail to render, leak raw Markdown, or disrupt layout:

**This is bold text

[Click here](https://exampl

`const foo = "bar

Remend automatically detects and completes unterminated Markdown blocks, ensuring clean, stable output during streaming.

import remend from "remend";

const partialMarkdown = "This is **bold text";

const completed = remend(partialMarkdown);

// Result: "This is **bold text**"

As the stream continues and the actual closing markers arrive, the content seamlessly updates, giving users a polished experience even mid-stream.

It works with any Markdown renderer as a pre-processor. For example:

import remend from "remend";

import { unified } from "unified";

import remarkParse from "remark-parse";

import remarkRehype from "remark-rehype";

import rehypeStringify from "rehype-stringify";

const streamedMarkdown = "This is **incomplete bold";

// Run Remend first to complete incomplete syntax

const completedMarkdown = remend(streamedMarkdown);

// Then process with unified

const file = await unified()

.use(remarkParse)

.use(remarkRehype)

.use(rehypeStringify)

.process(completedMarkdown);

console.log(String(file));

Remend powers the markdown rendering in Streamdown and has been battle-tested in production AI applications. It includes intelligent rules to avoid false positives and handles complex edge cases like:

  • Mathematical expressions with underscores in LaTeX blocks

  • Product codes and variable names with asterisks/underscores

  • List items with formatting markers

  • Nested brackets in links

To get started, either use it through Streamdown or install it standalone with: