Go to file
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
.github [PRO-968] add a deploy step (#25) 2025-02-18 12:41:20 -08:00
.husky Merge pull request #1 from replayio/recording-button 2025-01-07 05:56:18 -10:00
app use AsyncLocalStorageContextManager to propagate trace context around (#32) 2025-02-19 06:49:32 -08:00
docs docs: bugfix/formatting faq docs (#1027) 2025-01-10 21:17:32 +05:30
functions fix: remove monorepo 2024-09-25 19:54:09 +01:00
icons feat: add Starter template menu in homepage (#884) 2024-12-24 22:37:28 +05:30
patches use AsyncLocalStorageContextManager to propagate trace context around (#32) 2025-02-19 06:49:32 -08:00
public Update backend APIs for doing simulation based prompting (#7) 2025-01-20 08:03:25 -08:00
types fix: remove monorepo 2024-09-25 19:54:09 +01:00
.dockerignore create .dockerignore file 2024-10-25 12:36:38 +06:00
.editorconfig feat: initial persistence (#3) 2024-07-25 14:03:38 +01:00
.env.example [PRO-973] basic o11y around anthropic api calls (#22) 2025-02-18 10:06:20 -08:00
.gitignore Update .gitignore 2024-12-13 13:42:07 -05:00
.prettierignore feat: initial commit 2024-07-11 16:20:57 +02:00
.prettierrc feat: initial commit 2024-07-11 16:20:57 +02:00
.tool-versions feat: add login 2024-07-11 21:25:19 +02:00
bindings.sh fix: remove monorepo 2024-09-25 19:54:09 +01:00
changelog.md chore: release version 0.0.5 2024-12-31 22:28:11 +00:00
CONTRIBUTING.md docs: updated Contributing 2024-12-20 09:37:34 -05:00
docker-compose.yaml feat: implement Claude 3, Claude3.5, Nova Pro, Nova Lite and Mistral model integration with AWS Bedrock (#974) 2025-01-06 17:49:16 +05:30
Dockerfile fix: ollama and lm studio url issue fix for docker and build (#1008) 2025-01-06 19:18:42 +05:30
eslint.config.mjs added last lint rule for this update 2024-12-02 06:21:32 -05:00
FAQ.md docs: updated Contributing 2024-12-20 09:37:34 -05:00
LICENSE docs: updating copyright in LICENSE (#796) 2025-01-06 03:10:26 +05:30
load-context.ts fix: remove monorepo 2024-09-25 19:54:09 +01:00
package.json use AsyncLocalStorageContextManager to propagate trace context around (#32) 2025-02-19 06:49:32 -08:00
pnpm-lock.yaml use AsyncLocalStorageContextManager to propagate trace context around (#32) 2025-02-19 06:49:32 -08:00
pre-start.cjs refactor: updated vite config to inject add version metadata into the app on build (#841) 2024-12-21 01:03:28 +05:30
PROJECT.md Clarify PRs in project organization 2025-01-07 19:53:04 +01:00
README.md Update README, show problems in reverse chronological order 2025-01-22 07:21:22 -08:00
tsconfig.json Hardcode url for together ai as fallback if not set in env 2024-12-04 20:31:42 +02:00
uno.config.ts Update backend APIs for doing simulation based prompting (#7) 2025-01-20 08:03:25 -08:00
vite.config.ts [PRO-971] enable sourcemaps (#19) 2025-02-12 13:08:18 -08:00
worker-configuration.d.ts feat: implement Claude 3, Claude3.5, Nova Pro, Nova Lite and Mistral model integration with AWS Bedrock (#974) 2025-01-06 17:49:16 +05:30
wrangler.toml revert 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