From 8c50ceb516a9b9deb6273ffca4197690da262a86 Mon Sep 17 00:00:00 2001
From: AnotiaWang
Date: Mon, 24 Feb 2025 11:07:17 +0800
Subject: [PATCH] refactor(DeepResearch): extract node details to
NodeDetail.vue
---
components/DeepResearch/DeepResearch.vue | 114 ++---------------------
components/DeepResearch/NodeDetail.vue | 114 +++++++++++++++++++++++
2 files changed, 121 insertions(+), 107 deletions(-)
create mode 100644 components/DeepResearch/NodeDetail.vue
diff --git a/components/DeepResearch/DeepResearch.vue b/components/DeepResearch/DeepResearch.vue
index dfaf4d1..44e6471 100644
--- a/components/DeepResearch/DeepResearch.vue
+++ b/components/DeepResearch/DeepResearch.vue
@@ -4,7 +4,6 @@
type PartialProcessedSearchResult,
type ResearchStep,
} from '~/lib/deep-research'
- import { marked } from 'marked'
import {
feedbackInjectionKey,
formInjectionKey,
@@ -12,6 +11,7 @@
} from '~/constants/injection-keys'
import Flow from './SearchFlow.vue'
import SearchFlow from './SearchFlow.vue'
+ import NodeDetail from './NodeDetail.vue'
import { isChildNode, isParentNode, isRootNode } from '~/utils/tree-node'
export type DeepResearchNodeStatus = Exclude
@@ -319,112 +319,12 @@
-
-
-
-
-
-
-
- {{ selectedNode.label ?? $t('webBrowsing.generating') }}
-
-
-
-
- {{ t('webBrowsing.researchGoal') }}
-
-
-
- {{ t('webBrowsing.startNode.description') }}
-
-
-
-
-
- {{ t('webBrowsing.visitedUrls') }}
-
-
- -
-
- {{ item.title || item.url }}
-
-
-
-
-
-
-
-
- {{ t('webBrowsing.learnings') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ t('webBrowsing.followUpQuestions') }}
-
-
-
-
-
-
+
+
diff --git a/components/DeepResearch/NodeDetail.vue b/components/DeepResearch/NodeDetail.vue
new file mode 100644
index 0000000..1ea02b3
--- /dev/null
+++ b/components/DeepResearch/NodeDetail.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+ {{ node.label ?? $t('webBrowsing.generating') }}
+
+
+
+
+ {{ $t('webBrowsing.researchGoal') }}
+
+
+
+ {{ $t('webBrowsing.startNode.description') }}
+
+
+
+
+
+ {{ $t('webBrowsing.visitedUrls') }}
+
+
+ -
+
+ {{ item.title || item.url }}
+
+
+
+
-
+
+
+
+ {{ $t('webBrowsing.learnings') }}
+
+
+
+
+
-
+
+
+
+
+
+ {{ $t('webBrowsing.followUpQuestions') }}
+
+
+
+
+
+
+