mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-24 00:51:34 +00:00
Revert to pre-AI-SDK state (commit67e568f6b) This commit reverts the codebase to the state before AI SDK migration work began. Target commit:67e568f6b- refactor: replace fetch_instructions with skill tool and built-in skills (#10913) Date: January 29, 2026 This removes approximately 152 commits of AI SDK migration work. A follow-up PR will add back bug fixes and features that are unrelated to AI SDK. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
import { memo } from "react"
|
|
|
|
import { ToolUseBlock, ToolUseBlockHeader } from "../common/ToolUseBlock"
|
|
import { vscode } from "@src/utils/vscode"
|
|
import { formatPathTooltip } from "@src/utils/formatPathTooltip"
|
|
import { PathTooltip } from "../ui/PathTooltip"
|
|
|
|
interface FilePermissionItem {
|
|
path: string
|
|
lineSnippet?: string
|
|
isOutsideWorkspace?: boolean
|
|
key: string
|
|
content?: string // full path
|
|
}
|
|
|
|
interface BatchFilePermissionProps {
|
|
files: FilePermissionItem[]
|
|
onPermissionResponse?: (response: { [key: string]: boolean }) => void
|
|
ts: number
|
|
}
|
|
|
|
export const BatchFilePermission = memo(({ files = [], onPermissionResponse, ts }: BatchFilePermissionProps) => {
|
|
// Don't render if there are no files or no response handler
|
|
if (!files?.length || !onPermissionResponse) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<div className="pt-[5px]">
|
|
{/* Individual files */}
|
|
<div className="flex flex-col gap-0 border border-border rounded-md p-1">
|
|
{files.map((file) => {
|
|
return (
|
|
<div key={`${file.path}-${ts}`} className="flex items-center gap-2">
|
|
<ToolUseBlock className="flex-1">
|
|
<ToolUseBlockHeader
|
|
onClick={() => vscode.postMessage({ type: "openFile", text: file.content })}>
|
|
{file.path?.startsWith(".") && <span>.</span>}
|
|
<PathTooltip
|
|
content={formatPathTooltip(
|
|
file.path,
|
|
file.lineSnippet ? ` ${file.lineSnippet}` : undefined,
|
|
)}>
|
|
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
|
|
{formatPathTooltip(
|
|
file.path,
|
|
file.lineSnippet ? ` ${file.lineSnippet}` : undefined,
|
|
)}
|
|
</span>
|
|
</PathTooltip>
|
|
<div className="flex-grow"></div>
|
|
<span className="codicon codicon-link-external text-[13.5px] my-[1px]" />
|
|
</ToolUseBlockHeader>
|
|
</ToolUseBlock>
|
|
</div>
|
|
)
|
|
})}
|
|
</div>
|
|
</div>
|
|
)
|
|
})
|
|
|
|
BatchFilePermission.displayName = "BatchFilePermission"
|