Skip to content
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

fix: Model import name and ID are incorrect on Windows #3989

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

louis-jan
Copy link
Contributor

Describe Your Changes

  • This PR addresses the issue of app importing models as full paths on model ID windows.

Fixes Issues

Changes made

  1. Imports:

    • The import for ModelEvent was removed.
    • A new import baseName was added from @janhq/core.
  2. Function Changes:

    • Inside the importModels function:
      • The .map() method on models was changed to be async.
      • The modelId assignment now uses await baseName(model.path) instead of model.path.split('/').pop() to extract the base name of the path.

@louis-jan louis-jan requested a review from urmauur November 11, 2024 03:35
@github-actions github-actions bot added the type: bug Something isn't working label Nov 11, 2024
Copy link
Contributor

github-actions bot commented Nov 11, 2024

Barecheck - Code coverage report

Total: 69.33%

Your code coverage diff: -0.01% ▾

Uncovered files and lines
FileLines
web/hooks/useImportModel.ts46, 92, 99-100, 112-113, 118, 120-121
web/screens/Settings/Advanced/index.tsx78, 91, 108-111, 121, 125-127, 129, 177, 193-196, 198-199, 201, 205-206, 208, 210-212, 259, 291-294, 300-302, 309-310, 346, 369, 378, 427, 501, 506

@louis-jan louis-jan merged commit 4cd0208 into dev Nov 11, 2024
9 checks passed
@louis-jan louis-jan deleted the fix/windows-import-name-issue branch November 11, 2024 05:29
@github-actions github-actions bot added this to the v0.5.8 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants