mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
Remove request content from UI messages (#8696)
This commit is contained in:
parent
0e7a878fa5
commit
4405f5a0b3
3 changed files with 3 additions and 42 deletions
|
|
@ -1793,9 +1793,6 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
|
|||
await this.say(
|
||||
"api_req_started",
|
||||
JSON.stringify({
|
||||
request:
|
||||
currentUserContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n") +
|
||||
"\n\nLoading...",
|
||||
apiProtocol,
|
||||
}),
|
||||
)
|
||||
|
|
@ -1835,7 +1832,6 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
|
|||
const lastApiReqIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started")
|
||||
|
||||
this.clineMessages[lastApiReqIndex].text = JSON.stringify({
|
||||
request: finalUserContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n"),
|
||||
apiProtocol,
|
||||
} satisfies ClineApiReqInfo)
|
||||
|
||||
|
|
|
|||
|
|
@ -704,7 +704,6 @@ describe("Cline", () => {
|
|||
tokensOut: 50,
|
||||
cacheWrites: 0,
|
||||
cacheReads: 0,
|
||||
request: "test request",
|
||||
}),
|
||||
},
|
||||
]
|
||||
|
|
@ -829,7 +828,6 @@ describe("Cline", () => {
|
|||
tokensOut: 50,
|
||||
cacheWrites: 0,
|
||||
cacheReads: 0,
|
||||
request: "test request",
|
||||
}),
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ import { ChatTextArea } from "./ChatTextArea"
|
|||
import { MAX_IMAGES_PER_MESSAGE } from "./ChatView"
|
||||
import { useSelectedModel } from "../ui/hooks/useSelectedModel"
|
||||
import {
|
||||
ChevronRight,
|
||||
ChevronDown,
|
||||
Eye,
|
||||
FileDiff,
|
||||
ListTree,
|
||||
|
|
@ -289,11 +287,7 @@ export const ChatRowContent = ({
|
|||
getIconSpan("error", errorColor)
|
||||
)
|
||||
) : cost !== null && cost !== undefined ? (
|
||||
isExpanded ? (
|
||||
<ChevronDown className="w-4 shrink-0" />
|
||||
) : (
|
||||
<ChevronRight className="w-4 shrink-0" />
|
||||
)
|
||||
getIconSpan("arrow-swap", normalColor)
|
||||
) : apiRequestFailedMessage ? (
|
||||
getIconSpan("error", errorColor)
|
||||
) : (
|
||||
|
|
@ -325,17 +319,7 @@ export const ChatRowContent = ({
|
|||
default:
|
||||
return [null, null]
|
||||
}
|
||||
}, [
|
||||
type,
|
||||
isCommandExecuting,
|
||||
message,
|
||||
isMcpServerResponding,
|
||||
apiReqCancelReason,
|
||||
cost,
|
||||
apiRequestFailedMessage,
|
||||
t,
|
||||
isExpanded,
|
||||
])
|
||||
}, [type, isCommandExecuting, message, isMcpServerResponding, apiReqCancelReason, cost, apiRequestFailedMessage, t])
|
||||
|
||||
const headerStyle: React.CSSProperties = {
|
||||
display: "flex",
|
||||
|
|
@ -1062,13 +1046,7 @@ export const ChatRowContent = ({
|
|||
? 10
|
||||
: 0,
|
||||
justifyContent: "space-between",
|
||||
cursor: "pointer",
|
||||
userSelect: "none",
|
||||
WebkitUserSelect: "none",
|
||||
MozUserSelect: "none",
|
||||
msUserSelect: "none",
|
||||
}}
|
||||
onClick={handleToggleExpand}>
|
||||
}}>
|
||||
<div style={{ display: "flex", alignItems: "center", gap: "10px", flexGrow: 1 }}>
|
||||
{icon}
|
||||
{title}
|
||||
|
|
@ -1101,17 +1079,6 @@ export const ChatRowContent = ({
|
|||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{isExpanded && (
|
||||
<div className="ml-6" style={{ marginTop: "10px" }}>
|
||||
<CodeAccordian
|
||||
code={safeJsonParse<any>(message.text)?.request}
|
||||
language="markdown"
|
||||
isExpanded={true}
|
||||
onToggleExpand={handleToggleExpand}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
case "api_req_finished":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue