Chris Toshok 8d3a8eeb3a use AsyncLocalStorageContextManager to propagate trace context around (#32)
I noticed that the `llm.chat.*_tokens` attributes weren't in spans, and it turns out none of the attributes from the wrapped function make it in.  only those added synchronously from within `wrapWithSpan` do.

A few things in play here:

1. Switch from `ZoneContextManager` (which doesn't work with native async/await) to `AsyncLocalStorageContextManager` (which does.)
2. (1) requires we use a pnpm patch, since wrangler requires that we import `async_hooks` statically, and the otel code `requires` it, and also requires that it's spelled `node:async_hooks`.
3. encode the payload we try to send _before_ doing the retry loop, so we don't re-encode for each attempt.
4. switch from `startActiveSpan` to `context.with` + `startSpan`.  The latter allows us to wrap an async function.  the former is for synchronous functions.
2025-02-19 06:49:32 -08:00
2025-02-18 12:41:20 -08:00
2024-09-25 19:54:09 +01:00
2024-09-25 19:54:09 +01:00
2024-10-25 12:36:38 +06:00
2024-07-25 14:03:38 +01:00
2024-12-13 13:42:07 -05:00
2024-07-11 16:20:57 +02:00
2024-07-11 16:20:57 +02:00
2024-07-11 21:25:19 +02:00
2024-09-25 19:54:09 +01:00
2024-12-31 22:28:11 +00:00
2024-12-20 09:37:34 -05:00
2024-12-20 09:37:34 -05:00
2024-09-25 19:54:09 +01:00
2025-01-07 19:53:04 +01:00
2025-02-18 11:19:24 -08:00

Nut

Nut is an open source fork of Bolt.new for helping you develop full stack apps using AI. AI developers frequently struggle with fixing even simple bugs when they don't know the cause, and get stuck making ineffective changes over and over. We want to crack these tough nuts, so to speak, so you can get back to building.

When you ask Nut to fix a bug, it creates a Replay.io recording of your app and whatever you did to produce the bug. The recording captures all the runtime behavior of your app, which is analyzed to explain the bug's root cause. This explanation is given to the AI developer so it has context to write a good fix.

Setup

pnpm install
pnpm build
./node_modules/.bin/wrangler pages dev
Description
No description provided
Readme 42 MiB
Languages
TypeScript 97.4%
SCSS 1.5%
JavaScript 0.7%
Shell 0.2%
Dockerfile 0.1%