Spaces:
Paused
Paused
Savestate: Final tweaks for Deep Research Canvas (async init, truncations)
Browse files- index.html +1 -1
- src/ai/research-agent.js +4 -2
- src/views/chat/chat-view.js +1 -1
index.html
CHANGED
|
@@ -64,7 +64,7 @@
|
|
| 64 |
</head>
|
| 65 |
<body class="dark-theme in-chat-view" data-bg-style="fluid-dark">
|
| 66 |
|
| 67 |
-
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.
|
| 68 |
|
| 69 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 70 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
|
|
|
| 64 |
</head>
|
| 65 |
<body class="dark-theme in-chat-view" data-bg-style="fluid-dark">
|
| 66 |
|
| 67 |
+
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.162</div>
|
| 68 |
|
| 69 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 70 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
src/ai/research-agent.js
CHANGED
|
@@ -123,7 +123,8 @@ export class ResearchAgent {
|
|
| 123 |
let newHits = [];
|
| 124 |
for (let i = 0; i < queries.length; i++) {
|
| 125 |
try {
|
| 126 |
-
|
|
|
|
| 127 |
onGraphEvent({ type: 'edge', from: 'root', to: `q_${iteration}_${i}` });
|
| 128 |
|
| 129 |
const hits = await this.searchDDG(queries[i], 3);
|
|
@@ -154,7 +155,8 @@ export class ResearchAgent {
|
|
| 154 |
newDocs.forEach(doc => {
|
| 155 |
const srcInfo = uniqueSourcesMap.get(doc.url);
|
| 156 |
if (srcInfo && srcInfo.queryId) {
|
| 157 |
-
|
|
|
|
| 158 |
onGraphEvent({ type: 'edge', from: srcInfo.queryId, to: `s_${doc.url}` });
|
| 159 |
}
|
| 160 |
});
|
|
|
|
| 123 |
let newHits = [];
|
| 124 |
for (let i = 0; i < queries.length; i++) {
|
| 125 |
try {
|
| 126 |
+
const queryLabel = queries[i].length > 40 ? queries[i].substring(0, 40) + '...' : queries[i];
|
| 127 |
+
onGraphEvent({ type: 'node', id: `q_${iteration}_${i}`, label: `Query: ${queryLabel}`, group: 'query' });
|
| 128 |
onGraphEvent({ type: 'edge', from: 'root', to: `q_${iteration}_${i}` });
|
| 129 |
|
| 130 |
const hits = await this.searchDDG(queries[i], 3);
|
|
|
|
| 155 |
newDocs.forEach(doc => {
|
| 156 |
const srcInfo = uniqueSourcesMap.get(doc.url);
|
| 157 |
if (srcInfo && srcInfo.queryId) {
|
| 158 |
+
const sourceLabel = srcInfo.title.length > 40 ? srcInfo.title.substring(0, 40) + '...' : srcInfo.title;
|
| 159 |
+
onGraphEvent({ type: 'node', id: `s_${doc.url}`, label: `Source: ${sourceLabel}`, group: 'source' });
|
| 160 |
onGraphEvent({ type: 'edge', from: srcInfo.queryId, to: `s_${doc.url}` });
|
| 161 |
}
|
| 162 |
});
|
src/views/chat/chat-view.js
CHANGED
|
@@ -4828,7 +4828,7 @@ body { margin: 0; padding: 0; background: #000; overflow: hidden; display: flex;
|
|
| 4828 |
deepResearchLoader.show();
|
| 4829 |
if (isDetectiveBoard && overlay) {
|
| 4830 |
overlay.style.display = 'block';
|
| 4831 |
-
initCanvas(overlay);
|
| 4832 |
addNode('root', 'Research Topic', 'root');
|
| 4833 |
}
|
| 4834 |
}
|
|
|
|
| 4828 |
deepResearchLoader.show();
|
| 4829 |
if (isDetectiveBoard && overlay) {
|
| 4830 |
overlay.style.display = 'block';
|
| 4831 |
+
await initCanvas(overlay);
|
| 4832 |
addNode('root', 'Research Topic', 'root');
|
| 4833 |
}
|
| 4834 |
}
|