LogViewer
日志查看器 · 数据驱动行 lines(level/message/timestamp/source) + info/warn/error/debug/success 级别着色(纯函数 levelClass 可测) + autoScroll 新行贴底(复用 Conversation 法) + showTimestamp + wrap 折行/横滚 · 区别 Terminal mockup·真·流式输出
12:00:01▸ npm run build
12:00:01[turbo]scope: 1 package
12:00:02compiling 248 modules…
12:00:05[ts]unused var 'x' at app.tsx:42
12:00:09✓ compiled in 8.1s
12:00:10[lint]2 problems (1 error, 1 warning)
全状态
12:00:01▸ npm run build
12:00:01[turbo]scope: 1 package
12:00:02compiling 248 modules…
12:00:05[ts]unused var 'x' at app.tsx:42
12:00:09✓ compiled in 8.1s
12:00:10[lint]2 problems (1 error, 1 warning)
12:00:01Allocating sandbox…
12:00:01✓ microVM ready (180ms)
Error: connect ECONNREFUSED 127.0.0.1:5432 at TCPConnectWrap.afterConnect — 这是一条很长的日志,wrap 开启后会折行而不是横向滚动,保证窄容器里也能读全。