Skip to content

Commit 5edaa61

Browse files
authored
Refactor regex and increase max AI response length
Updated regex matching for safety and adjusted response length limits. Signed-off-by: Dima Birenbaum <[email protected]>
1 parent 470c496 commit 5edaa61

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

.github/workflows/issue-assistant.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ jobs:
192192
// Strip bot metadata from display
193193
let content = comment.body;
194194
if (isBot) {
195-
// FIX: Changed [^-]* to [^>]* for safer regex matching
196195
content = content
197196
.replace(/<!-- msdo-issue-assistant[^>]*-->/g, '')
198197
.replace(/<details>[\s\S]*?<\/details>/g, '')
@@ -224,7 +223,6 @@ jobs:
224223
console.log(`Will respond. Next state: ${nextState}`);
225224
console.log(`Conversation turns: ${history.length}`);
226225
227-
// FIX: Limit history to prevent output size issues (GitHub has 1MB limit)
228226
const MAX_HISTORY_TURNS = 10;
229227
const trimmedHistory = history.slice(-MAX_HISTORY_TURNS);
230228
@@ -389,7 +387,6 @@ jobs:
389387
390388
// Response validation constants
391389
const MIN_AI_RESPONSE_LENGTH = 20;
392-
// FIX: Increased from 1000 to 1500 to accommodate responses with wiki URLs
393390
const MAX_AI_RESPONSE_LENGTH = 1500;
394391
395392
let wikiContext = '';

0 commit comments

Comments
 (0)