Skip to content

Commit a173ec2

Browse files
committed
remove logs
1 parent 9ce0faf commit a173ec2

14 files changed

Lines changed: 9 additions & 52 deletions

File tree

apps/frontend/app/(home)/page.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,24 @@ export default async function Home() {
2424
queryKey: ["models"],
2525
queryFn: getModels,
2626
})
27-
.catch((error) => {
28-
console.log("Could not prefetch models:", error?.message || error);
27+
.catch(() => {
28+
// Could not prefetch models
2929
}),
3030
queryClient
3131
.prefetchQuery({
3232
queryKey: ["api-keys"],
3333
queryFn: getApiKeys,
3434
})
35-
.catch((error) => {
36-
console.log("Could not prefetch API keys:", error?.message || error);
35+
.catch(() => {
36+
// Could not prefetch API keys
3737
}),
3838
queryClient
3939
.prefetchQuery({
4040
queryKey: ["selected-model"],
4141
queryFn: getModelSelectorCookie,
4242
})
43-
.catch((error) => {
44-
console.log(
45-
"Could not prefetch selected model:",
46-
error?.message || error
47-
);
43+
.catch(() => {
44+
// Could not prefetch selected model
4845
}),
4946
];
5047

apps/frontend/app/tasks/[taskId]/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ export default async function TaskLayout({
7272
queryKey: ["models"],
7373
queryFn: getModels,
7474
})
75-
.catch((error) => {
76-
console.log("Could not prefetch models:", error?.message || error);
75+
.catch(() => {
76+
// Could not prefetch models
7777
}),
7878
];
7979

apps/frontend/components/chat/prompt-form/prompt-form.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export function PromptForm({
124124
toast.error("Please select a model first");
125125
return;
126126
}
127-
console.log("queue");
128127
onSubmit?.(message, selectedModel, true);
129128
queryClient.setQueryData(["queued-action", taskId], {
130129
type: "message",
@@ -139,7 +138,6 @@ export function PromptForm({
139138
toast.error("Please select a model first");
140139
return;
141140
}
142-
console.log("send");
143141
onSubmit?.(message, selectedModel, false);
144142
setMessage("");
145143
};
@@ -417,8 +415,6 @@ export function PromptForm({
417415
const completeRepoUrl = `https://github.com/${repo.full_name}`;
418416
const issuePrompt = generateIssuePrompt(issue);
419417

420-
console.log("issuePrompt", issuePrompt);
421-
422418
const formData = new FormData();
423419
formData.append("message", issuePrompt);
424420
formData.append("model", selectedModel);

apps/frontend/hooks/socket/use-socket.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ export function useSocket() {
1616
useEffect(() => {
1717
const handleConnect = () => {
1818
setIsConnected(true);
19-
console.log('[SOCKET] Connected');
2019
};
2120

2221
const handleDisconnect = () => {
2322
setIsConnected(false);
24-
console.log('[SOCKET] Disconnected');
2523
};
2624

2725
const handleConnectionInfo = (info: ConnectionInfo) => {
2826
setConnectionInfo(info);
29-
console.log('[SOCKET] Connection info:', info);
3027
};
3128

3229
const handleError = (error: Error) => {

apps/frontend/hooks/socket/use-task-socket.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ export function useTaskSocket(taskId: string | undefined) {
301301
}
302302

303303
function onDisconnect() {
304-
console.log("[TASK-SOCKET] Disconnected");
305304
}
306305

307306
function onChatHistory(data: {
@@ -577,7 +576,6 @@ export function useTaskSocket(taskId: string | undefined) {
577576

578577
case "fs-change":
579578
if (chunk.fsChange) {
580-
console.log("File system change:", chunk.fsChange);
581579

582580
queryClient.setQueryData(
583581
["task", taskId],
@@ -630,7 +628,6 @@ export function useTaskSocket(taskId: string | undefined) {
630628

631629
case "fs-override":
632630
if (chunk.fsOverride) {
633-
console.log("File state override:", chunk.fsOverride.message);
634631

635632
// Replace entire file state (not optimistic merge)
636633
queryClient.setQueryData(
@@ -669,7 +666,6 @@ export function useTaskSocket(taskId: string | undefined) {
669666
}
670667

671668
case "usage":
672-
console.log("Usage:", chunk.usage);
673669
break;
674670

675671
case "reasoning":
@@ -774,7 +770,6 @@ export function useTaskSocket(taskId: string | undefined) {
774770

775771
case "todo-update":
776772
if (chunk.todoUpdate) {
777-
console.log("Todo update:", chunk.todoUpdate);
778773
const todos = chunk.todoUpdate.todos;
779774
const action = chunk.todoUpdate.action;
780775

@@ -845,7 +840,6 @@ export function useTaskSocket(taskId: string | undefined) {
845840
// Don't clear streaming state immediately - wait for server response
846841
setIsStreaming(false);
847842
setIsCompletionPending(true);
848-
console.log("Stream completed - requesting fresh data");
849843
if (taskId) {
850844
socket.emit("get-chat-history", { taskId, complete: true });
851845
}
@@ -877,7 +871,6 @@ export function useTaskSocket(taskId: string | undefined) {
877871
newTaskId?: string;
878872
}) {
879873
if (data.taskId === taskId) {
880-
console.log(`[TASK_SOCKET] Processing queued ${data.type}:`, data);
881874

882875
const optimisticMessage: Message = {
883876
id: `temp-queued-${Date.now()}`,
@@ -925,7 +918,6 @@ export function useTaskSocket(taskId: string | undefined) {
925918

926919
function onTaskStatusUpdate(data: TaskStatusUpdateEvent) {
927920
if (data.taskId === taskId) {
928-
console.log(`[TASK_SOCKET] Received task status update:`, data);
929921

930922
queryClient.setQueryData(
931923
["task", taskId],
@@ -984,7 +976,6 @@ export function useTaskSocket(taskId: string | undefined) {
984976

985977
function onAutoPRStatus(data: AutoPRStatusEvent) {
986978
if (data.taskId === taskId) {
987-
console.log(`[TASK_SOCKET] Received auto-PR status update:`, data);
988979
setAutoPRStatus(data);
989980

990981
// Handle different auto-PR statuses
@@ -1057,7 +1048,6 @@ export function useTaskSocket(taskId: string | undefined) {
10571048
(message: string, model: string, queue: boolean = false) => {
10581049
if (!socket || !taskId || !message.trim()) return;
10591050

1060-
console.log("Sending message:", { taskId, message, model, queue });
10611051
setIsStreaming(true);
10621052
socket.emit("user-message", {
10631053
taskId,
@@ -1072,7 +1062,6 @@ export function useTaskSocket(taskId: string | undefined) {
10721062
const stopStream = useCallback(() => {
10731063
if (!socket || !taskId || !isStreaming) return;
10741064

1075-
console.log("Stopping stream for task:", taskId);
10761065
socket.emit("stop-stream", { taskId });
10771066
clearStreamingState();
10781067
}, [socket, taskId, isStreaming, clearStreamingState]);

apps/frontend/hooks/socket/use-terminal-socket.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,30 @@ export function useTerminalSocket(taskId: string | undefined) {
1414
if (socket && taskId && isConnected) {
1515
socket.emit('join-task', { taskId });
1616
socket.emit('get-terminal-history', { taskId });
17-
console.log(`[TERMINAL] Joined task room and requested history: ${taskId}`);
1817
}
1918
}, [socket, taskId, isConnected]);
2019

2120
// Terminal event handlers with enhanced functionality from main branch
2221
useEffect(() => {
2322
if (!socket || !taskId) return;
2423

25-
console.log("[TERMINAL] Setting up Socket.IO listeners for task:", taskId);
2624

2725
const handleTerminalHistory = (data: { taskId: string; entries: TerminalEntry[] }) => {
2826
if (data.taskId !== taskId) return;
2927

30-
console.log("[TERMINAL] Received terminal history:", data.entries.length, "entries");
3128
setTerminalEntries(data.entries);
3229
setIsTerminalConnected(true);
3330
};
3431

3532
const handleTerminalOutput = (data: { taskId: string; entry: TerminalEntry }) => {
3633
if (data.taskId !== taskId) return;
3734

38-
console.log("[TERMINAL] Received terminal output:", data.entry);
3935
setTerminalEntries(prev => [...prev, data.entry]);
4036
};
4137

4238
const handleTerminalCleared = (data: { taskId: string }) => {
4339
if (data.taskId !== taskId) return;
4440

45-
console.log("[TERMINAL] Terminal cleared");
4641
setTerminalEntries([]);
4742
};
4843

@@ -57,7 +52,6 @@ export function useTerminalSocket(taskId: string | undefined) {
5752
};
5853

5954
const handleConnect = () => {
60-
console.log("[TERMINAL] Socket connected");
6155
setIsTerminalConnected(true);
6256
// Re-request terminal history on reconnect
6357
if (taskId) {
@@ -66,7 +60,6 @@ export function useTerminalSocket(taskId: string | undefined) {
6660
};
6761

6862
const handleDisconnect = () => {
69-
console.log("[TERMINAL] Socket disconnected");
7063
setIsTerminalConnected(false);
7164
};
7265

@@ -95,7 +88,6 @@ export function useTerminalSocket(taskId: string | undefined) {
9588

9689
const clearTerminal = useCallback(() => {
9790
if (socket && taskId) {
98-
console.log("[TERMINAL] Clearing terminal for task:", taskId);
9991
socket.emit('clear-terminal', { taskId });
10092
}
10193
}, [socket, taskId]);

apps/frontend/hooks/use-codebase.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export function useCodebase(taskId: string) {
66
const { task } = useTask(taskId);
77
const codebaseId = task?.codebaseUnderstandingId;
88

9-
console.log("codebaseId", codebaseId);
10-
119
return useQuery({
1210
queryKey: ["codebase", codebaseId],
1311
queryFn: async (): Promise<CodebaseWithSummaries> => {

apps/frontend/lib/actions/api-keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export async function getModels(): Promise<ModelInfo[]> {
5757
return models.map((modelId) => ModelInfos[modelId]);
5858
}
5959
} catch (_error) {
60-
console.log("Could not fetch user settings, falling back to all models");
60+
// Could not fetch user settings, fall back to all models
6161
}
6262

6363
// Fallback if no user session or error occurred

apps/frontend/lib/actions/create-task.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ export async function createTask(formData: FormData) {
130130

131131
if (!response.ok) {
132132
console.error("Failed to initiate task:", await response.text());
133-
} else {
134-
console.log("Task initiated successfully:", task.id);
135133
}
136134
} catch (error) {
137135
console.error("Error initiating task:", error);

apps/frontend/lib/actions/generate-title-branch.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ export async function generateTaskTitleAndBranch(
5959

6060
const title = cleanTitle(generatedText);
6161

62-
console.log(
63-
`[GENERATE_TITLE_BRANCH] Generated title for task ${taskId}: "${title}" using ${modelConfig.provider} ${modelConfig.modelChoice}`
64-
);
65-
6662
return { title, shadowBranch: generateShadowBranchName(title, taskId) };
6763
} catch (error) {
6864
console.error(

0 commit comments

Comments
 (0)