( customInstructions?: string, direction: PartialCompactDirection = 'from', )
| 272 | 'Tool calls will be rejected and you will fail the task.' |
| 273 | |
| 274 | export function getPartialCompactPrompt( |
| 275 | customInstructions?: string, |
| 276 | direction: PartialCompactDirection = 'from', |
| 277 | ): string { |
| 278 | const template = |
| 279 | direction === 'up_to' |
| 280 | ? PARTIAL_COMPACT_UP_TO_PROMPT |
| 281 | : PARTIAL_COMPACT_PROMPT |
| 282 | let prompt = NO_TOOLS_PREAMBLE + template |
| 283 | |
| 284 | if (customInstructions && customInstructions.trim() !== '') { |
| 285 | prompt += `\n\nAdditional Instructions:\n${customInstructions}` |
| 286 | } |
| 287 | |
| 288 | prompt += NO_TOOLS_TRAILER |
| 289 | |
| 290 | return prompt |
| 291 | } |
| 292 | |
| 293 | export function getCompactPrompt(customInstructions?: string): string { |
| 294 | let prompt = NO_TOOLS_PREAMBLE + BASE_COMPACT_PROMPT |
no outgoing calls
no test coverage detected