From a4412e801429aeadb9fdcdb2c045f038316f69c8 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Wed, 9 Apr 2025 02:44:26 -0700 Subject: [PATCH] Update new task tool component styles --- src/core/prompts/responses.ts | 3 -- src/core/task/index.ts | 2 +- src/test/new-task-tool.test.ts | 28 ------------------- .../src/components/chat/NewTaskPreview.tsx | 3 +- 4 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 src/test/new-task-tool.test.ts diff --git a/src/core/prompts/responses.ts b/src/core/prompts/responses.ts index 1f4a573b..caf3827f 100644 --- a/src/core/prompts/responses.ts +++ b/src/core/prompts/responses.ts @@ -209,9 +209,6 @@ Otherwise, if you have not completed the task and do not need additional informa clineRulesFileInstructions: (cwd: string, content: string) => `# .clinerules\n\nThe following is provided by a root-level .clinerules file where the user has specified instructions for this working directory (${cwd.toPosix()})\n\n${content}`, - - newTaskContext: (context: string) => - `Cline wants to start a new task with the following context:\n\n${context}\n\nClick "Start New Task" to start a new task with this context preloaded.`, } // to avoid circular dependency diff --git a/src/core/task/index.ts b/src/core/task/index.ts index d01eea4f..4bf6470f 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -2767,7 +2767,7 @@ export class Task { if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ subtitle: "Cline wants to start a new task...", - message: "Cline is suggesting to start a new task with preloaded context.", + message: `Cline is suggesting to start a new task with: ${context}`, }) } diff --git a/src/test/new-task-tool.test.ts b/src/test/new-task-tool.test.ts deleted file mode 100644 index c026965c..00000000 --- a/src/test/new-task-tool.test.ts +++ /dev/null @@ -1,28 +0,0 @@ -import * as assert from "assert" -import { describe, it } from "mocha" -import { ClineMessage } from "../shared/ExtensionMessage" -import { formatResponse } from "../core/prompts/responses" - -describe("New Task Tool Tests", () => { - it("formatResponse.newTaskContext formats context correctly", () => { - const context = "This is a test context for a new task" - const result = formatResponse.newTaskContext(context) - - assert.strictEqual( - result, - `Cline wants to start a new task with the following context:\n\nThis is a test context for a new task\n\nClick "Start New Task" to start a new task with this context preloaded.`, - ) - }) - - it("ClineAskNewTask interface exists", () => { - // This is a type check test, it will fail at compile time if the interface doesn't exist - const message: ClineMessage = { - ts: Date.now(), - type: "ask", - ask: "new_task", - text: JSON.stringify({ context: "Test context" }), - } - - assert.ok(message) - }) -}) diff --git a/webview-ui/src/components/chat/NewTaskPreview.tsx b/webview-ui/src/components/chat/NewTaskPreview.tsx index 3a601929..ecb831e9 100644 --- a/webview-ui/src/components/chat/NewTaskPreview.tsx +++ b/webview-ui/src/components/chat/NewTaskPreview.tsx @@ -7,7 +7,8 @@ interface NewTaskPreviewProps { const NewTaskPreview: React.FC = ({ context }) => { return ( -
+
+ Task
)