diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 7770ebf0397c5f62c61937992e62a4f657885fe5..12a07299b002a49350f591f42b97f9bc7e1f3263 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -40,6 +40,7 @@ import BranchToolbar from "./BranchToolbar"; import { isTerminalToggleShortcut } from "../terminal-shortcuts"; import ChatMarkdown from "./ChatMarkdown"; import ThreadTerminalDrawer from "./ThreadTerminalDrawer"; +import { CloudUploadIcon, GitCommitIcon, GithubIcon } from "lucide-react"; function formatMessageMeta(createdAt: string, duration: string | null): string { if (!duration) return formatTimestamp(createdAt); @@ -70,62 +71,14 @@ function GitActionIcon(props: { icon: GitActionMenuItem["icon"]; disabled: boole const toneClass = props.disabled ? "text-muted-foreground/45" : "text-foreground/85"; if (props.icon === "commit") { - return ( - - ); + return ; } if (props.icon === "push") { - return ( - - ); + return ; } - return ( - - ); + return ; } function workToneClass(tone: "thinking" | "tool" | "info" | "error"): string { @@ -334,8 +287,7 @@ export default function ChatView() { sandboxMode: "workspace-write", } as const); const gitCwd = activeThread?.worktreePath ?? activeProject?.cwd ?? null; - const gitBaseDisabled = - !api || !gitCwd || !gitStatus || isGitActionRunning; + const gitBaseDisabled = !api || !gitCwd || !gitStatus || isGitActionRunning; const gitActionMenuItems = useMemo(() => { if (!gitStatus) return []; @@ -343,7 +295,9 @@ export default function ChatView() { const hasOpenPr = gitStatus.openPr !== null; const canCommit = !gitBaseDisabled && gitStatus.hasWorkingTreeChanges; const canPush = - !gitBaseDisabled && hasBranch && (gitStatus.hasWorkingTreeChanges || gitStatus.aheadCount > 0); + !gitBaseDisabled && + hasBranch && + (gitStatus.hasWorkingTreeChanges || gitStatus.aheadCount > 0); const canViewPr = !gitBaseDisabled && hasBranch && @@ -403,9 +357,7 @@ export default function ChatView() { action, }); } catch (error) { - setGitActionError( - error instanceof Error ? error.message : "Git action failed.", - ); + setGitActionError(error instanceof Error ? error.message : "Git action failed."); } finally { setIsGitActionRunning(false); try { @@ -425,9 +377,7 @@ export default function ChatView() { (activeThread.messages.length > 0 || (activeThread.session !== null && activeThread.session.status !== "closed")), ); - const terminalShortcutHint = navigator.platform.includes("Mac") - ? "\u2318J" - : "Ctrl+J"; + const terminalShortcutHint = navigator.platform.includes("Mac") ? "\u2318J" : "Ctrl+J"; const focusComposer = useCallback(() => { const textarea = textareaRef.current; if (!textarea) return; @@ -505,11 +455,7 @@ export default function ChatView() { } catch (error) { if (!cancelled) { setGitStatus(null); - setGitActionError( - error instanceof Error - ? error.message - : "Failed to read git status.", - ); + setGitActionError(error instanceof Error ? error.message : "Failed to read git status."); } } }; @@ -927,9 +873,7 @@ export default function ChatView() { {isGitMenuOpen && (
-

- Git actions -

+

Git actions

{gitActionMenuItems.map((item) => { return (