continue-custom/core/llm
Patrick Erichsen 85994118e8
feat: implement Sentry error tracking with privacy-first anonymization (#6881)
* feat: add sentry to core

* feat: implement comprehensive Sentry error tracking with privacy-first anonymization

- Add Sentry ErrorBoundary components following React best practices
- Implement shared anonymization logic between core and GUI environments
- Create organized sentry directory structure with clean exports
- Add Continue team member access control (@continue.dev email check)
- Preserve node_modules package names for debugging while anonymizing user paths
- Include comprehensive test coverage for all anonymization scenarios
- Set up source maps for readable production error stack traces
- Add browser-compatible hashing without crypto module dependency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: complete Sentry integration with GUI components and tests

- Add GUI TelemetryProviders with Sentry ErrorBoundary
- Create shared isContinueTeamMember utilities for both core and GUI
- Update all imports and dependencies for new sentry structure
- Add comprehensive test coverage and fix all TypeScript issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* prettier

* fix: resolve GUI build errors by removing sentry index.ts and using specific imports

- Remove problematic index.ts that was pulling Node.js-specific Sentry code into browser bundle
- Update GUI to import specifically from anonymization.ts and constants.ts files
- Update core imports to use specific SentryLogger.ts import path
- GUI build now succeeds with proper source map upload to Sentry

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: move TelemetryProviders inside AuthProvider to fix test failures

- Move TelemetryProviders from main.tsx to Layout.tsx inside AuthProvider
- Fixes "useAuth must be used within an AuthProvider" error in tests
- TelemetryProviders now has access to auth context for Continue team member check
- GUI build and functionality remain working correctly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* prettier

* merge main

* Update package.json

* fix tests

* fix errors

* Update extension.ts

* disable sentry in tests/local dev

* add additional error handling

* Update SentryLogger.ts

* remove global try/catch

* remove test code

* linting

* Update SentryLogger.ts

* more logs

* Update core.ts

* lower sampling rate

* fix tests

* feat: use `Logger`

* Update logger.ts

* Update logger.ts

Co-Authored-By: Claude <noreply@anthropic.com>

* lint fixes

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: rename logger.ts to Logger.ts for case sensitivity

This fixes TypeScript compilation errors in CI where the file
was tracked as lowercase logger.ts but referenced as Logger.ts
in imports.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* address ting-wai's feedback

* Update core.ts

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-14 16:54:21 -07:00
..
llms use safe parsed schema 2025-08-12 00:47:34 +05:30
rules fix: use rules when alwaysApply is absent 2025-07-23 20:13:31 +05:30
templates npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p 2025-05-25 18:34:39 -07:00
utils Reapply "feat: enhance oneper utility and refactor build system for commit SHA versioning" (#6811) 2025-07-28 14:15:49 -07:00
asyncEncoder.test.ts error on no-floating-promises in core 2025-04-29 15:11:35 -07:00
asyncEncoder.ts chore: apply eslint to vscode and core 2024-11-11 07:38:52 -08:00
autodetect.ts refactor: rename model 1 to instinct 2025-08-11 17:44:11 -07:00
autodetect.vitest.ts refactor: rename model 1 to instinct 2025-08-11 17:44:11 -07:00
constants.ts refactor: rename model 1 to instinct 2025-08-11 17:44:11 -07:00
countTokens.test.ts test: verify chunkDocument filters out chunks exceeding maxChunkSize 2025-07-22 11:24:59 -07:00
countTokens.ts Add second check for prompt length before autocomplete (#6451) 2025-07-29 15:32:54 -07:00
defaultSystemMessages.ts Fix: remove redundant call word from the default agent system prompt 2025-08-07 13:37:04 +03:00
index.test.ts increase context length and add tests 2025-06-20 16:58:16 +05:30
index.ts feat: implement Sentry error tracking with privacy-first anonymization (#6881) 2025-08-14 16:54:21 -07:00
llamaTokenizer.d.ts npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p 2025-05-25 18:34:39 -07:00
llamaTokenizer.js npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p 2025-05-25 18:34:39 -07:00
llamaTokenizer.mjs prettier update 2025-06-11 18:01:41 -07:00
llamaTokenizerWorkerPool.mjs prettier update 2025-06-11 18:01:41 -07:00
llm-pre-fetch.vitest.ts add modelProvider to PromptLog 2025-08-13 22:06:01 -07:00
llm.test.ts remove o1-preview (deprecated) from tests 2025-07-28 17:25:40 -07:00
logFormatter.test.ts improv: cost breakdown in continue console 2025-07-07 18:02:45 -07:00
logFormatter.ts LLMLogFormatter: rich logging to an output stream 2025-04-07 14:11:38 -04:00
logger.ts Add rich logging of LLM interactions 2025-04-07 14:11:38 -04:00
messages.ts nuke flattenMessages 2025-07-09 16:46:24 -07:00
openaiTypeConverters.ts JSON parsing progress 2025-06-04 15:16:41 -07:00
streamChat.ts Merge pull request #7116 from continuedev/pe/devdata-fixed 2025-08-14 13:23:09 -07:00
tiktokenWorkerPool.mjs prettier update 2025-06-11 18:01:41 -07:00
toolSupport.test.ts feat: add gemma tool calling 2025-07-25 10:40:32 -05:00
toolSupport.ts Update toolSupport.ts 2025-08-07 22:52:01 -04:00