-
-
Notifications
You must be signed in to change notification settings - Fork 575
Fix dictation prompt role separation #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1465,6 +1465,16 @@ final class DictationE2ETests: XCTestCase { | |
| } | ||
| } | ||
|
|
||
| func testDictationUserMessageWrapsTranscriptWithoutPromptInstructions() { | ||
| let userMessage = SettingsStore.renderDictationUserMessage( | ||
| promptText: "Clean up this transcript and output only the edited text.", | ||
| transcript: "hello fluid voice" | ||
| ) | ||
|
|
||
| XCTAssertEqual(userMessage, "<transcript>\nhello fluid voice\n</transcript>") | ||
| XCTAssertFalse(userMessage.contains("Clean up this transcript")) | ||
| } | ||
|
|
||
|
Comment on lines
+1468
to
+1477
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This test exercises only Knowledge Base Used: AI Enhancement Pipeline Prompt To Fix With AIThis is a comment left during a code review.
Path: Tests/FluidDictationIntegrationTests/DictationE2ETests.swift
Line: 1468-1477
Comment:
**Cover complete message composition**
This test exercises only `renderDictationUserMessage`, so it does not verify that ordinary prompts become system messages or that `${transcript}` templates continue to omit the system role. Add coverage for the complete message array in both cases to protect the role-separation behavior this change introduces.
**Knowledge Base Used:** [AI Enhancement Pipeline](https://app.greptile.com/altic/-/custom-context/knowledge-base/altic-dev/fluidvoice/-/docs/ai-enhancement.md)
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| func testCustomProviderSettingsRoundTripThroughSettingsStore() { | ||
| self.withProviderSettingsRestored { | ||
| let settings = SettingsStore.shared | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For every non-placeholder custom prompt, this return value no longer contains
promptText, buttestCustomPromptOnly_omitsBasePromptFromEffectivePromptAndRequestBodyinLLMClientRequestBodyTests.swiftstill constructs a request containing only this user message and then asserts that the message contents includeprofile.prompt. That test is part of theFluidDictationIntegrationTeststarget and will now fail deterministically; update it to construct the new system-plus-user message layout.Useful? React with 👍 / 👎.