mirror of
https://github.com/stablyai/orca.git
synced 2026-10-09 08:02:35 +00:00
* fix(native-chat): plain wording for chat errors and status rows
Replaces Orca-internal words (host, journal, transcript, outbox, process,
unverifiable, "no contact", byte budgets) in native chat refusals, status
rows, the skills menu, subagent and background-task state labels and the
history-load error with plain language, and routes the two hard-coded
English composer errors through translate(). Copy only; no behaviour change.
* fix(native-chat): match chat copy to what happens and to the sidebar's words
- The held-message row says Orca keeps checking, which it does: the idle
sweep retries the unproven stop and a landed retry sends what waited.
- An unsettled earlier message reads as unconfirmed, not undelivered.
- The skills-unavailable line names SSH chats, its only cause.
- Subagent and background-task rows say "no recent update", the sidebar's
words for the same state, and "status unavailable" after a count; the
row no longer repeats the state as a reason.
* test(native-chat): find the repair row by its own text, not the old wording
* fix(native-chat): word the history-repair and too-large rows in the reader's language
Both rows were finished English the host wrote into the chat, so nothing could
translate them. Each now names itself with a presentation, the way the
compaction row does, and the chat says it through translate(). The English text
stays on the row for clients that predate these presentations and for the phone.
* fix(native-chat): say composer send errors with the chat's notice sentences
The composer's two errors had their own wording file beside the sentence table
every other chat notice uses. The send outcome now carries notice parts, worded
by the same function as the rest. A refused redelivery says "Orca couldn't
confirm your message reached the agent. Check the chat, then send it again if
needed." (the same sentence the failed-send rework uses), and a message this
client couldn't store says "Couldn't save your message. Try again."
* fix(native-chat): drop the retry line, keep one name for a lost task, and say only true causes
- The history error pane no longer adds "Orca keeps trying to load this chat."
under its title: the read still retries on its own, but the pane says only
that the chat didn't load.
- A write refused as unsupported asks for an Orca update only when no reason
came back, which means the host is older. A named reason (a location or agent
that can't run there, no chat host, a client missing the capability) now reads
"This isn't available in this chat.", since updating doesn't fix it.
- A task Orca lost track of is "no recent update" everywhere; after a count it
reads "2 agents with no recent update" instead of a second name.
- The skills menu announces the same sentence it shows, including in SSH chats.
- The row for messages held behind a previous agent reads "{{agent}} from before
may still be running. Your messages will send once it stops."
* fix(native-chat): a chat whose host can't run it says its history didn't load
A history read refused as unsupported with a named reason left the error pane
saying only "This isn't available in this chat.", which never said the chat
failed to load and named nothing the reader asked for. A read now says "This
chat's history couldn't be loaded."; other writes keep the shorter sentence.
114 lines
6.2 KiB
TypeScript
114 lines
6.2 KiB
TypeScript
// The pieces every failure sentence is made of, in English. The host fills them in as they are;
|
|
// desktop translates each piece whole with this as its fallback, so the two never differ.
|
|
|
|
/** Sentences a refusal notice shows too, so a chat says them one way. */
|
|
export const TERMINAL_AGENT_HOLDS_CHAT = 'This chat is still open in a terminal agent.'
|
|
export const QUIT_TERMINAL_AGENT = 'Quit that agent to continue the chat here.'
|
|
export const START_NEW_CHAT = 'Start a new chat to continue.'
|
|
|
|
/** Every piece a failure sentence is made of, whole so desktop can translate each on its own.
|
|
* `{{agent}}` is the agent's name or `theAgent`, `{{command}}` a conversation command's name; the
|
|
* host fills them in English. */
|
|
export const AGENT_SESSION_FAILURE_COPY = {
|
|
theAgent: 'The agent',
|
|
providerStartFailed: '{{agent}} stopped before it finished starting.',
|
|
runCommandAgain: 'Run /{{command}} again.',
|
|
sendToTryAgain: 'Send your message to try again.',
|
|
couldNotStart: "{{agent}} couldn't start.",
|
|
couldNotRestart: "{{agent}} couldn't restart.",
|
|
terminalAgentHoldsChat: TERMINAL_AGENT_HOLDS_CHAT,
|
|
quitTerminalAgent: QUIT_TERMINAL_AGENT,
|
|
startNewChat: START_NEW_CHAT,
|
|
notSignedIn: '{{agent}} is not signed in for the selected account.',
|
|
signInFirst: 'Sign in first.',
|
|
signInThenRunCommand: 'Sign in, then run /{{command}} again.',
|
|
signInThenSend: 'Sign in, then send your message again.',
|
|
historyTooLarge: "This conversation's history is too large to restore here.",
|
|
managedAccountEnvOverride:
|
|
'This Claude launch sets its own Anthropic sign-in variables. Remove them to use a managed Claude account.',
|
|
accountSwitchInProgress: 'A Claude account switch is in progress. Try again after it finishes.',
|
|
managedAccountUnsupported:
|
|
'While a Claude account is added in WSL, Claude chats need a Windows Claude account.',
|
|
chooseClaudeAccount: 'Choose or add one in Claude Accounts settings.',
|
|
chooseClaudeAccountThenRunCommand:
|
|
'Choose or add one in Claude Accounts settings, then run /{{command}} again.',
|
|
chooseClaudeAccountThenSend:
|
|
'Choose or add one in Claude Accounts settings, then send your message again.',
|
|
providerExitedRow:
|
|
'{{agent}} stopped while this response was in progress. You can continue in this conversation.',
|
|
providerExitedRejection: '{{agent}} stopped before this message was sent.',
|
|
providerRejected: 'The provider did not accept this message.',
|
|
providerRejectedQuoted: 'The provider did not accept this message: {{detail}}.',
|
|
attachmentEmpty: 'An image on this message is empty, so the message was not sent.',
|
|
attachmentTooLarge: 'An image on this message is too large, so the message was not sent.',
|
|
attachmentLargerThan:
|
|
'An image on this message is larger than {{size}} MB, so the message was not sent.',
|
|
attachmentTooMany: 'This message has too many images, so it was not sent.',
|
|
attachmentAtMost:
|
|
'{{agent}} accepts at most {{limit}} images in one message, so this message was not sent.',
|
|
attachmentTotalTooLarge:
|
|
'The images on this message are too large together, so the message was not sent.',
|
|
attachmentTotalMoreThan:
|
|
'The images on this message add up to more than {{size}} MB, so the message was not sent.',
|
|
attachmentUnsupportedType:
|
|
'{{agent}} accepts only PNG, JPEG, GIF, and WebP images, so this message was not sent.',
|
|
attachmentNotAFile: "An image on this message isn't a file, so the message was not sent.",
|
|
attachmentNoSource: 'An image on this message has no file to send, so the message was not sent.',
|
|
attachmentInvalid: "An attachment on this message can't be sent to the agent.",
|
|
attachmentUnreadable:
|
|
"An attachment on this message couldn't be read, so the message was not sent.",
|
|
emptyMessage: 'This message is empty, so it was not sent.',
|
|
queueFull: 'Too many messages were waiting for the agent, so this one was not sent.',
|
|
writeFailed: "Orca couldn't hand this message to the agent, so it was not sent.",
|
|
cancelled: 'This message was withdrawn before the agent started it.',
|
|
chatClosed: 'The chat closed before this message was sent.',
|
|
hostRestarted: 'Orca restarted before this message was sent.',
|
|
notDelivered: 'This message was not delivered.',
|
|
notDeliveredSendAgain: 'This message was not delivered. Send it again to continue.',
|
|
commandRefused: "This command didn't run.",
|
|
commandRefusedTryAgain: "This command didn't run. Try it again.",
|
|
compactionFailed: 'Compaction failed.',
|
|
compactionFailedQuoted: 'Compaction failed: {{detail}}.',
|
|
compactionUnconfirmed: 'Compaction completion is unconfirmed.',
|
|
cancelUnconfirmed: 'Cancellation was not confirmed.',
|
|
stopRefused: "{{agent}} didn't stop.",
|
|
stopRefusedQuoted: "{{agent}} didn't stop: {{detail}}.",
|
|
noTurnToStop: '{{agent}} had no turn running to stop.',
|
|
answerUnconfirmed: 'Your answer was recorded but the agent did not confirm it.',
|
|
hostFault: "Orca ran into a problem, so this didn't go through.",
|
|
hostFaultTryAgain: "Orca ran into a problem, so this didn't go through. Try again.",
|
|
hostStopped: '{{agent}} never finished starting, so Orca stopped it.',
|
|
providerRateLimited: '{{agent}} is rate-limited and retrying.',
|
|
providerRetrying: '{{agent}} hit a temporary problem and is retrying.',
|
|
providerRetryingQuoted: '{{agent}} is retrying: {{detail}}.',
|
|
previousExitUnverifiable:
|
|
'{{agent}} from before may still be running. Your messages will send once it stops.'
|
|
} as const
|
|
|
|
export type AgentSessionFailureCopyId = keyof typeof AGENT_SESSION_FAILURE_COPY
|
|
|
|
/** What a piece's `{{name}}` placeholders stand for. */
|
|
export type AgentSessionFailureCopyValues = {
|
|
agent?: string
|
|
command?: string
|
|
detail?: string
|
|
limit?: string
|
|
size?: string
|
|
}
|
|
|
|
/** One piece in the reader's language, placeholders filled. */
|
|
export type AgentSessionFailureSay = (
|
|
id: AgentSessionFailureCopyId,
|
|
values?: AgentSessionFailureCopyValues
|
|
) => string
|
|
|
|
/** The host's words, and any surface without translations. */
|
|
export const sayAgentSessionFailureEnglish: AgentSessionFailureSay = (id, values = {}) => {
|
|
const filled = new Map(Object.entries(values))
|
|
// One pass over the template, so a provider's words are never read as a placeholder.
|
|
return AGENT_SESSION_FAILURE_COPY[id].replace(
|
|
/\{\{(\w+)\}\}/g,
|
|
(placeholder, name: string) => filled.get(name) ?? placeholder
|
|
)
|
|
}
|