Files
geo/apps/desktop-client/src/renderer/App.vue
T
root 4142c53fa6 feat(monitoring): dispatch monitoring tasks to desktop via AMQP outbox
Replace SSE /desktop/events with priority AMQP dispatch for monitoring
runs, and add phase1/phase2 infrastructure so desktop workers can lease,
resume, report, skip, and cancel monitoring tasks over the existing
dispatch WebSocket.

- Add monitoring collect outbox worker and phase2 desktop task fields
- Add /desktop/monitoring/tasks/{lease,resume,result,skip,cancel} routes
- Introduce execution-devtools and network-observer on desktop runtime
- Refactor runtime-controller, LoginView, and doubao adapter for the new flow
- Add channelName column to tracking views

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 00:24:21 +08:00

39 lines
1.2 KiB
Vue

<script setup lang="ts">
import { defineAsyncComponent, onMounted, watch } from "vue";
import { useDesktopSession } from "./composables/useDesktopSession";
const DesktopShell = defineAsyncComponent(() => import("./components/DesktopShell.vue"));
const LoginView = defineAsyncComponent(() => import("./views/LoginView.vue"));
const { isAuthenticated, syncRuntimeSession } = useDesktopSession();
interface WindowModeBridge {
setWindowMode?: (mode: "login" | "main") => Promise<unknown>;
}
function getModeBridge(): WindowModeBridge | undefined {
return (globalThis as unknown as {
desktopBridge?: { app?: WindowModeBridge };
}).desktopBridge?.app;
}
function syncWindowMode(authenticated: boolean): void {
void getModeBridge()?.setWindowMode?.(authenticated ? "main" : "login");
}
// Fire immediately during setup so the main process can size + reveal the
// window before the user sees any "wrong-sized" frame.
syncWindowMode(isAuthenticated.value);
watch(isAuthenticated, (next) => syncWindowMode(next));
onMounted(() => {
void syncRuntimeSession();
syncWindowMode(isAuthenticated.value);
});
</script>
<template>
<DesktopShell v-if="isAuthenticated" />
<LoginView v-else />
</template>