fix: suppress emoji in voice/assistant mode and clean up system prompt
- Add no-emoji instruction to voice mode prompt for natural TTS output - Apply voice mode prompt to both "voice" and "assistant" input modes - Remove redundant identity header from system prompt (covered by IDENTITY.md) - Simplify runtime info to "Termux (Android)" - Remove emoji from IDENTITY.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5069da9641
commit
9906a67d06
3 changed files with 7 additions and 13 deletions
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
|
@ -76,20 +75,14 @@ func (cb *ContextBuilder) SetEnabledChannels(channels []string) {
|
|||
func (cb *ContextBuilder) getIdentity() string {
|
||||
now := time.Now().Format("2006-01-02 15:04 (Monday)")
|
||||
workspacePath, _ := filepath.Abs(filepath.Join(cb.workspace))
|
||||
runtime := fmt.Sprintf("%s %s, Go %s", runtime.GOOS, runtime.GOARCH, runtime.Version())
|
||||
|
||||
// Build tools section dynamically
|
||||
toolsSection := cb.buildToolsSection()
|
||||
|
||||
return fmt.Sprintf(`# picoclaw 🦞
|
||||
|
||||
You are picoclaw, a helpful AI assistant.
|
||||
|
||||
## Current Time
|
||||
return fmt.Sprintf(`## Current Time
|
||||
%s
|
||||
|
||||
## Runtime
|
||||
%s
|
||||
Termux (Android)
|
||||
|
||||
## Workspace
|
||||
Your workspace is at: %s
|
||||
|
|
@ -107,7 +100,7 @@ Your workspace is at: %s
|
|||
- append_daily: Record today's events and memos (diary-like daily entries)
|
||||
- read_long_term: Read long-term memory
|
||||
- read_daily: Read today's daily notes`,
|
||||
now, runtime, workspacePath, toolsSection)
|
||||
now, workspacePath, toolsSection)
|
||||
}
|
||||
|
||||
func (cb *ContextBuilder) buildChannelsSection() string {
|
||||
|
|
@ -228,8 +221,8 @@ func (cb *ContextBuilder) BuildMessages(history []providers.Message, summary str
|
|||
channel, chatID, inputMode)
|
||||
}
|
||||
|
||||
// Add voice mode instructions when input is from voice
|
||||
if inputMode == "voice" {
|
||||
// Add voice mode instructions when input is from voice or assistant
|
||||
if inputMode == "voice" || inputMode == "assistant" {
|
||||
systemPrompt += voiceModePrompt()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ The user is currently speaking to you via voice input. Your response will be rea
|
|||
- Do NOT use markdown formatting (no headers, bold, code blocks, tables, bullet lists)
|
||||
- Use natural spoken language as if having a conversation
|
||||
- Spell out numbers and avoid special characters that sound awkward when spoken
|
||||
- Do NOT use emoji, emoticons, or kaomoji (e.g. 😊, (^^), ♪) — they are read aloud by TTS and sound unnatural
|
||||
- If the user explicitly asks for more detail, provide longer explanations but still in natural spoken language without markdown
|
||||
- If code, file contents, or highly technical output is needed, briefly summarize and suggest switching to text mode for the full details`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Identity
|
||||
|
||||
## Name
|
||||
PicoClaw 🦞
|
||||
PicoClaw
|
||||
|
||||
## Description
|
||||
Ultra-lightweight personal AI assistant written in Go, inspired by nanobot.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue