Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions agents/context-pruner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,12 @@ export function summarizeToolCall(
return query ? `Web search: "${query}"` : 'Web search'
}
case 'read_docs': {
const query = input.query as string | undefined
return query ? `Read docs: "${query}"` : 'Read docs'
const libraryTitle = input.libraryTitle as string | undefined
const topic = input.topic as string | undefined
if (libraryTitle && topic) {
return `Read docs: "${libraryTitle} - ${topic}"`
}
return libraryTitle ? `Read docs: "${libraryTitle}"` : 'Read docs'
}
case 'set_output':
return 'Set output'
Expand Down Expand Up @@ -543,8 +547,12 @@ const definition: AgentDefinition = {
return query ? `Web search: "${query}"` : 'Web search'
}
case 'read_docs': {
const query = input.query as string | undefined
return query ? `Read docs: "${query}"` : 'Read docs'
const libraryTitle = input.libraryTitle as string | undefined
const topic = input.topic as string | undefined
if (libraryTitle && topic) {
return `Read docs: "${libraryTitle} - ${topic}"`
}
return libraryTitle ? `Read docs: "${libraryTitle}"` : 'Read docs'
}
case 'set_output':
return 'Set output'
Expand Down