Update new task tool component styles
This commit is contained in:
1 parent
36f7abb8ec
commit
a4412e8014
4 files changed
+3
-33
No files matched your search
@@ -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
|
||||
|
||||
@@ -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}`,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
})
|
||||
@@ -7,7 +7,8 @@ interface NewTaskPreviewProps {
|
||||
|
||||
const NewTaskPreview: React.FC<NewTaskPreviewProps> = ({ context }) => {
|
||||
return (
|
||||
<div className="bg-[var(--vscode-badge-background)] text-[var(--vscode-badge-foreground)] rounded-[3px] p-[9px] pt-0 border-t-8 border-[var(--vscode-charts-green)]">
|
||||
<div className="bg-[var(--vscode-badge-background)] text-[var(--vscode-badge-foreground)] rounded-[3px] p-[14px] pb-[6px]">
|
||||
<span style={{ fontWeight: "bold" }}>Task</span>
|
||||
<MarkdownBlock markdown={context} />
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user