Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions webview-ui/src/components/chat/BatchFilePermission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { memo } from "react"
import { ToolUseBlock, ToolUseBlockHeader } from "../common/ToolUseBlock"
import { vscode } from "@src/utils/vscode"
import { removeLeadingNonAlphanumeric } from "@src/utils/removeLeadingNonAlphanumeric"
import { StandardTooltip } from "../ui/standard-tooltip"

interface FilePermissionItem {
path: string
Expand Down Expand Up @@ -35,10 +36,12 @@ export const BatchFilePermission = memo(({ files = [], onPermissionResponse, ts
<ToolUseBlockHeader
onClick={() => vscode.postMessage({ type: "openFile", text: file.content })}>
{file.path?.startsWith(".") && <span>.</span>}
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
{removeLeadingNonAlphanumeric(file.path ?? "") + "\u200E"}
{file.lineSnippet && ` ${file.lineSnippet}`}
</span>
<StandardTooltip content={removeLeadingNonAlphanumeric(file.path ?? "") + "\u200E" + (file.lineSnippet ? ` ${file.lineSnippet}` : "")} side="top" align="start" className="text-wrap max-w-[min(300px,100vw)]">
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
{removeLeadingNonAlphanumeric(file.path ?? "") + "\u200E"}
{file.lineSnippet && ` ${file.lineSnippet}`}
</span>
</StandardTooltip>
<div className="flex-grow"></div>
<span className="codicon codicon-link-external text-[13.5px] my-[1px]" />
</ToolUseBlockHeader>
Expand Down
11 changes: 7 additions & 4 deletions webview-ui/src/components/chat/ChatRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import {
MessageCircle,
} from "lucide-react"
import { cn } from "@/lib/utils"
import { StandardTooltip } from "../ui/standard-tooltip"

interface ChatRowProps {
message: ClineMessage
Expand Down Expand Up @@ -600,10 +601,12 @@ export const ChatRowContent = ({
className="group"
onClick={() => vscode.postMessage({ type: "openFile", text: tool.content })}>
{tool.path?.startsWith(".") && <span>.</span>}
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
{removeLeadingNonAlphanumeric(tool.path ?? "") + "\u200E"}
{tool.reason}
</span>
<StandardTooltip content={removeLeadingNonAlphanumeric(tool.path ?? "") + "\u200E" + (tool.reason || "")} side="top" align="start" className="text-wrap max-w-[min(300px,100vw)]">
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
{removeLeadingNonAlphanumeric(tool.path ?? "") + "\u200E"}
{tool.reason}
</span>
</StandardTooltip>
<div style={{ flexGrow: 1 }}></div>
<SquareArrowOutUpRight
className="w-4 shrink-0 codicon codicon-link-external opacity-0 group-hover:opacity-100 transition-opacity"
Expand Down
13 changes: 9 additions & 4 deletions webview-ui/src/components/common/CodeAccordian.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { removeLeadingNonAlphanumeric } from "@src/utils/removeLeadingNonAlphanu

import { ToolUseBlock, ToolUseBlockHeader } from "./ToolUseBlock"
import CodeBlock from "./CodeBlock"
import { StandardTooltip } from "../ui/standard-tooltip"

interface CodeAccordianProps {
path?: string
Expand Down Expand Up @@ -44,7 +45,9 @@ const CodeAccordian = ({
{header ? (
<div className="flex items-center">
<span className="codicon codicon-server mr-1.5"></span>
<span className="whitespace-nowrap overflow-hidden text-ellipsis mr-2">{header}</span>
<StandardTooltip content={header} side="top" align="start" className="text-wrap max-w-[min(300px,100vw)]">
<span className="whitespace-nowrap overflow-hidden text-ellipsis mr-2">{header}</span>
</StandardTooltip>
</div>
) : isFeedback ? (
<div className="flex items-center">
Expand All @@ -56,9 +59,11 @@ const CodeAccordian = ({
) : (
<>
{path?.startsWith(".") && <span>.</span>}
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
{removeLeadingNonAlphanumeric(path ?? "") + "\u200E"}
</span>
<StandardTooltip content={removeLeadingNonAlphanumeric(path ?? "") + "\u200E"} side="top" align="start" className="text-wrap max-w-[min(300px,100vw)]">
<span className="whitespace-nowrap overflow-hidden text-ellipsis text-left mr-2 rtl">
{removeLeadingNonAlphanumeric(path ?? "") + "\u200E"}
</span>
</StandardTooltip>
</>
)}
<div className="flex-grow-1" />
Expand Down