1import * as _ from 'lodash-es' 7// Skip streaming if in programmatic test context, opencode, multi-deploy sequence, or running under ptnode (already logging to file) 8export const shouldSkipStreamLogs = () => quietModeCtx.getStore()?.quiet || isOpenCode || multiDeployCtx.getStore()?.skipStreamLogs || process.env.PTNODE_LOG_PATH 10type WatchFlogsProps = { 16export const watchFlogs = async (props1?: WatchFlogsProps) => { 17 const {doWatch=true, ...props} = props1 || {} 18 const {name, action, cluster_name} = _.merge(getKlusterCtx(), props) as {name: string, action: string, cluster_name: string} 20 if (!_.includes(['logs', 'apply'], action)) return 22 if (shouldSkipStreamLogs()) return