Expose AI Assist custom system prompts - #15
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14.
What changed
Question.aiAssistCustomSystemPromptfromai_assist_custom_system_promptWhy
Question-specific AI Assist instructions were returned by the API but discarded by CoderPadKit, preventing faithful review and synchronization of AI-enabled questions.
Validation
swift test— 119 tests passedCI note
The macOS build/test check passes. The SwiftLint job currently fails on 35 pre-existing violations in unrelated Screen files on the base branch; none are in this PR’s changed files.
Note
Low Risk
Additive optional field and mock merge fix; no auth or breaking API changes to existing initializers.
Overview
Adds
Question.aiAssistCustomSystemPrompt(ai_assist_custom_system_prompt) so interviewer-only AI Assist instructions from the API are decoded, sent on create/update, and kept on optimistic question copies instead of being dropped.Mock server: create responses persist the field;
allQuestions()now merges updates onto session-created questions (not only fixtures) so PUT round-trips work for new IDs.Tests cover decode (present / null / absent), mock create+update, and spacing preservation.
Reviewed by Cursor Bugbot for commit a1fb3c9. Bugbot is set up for automated code reviews on this repo. Configure here.