This commit is contained in:
Chad Curtis committed 2025-09-24 18:23:59 +00:00
1 parent 50e16e1b57
commit fdfdcb4b16
4 files changed
+4 -17

No files matched your search

+4 -8
View File
@@ -35,18 +35,15 @@ import { NostrGenerateKindTool } from '@/lib/tools/NostrGenerateKindTool';
import { ShellTool } from '@/lib/tools/ShellTool';
import { TypecheckTool } from '@/lib/tools/TypecheckTool';
import { ReadConsoleMessagesTool } from '@/lib/tools/ReadConsoleMessagesTool';
import { toolToOpenAI } from '@/lib/tools/openai-adapter';
import { Tool } from '@/lib/tools/Tool';
import OpenAI from 'openai';
import { saveFileToTmp } from '@/lib/fileUtils';
import { useGit } from '@/hooks/useGit';
import { useConsoleErrorAlert, useAIModelErrorAlert } from '@/hooks/useErrorDetection';
import { useProjectConsoleMessages } from '@/hooks/useProjectConsoleMessages';
import { QuillySVG } from '@/components/ui/QuillySVG';
function ChatIntervention({
message,
onDismiss,
@@ -113,7 +110,6 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
onLoadingChange,
isLoading: externalIsLoading,
isBuildLoading: externalIsBuildLoading,
}, ref) => {
const { t } = useTranslation();
const [input, setInput] = useState('');
@@ -402,10 +398,6 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
setAttachedFiles(prev => [...prev, ...files]);
};
const handleSend = useCallback(async () => {
await sendMessage(input, providerModel);
}, [input, sendMessage, providerModel]);
const send = useCallback(async (input: string, attachedFiles: File[]) => {
if ((!input.trim() && attachedFiles.length === 0) || isLoading) return;
@@ -470,6 +462,10 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
}
}, [addRecentlyUsedModel, fs, isConfigured, isLoading, providerModel, sendMessage]);
const handleSend = useCallback(async () => {
await send(input, attachedFiles);
}, [input, attachedFiles, send]);
const handleKeyDown = (e: React.KeyboardEvent) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
@@ -101,8 +101,6 @@ export function PreviewPane({ projectId, activeTab, config = {} }: PreviewPanePr
const { fs } = useFS();
const projectsManager = useProjectsManager();
// Use project-specific console messages
const { messages: consoleMessages } = useProjectConsoleMessages(projectId);
const { mutate: buildProject, isPending: isBuildLoading } = useBuildProject(projectId);