mirror of
https://github.com/cline/cline.git
synced 2026-10-31 02:42:02 +08:00
* Fix CLINE_ENVIRONMENT configuration not being passed to webview ## Problem The CLINE_ENVIRONMENT configuration set in launch.json was not being properly passed to the webview, causing the webview to break when trying to access environment-specific configurations. This resulted in: Webview using incorrect API URLs (always defaulting to production) Broken authentication flows in development/staging environments Inconsistent behavior between the main extension and webview components ## Root Cause The issue occurred because: Duplicate Configuration Logic: The webview had its own separate config.ts file that was trying to read process.env.CLINE_ENVIRONMENT directly Environment Variable Propagation: While Vite was configured to pass CLINE_ENVIRONMENT to the build process, the webview's runtime code couldn't access this environment variable properly Configuration Mismatch: The main extension and webview were using different configuration sources, leading to inconsistent environment settings * fix credit uri * replace apiBaseUrl with appBaseUrl * local option * fallback changed to app * change to app url * merge fixes --------- Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com>