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
// initializing new instance of Cline will make sure that any agentically running promises in old instance don't affect our new task. this essentially creates a fresh slate for the new task
Copy file name to clipboardExpand all lines: src/core/prompts/commands.ts
+62Lines changed: 62 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,3 +25,65 @@ Usage:
25
25
Below is the the user's input when they indicated that they wanted to create a new task.
26
26
</explicit_instructions>\n
27
27
`
28
+
29
+
exportconstcondenseToolResponse=()=>
30
+
`<explicit_instructions type="condense">
31
+
The user has explicitly asked you to create a detailed summary of the conversation so far, which will be used to compact the current context window while retaining key information. The user may have provided instructions or additional information for you to consider when summarizing the conversation.
32
+
Irrespective of whether additional information or instructions are given, you are only allowed to respond to this message by calling the condense tool.
33
+
34
+
The condense tool is defined below:
35
+
36
+
Description:
37
+
Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. This summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing with the conversation and supporting any continuing tasks.
38
+
The user will be presented with a preview of your generated summary and can choose to use it to compact their context window or keep chatting in the current conversation.
39
+
Users may refer to this tool as 'smol' or 'compact' as well. You should consider these to be equivalent to 'condense' when used in a similar context.
40
+
41
+
Parameters:
42
+
- Context: (required) The context to continue the conversation with. If applicable based on the current task, this should include:
43
+
1. Previous Conversation: High level details about what was discussed throughout the entire conversation with the user. This should be written to allow someone to be able to follow the general overarching conversation flow.
44
+
2. Current Work: Describe in detail what was being worked on prior to this request to compact the context window. Pay special attention to the more recent messages / conversation.
45
+
3. Key Technical Concepts: List all important technical concepts, technologies, coding conventions, and frameworks discussed, which might be relevant for continuing with this work.
46
+
4. Relevant Files and Code: If applicable, enumerate specific files and code sections examined, modified, or created for the task continuation. Pay special attention to the most recent messages and changes.
47
+
5. Problem Solving: Document problems solved thus far and any ongoing troubleshooting efforts.
48
+
6. Pending Tasks and Next Steps: Outline all pending tasks that you have explicitly been asked to work on, as well as list the next steps you will take for all outstanding work, if applicable. Include code snippets where they add clarity. For any next steps, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no information loss in context between tasks.
49
+
50
+
Usage:
51
+
<condense>
52
+
<context>Your detailed summary</context>
53
+
</condense>
54
+
55
+
Example:
56
+
<condense>
57
+
<context>
58
+
1. Previous Conversation:
59
+
[Detailed description]
60
+
61
+
2. Current Work:
62
+
[Detailed description]
63
+
64
+
3. Key Technical Concepts:
65
+
- [Concept 1]
66
+
- [Concept 2]
67
+
- [...]
68
+
69
+
4. Relevant Files and Code:
70
+
- [File Name 1]
71
+
- [Summary of why this file is important]
72
+
- [Summary of the changes made to this file, if any]
Copy file name to clipboardExpand all lines: src/core/prompts/responses.ts
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ export const formatResponse = {
10
10
contextTruncationNotice: ()=>
11
11
`[NOTE] Some previous conversation history with the user has been removed to maintain optimal context window length. The initial user task and the most recent exchanges have been retained for continuity, while intermediate conversation history has been removed. Please keep this in mind as you continue assisting the user.`,
12
12
13
+
condense: ()=>
14
+
`The user has accepted the condensed conversation summary you generated. This summary covers important details of the historical conversation with the user which has been truncated.\n<explicit_instructions type="condense_response">It's crucial that you respond by ONLY asking the user what you should work on next. You should NOT take any initiative or make any assumptions about continuing with work. For example you should NOT suggest file changes or attempt to read any files.\nWhen asking the user what you should work on next, you can reference information in the summary which was just generated. However, you should NOT reference information outside of what's contained in the summary for this response. Keep this response CONCISE.</explicit_instructions>`,
15
+
13
16
toolDenied: ()=>`The user denied this operation.`,
14
17
15
18
toolError: (error?: string)=>`The tool execution failed with the following error:\n<error>\n${error}\n</error>`,
0 commit comments