mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
refactor
This commit is contained in:
parent
0fb8075d8c
commit
70535471c6
2 changed files with 4 additions and 11 deletions
|
|
@ -928,7 +928,9 @@ export const ChatRowContent = ({
|
|||
/>
|
||||
)
|
||||
case "condense_context":
|
||||
return <ContextCondenseRow contextCondense={message.contextCondense} />
|
||||
return message.contextCondense ? (
|
||||
<ContextCondenseRow contextCondense={message.contextCondense} />
|
||||
) : null
|
||||
default:
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -4,19 +4,10 @@ import { VSCodeBadge } from "@vscode/webview-ui-toolkit/react"
|
|||
|
||||
import { ContextCondense } from "@roo/schemas"
|
||||
|
||||
interface ContextCondenseRowProps {
|
||||
contextCondense?: ContextCondense
|
||||
}
|
||||
|
||||
const ContextCondenseRow = ({ contextCondense }: ContextCondenseRowProps) => {
|
||||
const ContextCondenseRow = ({ cost, prevContextTokens, newContextTokens, summary }: ContextCondense) => {
|
||||
const { t } = useTranslation()
|
||||
const [isExpanded, setIsExpanded] = useState(false)
|
||||
|
||||
if (!contextCondense) {
|
||||
return null
|
||||
}
|
||||
const { cost, prevContextTokens, newContextTokens, summary } = contextCondense
|
||||
|
||||
return (
|
||||
<div className="mb-2">
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue