Merge branch 'pickle-com:main' into main
This commit is contained in:
commit
ccf19d5d1e
34
.github/workflows/build.yml
vendored
Normal file
34
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Build & Verify
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ] # Runs on every push to main branch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# Currently runs on macOS only, can add windows-latest later
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: 🚚 Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: ⚙️ Setup Node.js environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.x' # Node.js version compatible with project
|
||||
cache: 'npm' # npm dependency caching for speed improvement
|
||||
|
||||
- name: 📦 Install root dependencies
|
||||
run: npm install
|
||||
|
||||
- name: 🌐 Install and build web (Renderer) part
|
||||
# Move to pickleglass_web directory and run commands
|
||||
working-directory: ./pickleglass_web
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: 🖥️ Build Electron app
|
||||
# Run Electron build script from root directory
|
||||
run: npm run build
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -102,7 +102,6 @@ pickleglass_web/venv/
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
package-lock.json
|
||||
|
||||
# Database
|
||||
data/*.db
|
||||
|
@ -43,7 +43,6 @@ win:
|
||||
arch: x64
|
||||
- target: portable
|
||||
arch: x64
|
||||
publisherName: Pickle Team
|
||||
requestedExecutionLevel: asInvoker
|
||||
|
||||
# NSIS installer configuration for Windows
|
||||
|
12077
package-lock.json
generated
Normal file
12077
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "pickle-glass",
|
||||
"productName": "Glass",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "Cl*ely for Free",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
|
6976
pickleglass_web/package-lock.json
generated
Normal file
6976
pickleglass_web/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -857,12 +857,7 @@ export class AskView extends LitElement {
|
||||
ipcRenderer.on('window-blur', this.handleWindowBlur);
|
||||
ipcRenderer.on('window-did-show', () => {
|
||||
if (!this.currentResponse && !this.isLoading && !this.isStreaming) {
|
||||
setTimeout(() => {
|
||||
const textInput = this.shadowRoot?.getElementById('textInput');
|
||||
if (textInput) {
|
||||
textInput.focus();
|
||||
}
|
||||
}, 100);
|
||||
this.focusTextInput();
|
||||
}
|
||||
});
|
||||
|
||||
@ -1291,6 +1286,19 @@ export class AskView extends LitElement {
|
||||
if (changedProperties.has('showTextInput') || changedProperties.has('isLoading')) {
|
||||
this.adjustWindowHeightThrottled();
|
||||
}
|
||||
|
||||
if (changedProperties.has('showTextInput') && this.showTextInput) {
|
||||
this.focusTextInput();
|
||||
}
|
||||
}
|
||||
|
||||
focusTextInput(){
|
||||
requestAnimationFrame(() => {
|
||||
const textInput = this.shadowRoot?.getElementById('textInput');
|
||||
if (textInput){
|
||||
textInput.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
|
18
src/index.js
18
src/index.js
@ -165,8 +165,8 @@ app.whenReady().then(async () => {
|
||||
// Initialize core services
|
||||
initializeFirebase();
|
||||
|
||||
databaseInitializer.initialize()
|
||||
.then(() => {
|
||||
try {
|
||||
await databaseInitializer.initialize();
|
||||
console.log('>>> [index.js] Database initialized successfully');
|
||||
|
||||
// Clean up zombie sessions from previous runs first
|
||||
@ -177,16 +177,22 @@ app.whenReady().then(async () => {
|
||||
askService.initialize();
|
||||
settingsService.initialize();
|
||||
setupGeneralIpcHandlers();
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('>>> [index.js] Database initialization failed - some features may not work', err);
|
||||
});
|
||||
|
||||
// Start web server and create windows ONLY after all initializations are successful
|
||||
WEB_PORT = await startWebStack();
|
||||
console.log('Web front-end listening on', WEB_PORT);
|
||||
|
||||
createWindows();
|
||||
|
||||
} catch (err) {
|
||||
console.error('>>> [index.js] Database initialization failed - some features may not work', err);
|
||||
// Optionally, show an error dialog to the user
|
||||
dialog.showErrorBox(
|
||||
'Application Error',
|
||||
'A critical error occurred during startup. Some features might be disabled. Please restart the application.'
|
||||
);
|
||||
}
|
||||
|
||||
initAutoUpdater();
|
||||
|
||||
// Process any pending deep link after everything is initialized
|
||||
|
Loading…
x
Reference in New Issue
Block a user