Elffuss BraidHub

kikocis/continue public

chore: format
Changesetea37f838133292f0dae734dae991913c7b4436ecb6f818042cba25e1b1ecc18c
AuthorNate <sestinj@gmail.com> · 2025-08-23 12:32 -07:00
CommitterNate <sestinj@gmail.com> · 2025-08-23 12:32 -07:00
Parents92c2e1059605

Browse the files at this changeset

3 files changed

modified extensions/cli/src/systemMessage.test.ts +55 −14
@@ -151,28 +151,46 @@
151151 const result = await constructSystemMessage(undefined, "json");
152152
153153 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+ );
155157 expect(result).toContain("Your final response MUST be valid JSON");
156158 expect(result).toContain("JSON.parse()");
157159 });
158160
159161 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+ );
161168
162169 expect(result).toContain("You are an agent in the Continue CLI");
163170 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+ );
165174 expect(result).toContain("develop a plan before taking action");
166175 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+ );
168179 });
169180
170181 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+ );
172188
173189 expect(result).toContain("You are an agent in the Continue CLI");
174190 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+ );
176194 });
177195
178196 it("should not add plan mode instructions when mode is undefined", async () => {
@@ -180,11 +198,18 @@
180198
181199 expect(result).toContain("You are an agent in the Continue CLI");
182200 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+ );
184204 });
185205
186206 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+ );
188213
189214 expect(result).toContain("PLAN MODE: You are operating in plan mode");
190215 expect(result).toContain("read-only tools");
@@ -192,18 +217,34 @@
192217 });
193218
194219 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+ );
196226
197227 expect(result).toContain("IMPORTANT: You are running in headless mode");
198228 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+ );
200232 });
201233
202234 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+ );
206245 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+ );
208249 });
209250 });
modified extensions/cli/src/systemMessage.ts +1 −1
@@ -196,7 +196,7 @@
196196 systemMessage += `
197197
198198 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+ }
200200
201201 // Add rules section if we have any rules or agent content
202202 if (agentContent || processedRules.length > 0) {
modified package-lock.json +1 −1
@@ -1,5 +1,5 @@
11 {
2- "name": "wt-nate-4",
2+ "name": "wt-plan-mode-sys-prompt",
33 "lockfileVersion": 3,
44 "requires": true,
55 "packages": {