mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
- 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.
31 lines
939 B
Go
31 lines
939 B
Go
package transcriber
|
|
|
|
import "testing"
|
|
|
|
func TestRefinementPreservesTranscriptAllowsLightCleanup(t *testing.T) {
|
|
original := "hello there this is a quick test"
|
|
refined := "Hello there, this is a quick test."
|
|
|
|
if !refinementPreservesTranscript(original, refined) {
|
|
t.Fatalf("expected light punctuation cleanup to be accepted")
|
|
}
|
|
}
|
|
|
|
func TestRefinementPreservesTranscriptRejectsUnrelatedOutput(t *testing.T) {
|
|
original := "what time is the meeting tomorrow"
|
|
refined := "The meeting is at 2 PM tomorrow."
|
|
|
|
if refinementPreservesTranscript(original, refined) {
|
|
t.Fatalf("expected answer-like rewrite to be rejected")
|
|
}
|
|
}
|
|
|
|
func TestRefinementPreservesTranscriptRejectsPreface(t *testing.T) {
|
|
original := "send the draft when you are done"
|
|
refined := "Here is the corrected text: Send the draft when you are done."
|
|
|
|
if refinementPreservesTranscript(original, refined) {
|
|
t.Fatalf("expected assistant preface to be rejected")
|
|
}
|
|
}
|