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
Models like Claude 3.5 Sonnetcan now understand and analyze images, allowing for exciting possibilities of multimodal workflows. Paste images directly in chat to give Cline context that can't be explained in words, and turn mockups into apps, fix bugs with screenshots, and more.
117
+
With Claude 3.5 Sonnet's new [Computer Use](https://www.anthropic.com/news/3-5-models-and-computer-use) capability, Cline can launch a browser, click elements, type text, and scroll, capturing screenshots and console logs at each step. This allows for interactive debugging, end-to-end testing, and even general web use! This gives him autonomy to fixing visual bugs and runtime issues without you needing to handhold and copy-pasting error logs yourself.
118
118
119
-
Cline can also use a headless browser to launch and interact with any website, e.g., localhost, allowing him to capture screenshots and console logs. This gives him autonomy to fixing visual bugs and runtime issues without you needing to handhold and copy-pasting error logs yourself.
119
+
Try asking Cline to "test the app", and watch as he runs a command like `npm run dev`, launches your locally running dev server in a browser, and performs a series of tests to confirm that everything works. [See a demo here.](https://x.com/sdrzn/status/1850880547825823989)
120
120
121
121
<!-- Transparent pixel to create line break after floating image -->
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"name": "roo-cline",
3
3
"displayName": "Roo Cline",
4
4
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
constblock=cloneDeep(this.assistantMessageContent[this.currentStreamingContentIndex])// need to create copy bc while stream is updating the array, it could be updating the reference block properties too
861
862
switch(block.type){
862
863
case"text": {
863
-
if(this.didRejectTool){
864
+
if(this.didRejectTool||this.didAlreadyUseTool){
864
865
break
865
866
}
866
867
letcontent=block.content
@@ -947,6 +948,15 @@ export class Cline {
947
948
break
948
949
}
949
950
951
+
if(this.didAlreadyUseTool){
952
+
// ignore any content after a tool has already been used
953
+
this.userMessageContent.push({
954
+
type: "text",
955
+
text: `Tool [${block.name}] was not executed because a tool has already been used in this message. Only one tool may be used per message. You must assess the first tool's result before proceeding to use the next tool.`,
956
+
})
957
+
break
958
+
}
959
+
950
960
constpushToolResult=(content: ToolResponse)=>{
951
961
this.userMessageContent.push({
952
962
type: "text",
@@ -960,6 +970,8 @@ export class Cline {
960
970
}else{
961
971
this.userMessageContent.push(...content)
962
972
}
973
+
// once a tool result has been collected, ignore all other tool uses since we should only ever present one tool result per message
// it seems not just llama models are doing this, but also gemini and potentially others
1068
-
if(
1069
-
newContent.includes(">")||
1070
-
newContent.includes("<")||
1071
-
newContent.includes(""")
1072
-
){
1073
-
newContent=newContent
1074
-
.replace(/>/g,">")
1075
-
.replace(/</g,"<")
1076
-
.replace(/"/g,'"')
1079
+
if(!this.api.getModel().id.includes("claude")){
1080
+
// it seems not just llama models are doing this, but also gemini and potentially others
1081
+
if(
1082
+
newContent.includes(">")||
1083
+
newContent.includes("<")||
1084
+
newContent.includes(""")
1085
+
){
1086
+
newContent=newContent
1087
+
.replace(/>/g,">")
1088
+
.replace(/</g,"<")
1089
+
.replace(/"/g,'"')
1090
+
}
1077
1091
}
1078
1092
1079
1093
constsharedMessageProps: ClineSayTool={
@@ -1736,7 +1750,7 @@ export class Cline {
1736
1750
*/
1737
1751
this.presentAssistantMessageLocked=false// this needs to be placed here, if not then calling this.presentAssistantMessage below would fail (sometimes) since it's locked
1738
1752
// NOTE: when tool is rejected, iterator stream is interrupted and it waits for userMessageContentReady to be true. Future calls to present will skip execution since didRejectTool and iterate until contentIndex is set to message length and it sets userMessageContentReady to true itself (instead of preemptively doing it in iterator)
// its okay that we increment if !didCompleteReadingStream, it'll just return bc out of bounds and as streaming continues it will call presentAssitantMessage if a new block is ready. if streaming is finished then we set userMessageContentReady to true when out of bounds. This gracefully allows the stream to continue on and all potential content blocks be presented.
// this.userMessageContentReady = true // instead of setting this premptively, we allow the present iterator to finish and set userMessageContentReady when its ready
1941
1956
break
1942
1957
}
1958
+
1959
+
// PREV: we need to let the request finish for openrouter to get generation details
1960
+
// UPDATE: it's better UX to interrupt the request at the cost of the api cost not being retrieved
1961
+
if(this.didAlreadyUseTool){
1962
+
assistantMessage+=
1963
+
"\n\n[Response interrupted by a tool use result. Only one tool may be used at a time and should be placed at the end of the message.]"
1964
+
break
1965
+
}
1943
1966
}
1944
1967
}catch(error){
1945
1968
// abandoned happens when extension is no longer waiting for the cline instance to finish aborting (error is thrown here when any function in the for loop throws due to this.abort)
<VSCodeOptionvalue="">Select a region...</VSCodeOption>
285
285
{/* The user will have to choose a region that supports the model they use, but this shouldn't be a problem since they'd have to request access for it in that region in the first place. */}
0 commit comments