Skip to content

Commit c05a0a9

Browse files
authored
fix(UI-1708): remove logs from system log (#1265)
1 parent b21ef1c commit c05a0a9

File tree

3 files changed

+3
-39
lines changed

3 files changed

+3
-39
lines changed

src/components/organisms/codeFixDiffEditorModal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const CodeFixDiffEditorModal: React.FC<CodeFixDiffEditorProps> = ({
1515
modifiedCode,
1616
onApprove,
1717
onReject,
18-
onClose,
1918
filename,
2019
startLine,
2120
endLine,
@@ -44,13 +43,11 @@ export const CodeFixDiffEditorModal: React.FC<CodeFixDiffEditorProps> = ({
4443

4544
const handleApprove = useCallback(() => {
4645
onApprove();
47-
onClose();
48-
}, [onApprove, onClose]);
46+
}, [onApprove]);
4947

5048
const handleReject = useCallback(() => {
5149
onReject();
52-
onClose();
53-
}, [onReject, onClose]);
50+
}, [onReject]);
5451

5552
const title = filename
5653
? `Code Fix Suggestion for ${filename}${startLine && endLine ? ` (lines ${startLine}-${endLine})` : ""}`

src/components/organisms/editorTabs.tsx

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,6 @@ export const EditorTabs = () => {
193193
loadFileResource();
194194
const currentPosition = cursorPositionPerProject[projectId]?.[activeEditorFileName];
195195

196-
LoggerService.info(
197-
namespaces.chatbot,
198-
`Setting cursor positions for project ${projectId} file info: line ${currentPosition?.startLine || 1}`
199-
);
200-
201196
iframeCommService.safeSendEvent(MessageTypes.SET_EDITOR_CODE_SELECTION, {
202197
filename: activeEditorFileName,
203198
startLine: currentPosition?.startLine || 1,
@@ -209,11 +204,6 @@ export const EditorTabs = () => {
209204

210205
if (!currentSelection) return;
211206

212-
LoggerService.info(
213-
namespaces.chatbot,
214-
`Sending stored selection for project ${projectId} file ${activeEditorFileName}: lines ${currentSelection.startLine}-${currentSelection.endLine}`
215-
);
216-
217207
iframeCommService.safeSendEvent(MessageTypes.SET_EDITOR_CODE_SELECTION, currentSelection);
218208

219209
// eslint-disable-next-line react-hooks/exhaustive-deps
@@ -296,10 +286,6 @@ export const EditorTabs = () => {
296286
}
297287

298288
if (!position) return;
299-
LoggerService.info(
300-
namespaces.chatbot,
301-
`Setting cursor positions for project ${projectId} file info: line ${position.lineNumber}, column ${position.column}`
302-
);
303289

304290
setIsFocusedAndTyping(true);
305291

@@ -336,11 +322,6 @@ export const EditorTabs = () => {
336322

337323
setSelection(projectId, activeEditorFileName, selectionData);
338324

339-
LoggerService.info(
340-
namespaces.chatbot,
341-
`Selection changed for project ${projectId}: lines ${selection.startLineNumber}-${selection.endLineNumber}, text: "${editorCode.substring(0, 100)}${editorCode.length > 100 ? "..." : ""}"`
342-
);
343-
344325
iframeCommService.safeSendEvent(MessageTypes.SET_EDITOR_CODE_SELECTION, selectionData);
345326
}
346327
};
@@ -587,24 +568,12 @@ export const EditorTabs = () => {
587568
debouncedAutosave(model.getValue());
588569
}
589570

590-
LoggerService.info(
591-
namespaces.ui.projectCodeEditor,
592-
`Applied code fix suggestion for lines ${startLine}-${endLine} in ${activeEditorFileName}`
593-
);
594-
595571
addToast({
596572
message: `Successfully applied code fix to lines ${startLine}-${endLine}`,
597573
type: "success",
598574
});
599575
};
600576

601-
const handleRejectCodeFix = () => {
602-
LoggerService.info(
603-
namespaces.ui.projectCodeEditor,
604-
`Rejected code fix suggestion for lines ${codeFixData?.startLine}-${codeFixData?.endLine}`
605-
);
606-
};
607-
608577
return (
609578
<div className="relative flex h-full flex-col pt-11">
610579
{projectId ? (
@@ -721,8 +690,7 @@ export const EditorTabs = () => {
721690
modifiedCode={codeFixData.modifiedCode}
722691
name={ModalName.codeFixDiffEditor}
723692
onApprove={handleApproveCodeFix}
724-
onClose={handleCloseCodeFixModal}
725-
onReject={handleRejectCodeFix}
693+
onReject={handleCloseCodeFixModal}
726694
originalCode={codeFixData.originalCode}
727695
startLine={codeFixData.startLine}
728696
/>

src/interfaces/components/codeFixDiffEditor.interface.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export interface CodeFixDiffEditorProps {
44
modifiedCode: string;
55
onApprove: () => void;
66
onReject: () => void;
7-
onClose: () => void;
87
filename?: string;
98
startLine?: number;
109
endLine?: number;

0 commit comments

Comments
 (0)