Changesets · Branches · Tags · Compare
| Changeset | ea37f838133292f0dae734dae991913c7b4436ecb6f818042cba25e1b1ecc18c |
|---|---|
| Author | Nate <sestinj@gmail.com> · 2025-08-23 12:32 -07:00 |
| Committer | Nate <sestinj@gmail.com> · 2025-08-23 12:32 -07:00 |
| Parents | 92c2e1059605 |
3 files changed
modified extensions/cli/src/systemMessage.test.ts +55 −14
| @@ -151,28 +151,46 @@ | ||
| 151 | 151 | const result = await constructSystemMessage(undefined, "json"); |
| 152 | 152 | |
| 153 | 153 | expect(result).toContain("You are an agent in the Continue CLI"); |
| 154 | - expect(result).toContain("IMPORTANT: You are operating in JSON output mode"); | |
| 154 | + expect(result).toContain( | |
| 155 | + "IMPORTANT: You are operating in JSON output mode", | |
| 156 | + ); | |
| 155 | 157 | expect(result).toContain("Your final response MUST be valid JSON"); |
| 156 | 158 | expect(result).toContain("JSON.parse()"); |
| 157 | 159 | }); |
| 158 | 160 | |
| 159 | 161 | it("should add plan mode instructions when mode is plan", async () => { |
| 160 | - const result = await constructSystemMessage(undefined, undefined, false, "plan"); | |
| 162 | + const result = await constructSystemMessage( | |
| 163 | + undefined, | |
| 164 | + undefined, | |
| 165 | + false, | |
| 166 | + "plan", | |
| 167 | + ); | |
| 161 | 168 | |
| 162 | 169 | expect(result).toContain("You are an agent in the Continue CLI"); |
| 163 | 170 | expect(result).toContain("PLAN MODE: You are operating in plan mode"); |
| 164 | - expect(result).toContain("which means that your goal is to help the user investigate their ideas"); | |
| 171 | + expect(result).toContain( | |
| 172 | + "which means that your goal is to help the user investigate their ideas", | |
| 173 | + ); | |
| 165 | 174 | expect(result).toContain("develop a plan before taking action"); |
| 166 | 175 | expect(result).toContain("read-only tools"); |
| 167 | - expect(result).toContain("should not attempt to circumvent them to write / delete / create files"); | |
| 176 | + expect(result).toContain( | |
| 177 | + "should not attempt to circumvent them to write / delete / create files", | |
| 178 | + ); | |
| 168 | 179 | }); |
| 169 | 180 | |
| 170 | 181 | it("should not add plan mode instructions when mode is not plan", async () => { |
| 171 | - const result = await constructSystemMessage(undefined, undefined, false, "normal"); | |
| 182 | + const result = await constructSystemMessage( | |
| 183 | + undefined, | |
| 184 | + undefined, | |
| 185 | + false, | |
| 186 | + "normal", | |
| 187 | + ); | |
| 172 | 188 | |
| 173 | 189 | expect(result).toContain("You are an agent in the Continue CLI"); |
| 174 | 190 | expect(result).not.toContain("PLAN MODE: You are operating in plan mode"); |
| 175 | - expect(result).not.toContain("which means that your goal is to help the user investigate their ideas"); | |
| 191 | + expect(result).not.toContain( | |
| 192 | + "which means that your goal is to help the user investigate their ideas", | |
| 193 | + ); | |
| 176 | 194 | }); |
| 177 | 195 | |
| 178 | 196 | it("should not add plan mode instructions when mode is undefined", async () => { |
| @@ -180,11 +198,18 @@ | ||
| 180 | 198 | |
| 181 | 199 | expect(result).toContain("You are an agent in the Continue CLI"); |
| 182 | 200 | expect(result).not.toContain("PLAN MODE: You are operating in plan mode"); |
| 183 | - expect(result).not.toContain("which means that your goal is to help the user investigate their ideas"); | |
| 201 | + expect(result).not.toContain( | |
| 202 | + "which means that your goal is to help the user investigate their ideas", | |
| 203 | + ); | |
| 184 | 204 | }); |
| 185 | 205 | |
| 186 | 206 | it("should include basic plan mode description", async () => { |
| 187 | - const result = await constructSystemMessage(undefined, undefined, false, "plan"); | |
| 207 | + const result = await constructSystemMessage( | |
| 208 | + undefined, | |
| 209 | + undefined, | |
| 210 | + false, | |
| 211 | + "plan", | |
| 212 | + ); | |
| 188 | 213 | |
| 189 | 214 | expect(result).toContain("PLAN MODE: You are operating in plan mode"); |
| 190 | 215 | expect(result).toContain("read-only tools"); |
| @@ -192,18 +217,34 @@ | ||
| 192 | 217 | }); |
| 193 | 218 | |
| 194 | 219 | it("should combine plan mode with headless mode instructions", async () => { |
| 195 | - const result = await constructSystemMessage(undefined, undefined, true, "plan"); | |
| 220 | + const result = await constructSystemMessage( | |
| 221 | + undefined, | |
| 222 | + undefined, | |
| 223 | + true, | |
| 224 | + "plan", | |
| 225 | + ); | |
| 196 | 226 | |
| 197 | 227 | expect(result).toContain("IMPORTANT: You are running in headless mode"); |
| 198 | 228 | expect(result).toContain("PLAN MODE: You are operating in plan mode"); |
| 199 | - expect(result).toContain("which means that your goal is to help the user investigate their ideas"); | |
| 229 | + expect(result).toContain( | |
| 230 | + "which means that your goal is to help the user investigate their ideas", | |
| 231 | + ); | |
| 200 | 232 | }); |
| 201 | 233 | |
| 202 | 234 | it("should combine plan mode with JSON format instructions", async () => { |
| 203 | - const result = await constructSystemMessage(undefined, "json", false, "plan"); | |
| 204 | - | |
| 205 | - expect(result).toContain("IMPORTANT: You are operating in JSON output mode"); | |
| 235 | + const result = await constructSystemMessage( | |
| 236 | + undefined, | |
| 237 | + "json", | |
| 238 | + false, | |
| 239 | + "plan", | |
| 240 | + ); | |
| 241 | + | |
| 242 | + expect(result).toContain( | |
| 243 | + "IMPORTANT: You are operating in JSON output mode", | |
| 244 | + ); | |
| 206 | 245 | expect(result).toContain("PLAN MODE: You are operating in plan mode"); |
| 207 | - expect(result).toContain("which means that your goal is to help the user investigate their ideas"); | |
| 246 | + expect(result).toContain( | |
| 247 | + "which means that your goal is to help the user investigate their ideas", | |
| 248 | + ); | |
| 208 | 249 | }); |
| 209 | 250 | }); |
modified extensions/cli/src/systemMessage.ts +1 −1
| @@ -196,7 +196,7 @@ | ||
| 196 | 196 | systemMessage += ` |
| 197 | 197 | |
| 198 | 198 | PLAN MODE: You are operating in plan mode, which means that your goal is to help the user investigate their ideas and develop a plan before taking action. You only have access to read-only tools and should not attempt to circumvent them to write / delete / create files.`; |
| 199 | -} | |
| 199 | + } | |
| 200 | 200 | |
| 201 | 201 | // Add rules section if we have any rules or agent content |
| 202 | 202 | if (agentContent || processedRules.length > 0) { |
modified package-lock.json +1 −1
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | { |
| 2 | - "name": "wt-nate-4", | |
| 2 | + "name": "wt-plan-mode-sys-prompt", | |
| 3 | 3 | "lockfileVersion": 3, |
| 4 | 4 | "requires": true, |
| 5 | 5 | "packages": { |