diff --git a/dashboard/src/components/Pagination.vue b/dashboard/src/components/Pagination.vue
new file mode 100644
index 0000000..fe9877c
--- /dev/null
+++ b/dashboard/src/components/Pagination.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dashboard/src/components/ProcessBlock.vue b/dashboard/src/components/ProcessBlock.vue
index ab86c82..e9e7c2a 100644
--- a/dashboard/src/components/ProcessBlock.vue
+++ b/dashboard/src/components/ProcessBlock.vue
@@ -142,7 +142,8 @@ const allItems = computed(() => {
displayContent = JSON.stringify(parsed, null, 2)
}
} catch (e) {
- // 不是 JSON,保持原样
+ // 不是 JSON,保持原样显示原始内容
+ console.warn('Failed to parse tool result JSON:', e)
}
match.resultSummary = displayContent.slice(0, 200)
diff --git a/dashboard/src/utils/streamManager.js b/dashboard/src/utils/streamManager.js
index 6ea968b..90ae290 100644
--- a/dashboard/src/utils/streamManager.js
+++ b/dashboard/src/utils/streamManager.js
@@ -149,7 +149,8 @@ class StreamManager {
const data = JSON.parse(line.slice(6))
this._handleEvent(conversationId, currentEvent, data, streamStore, null)
} catch (e) {
- // 忽略解析错误
+ console.error('SSE parse error in _processLines:', e, 'line:', line)
+ streamStore.errorStream(conversationId, `Parse error: ${e.message}`)
}
}
}
diff --git a/dashboard/src/utils/streamStore.js b/dashboard/src/utils/streamStore.js
index 639897c..910fe6b 100644
--- a/dashboard/src/utils/streamStore.js
+++ b/dashboard/src/utils/streamStore.js
@@ -48,7 +48,16 @@ export const useStreamStore = defineStore('stream', () => {
const idx = state.process_steps.findIndex(s => s.id === step.id)
if (idx >= 0) {
- state.process_steps[idx] = step
+ // 对于 thinking/text 步骤,后端发送的是增量内容(基于 offset)
+ // 需要追加到已有内容上,而不是替换
+ if (step.type === 'thinking' || step.type === 'text') {
+ const existing = state.process_steps[idx]
+ existing.content = (existing.content || '') + (step.content || '')
+ // 触发响应式更新
+ state.process_steps[idx] = { ...existing }
+ } else {
+ state.process_steps[idx] = step
+ }
} else {
state.process_steps.push(step)
}
diff --git a/dashboard/src/views/ConversationView.vue b/dashboard/src/views/ConversationView.vue
index b1e76cd..c67a964 100644
--- a/dashboard/src/views/ConversationView.vue
+++ b/dashboard/src/views/ConversationView.vue
@@ -48,11 +48,12 @@
-
+
@@ -170,6 +171,7 @@ import { formatDate } from '../utils/useFormatters.js'
import ProcessBlock from '../components/ProcessBlock.vue'
import MessageNav from '../components/MessageNav.vue'
import MessageBubble from '../components/MessageBubble.vue'
+import Pagination from '../components/Pagination.vue'
const {
list,
@@ -277,6 +279,12 @@ const handleRegenerateMessage = async (msgId) => {
}
+// 处理分页切换
+const handlePageChange = (newPage) => {
+ page.value = newPage
+ fetchData()
+}
+
const onProviderChange = () => {
const p = providers.value.find(p => p.id === form.value.provider_id)
if (p) form.value.model = p.default_model || ''
diff --git a/dashboard/src/views/SettingsView.vue b/dashboard/src/views/SettingsView.vue
index 4db1338..bf9c80f 100644
--- a/dashboard/src/views/SettingsView.vue
+++ b/dashboard/src/views/SettingsView.vue
@@ -155,6 +155,7 @@
🔌
LLM Provider
+ {{ providers.length }}
@@ -163,16 +164,17 @@
- | 名称 |
+ 名称 / 类型 |
API / 模型 |
启用 |
操作 |
-
+
|
{{ p.name }}
+ {{ p.provider_type }}
默认
启用
@@ -180,9 +182,9 @@
|
- {{ p.base_url }}
- 模型: {{ p.default_model }}
- 最大Tokens: {{ p.max_tokens || 8192 }}
+ {{ p.base_url }}
+ 模型: {{ p.default_model }}
+ 最大 Tokens: {{ p.max_tokens || 8192 }}
|
|
暂无用户
@@ -308,23 +331,55 @@