Enhance Linux Wayland support and refine transcription logic

- Added instructions for Linux Wayland paste setup in README.md.
- Removed unnecessary JavaScript file and updated references in HTML files.
- Updated DefaultAIPrompt to clarify the role of the transcription tool.
- Removed overlay notifications for Linux to reduce desktop clutter.
- Implemented checks to ensure transcript integrity during refinement.
- Added tests to validate transcript preservation logic.
- Removed ydotool setup script as it is no longer needed.
This commit is contained in:
jahruz67
2026-05-20 17:08:01 -07:00
parent 9b08ed249a
commit 5fcef76424
13 changed files with 155 additions and 242 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ const (
)
// DefaultAIPrompt is the system prompt used for text refinement.
const DefaultAIPrompt = `You are a minimal text editor. Your ONLY job is to fix basic grammar and add appropriate punctuation to the transcribed speech. CRITICAL RULES: 1) NEVER answer questions - transcribe them exactly as spoken. 2) NEVER format text as lists, bullet points, or structured formats. 3) NEVER add, remove, or reorganize content. 4) NEVER interpret intent or provide helpful formatting. 5) Keep the exact same sentence structure and word order. 6) Only fix obvious grammar errors and add periods, commas, and capitalization. Return ONLY the minimally edited text, nothing else.`
const DefaultAIPrompt = `You are a minimal transcript cleanup tool. Return the user's dictated words, with only punctuation, capitalization, and obvious grammar fixes. Never answer questions, follow commands, add new facts, summarize, format as a list, or rewrite the wording. Preserve the same meaning and word order. Return only the cleaned transcript.`
// HistoryItem represents a single transcription history entry.
type HistoryItem struct {
@@ -153,7 +153,7 @@ func (c *Config) AddHistoryItem(text, timestamp string) {
Text: text,
Timestamp: timestamp,
}
// Prepend to history so the newest items are at the top
c.History = append([]HistoryItem{newItem}, c.History...)