diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml deleted file mode 100644 index 9d88605..0000000 --- a/.github/workflows/commit.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Update Commit Hash File - -on: - push: - branches: - - main - -permissions: - contents: write - -jobs: - update-commit: - if: contains(github.event.head_commit.message, '#release') != true - runs-on: ubuntu-latest - - steps: - - name: Checkout the code - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - name: Get the latest commit hash - run: | - echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV - echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV - - - name: Update commit file - run: | - echo "{ \"commit\": \"$COMMIT_HASH\", \"version\": \"$CURRENT_VERSION\" }" > app/commit.json - - - name: Commit and push the update - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add app/commit.json - git commit -m "chore: update commit hash to $COMMIT_HASH" - git push \ No newline at end of file diff --git a/.github/workflows/update-stable.yml b/.github/workflows/update-stable.yml index bcb0ad9..967c4e3 100644 --- a/.github/workflows/update-stable.yml +++ b/.github/workflows/update-stable.yml @@ -166,8 +166,7 @@ jobs: - name: Commit and Tag Release run: | git pull - echo "{ \"commit\": \"$COMMIT_HASH\", \"version\": \"$NEW_VERSION\" }" > app/commit.json - git add package.json pnpm-lock.yaml changelog.md app/commit.json + git add package.json pnpm-lock.yaml changelog.md git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}" git tag "v${{ steps.bump_version.outputs.new_version }}" git push diff --git a/.husky/pre-commit b/.husky/pre-commit index b95e00d..5f5c2b9 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -29,15 +29,4 @@ if ! pnpm lint; then exit 1 fi -# Update commit.json with the latest commit hash -echo "Updating commit.json with the latest commit hash..." -COMMIT_HASH=$(git rev-parse HEAD) -if [ $? -ne 0 ]; then - echo "❌ Failed to get commit hash. Ensure you are in a git repository." - exit 1 -fi - -echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json -git add app/commit.json - echo "👍 All checks passed! Committing changes..." diff --git a/app/commit.json b/app/commit.json deleted file mode 100644 index 0b9cd99..0000000 --- a/app/commit.json +++ /dev/null @@ -1 +0,0 @@ -{ "commit": "ab5cde30a126f6540f0afb4d6d6e6be6a764ddca", "version": "0.0.3" } diff --git a/app/components/settings/debug/DebugTab.tsx b/app/components/settings/debug/DebugTab.tsx index b0cde7d..3d18603 100644 --- a/app/components/settings/debug/DebugTab.tsx +++ b/app/components/settings/debug/DebugTab.tsx @@ -1,6 +1,5 @@ import React, { useCallback, useEffect, useState } from 'react'; import { useSettings } from '~/lib/hooks/useSettings'; -import commit from '~/commit.json'; import { toast } from 'react-toastify'; import { providerBaseUrlEnvKeys } from '~/utils/constants'; @@ -44,11 +43,16 @@ interface CommitData { version?: string; } -const connitJson: CommitData = commit; +const connitJson: CommitData = { + commit: __COMMIT_HASH, + version: __APP_VERSION, +}; const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike']; + const versionHash = connitJson.commit; const versionTag = connitJson.version; + const GITHUB_URLS = { original: 'https://api.github.com/repos/stackblitz-labs/bolt.diy/commits/main', fork: 'https://api.github.com/repos/Stijnus/bolt.new-any-llm/commits/main', @@ -524,7 +528,7 @@ export default function DebugTab() {
Version
- {versionHash.slice(0, 7)} + {connitJson.commit.slice(0, 7)} (v{versionTag || '0.0.1'}) - {isLatestBranch ? 'nightly' : 'stable'} diff --git a/app/components/settings/providers/ProvidersTab.tsx b/app/components/settings/providers/ProvidersTab.tsx index 58c8dac..e03731f 100644 --- a/app/components/settings/providers/ProvidersTab.tsx +++ b/app/components/settings/providers/ProvidersTab.tsx @@ -35,8 +35,8 @@ export default function ProvidersTab() { newFilteredProviders.sort((a, b) => a.name.localeCompare(b.name)); // Split providers into regular and URL-configurable - const regular = newFilteredProviders.filter(p => !URL_CONFIGURABLE_PROVIDERS.includes(p.name)); - const urlConfigurable = newFilteredProviders.filter(p => URL_CONFIGURABLE_PROVIDERS.includes(p.name)); + const regular = newFilteredProviders.filter((p) => !URL_CONFIGURABLE_PROVIDERS.includes(p.name)); + const urlConfigurable = newFilteredProviders.filter((p) => URL_CONFIGURABLE_PROVIDERS.includes(p.name)); setFilteredProviders([...regular, ...urlConfigurable]); }, [providers, searchTerm, isLocalModel]); @@ -112,8 +112,8 @@ export default function ProvidersTab() { ); }; - const regularProviders = filteredProviders.filter(p => !URL_CONFIGURABLE_PROVIDERS.includes(p.name)); - const urlConfigurableProviders = filteredProviders.filter(p => URL_CONFIGURABLE_PROVIDERS.includes(p.name)); + const regularProviders = filteredProviders.filter((p) => !URL_CONFIGURABLE_PROVIDERS.includes(p.name)); + const urlConfigurableProviders = filteredProviders.filter((p) => URL_CONFIGURABLE_PROVIDERS.includes(p.name)); return (
- These providers are experimental and allow you to run AI models locally or connect to your own infrastructure. They require additional setup but offer more flexibility. + These providers are experimental and allow you to run AI models locally or connect to your own + infrastructure. They require additional setup but offer more flexibility.
-