feat(web): score write-path matches by workflow relation

The document list now reports WORKFLOW_SCOPE_MODE, and weighted mode only blocks a cross-workflow write when that title outscores the active workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-21 09:22:13 +00:00
co-authored by Cursor
parent 0972900215
commit fd4b95030f
8 changed files with 156 additions and 6 deletions
+2
View File
@@ -13,6 +13,7 @@ import (
"chat-agent-system/internal/docgov"
"chat-agent-system/internal/docquery"
"chat-agent-system/internal/docrevision"
"chat-agent-system/internal/workflowscope"
)
func (s *Server) docflowQuery() *docflow.Query {
@@ -102,6 +103,7 @@ func (s *Server) handleListProjectWorkflowDocuments(w http.ResponseWriter, r *ht
writeJSONResponse(w, http.StatusOK, map[string]any{
"documents": docs,
"active_workflow_key": activeKey,
"workflow_scope_mode": string(workflowscope.CurrentMode()),
})
}