Skip to content
Merged
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
Binary file not shown.
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "%extension.displayName%",
"description": "%extension.description%",
"publisher": "matterai",
"version": "5.2.3",
"version": "5.2.4",
"icon": "assets/icons/matterai-ic.png",
"galleryBanner": {
"color": "#FFFFFF",
Expand Down
1 change: 0 additions & 1 deletion webview-ui/src/components/chat/ChatTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,6 @@ export const ChatTextArea = forwardRef<HTMLDivElement, ChatTextAreaProps>(
"gap-1",
"bg-editor-background",
isEditMode ? "px-0" : "px-1.5",
"pb-1",
"outline-none",
"border-none",
isEditMode ? "w-full" : "w-[calc(100%-16px)]",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/components/chat/FollowUpSuggest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ export const FollowUpSuggest = ({
</span>
)}
</Button>
{suggestion.mode && (
{/* {suggestion.mode && (
<div className="absolute bottom-0 right-0 text-[10px] bg-vscode-badge-background text-vscode-badge-foreground rounded-md mr-1 mb-1 px-1 py-0.5 border border-vscode-badge-background flex items-center gap-0.5">
<span className="codicon codicon-arrow-right" style={{ fontSize: "8px" }} />
{suggestion.mode}
</div>
)}
)} */}
<StandardTooltip content={t("chat:followUpSuggest.copyToInput")}>
<div
className="absolute cursor-pointer top-2 right-3 opacity-0 group-hover:opacity-100 transition-opacity"
Expand Down
72 changes: 50 additions & 22 deletions webview-ui/src/components/chat/SourceControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { vscode } from "@/utils/vscode"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
import React, { useEffect, useMemo, useState } from "react"
import { getIconForFilePath, getIconUrlByName } from "vscode-material-icons"
import MarkdownBlock from "../common/MarkdownBlock"

interface FileChange {
relPath: string
Expand Down Expand Up @@ -277,7 +278,7 @@ ${comment.suggestion}
return (
<div
key={index}
className="flex items-center gap-2 px-3 py-1.5 hover:bg-vscode-list-hoverBackground cursor-pointer group"
className="flex items-center gap-1 px-3 py-1.5 hover:bg-vscode-list-hoverBackground cursor-pointer group"
onClick={() => handleFileClick(file.absolutePath)}
title={file.absolutePath}>
{/* File Icon */}
Expand All @@ -288,7 +289,7 @@ ${comment.suggestion}
)}

{/* Diff Stats */}
<div className="flex gap-0.5 text-xs font-mono flex-shrink-0 w-12">
<div className="flex gap-0.5 text-xs font-mono flex-shrink-0 w-fit">
<span style={{ color: "var(--vscode-charts-green)" }}>
+{file.stat?.additions || 0}
</span>
Expand All @@ -298,7 +299,7 @@ ${comment.suggestion}
</div>

{/* File Name & Path */}
<div className="flex items-center gap-2 flex-1 min-w-0">
<div className="flex items-center gap-1 flex-1 min-w-0">
<span className="text-sm font-medium text-vscode-foreground truncate">
{fileName}
</span>
Expand Down Expand Up @@ -359,14 +360,26 @@ ${comment.suggestion}
)}
</div>
{codeReviewResult.reviewComments?.length > 0 && (
<VSCodeButton
appearance="secondary"
onClick={hasKilocodeToken ? handleApplyAllFixes : handleCopyAllPrompts}>
<span
className={`codicon ${hasKilocodeToken ? "codicon-check-all" : "codicon-copy"} mr-1`}
/>
{hasKilocodeToken ? "Apply All" : copyButtonText}
</VSCodeButton>
<>
{hasKilocodeToken ? (
<div className="flex gap-1">
<VSCodeButton appearance="secondary" onClick={handleCopyAllPrompts}>
<span className={`codicon codicon-copy`} />
</VSCodeButton>
<VSCodeButton appearance="secondary" onClick={handleApplyAllFixes}>
<span className={`codicon codicon-check-all mr-1`} />
Apply All
</VSCodeButton>
</div>
) : (
<VSCodeButton
appearance="secondary"
onClick={handleCopyAllPrompts}>
<span className="codicon codicon-copy mr-1" />
{copyButtonText}
</VSCodeButton>
)}
</>
)}
</div>

Expand Down Expand Up @@ -399,18 +412,33 @@ ${comment.suggestion}
{getFileName(comment.path)}:{comment.startLine}
{comment.endLine !== comment.startLine && `-${comment.endLine}`}
</button>
<VSCodeButton
appearance="primary"
onClick={() =>
hasKilocodeToken ? handleApplyFix(index) : handleCopyPrompt(comment)
}>
<span
className={`codicon ${hasKilocodeToken ? "codicon-check" : "codicon-copy"} mr-1`}
/>
{hasKilocodeToken ? "Apply" : "Copy"}
</VSCodeButton>

{hasKilocodeToken ? (
<div className="flex gap-1">
<VSCodeButton
appearance="primary"
onClick={() => handleCopyPrompt(comment)}>
<span className={`codicon codicon-copy`} />
</VSCodeButton>
<VSCodeButton
appearance="primary"
onClick={() => handleApplyFix(index)}>
<span className={`codicon codicon-check mr-1`} />
Apply
</VSCodeButton>
</div>
) : (
<VSCodeButton
appearance="primary"
onClick={() => handleCopyPrompt(comment)}>
<span className="codicon codicon-copy mr-1" />
Copy
</VSCodeButton>
)}
</div>
<div className="text-sm text-vscode-foreground mb-1.5">
<MarkdownBlock markdown={comment.body} />
</div>
<div className="text-sm text-vscode-foreground mb-1.5">{comment.body}</div>
{comment.suggestion && (
<div
className="text-xs p-2 rounded-r border-l-2"
Expand Down
52 changes: 41 additions & 11 deletions webview-ui/src/components/kilocode/BottomControls.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react"
import { BottomApiConfig } from "./BottomApiConfig" // kilocode_change
import { vscode } from "@/utils/vscode"
import { StandardTooltip } from "@/components/ui"

interface BottomControlsProps {
showApiConfig?: boolean
Expand All @@ -12,21 +14,49 @@ const BottomControls: React.FC<BottomControlsProps> = ({ showApiConfig = false }
// vscode.postMessage({ type: "showFeedbackOptions" })
// }

const openExternalLink = (url: string) => {
vscode.postMessage({ type: "openExternal", url })
}

return (
<div className="flex flex-row w-auto items-center justify-between h-[30px] mx-3.5 mt-2.5 mb-1 gap-1">
<div className="flex flex-row w-auto items-center justify-between h-[30px] mx-3.5 mb-1 gap-1">
<div className="flex flex-item flex-row justify-start gap-1 grow overflow-hidden">
{showApiConfig && <BottomApiConfig />}
</div>
{/* <div className="flex flex-row justify-end w-auto">
<div className="flex items-center gap-1">
<KiloRulesToggleModal />
<BottomButton
iconClass="codicon-feedback"
title={t("common:feedback.title")}
onClick={showFeedbackOptions}
/>
</div>
</div> */}
<div className="flex flex-row justify-end w-auto items-center gap-0.5">
<StandardTooltip content="Join Discord Community">
<button
className="flex items-center justify-center p-1 rounded hover:bg-[var(--vscode-toolbar-hoverBackground)] transition-all duration-200 hover:scale-110"
onClick={() => openExternalLink("https://discord.gg/fJU5DvanU3")}
aria-label="Join Discord Community">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="18"
height="18"
fill="var(--vscode-foreground)"
className="opacity-60 hover:opacity-100 transition-opacity duration-200">
<path d="M3.416,20.403 C2.538,19.525 1.968,18.487 1.707,17.948 C1.698,17.93 1.69,17.91 1.683,17.892 C0.954,16.014 0.941,11.366 3.304,4.448 C3.354,4.301 3.449,4.173 3.576,4.082 C5.4,2.77 7.228,2.422 8.775,2.254 C9.114,2.217 9.435,2.414 9.557,2.733 L10.551,5.341 C11.532,5.218 12.467,5.218 13.448,5.342 L14.441,2.733 C14.562,2.414 14.883,2.217 15.223,2.254 C16.77,2.421 18.598,2.77 20.422,4.082 C20.549,4.173 20.644,4.3 20.694,4.448 C23.057,11.366 23.045,16.014 22.315,17.892 C22.308,17.912 22.3,17.93 22.291,17.948 C21.401,19.787 19.756,21.75 17.807,21.75 C17.14,21.75 16.293,20.919 15.699,20.221 C15.359,19.82 14.859,19.164 14.586,18.49 C13.713,18.666 12.856,18.754 12,18.754 L11.998,18.754 C11.142,18.754 10.286,18.666 9.413,18.49 C9.14,19.164 8.639,19.82 8.299,20.221 C7.705,20.919 6.858,21.75 6.191,21.75 C5.243,21.75 4.31,21.298 3.416,20.403 Z M17.264,17.702 C16.855,17.858 16.452,17.997 16.054,18.118 C16.445,18.881 17.447,20.006 17.898,20.247 C19.035,20.173 20.253,18.701 20.928,17.322 C21.842,14.905 20.767,9.385 19.353,5.165 C18.086,4.308 16.828,3.984 15.634,3.816 L14.948,5.617 C15.661,5.784 16.416,6.009 17.241,6.292 C17.633,6.426 17.842,6.852 17.708,7.244 C17.601,7.556 17.311,7.752 16.999,7.752 C16.918,7.752 16.837,7.739 16.756,7.711 C13.021,6.434 10.976,6.434 7.241,7.711 C6.849,7.845 6.423,7.636 6.289,7.244 C6.155,6.852 6.364,6.426 6.756,6.292 C7.582,6.009 8.337,5.784 9.05,5.616 L8.364,3.816 C7.17,3.984 5.912,4.308 4.645,5.165 C3.232,9.385 2.156,14.905 3.07,17.322 C3.744,18.701 4.962,20.171 6.1,20.247 C6.552,20.006 7.553,18.881 7.945,18.118 C7.547,17.997 7.143,17.858 6.734,17.702 C6.346,17.556 6.152,17.122 6.299,16.736 C6.446,16.348 6.879,16.154 7.266,16.301 C10.583,17.562 13.415,17.562 16.733,16.301 C17.119,16.154 17.552,16.347 17.699,16.736 C17.847,17.122 17.653,17.556 17.264,17.702 Z M7.5,13 C6.948,13 6.5,12.552 6.5,12 C6.5,11.448 6.948,11 7.5,11 C8.052,11 8.505,11.448 8.505,12 C8.505,12.552 8.062,13 7.51,13 Z M16.49,13 C15.938,13 15.49,12.552 15.49,12 C15.49,11.448 15.938,11 16.49,11 C17.042,11 17.494,11.448 17.494,12 C17.494,12.552 17.052,13 16.5,13 Z" />
</svg>
</button>
</StandardTooltip>
<StandardTooltip content="Join Reddit community">
<button
className="flex items-center justify-center p-1 rounded hover:bg-[var(--vscode-toolbar-hoverBackground)] transition-all duration-200 hover:scale-110"
onClick={() => openExternalLink("https://www.reddit.com/r/matter_ai/")}
aria-label="Join reddit community">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="18"
height="18"
fill="var(--vscode-foreground)"
className="opacity-60 hover:opacity-100 transition-opacity duration-200">
<path d="M12.751,8.271 C14.486,8.369 16.104,8.802 17.478,9.494 C17.999,8.742 18.872,8.25 19.86,8.25 C21.449,8.25 22.75,9.528 22.75,11.12 C22.75,12.148 22.207,13.045 21.397,13.551 C21.626,14.166 21.75,14.819 21.75,15.5 C21.75,17.596 20.572,19.427 18.803,20.704 C17.033,21.983 14.625,22.75 12,22.75 C9.375,22.75 6.967,21.983 5.197,20.704 C3.428,19.427 2.25,17.596 2.25,15.5 C2.25,14.819 2.374,14.166 2.603,13.551 C1.793,13.045 1.25,12.148 1.25,11.12 C1.25,9.528 2.551,8.25 4.14,8.25 C5.128,8.25 6.001,8.742 6.522,9.494 C7.897,8.802 9.515,8.368 11.251,8.271 C11.254,7.439 11.27,6.737 11.348,6.157 C11.451,5.393 11.673,4.731 12.202,4.202 C12.731,3.673 13.393,3.451 14.157,3.348 C14.756,3.268 15.486,3.253 16.353,3.251 C16.68,2.096 17.741,1.25 19,1.25 C20.519,1.25 21.75,2.481 21.75,4 C21.75,5.519 20.519,6.75 19,6.75 C17.742,6.75 16.68,5.905 16.354,4.751 C15.493,4.754 14.858,4.767 14.357,4.835 C13.759,4.915 13.466,5.059 13.263,5.263 C13.059,5.466 12.915,5.759 12.835,6.357 C12.77,6.842 12.755,7.453 12.751,8.271 Z M3.75,15.5 C3.75,16.993 4.587,18.413 6.075,19.488 C7.563,20.562 9.655,21.25 12,21.25 C14.345,21.25 16.438,20.562 17.925,19.488 C19.413,18.413 20.25,16.993 20.25,15.5 C20.25,14.007 19.413,12.587 17.925,11.512 C16.438,10.438 14.345,9.75 12,9.75 L11.998,9.75 C9.654,9.75 7.562,10.438 6.075,11.512 C4.587,12.587 3.75,14.007 3.75,15.5 Z M8.961,16.189 C9.823,16.861 10.872,17.25 12,17.25 C13.128,17.25 14.177,16.861 15.039,16.189 C15.366,15.934 15.837,15.993 16.091,16.319 C16.346,16.646 16.288,17.117 15.961,17.372 C14.853,18.236 13.484,18.75 12,18.75 C10.516,18.75 9.147,18.236 8.039,17.372 C7.712,17.117 7.654,16.646 7.908,16.319 C8.163,15.993 8.634,15.934 8.961,16.189 Z M17.75,4.001 C17.751,4.691 18.31,5.25 19,5.25 C19.69,5.25 20.25,4.69 20.25,4 C20.25,3.31 19.69,2.75 19,2.75 C18.31,2.75 17.75,3.31 17.75,4 Z M5.197,10.296 L5.232,10.271 C4.977,9.954 4.584,9.75 4.14,9.75 C3.366,9.75 2.75,10.37 2.75,11.12 C2.75,11.563 2.964,11.96 3.3,12.212 C3.794,11.487 4.442,10.841 5.197,10.296 Z M18.768,10.271 L18.803,10.296 C19.558,10.841 20.206,11.487 20.7,12.212 C21.037,11.96 21.25,11.563 21.25,11.12 C21.25,10.37 20.634,9.75 19.86,9.75 C19.416,9.75 19.023,9.954 18.768,10.271 Z M15.008,14 L14.999,14 C14.447,14 13.999,13.552 13.999,13 C13.999,12.448 14.447,12 14.999,12 L15.008,12 C15.56,12 16.008,12.448 16.008,13 C16.008,13.552 15.56,14 15.008,14 Z M10.008,13 C10.008,13.552 9.56,14 9.008,14 L8.999,14 C8.447,14 7.999,13.552 7.999,13 C7.999,12.448 8.447,12 8.999,12 L9.008,12 C9.56,12 10.008,12.448 10.008,13 Z" />
</svg>
</button>
</StandardTooltip>
</div>
</div>
)
}
Expand Down
Loading