"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(t){return typeof t=="string"?t:!t||!Array.isArray(t)?"":t.filter(r=>r.type==="text").map(r=>r.text).join(" ")}function n(t){return t.type==="ai"}function a(t){return n(t)?t.tool_calls&&t.tool_calls.length>0?!0:Array.isArray(t.content)?t.content.some(o=>typeof o=="object"&&o!==null&&"type"in o&&o.type==="tool_use"):!1:!1}function f(t){return t.type==="tool"}function u(t){const o=new Date,r=new Date(t),s=o.getTime()-r.getTime(),e=Math.floor(s/(1e3*60*60*24));if(e===0)return"Today";if(e===1)return"Yesterday";if(e<7)return`${e} day${e>1?"s":""} ago`;if(e<30){const i=Math.floor(e/7);return`${i} week${i>1?"s":""} ago`}else{const i=Math.floor(e/30);return`${i} month${i>1?"s":""} ago`}}exports.formatRelativeTime=u;exports.getContentString=l;exports.isAIMessage=n;exports.isAiWithToolCalls=a;exports.isToolMessage=f;
//# sourceMappingURL=utils.cjs.js.map
