refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -4,7 +4,7 @@ enum ChatMarkdownPreprocessor {
|
||||
struct InlineImage: Identifiable {
|
||||
let id = UUID()
|
||||
let label: String
|
||||
let image: ClawdbotPlatformImage?
|
||||
let image: MoltbotPlatformImage?
|
||||
}
|
||||
|
||||
struct Result {
|
||||
@@ -30,11 +30,11 @@ enum ChatMarkdownPreprocessor {
|
||||
let label = ns.substring(with: match.range(at: 1))
|
||||
let dataURL = ns.substring(with: match.range(at: 2))
|
||||
|
||||
let image: ClawdbotPlatformImage? = {
|
||||
let image: MoltbotPlatformImage? = {
|
||||
guard let comma = dataURL.firstIndex(of: ",") else { return nil }
|
||||
let b64 = String(dataURL[dataURL.index(after: comma)...])
|
||||
guard let data = Data(base64Encoded: b64) else { return nil }
|
||||
return ClawdbotPlatformImage(data: data)
|
||||
return MoltbotPlatformImage(data: data)
|
||||
}()
|
||||
images.append(InlineImage(label: label, image: image))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user