Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import type { PromptContextBlock, Register } from 'claude-code'
- export const BLOCK = 'userEmail'
- export const withoutEmail = (blocks: readonly PromptContextBlock[]) => blocks.filter((b) => b.name !== BLOCK)
- export const register: Register = (on) => {
- on('prompt.context', async (_$, e, next) => {
- const result = await next({ ...e, blocks: withoutEmail(e.blocks) })
- return { ...result, blocks: withoutEmail(result.blocks) }
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment