Skip to content

Commit 2a3a3ab

Browse files
authored
Merge branch 'main' into feature/streaming-agent-output
2 parents a43389f + 6683a54 commit 2a3a3ab

95 files changed

Lines changed: 4154 additions & 608 deletions

File tree

Some content is hidden

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

.github/workflows/build-view.yml

Lines changed: 118 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,72 @@ jobs:
2020
arch: x64
2121
- os: windows-latest
2222
arch: x64
23+
- os: ubuntu-latest
24+
arch: x64
2325

2426
steps:
27+
- name: Free Disk Space (macOS)
28+
if: runner.os == 'macOS'
29+
run: |
30+
echo "Disk space before cleanup:"
31+
df -h
32+
# Remove Xcode completely (not needed for Electron builds) - saves ~15GB
33+
sudo rm -rf /Applications/Xcode.app || true
34+
sudo rm -rf /Applications/Xcode_*.app || true
35+
# Note: Keep /Library/Developer/CommandLineTools as codesign needs it
36+
# Remove iOS simulators
37+
sudo rm -rf ~/Library/Developer/CoreSimulator || true
38+
# Remove all Xcode Developer files
39+
sudo rm -rf ~/Library/Developer/Xcode || true
40+
sudo rm -rf /Library/Developer/Xcode || true
41+
# Remove provisioning profiles
42+
sudo rm -rf ~/Library/MobileDevice/Provisioning\ Profiles || true
43+
# Remove Android SDK if present
44+
sudo rm -rf ~/Library/Android/sdk || true
45+
sudo rm -rf /usr/local/lib/android || true
46+
# Remove .NET
47+
sudo rm -rf /usr/local/share/dotnet || true
48+
# Remove Go
49+
sudo rm -rf /usr/local/go || true
50+
sudo rm -rf ~/go || true
51+
# Remove Ruby
52+
sudo rm -rf /usr/local/lib/ruby || true
53+
sudo rm -rf ~/.gem || true
54+
# Remove Swift toolchains
55+
sudo rm -rf /Library/Developer/Toolchains || true
56+
# Remove Homebrew cache
57+
rm -rf ~/Library/Caches/Homebrew/* || true
58+
brew cleanup --prune=all 2>/dev/null || true
59+
# Remove npm cache
60+
npm cache clean --force || true
61+
# Remove pip cache
62+
pip cache purge 2>/dev/null || true
63+
# Note: Don't delete ~/Library/Caches/* as subsequent steps may need it
64+
65+
# Additional cleanup for more disk space
66+
# Remove hosted tool cache (can be several GB)
67+
sudo rm -rf /Users/runner/hostedtoolcache || true
68+
sudo rm -rf /opt/hostedtoolcache || true
69+
# Remove browsers (not needed for Electron builds)
70+
sudo rm -rf "/Applications/Google Chrome.app" || true
71+
sudo rm -rf "/Applications/Firefox.app" || true
72+
sudo rm -rf "/Applications/Safari Technology Preview.app" || true
73+
# Remove PowerShell
74+
sudo rm -rf /usr/local/microsoft/powershell || true
75+
sudo rm -rf /usr/local/share/powershell || true
76+
# Remove more from /usr/local
77+
sudo rm -rf /usr/local/aws-cli || true
78+
sudo rm -rf /usr/local/julia* || true
79+
sudo rm -rf /usr/local/miniconda || true
80+
# Remove unused large directories
81+
sudo rm -rf /usr/share/swift || true
82+
sudo rm -rf /usr/share/miniconda || true
83+
# Remove Docker images if present
84+
docker system prune -af 2>/dev/null || true
85+
86+
echo "Disk space after cleanup:"
87+
df -h
88+
2589
- name: Checkout Code
2690
uses: actions/checkout@v4
2791

@@ -46,6 +110,23 @@ jobs:
46110
- name: Install Dependencies
47111
run: npm install
48112

113+
# Install libfuse2 for Linux AppImage builds
114+
- name: Install libfuse2 (Linux)
115+
if: runner.os == 'Linux'
116+
run: |
117+
sudo apt-get update
118+
sudo apt-get install -y libfuse2
119+
120+
# Verify disk space before build
121+
- name: Check Disk Space Before Build (macOS)
122+
if: runner.os == 'macOS'
123+
run: |
124+
echo "Disk space available before build:"
125+
df -h
126+
echo ""
127+
echo "Largest directories in home:"
128+
du -sh ~/* 2>/dev/null | sort -rh | head -10 || true
129+
49130
# Step for macOS builds with signing
50131
- name: Build Release Files (macOS with signing)
51132
if: runner.os == 'macOS'
@@ -78,6 +159,19 @@ jobs:
78159
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
79160
USE_NPM_INSTALL_BUN: 'true'
80161

162+
# Step for Linux builds
163+
- name: Build Release Files (Linux)
164+
if: runner.os == 'Linux'
165+
timeout-minutes: 90
166+
run: npm run build:linux
167+
env:
168+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169+
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
170+
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
171+
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
172+
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
173+
USE_NPM_INSTALL_BUN: 'true'
174+
81175
- name: Upload Artifact (macOS - dmg only)
82176
if: runner.os == 'macOS'
83177
uses: actions/upload-artifact@v6
@@ -95,13 +189,22 @@ jobs:
95189
path: |
96190
release/*.exe
97191
retention-days: 5
192+
193+
- name: Upload Artifact (Linux - AppImage only)
194+
if: runner.os == 'Linux'
195+
uses: actions/upload-artifact@v6
196+
with:
197+
name: release-${{ matrix.os }}-${{ matrix.arch }}
198+
path: |
199+
release/*.AppImage
200+
retention-days: 5
98201
merge-release:
99202
needs: build
100203
runs-on: ubuntu-latest
101204
steps:
102205
- name: Create directories
103206
run: |
104-
mkdir -p release/mac-x64 release/mac-arm64 release/win-x64
207+
mkdir -p release/mac-x64 release/mac-arm64 release/win-x64 release/linux-x64
105208
106209
# Download all artifacts with correct names
107210
- name: Download mac-x64 artifact
@@ -122,7 +225,13 @@ jobs:
122225
name: release-windows-latest-x64
123226
path: temp-win-x64
124227

125-
# Move only dmg files for macOS and exe files for Windows
228+
- name: Download linux-x64 artifact
229+
uses: actions/download-artifact@v7
230+
with:
231+
name: release-ubuntu-latest-x64
232+
path: temp-linux-x64
233+
234+
# Move only dmg files for macOS, exe files for Windows, and AppImage for Linux
126235
- name: Move files to clean folders
127236
shell: bash
128237
run: |
@@ -146,3 +255,10 @@ jobs:
146255
else
147256
find temp-win-x64 -name "*.exe" -exec mv {} release/win-x64/ \; || true
148257
fi
258+
259+
# linux-x64 - only move AppImage files
260+
if [ -d "temp-linux-x64/release" ]; then
261+
find temp-linux-x64/release -name "*.AppImage" -exec mv {} release/linux-x64/ \; || true
262+
else
263+
find temp-linux-x64 -name "*.AppImage" -exec mv {} release/linux-x64/ \; || true
264+
fi

.github/workflows/build.yml

Lines changed: 108 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,72 @@ jobs:
3131
arch: x64
3232
- os: windows-latest
3333
arch: x64
34+
- os: ubuntu-latest
35+
arch: x64
3436

3537
steps:
38+
- name: Free Disk Space (macOS)
39+
if: runner.os == 'macOS'
40+
run: |
41+
echo "Disk space before cleanup:"
42+
df -h
43+
# Remove Xcode completely (not needed for Electron builds) - saves ~15GB
44+
sudo rm -rf /Applications/Xcode.app || true
45+
sudo rm -rf /Applications/Xcode_*.app || true
46+
# Note: Keep /Library/Developer/CommandLineTools as codesign needs it
47+
# Remove iOS simulators
48+
sudo rm -rf ~/Library/Developer/CoreSimulator || true
49+
# Remove all Xcode Developer files
50+
sudo rm -rf ~/Library/Developer/Xcode || true
51+
sudo rm -rf /Library/Developer/Xcode || true
52+
# Remove provisioning profiles
53+
sudo rm -rf ~/Library/MobileDevice/Provisioning\ Profiles || true
54+
# Remove Android SDK if present
55+
sudo rm -rf ~/Library/Android/sdk || true
56+
sudo rm -rf /usr/local/lib/android || true
57+
# Remove .NET
58+
sudo rm -rf /usr/local/share/dotnet || true
59+
# Remove Go
60+
sudo rm -rf /usr/local/go || true
61+
sudo rm -rf ~/go || true
62+
# Remove Ruby
63+
sudo rm -rf /usr/local/lib/ruby || true
64+
sudo rm -rf ~/.gem || true
65+
# Remove Swift toolchains
66+
sudo rm -rf /Library/Developer/Toolchains || true
67+
# Remove Homebrew cache
68+
rm -rf ~/Library/Caches/Homebrew/* || true
69+
brew cleanup --prune=all 2>/dev/null || true
70+
# Remove npm cache
71+
npm cache clean --force || true
72+
# Remove pip cache
73+
pip cache purge 2>/dev/null || true
74+
# Note: Don't delete ~/Library/Caches/* as subsequent steps may need it
75+
76+
# Additional cleanup for more disk space
77+
# Remove hosted tool cache (can be several GB)
78+
sudo rm -rf /Users/runner/hostedtoolcache || true
79+
sudo rm -rf /opt/hostedtoolcache || true
80+
# Remove browsers (not needed for Electron builds)
81+
sudo rm -rf "/Applications/Google Chrome.app" || true
82+
sudo rm -rf "/Applications/Firefox.app" || true
83+
sudo rm -rf "/Applications/Safari Technology Preview.app" || true
84+
# Remove PowerShell
85+
sudo rm -rf /usr/local/microsoft/powershell || true
86+
sudo rm -rf /usr/local/share/powershell || true
87+
# Remove more from /usr/local
88+
sudo rm -rf /usr/local/aws-cli || true
89+
sudo rm -rf /usr/local/julia* || true
90+
sudo rm -rf /usr/local/miniconda || true
91+
# Remove unused large directories
92+
sudo rm -rf /usr/share/swift || true
93+
sudo rm -rf /usr/share/miniconda || true
94+
# Remove Docker images if present
95+
docker system prune -af 2>/dev/null || true
96+
97+
echo "Disk space after cleanup:"
98+
df -h
99+
36100
- name: Checkout Code
37101
uses: actions/checkout@v4
38102

@@ -54,6 +118,23 @@ jobs:
54118
- name: Install Dependencies
55119
run: npm install
56120

121+
# Install libfuse2 for Linux AppImage builds
122+
- name: Install libfuse2 (Linux)
123+
if: runner.os == 'Linux'
124+
run: |
125+
sudo apt-get update
126+
sudo apt-get install -y libfuse2
127+
128+
# Verify disk space before build
129+
- name: Check Disk Space Before Build (macOS)
130+
if: runner.os == 'macOS'
131+
run: |
132+
echo "Disk space available before build:"
133+
df -h
134+
echo ""
135+
echo "Largest directories in home:"
136+
du -sh ~/* 2>/dev/null | sort -rh | head -10 || true
137+
57138
# Step for macOS builds with signing
58139
- name: Build Release Files (macOS with signing)
59140
if: runner.os == 'macOS'
@@ -82,6 +163,17 @@ jobs:
82163
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
83164
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
84165

166+
# Step for Linux builds
167+
- name: Build Release Files (Linux)
168+
if: runner.os == 'Linux'
169+
run: npm run build:linux
170+
env:
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
173+
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
174+
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
175+
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
176+
85177
- name: Upload Artifact
86178
uses: actions/upload-artifact@v6
87179
with:
@@ -97,7 +189,7 @@ jobs:
97189
steps:
98190
- name: Create directories
99191
run: |
100-
mkdir -p release/mac-x64 release/mac-arm64 release/win-x64
192+
mkdir -p release/mac-x64 release/mac-arm64 release/win-x64 release/linux-x64
101193
102194
# Download all artifacts with correct names
103195
- name: Download mac-x64 artifact
@@ -118,6 +210,12 @@ jobs:
118210
name: release-windows-latest-x64
119211
path: temp-win-x64
120212

213+
- name: Download linux-x64 artifact
214+
uses: actions/download-artifact@v7
215+
with:
216+
name: release-ubuntu-latest-x64
217+
path: temp-linux-x64
218+
121219
# Move files to final release directory, removing any nested release/ directory
122220
- name: Move files to clean folders
123221
shell: bash
@@ -143,6 +241,13 @@ jobs:
143241
mv temp-win-x64/* release/win-x64/ || true
144242
fi
145243
244+
# linux-x64
245+
if [ -d "temp-linux-x64/release" ]; then
246+
mv temp-linux-x64/release/* release/linux-x64/ || true
247+
else
248+
mv temp-linux-x64/* release/linux-x64/ || true
249+
fi
250+
146251
- name: Rename duplicate files
147252
run: |
148253
mv release/mac-x64/latest-mac.yml release/mac-x64/latest-x64-mac.yml || true
@@ -157,5 +262,6 @@ jobs:
157262
release/mac-x64/*
158263
release/mac-arm64/*
159264
release/win-x64/*
265+
release/linux-x64/*
160266
env:
161-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
267+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ __pycache__/
5959
resources/prebuilt/bin/
6060
resources/prebuilt/venv/
6161
resources/prebuilt/cache/
62+
63+
*storybook.log
64+
storybook-static

.storybook/main.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { StorybookConfig } from '@storybook/react-vite'
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
addons: ['@storybook/addon-docs', '@storybook/addon-a11y'],
6+
framework: '@storybook/react-vite',
7+
viteFinal: async (config) => {
8+
// Reuse project's vite config for path aliases
9+
return config
10+
},
11+
}
12+
13+
export default config

.storybook/preview.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import type { Preview } from '@storybook/react-vite'
2+
import React from 'react'
3+
import '@fontsource/inter/400.css'
4+
import '@fontsource/inter/500.css'
5+
import '@fontsource/inter/600.css'
6+
import '@fontsource/inter/700.css'
7+
import '@fontsource/inter/800.css'
8+
import '../src/style/index.css'
9+
import './storybook.css' // Storybook-specific overrides
10+
import { Toaster } from 'sonner'
11+
12+
// Apply theme immediately via script
13+
if (typeof document !== 'undefined') {
14+
document.documentElement.setAttribute('data-theme', 'light')
15+
document.documentElement.classList.add('root')
16+
}
17+
18+
const preview: Preview = {
19+
tags: ['autodocs'],
20+
parameters: {
21+
layout: 'centered',
22+
controls: {
23+
expanded: true,
24+
matchers: {
25+
color: /(background|color)$/i,
26+
date: /Date$/i,
27+
},
28+
},
29+
backgrounds: {
30+
default: 'light',
31+
values: [
32+
{ name: 'light', value: '#f5f5f5' },
33+
{ name: 'dark', value: '#1d1c1b' },
34+
],
35+
},
36+
},
37+
decorators: [
38+
(Story) => (
39+
<div className="root" data-theme="light" style={{ padding: '1rem' }}>
40+
<Story />
41+
<Toaster style={{ zIndex: '999999 !important', position: 'fixed' }} />
42+
</div>
43+
),
44+
],
45+
}
46+
47+
export default preview

.storybook/storybook.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Storybook-specific CSS overrides - currently empty as component handles styling */

0 commit comments

Comments
 (0)