All files / src/chat chatSendError.ts

100%
Statements
2/2

100%
Branches
0/0

100%
Functions
1/1

100%
Lines
1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

Filter:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

4x

/** Structured chat send / delivery errors (issue #219) — stable `code` for analytics and tests. */

export type ChatSendErrorCode =
| 'socket_disconnected'
| 'local_model_failed'
| 'cloud_send_failed'
| 'voice_transcription'
| 'stt_not_ready'
| 'voice_synthesis'
| 'tts_not_ready'
| 'microphone_unavailable'
| 'microphone_recording'
| 'microphone_access'
| 'voice_playback'
| 'safety_timeout'
| 'usage_limit_reached'
| 'prompt_blocked'
| 'prompt_review'
| 'attachment_invalid';

export interface ChatSendError {
code: ChatSendErrorCode;
message: string;
}

export const chatSendError = (code: ChatSendErrorCode, message: string): ChatSendError => ({
code,
message,
});

Code coverage generated by
istanbul
at 2026-06-18T08:12:34.290Z

[compacted tool output — this is a PARTIAL view; the full original (6509 bytes) is available by calling tokenjuice_retrieve with token "d06f508f708870c86b4480197fb74686" (marker ⟦tj:d06f508f708870c86b4480197fb74686⟧)]