4e58dd42cc
This commit introduces a new utility function, `knowledgeSpansPayloadHasTrace`, to determine if the knowledge spans data contains a valid trace. Key changes include: 1. Updated the `KnowledgeBase` component to utilize the new trace availability checks, improving the logic for displaying trace-related UI elements. 2. Enhanced the `fetchSpans` function in the `knowledge-processing-timeline` component to emit trace availability based on the new utility. 3. Implemented caching for trace availability to optimize performance and reduce unnecessary API calls. These changes aim to improve user experience by providing accurate trace information and enhancing the overall responsiveness of the UI.