LCOV - code coverage report
Current view: top level - src/platform/workflowErrors - askAgentPort.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 4 4
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              : import type { AgentErrorContext } from '@/platform/workflowErrors/agentErrorContext'
       5              : 
       6              : export interface AskAgentPort {
       7              :   canAskAgent: Readonly<Ref<boolean>>
       8              :   askAgentAboutIssues(context: AgentErrorContext): Promise<void>
       9              : }
      10              : 
      11         2355 : export const AskAgentPortKey: InjectionKey<AskAgentPort> =
      12              :   Symbol('askAgentPort')
      13              : 
      14         2355 : const NO_AGENT: AskAgentPort = {
      15              :   canAskAgent: ref(false),
      16              :   askAgentAboutIssues: () => Promise.resolve()
      17              : }
      18              : 
      19         2187 : export function useAskAgentPort(): AskAgentPort {
      20         2187 :   return inject(AskAgentPortKey, NO_AGENT)
      21              : }
        

Generated by: LCOV version 2.0-1