chore: Remove unused dependencies and clean up imports
Browse files- Removed lucide-react and next-themes from package dependencies
- Simplified import in workbench store for path and file-saver
- Removed unnecessary module definition in Vite config
- app/lib/stores/workbench.ts +5 -4
 - package.json +0 -2
 - pnpm-lock.yaml +0 -26
 - vite.config.ts +0 -1
 
    	
        app/lib/stores/workbench.ts
    CHANGED
    
    | 
         @@ -10,16 +10,17 @@ import { FilesStore, type FileMap } from './files'; 
     | 
|
| 10 | 
         
             
            import { PreviewsStore } from './previews';
         
     | 
| 11 | 
         
             
            import { TerminalStore } from './terminal';
         
     | 
| 12 | 
         
             
            import JSZip from 'jszip';
         
     | 
| 13 | 
         
            -
            import  
     | 
| 14 | 
         
            -
            const { saveAs } = pkg;
         
     | 
| 15 | 
         
             
            import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
         
     | 
| 16 | 
         
            -
            import  
     | 
| 17 | 
         
             
            import { extractRelativePath } from '~/utils/diff';
         
     | 
| 18 | 
         
             
            import { description } from '~/lib/persistence';
         
     | 
| 19 | 
         
             
            import Cookies from 'js-cookie';
         
     | 
| 20 | 
         
             
            import { createSampler } from '~/utils/sampler';
         
     | 
| 21 | 
         
             
            import type { ActionAlert } from '~/types/actions';
         
     | 
| 22 | 
         | 
| 
         | 
|
| 
         | 
|
| 23 | 
         
             
            export interface ArtifactState {
         
     | 
| 24 | 
         
             
              id: string;
         
     | 
| 25 | 
         
             
              title: string;
         
     | 
| 
         @@ -330,7 +331,7 @@ export class WorkbenchStore { 
     | 
|
| 330 | 
         | 
| 331 | 
         
             
                if (data.action.type === 'file') {
         
     | 
| 332 | 
         
             
                  const wc = await webcontainer;
         
     | 
| 333 | 
         
            -
                  const fullPath =  
     | 
| 334 | 
         | 
| 335 | 
         
             
                  if (this.selectedFile.value !== fullPath) {
         
     | 
| 336 | 
         
             
                    this.setSelectedFile(fullPath);
         
     | 
| 
         | 
|
| 10 | 
         
             
            import { PreviewsStore } from './previews';
         
     | 
| 11 | 
         
             
            import { TerminalStore } from './terminal';
         
     | 
| 12 | 
         
             
            import JSZip from 'jszip';
         
     | 
| 13 | 
         
            +
            import fileSaver from 'file-saver';
         
     | 
| 
         | 
|
| 14 | 
         
             
            import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
         
     | 
| 15 | 
         
            +
            import { path } from '~/utils/path';
         
     | 
| 16 | 
         
             
            import { extractRelativePath } from '~/utils/diff';
         
     | 
| 17 | 
         
             
            import { description } from '~/lib/persistence';
         
     | 
| 18 | 
         
             
            import Cookies from 'js-cookie';
         
     | 
| 19 | 
         
             
            import { createSampler } from '~/utils/sampler';
         
     | 
| 20 | 
         
             
            import type { ActionAlert } from '~/types/actions';
         
     | 
| 21 | 
         | 
| 22 | 
         
            +
            const { saveAs } = fileSaver;
         
     | 
| 23 | 
         
            +
             
     | 
| 24 | 
         
             
            export interface ArtifactState {
         
     | 
| 25 | 
         
             
              id: string;
         
     | 
| 26 | 
         
             
              title: string;
         
     | 
| 
         | 
|
| 331 | 
         | 
| 332 | 
         
             
                if (data.action.type === 'file') {
         
     | 
| 333 | 
         
             
                  const wc = await webcontainer;
         
     | 
| 334 | 
         
            +
                  const fullPath = path.join(wc.workdir, data.action.filePath);
         
     | 
| 335 | 
         | 
| 336 | 
         
             
                  if (this.selectedFile.value !== fullPath) {
         
     | 
| 337 | 
         
             
                    this.setSelectedFile(fullPath);
         
     | 
    	
        package.json
    CHANGED
    
    | 
         @@ -104,9 +104,7 @@ 
     | 
|
| 104 | 
         
             
                "js-cookie": "^3.0.5",
         
     | 
| 105 | 
         
             
                "jspdf": "^2.5.2",
         
     | 
| 106 | 
         
             
                "jszip": "^3.10.1",
         
     | 
| 107 | 
         
            -
                "lucide-react": "^0.474.0",
         
     | 
| 108 | 
         
             
                "nanostores": "^0.10.3",
         
     | 
| 109 | 
         
            -
                "next-themes": "^0.4.4",
         
     | 
| 110 | 
         
             
                "ollama-ai-provider": "^0.15.2",
         
     | 
| 111 | 
         
             
                "path-browserify": "^1.0.1",
         
     | 
| 112 | 
         
             
                "react": "^18.3.1",
         
     | 
| 
         | 
|
| 104 | 
         
             
                "js-cookie": "^3.0.5",
         
     | 
| 105 | 
         
             
                "jspdf": "^2.5.2",
         
     | 
| 106 | 
         
             
                "jszip": "^3.10.1",
         
     | 
| 
         | 
|
| 107 | 
         
             
                "nanostores": "^0.10.3",
         
     | 
| 
         | 
|
| 108 | 
         
             
                "ollama-ai-provider": "^0.15.2",
         
     | 
| 109 | 
         
             
                "path-browserify": "^1.0.1",
         
     | 
| 110 | 
         
             
                "react": "^18.3.1",
         
     | 
    	
        pnpm-lock.yaml
    CHANGED
    
    | 
         @@ -230,15 +230,9 @@ importers: 
     | 
|
| 230 | 
         
             
                  jszip:
         
     | 
| 231 | 
         
             
                    specifier: ^3.10.1
         
     | 
| 232 | 
         
             
                    version: 3.10.1
         
     | 
| 233 | 
         
            -
                  lucide-react:
         
     | 
| 234 | 
         
            -
                    specifier: ^0.474.0
         
     | 
| 235 | 
         
            -
                    version: 0.474.0(react@18.3.1)
         
     | 
| 236 | 
         
             
                  nanostores:
         
     | 
| 237 | 
         
             
                    specifier: ^0.10.3
         
     | 
| 238 | 
         
             
                    version: 0.10.3
         
     | 
| 239 | 
         
            -
                  next-themes:
         
     | 
| 240 | 
         
            -
                    specifier: ^0.4.4
         
     | 
| 241 | 
         
            -
                    version: 0.4.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
         
     | 
| 242 | 
         
             
                  ollama-ai-provider:
         
     | 
| 243 | 
         
             
                    specifier: ^0.15.2
         
     | 
| 244 | 
         
             
                    version: 0.15.2(zod@3.24.1)
         
     | 
| 
         @@ -4733,11 +4727,6 @@ packages: 
     | 
|
| 4733 | 
         
             
                resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
         
     | 
| 4734 | 
         
             
                engines: {node: '>=12'}
         
     | 
| 4735 | 
         | 
| 4736 | 
         
            -
              lucide-react@0.474.0:
         
     | 
| 4737 | 
         
            -
                resolution: {integrity: sha512-CmghgHkh0OJNmxGKWc0qfPJCYHASPMVSyGY8fj3xgk4v84ItqDg64JNKFZn5hC6E0vHi6gxnbCgwhyVB09wQtA==}
         
     | 
| 4738 | 
         
            -
                peerDependencies:
         
     | 
| 4739 | 
         
            -
                  react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
         
     | 
| 4740 | 
         
            -
             
     | 
| 4741 | 
         
             
              lz-string@1.5.0:
         
     | 
| 4742 | 
         
             
                resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
         
     | 
| 4743 | 
         
             
                hasBin: true
         
     | 
| 
         @@ -5196,12 +5185,6 @@ packages: 
     | 
|
| 5196 | 
         
             
                resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
         
     | 
| 5197 | 
         
             
                engines: {node: '>= 0.6'}
         
     | 
| 5198 | 
         | 
| 5199 | 
         
            -
              next-themes@0.4.4:
         
     | 
| 5200 | 
         
            -
                resolution: {integrity: sha512-LDQ2qIOJF0VnuVrrMSMLrWGjRMkq+0mpgl6e0juCLqdJ+oo8Q84JRWT6Wh11VDQKkMMe+dVzDKLWs5n87T+PkQ==}
         
     | 
| 5201 | 
         
            -
                peerDependencies:
         
     | 
| 5202 | 
         
            -
                  react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
         
     | 
| 5203 | 
         
            -
                  react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
         
     | 
| 5204 | 
         
            -
             
     | 
| 5205 | 
         
             
              node-domexception@1.0.0:
         
     | 
| 5206 | 
         
             
                resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
         
     | 
| 5207 | 
         
             
                engines: {node: '>=10.5.0'}
         
     | 
| 
         @@ -11982,10 +11965,6 @@ snapshots: 
     | 
|
| 11982 | 
         | 
| 11983 | 
         
             
              lru-cache@7.18.3: {}
         
     | 
| 11984 | 
         | 
| 11985 | 
         
            -
              lucide-react@0.474.0(react@18.3.1):
         
     | 
| 11986 | 
         
            -
                dependencies:
         
     | 
| 11987 | 
         
            -
                  react: 18.3.1
         
     | 
| 11988 | 
         
            -
             
     | 
| 11989 | 
         
             
              lz-string@1.5.0: {}
         
     | 
| 11990 | 
         | 
| 11991 | 
         
             
              magic-string@0.25.9:
         
     | 
| 
         @@ -12819,11 +12798,6 @@ snapshots: 
     | 
|
| 12819 | 
         | 
| 12820 | 
         
             
              negotiator@0.6.3: {}
         
     | 
| 12821 | 
         | 
| 12822 | 
         
            -
              next-themes@0.4.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
         
     | 
| 12823 | 
         
            -
                dependencies:
         
     | 
| 12824 | 
         
            -
                  react: 18.3.1
         
     | 
| 12825 | 
         
            -
                  react-dom: 18.3.1(react@18.3.1)
         
     | 
| 12826 | 
         
            -
             
     | 
| 12827 | 
         
             
              node-domexception@1.0.0: {}
         
     | 
| 12828 | 
         | 
| 12829 | 
         
             
              node-fetch-native@1.6.6: {}
         
     | 
| 
         | 
|
| 230 | 
         
             
                  jszip:
         
     | 
| 231 | 
         
             
                    specifier: ^3.10.1
         
     | 
| 232 | 
         
             
                    version: 3.10.1
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 233 | 
         
             
                  nanostores:
         
     | 
| 234 | 
         
             
                    specifier: ^0.10.3
         
     | 
| 235 | 
         
             
                    version: 0.10.3
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 236 | 
         
             
                  ollama-ai-provider:
         
     | 
| 237 | 
         
             
                    specifier: ^0.15.2
         
     | 
| 238 | 
         
             
                    version: 0.15.2(zod@3.24.1)
         
     | 
| 
         | 
|
| 4727 | 
         
             
                resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
         
     | 
| 4728 | 
         
             
                engines: {node: '>=12'}
         
     | 
| 4729 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 4730 | 
         
             
              lz-string@1.5.0:
         
     | 
| 4731 | 
         
             
                resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
         
     | 
| 4732 | 
         
             
                hasBin: true
         
     | 
| 
         | 
|
| 5185 | 
         
             
                resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
         
     | 
| 5186 | 
         
             
                engines: {node: '>= 0.6'}
         
     | 
| 5187 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 5188 | 
         
             
              node-domexception@1.0.0:
         
     | 
| 5189 | 
         
             
                resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
         
     | 
| 5190 | 
         
             
                engines: {node: '>=10.5.0'}
         
     | 
| 
         | 
|
| 11965 | 
         | 
| 11966 | 
         
             
              lru-cache@7.18.3: {}
         
     | 
| 11967 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 11968 | 
         
             
              lz-string@1.5.0: {}
         
     | 
| 11969 | 
         | 
| 11970 | 
         
             
              magic-string@0.25.9:
         
     | 
| 
         | 
|
| 12798 | 
         | 
| 12799 | 
         
             
              negotiator@0.6.3: {}
         
     | 
| 12800 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 12801 | 
         
             
              node-domexception@1.0.0: {}
         
     | 
| 12802 | 
         | 
| 12803 | 
         
             
              node-fetch-native@1.6.6: {}
         
     | 
    	
        vite.config.ts
    CHANGED
    
    | 
         @@ -89,7 +89,6 @@ export default defineConfig((config) => { 
     | 
|
| 89 | 
         
             
                  __PKG_DEV_DEPENDENCIES: JSON.stringify(pkg.devDependencies),
         
     | 
| 90 | 
         
             
                  __PKG_PEER_DEPENDENCIES: JSON.stringify(pkg.peerDependencies),
         
     | 
| 91 | 
         
             
                  __PKG_OPTIONAL_DEPENDENCIES: JSON.stringify(pkg.optionalDependencies),
         
     | 
| 92 | 
         
            -
                  module: {},
         
     | 
| 93 | 
         
             
                },
         
     | 
| 94 | 
         
             
                build: {
         
     | 
| 95 | 
         
             
                  target: 'esnext',
         
     | 
| 
         | 
|
| 89 | 
         
             
                  __PKG_DEV_DEPENDENCIES: JSON.stringify(pkg.devDependencies),
         
     | 
| 90 | 
         
             
                  __PKG_PEER_DEPENDENCIES: JSON.stringify(pkg.peerDependencies),
         
     | 
| 91 | 
         
             
                  __PKG_OPTIONAL_DEPENDENCIES: JSON.stringify(pkg.optionalDependencies),
         
     | 
| 
         | 
|
| 92 | 
         
             
                },
         
     | 
| 93 | 
         
             
                build: {
         
     | 
| 94 | 
         
             
                  target: 'esnext',
         
     |