Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/Step5Interaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ const sendToReportAgent = async (message) => {

// Build chat history for API
const historyForApi = chatHistory.value
.filter(msg => msg.role !== 'user' || msg.content !== message)
.slice(0, -1)
.slice(-10) // Keep last 10 messages
.map(msg => ({
role: msg.role,
Expand Down Expand Up @@ -720,7 +720,7 @@ const sendToAgent = async (message) => {
let prompt = message
if (chatHistory.value.length > 1) {
const historyContext = chatHistory.value
.filter(msg => msg.content !== message)
.slice(0, -1)
.slice(-6)
.map(msg => `${msg.role === 'user' ? '提问者' : '你'}:${msg.content}`)
.join('\n')
Expand Down