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"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -76,20 +75,14 @@ func (cb *ContextBuilder) SetEnabledChannels(channels []string) {
|
||||||
func (cb *ContextBuilder) getIdentity() string {
|
func (cb *ContextBuilder) getIdentity() string {
|
||||||
now := time.Now().Format("2006-01-02 15:04 (Monday)")
|
now := time.Now().Format("2006-01-02 15:04 (Monday)")
|
||||||
workspacePath, _ := filepath.Abs(filepath.Join(cb.workspace))
|
workspacePath, _ := filepath.Abs(filepath.Join(cb.workspace))
|
||||||
runtime := fmt.Sprintf("%s %s, Go %s", runtime.GOOS, runtime.GOARCH, runtime.Version())
|
|
||||||
|
|
||||||
// Build tools section dynamically
|
// Build tools section dynamically
|
||||||
toolsSection := cb.buildToolsSection()
|
toolsSection := cb.buildToolsSection()
|
||||||
|
|
||||||
return fmt.Sprintf(`# picoclaw 🦞
|
return fmt.Sprintf(`## Current Time
|
||||||
|
|
||||||
You are picoclaw, a helpful AI assistant.
|
|
||||||
|
|
||||||
## Current Time
|
|
||||||
%s
|
%s
|
||||||
|
|
||||||
## Runtime
|
## Runtime
|
||||||
%s
|
Termux (Android)
|
||||||
|
|
||||||
## Workspace
|
## Workspace
|
||||||
Your workspace is at: %s
|
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)
|
- append_daily: Record today's events and memos (diary-like daily entries)
|
||||||
- read_long_term: Read long-term memory
|
- read_long_term: Read long-term memory
|
||||||
- read_daily: Read today's daily notes`,
|
- read_daily: Read today's daily notes`,
|
||||||
now, runtime, workspacePath, toolsSection)
|
now, workspacePath, toolsSection)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cb *ContextBuilder) buildChannelsSection() string {
|
func (cb *ContextBuilder) buildChannelsSection() string {
|
||||||
|
|
@ -228,8 +221,8 @@ func (cb *ContextBuilder) BuildMessages(history []providers.Message, summary str
|
||||||
channel, chatID, inputMode)
|
channel, chatID, inputMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add voice mode instructions when input is from voice
|
// Add voice mode instructions when input is from voice or assistant
|
||||||
if inputMode == "voice" {
|
if inputMode == "voice" || inputMode == "assistant" {
|
||||||
systemPrompt += voiceModePrompt()
|
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)
|
- Do NOT use markdown formatting (no headers, bold, code blocks, tables, bullet lists)
|
||||||
- Use natural spoken language as if having a conversation
|
- Use natural spoken language as if having a conversation
|
||||||
- Spell out numbers and avoid special characters that sound awkward when spoken
|
- 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 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`
|
- 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
|
# Identity
|
||||||
|
|
||||||
## Name
|
## Name
|
||||||
PicoClaw 🦞
|
PicoClaw
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
Ultra-lightweight personal AI assistant written in Go, inspired by nanobot.
|
Ultra-lightweight personal AI assistant written in Go, inspired by nanobot.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue