File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 66 "build" : {
77 "frontendDist" : " ../web-app/dist" ,
88 "devUrl" : " http://localhost:1420" ,
9- "beforeDevCommand" : " cross-env IS_TAURI=true yarn dev:web" ,
9+ "beforeDevCommand" : " cross-env IS_TAURI=true IS_DEV=true yarn dev:web" ,
1010 "beforeBuildCommand" : " cross-env IS_TAURI=true yarn build:web"
1111 },
1212 "app" : {
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ export const sendCompletion = async (
174174 // TODO: Retrieve from extension settings
175175 baseURL : provider . base_url ,
176176 // Use Tauri's fetch to avoid CORS issues only for openai-compatible provider
177- fetch : getServiceHub ( ) . providers ( ) . fetch ( ) ,
177+ fetch : IS_DEV ? fetch : getServiceHub ( ) . providers ( ) . fetch ( ) ,
178178 // OpenRouter identification headers for Jan
179179 // ref: https://openrouter.ai/docs/api-reference/overview#headers
180180 ...( provider . provider === 'openrouter' && {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ declare global {
2222 declare const MODEL_CATALOG_URL : string
2323 declare const AUTO_UPDATER_DISABLED : boolean
2424 declare const GA_MEASUREMENT_ID : string
25+ declare const IS_DEV : boolean
2526 interface Window {
2627 core : AppCore | undefined
2728 gtag ?: ( ...args : unknown [ ] ) => void
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export default defineConfig(({ mode }) => {
4040 } ,
4141 define : {
4242 IS_TAURI : JSON . stringify ( process . env . IS_TAURI ) ,
43+ IS_DEV : JSON . stringify ( process . env . IS_DEV ) ,
4344 IS_WEB_APP : JSON . stringify ( false ) ,
4445 IS_MACOS : JSON . stringify (
4546 process . env . TAURI_ENV_PLATFORM ?. includes ( 'darwin' ) ?? false
You can’t perform that action at this time.
0 commit comments