mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-03-30 01:06:39 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93d7883513 | ||
|
|
6b074653f2 |
@@ -240,9 +240,13 @@ func BuildKiroPayload(claudeBody []byte, modelID, profileArn, origin string, isA
|
|||||||
// Process messages and build history
|
// Process messages and build history
|
||||||
history, currentUserMsg, currentToolResults := processMessages(messages, modelID, origin)
|
history, currentUserMsg, currentToolResults := processMessages(messages, modelID, origin)
|
||||||
|
|
||||||
// Build content with system prompt
|
// Build content with system prompt (only on first turn to avoid re-injection)
|
||||||
if currentUserMsg != nil {
|
if currentUserMsg != nil {
|
||||||
currentUserMsg.Content = buildFinalContent(currentUserMsg.Content, systemPrompt, currentToolResults)
|
effectiveSystemPrompt := systemPrompt
|
||||||
|
if len(history) > 0 {
|
||||||
|
effectiveSystemPrompt = "" // Don't re-inject on subsequent turns
|
||||||
|
}
|
||||||
|
currentUserMsg.Content = buildFinalContent(currentUserMsg.Content, effectiveSystemPrompt, currentToolResults)
|
||||||
|
|
||||||
// Deduplicate currentToolResults
|
// Deduplicate currentToolResults
|
||||||
currentToolResults = deduplicateToolResults(currentToolResults)
|
currentToolResults = deduplicateToolResults(currentToolResults)
|
||||||
|
|||||||
Reference in New Issue
Block a user