Keep source changes visible and bound evaluation calls consistently
Why: Updated or missing sources must remain visible as limitations, and comparison calls need stable prompt grouping. Evidence: SELF card/server suites and live-tag compilation pass. Impact: Adds neutral source limitations and refines test-only provider accounting. Refs: fast-slow-u2-u3 Tasks 6 and 7
This commit is contained in:
@@ -74,6 +74,7 @@ func (s *Service) VisibleTaskCard(owner string, c core.ActivityCard) core.Activi
|
|||||||
task.Inputs = nil
|
task.Inputs = nil
|
||||||
task.Findings = nil
|
task.Findings = nil
|
||||||
task.Conclusion = "相关来源当前不可用,结果暂不展示"
|
task.Conclusion = "相关来源当前不可用,结果暂不展示"
|
||||||
|
task.Limitations = []string{"相关来源当前不可用,请核实访问权限与文件状态"}
|
||||||
task.Remaining = "请核实材料访问权限与文件是否仍可读取"
|
task.Remaining = "请核实材料访问权限与文件是否仍可读取"
|
||||||
} else {
|
} else {
|
||||||
task.Findings = append([]core.TaskFinding(nil), task.Findings...)
|
task.Findings = append([]core.TaskFinding(nil), task.Findings...)
|
||||||
@@ -86,6 +87,7 @@ func (s *Service) VisibleTaskCard(owner string, c core.ActivityCard) core.Activi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
task.Conclusion = "依据文件已更新,当前结论需要重新核验"
|
task.Conclusion = "依据文件已更新,当前结论需要重新核验"
|
||||||
|
task.Limitations = []string{"依据文件已更新,历史发现不能直接作为当前结论"}
|
||||||
task.Remaining = "展开历史记录可查看处理时的合法引用;当前文件与当时版本可能不同"
|
task.Remaining = "展开历史记录可查看处理时的合法引用;当前文件与当时版本可能不同"
|
||||||
}
|
}
|
||||||
task.OutcomeCompleteness = "partial"
|
task.OutcomeCompleteness = "partial"
|
||||||
|
|||||||
@@ -232,7 +232,19 @@ func evalProviderStream(route map[string]any, dir string) agentllm.StreamFunc {
|
|||||||
unknown := false
|
unknown := false
|
||||||
records := []map[string]any{}
|
records := []map[string]any{}
|
||||||
return func(ctx context.Context, m string, msgs []agentllm.Message, decls []agentllm.ToolDecl, opts agentllm.StreamOptions) <-chan agentllm.Event {
|
return func(ctx context.Context, m string, msgs []agentllm.Message, decls []agentllm.ToolDecl, opts agentllm.StreamOptions) <-chan agentllm.Event {
|
||||||
runKey := fmt.Sprintf("%p", ctx)
|
fingerprint := []agentllm.Message{}
|
||||||
|
for _, msg := range msgs {
|
||||||
|
if msg.Role == agentllm.RoleSystem && len(fingerprint) == 0 {
|
||||||
|
fingerprint = append(fingerprint, msg)
|
||||||
|
}
|
||||||
|
if msg.Role == agentllm.RoleUser {
|
||||||
|
fingerprint = append(fingerprint, msg)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fp, _ := json.Marshal(fingerprint)
|
||||||
|
hash := sha256.Sum256(fp)
|
||||||
|
runKey := hex.EncodeToString(hash[:])
|
||||||
mu.Lock()
|
mu.Lock()
|
||||||
a := groups[runKey]
|
a := groups[runKey]
|
||||||
if a.Started.IsZero() {
|
if a.Started.IsZero() {
|
||||||
|
|||||||
Reference in New Issue
Block a user