LCOV - code coverage report
Current view: top level - src/platform/openOnCloud - localAgentPanelPort.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 50.0 % 4 2
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import { inject, ref } from 'vue'
       2              : import type { InjectionKey, Ref } from 'vue'
       3              : 
       4              : export interface LocalAgentPanelPort {
       5              :   enabled: Readonly<Ref<boolean>>
       6              :   isOpening: Readonly<Ref<boolean>>
       7              :   open(prompt: string, isStillWanted: () => boolean): Promise<boolean>
       8              : }
       9              : 
      10         2356 : export const LocalAgentPanelPortKey: InjectionKey<LocalAgentPanelPort> = Symbol(
      11              :   'localAgentPanelPort'
      12              : )
      13              : 
      14         2356 : const NO_AGENT: LocalAgentPanelPort = {
      15              :   enabled: ref(false),
      16              :   isOpening: ref(false),
      17              :   open: async () => false
      18              : }
      19              : 
      20            0 : export function useLocalAgentPanelPort(): LocalAgentPanelPort {
      21            0 :   return inject(LocalAgentPanelPortKey, NO_AGENT)
      22              : }
        

Generated by: LCOV version 2.0-1