( source: SessionStartSource, model?: string, )
| 144 | } |
| 145 | |
| 146 | export async function fireSessionStart( |
| 147 | source: SessionStartSource, |
| 148 | model?: string, |
| 149 | ): Promise<HookEventResult> { |
| 150 | if (!isHookServiceReady()) return NOOP_RESULT; |
| 151 | |
| 152 | const input: SessionStartInput = { |
| 153 | ...getCommonFields(), |
| 154 | hook_event_name: "SessionStart", |
| 155 | source, |
| 156 | model, |
| 157 | }; |
| 158 | |
| 159 | return services.hooks.fireEvent(input); |
| 160 | } |
| 161 | |
| 162 | export async function fireSessionEnd( |
| 163 | reason: SessionEndReason, |
nothing calls this directly
no test coverage detected