Guest User

Untitled

a guest
Nov 5th, 2026
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import type { PromptContextBlock, Register } from 'claude-code'
  2.  
  3. export const BLOCK = 'userEmail'
  4.  
  5. export const withoutEmail = (blocks: readonly PromptContextBlock[]) => blocks.filter((b) => b.name !== BLOCK)
  6.  
  7. export const register: Register = (on) => {
  8. on('prompt.context', async (_$, e, next) => {
  9. const result = await next({ ...e, blocks: withoutEmail(e.blocks) })
  10. return { ...result, blocks: withoutEmail(result.blocks) }
  11. })
  12. }
Advertisement
Add Comment
Please, Sign In to add comment