remove voice history cut and fix lint
This commit is contained in:
parent
4b6fd66e04
commit
29373f121d
2 changed files with 4 additions and 3 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue