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

Method GetWaveAIChatCommand

pkg/wshrpc/wshserver/wshserver.go:1282–1292  ·  view source on GitHub ↗
(ctx context.Context, data wshrpc.CommandGetWaveAIChatData)

Source from the content-addressed store, hash-verified

1280}
1281
1282func (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
1294func (ws *WshServer) GetWaveAIRateLimitCommand(ctx context.Context) (*uctypes.RateLimitInfo, error) {
1295 return aiusechat.GetGlobalRateLimit(), nil

Callers

nothing calls this directly

Calls 2

ConvertAIChatToUIChatFunction · 0.92
GetMethod · 0.45

Tested by

no test coverage detected