增加不同上下文模式

This commit is contained in:
CJACK
2026-04-26 14:21:15 +08:00
parent c09a4b51a5
commit 22e951b4c4
23 changed files with 129 additions and 14 deletions

View File

@@ -48,6 +48,7 @@ type ConfigReader interface {
CurrentInputFileEnabled() bool
CurrentInputFileMinChars() int
ThinkingInjectionEnabled() bool
ThinkingInjectionPrompt() string
}
type Deps struct {

View File

@@ -6,7 +6,7 @@ func ApplyThinkingInjection(store ConfigReader, stdReq promptcompat.StandardRequ
if store == nil || !store.ThinkingInjectionEnabled() || !stdReq.Thinking {
return stdReq
}
messages, changed := promptcompat.AppendThinkingInjectionToLatestUser(stdReq.Messages)
messages, changed := promptcompat.AppendThinkingInjectionPromptToLatestUser(stdReq.Messages, store.ThinkingInjectionPrompt())
if !changed {
return stdReq
}