Commit 330bb94
Fix system prompt flow: ensure system prompts reach OpenAI API
- Fixed critical bug where system prompts weren't making it to OpenAI completions API
- Root cause: Chat initialization only created user message, ignored systemPromptDrafts
- Updated chat initialization to check systemPromptDrafts.get(chatId) and build proper messages array
- System prompt now becomes part of permanent chat history from start
- OpenAI API now receives complete messages array with system prompt included
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: AnthonyRonning <AnthonyRonning@users.noreply.github.com>1 parent 693bd3c commit 330bb94
1 file changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
166 | | - | |
| 178 | + | |
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
| |||
0 commit comments