Simplify command generator feedback
This commit is contained in:
1 parent
191bb95417
commit
c3e73e263c
2 files changed
+37
-75
No files matched your search
@@ -119,11 +119,13 @@ private struct CommandGeneratorOverlay: View {
|
||||
VStack(spacing: Metrics.Space.s) {
|
||||
symbol
|
||||
Text(title).font(.headline)
|
||||
Text(detail)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(2)
|
||||
.multilineTextAlignment(.center)
|
||||
if let detail {
|
||||
Text(detail)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(2)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, Metrics.Space.xl)
|
||||
.padding(.vertical, Metrics.Space.l)
|
||||
@@ -158,27 +160,17 @@ private struct CommandGeneratorOverlay: View {
|
||||
private var title: String {
|
||||
switch state {
|
||||
case .idle: ""
|
||||
case .readingDraft: String(localized: "Reading current input…")
|
||||
case .generating: String(localized: "Generating command…")
|
||||
case .inserted: String(localized: "Command inserted — press Return to run")
|
||||
case .readingDraft, .generating: String(localized: "Generating Command")
|
||||
case .inserted: String(localized: "Command Inserted")
|
||||
case .failed: String(localized: "Couldn't generate command")
|
||||
}
|
||||
}
|
||||
|
||||
private var detail: String {
|
||||
private var detail: String? {
|
||||
switch state {
|
||||
case .idle: ""
|
||||
case .readingDraft:
|
||||
String(localized: "Reading the focused shell's edit buffer.")
|
||||
case .generating:
|
||||
String(
|
||||
localized:
|
||||
"Only the current input, shell, working directory, and available system details are sent."
|
||||
)
|
||||
case .inserted(let targetCount):
|
||||
targetCount == 1
|
||||
? String(localized: "Review the command before running it.")
|
||||
: String(localized: "Inserted into \(targetCount) broadcast terminals.")
|
||||
case .idle: nil
|
||||
case .readingDraft, .generating: String(localized: "This May Take a Moment")
|
||||
case .inserted: String(localized: "Press Return to Run")
|
||||
case .failed(let message): message
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2766,12 +2766,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Command inserted — press Return to run" : {
|
||||
"Command Inserted" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "命令已插入——按回车键运行"
|
||||
"value" : "命令已插入"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5294,12 +5294,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Generating command…" : {
|
||||
"Generating Command" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "正在生成命令…"
|
||||
"value" : "正在生成命令"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5924,16 +5924,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Inserted into %lld broadcast terminals." : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "插入到%lld广播终端。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Inside" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
@@ -7692,16 +7682,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Only the current input, shell, working directory, and available system details are sent." : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "仅发送当前输入、shell、工作目录和可用的系统信息。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Open" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
@@ -8465,6 +8445,16 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Press Return to Run" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "按回车键运行"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Previous Workspace" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
@@ -8899,26 +8889,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Reading current input…" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "正在读取当前输入…"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Reading the focused shell's edit buffer." : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "正在读取当前shell的编辑缓冲区。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Reasoning" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
@@ -9535,16 +9505,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Review the command before running it." : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "运行前检查命令。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Reviews commands before automatic approval. Choose a fast model different from Chat; Same as Chat is not an independent second opinion." : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
@@ -13022,6 +12982,16 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"This May Take a Moment" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "可能需要一点时间"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"This package contains 1 snippet." : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
|
||||
Reference in new issue
Block a user