From 241eb6c7700284e5ad34aafd149ad52d2b72477b Mon Sep 17 00:00:00 2001 From: Huaaudio Date: Mon, 23 Mar 2026 15:03:10 +0100 Subject: [PATCH] remove voice history cut and fix lint --- pkg/agent/loop.go | 1 - pkg/tools/tts_send.go | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index b561b619e..a3a0b328d 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -88,7 +88,6 @@ type processOptions struct { SendResponse bool // Whether to send response via bus NoHistory bool // If true, don't load session history (for heartbeat) SkipInitialSteeringPoll bool // If true, skip the steering poll at loop start (used by Continue) - IsVoice bool // If true, treat the message as voice input (transcribe before steering) } type continuationTarget struct { diff --git a/pkg/tools/tts_send.go b/pkg/tools/tts_send.go index 4fae77a50..71dd7e593 100644 --- a/pkg/tools/tts_send.go +++ b/pkg/tools/tts_send.go @@ -78,7 +78,8 @@ func (t *SendTTSTool) Execute(ctx context.Context, args map[string]any) *ToolRes } defer stream.Close() - if err := os.MkdirAll(media.TempDir(), 0o755); err != nil { + err = os.MkdirAll(media.TempDir(), 0o755) + if err != nil { return ErrorResult(fmt.Sprintf("failed to create media temp dir: %v", err)).WithError(err) } @@ -88,7 +89,8 @@ func (t *SendTTSTool) Execute(ctx context.Context, args map[string]any) *ToolRes } defer file.Close() - if _, err := io.Copy(file, stream); err != nil { + _, err = io.Copy(file, stream) + if err != nil { return ErrorResult(fmt.Sprintf("failed to write tts audio: %v", err)).WithError(err) }