feat(keyboard): ship AI hint carousel, home library cards, and clipboard polish
Rotate AI idle suggestions with optional remote packs, move history/dictionary onto self-sizing Home preview cards, harden clipboard capture/prompting, and simplify keyboard chrome by dropping most liquid-glass shadows.
This commit is contained in:
@@ -25,24 +25,17 @@ public enum EditLastInputPromptComposer {
|
||||
"""
|
||||
<edit_request protocol="edit-last-input-v1">
|
||||
<source_text>
|
||||
\(escapeXML(input.sourceText))
|
||||
\(PromptXMLEscaping.escapeTextContent(input.sourceText))
|
||||
</source_text>
|
||||
<spoken_instruction>
|
||||
\(escapeXML(input.spokenInstruction.trimmingCharacters(in: .whitespacesAndNewlines)))
|
||||
\(PromptXMLEscaping.escapeTextContent(
|
||||
input.spokenInstruction.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
))
|
||||
</spoken_instruction>
|
||||
</edit_request>
|
||||
"""
|
||||
}
|
||||
|
||||
private static func escapeXML(_ text: String) -> String {
|
||||
text
|
||||
.replacingOccurrences(of: "&", with: "&")
|
||||
.replacingOccurrences(of: "<", with: "<")
|
||||
.replacingOccurrences(of: ">", with: ">")
|
||||
.replacingOccurrences(of: "\"", with: """)
|
||||
.replacingOccurrences(of: "'", with: "'")
|
||||
}
|
||||
|
||||
private static let chinesePrompt = """
|
||||
你是输入法中的文本编辑器。用户会提供“原文”和一条由语音识别得到的“编辑指令”。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user