Skip to content

Commit

Permalink
fix: skip user custom instructions to avoid showing unsupported content
Browse files Browse the repository at this point in the history
closes #269
  • Loading branch information
pionxzh committed Dec 2, 2024
1 parent b3418e5 commit b0b9916
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export interface ConversationNodeMessage {
} | {
content_type: 'execution_output'
text: string
} | {
content_type: 'user_editable_context'
user_profile: string
user_instructions: string
} | {
content_type: 'tether_quote'
domain?: string
Expand Down Expand Up @@ -580,6 +584,8 @@ function extractConversationResult(conversationMapping: Record<string, Conversat
node.message?.author.role !== 'system'
// Skip model memory context
&& node.message?.content.content_type !== 'model_editable_context'
// Skip user custom instructions
&& node.message?.content.content_type !== 'user_editable_context'
) {
result.unshift(node)
}
Expand Down

0 comments on commit b0b9916

Please sign in to comment.