You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: frontend/maths-online-app/src/App.tsx
+88-21Lines changed: 88 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,41 @@ function App() {
38
38
if(screenshotResult.success){
39
39
// Process the screenshot with AI
40
40
console.log('Screenshot captured successfully, processing with AI...');
41
-
// TODO: Send to AI for processing
42
-
setSolutionData({
43
-
solution: `Step-by-Step Solution (Screenshot Mode):\n\nScreenshot captured from coordinates (${coordinates.x1}, ${coordinates.y1}) to (${coordinates.x2}, ${coordinates.y2})\n\n1. First, identify the problem type...\n2. Apply the appropriate formula...\n3. Solve step by step...\n4. Check your answer.`
44
-
});
41
+
42
+
// Get settings for API configuration
43
+
constsettings=awaitinvoke<{
44
+
base_url: string;
45
+
api_key: string;
46
+
}>('get_settings');
47
+
48
+
console.log('Settings loaded:',settings);
49
+
50
+
// Send to backend for processing
51
+
constrequestParams={
52
+
request: {
53
+
image_b64: screenshotResult.base64_data,
54
+
api_key: settings.api_key,
55
+
request_type: 'StepByStep'
56
+
},
57
+
baseUrl: settings.base_url
58
+
};
59
+
60
+
console.log('Sending request with params:',requestParams);
0 commit comments