-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Easy local backend env var #3116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
faf3d24 to
70d8b45
Compare
70d8b45 to
e9abdd1
Compare
e9abdd1 to
88e66d1
Compare
pandemicsyn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. My only question (more for my knowledge), our telemetry client doesn't support this or the o.g. method. Guessing thats because we don't want to accidentally send events while cruising around during development:
| const response = await fetch("https://api.kilocode.ai/api/profile", { |
Is there a scenario where you'd specify a development KILOCODE_POSTHOG_API_KEY and then still want to use a local backend?
Add KILOCODE_BACKEND_BASE_URL environment variable to enable testing against a local Kilo Code backend. Refactor hardcoded API URLs across providers, webview, and CLI to use getKiloUrl() and getKiloUrlFromToken() functions for dynamic URL resolution. Include new launch configuration and documentation updates for local development workflow.
Replace the generic getKiloUrl function with two specific functions: - getApiUrl for API endpoints (e.g., /extension-config.json) - getAppUrl for app/web URLs (e.g., /profile, /support) This improves type safety and clarity by separating concerns between API and app URL generation. BREAKING CHANGE: getKiloUrl function removed, use getApiUrl or getAppUrl instead
Move getApiUrl, getAppUrl, and getKiloUrlFromToken functions from src/shared/kilocode/ to packages/types/src/kilocode/kilocode.ts and update all imports across the codebase. This consolidates shared utilities into the types package, reducing duplication and improving maintainability.
88e66d1 to
81f1892
Compare
- Introduce getExtensionConfigUrl function for extension config endpoint - Refactor getApiUrl and getAppUrl to use shared buildUrl helper - Update tests to cover new function and maintain backwards compatibility - Use getExtensionConfigUrl in Gemini CLI provider instead of hardcoded URL
Add check-latest: false and token configuration to setup-java steps in code-qa.yml and marketplace-publish.yml.
4fa7af7 to
1307886
Compare
This PR builds off my original one, but adds a nice api so the code around most urls looks similar to before:
#3055
With this change, it's super easy to point a local Kilo development extension at a local backend just by changing the run target. This PR does not remove support for the kilocodeToken approach to changing the backendUrl– that's useful for pointing the production extension at local backends