(ctx context.Context, data wshrpc.CommandGetWaveAIChatData)
| 1280 | } |
| 1281 | |
| 1282 | func (ws *WshServer) GetWaveAIChatCommand(ctx context.Context, data wshrpc.CommandGetWaveAIChatData) (*uctypes.UIChat, error) { |
| 1283 | aiChat := chatstore.DefaultChatStore.Get(data.ChatId) |
| 1284 | if aiChat == nil { |
| 1285 | return nil, nil |
| 1286 | } |
| 1287 | uiChat, err := aiusechat.ConvertAIChatToUIChat(aiChat) |
| 1288 | if err != nil { |
| 1289 | return nil, fmt.Errorf("error converting AI chat to UI chat: %w", err) |
| 1290 | } |
| 1291 | return uiChat, nil |
| 1292 | } |
| 1293 | |
| 1294 | func (ws *WshServer) GetWaveAIRateLimitCommand(ctx context.Context) (*uctypes.RateLimitInfo, error) { |
| 1295 | return aiusechat.GetGlobalRateLimit(), nil |
nothing calls this directly
no test coverage detected