(
sessionStore: SessionStore,
session: SessionState | undefined,
req: DaemonRequest,
command: string,
result: Record<string, unknown> | undefined,
overrides?: { positionals?: string[]; flags?: CommandFlags },
)
| 9 | * record a different set (e.g. resolved positionals or stripped public flags). |
| 10 | */ |
| 11 | export function recordSessionAction( |
| 12 | sessionStore: SessionStore, |
| 13 | session: SessionState | undefined, |
| 14 | req: DaemonRequest, |
| 15 | command: string, |
| 16 | result: Record<string, unknown> | undefined, |
| 17 | overrides?: { positionals?: string[]; flags?: CommandFlags }, |
| 18 | ): void { |
| 19 | if (!session) return; |
| 20 | sessionStore.recordAction(session, { |
| 21 | command, |
| 22 | positionals: overrides?.positionals ?? req.positionals ?? [], |
| 23 | flags: overrides?.flags ?? ((req.flags ?? {}) as CommandFlags), |
| 24 | result: result ?? {}, |
| 25 | }); |
| 26 | } |
no test coverage detected