Skip to content

Commit 6d8fa87

Browse files
ui websocket wip
1 parent 3bc0747 commit 6d8fa87

File tree

10 files changed

+156
-366
lines changed

10 files changed

+156
-366
lines changed

src/backend/app_kernel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"http://localhost:3000", # Add this for local development
7575
"https://localhost:3000", # Add this if using HTTPS locally
7676
"http://127.0.0.1:3000",
77+
"http://127.0.0.1:3001",
7778
], # Allow all origins for development; restrict in production
7879
allow_credentials=True,
7980
allow_methods=["*"],

src/backend/v3/api/router.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def process_request(background_tasks: BackgroundTasks, input_task: InputTa
132132
input_task.session_id = str(uuid.uuid4())
133133

134134
try:
135-
#background_tasks.add_task(OrchestrationManager.run_orchestration, user_id, input_task)
135+
background_tasks.add_task(OrchestrationManager.run_orchestration, user_id, input_task)
136136
await connection_config.send_status_update_async("Test message from process_request", user_id)
137137

138138
return {

src/frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import './App.css';
33
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
4-
import { HomePage, PlanPage, PlanCreatePage } from './pages';
4+
import { HomePage, PlanPage } from './pages';
55
import { useWebSocket } from './hooks/useWebSocket';
66

77
function App() {

src/frontend/src/api/apiService.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ export class APIService {
114114
* @param inputTask The task description and optional session ID
115115
* @returns Promise with the response containing plan ID and status
116116
*/
117-
async createPlan(inputTask: InputTask): Promise<{ plan_id: string; status: string; session_id: string }> {
118-
return apiClient.post(API_ENDPOINTS.CREATE_PLAN, inputTask);
117+
// async createPlan(inputTask: InputTask): Promise<{ plan_id: string; status: string; session_id: string }> {
118+
// return apiClient.post(API_ENDPOINTS.CREATE_PLAN, inputTask);
119+
// }
120+
121+
async createPlan(inputTask: InputTask): Promise<{ status: string; session_id: string }> {
122+
return apiClient.post(API_ENDPOINTS.CREATE_PLAN, inputTask);
119123
}
120124

121125
/**

src/frontend/src/components/content/HomeInput.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { TeamConfig } from "../../models/Team";
1717
import { TaskService } from "../../services/TaskService";
1818
import { NewTaskService } from "../../services/NewTaskService";
1919
import { RAIErrorCard, RAIErrorData } from "../errors";
20+
import { apiService } from "../../api/apiService";
2021

2122
import ChatInput from "@/coral/modules/ChatInput";
2223
import InlineToaster, { useInlineToaster } from "../toast/InlineToaster";
@@ -83,13 +84,16 @@ const HomeInput: React.FC<HomeInputProps> = ({
8384
textareaRef.current.style.height = "auto";
8485
}
8586

86-
if (response.plan_id && response.plan_id !== null) {
87+
if (response.session_id && response.session_id !== null) {
8788
showToast("Plan created!", "success");
8889
dismissToast(id);
8990

9091
// Navigate to create page (no team ID in URL anymore)
9192
console.log('HomeInput: Navigating to plan creation with team:', selectedTeam?.name);
92-
navigate(`/plan/${response.plan_id}`);
93+
console.log('HomeInput: Navigating to plan creation with session:', response.session_id);
94+
console.log('HomeInput: Plan created with session:', response.session_id);
95+
96+
navigate(`/plan/${response.session_id}`);
9397
} else {
9498
showToast("Failed to create plan", "error");
9599
dismissToast(id);

0 commit comments

Comments
 (0)