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

推荐订阅源

博客园 - 聂微东
GbyAI
GbyAI
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
A
About on SuperTechFans
M
MIT News - Artificial intelligence
宝玉的分享
宝玉的分享
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Martin Fowler
Martin Fowler
Google DeepMind News
Google DeepMind News
博客园 - Franky
B
Blog RSS Feed
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research

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: