diff --git a/.gitignore b/.gitignore index a547bf3..b64a01a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +output.sh \ No newline at end of file diff --git a/a.sh b/a.sh deleted file mode 100755 index 3f3ab8a..0000000 --- a/a.sh +++ /dev/null @@ -1,1131 +0,0 @@ -#!/bin/bash - -# Create the full directory structure -mkdir -p my-tauri-app/src/chat/{components,lib,providers,styles,types} -mkdir -p my-tauri-app/src/chat/components/{chat,projector,selector,ui} -mkdir -p my-tauri-app/src/styles - -# Create all files with React+HTML equivalents -cat > my-tauri-app/src/chat/components/chat/chat-header.tsx << 'EOL' -import React from 'react'; -import { useChat } from '../../providers/chat-provider'; -import '../../styles/chat.css'; - -export function ChatHeader() { - const { instance } = useChat(); - - return ( -
-
-

- {instance?.name || 'Chat'} -

- Online -
- - -
- ); -} -EOL - -cat > my-tauri-app/src/chat/components/chat/chat-input.tsx << 'EOL' -import React from 'react'; -import { EmojiPicker } from '../ui/emoji-picker'; -import { useChat } from '../../providers/chat-provider'; -import { useSound } from '../../providers/sound-provider'; -import '../../styles/chat.css'; - -export function ChatInput() { - const [message, setMessage] = React.useState(''); - const [showEmoji, setShowEmoji] = React.useState(false); - const { sendActivity } = useChat(); - const { playSound } = useSound(); - - const handleSend = () => { - if (!message.trim()) return; - playSound('send'); - sendActivity({ - type: 'message', - text: message.trim(), - }); - setMessage(''); - }; - - const handleEmojiSelect = (emoji: string) => { - playSound('click'); - setMessage(prev => prev + emoji); - }; - - return ( - <> -
- - - - -