Skip to content

Commit 0e31267

Browse files
committed
Merge branch 'main' into stable
2 parents 332edd3 + 73442dd commit 0e31267

File tree

186 files changed

+29101
-6029
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+29101
-6029
lines changed

.env.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ AWS_BEDROCK_CONFIG=
9797
# Include this environment variable if you want more logging for debugging locally
9898
VITE_LOG_LEVEL=debug
9999

100+
# Get your GitHub Personal Access Token here -
101+
# https://github.com/settings/tokens
102+
# This token is used for:
103+
# 1. Importing/cloning GitHub repositories without rate limiting
104+
# 2. Accessing private repositories
105+
# 3. Automatic GitHub authentication (no need to manually connect in the UI)
106+
#
107+
# For classic tokens, ensure it has these scopes: repo, read:org, read:user
108+
# For fine-grained tokens, ensure it has Repository and Organization access
109+
VITE_GITHUB_ACCESS_TOKEN=
110+
111+
# Specify the type of GitHub token you're using
112+
# Can be 'classic' or 'fine-grained'
113+
# Classic tokens are recommended for broader access
114+
VITE_GITHUB_TOKEN_TYPE=classic
115+
100116
# Example Context Values for qwen2.5-coder:32b
101117
#
102118
# DEFAULT_NUM_CTX=32768 # Consumes 36GB of VRAM

.env.production

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Rename this file to .env once you have filled in the below environment variables!
2+
3+
# Get your GROQ API Key here -
4+
# https://console.groq.com/keys
5+
# You only need this environment variable set if you want to use Groq models
6+
GROQ_API_KEY=
7+
8+
# Get your HuggingFace API Key here -
9+
# https://huggingface.co/settings/tokens
10+
# You only need this environment variable set if you want to use HuggingFace models
11+
HuggingFace_API_KEY=
12+
13+
# Get your Open AI API Key by following these instructions -
14+
# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key
15+
# You only need this environment variable set if you want to use GPT models
16+
OPENAI_API_KEY=
17+
18+
# Get your Anthropic API Key in your account settings -
19+
# https://console.anthropic.com/settings/keys
20+
# You only need this environment variable set if you want to use Claude models
21+
ANTHROPIC_API_KEY=
22+
23+
# Get your OpenRouter API Key in your account settings -
24+
# https://openrouter.ai/settings/keys
25+
# You only need this environment variable set if you want to use OpenRouter models
26+
OPEN_ROUTER_API_KEY=
27+
28+
# Get your Google Generative AI API Key by following these instructions -
29+
# https://console.cloud.google.com/apis/credentials
30+
# You only need this environment variable set if you want to use Google Generative AI models
31+
GOOGLE_GENERATIVE_AI_API_KEY=
32+
33+
# You only need this environment variable set if you want to use oLLAMA models
34+
# DONT USE http://localhost:11434 due to IPV6 issues
35+
# USE EXAMPLE http://127.0.0.1:11434
36+
OLLAMA_API_BASE_URL=
37+
38+
# You only need this environment variable set if you want to use OpenAI Like models
39+
OPENAI_LIKE_API_BASE_URL=
40+
41+
# You only need this environment variable set if you want to use Together AI models
42+
TOGETHER_API_BASE_URL=
43+
44+
# You only need this environment variable set if you want to use DeepSeek models through their API
45+
DEEPSEEK_API_KEY=
46+
47+
# Get your OpenAI Like API Key
48+
OPENAI_LIKE_API_KEY=
49+
50+
# Get your Together API Key
51+
TOGETHER_API_KEY=
52+
53+
# You only need this environment variable set if you want to use Hyperbolic models
54+
HYPERBOLIC_API_KEY=
55+
HYPERBOLIC_API_BASE_URL=
56+
57+
# Get your Mistral API Key by following these instructions -
58+
# https://console.mistral.ai/api-keys/
59+
# You only need this environment variable set if you want to use Mistral models
60+
MISTRAL_API_KEY=
61+
62+
# Get the Cohere Api key by following these instructions -
63+
# https://dashboard.cohere.com/api-keys
64+
# You only need this environment variable set if you want to use Cohere models
65+
COHERE_API_KEY=
66+
67+
# Get LMStudio Base URL from LM Studio Developer Console
68+
# Make sure to enable CORS
69+
# DONT USE http://localhost:1234 due to IPV6 issues
70+
# Example: http://127.0.0.1:1234
71+
LMSTUDIO_API_BASE_URL=
72+
73+
# Get your xAI API key
74+
# https://x.ai/api
75+
# You only need this environment variable set if you want to use xAI models
76+
XAI_API_KEY=
77+
78+
# Get your Perplexity API Key here -
79+
# https://www.perplexity.ai/settings/api
80+
# You only need this environment variable set if you want to use Perplexity models
81+
PERPLEXITY_API_KEY=
82+
83+
# Get your AWS configuration
84+
# https://console.aws.amazon.com/iam/home
85+
AWS_BEDROCK_CONFIG=
86+
87+
# Include this environment variable if you want more logging for debugging locally
88+
VITE_LOG_LEVEL=
89+
90+
# Get your GitHub Personal Access Token here -
91+
# https://github.com/settings/tokens
92+
# This token is used for:
93+
# 1. Importing/cloning GitHub repositories without rate limiting
94+
# 2. Accessing private repositories
95+
# 3. Automatic GitHub authentication (no need to manually connect in the UI)
96+
#
97+
# For classic tokens, ensure it has these scopes: repo, read:org, read:user
98+
# For fine-grained tokens, ensure it has Repository and Organization access
99+
VITE_GITHUB_ACCESS_TOKEN=
100+
101+
# Specify the type of GitHub token you're using
102+
# Can be 'classic' or 'fine-grained'
103+
# Classic tokens are recommended for broader access
104+
VITE_GITHUB_TOKEN_TYPE=
105+
106+
# Netlify Authentication
107+
VITE_NETLIFY_ACCESS_TOKEN=
108+
109+
# Example Context Values for qwen2.5-coder:32b
110+
#
111+
# DEFAULT_NUM_CTX=32768 # Consumes 36GB of VRAM
112+
# DEFAULT_NUM_CTX=24576 # Consumes 32GB of VRAM
113+
# DEFAULT_NUM_CTX=12288 # Consumes 26GB of VRAM
114+
# DEFAULT_NUM_CTX=6144 # Consumes 24GB of VRAM
115+
DEFAULT_NUM_CTX=

.eslintrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:prettier/recommended"
9+
],
10+
"rules": {
11+
// example: turn off console warnings
12+
"no-console": "off"
13+
}
14+
}
15+

.github/workflows/docker.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ name: Docker Publish
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- stable
5+
branches: [main, stable]
6+
tags: ['v*', '*.*.*']
87
workflow_dispatch:
98

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
1013
permissions:
1114
packages: write
1215
contents: read
@@ -18,13 +21,14 @@ env:
1821
jobs:
1922
docker-build-publish:
2023
runs-on: ubuntu-latest
24+
# timeout-minutes: 30
2125
steps:
2226
- name: Checkout code
2327
uses: actions/checkout@v4
24-
28+
2529
- name: Set up Docker Buildx
2630
uses: docker/setup-buildx-action@v3
27-
31+
2832
- name: Log in to GitHub Container Registry
2933
uses: docker/login-action@v3
3034
with:
@@ -37,25 +41,22 @@ jobs:
3741
uses: docker/metadata-action@v4
3842
with:
3943
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40-
41-
- name: Build and push Docker image for main
42-
if: github.ref == 'refs/heads/main'
43-
uses: docker/build-push-action@v6
44-
with:
45-
context: .
46-
push: true
4744
tags: |
48-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
49-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
50-
labels: ${{ steps.meta.outputs.labels }}
45+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
46+
type=raw,value=stable,enable=${{ github.ref == 'refs/heads/stable' }}
47+
type=ref,event=tag
48+
type=sha,format=short
49+
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/stable' }}
5150
52-
- name: Build and push Docker image for stable
53-
if: github.ref == 'refs/heads/stable'
51+
- name: Build and push Docker image
5452
uses: docker/build-push-action@v6
5553
with:
5654
context: .
55+
platforms: linux/amd64,linux/arm64
56+
target: bolt-ai-production
5757
push: true
58-
tags: |
59-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:stable
60-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
58+
tags: ${{ steps.meta.outputs.tags }}
6159
labels: ${{ steps.meta.outputs.labels }}
60+
61+
- name: Check manifest
62+
run: docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}

.github/workflows/electron.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Electron Build and Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag for the release (e.g., v1.0.0). Leave empty if not applicable.'
8+
required: false
9+
push:
10+
branches:
11+
- electron
12+
tags:
13+
- 'v*'
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
build:
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest, windows-latest, macos-latest] # Use unsigned macOS builds for now
25+
node-version: [18.18.0]
26+
fail-fast: false
27+
28+
steps:
29+
- name: Check out Git repository
30+
uses: actions/checkout@v4
31+
32+
- name: Install Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
37+
- name: Install pnpm
38+
uses: pnpm/action-setup@v2
39+
with:
40+
version: 9.14.4
41+
run_install: false
42+
43+
- name: Get pnpm store directory
44+
shell: bash
45+
run: |
46+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
47+
48+
- name: Setup pnpm cache
49+
uses: actions/cache@v3
50+
with:
51+
path: ${{ env.STORE_PATH }}
52+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
53+
restore-keys: |
54+
${{ runner.os }}-pnpm-store-
55+
56+
- name: Install dependencies
57+
run: pnpm install
58+
59+
# Install Linux dependencies
60+
- name: Install Linux dependencies
61+
if: matrix.os == 'ubuntu-latest'
62+
run: |
63+
sudo apt-get update
64+
sudo apt-get install -y rpm
65+
66+
# Build
67+
- name: Build Electron app
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
NODE_OPTIONS: "--max_old_space_size=4096"
71+
run: |
72+
if [ "$RUNNER_OS" == "Windows" ]; then
73+
pnpm run electron:build:win
74+
elif [ "$RUNNER_OS" == "macOS" ]; then
75+
pnpm run electron:build:mac
76+
else
77+
pnpm run electron:build:linux
78+
fi
79+
shell: bash
80+
81+
# Create Release
82+
- name: Create Release
83+
uses: softprops/action-gh-release@v2
84+
with:
85+
# Use the workflow_dispatch input tag if available, else use the Git ref name.
86+
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
87+
# Only branch pushes remain drafts. For workflow_dispatch and tag pushes the release is published.
88+
draft: ${{ github.event_name != 'workflow_dispatch' && github.ref_type == 'branch' }}
89+
# For tag pushes, name the release as "Release <tagname>", otherwise "Electron Release".
90+
name: ${{ (github.event_name == 'push' && github.ref_type == 'tag') && format('Release {0}', github.ref_name) || 'Electron Release' }}
91+
files: |
92+
dist/*.exe
93+
dist/*.dmg
94+
dist/*.deb
95+
dist/*.AppImage
96+
dist/*.zip
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)