Files
archie/ui/src/copy/errors/chat.ts
T

39 lines
1.4 KiB
TypeScript

// Failure copy for the chat panel. Detail values are the caught error's own
// text, passed through describeError at the call site.
export const chat = {
ask: {
answer: "Could not send the answer",
},
composer: {
microphoneUnavailable: (detail: string) => `Microphone unavailable: ${detail}`,
},
session: {
unavailable: "Chat unavailable",
loadMessages: "Could not load session messages",
refreshList: (detail: string) => `Could not refresh the session list: ${detail}`,
command: "Session action failed",
model: (detail: string) => `Model update failed: ${detail}`,
nothingToCopy: "Nothing to copy",
copyFailed: (detail: string) => `Not copied: ${detail}`,
clipboardUnavailable: "clipboard unavailable",
},
tasks: {
load: "Could not load tasks",
},
update: {
check: (detail: string) => `Could not check for updates: ${detail}`,
},
turn: {
// The server sends a sentence the reader can act on; this is for a failure
// that never reached it, such as a dropped connection.
failed: "Archie couldn't reply. Try again in a moment.",
failedStatus: "Error. Retry available.",
stop: (detail: string) => `Could not stop the turn: ${detail}`,
},
stream: {
noBody: "the chat stream returned no body",
endedEarly: "chat stream ended before completion",
timedOut: (detail: string) => `Archie stopped responding: no activity for ${detail}. Try again.`,
},
} as const;