Fix: Follow up Text-to-CAD Edit to fix in browser (#7124)
* fix: web vs desktop who wins * fix: fixed logic round two :(
This commit is contained in:
		@ -1278,12 +1278,12 @@ export const ModelingMachineProvider = ({
 | 
			
		||||
              )
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          let filePath = file?.path
 | 
			
		||||
          // When prompt to edit finishes, try to route to the file they were in otherwise go to main.kcl
 | 
			
		||||
          if (filePath) {
 | 
			
		||||
            filePath = window.electron.path.relative(basePath, filePath)
 | 
			
		||||
          } else {
 | 
			
		||||
            filePath = PROJECT_ENTRYPOINT
 | 
			
		||||
          // route to main.kcl by default for web and desktop
 | 
			
		||||
          let filePath: string = PROJECT_ENTRYPOINT
 | 
			
		||||
          const possibleFileName = file?.path
 | 
			
		||||
          if (possibleFileName && isDesktop()) {
 | 
			
		||||
            // When prompt to edit finishes, try to route to the file they were in otherwise go to main.kcl
 | 
			
		||||
            filePath = window.electron.path.relative(basePath, possibleFileName)
 | 
			
		||||
          }
 | 
			
		||||
          return await promptToEditFlow({
 | 
			
		||||
            projectFiles,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user