Skip to content

Commit 3afc7da

Browse files
committed
Remove request content from UI messages
1 parent 0e7a878 commit 3afc7da

File tree

3 files changed

+3
-42
lines changed

3 files changed

+3
-42
lines changed

src/core/task/Task.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,9 +1793,6 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
17931793
await this.say(
17941794
"api_req_started",
17951795
JSON.stringify({
1796-
request:
1797-
currentUserContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n") +
1798-
"\n\nLoading...",
17991796
apiProtocol,
18001797
}),
18011798
)
@@ -1835,7 +1832,6 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
18351832
const lastApiReqIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started")
18361833

18371834
this.clineMessages[lastApiReqIndex].text = JSON.stringify({
1838-
request: finalUserContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n"),
18391835
apiProtocol,
18401836
} satisfies ClineApiReqInfo)
18411837

src/core/task/__tests__/Task.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,6 @@ describe("Cline", () => {
704704
tokensOut: 50,
705705
cacheWrites: 0,
706706
cacheReads: 0,
707-
request: "test request",
708707
}),
709708
},
710709
]
@@ -829,7 +828,6 @@ describe("Cline", () => {
829828
tokensOut: 50,
830829
cacheWrites: 0,
831830
cacheReads: 0,
832-
request: "test request",
833831
}),
834832
},
835833
]

webview-ui/src/components/chat/ChatRow.tsx

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ import { ChatTextArea } from "./ChatTextArea"
4646
import { MAX_IMAGES_PER_MESSAGE } from "./ChatView"
4747
import { useSelectedModel } from "../ui/hooks/useSelectedModel"
4848
import {
49-
ChevronRight,
50-
ChevronDown,
5149
Eye,
5250
FileDiff,
5351
ListTree,
@@ -289,11 +287,7 @@ export const ChatRowContent = ({
289287
getIconSpan("error", errorColor)
290288
)
291289
) : cost !== null && cost !== undefined ? (
292-
isExpanded ? (
293-
<ChevronDown className="w-4 shrink-0" />
294-
) : (
295-
<ChevronRight className="w-4 shrink-0" />
296-
)
290+
getIconSpan("arrow-swap", normalColor)
297291
) : apiRequestFailedMessage ? (
298292
getIconSpan("error", errorColor)
299293
) : (
@@ -325,17 +319,7 @@ export const ChatRowContent = ({
325319
default:
326320
return [null, null]
327321
}
328-
}, [
329-
type,
330-
isCommandExecuting,
331-
message,
332-
isMcpServerResponding,
333-
apiReqCancelReason,
334-
cost,
335-
apiRequestFailedMessage,
336-
t,
337-
isExpanded,
338-
])
322+
}, [type, isCommandExecuting, message, isMcpServerResponding, apiReqCancelReason, cost, apiRequestFailedMessage, t])
339323

340324
const headerStyle: React.CSSProperties = {
341325
display: "flex",
@@ -1062,13 +1046,7 @@ export const ChatRowContent = ({
10621046
? 10
10631047
: 0,
10641048
justifyContent: "space-between",
1065-
cursor: "pointer",
1066-
userSelect: "none",
1067-
WebkitUserSelect: "none",
1068-
MozUserSelect: "none",
1069-
msUserSelect: "none",
1070-
}}
1071-
onClick={handleToggleExpand}>
1049+
}}>
10721050
<div style={{ display: "flex", alignItems: "center", gap: "10px", flexGrow: 1 }}>
10731051
{icon}
10741052
{title}
@@ -1101,17 +1079,6 @@ export const ChatRowContent = ({
11011079
}
11021080
/>
11031081
)}
1104-
1105-
{isExpanded && (
1106-
<div className="ml-6" style={{ marginTop: "10px" }}>
1107-
<CodeAccordian
1108-
code={safeJsonParse<any>(message.text)?.request}
1109-
language="markdown"
1110-
isExpanded={true}
1111-
onToggleExpand={handleToggleExpand}
1112-
/>
1113-
</div>
1114-
)}
11151082
</>
11161083
)
11171084
case "api_req_finished":

0 commit comments

Comments
 (0)