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

Function sendAuto

src/services/notifier.ts:77–104  ·  view source on GitHub ↗
(
  opts: NotificationOptions,
  terminal: TerminalNotification,
)

Source from the content-addressed store, hash-verified

75}
76
77async function sendAuto(
78 opts: NotificationOptions,
79 terminal: TerminalNotification,
80): Promise<string> {
81 const title = opts.title || DEFAULT_TITLE
82
83 switch (env.terminal) {
84 case 'Apple_Terminal': {
85 const bellDisabled = await isAppleTerminalBellDisabled()
86 if (bellDisabled) {
87 terminal.notifyBell()
88 return 'terminal_bell'
89 }
90 return 'no_method_available'
91 }
92 case 'iTerm.app':
93 terminal.notifyITerm2(opts)
94 return 'iterm2'
95 case 'kitty':
96 terminal.notifyKitty({ ...opts, title, id: generateKittyId() })
97 return 'kitty'
98 case 'ghostty':
99 terminal.notifyGhostty({ ...opts, title })
100 return 'ghostty'
101 default:
102 return 'no_method_available'
103 }
104}
105
106function generateKittyId(): number {
107 return Math.floor(Math.random() * 10000)

Callers 1

sendToChannelFunction · 0.85

Calls 2

generateKittyIdFunction · 0.85

Tested by

no test coverage detected