Skip to content

Commit

Permalink
Disable isSwitchingModel for API-based models
Browse files Browse the repository at this point in the history
Reenable deployment
  • Loading branch information
Curtis Gray committed Apr 1, 2024
1 parent f7e6ac6 commit 8c9992e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/wingman.backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
APPLE_ID: ${{ secrets.MACOS_APP_NOTARIZATION_USERID }}
APPLE_PASSWORD: ${{ secrets.MACOS_APP_NOTARIZATION_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.MACOS_APP_NOTARIZATION_TEAMID }}
run: .\build.ps1 -BuildPlatform ${{ matrix.platform }} -SkipDeployment
run: .\build.ps1 -BuildPlatform ${{ matrix.platform }}

- name: Create and Push Git Tag if Not Exists
run: |
Expand All @@ -159,12 +159,12 @@ jobs:
echo "Tag v$PACKAGE_VERSION created and pushed."
fi
# - name: Save Tag Name
# run: echo "v${{ env.PACKAGE_VERSION }}" > tag.txt
- name: Save Tag Name
run: echo "v${{ env.PACKAGE_VERSION }}" > tag.txt

# - name: Upload Tag Name as Artifact
# uses: actions/upload-artifact@v4
# with:
# name: tag-name
# path: tag.txt
# overwrite: true
- name: Upload Tag Name as Artifact
uses: actions/upload-artifact@v4
with:
name: tag-name
path: tag.txt
overwrite: true
50 changes: 30 additions & 20 deletions ux/pages/api/home/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,37 +447,42 @@ const Home = ({
disableSwitching();
} else {
if (selectedConversation?.model) {
if (selectedConversation.model.id === AIModelID.NO_MODEL_SELECTED) {
if (globalModel) {
if (globalModel.id === AIModelID.NO_MODEL_SELECTED) {
disableSwitching();
} else if (globalModel.id === selectedConversation.model.id) {
if (globalModel.item?.filePath === inferringAlias) {
const vendor = Vendors[selectedConversation.model.vendor];
if (!vendor.isDownloadable) {
disableSwitching();
} else {
if (selectedConversation.model.id === AIModelID.NO_MODEL_SELECTED) {
if (globalModel) {
if (globalModel.id === AIModelID.NO_MODEL_SELECTED) {
disableSwitching();
} else if (globalModel.id === selectedConversation.model.id) {
if (globalModel.item?.filePath === inferringAlias) {
disableSwitching();
} else {
enableSwitching();
}
} else {
enableSwitching();
disableSwitching();
}
} else {
disableSwitching();
}
} else {
disableSwitching();
}
} else {
if (globalModel) {
if (globalModel.id === AIModelID.NO_MODEL_SELECTED) {
enableSwitching();
} else if (globalModel.id === selectedConversation.model.id) {
if (globalModel.item?.filePath === inferringAlias) {
disableSwitching();
if (globalModel) {
if (globalModel.id === AIModelID.NO_MODEL_SELECTED) {
enableSwitching();
} else if (globalModel.id === selectedConversation.model.id) {
if (globalModel.item?.filePath === inferringAlias) {
disableSwitching();
} else {
enableSwitching();
}
} else {
enableSwitching();
}
} else {
enableSwitching();
// enableSwitching();
}
} else {
// enableSwitching();
}
}
} else {
Expand All @@ -488,7 +493,12 @@ const Home = ({
disableSwitching();
}
} else {
enableSwitching();
const vendor = Vendors[globalModel!.vendor];
if (!vendor.isDownloadable) {
disableSwitching();
} else {
enableSwitching();
}
}
}

Expand Down

0 comments on commit 8c9992e

Please sign in to comment.