feat: update auto reply and packaging
This commit is contained in:
@@ -54,9 +54,18 @@ func handleAutoReplyRebuildKnowledge(w http.ResponseWriter, r *http.Request) {
|
||||
start := time.Now()
|
||||
idx, err := getAutoReplyEngine().rebuildKnowledgeIndex()
|
||||
if err != nil {
|
||||
data := map[string]interface{}{
|
||||
"durationMs": time.Since(start).Milliseconds(),
|
||||
}
|
||||
if idx != nil {
|
||||
data["fileCount"] = idx.FileCount
|
||||
data["chunkCount"] = len(idx.Chunks)
|
||||
data["failedFiles"] = idx.FailedFiles
|
||||
}
|
||||
sendJSONResponse(w, http.StatusInternalServerError, map[string]interface{}{
|
||||
"success": false,
|
||||
"message": err.Error(),
|
||||
"data": data,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user