Skip to content

Commit ceff480

Browse files
committed
Remove redundant cancellation logging for API calls and clean up folder button visibility
1 parent 75dd3ad commit ceff480

3 files changed

Lines changed: 2 additions & 11 deletions

File tree

‎apps/editor/src/services/api-manager.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ export class ApiManager {
136136
return result
137137
} catch (error) {
138138
if (axios.isCancel(error)) {
139-
Logger.info({
140-
function_name: 'get',
141-
message: 'API call cancelled by user'
142-
})
143139
throw error
144140
} else {
145141
Logger.error({

‎apps/editor/src/utils/make-api-request.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,6 @@ export const make_api_request = async (params: {
367367
})
368368
} catch (error) {
369369
if (params.cancellation_token?.reason) {
370-
Logger.info({
371-
function_name: 'make_api_request',
372-
message: 'Request canceled',
373-
data: params.cancellation_token.reason
374-
})
375370
throw params.cancellation_token.reason
376371
}
377372

‎apps/editor/src/views/panel/backend/message-handlers/handle-at-sign-quick-pick/handle-at-sign-quick-pick.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const browse_all_files = async (
123123
description: dir_path == '.' ? '' : dir_path,
124124
full_path: normalized_path,
125125
absolute_path: p,
126-
buttons: [FOLDER_BUTTON]
126+
buttons: dir_path == '.' ? [] : [FOLDER_BUTTON]
127127
}
128128
})
129129

@@ -245,7 +245,7 @@ const at_sign_quick_pick = async (params: {
245245
description: dir_path == '.' ? '' : dir_path,
246246
full_path: normalized_path,
247247
absolute_path: p,
248-
buttons: [FOLDER_BUTTON]
248+
buttons: dir_path == '.' ? [] : [FOLDER_BUTTON]
249249
}
250250
})
251251

0 commit comments

Comments
 (0)