remove voice history cut and fix lint

This commit is contained in:
Huaaudio 2026-03-23 15:03:10 +01:00
parent c7be7f9f0d
commit 241eb6c770
2 changed files with 4 additions and 3 deletions

View file

@ -88,7 +88,6 @@ type processOptions struct {
SendResponse bool // Whether to send response via bus SendResponse bool // Whether to send response via bus
NoHistory bool // If true, don't load session history (for heartbeat) 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) 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 { type continuationTarget struct {

View file

@ -78,7 +78,8 @@ func (t *SendTTSTool) Execute(ctx context.Context, args map[string]any) *ToolRes
} }
defer stream.Close() 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) 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() 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) return ErrorResult(fmt.Sprintf("failed to write tts audio: %v", err)).WithError(err)
} }