Download apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+ToolActivity.swift from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel%2BToolActivity.swift
- Command line
-
hf download hf://SaylorTwift/openclaw/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+ToolActivity.swift
-
curl -L -o ChatViewModel+ToolActivity.swift https://huggingface.co/SaylorTwift/openclaw/resolve/main/apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel%2BToolActivity.swift
772 Bytes
| import Foundation | |
| public typealias OpenClawChatToolActivityHandler = ( | |
| _ id: String, | |
| _ name: String, | |
| _ isActive: Bool, | |
| _ sessionKey: String) -> Void | |
| extension OpenClawChatViewModel { | |
| public func endPendingToolActivities() { | |
| self.pendingToolCallsById = [:] | |
| } | |
| func reportToolActivityChanges( | |
| from previous: [String: OpenClawChatPendingToolCall], | |
| to current: [String: OpenClawChatPendingToolCall]) | |
| { | |
| for (id, call) in previous where current[id] == nil { | |
| self.onToolActivity?(id, call.name, false, self.sessionKey) | |
| } | |
| for (id, call) in current where previous[id] == nil { | |
| self.onToolActivity?(id, call.name, true, self.sessionKey) | |
| } | |
| } | |
| } | |