You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 86615d1
Browse filesBrowse the repository at this point in the historyBrowse files
test('returns unchanged text when no promise tags present',()=>{
6
+
consttext='This is a normal plan without any special tags'
7
+
const{ cleaned, stripped }=stripPromiseTags(text)
8
+
expect(cleaned).toBe(text)
9
+
expect(stripped).toBe(false)
10
+
})
11
+
12
+
test('strips bare promise tags',()=>{
13
+
consttext='Plan text here <promise>All phases of the plan have been completed successfully</promise>'
14
+
const{ cleaned, stripped }=stripPromiseTags(text)
15
+
expect(cleaned).toBe('Plan text here')
16
+
expect(stripped).toBe(true)
17
+
expect(cleaned).not.toContain('<promise>')
18
+
})
19
+
20
+
test('strips full instruction block with promise tags',()=>{
21
+
consttext=`Plan text here
22
+
23
+
---
24
+
25
+
**IMPORTANT - Completion Signal:** When you have completed ALL phases of this plan successfully, you MUST output the following tag exactly: <promise>All phases of the plan have been completed successfully</promise>
26
+
27
+
Do NOT output this tag until every phase is truly complete. The loop will continue until this signal is detected.`
0 commit comments