Skip to content

The agent that grows with you

fix(desktop): declare @novnc/novnc types in the tracked vite-env.d.ts

Teknium8250f7405103
diff --git a/apps/desktop/src/vite-env.d.ts b/apps/desktop/src/vite-env.d.ts
index 11f02fe2a00..ad5fecb7701 100644
--- a/apps/desktop/src/vite-env.d.ts
+++ b/apps/desktop/src/vite-env.d.ts
@@ -1 +1,23 @@
/// <reference types="vite/client" />
+
+// @novnc/novnc ships no typings (its export is core/rfb.js); the surface the Bot Screen pane uses.
+// Declared here because `apps/desktop/src/**/*.d.ts` is gitignored except for the allowlisted files,
+// and an ambient `declare module` only works in a script-scoped (import-free) declaration file.
+declare module '@novnc/novnc' {
+ export default class RFB {
+ constructor(target: HTMLElement, urlOrChannel: string | WebSocket | RTCDataChannel, options?: Record<string, unknown>)
+ viewOnly: boolean
+ scaleViewport: boolean
+ resizeSession: boolean
+ focusOnClick: boolean
+ background: string
+ qualityLevel: number
+ compressionLevel: number
+ addEventListener(type: string, listener: (event: CustomEvent) => void): void
+ removeEventListener(type: string, listener: (event: CustomEvent) => void): void
+ disconnect(): void
+ focus(): void
+ blur(): void
+ clipboardPasteFrom(text: string): void
+ }
+}