import { Container } from "@/models/Container"; type LogContext = { streamConfig: { stdout: boolean; stderr: boolean }; containers: Ref; }; export const loggingContextKey = Symbol("loggingContext") as InjectionKey; export const provideLoggingContext = (containers: Ref) => { provide(loggingContextKey, { streamConfig: reactive({ stdout: true, stderr: true }), containers, }); }; export const useLoggingContext = () => { const context = inject(loggingContextKey); if (!context) { throw new Error("No logging context provided"); } return context; };