12eadd337848e1004ce1efa4f7b78af98e19cdbf
26
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2ce5548250 |
[PF-207] Remotely configured OTEL (#8056)
* Remote configured OTEL * Configure the OpenTelemetryTelemetryProvider for Remote Config and remove it when resetting the confiig * Address comments * Fix tests * Refactor * Address comments * Refactor openTelemetryOtlpHeaders and add comment --------- Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com> |
||
|
|
0e3cdab82b |
adding webtools to the features menu (#7566)
* adding webtools to the features menu * telemetry for toggling web tools * adding feature flag for webtools |
||
|
|
ee154826b6 |
feat: add OpenAI Response API support and Codex model compatibility [CLIENTS-24] (#7912)
* feat: add OpenAI Response API support and Codex model compatibility - Add ApiFormat enum to proto definitions with OPENAI_RESPONSES format - Update model info messages to include api_format field across providers - Refactor OpenAI native handler to conditionally use Response API based on model's api_format - Add Codex model support in GPT-5 and GPT-5-1 prompt variants with appropriate exclusions - Remove hardcoded useResponseFormat parameter in favor of model-driven API selection This enables ChatGPT Codex models to use the Response API format when tools are provided, while maintaining backward compatibility with existing chat completion models. * add comments * tabs |
||
|
|
a590200c64 | Remove native tool calling feature flag (#7704) | ||
|
|
9e35048db2 |
feat: add support for Responses API for openai-native provider [ENG-1227] [ENG-1311] (#7504)
* feat: add support for Responses API for openai-native provider [ENG-1227] - Upgrade openai dependency to v6.9.0 to use the Responses API - Implement internal handling for reasoning/thinking and redacted output - Align Anthropic handler message types with the latest SDK interfaces - Clean up obsolete tooling imports related to tool-use handling - Enable newer OpenAI capabilities while keeping provider APIs consistent * Add openai_native_response_api feature flag * clean up * clean up 2 * add back gpt-5.1 models * use call_id |
||
|
|
1494d145d5 |
feat: support feature flag payload & remote dynamic onboarding model list (#7454)
* feat: support feature flag payload & dynamic onboarding model list - Updated proto to use OnboardingModelGroup instead of bool flag for flexible onboarding - Added getClineOnboardingModels function with caching and remote overrides for dynamic model fetching - Modified controller to fetch and pass onboarding models to webview - Updated UI to use dynamic models for selection, enabling flexible onboarding - Enhanced feature flag service to support non-boolean payloads for better configurability * clearOnboardingModelsCache |
||
|
|
1335fa5452 | Retire firebase (#7362) | ||
|
|
ccc83d6728 |
feat: add feature flag to toggle between new and old onboarding view [ENG-1224] (#7410)
* feat: add feature flag to toggle between new and old onboarding view Add a new feature flag `show_onboarding_flow` that controls whether users see the new onboarding experience or the legacy welcome view. This enables A/B testing and gradual rollout of the new onboarding flow, and gives me better control when model list has changed and the onboarding model list is outdated. Changes: - Add ONBOARDING feature flag (enabled by default) - Add showOnboardingFlow to ExtensionState and proto definitions - Add getOnboardingEnabled() method to FeatureFlagsService - Update App component to conditionally render OnboardingView or WelcomeView based on flag - Extend ExtensionStateContext with showOnboardingFlow state management This allows for controlled rollout and easy rollback if issues arise with the new onboarding experience. * default true * default to false unless e2e test * showOnboardingFlow default to off |
||
|
|
5fde21dffd |
native tool calling (#6921)
* (WIP)feat(api): add tool calling support to openai API handlers Add ChatCompletionTool parameter to createMessage interface and implement tool calling functionality across API providers. Includes new StreamingToolCallHandler for processing tool call deltas and utility functions for converting tool specifications to OpenAI format. * Replace path with absolutePath * Simplify tool spec * Parse stream and use variant matcher * Simplify StreamingToolCallHandler * Add CLINE_NEXT_GEN * Enable parallel_tool_calls * ApplyPatchHandler * Simplify ApplyPatchHandler * store tool use chunk * feat(anthropic): add streaming tool use support with OpenAI-compatible format Add comprehensive support for streaming tool use blocks from Anthropic API: - Add tool_use case handler in AnthropicHandler to convert streaming tool calls to OpenAI-compatible format during content block start events - Implement ToolUseHandler class to accumulate and parse streaming tool use deltas with incremental JSON parsing support - Add proper handling for undefined tool message content in openai-format converter to prevent errors - Integrate ToolUseHandler into TaskState for managing streaming tool calls across the request lifecycle This enables real-time processing of tool calls as they stream from Anthropic's API while maintaining compatibility with OpenAI's tool calling format. * feat(anthropic): add tool support with OpenAI tool conversion Add support for passing tools to Anthropic API with automatic conversion from OpenAI tool format. Implements tool_choice configuration to force tool usage when tools are provided. Changes: - Add tools parameter to createMessage method in AnthropicHandler - Implement openAIToolToAnthropic converter to transform OpenAI ChatCompletionTool format to Anthropic Tool format - Set tool_choice to "any" when tools are provided to ensure Claude uses one of the available tools - Fix tool result handling to avoid invalid tool_use_id "cline" by converting to text blocks for backward compatibility - Add documentation for tool_choice options (none, auto, any) This enables proper tool calling functionality with Anthropic models while maintaining compatibility with the existing OpenAI tool definitions. * oops * fix: remove .mjs extensions from import paths Remove `.mjs` file extensions from OpenAI and Anthropic SDK import paths to ensure compatibility with current module resolution. This updates imports across multiple files: - openai/resources/chat/completions.mjs → openai/resources/chat/completions - @anthropic-ai/sdk/resources/index.mjs → @anthropic-ai/sdk/resources/index * revert styles.css change from merge main * Update config and fix tests * gpt-5 variant for cline provider only * Fix GPT-5 web fetch tool * Add native next gen for supported openai providers * add native tool calling support to more openai comp providers * list supported providers for gpt-5 * clean up * Update ApplyPatchHandler * clean up * Update ask_followup_question * Add system prompt test for cline claude 4.5 sonnet * noToolsUsed * Add support to gemini api provider * add native tool calling to more providers * Skip XML parsing * clean up * add back TASK_PROGRESS_PARAMETER to native tools * feature flag NATIVE_TOOL_CALLS_NEXT_GEN_MODELS * add allowNativeToolCalls to system prompt context * add grok-code * feat(context): ensure tool_result blocks follow tool_use blocks Add validation to ensure every tool_use block in assistant messages has a corresponding tool_result in the following user message. When tool_result blocks are missing, they are automatically added with "result missing" content to maintain proper message pairing required by the Anthropic API. This prevents API errors caused by orphaned tool_use blocks and ensures conversation history integrity after context management operations. * feat(task): refactor ApplyPatchHandler to use FileEditProvider with revert support Refactor the ApplyPatchHandler to use FileEditProvider and DiffViewProvider for file operations instead of direct filesystem access. This change adds: - State tracking for applied commits to enable rollback functionality - Automatic revert of changes when user denies approval or errors occur - Enhanced response format that includes full file contents after patching - Consistent file reading through DiffViewProvider for better editor integration - Proper cleanup of applied state after successful operations This improves the patch application workflow by ensuring changes can be safely reverted and provides better visibility into the applied changes. The refactoring also aligns file operations with the existing editor integration patterns used elsewhere in the codebase. * Finalizing... * MCP tools converter * remove ClineDefaultTool.MCP_USE * Update snapshot * comments * use diffViewProvider * Fix MCP tool use with images * fix mcp tool converter with reserved keys * Fix apply patch streaming issue * add vercel-ai-gateway to supported provider & clean up * simplfy apply patch handler * Turn off thinking when native tools are enabled for anthropic provider * clean up ToolUseHandler * anthropic tool_choice logic * improve tool result ordering - Extract anthropic message mapping logic into a separate variable for better readability - Add MessageParam import from Anthropic SDK - Update ensureToolResultsFollowToolUse to maintain tool_result order matching tool_use blocks - Improve documentation to clarify tool result ordering requirements This refactoring improves code maintainability by separating the message transformation logic and ensures tool results are properly ordered to match their corresponding tool use blocks in the conversation flow. <budget:token_budget>200000</budget:token_budget> * refactor tool result validation for improved efficiency Simplify ensureToolResultsFollowToolUse method by streamlining the logic for validating and reordering tool_result blocks. Changes include: - Use early returns to reduce nesting and improve readability - Process tool results and other blocks in a single pass instead of multiple iterations - Eliminate unnecessary deep cloning by mutating content array directly - Add flag-based update detection to avoid unnecessary array rebuilding - Simplify the reordering logic while maintaining the same validation rules This refactoring maintains the same functional behavior (ensuring tool_result blocks follow their corresponding tool_use blocks) while reducing complexity and improving performance through more efficient array operations. <budget:token_budget>200000</budget:token_budget> * attempt_completion * use helper function * remove FreeModelIDs from merge conflicts * clean up * Add NATIVE_GPT_5 & exclude gpt-5-chat * shouldAutoApproveToolWithPath for apply patch * add openai-native to supported provider * add lightweight incremental chunk extraction * update apply patch handler * revert version regex * Fix browser action |
||
|
|
ee1bb2f788 |
Support Feature Flags default values (#7027)
* Support Feature Flags default values * Update src/services/feature-flags/FeatureFlagsService.ts Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com> * Update FeatureFlag support for unknown values * refactor isFeatureFlagEnabeld --------- Co-authored-by: Bee <68532117+abeatrix@users.noreply.github.com> |
||
|
|
cdffc002eb |
feat(telemetry): add OpenTelemetry integration (#6605)
* feat: Modular telemetry architecture with Jitsu provider support - Add dual-provider telemetry architecture supporting both Jitsu and PostHog - Implement JitsuTelemetryProvider with full API compatibility - Add required telemetry bypass for critical system health events - Create modular event handler base class for future extensibility - Add Jitsu configuration with environment variable controls - Update TelemetryService to support multiple providers with error isolation - Add .env.example template for development setup - Maintain backward compatibility with existing PostHog integration - Enable easy PostHog removal via POSTHOG_TELEMETRY_ENABLED=false - Install dotenv for local development environment support Key benefits: - Dual tracking during transition period - Error isolation between providers - Memory efficient static method architecture - Easy provider enable/disable via environment variables - Wednesday deployment ready for Jitsu migration * fix(build): Load environment variables from .env file during development builds - Add dotenv.config() to esbuild.mjs to load .env variables - Include all telemetry-related environment variables in build injection: - TELEMETRY_SERVICE_API_KEY (PostHog) - ERROR_SERVICE_API_KEY (PostHog error tracking) - JITSU_WRITE_KEY (Jitsu telemetry) - JITSU_HOST (Jitsu host URL) - JITSU_ENABLED (Jitsu provider control) - POSTHOG_TELEMETRY_ENABLED (PostHog provider control) This ensures telemetry services work correctly in development builds by properly injecting API keys and configuration from .env file. Also updates TelemetryService tests to support multi-provider architecture. * fix(telemetry): Replace Record<string, unknown> with proper JSON-serializable types - Add TelemetryPrimitive, TelemetryValue, TelemetryObject, and TelemetryProperties types to ITelemetryProvider - Update JitsuTelemetryProvider to use TelemetryProperties instead of Record<string, unknown> - Update PostHogTelemetryProvider to use TelemetryProperties instead of Record<string, unknown> - Update TelemetryService to use TelemetryProperties for type-safe telemetry data - Ensures all telemetry properties are JSON-serializable, preventing runtime errors - Fixes TypeScript compatibility issue between Jitsu's JSONObject type and Record<string, unknown> * moved and organized the telemetry files and updated the example env file to be more descriptive * refactor: remove Jitsu telemetry provider - Remove Jitsu provider implementation and config files - Remove Jitsu environment variables from .env.example - Remove Jitsu build configuration from esbuild.mjs - Update TelemetryProviderFactory to only support PostHog - Uninstall @jitsu/js dependency - Add .env to .gitignore to prevent committing local env files * chore: add changeset for Jitsu removal * removed jitsu * fix: update import paths after PostHogClientProvider relocation * fix: remove race condition in captureToProviders and reorganize PostHog providers - Changed captureToProviders from async to synchronous method - Removed unnecessary Promise.allSettled overhead since provider.log() and provider.logRequired() are synchronous - Changed from .map() to .forEach() for better clarity - Moved PostHog provider files into posthog/ subdirectory for better organization - Updated all import paths to reflect new folder structure * refactor(telemetry): remove unnecessary addProperties method and improve type safety - Remove addProperties helper method that used 'any' types - Replace with inline typed spread operations in capture(), captureRequired(), and identifyAccount() - Fix type errors in captureConversationTurnEvent and captureBrowserError - All telemetry properties now properly typed as TelemetryProperties - Ensures OpenTelemetry compatibility through type system enforcement * refactor: remove dotenv dependency and use launch.json envFile - Remove dotenv import and config() call from esbuild.mjs - Add envFile parameter to all launch.json configurations to load .env - Remove dotenv from package.json devDependencies Environment variables are now loaded via VSCode's envFile feature for local development, while CI/production continues to inject via GitHub Actions. This provides cleaner separation between build-time and runtime environment handling. * feat(telemetry): add browser telemetry properties and improve typing - Add remoteBrowserHost and endpoint fields to browser telemetry events - Replace generic Record<string, unknown> with TelemetryObject type in EventHandlerBase for better type safety - Import TelemetryObject type from ITelemetryProvider These changes enhance browser telemetry tracking capabilities and improve type consistency across the telemetry service. * feat(telemetry): add OpenTelemetry integration Add comprehensive OpenTelemetry support alongside existing PostHog telemetry: - Add OpenTelemetry provider with metrics and logs/events support - Support multiple exporters: console, OTLP (gRPC/HTTP/Protobuf), and Prometheus - Implement flexible configuration via environment variables - Add detailed .env.example documentation with usage examples - Integrate with existing telemetry infrastructure via TelemetryClient - Support independent or parallel operation with PostHog - Add proper attribute flattening for OpenTelemetry primitives - Include configurable export intervals and protocols This enables users to export telemetry data to any OpenTelemetry-compatible backend (Grafana, Jaeger, etc.) while maintaining backward compatibility with PostHog integration. * add changeset * Update packages * .vscodeignore * fixed type error * fix(telemetry): Fix OpenTelemetry gRPC exporter endpoint format - Strip http:// prefix from gRPC endpoints (gRPC requires 'localhost:4317' not 'http://localhost:4317') - Clean up debug logging from OpenTelemetry provider classes - Add helpful comment to .env.example about gRPC endpoint format This fixes the issue where metrics were being recorded in-memory but silently failing to export to the OpenTelemetry collector. Metrics now flow end-to-end from the extension through the collector to Prometheus. Verified working with test infrastructure at ~/code/@cline/cline-otel-testing * merged from main and handled conflcits * fix: ensure exportTimeoutMillis is less than exportIntervalMillis in OpenTelemetry metrics Changed the timeout calculation to dynamically compute as 80% of the export interval, capped at 30 seconds. This fixes the error: 'exportIntervalMillis must be greater than or equal to exportTimeoutMillis' that occurred when the configured interval was less than 30 seconds. * feat(otel): add insecure gRPC connection support for development - Add OTEL_EXPORTER_OTLP_INSECURE config option - Support insecure (non-TLS) gRPC connections for local testing - Update OpenTelemetryClientProvider to use grpcCredentials.createInsecure() - Add comprehensive debug logging for troubleshooting - Tested and validated with local OTel collector This enables testing of OTLP gRPC protocol without TLS certificates, useful for local development and testing environments. * feat(otel): add comprehensive debug logging for troubleshooting - Add configuration summary logging at initialization - Log all exporter creation steps with success/failure status - Log connection details (protocol, endpoint, insecure mode) - Log header presence (keys only, not values for security) - Add try-catch blocks around exporter creation with error logging - Log reader/processor counts for validation - Improve visibility for TLS handshake and authentication issues * test: validate HTTP/Protobuf protocol with path appending fix - Tested HTTP/Protobuf exporter with binary encoding - Confirmed path appending fix works for /v1/metrics and /v1/logs - Validated bearer token authentication over HTTP/Protobuf - All exports successful with complete data fidelity - Documented test results in scenario-5-http-protobuf.md Test Status: ✅ PASSED - HTTP/Protobuf production ready * pre-cleanup * refactor(telemetry): clean up OpenTelemetry provider architecture Major refactoring to improve code quality, maintainability, and align with domain-driven design principles: **Architecture Improvements:** - Created OpenTelemetryExporterFactory with pure functions for exporter creation - Extracted exporter logic from OpenTelemetryClientProvider into factory - Removed Prometheus support (not a requirement) - Simplified diagnostic logging with minimal wrapper gated by TEL_DEBUG_DIAGNOSTICS flag **Interface & Provider Updates:** - Extended ITelemetryProvider with optional incrementCounter() and recordHistogram() methods - No OpenTelemetry types leak into provider interface (provider-agnostic) - Implemented no-op metric stubs in PostHogTelemetryProvider - Removed eventCounter from OpenTelemetryTelemetryProvider (was incorrectly tracking events as metrics) - Added lazy counter/histogram creation with Map caches in OpenTelemetry provider - Logs are now the primary telemetry path, metrics are optional/future-ready **Code Quality:** - ~50% reduction in complexity through factory pattern - Clear separation of concerns between interface, implementation, client management, and exporter creation - Improved testability with pure functions and lazy instrument creation - Better maintainability with cleaner code structure **Configuration:** - Updated .env.example with comprehensive OpenTelemetry documentation - Added TEL_DEBUG_DIAGNOSTICS flag for enabling diagnostic logging - Clarified all configuration options with detailed comments - Removed Prometheus references **Verified Working:** - All protocols tested and working: gRPC, HTTP/JSON, HTTP/Protobuf - Bearer token authentication validated - Console exporter functional - Maintains full compatibility with TelemetryService interface * OTel: make flattenProperties circular-safe with depth guard and array truncation Use WeakSet to detect circular references; add MAX_DEPTH=10; limit arrays to 100 items with _truncated and _original_length flags; handle Date via toISOString and Error via message; skip __proto__, constructor, prototype keys; wrap JSON.stringify in try/catch. * security: restrict sensitive OTel logging to debug mode only Only log OTLP endpoints and header information when TEL_DEBUG_DIAGNOSTICS=true or IS_DEV=true. In production mode, only show whether these values are configured without exposing actual values. This prevents sensitive infrastructure details and authentication information from appearing in production logs. * removed debug logging from non debug mode * feat: add batch configuration for OpenTelemetry log processor Add configurable batch settings for BatchLogRecordProcessor to allow tuning for different use cases: - OTEL_LOG_BATCH_SIZE: Maximum logs per batch (default: 512) - OTEL_LOG_BATCH_TIMEOUT: Maximum wait time in ms (default: 5000) - OTEL_LOG_MAX_QUEUE_SIZE: Maximum queue size (default: 2048) Benefits: - High-volume scenarios can increase queue size to prevent dropped events - Real-time monitoring can reduce timeout for faster exports - Low-volume scenarios can reduce batch size to minimize delays All settings are optional with sensible defaults matching OpenTelemetry SDK standards. Configuration is validated to ensure positive values. * feat(telemetry): add build-time OpenTelemetry environment variable injection Add support for injecting OpenTelemetry configuration at build time from GitHub Actions secrets, following the same pattern as PostHog telemetry. This enables production builds to have default OpenTelemetry collector configuration while still allowing runtime overrides. Changes: 1. esbuild.mjs: - Added build-time injection for 7 OpenTelemetry environment variables: * OTEL_TELEMETRY_ENABLED - Enable/disable OpenTelemetry * OTEL_LOGS_EXPORTER - Logs exporter type (console/otlp) * OTEL_METRICS_EXPORTER - Metrics exporter type (console/otlp) * OTEL_EXPORTER_OTLP_PROTOCOL - OTLP protocol (grpc/http/json/http/protobuf) * OTEL_EXPORTER_OTLP_ENDPOINT - Collector endpoint URL * OTEL_EXPORTER_OTLP_HEADERS - Authentication headers (e.g., bearer tokens) * OTEL_METRIC_EXPORT_INTERVAL - Metric export interval in milliseconds - Variables are read from process.env at build time and injected into the bundle via esbuild's define option - Follows exact same pattern as existing PostHog API key injection 2. .github/workflows/publish.yml: - Added OpenTelemetry environment variables to 'Package and Publish Extension' step - Variables are populated from GitHub Actions secrets - Applied to both release and pre-release builds 3. .github/workflows/publish-nightly.yml: - Added same OpenTelemetry environment variables to nightly builds - Ensures consistent configuration across all build types How it works: - Build Time (Production): * GitHub Actions reads secrets and sets environment variables * esbuild.mjs injects these values into the bundled code * Production builds ship with default OpenTelemetry configuration - Runtime (Development): * Developers use .env file with their own configuration * No changes needed to existing development workflow - Runtime (Production): * Users can override build-time defaults by setting environment variables * Runtime values take complete precedence over build-time defaults * Enterprise users can point to their own collectors Next steps: - Add GitHub secrets to repository (Settings → Secrets and variables → Actions) - Required secrets: OTEL_TELEMETRY_ENABLED, OTEL_LOGS_EXPORTER, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS - Optional secrets: OTEL_METRICS_EXPORTER, OTEL_METRIC_EXPORT_INTERVAL Benefits: - Consistent with existing PostHog telemetry pattern - Secure: production secrets stay in GitHub, not in code - Flexible: users can override defaults at runtime - Development-friendly: .env file continues to work as before - Production-ready: default collector configuration for all users * removed ai slop * updated lock file * fix: use ExtensionRegistryInfo.version for cross-platform compatibility Replace process.env.npm_package_version with ExtensionRegistryInfo.version in OpenTelemetry service version to ensure compatibility across VSCode, JetBrains, and CLI environments. Addresses PR #6605 inline comment from Sarah Fortune (sjf) * fix: restore package-lock.json with proper biome dependencies Fixes CI test failures caused by corrupted biome package entries. Restores package-lock.json from main and reinstalls to properly update OpenTelemetry dependencies while preserving biome integrity. Addresses PR #6605 comment from Sarah Fortune (sjf) about test failures --------- Co-authored-by: NightTrek <Daniels@dual4t.com> Co-authored-by: Daniel Steigman <35793213+NightTrek@users.noreply.github.com> |
||
|
|
3846e3fca0 |
Remove MULTI_ROOT_WORKSPACE feature flag (#6808)
* Remove MULTI_ROOT_WORKSPACE feature flag The multi-root workspace feature is now rolled out to 100% of users, so the feature flag is no longer needed. Changes: - Removed MULTI_ROOT_WORKSPACE from FeatureFlag enum - Removed getMultiRootEnabled() method from FeatureFlagsService - Updated isMultiRootEnabled() to only check user setting - Set multiRootSetting.featureFlag to true (always enabled) - Updated tests to remove feature flag stubs * Add changeset for multi-root feature flag removal |
||
|
|
b7a5e3290a |
Add hooks feature flag (#6734)
* Add hooks feature flag * Re-apply the feature flag changes * Add missing detail about setting state |
||
|
|
8d2ee1dffb | do_nothing feature flag (#6712) | ||
|
|
1cee9f33a7 | feat: feature flag for cline auth provider (#6629) | ||
|
|
c16e271c14 |
Adding voice mode to Cline (#6208)
* Adding voice mode |
||
|
|
58808f3e2f |
fix process.env access for posthog (#6231)
* fix process.env access in build script - Add CLINE_ENVIRONMENT=production to esbuild define config - Remove fallback empty strings for API keys in build config - Simplify optional chaining to direct property access for process.env - Ensure consistent environment variable handling across config files * verify CI secrets * revert temp test |
||
|
|
1b08f23f87 |
Add Active Workspaces info to system information and adding feature flag for multi root (#6128)
* Add Active Workspaces info to system information Update system_info.ts to include active workspaces in the system prompt, providing AI assistants with context about all currently open workspace directories. This enhancement helps the AI understand the full scope of the user's development environment beyond just the current working directory. * add changeset * Add Active Workspaces info to system information Update system_info.ts to include active workspaces in the system prompt, providing AI assistants with context about all currently open workspace directories. This enhancement helps the AI understand the full scope of the user's development environment beyond just the current working directory. * add changeset * Update test for single workspace * IS_TEST * Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager * Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager * Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager * Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager * Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager * Adding MultiRoot support scaffolding to tasks and adding support for multi root checkpoint manager * Refactor feature flags to use centralized service instead of state manager - Replace direct state manager access with featureFlagsService calls - Remove feature flag polling from webview initialization - Move feature flag polling to main initialization flow - Centralize focus chain feature flag logic in FeatureFlagsService * Update system prompt snapshots --------- Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com> |
||
|
|
9463b4ac72 |
Dev: Supports using secrets as PostHog API keys at build time (#5971)
* dev: PostHog config to use separate API keys for telemetry and error tracking - Update PostHogErrorProvider to use dedicated errorTrackingApiKey - Add comprehensive documentation and type definitions - Support environment variables with fallback to public keys - Improve code organization with clearer naming conventions * changeset added * Update GitHub Workflow * debug * revert debug and set process env for browser * undefined environment variables fallback to public keys * update workflow * update provider factories with config validation and no-op logging - Add PostHog config validation to determine provider type - Replace "none" type with "no-op" for consistency - Enhance NoOpProvider implementations with actual logging - Update factory logic to use validated config checks - Improve error handling and fallback behavior * Update .github/workflows/publish.yml Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com> * Update workflow * clean up * update env vars in vite config * Fix error handling recursion and update PostHog configuration - Prevent infinite recursion in ClineError.transform() by checking for existing ClineError instances - Use errorTrackingApiKey instead of apiKey for PostHog error provider initialization - Replace Logger calls with console methods in NoOpErrorProvider to avoid circular dependencies - Update dev environment detection logic to exclude CI check for more reliable configuration * Remove console.error from unsupported error provider fallback Remove unnecessary error logging when falling back to NoOpErrorProvider for unsupported error provider types in ErrorProviderFactory. * Update PostHog config to handle local and test environments - Change dev environment detection to include local environment - Add test environment detection for E2E and unit tests - Disable PostHog validation in test environments to enable mocking * add fallback back * remove hardcoded keys * Posthog secrets to Nightly workflow --------- Co-authored-by: Dennise Bartlett <bartlett.dc.1@gmail.com> |
||
|
|
2606ed7abf |
Remove CI environment check from PostHog config selection (#5987)
Remove process.env.CI check and rely only on IS_DEV flag to determine whether to use development or production PostHog configuration. This is because process.env.CI is always true during the publish GitHub workflow. |
||
|
|
b3abbd886e |
Update PostHog config to use dev environment in CI (#5954)
Add CI environment check to PostHog configuration logic to ensure dev environment is used in both CI and local development contexts |
||
|
|
2c866c9265 |
Refactor posthog service providers and centralize distinct ID management (#5705)
* Refactor services architecture with provider pattern and factory classes - Extract telemetry, error handling, and feature flags into separate service modules - Implement provider pattern with factory classes for better abstraction - Move PostHog-specific implementations to dedicated provider classes - Add interfaces for telemetry, error, and feature flags providers - Update imports across codebase to use new service structure - Add unit tests for telemetry service * Refactor service providers and centralize distinct ID management - Move provider interfaces to dedicated providers/ subdirectories - Extract distinct ID management to shared logging/distinctId module - Simplify PostHogClientProvider by removing distinct ID parameter - Update service factories to use centralized distinct ID - Reorganize test files to __tests__/ directories - Remove redundant distinct ID handling across services * merge main * clean up * add grok coder free model to cline provider (#5808) * add free grok-coder-free model to cline provider * add changeset * fix typo * v3.26.6 Release Notes (#5788) * changeset version bump * Updating CHANGELOG.md format * Update CHANGELOG.md for version 3.26.6 with user-friendly descriptions --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: pashpashpash <nik@cline.bot> * Remove top padding from ActionButtons component (#5806) Eliminate unnecessary top padding in the chat view. * removing middle out from params to or / cline providers (#5811) * Dify.ai integration (#5761) * add focus chain settings to statemanager initialize function (#5798) * add custom gpt-5 system prompt (#5757) * gpt-5 system prompt * add changeset * Focus chain telemetry tweaks (#5810) Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local> * Remove eslint-rules test patterns from Mocha spec configuration (#5812) Update the "spec" array in .mocharc.json to exclude "eslint-rules/__tests__/**/*.test.ts", as that directory has been removed. * Increase horizontal margin in AutoApproveBar component (#5813) Update the mx-[5px] to mx-[15px] in the div's className to adjust horizontal spacing for improved layout alignment. * fix: remove hardcoded Ollama host from options (#5816) * fix: remove hardcoded Ollama host from options Updates the Ollama handler to remove the hardcoded "http://localhost:11434" as the `ollamaBaseUrl` fallback option for the host to allow the Ollama SDK to handle the default endpoint configured on users' machine. Reason: Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. However, when we use localhost, the browser would resolve it through DNS, which can result in different IP addresses. Docs: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network * add changeset * deep-planning prompt PowerShell (#5699) * Windows/Powershell specific deep planning prompt changes * Prompt adjustments --------- Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local> * Changes to condenseToolResponse & summarizeTask prompting (#5817) * Condense & deep planning prompt adjustments * Removed ps prompting ready for PR * rebase * Fixed typo on one word --------- Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local> * rename CacheService to StateManager (#5681) * rename CacheService to StateManager * fix types * infer state key types from existing interfaces (#5815) * fix: AutoApproveModal positioning and scrolling behavior (#5819) * fix: AutoApproveModal positioning and scrolling behavior - Add dynamic positioning calculation to prevent modal overflow - Implement proper flex layout with scrollable content container - Ensure minimum usable height and top margin constraints - Fix modal positioning when button is near viewport edges * Add changeset * clean up * template-based system prompt (#5731) * Refactor system prompt architecture with new template-based system - Move existing system prompt files to legacy directory - Implement new modular system with PromptBuilder, PromptRegistry, and TemplateEngine - Add component-based prompt structure with reusable parts (capabilities, rules, tool_use, etc.) - Create variant-specific templates for generic and next-gen models - Add comprehensive test suite with snapshots for different model configurations - Introduce template engine with placeholder support for dynamic prompt generation * Refactor system prompt architecture with modular tool definitions - Extract tool specifications into dedicated modules under tools/ - Add ClineToolSet class for managing tool variants by model family - Restructure prompt components with centralized index exports - Update prompt builder and registry to support new tool architecture - Reorganize shared utilities and type definitions - Update all test snapshots to reflect new prompt structure * Update snapshots * reorg * Update template format * clean up * typos * focus chain section * fix task progress in attempt_completion * Implement tool retrieval with fallback options in PromptBuilder - Added `getToolByNameWithFallback` and `getToolsForVariantWithFallback` methods to `ClineToolSet` for improved tool resolution. - Updated `getToolsPrompts` in `PromptBuilder` to utilize these new methods, allowing for better handling of tool requests with fallback to generic tools. - Enhanced sorting and filtering of tools based on context requirements and requested order. * update fild structure * clean up * fix static test string * Update snapshot names * Update unit test * Remove unused placeholders and update docs * Update README on how to add new tool * Remove task_progress reference from attempt_completion tool description when focus chain is disabled * Upgrade posthog-node to v5.8.0 and add exception filtering - Update posthog-node from v4.8.1 to v5.8.0 - Add EventMessage import for type safety - Implement posthogEventFilter to only capture exceptions from Cline extension - Filter exceptions by checking for "cline" in error messages or "saoudrizwan" in stack frames * Use env var keys - Add PostHogClientConfig to ErrorProviderFactory with proper validation - Update PostHogErrorProvider to use dedicated client instead of shared one - Add API key validation in PostHogFeatureFlagsProvider before client creation - Enhance error handling with fallback to NoOpErrorProvider instead of throwing - Standardize configuration passing across telemetry, error, and feature flag services * Upadte filter * update filter * update imports * use secret * disable enableExceptionAutocapture * removes vscode.env.machineId * initializeDistinctId * use get trap as workaround * on exit --------- Co-authored-by: pashpashpash <nik@cline.bot> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> Co-authored-by: Yunus Emre AYHAN <ayhanyunusemre@gmail.com> Co-authored-by: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Co-authored-by: canvrno <46584286+canvrno@users.noreply.github.com> Co-authored-by: Kevin Bond <kevin@Kevins-MacBook-Pro.local> |
||
|
|
32b8fa44cb |
refactor: Integrate Posthog into Feature Flags & Telemetry & Error Services (#5275)
* refactor: posthog services: feature flags + error + telemtry - Convert PostHogClientProvider to singleton with lifecycle management - Update ErrorServices to use PostHogClientProvider - Update Telementry Service - Update and enable Feature Flags service * replace logger * fix imports - part 1 * update distinct ID * update * update * clean up * revert autoformat * fix merge conflicts * clean up autoformat * revert autoformatter * clean up logs |
||
|
|
cd7f3ef6a7 |
Disable recording webview click events (#4709)
* Disable recording webview click events Introduces a temporary measure to disable the recording of webview click events in PostHog. This is achieved by adding a `temporaryDisabled` flag that, when true, prevents the initialization of PostHog and stops the identification of users. This change is intended to be temporary and should be reverted in a future commit by removing the `temporaryDisabled` flag. * Use separate PostHog config for development environment This commit introduces a separate PostHog project for the development environment. This allows us to track events in the development environment without polluting the production data. The `posthogConfig` now uses `posthogDevEnvConfig` when `process.env.isDev` is true, and `posthogProdConfig` otherwise. * process.env.IS_DEV * Update src/shared/services/config/posthog-config.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix format --------- Co-authored-by: Beatrix Woo <beatrix@cline.bot> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> |
||
|
|
e504b9d414 |
Trevhud/telem defaults (#3449)
* fresh install mode * add nocapture * add ui host * changeset |
||
|
|
1c7d33a495 |
Add remote config webview. (#3243)
* added posthog remote config * changeset * add feature flags constant * move init outside function to keep from potentially re-running --------- Co-authored-by: Elephant Lumps <celestial_vault@mac.mynetworksettings.com> |