mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
Co-authored-by: Srinivas Vaddi <38348871+vaddisrinivas@users.noreply.github.com> Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai> Co-authored-by: Ghost Scripter <ghostscripter@zerolend.xyz> Co-authored-by: sanil-23 <sanil@vezures.xyz> Co-authored-by: Claude <noreply@anthropic.com>
30 lines
712 B
TypeScript
30 lines
712 B
TypeScript
/** 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,
|
|
});
|