diff --git a/README.md b/README.md index 6810fdd..40c972a 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,27 @@
- Probly Logo + Probly Logo # Probly - ### AI-Powered Spreadsheet Analysis Made Simple 🚀 + ### Data analysis with spreadsheets made simple - [![Discord](https://img.shields.io/discord/YOUR_DISCORD_ID?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/S273ycM6zW) + [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/S273ycM6zW) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
-## 🌟 What is Probly? +## What is Probly? -Probly is a next-generation spreadsheet application that combines the power of traditional spreadsheets with AI-driven analysis, Python computation, and intelligent document processing. Think of it as your personal data analysis assistant! 🤖 +Probly is a next-generation spreadsheet application that combines the power of traditional spreadsheets with AI-driven analysis, Python computation, and intelligent document processing. -## ✨ Key Features +## Key Features -### 📊 Smart Spreadsheet -- Full-featured spreadsheet with formula support -- Real-time collaboration capabilities -- Intelligent cell suggestions and auto-completion +- **Smart Spreadsheet**: Full-featured spreadsheet with formula support and intelligent cell suggestions +- **Python Integration**: Run Python code directly in your browser using WebAssembly +- **Data Visualization**: Create interactive charts and visualizations +- **AI-Powered Analysis**: Get intelligent insights and automated trend analysis +- **Document Processing**: Extract and process data from images. +- **Prompt Library**: Access predefined analysis templates and save custom prompts -### 🐍 Python Integration -- Run Python code directly in your browser using WebAssembly -- No server-side execution needed - everything runs locally -- Perfect for data analysis and manipulation - -### 📈 Data Visualization -- Create beautiful charts and visualizations -- Interactive plotting capabilities -- Multiple chart types supported - -### 🤖 AI-Powered Analysis -- Get intelligent insights about your data -- Automated trend analysis and predictions -- Natural language queries for data exploration - -### 📚 Prompt Library -- Access predefined analysis templates -- Save and manage your custom prompts -- Quick access to common operations - -### 📄 Document Processing -- Extract data from images and PDFs using AI -- Automatic table detection and data extraction -- Smart data placement in spreadsheets -- Support for various document types -- Handles files up to 10MB +![Probly Spreadsheet Example](/docs/docs/assets/images/probly02.png) ## 🏗️ Architecture diff --git a/docs/docs/assets/images/Logo.png b/docs/docs/assets/images/Logo.png new file mode 100644 index 0000000..c8f45a9 Binary files /dev/null and b/docs/docs/assets/images/Logo.png differ diff --git a/docs/docs/assets/images/probly02.png b/docs/docs/assets/images/probly02.png new file mode 100644 index 0000000..afbce39 Binary files /dev/null and b/docs/docs/assets/images/probly02.png differ diff --git a/src/app/page.tsx b/src/app/page.tsx index 78837ae..45b9996 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -340,16 +340,6 @@ const SpreadsheetApp = () => { localStorage.removeItem("chatHistory"); }; - const handleDataChange = (data: any[][]) => { - // We don't need to store this data in state anymore - // If needed, we can get it from the spreadsheet context - }; - - const handleSelectPrompt = (promptText: string) => { - setMessage(promptText); - setIsPromptLibraryOpen(false); - setIsChatOpen(true); - }; return (
diff --git a/src/components/ToolResponse.tsx b/src/components/ToolResponse.tsx index 107caa3..2c2f8a4 100644 --- a/src/components/ToolResponse.tsx +++ b/src/components/ToolResponse.tsx @@ -21,6 +21,8 @@ const ToolResponse: React.FC = ({ onAccept, onReject, }) => { + + // Extract the main text response (without the tool-specific parts) const mainResponse = response.split('\n\n')[0]; @@ -31,13 +33,12 @@ const ToolResponse: React.FC = ({ // Add state for chart expansion const [chartExpanded, setChartExpanded] = React.useState(false); - // Add state for spreadsheet expansion - const [spreadsheetExpanded, setSpreadsheetExpanded] = React.useState(false); + const [expanded, setExpanded] = React.useState(false); // Function to create a mini spreadsheet visualization - const renderMiniSpreadsheet = (updates: CellUpdate[], expanded: boolean, setExpanded: (expanded: boolean) => void) => { + const renderMiniSpreadsheet = (updates: CellUpdate[]) => { if (!updates || updates.length === 0) return null; - console.log("UPDATES IN TOOL RESPONSE >>>", updates); + // Extract column and row information from cell references const cellInfo = updates.map(update => { const match = update.target.match(/([A-Z]+)(\d+)/); @@ -53,8 +54,6 @@ const ToolResponse: React.FC = ({ // Find the range of rows and columns const minRow = Math.min(...cellInfo.map(cell => cell.row)); const maxRow = Math.max(...cellInfo.map(cell => cell.row)); - const minCol = Math.min(...cellInfo.map(cell => cell.col.charCodeAt(0))); - const maxCol = Math.max(...cellInfo.map(cell => cell.col.charCodeAt(0))); // Get unique columns in alphabetical order const uniqueCols = Array.from(new Set(cellInfo.map(cell => cell.col))) @@ -78,86 +77,56 @@ const ToolResponse: React.FC = ({ updateMap.set(cell.target, cell.formula); }); - // Calculate update range for summary - const rangeSummary = `${String.fromCharCode(minCol)}${minRow}:${String.fromCharCode(maxCol)}${maxRow}`; - return (
- {/* Update summary */} -
- {updates.length} cells updated in range {rangeSummary} - {!expanded && ( - - {` (+${maxRow - displayMaxRow} more rows, +${uniqueCols.length - colsToShow.length} more columns)`} - - )} -
-
-
- - - - - {colsToShow.map(col => ( - - ))} - - - - {Array.from({ length: displayMaxRow - displayMinRow + 1 }, (_, i) => displayMinRow + i).map(row => ( - - - {colsToShow.map(col => { - const cellRef = `${col}${row}`; - const hasUpdate = updateMap.has(cellRef); - const cellValue = updateMap.get(cellRef) || ''; - - return ( - - ); - })} - +
- {col} -
- {row} - -
- {hasUpdate ? cellValue : ''} -
-
+ + + + {colsToShow.map(col => ( + ))} - -
+ {col} +
-
+ + + + {Array.from({ length: displayMaxRow - displayMinRow + 1 }, (_, i) => displayMinRow + i).map(row => ( + + + {row} + + {colsToShow.map(col => { + const cellRef = `${col}${row}`; + const hasUpdate = updateMap.has(cellRef); + const cellValue = updateMap.get(cellRef) || ''; + + return ( + +
+ {hasUpdate ? cellValue : ''} +
+ + ); + })} + + ))} + +
{needsExpand && ( -
- - - {expanded ? "Showing all" : `+${maxRow - displayMaxRow} more rows`} - -
+ )}
); @@ -188,7 +157,7 @@ const ToolResponse: React.FC = ({
- {renderMiniSpreadsheet(updates, spreadsheetExpanded, setSpreadsheetExpanded)} + {renderMiniSpreadsheet(updates)}
)}