Commit Graph

726 Commits

Author SHA1 Message Date
Brian Hackett
f3f1cc12c8 fix error parsing 2025-03-06 08:28:08 -08:00
Brian Hackett
72fa945dc2 Improve logging for oversize messages 2025-03-06 08:23:23 -08:00
Brian Hackett
35ab0cbab1 Add compression for overly long messages 2025-03-06 08:06:47 -08:00
Brian Hackett
427a9732ee dark mode styling for problems 2025-03-04 13:42:38 -08:00
Brian Hackett
b2a74a2857 dark mode about 2025-03-04 12:06:08 -08:00
Brian Hackett
f34cf9ed5e
Assorted telemetry related fixes (#46) 2025-03-04 08:55:05 -08:00
Brian Hackett
23fa6f2217
Assorted fixes around approve changes UI (#45) 2025-03-04 07:22:42 -08:00
Brian Hackett
1e7af9f5c8
Support feedback for individual prompts (#43) 2025-03-03 08:54:08 -08:00
Brian Hackett
2722c47fed Include chat ID in more console logs 2025-02-28 07:09:31 -08:00
Brian Hackett
ed5d7a81d9 Merge branch 'main' of github.com:replayio/bolt 2025-02-28 07:06:44 -08:00
Brian Hackett
790b3cb73b Remove noisy log message 2025-02-27 14:55:35 -08:00
Jason Laster
a362eb8a75 Sentry follow up fix 2025-02-27 17:31:31 -05:00
Jason Laster
18f1983097 Use remix vite:dev in development 2025-02-27 17:15:14 -05:00
Brian Hackett
1809aa89d7 Use 3.7 sonnet 2025-02-24 13:02:19 -08:00
Brian Hackett
4ee4f2060d
Recognize image content when talking to anthropic (#37) 2025-02-24 07:24:32 -08:00
Brian Hackett
7326682c94 Watch for empty cookie strings 2025-02-21 09:37:36 -08:00
Brian Hackett
a489a8d749 Remove login key requirement 2025-02-21 09:24:07 -08:00
Brian Hackett
65df615702 Merge branch 'main' of github.com:replayio/bolt 2025-02-21 09:17:27 -08:00
Brian Hackett
63dcd6702e Add login key system 2025-02-21 09:00:23 -08:00
Chris Toshok
e4a57bf59e
[PRO-974] add sentry for both client and server (#20)
Basically ran through the remix + cloudflare setup docs.
2025-02-20 14:13:19 -07:00
Brian Hackett
38d389a42e Wrap chat component in <Suspense> 2025-02-20 11:27:22 -08:00
Mateusz Burzyński
6acb94b5af
Wrap database in async suspense value (#36) 2025-02-20 11:05:57 -08:00
Brian Hackett
3c3a97aa50
Show information about anthropic calls when clicking usage (#34) 2025-02-19 16:19:42 -08:00
Chris Toshok
4795d02150
instrument whether an api key is the user's or ours (#33)
introduce an `AnthropicApiKey` type so we aren't passing a string/boolean everywhere.
2025-02-19 13:58:40 -08:00
Brian Hackett
fabf53b49c Merge branch 'main' of github.com:replayio/bolt 2025-02-19 08:58:02 -08:00
Brian Hackett
b616ac673b about page copy 2025-02-19 08:57:49 -08:00
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
Chris Toshok
c52ae1f9da
Fix otel errors (#31)
Running the prior code in wrangler (but _not_ `npm run dev`) was generating errors during otel initialization.  I was ultimately unable to figure out why, or how to fix them:

```
  (warn) Initializing OpenTelemetry
  (error) Error initializing OpenTelemetry TypeError: Class constructor OTLPExporterBase2 cannot be invoked without 'new'
```

In the end, it was easier to just boil the ocean a little:  With claude's help, write a custom otlp exporter and use that.  Also use BasicTracerProvider instead of WebTracerProvider.

This version is enough to generate spans from within local wrangler.
2025-02-18 16:18:03 -08:00
Brian Hackett
78a56faa55 Followup fixes 2025-02-18 15:16:33 -08:00
Brian Hackett
55dd3c97b6
Add feedback button (#29) 2025-02-18 15:15:52 -08:00
Brian Hackett
76059dc19c otel changes 2025-02-18 12:40:44 -08:00
Brian Hackett
c00ad7792c more logging 2025-02-18 12:16:01 -08:00
Brian Hackett
ab614ee90a Telemetry diagnostics 2025-02-18 12:12:12 -08:00
Chris Toshok
d81ab41688
warn that otel wasn't initialized properly, every time we would have sent a span (#30)
The log should contain a warning showing the following once at startup:
```
OpenTelemetry initialization skipped: HONEYCOMB_API_KEY and/or HONEYCOMB_DATASET not set
```
and every time a span would have been created:
```
OpenTelemetry not initialized, skipping span creation
```

Also sneak in a `service.version` attribute that is `${__APP_VERSION}; ${__COMMIT_HASH}`.  e.g.:
![image](https://github.com/user-attachments/assets/6f111cb1-8fb9-46c4-9bd8-24bdd08650ab)
2025-02-18 12:00:38 -08:00
Brian Hackett
6221ab1d3e
Fix issues around rewinding (#28) 2025-02-18 11:39:44 -08:00
Chris Toshok
af4c405620
[PRO-973] basic o11y around anthropic api calls (#22)
add some otel initialization, pointing at honeycomb + a function to wrap other functions with spans.  use that function to wrap `callAnthropic` and add some context (number of messages sent, token usage, along with some metadata should we ever support other providers.)

The honeycomb api key/dataset are to be passed via env vars `HONEYCOMB_API_KEY` and `HONEYCOMB_DATASET` respectively.
2025-02-18 10:06:20 -08:00
Brian Hackett
20bb97c0c5
Fix assorted problems (#27) 2025-02-14 14:27:20 -08:00
Brian Hackett
b2efa3b56d Fixes for partial update handling 2025-02-13 16:34:30 -08:00
Brian Hackett
9167d77ff2
Save scrolling interactions (#26) 2025-02-13 14:31:03 -08:00
Brian Hackett
2f2a239660
Avoid losing code when prompting AI (#24) 2025-02-13 09:36:22 -08:00
Brian Hackett
dd18d5360c
Support rewinding to earlier messages (#23) 2025-02-12 17:23:26 -08:00
Brian Hackett
43ab9b3656 Support saving solutions without an associated evaluator 2025-02-12 14:19:57 -08:00
Brian Hackett
4cf70843c0
Add UI for updating problems with admin key set (#18) 2025-02-12 08:59:42 -08:00
Brian Hackett
b2a98b4180 tweak logging 2025-02-11 17:15:00 -08:00
Brian Hackett
d80eff60a7 Handle older format for repository contents in problems 2025-02-11 13:42:12 -08:00
Brian Hackett
fc89c55517 Remove obsolete experimental command 2025-02-11 09:57:33 -08:00
Brian Hackett
ce94bf7fcf Include chat messages in solution instead of last user prompt 2025-02-11 06:07:57 -08:00
Brian Hackett
bb82c56958
Improve UI for viewing and changing problems (#15) 2025-02-10 20:18:54 -08:00
Brian Hackett
b7b602016e
Improve support for streaming simulation data to backend (#16) 2025-02-07 11:52:19 -08:00
Mateusz Burzyński
d143863285
Record pointer moves (#14) 2025-02-07 15:37:39 +01:00