Skip to content

Commit

Permalink
chore: remove console.log statements (#1924)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreammy23 authored Aug 29, 2024
2 parents 8f1d6b6 + ec3263f commit b984439
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 25 deletions.
1 change: 0 additions & 1 deletion web/components/chart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type Props = {
};

function Chart({ chartsData }: Props) {
console.log(chartsData, 'xxx');
const chartRows = useMemo(() => {
if (chartsData) {
const res = [];
Expand Down
1 change: 0 additions & 1 deletion web/components/chat/chat-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const ChatContainer = () => {
if (contextTemp) {
try {
const contextObj = typeof contextTemp === 'string' ? JSON.parse(contextTemp) : contextTemp;
console.log('contextObj', contextObj);
setChartsData(contextObj?.template_name === 'report' ? contextObj?.charts : undefined);
} catch (e) {
console.log(e);
Expand Down
1 change: 0 additions & 1 deletion web/components/chat/chat-default/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function Default() {
onSuccess: res => {
const [_, data] = res;
if (activeKey === 'recommend') {
console.log(data);
return setApps({
app_list: data,
total_count: data?.length || 0,
Expand Down
2 changes: 1 addition & 1 deletion web/components/chat/chat-feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const ChatFeedback = ({ conv_index, question, knowledge_space, select_param }: P
ques_type: ques_type,
messages: text,
};
console.log(formData);

apiInterceptors(
postChatFeedBackForm({
data: formData,
Expand Down
5 changes: 1 addition & 4 deletions web/components/database/form-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function FormDialog({ open, choiceDBType, dbTypeList, editValue, dbNames, onClos
setLoading(false);
}
};
console.log(form.getFieldValue('db_type'));

const { run: fetchOmcList } = useDebounceFn(
async (name: string) => {
setOmcListLoading(true);
Expand All @@ -117,7 +117,6 @@ function FormDialog({ open, choiceDBType, dbTypeList, editValue, dbNames, onClos
wait: 500,
},
);
console.log('omcDBList', omcDBList);

const lockDBType = useMemo(() => !!editValue || !!choiceDBType, [editValue, choiceDBType]);
return (
Expand Down Expand Up @@ -163,8 +162,6 @@ function FormDialog({ open, choiceDBType, dbTypeList, editValue, dbNames, onClos
options={omcDBList}
onSearch={fetchOmcList}
onSelect={searchName => {
console.log(searchName, 'searchName');

const item = omcDBList?.find((item: any) => item.value === searchName) as any;
form.setFieldsValue({
db_arn: item?.arn,
Expand Down
2 changes: 0 additions & 2 deletions web/components/flow/flow-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ interface FlowCardProps {
}

const FlowCard: React.FC<FlowCardProps> = ({ flow, onCopy, deleteCallback }) => {
console.log(flow, 'flow');

const { model } = useContext(ChatContext);
const { t } = useTranslation();
const [modal, contextHolder] = Modal.useModal();
Expand Down
1 change: 0 additions & 1 deletion web/components/knowledge/RecallTestModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const RecallTestModal: React.FC<RecallTestModalProps> = ({ open, setOpen, space
const onTest = async () => {
form.validateFields().then(async values => {
const extraVal = extraForm.getFieldsValue();
console.log(extraVal);
await recallTestRun({ recall_top_k: 1, recall_retrievers: options, ...values, ...extraVal });
});
};
Expand Down
1 change: 0 additions & 1 deletion web/components/knowledge/doc-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ export default function DocPanel(props: IProps) {
manual: true,
debounceWait: 500,
onSuccess: data => {
console.log(data);
setSearchDocuments(data?.data);
},
},
Expand Down
1 change: 0 additions & 1 deletion web/components/knowledge/segmentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ let intervalId: string | number | NodeJS.Timeout | undefined;

export default function Segmentation(props: IProps) {
const { spaceName, docType, uploadFiles, handleStepChange } = props;
console.log(docType, 'doctype');
const { t } = useTranslation();
const [form] = Form.useForm();
const [files, setFiles] = useState(uploadFiles);
Expand Down
1 change: 0 additions & 1 deletion web/pages/construct/knowledge/chunk/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ function ChunkList() {
onClick={() => {
setIsModalOpen(true);
setCurrentChunkInfo(chunk);
console.log(chunk);
}}
>
<p className='font-semibold'>{t('Content')}:</p>
Expand Down
11 changes: 0 additions & 11 deletions web/pages/evaluation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ const Evaluation = () => {
{
manual: true,
onSuccess: data => {
console.log(
data,
data?.map((i: Record<string, string>) => {
return { label: i.describe, value: i.name };
}),
);
setMetricOptions(
data?.map((i: Record<string, string>) => {
return { label: i.describe, value: i.name };
Expand Down Expand Up @@ -355,7 +349,6 @@ const Evaluation = () => {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
}),
);
console.log(url, response);
const a = document.createElement('a');
a.href = url;
a.download = filename;
Expand Down Expand Up @@ -501,7 +494,6 @@ const Evaluation = () => {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
}),
);
console.log(url, response);
const a = document.createElement('a');
a.href = url;
a.download = filename;
Expand Down Expand Up @@ -786,7 +778,6 @@ const Evaluation = () => {

uploadDataSetsFile(formData)
.then(response => {
console.log(response);
if (response.data.success) {
message.success('上传成功');
runGetDataSets();
Expand All @@ -809,7 +800,6 @@ const Evaluation = () => {
content: values.content,
})
.then(res => {
console.log(res);
if (res.data.success) {
message.success('上传成功');
runGetDataSets();
Expand Down Expand Up @@ -880,7 +870,6 @@ const Evaluation = () => {
name='dataSet'
maxCount={1}
beforeUpload={file => {
// console.log(file, dataSetForm.getFieldsValue());
dataSetForm.setFieldsValue({
doc_file: file,
});
Expand Down

0 comments on commit b984439

Please sign in to comment.