Russian UI: settings, notch views, agent steps, errors; visible success after installing hooks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-06 20:15:30 +03:00
parent 750e5ad0ad
commit 319cdc8b18
20 changed files with 565 additions and 519 deletions
+5 -5
View File
@@ -18,7 +18,7 @@ enum ClaudeCodeCLIError: LocalizedError {
var errorDescription: String? {
switch self {
case .notFound:
"Claude Code CLI not found. Install it, or set its path in Settings → Chat."
"Claude Code CLI не найден. Установите его или укажите путь в Настройки → Чат."
case .failed(let message):
message
}
@@ -31,7 +31,7 @@ final class ClaudeCodeCLI {
/// Models offered in the picker. Empty id = whatever the CLI is configured to use.
static let models: [(id: String, label: String)] = [
("", "Default"),
("", "По умолчанию"),
("opus", "Opus"),
("sonnet", "Sonnet"),
("haiku", "Haiku"),
@@ -149,7 +149,7 @@ final class ClaudeCodeCLI {
if let error = parser.errorMessage {
if error.localizedCaseInsensitiveContains("authenticate") || error.localizedCaseInsensitiveContains("login") {
throw ClaudeCodeCLIError.failed("Claude Code isn't logged in. Run `claude /login` in a terminal.")
throw ClaudeCodeCLIError.failed("Claude Code не авторизован. Выполните `claude /login` в терминале.")
}
// A resume that points at a gone session: start fresh next time.
if error.localizedCaseInsensitiveContains("No conversation found") { sessionID = nil }
@@ -158,7 +158,7 @@ final class ClaudeCodeCLI {
if p.terminationReason == .uncaughtSignal { throw CancellationError() }
if parser.finalText == nil, p.terminationStatus != 0 {
let stderr = String(data: err.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) ?? ""
let last = stderr.split(separator: "\n").last.map(String.init) ?? "exit code \(p.terminationStatus)"
let last = stderr.split(separator: "\n").last.map(String.init) ?? "код выхода \(p.terminationStatus)"
throw ClaudeCodeCLIError.failed("claude: \(last)")
}
return parser.finalText ?? parser.visibleText
@@ -238,7 +238,7 @@ struct StreamParser {
let isError = json["is_error"] as? Bool ?? false
let result = json["result"] as? String
if isError {
if errorMessage == nil { errorMessage = result ?? "Claude Code returned an error." }
if errorMessage == nil { errorMessage = result ?? "Claude Code вернул ошибку." }
} else {
// Keep the tool trail when there was one; otherwise the clean final answer.
finalText = committed.isEmpty ? (result ?? "") : committed