MCPcopy Create free account
hub / github.com/astercloud/aster / extractContextWindowConfig

Method extractContextWindowConfig

pkg/agent/agent.go:761–776  ·  view source on GitHub ↗

extractContextWindowConfig 提取上下文窗口配置

()

Source from the content-addressed store, hash-verified

759
760// extractContextWindowConfig 提取上下文窗口配置
761func (a *Agent) extractContextWindowConfig() *struct {
762 MaxTokens int
763 Strategy string
764} {
765 if a.config.Context == nil {
766 return nil
767 }
768
769 return &struct {
770 MaxTokens int
771 Strategy string
772 }{
773 MaxTokens: a.config.Context.MaxTokens,
774 Strategy: "auto", // 可以从配置中读取
775 }
776}
777
778// injectToolManual 注入工具手册到系统提示词
779// Deprecated: 使用 buildSystemPrompt 替代

Callers 1

buildSystemPromptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected