mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Tidy
This commit is contained in:
1 parent
50e16e1b57
commit
fdfdcb4b16
4 files changed
+4
-17
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ const notifyListeners = (projectId: string) => {
|
||||
export const useProjectConsoleMessages = (projectId: string | null) => {
|
||||
const [messages, setMessages] = useState<ConsoleMessage[]>([]);
|
||||
|
||||
|
||||
|
||||
const clearMessages = useCallback(() => {
|
||||
if (!projectId) return;
|
||||
|
||||
|
||||
@@ -17,10 +17,8 @@ import { useIsMobile } from '@/hooks/useIsMobile';
|
||||
import { useKeepAlive } from '@/hooks/useKeepAlive';
|
||||
import { GitStatusIndicator } from '@/components/GitStatusIndicator';
|
||||
import { StarButton } from '@/components/StarButton';
|
||||
|
||||
import { useBuildProject } from '@/hooks/useBuildProject';
|
||||
import { useIsProjectPreviewable } from '@/hooks/useIsProjectPreviewable';
|
||||
|
||||
import { useProjectConsoleMessages } from '@/hooks/useProjectConsoleMessages';
|
||||
|
||||
export function ProjectView() {
|
||||
@@ -76,8 +74,6 @@ export function ProjectView() {
|
||||
loadProject();
|
||||
}, [loadProject]);
|
||||
|
||||
|
||||
|
||||
// Reset view state when projectId changes
|
||||
useEffect(() => {
|
||||
if (projectId) {
|
||||
@@ -437,7 +433,6 @@ export function ProjectView() {
|
||||
onLoadingChange={handleAILoadingChange}
|
||||
isLoading={isAILoading}
|
||||
isBuildLoading={build.isPending}
|
||||
|
||||
/>
|
||||
) : (
|
||||
<div className="h-full p-4 space-y-4">
|
||||
|
||||
Reference in new issue
Block a user