mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-20 06:31:02 +08:00
Feat: Added support for session graph and session essence templates. (#16851)
### Summary Feat: Added support for session graph and session essence templates.
This commit is contained in:
@@ -59,6 +59,16 @@ function ArtifactForceGraph<TNodeValue = IArtifactGraphEntity>({
|
||||
[onNodeClick, mapNodeToValue],
|
||||
);
|
||||
|
||||
const getLinkColor = useCallback(() => {
|
||||
if (typeof window === 'undefined' || !containerRef.current) {
|
||||
return '#b2b5b7';
|
||||
}
|
||||
return window
|
||||
.getComputedStyle(containerRef.current)
|
||||
.getPropertyValue('--text-disabled')
|
||||
.trim();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={containerRef}
|
||||
@@ -77,6 +87,7 @@ function ArtifactForceGraph<TNodeValue = IArtifactGraphEntity>({
|
||||
onNodeClick={handleNodeClick}
|
||||
nodeCanvasObject={renderNodeLabel}
|
||||
nodeCanvasObjectMode={() => 'after'}
|
||||
linkColor={getLinkColor}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user