@amd-gaia/agent-ui 0.25.4 → 0.26.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/gaia-ui.cjs +19 -16
- package/dist/assets/AdvancedSettings-w9D1AXlP.js +1 -0
- package/dist/assets/ConnectorsPane-B1lwOGL5.css +1 -0
- package/dist/assets/ConnectorsPane-BxnbIY7k.js +1 -0
- package/dist/assets/{DocumentLibrary-2IMvlsjP.js → DocumentLibrary-BwCg6OBt.js} +2 -2
- package/dist/assets/FileBrowser-ZQ8nEd3a.js +4 -0
- package/dist/assets/MemoryDashboard-DDIIbL38.js +1 -0
- package/dist/assets/MobileAccessModal-DgmEaSve.js +2 -0
- package/dist/assets/{ScheduleManager-D_KcT6nO.js → ScheduleManager-5ISmwd1h.js} +1 -1
- package/dist/assets/api-B8v2Xp8S.js +4 -0
- package/dist/assets/index--tVNC0Jc.js +83 -0
- package/dist/assets/index-r-CFg5BV.css +1 -0
- package/dist/assets/useT-ByY7OhOj.js +3 -0
- package/dist/assets/{zap-FkXztfRB.js → zap-D6QQWCNv.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/sw.js +1 -1
- package/main.cjs +29 -4
- package/package.json +2 -1
- package/services/auto-updater.cjs +10 -0
- package/services/backend-installer.cjs +230 -512
- package/services/quit-guard.cjs +25 -6
- package/services/tray-host.cjs +1 -1
- package/services/tray-manager.cjs +32 -5
- package/dist/assets/AdvancedSettings-Dkjf4LIp.js +0 -1
- package/dist/assets/ConnectorsPane-CIV89VVI.js +0 -1
- package/dist/assets/ConnectorsPane-CzLYXGMl.css +0 -1
- package/dist/assets/FileBrowser-DMnjs5do.js +0 -4
- package/dist/assets/MemoryDashboard-BAqXtg9o.js +0 -1
- package/dist/assets/MobileAccessModal-CrtIKCP3.js +0 -2
- package/dist/assets/api-D5mTAXjB.js +0 -4
- package/dist/assets/index-B7tI0eKR.css +0 -1
- package/dist/assets/index-CsgZhHsw.js +0 -80
- package/dist/assets/useT-CtECS-vp.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as e}from"./useT-
|
|
1
|
+
import{q as e}from"./useT-ByY7OhOj.js";var t={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};t.node;var n=e(t),r={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};r.node;var i=e(r);export{n,i as t};
|
package/dist/index.html
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
13
13
|
<meta name="apple-mobile-web-app-title" content="GAIA" />
|
|
14
14
|
<title>GAIA Agent UI</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index
|
|
15
|
+
<script type="module" crossorigin src="./assets/index--tVNC0Jc.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-XKyaHtl9.js">
|
|
17
|
-
<link rel="modulepreload" crossorigin href="./assets/useT-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="./assets/api-
|
|
19
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
17
|
+
<link rel="modulepreload" crossorigin href="./assets/useT-ByY7OhOj.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="./assets/api-B8v2Xp8S.js">
|
|
19
|
+
<link rel="stylesheet" crossorigin href="./assets/index-r-CFg5BV.css">
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
|
22
22
|
<div id="root"></div>
|
package/dist/sw.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// never sees a stale UI or stale data.
|
|
10
10
|
|
|
11
11
|
const CACHE_PREFIX = 'gaia-assets-';
|
|
12
|
-
const CACHE_NAME = CACHE_PREFIX + '0.
|
|
12
|
+
const CACHE_NAME = CACHE_PREFIX + '0.26.0rc10-00e9b859184a5e82';
|
|
13
13
|
const ASSETS_PATH = new URL('assets/', self.registration.scope).pathname;
|
|
14
14
|
|
|
15
15
|
self.addEventListener('install', () => {
|
package/main.cjs
CHANGED
|
@@ -403,6 +403,9 @@ async function startBackend() {
|
|
|
403
403
|
PYTHONUNBUFFERED: "1",
|
|
404
404
|
...(app.isPackaged && {
|
|
405
405
|
GAIA_BUNDLED_LEMONADE_DIR: path.join(process.resourcesPath, "vendor", "lemonade"),
|
|
406
|
+
// The daemon exits once this is deleted: a Trashed macOS app or a
|
|
407
|
+
// deleted AppImage runs no uninstall step. An AppImage's exe is a mount.
|
|
408
|
+
GAIA_APP_PATH: process.env.APPIMAGE || app.getPath("exe"),
|
|
406
409
|
}),
|
|
407
410
|
},
|
|
408
411
|
detached: false,
|
|
@@ -733,11 +736,10 @@ function createWindow() {
|
|
|
733
736
|
platform: process.platform,
|
|
734
737
|
reportNoticeError: (err) => {
|
|
735
738
|
console.error("[main] First-close notice failed:", err.message);
|
|
736
|
-
const
|
|
739
|
+
const { message, detail } = trayManager.closeNoticeText();
|
|
737
740
|
dialog.showErrorBox(
|
|
738
741
|
"GAIA is still running",
|
|
739
|
-
|
|
740
|
-
`(The usual notice failed: ${err.message})`
|
|
742
|
+
`${message} ${detail}\n\n(The usual notice failed: ${err.message})`
|
|
741
743
|
);
|
|
742
744
|
},
|
|
743
745
|
});
|
|
@@ -1396,14 +1398,20 @@ function workCanBeLost() {
|
|
|
1396
1398
|
return Boolean(trayManager && backendProcess);
|
|
1397
1399
|
}
|
|
1398
1400
|
|
|
1399
|
-
/** Ask about losing work in front of the window, even when it was hidden
|
|
1401
|
+
/** Ask about losing work in front of the window, even when it was hidden or minimized. */
|
|
1400
1402
|
function askAboutRunningWork(action) {
|
|
1401
1403
|
return confirmQuit({
|
|
1402
1404
|
action,
|
|
1403
1405
|
getWork: () => fetchWorkInProgress(backendPort),
|
|
1404
1406
|
showMessageBox: (opts) => {
|
|
1405
1407
|
if (!mainWindow || mainWindow.isDestroyed()) return dialog.showMessageBox(opts);
|
|
1408
|
+
const wasMinimized = mainWindow.isMinimized();
|
|
1409
|
+
if (wasMinimized) mainWindow.restore();
|
|
1406
1410
|
if (!mainWindow.isVisible()) mainWindow.show();
|
|
1411
|
+
// Wayland can't un-minimize a window, and a modal would stay minimized with it.
|
|
1412
|
+
if (process.platform === "linux" && wasMinimized && !mainWindow.isFocused()) {
|
|
1413
|
+
return dialog.showMessageBox(opts);
|
|
1414
|
+
}
|
|
1407
1415
|
return dialog.showMessageBox(mainWindow, opts);
|
|
1408
1416
|
},
|
|
1409
1417
|
});
|
|
@@ -1452,6 +1460,7 @@ async function cleanup() {
|
|
|
1452
1460
|
shutdownStarted = true;
|
|
1453
1461
|
backendSupervisor.stop();
|
|
1454
1462
|
const installStopped = engineInstall ? engineInstall.stop() : null;
|
|
1463
|
+
const updating = app.isPackaged && autoUpdater.installsOnQuit();
|
|
1455
1464
|
|
|
1456
1465
|
// Phase F: tear down auto-updater timers and IPC handlers.
|
|
1457
1466
|
try {
|
|
@@ -1477,6 +1486,7 @@ async function cleanup() {
|
|
|
1477
1486
|
// The install, the agents and the backend stop side by side: each waits out
|
|
1478
1487
|
// its own grace period, and in series they could overrun the quit's time limit.
|
|
1479
1488
|
await Promise.all([installStopped, stopAgentsForQuit(), stopBackendForQuit()]);
|
|
1489
|
+
if (updating) await stopDaemonForUpdate();
|
|
1480
1490
|
|
|
1481
1491
|
// Destroy tray icon
|
|
1482
1492
|
if (trayManager) {
|
|
@@ -1485,6 +1495,21 @@ async function cleanup() {
|
|
|
1485
1495
|
}
|
|
1486
1496
|
}
|
|
1487
1497
|
|
|
1498
|
+
/**
|
|
1499
|
+
* The daemon runs from the app's own files, which the update is about to
|
|
1500
|
+
* replace, and macOS has no installer step that stops it first.
|
|
1501
|
+
*/
|
|
1502
|
+
async function stopDaemonForUpdate() {
|
|
1503
|
+
const gaia = backendInstaller.findGaiaBin();
|
|
1504
|
+
if (!gaia) return;
|
|
1505
|
+
console.log("Stopping the GAIA daemon before the update replaces its files...");
|
|
1506
|
+
try {
|
|
1507
|
+
await backendInstaller.stopRunningDaemon({ gaiaBin: gaia, timeoutMs: 30000 });
|
|
1508
|
+
} catch (err) {
|
|
1509
|
+
console.error(`[main] Couldn't stop the GAIA daemon before the update: ${err.message}`);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1488
1513
|
async function stopAgentsForQuit() {
|
|
1489
1514
|
if (!agentProcessManager) return;
|
|
1490
1515
|
console.log("Stopping all managed agents...");
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amd-gaia/agent-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0-rc.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"productName": "GAIA Agent UI",
|
|
6
|
+
"desktopName": "gaia-desktop.desktop",
|
|
6
7
|
"description": "Chat with the GAIA agent - local and private by default on AMD Ryzen AI, cloud models when you choose them",
|
|
7
8
|
"author": "AMD AI Group",
|
|
8
9
|
"license": "MIT",
|
|
@@ -363,6 +363,8 @@ let downloadEpoch = 0;
|
|
|
363
363
|
const prefetching = new Map();
|
|
364
364
|
// The user asked for this download, so it may install on quit with auto-update off.
|
|
365
365
|
let installRequested = false;
|
|
366
|
+
// The user chose to restart into the update: the quit runs its installer.
|
|
367
|
+
let installingNow = false;
|
|
366
368
|
// The file was unreadable at launch, so a pin it holds was never loaded.
|
|
367
369
|
let pinUnknown = false;
|
|
368
370
|
let scheduledTimeout = null;
|
|
@@ -1434,6 +1436,7 @@ async function restartToInstall() {
|
|
|
1434
1436
|
}
|
|
1435
1437
|
log("info", "User chose to restart — calling quitAndInstall");
|
|
1436
1438
|
_recordInstallAttempt();
|
|
1439
|
+
installingNow = true;
|
|
1437
1440
|
// Silent: the installer wizard would otherwise wait for clicks. Force-run
|
|
1438
1441
|
// brings the app straight back.
|
|
1439
1442
|
autoUpdaterRef.quitAndInstall(!wizardNextInstall, true);
|
|
@@ -1883,6 +1886,12 @@ function _onBeforeQuit(event) {
|
|
|
1883
1886
|
_recordInstallAttempt();
|
|
1884
1887
|
}
|
|
1885
1888
|
|
|
1889
|
+
/** Whether this quit hands over to an update's installer, which replaces the app's files. */
|
|
1890
|
+
function installsOnQuit() {
|
|
1891
|
+
if (!autoUpdaterRef || state.status !== STATES.DOWNLOADED) return false;
|
|
1892
|
+
return installingNow || Boolean(autoUpdaterRef.autoInstallOnAppQuit);
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1886
1895
|
/** Tear down timers and IPC handlers. Safe to call multiple times. */
|
|
1887
1896
|
function destroy() {
|
|
1888
1897
|
if (initialCheckTimeout) {
|
|
@@ -1917,6 +1926,7 @@ module.exports = {
|
|
|
1917
1926
|
setIncludePrereleases,
|
|
1918
1927
|
downloadUpdate,
|
|
1919
1928
|
restartToInstall,
|
|
1929
|
+
installsOnQuit,
|
|
1920
1930
|
STATES,
|
|
1921
1931
|
// For tests: init() runs it on a timer.
|
|
1922
1932
|
_seedInstalledBlockmap,
|