new features

This commit is contained in:
Mark Gregory
2026-11-18 13:55:47 +00:00
parent 17bcf178a9
commit a07ddf4d6d
29 changed files with 3457 additions and 306 deletions
+11
View File
@@ -850,6 +850,17 @@ struct RemoteKnowledgeStack: Identifiable {
let supportsInventory: Bool
}
enum MCPToolResponse {
static func check(_ data: Data, tool: String) throws {
guard let result = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any],
result["isError"] as? Bool == true else { return }
let content = result["content"] as? [[String: Any]] ?? []
let details = content.compactMap { $0["text"] as? String }.joined(separator: "\n")
let message = details.isEmpty ? "The server reported a tool error." : String(details.prefix(4_000))
throw StudioError("\(tool) failed. \(message)")
}
}
struct MCPConnectionState {
var toolset: ActiveToolset? = nil
var progress: String? = nil