Skip to content

Commit 994ac2d

Browse files
Himanshu-Singh-Chauhannang-dev
authored andcommitted
read file
edit file task completed
1 parent 972d034 commit 994ac2d

File tree

5 files changed

+103
-58
lines changed

5 files changed

+103
-58
lines changed

src/shared/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,6 @@ export const unboundModels = {
623623

624624
// CHANGE AS NEEDED FOR TESTING
625625
// PROD:
626-
// export const PEARAI_URL = "https://stingray-app-gb2an.ondigitalocean.app/pearai-server-api2/integrations/cline"
626+
export const PEARAI_URL = "https://stingray-app-gb2an.ondigitalocean.app/pearai-server-api2/integrations/cline"
627627
// DEV:
628-
export const PEARAI_URL = "http://localhost:8000/integrations/cline"
628+
// export const PEARAI_URL = "http://localhost:8000/integrations/cline"

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

Lines changed: 82 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ import {
2929
vscFocusBorder,
3030
vscInputBackground,
3131
} from "../ui"
32-
import { ServerIcon } from "@heroicons/react/24/outline"
32+
import { PencilIcon, PencilSquareIcon, ServerIcon } from "@heroicons/react/24/outline"
3333
import { vsCodeBadge } from "@vscode/webview-ui-toolkit"
34+
import { ViewfinderCircleIcon } from "@heroicons/react/24/outline"
35+
import { OpenInNewWindowIcon } from "@radix-ui/react-icons"
3436

3537
interface ChatRowProps {
3638
message: ClineMessage
@@ -167,10 +169,17 @@ export const ChatRowContent = ({
167169
]
168170
case "completion_result":
169171
return [
170-
<span
171-
className="codicon codicon-check"
172-
style={{ color: successColor, marginBottom: "-1.5px" }}></span>,
173-
<span style={{ color: successColor, fontWeight: "bold" }}>Task Completed</span>,
172+
// <span
173+
// className="codicon codicon-check"
174+
// style={{ color: successColor, marginBottom: "-1.5px" }}
175+
// >
176+
// </span>,
177+
<div
178+
className="flex items-center gap-2 p-2 rounded-lg"
179+
style={{ background: "linear-gradient(to bottom, #E64C9E66, #E64C9E1A)" }}>
180+
<PencilIcon className="w-4 h-4" />
181+
<span className="font-bold uppercase">Task Completed</span>
182+
</div>,
174183
]
175184
case "api_req_retry_delayed":
176185
return []
@@ -272,9 +281,26 @@ export const ChatRowContent = ({
272281
case "appliedDiff":
273282
return (
274283
<>
275-
<div style={headerStyle}>
276-
{toolIcon(tool.tool === "appliedDiff" ? "diff" : "edit")}
277-
<span style={{ fontWeight: "bold" }}>Roo wants to edit this file:</span>
284+
<div
285+
style={{ backgroundColor: vscEditorBackground }}
286+
className="flex items-center gap-2 p-2 rounded-lg mb-2">
287+
<PencilIcon className="w-5 h-5" />
288+
<div className="flex flex-col">
289+
<span className="font-bold uppercase">Roo wants to edit</span>
290+
<span
291+
style={{
292+
color: "var(--vscode-descriptionForeground)",
293+
whiteSpace: "nowrap",
294+
overflow: "hidden",
295+
textOverflow: "ellipsis",
296+
direction: "rtl",
297+
textAlign: "left",
298+
fontWeight: "bold",
299+
letterSpacing: "0.03em",
300+
}}>
301+
{removeLeadingNonAlphanumeric(tool.path ?? "") + "\u200E"}
302+
</span>
303+
</div>
278304
</div>
279305
<CodeAccordian
280306
isLoading={message.partial}
@@ -304,57 +330,65 @@ export const ChatRowContent = ({
304330
case "readFile":
305331
return (
306332
<>
307-
<div style={headerStyle}>
308-
{toolIcon("file-code")}
309-
<span style={{ fontWeight: "bold" }}>
310-
{message.type === "ask" ? "Roo wants to read this file:" : "Roo read this file:"}
311-
</span>
312-
</div>
313333
{/* <CodeAccordian
314334
code={tool.content!}
315335
path={tool.path!}
316336
isExpanded={isExpanded}
317337
onToggleExpand={onToggleExpand}
318338
/> */}
319339
<div
320-
style={{
321-
borderRadius: 3,
322-
backgroundColor: CODE_BLOCK_BG_COLOR,
323-
overflow: "hidden",
324-
border: "1px solid var(--vscode-editorGroup-border)",
325-
}}>
340+
style={{ backgroundColor: vscEditorBackground }}
341+
className="flex items-center gap-2 p-2 rounded-lg">
342+
<ViewfinderCircleIcon className="w-6 h-6" />
326343
<div
327344
style={{
328-
color: "var(--vscode-descriptionForeground)",
329-
display: "flex",
330-
alignItems: "center",
331-
padding: "9px 10px",
332-
cursor: "pointer",
333-
userSelect: "none",
334-
WebkitUserSelect: "none",
335-
MozUserSelect: "none",
336-
msUserSelect: "none",
337-
}}
338-
onClick={() => {
339-
vscode.postMessage({ type: "openFile", text: tool.content })
345+
backgroundColor: CODE_BLOCK_BG_COLOR,
346+
overflow: "hidden",
347+
width: "fit-content",
340348
}}>
341-
{tool.path?.startsWith(".") && <span>.</span>}
342-
<span
349+
<span style={{ fontWeight: "bold" }} className="uppercase">
350+
{message.type === "ask" ? "Roo wants to read this file" : "Roo read this file:"}
351+
</span>
352+
<div
343353
style={{
344-
whiteSpace: "nowrap",
345-
overflow: "hidden",
346-
textOverflow: "ellipsis",
347-
marginRight: "8px",
348-
direction: "rtl",
349-
textAlign: "left",
354+
color: "var(--vscode-descriptionForeground)",
355+
display: "flex",
356+
alignItems: "center",
357+
cursor: "pointer",
358+
userSelect: "none",
359+
WebkitUserSelect: "none",
360+
MozUserSelect: "none",
361+
msUserSelect: "none",
362+
}}
363+
onClick={() => {
364+
vscode.postMessage({ type: "openFile", text: tool.content })
350365
}}>
351-
{removeLeadingNonAlphanumeric(tool.path ?? "") + "\u200E"}
352-
</span>
353-
<div style={{ flexGrow: 1 }}></div>
354-
<span
355-
className={`codicon codicon-link-external`}
356-
style={{ fontSize: 13.5, margin: "1px 0" }}></span>
366+
{tool.path?.startsWith(".") && <span>.</span>}
367+
<span
368+
style={{
369+
whiteSpace: "nowrap",
370+
overflow: "hidden",
371+
textOverflow: "ellipsis",
372+
direction: "rtl",
373+
textAlign: "left",
374+
fontWeight: "bold",
375+
letterSpacing: "0.03em",
376+
}}>
377+
{removeLeadingNonAlphanumeric(tool.path ?? "") + "\u200E"}
378+
</span>
379+
<div style={{ flexGrow: 1 }}></div>
380+
{/* <span
381+
className={`codicon codicon-link-external`}
382+
>
383+
</span> */}
384+
</div>
357385
</div>
386+
<OpenInNewWindowIcon
387+
className="w-5 h-5 ml-auto cursor-pointer"
388+
onClick={() => {
389+
vscode.postMessage({ type: "openFile", text: tool.content })
390+
}}
391+
/>
358392
</div>
359393
</>
360394
)
@@ -540,14 +574,14 @@ export const ChatRowContent = ({
540574
onClick={onToggleExpand}>
541575
{/* <VSCodeBadge style={{ opacity: cost != null && cost > 0 ? 1 : 0 }} className=""> */}
542576
<div
543-
className="flex items-center gap-2 p-2 rounded-md"
577+
className="flex items-center gap-2 p-2 rounded-lg"
544578
style={{ backgroundColor: vscBadgeBackground }}>
545579
<div className="flex items-center gap-2 flex-grow">
546580
{title}${Number(cost || 0)?.toFixed(4)}
547581
</div>
582+
<span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>
548583
</div>
549584
{/* </VSCodeBadge> */}
550-
<span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>
551585
</div>
552586
{((cost == null && apiRequestFailedMessage) || apiReqStreamingFailedMessage) && (
553587
<>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
953953
onClick={() => !shouldDisableImages && onSelectImages()}
954954
/>
955955
<Button
956-
className="gap-1 h-6 bg-[#AFF349] text-[#005A4E] text-xs px-2"
956+
className="gap-1 h-6 bg-[#E64C9E] text-white text-xs px-2"
957957
disabled={textAreaDisabled}
958958
onClick={() => !textAreaDisabled && onSend()}>
959959
<ArrowTurnDownLeftIcon width="12px" height="12px" />

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ import { AudioType } from "../../../../src/shared/WebviewMessage"
3030
import { validateCommand } from "../../utils/command-validation"
3131
import { Button } from "../ui/button-pear-scn"
3232
import { DownloadIcon } from "@radix-ui/react-icons"
33-
import { vscBackground, vscBadgeBackground, vscEditorBackground, vscForeground, vscInputBorder } from "../ui"
33+
import {
34+
vscBackground,
35+
vscBadgeBackground,
36+
vscButtonBackground,
37+
vscEditorBackground,
38+
vscForeground,
39+
vscInputBorder,
40+
vscSidebarBorder,
41+
} from "../ui"
3442

3543
interface ChatViewProps {
3644
isHidden: boolean
@@ -1133,7 +1141,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
11331141
<Button
11341142
disabled={!enableButtons}
11351143
style={{
1136-
backgroundColor: "#AFF349",
1144+
// backgroundColor: "#E64C9E",
1145+
backgroundColor: vscButtonBackground,
1146+
color: vscForeground,
11371147
flex: secondaryButtonText ? 1 : 2,
11381148
marginRight: secondaryButtonText ? "6px" : "0",
11391149
}}
@@ -1146,7 +1156,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
11461156
variant="secondary"
11471157
disabled={!enableButtons && !(isStreaming && !didClickCancel)}
11481158
style={{
1149-
backgroundColor: vscInputBorder,
1159+
backgroundColor: vscBadgeBackground,
11501160
color: vscForeground,
11511161
flex: isStreaming ? 2 : 1,
11521162
marginLeft: isStreaming ? 0 : "6px",

webview-ui/src/components/common/CodeAccordian.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ const CodeAccordian = ({
4141
return (
4242
<div
4343
style={{
44-
borderRadius: 3,
44+
borderRadius: 8,
4545
backgroundColor: CODE_BLOCK_BG_COLOR,
4646
overflow: "hidden", // This ensures the inner scrollable area doesn't overflow the rounded corners
47-
border: "1px solid var(--vscode-editorGroup-border)",
47+
// border: "1px solid var(--vscode-editorGroup-border)",
4848
}}>
4949
{(path || isFeedback || isConsoleLogs) && (
5050
<div
5151
style={{
52-
color: "var(--vscode-descriptionForeground)",
52+
// color: "var(--vscode-descriptionForeground)",
5353
display: "flex",
5454
alignItems: "center",
5555
padding: "9px 10px",
@@ -89,7 +89,8 @@ const CodeAccordian = ({
8989
// trick to get ellipsis at beginning of string
9090
direction: "rtl",
9191
textAlign: "left",
92-
}}>
92+
}}
93+
className="font-bold">
9394
{removeLeadingNonAlphanumeric(path ?? "") + "\u200E"}
9495
</span>
9596
</>

0 commit comments

Comments
 (0)