Add bash utilities to Docker image and fix TypeScript build errors

This commit is contained in:
Chris Scott committed 2025-11-25 10:46:04 -05:00
1 parent a1a8433f2c
commit ca7f976199
4 files changed
+30 -19

No files matched your search

+10
View File
@@ -6,6 +6,16 @@ RUN apt-get update && apt-get install -y \
lsof \
ripgrep \
ca-certificates \
grep \
gawk \
sed \
findutils \
coreutils \
procps \
jq \
less \
tree \
file \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
@@ -1,11 +1,5 @@
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { Dialog, DialogContent } from "@/components/ui/dialog";
import { FilePreview } from "./FilePreview";
import { X } from "lucide-react";
import type { FileInfo } from "@/types/files";
interface MobileFilePreviewModalProps {
@@ -34,11 +28,12 @@ export function MobileFilePreviewModal({
}
return (
<Dialog open={isOpen} onOpenChange={(open) => !open && onClose()} hideCloseButton={true}>
<Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
<DialogContent
className="w-screen h-screen max-w-none max-h-none p-0 bg-background border-0 flex flex-col"
onTouchStart={handleTouchStart}
onTouchEnd={handleTouchEnd}
hideCloseButton
>
<div
className={`flex-1 overflow-hidden min-h-0 ${showFilePreviewHeader ? "" : "pb-8"}`}
@@ -6,10 +6,9 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'
import { Badge } from '@/components/ui/badge'
import { Loader2, Key, Check, X, Plus } from 'lucide-react'
import { providerCredentialsApi } from '@/api/providers'
import { providerCredentialsApi, getProviders, type Provider } from '@/api/providers'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { AddProviderDialog } from './AddProviderDialog'
import { getProviders } from '@/api/providers'
export function ProviderSettings() {
const [selectedProvider, setSelectedProvider] = useState<string | null>(null)
@@ -18,7 +17,7 @@ export function ProviderSettings() {
const [addDialogOpen, setAddDialogOpen] = useState(false)
const queryClient = useQueryClient()
const { data: providers, isLoading: providersLoading } = useQuery({
const { data: providers, isLoading: providersLoading } = useQuery<Provider[]>({
queryKey: ['providers'],
queryFn: () => getProviders(),
staleTime: 300000,
@@ -119,8 +118,8 @@ export function ProviderSettings() {
)}
</CardTitle>
<CardDescription className="mt-1">
{provider.npm && <span className="text-xs">Package: {provider.npm}</span>}
{provider.options?.baseURL && (
{provider.npm ? <span className="text-xs">Package: {provider.npm}</span> : null}
{typeof provider.options?.baseURL === 'string' && (
<span className="text-xs block">{provider.options.baseURL}</span>
)}
{modelCount > 0 && (
+13 -6
View File
@@ -27,10 +27,15 @@ const DialogOverlay = React.forwardRef<
))
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
interface DialogContentProps
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
hideCloseButton?: boolean
}
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
>(({ className, children, ...props }, ref) => (
DialogContentProps
>(({ className, children, hideCloseButton, ...props }, ref) => (
<DialogPortal>
<DialogOverlay />
<DialogPrimitive.Content
@@ -42,10 +47,12 @@ const DialogContent = React.forwardRef<
{...props}
>
{children}
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
{!hideCloseButton && (
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
)}
</DialogPrimitive.Content>
</DialogPortal>
))