mirror of
https://github.com/davidkaya/aryx.git
synced 2026-09-02 07:57:12 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb22197b51 |
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aryx",
|
"name": "aryx",
|
||||||
"version": "0.0.28",
|
"version": "0.0.27",
|
||||||
"description": "Orchestrator for Copilot-powered agent workflows across multiple projects.",
|
"description": "Orchestrator for Copilot-powered agent workflows across multiple projects.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "dist-electron/main/index.js",
|
"main": "dist-electron/main/index.js",
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"tailwindcss": "^4.2.2",
|
"tailwindcss": "^4.2.2",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-language-server": "^5.1.3",
|
"typescript-language-server": "^5.1.3",
|
||||||
"vite": "7.1.10",
|
"vite": "7.3.2",
|
||||||
"yaml": "^2.8.3"
|
"yaml": "^2.8.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+4
-14
@@ -16,12 +16,6 @@ import { createDefaultQuickPromptSettings } from '@shared/domain/tooling';
|
|||||||
|
|
||||||
const { app, BrowserWindow } = electron;
|
const { app, BrowserWindow } = electron;
|
||||||
|
|
||||||
// Enforce single instance — quit immediately if another instance already holds the lock.
|
|
||||||
const gotTheLock = app.requestSingleInstanceLock();
|
|
||||||
if (!gotTheLock) {
|
|
||||||
app.quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
let mainWindow: BrowserWindowType | undefined;
|
let mainWindow: BrowserWindowType | undefined;
|
||||||
let quickPromptWindow: BrowserWindowType | undefined;
|
let quickPromptWindow: BrowserWindowType | undefined;
|
||||||
let appService: AryxAppService | undefined;
|
let appService: AryxAppService | undefined;
|
||||||
@@ -69,9 +63,9 @@ async function bootstrap(): Promise<void> {
|
|||||||
applyTitleBarTheme(mainWindow, workspace.settings.theme);
|
applyTitleBarTheme(mainWindow, workspace.settings.theme);
|
||||||
|
|
||||||
systemTray = new SystemTray({
|
systemTray = new SystemTray({
|
||||||
onShowWindow: () => showAndFocusWindow(mainWindow!),
|
onShowWindow: showAndFocusWindow,
|
||||||
onCreateScratchpad: () => {
|
onCreateScratchpad: () => {
|
||||||
showAndFocusWindow(mainWindow!);
|
showAndFocusWindow();
|
||||||
mainWindow?.webContents.send('tray:create-scratchpad');
|
mainWindow?.webContents.send('tray:create-scratchpad');
|
||||||
},
|
},
|
||||||
onQuit: () => app.quit(),
|
onQuit: () => app.quit(),
|
||||||
@@ -115,10 +109,6 @@ async function bootstrap(): Promise<void> {
|
|||||||
autoUpdateService.start();
|
autoUpdateService.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.on('second-instance', () => {
|
|
||||||
showAndFocusWindow();
|
|
||||||
});
|
|
||||||
|
|
||||||
app.whenReady().then(bootstrap);
|
app.whenReady().then(bootstrap);
|
||||||
|
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
@@ -137,8 +127,8 @@ app.on('window-all-closed', () => {
|
|||||||
app.on('activate', async () => {
|
app.on('activate', async () => {
|
||||||
if (BrowserWindow.getAllWindows().length === 0) {
|
if (BrowserWindow.getAllWindows().length === 0) {
|
||||||
await bootstrap();
|
await bootstrap();
|
||||||
} else if (mainWindow && !mainWindow.isDestroyed()) {
|
} else {
|
||||||
showAndFocusWindow(mainWindow);
|
showAndFocusWindow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { join } from 'node:path';
|
|||||||
|
|
||||||
import type { WorkspaceState } from '@shared/domain/workspace';
|
import type { WorkspaceState } from '@shared/domain/workspace';
|
||||||
|
|
||||||
const { app, Menu, Tray, nativeImage } = electron;
|
const { app, Menu, Tray, nativeImage, BrowserWindow } = electron;
|
||||||
type TrayType = InstanceType<typeof Tray>;
|
type TrayType = InstanceType<typeof Tray>;
|
||||||
type NativeImageType = ReturnType<typeof nativeImage.createFromPath>;
|
type NativeImageType = ReturnType<typeof nativeImage.createFromPath>;
|
||||||
|
|
||||||
@@ -123,8 +123,10 @@ export function setupCloseToTray(
|
|||||||
/**
|
/**
|
||||||
* Show and focus the main window, restoring from tray if hidden.
|
* Show and focus the main window, restoring from tray if hidden.
|
||||||
*/
|
*/
|
||||||
export function showAndFocusWindow(mainWindow: Electron.BrowserWindow): void {
|
export function showAndFocusWindow(): void {
|
||||||
if (mainWindow.isDestroyed()) return;
|
const windows = BrowserWindow.getAllWindows();
|
||||||
|
const mainWindow = windows[0];
|
||||||
|
if (!mainWindow) return;
|
||||||
|
|
||||||
// On macOS, show the dock icon again
|
// On macOS, show the dock icon again
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { join, resolve } from 'node:path';
|
|
||||||
import { describe, expect, test } from 'bun:test';
|
import { describe, expect, test } from 'bun:test';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -9,9 +8,6 @@ import {
|
|||||||
type ReleaseDependencies,
|
type ReleaseDependencies,
|
||||||
} from '../../scripts/release';
|
} from '../../scripts/release';
|
||||||
|
|
||||||
const testRepositoryRoot = resolve('/test-workspace/aryx');
|
|
||||||
const testPackageJsonPath = join(testRepositoryRoot, 'package.json');
|
|
||||||
|
|
||||||
function gitSuccess(stdout = '', stderr = ''): GitCommandResult {
|
function gitSuccess(stdout = '', stderr = ''): GitCommandResult {
|
||||||
return {
|
return {
|
||||||
exitCode: 0,
|
exitCode: 0,
|
||||||
@@ -113,8 +109,8 @@ describe('release workflow', () => {
|
|||||||
|
|
||||||
const result = await runReleaseWorkflow(
|
const result = await runReleaseWorkflow(
|
||||||
{
|
{
|
||||||
repositoryRoot: testRepositoryRoot,
|
repositoryRoot: 'C:\\workspace\\personal\\projects\\aryx',
|
||||||
packageJsonPath: testPackageJsonPath,
|
packageJsonPath: 'C:\\workspace\\personal\\projects\\aryx\\package.json',
|
||||||
},
|
},
|
||||||
dependencies,
|
dependencies,
|
||||||
);
|
);
|
||||||
@@ -152,8 +148,8 @@ describe('release workflow', () => {
|
|||||||
await expect(
|
await expect(
|
||||||
runReleaseWorkflow(
|
runReleaseWorkflow(
|
||||||
{
|
{
|
||||||
repositoryRoot: testRepositoryRoot,
|
repositoryRoot: 'C:\\workspace\\personal\\projects\\aryx',
|
||||||
packageJsonPath: testPackageJsonPath,
|
packageJsonPath: 'C:\\workspace\\personal\\projects\\aryx\\package.json',
|
||||||
},
|
},
|
||||||
dependencies,
|
dependencies,
|
||||||
),
|
),
|
||||||
@@ -177,8 +173,8 @@ describe('release workflow', () => {
|
|||||||
await expect(
|
await expect(
|
||||||
runReleaseWorkflow(
|
runReleaseWorkflow(
|
||||||
{
|
{
|
||||||
repositoryRoot: testRepositoryRoot,
|
repositoryRoot: 'C:\\workspace\\personal\\projects\\aryx',
|
||||||
packageJsonPath: testPackageJsonPath,
|
packageJsonPath: 'C:\\workspace\\personal\\projects\\aryx\\package.json',
|
||||||
bumpArg: 'minor',
|
bumpArg: 'minor',
|
||||||
},
|
},
|
||||||
dependencies,
|
dependencies,
|
||||||
@@ -208,8 +204,8 @@ describe('release workflow', () => {
|
|||||||
await expect(
|
await expect(
|
||||||
runReleaseWorkflow(
|
runReleaseWorkflow(
|
||||||
{
|
{
|
||||||
repositoryRoot: testRepositoryRoot,
|
repositoryRoot: 'C:\\workspace\\personal\\projects\\aryx',
|
||||||
packageJsonPath: testPackageJsonPath,
|
packageJsonPath: 'C:\\workspace\\personal\\projects\\aryx\\package.json',
|
||||||
},
|
},
|
||||||
dependencies,
|
dependencies,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user