mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
fix(panel): auto-provision Desktop shortcuts and add out-of-job 1-click host relaunch for 2.33.0+
- Add cross-platform desktop launcher manager (backend/desktop-launcher-config.mjs): automatically appends --remote-debugging-port=0 to user Desktop (including OneDrive), Start Menu, Taskbar pinned, and Startup Antigravity.lnk shortcuts plus existing HKCU Run entries on Windows and XDG .desktop launchers on Linux, with clean rollback when switching back to Sidebar Only mode - Remove ineffective Desktop argv.json provisioning (Electron Desktop 2.33.0 does not read argv.json) while retaining ~/.antigravity-ide/argv.json for Antigravity IDE - Add POST /api/bridge/relaunch (with hot-reload POST /api/settings fallback) using Shell.Application (-Sta + UTF-8 BOM .ps1) on Windows to break out of the host Job Object, exit tray instances, clean up stale DevToolsActivePort files, sanitize host environment variables, and relaunch with --remote-debugging-port=0 (plus open -a / nohup support on macOS and Linux, and live running-process path discovery across drives) - Surface dismissible BridgeStatusNotice banner directly at the top of App.js alongside Settings tabs so users can activate topbar/composer mounting in one click Closes #26
This commit is contained in:
@@ -6,9 +6,15 @@
|
||||
|
||||
import { defineComponent } from './core/component.js';
|
||||
import { h, patchAttr } from './core/domPatch.js';
|
||||
import { isWindowOverlayMode } from './core/httpClient.js';
|
||||
import { i18nStore } from './i18n/index.js';
|
||||
import { resolveScopedConversation, telemetryStore } from './store/telemetryStore.js';
|
||||
import {
|
||||
normalizeClientWindowMountMode,
|
||||
resolveScopedConversation,
|
||||
telemetryStore,
|
||||
} from './store/telemetryStore.js';
|
||||
import { getViewTabs, uiStore } from './store/uiStore.js';
|
||||
import { BridgeStatusNotice } from './components/settings/BridgeStatusNotice.js';
|
||||
import { TopSessionHeader } from './components/layout/TopSessionHeader.js';
|
||||
import { TopLongPillNav } from './components/ui/TopLongPillNav.js';
|
||||
import { LiveOverviewView } from './views/LiveOverviewView.js';
|
||||
@@ -33,6 +39,30 @@ export const App = defineComponent({
|
||||
const stepsView = StepsDetailView();
|
||||
const settingsView = SettingsView();
|
||||
|
||||
const globalBridgeNotice = BridgeStatusNotice({
|
||||
dismissible: true,
|
||||
});
|
||||
const bannerSlotEl = h('div', { className: 'app-bridge-banner-slot', hidden: true }, [
|
||||
globalBridgeNotice.el,
|
||||
]);
|
||||
|
||||
function syncGlobalBridgeBanner() {
|
||||
const activeView = uiStore.getState().activeView;
|
||||
const telemetry = telemetryStore.getState().telemetry;
|
||||
const settings = telemetry?.settings;
|
||||
const mountMode = settings
|
||||
? normalizeClientWindowMountMode(settings.windowMountMode, settings.enableWindowOverlay)
|
||||
: 'sidebar';
|
||||
const shouldOfferGlobal =
|
||||
!isWindowOverlayMode() && activeView !== 'settings' && mountMode !== 'sidebar';
|
||||
globalBridgeNotice.refs.update({
|
||||
visible: shouldOfferGlobal,
|
||||
windowBridge: telemetry?.windowBridge || null,
|
||||
hostPlatform: telemetry?.hostPlatform || 'win32',
|
||||
});
|
||||
patchAttr(bannerSlotEl, 'hidden', globalBridgeNotice.el.hasAttribute('hidden'));
|
||||
}
|
||||
|
||||
const viewMap = {
|
||||
overview: overviewView.el,
|
||||
consumption: consumptionView.el,
|
||||
@@ -49,6 +79,7 @@ export const App = defineComponent({
|
||||
|
||||
const shellEl = h('main', { className: 'app-shell' }, [
|
||||
h('div', { className: 'top-deck' }, [sessionHeader.el, topPillNav.el]),
|
||||
bannerSlotEl,
|
||||
stageEl,
|
||||
]);
|
||||
|
||||
@@ -88,6 +119,7 @@ export const App = defineComponent({
|
||||
settingsView.refs?.viewScrollbar?.refresh();
|
||||
}
|
||||
syncStepsBadge();
|
||||
syncGlobalBridgeBanner();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -96,8 +128,15 @@ export const App = defineComponent({
|
||||
stepCount: st.telemetry?.activeConversation?.stepCount ?? 0,
|
||||
totalStepsAllAgents: st.telemetry?.activeConversation?.totalStepsAllAgents ?? 0,
|
||||
subagentCount: st.telemetry?.activeConversation?.subagentCount ?? 0,
|
||||
windowMountMode: st.telemetry?.settings?.windowMountMode,
|
||||
enableWindowOverlay: st.telemetry?.settings?.enableWindowOverlay,
|
||||
windowBridge: st.telemetry?.windowBridge,
|
||||
hostPlatform: st.telemetry?.hostPlatform,
|
||||
}),
|
||||
() => syncStepsBadge()
|
||||
() => {
|
||||
syncStepsBadge();
|
||||
syncGlobalBridgeBanner();
|
||||
}
|
||||
);
|
||||
|
||||
const unsubScopeBadge = uiStore.subscribe(
|
||||
@@ -107,7 +146,11 @@ export const App = defineComponent({
|
||||
|
||||
const unsubI18n = i18nStore.subscribe(
|
||||
(st) => st.locale,
|
||||
() => syncStepsBadge()
|
||||
() => {
|
||||
syncStepsBadge();
|
||||
globalBridgeNotice.refs.refreshLabels();
|
||||
patchAttr(bannerSlotEl, 'hidden', globalBridgeNotice.el.hasAttribute('hidden'));
|
||||
}
|
||||
);
|
||||
|
||||
onCleanup(() => {
|
||||
@@ -115,6 +158,7 @@ export const App = defineComponent({
|
||||
unsubStepCount();
|
||||
unsubScopeBadge();
|
||||
unsubI18n();
|
||||
globalBridgeNotice.destroy();
|
||||
sessionHeader.destroy();
|
||||
topPillNav.destroy();
|
||||
overviewView.destroy();
|
||||
@@ -128,6 +172,7 @@ export const App = defineComponent({
|
||||
refs: {
|
||||
sessionHeader,
|
||||
topPillNav,
|
||||
globalBridgeNotice,
|
||||
overviewView,
|
||||
consumptionView,
|
||||
stepsView,
|
||||
|
||||
Reference in New Issue
Block a user