From 9906a67d06bc90f0541990954128c2ccaac1c5cd Mon Sep 17 00:00:00 2001 From: KoheiYamashita Date: Sun, 22 Feb 2026 00:32:46 +0900 Subject: [PATCH] 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 --- pkg/agent/context.go | 17 +++++------------ pkg/agent/voice_prompt.go | 1 + workspace/IDENTITY.md | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/pkg/agent/context.go b/pkg/agent/context.go index 6d2263ee8..9ae6bf282 100644 --- a/pkg/agent/context.go +++ b/pkg/agent/context.go @@ -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() } diff --git a/pkg/agent/voice_prompt.go b/pkg/agent/voice_prompt.go index 6b5f83766..ac6f6e540 100644 --- a/pkg/agent/voice_prompt.go +++ b/pkg/agent/voice_prompt.go @@ -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` } diff --git a/workspace/IDENTITY.md b/workspace/IDENTITY.md index dabb0e14b..d7a7550bc 100644 --- a/workspace/IDENTITY.md +++ b/workspace/IDENTITY.md @@ -1,7 +1,7 @@ # Identity ## Name -PicoClaw 🦞 +PicoClaw ## Description Ultra-lightweight personal AI assistant written in Go, inspired by nanobot.