MCPcopy
hub / github.com/wavetermdev/waveterm / updateRateLimit

Function updateRateLimit

pkg/aiusechat/usechat.go:160–173  ·  view source on GitHub ↗
(info *uctypes.RateLimitInfo)

Source from the content-addressed store, hash-verified

158}
159
160func updateRateLimit(info *uctypes.RateLimitInfo) {
161 if info == nil {
162 return
163 }
164 rateLimitLock.Lock()
165 defer rateLimitLock.Unlock()
166 globalRateLimitInfo = info
167 go func() {
168 wps.Broker.Publish(wps.WaveEvent{
169 Event: wps.Event_WaveAIRateLimit,
170 Data: info,
171 })
172 }()
173}
174
175func GetGlobalRateLimit() *uctypes.RateLimitInfo {
176 rateLimitLock.Lock()

Callers 1

runAIChatStepFunction · 0.85

Calls 1

PublishMethod · 0.80

Tested by

no test coverage detected