MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getContextEfficiencyAttachment

Function getContextEfficiencyAttachment

src/utils/attachments.ts:3963–3983  ·  view source on GitHub ↗
(
  messages: Message[],
)

Source from the content-addressed store, hash-verified

3961 * compact boundaries.
3962 */
3963export function getContextEfficiencyAttachment(
3964 messages: Message[],
3965): Attachment[] {
3966 if (!feature('HISTORY_SNIP')) {
3967 return []
3968 }
3969 // Gate must match SnipTool.isEnabled() — don't nudge toward a tool that
3970 // isn't in the tool list. Lazy require keeps this file snip-string-free.
3971 const { isSnipRuntimeEnabled, shouldNudgeForSnips } =
3972 // eslint-disable-next-line @typescript-eslint/no-require-imports
3973 require('../services/compact/snipCompact.js') as typeof import('../services/compact/snipCompact.js')
3974 if (!isSnipRuntimeEnabled()) {
3975 return []
3976 }
3977
3978 if (!shouldNudgeForSnips(messages)) {
3979 return []
3980 }
3981
3982 return [{ type: 'context_efficiency' }]
3983}
3984
3985
3986function isFileReadDenied(

Callers 1

getAttachmentsFunction · 0.85

Calls 1

featureFunction · 0.85

Tested by

no test coverage detected