MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getPartialCompactPrompt

Function getPartialCompactPrompt

src/services/compact/prompt.ts:274–291  ·  view source on GitHub ↗
(
  customInstructions?: string,
  direction: PartialCompactDirection = 'from',
)

Source from the content-addressed store, hash-verified

272 'Tool calls will be rejected and you will fail the task.'
273
274export 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
293export function getCompactPrompt(customInstructions?: string): string {
294 let prompt = NO_TOOLS_PREAMBLE + BASE_COMPACT_PROMPT

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected