We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1b4036d + 4d1b427 commit 1564f50Copy full SHA for 1564f50
agent/assistant/history.go
@@ -161,6 +161,14 @@ func (ast *Assistant) convertStoreMessageToContext(msg *storetypes.Message) *age
161
return nil
162
}
163
164
+ // Skip internal message types that should not be included in LLM context
165
+ // These types are for UI/internal use only and can confuse the LLM
166
+ // Note: "error" is kept so LLM can help troubleshoot issues
167
+ switch msg.Type {
168
+ case "tool_call", "loading", "action", "event":
169
+ return nil
170
+ }
171
+
172
// Extract content from Props
173
content := ast.extractContentFromProps(msg.Props, msg.Type)
174
if content == nil {
0 commit comments