Add files via upload

This commit is contained in:
公明
2026-07-14 16:24:06 +08:00
committed by GitHub
parent 73f0c35ef7
commit 364ca48846
14 changed files with 900 additions and 96 deletions
@@ -18,8 +18,8 @@ const (
`
transcriptStaticSystemOmitNote = "[static system prompt omitted — unchanged in live context after compaction]"
transcriptToolIndexStartMarker = "以下是当前会话绑定的工具名称索引"
transcriptPersonaStartMarker = "你是CyberStrikeAI"
transcriptToolIndexStartMarker = "以下是当前会话绑定的工具名称索引"
transcriptPersonaStartMarker = "你是CyberStrikeAI"
// ADK LanguageChinese injects skill middleware prompt with this header (see eino adk/middlewares/skill/prompt.go).
transcriptSkillsSystemMarker = "# Skill 系统"
transcriptSkillsSystemMarkerEnglish = "# Skills System"
@@ -62,6 +62,23 @@ func formatSummarizationTranscript(msgs []adk.Message) string {
return sb.String()
}
// formatSummarizationModelContext serializes conversation history as inert text
// for the summary model. Unlike formatSummarizationTranscript it omits the file
// header and never emits native assistant/tool protocol messages.
func formatSummarizationModelContext(msgs []adk.Message) string {
var sb strings.Builder
for _, msg := range msgs {
if msg == nil || msg.Role == schema.System {
continue
}
if sb.Len() > 0 {
sb.WriteByte('\n')
}
appendTranscriptMessage(&sb, msg)
}
return sb.String()
}
func sanitizeSystemContentForTranscript(content string) string {
content = stripToolNamesIndexFromSystem(content)
content = stripSkillsSystemBoilerplate(content)