@@ -22,6 +22,7 @@ import (
2222 "github.com/wavetermdev/waveterm/pkg/telemetry"
2323 "github.com/wavetermdev/waveterm/pkg/telemetry/telemetrydata"
2424 "github.com/wavetermdev/waveterm/pkg/util/ds"
25+ "github.com/wavetermdev/waveterm/pkg/util/logutil"
2526 "github.com/wavetermdev/waveterm/pkg/util/utilfn"
2627 "github.com/wavetermdev/waveterm/pkg/waveobj"
2728 "github.com/wavetermdev/waveterm/pkg/web/sse"
@@ -143,7 +144,6 @@ func shouldUsePremium() bool {
143144}
144145
145146func updateRateLimit (info * uctypes.RateLimitInfo ) {
146- log .Printf ("updateRateLimit: %#v\n " , info )
147147 if info == nil {
148148 return
149149 }
@@ -234,7 +234,7 @@ func processToolCall(toolCall uctypes.WaveToolCall, chatOpts uctypes.WaveChatOpt
234234 }
235235
236236 inputJSON , _ := json .Marshal (toolCall .Input )
237- log . Printf ("TOOLUSE name=%s id=%s input=%s approval=%q\n " , toolCall .Name , toolCall .ID , utilfn .TruncateString (string (inputJSON ), 40 ), toolCall .ToolUseData .Approval )
237+ logutil . DevPrintf ("TOOLUSE name=%s id=%s input=%s approval=%q\n " , toolCall .Name , toolCall .ID , utilfn .TruncateString (string (inputJSON ), 40 ), toolCall .ToolUseData .Approval )
238238
239239 if toolCall .ToolUseData .Status == uctypes .ToolUseStatusError {
240240 errorMsg := toolCall .ToolUseData .ErrorMessage
@@ -349,7 +349,6 @@ func processToolCalls(stopReason *uctypes.WaveStopReason, chatOpts uctypes.WaveC
349349}
350350
351351func RunAIChat (ctx context.Context , sseHandler * sse.SSEHandlerCh , chatOpts uctypes.WaveChatOpts ) (* uctypes.AIMetrics , error ) {
352- log .Printf ("RunAIChat\n " )
353352 if ! activeChats .SetUnless (chatOpts .ChatId , true ) {
354353 return nil , fmt .Errorf ("chat %s is already running" , chatOpts .ChatId )
355354 }
@@ -488,7 +487,6 @@ func ResolveToolCall(toolCall uctypes.WaveToolCall, chatOpts uctypes.WaveChatOpt
488487}
489488
490489func WaveAIPostMessageWrap (ctx context.Context , sseHandler * sse.SSEHandlerCh , message * uctypes.AIMessage , chatOpts uctypes.WaveChatOpts ) error {
491- log .Printf ("WaveAIPostMessageWrap\n " )
492490 startTime := time .Now ()
493491
494492 // Convert AIMessage to Anthropic chat message
@@ -531,7 +529,7 @@ func WaveAIPostMessageWrap(ctx context.Context, sseHandler *sse.SSEHandlerCh, me
531529 }
532530 }
533531 }
534- log .Printf ("metrics: requests=%d tools=%d premium=%d proxy=%d images=%d pdfs=%d textdocs=%d textlen=%d duration=%dms error=%v\n " ,
532+ log .Printf ("WaveAI call metrics: requests=%d tools=%d premium=%d proxy=%d images=%d pdfs=%d textdocs=%d textlen=%d duration=%dms error=%v\n " ,
535533 metrics .RequestCount , metrics .ToolUseCount , metrics .PremiumReqCount , metrics .ProxyReqCount ,
536534 metrics .ImageCount , metrics .PDFCount , metrics .TextDocCount , metrics .TextLen , metrics .RequestDuration , metrics .HadError )
537535
0 commit comments