Skip to content

Commit 93a9b02

Browse files
committed
Format codebase and update dependency lockfile
1 parent 7ed3fc3 commit 93a9b02

22 files changed

Lines changed: 9682 additions & 3430 deletions

File tree

‎.vscode/launch.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"request": "launch",
88
"runtimeExecutable": "${execPath}",
99
"args": ["--extensionDevelopmentPath=${workspaceRoot}/apps/editor"],
10-
"outFiles": ["${workspaceRoot}/apps/editor/out/**/*.js"],
10+
"outFiles": ["${workspaceRoot}/apps/editor/out/**/*.js"]
1111
}
1212
]
1313
}

‎.vscode/settings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"js/ts.tsdk.path": "node_modules/typescript/lib"
3-
}
3+
}

‎apps/browser/src/background/keep-alive.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { check_and_recover_connection } from './websocket'
33
const ALARM_NAME = 'keep-alive'
44
const ALARM_PERIOD_MINUTES = 0.5 // fires every 30 seconds
55

6-
76
export const setup_keep_alive = () => {
87
if (!browser.browserAction) {
98
const ensure_alarm = () => {
@@ -24,7 +23,6 @@ export const setup_keep_alive = () => {
2423
if (alarm.name === ALARM_NAME) {
2524
check_and_recover_connection()
2625
}
27-
2826
})
2927
}
3028
}

‎apps/editor/jest.config.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ module.exports = {
88
'^@/(.*)$': '<rootDir>/src/$1',
99
'^@shared/(.*)$': '<rootDir>/../../packages/shared/src/$1'
1010
}
11-
};
11+
}

‎apps/editor/src/commands/select-referencing-files-commands/utils/prompt-for-referencing-files.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,17 @@ export const prompt_for_referencing_files = async (params: {
124124
if (button === close_button) {
125125
resolve(undefined)
126126
quick_pick.hide()
127-
} else if (button === search_button) {
128-
current_selected_items = [...quick_pick.selectedItems]
129-
if (current_selected_items.length == 0) {
130-
vscode.window.showInformationMessage(
131-
t('common.info.select-files-to-search')
132-
)
133-
return
127+
} else if (button === search_button) {
128+
current_selected_items = [...quick_pick.selectedItems]
129+
if (current_selected_items.length == 0) {
130+
vscode.window.showInformationMessage(
131+
t('common.info.select-files-to-search')
132+
)
133+
return
134+
}
135+
resolve('search')
136+
quick_pick.hide()
134137
}
135-
resolve('search')
136-
quick_pick.hide()
137-
}
138138
})
139139

140140
quick_pick.onDidAccept(() => {

‎apps/editor/src/i18n/translations/views/prompt/handlers/voice-input.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ export const translations = {
192192
'zh-tw': '找不到 API 配置。新增一個以使用此功能。',
193193
de: 'Keine API-Konfigurationen gefunden. Fügen Sie eine hinzu, um diese Funktion zu nutzen.',
194194
es: 'No se encontraron configuraciones de API. Añade una para usar esta función.',
195-
fr: 'Aucune configuration d\'API trouvée. Ajoutez-en une pour utiliser cette fonctionnalité.',
196-
'pt-br': 'Nenhuma configuração de API encontrada. Adicione uma para usar este recurso.',
195+
fr: "Aucune configuration d'API trouvée. Ajoutez-en une pour utiliser cette fonctionnalité.",
196+
'pt-br':
197+
'Nenhuma configuração de API encontrada. Adicione uma para usar este recurso.',
197198
ru: 'Конфигурации API не найдены. Добавьте одну, чтобы использовать эту функцию.',
198199
ko: 'API 구성을 찾을 수 없습니다. 이 기능을 사용하려면 하나를 추가하세요.',
199200
it: 'Nessuna configurazione API trovata. Aggiungine una per usare questa funzione.',

‎apps/editor/src/utils/apply-reasoning-effort.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { ApiConfiguration, ModelProvider } from '@/services/model-providers-manager'
1+
import {
2+
ApiConfiguration,
3+
ModelProvider
4+
} from '@/services/model-providers-manager'
25

36
export const apply_reasoning_effort = (params: {
47
body: { [key: string]: any }

‎apps/editor/src/utils/is-binary.ts‎

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,73 @@ import * as path from 'path'
22

33
const BINARY_EXTENSIONS = new Set([
44
// Images
5-
'.png', '.jpg', '.jpeg', '.gif', '.webp', '.bmp', '.ico', '.tiff', '.svgz',
5+
'.png',
6+
'.jpg',
7+
'.jpeg',
8+
'.gif',
9+
'.webp',
10+
'.bmp',
11+
'.ico',
12+
'.tiff',
13+
'.svgz',
614
// Documents
7-
'.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pages', '.numbers', '.key',
15+
'.pdf',
16+
'.doc',
17+
'.docx',
18+
'.xls',
19+
'.xlsx',
20+
'.ppt',
21+
'.pptx',
22+
'.pages',
23+
'.numbers',
24+
'.key',
825
// Archives
9-
'.zip', '.tar', '.gz', '.rar', '.7z', '.bz2', '.xz', '.iso',
26+
'.zip',
27+
'.tar',
28+
'.gz',
29+
'.rar',
30+
'.7z',
31+
'.bz2',
32+
'.xz',
33+
'.iso',
1034
// Audio/Video
11-
'.mp3', '.mp4', '.wav', '.avi', '.mkv', '.mov', '.webm', '.ogg', '.flac',
35+
'.mp3',
36+
'.mp4',
37+
'.wav',
38+
'.avi',
39+
'.mkv',
40+
'.mov',
41+
'.webm',
42+
'.ogg',
43+
'.flac',
1244
// Fonts
13-
'.ttf', '.otf', '.woff', '.woff2', '.eot',
45+
'.ttf',
46+
'.otf',
47+
'.woff',
48+
'.woff2',
49+
'.eot',
1450
// Executables/Compiled
15-
'.exe', '.dll', '.so', '.dylib', '.bin', '.dat', '.class', '.pyc', '.o', '.a', '.lib',
51+
'.exe',
52+
'.dll',
53+
'.so',
54+
'.dylib',
55+
'.bin',
56+
'.dat',
57+
'.class',
58+
'.pyc',
59+
'.o',
60+
'.a',
61+
'.lib',
1662
// Databases and others
17-
'.sqlite', '.sqlite3', '.db'
63+
'.sqlite',
64+
'.sqlite3',
65+
'.db'
1866
])
1967

20-
export const is_binary_file = (file_path: string, buffer?: Uint8Array): boolean => {
68+
export const is_binary_file = (
69+
file_path: string,
70+
buffer?: Uint8Array
71+
): boolean => {
2172
const base = path.basename(file_path).toLowerCase()
2273
if (base == '.ds_store') return true
2374

@@ -47,4 +98,4 @@ export const is_binary_file = (file_path: string, buffer?: Uint8Array): boolean
4798
}
4899

49100
return false
50-
}
101+
}

‎apps/editor/src/views/prompt/frontend/Home/Home.tsx‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,21 @@ export const Home: React.FC<Props> = (props) => {
221221

222222
<div className={styles.inner__mode} ref={mode_ref}>
223223
<AsciiArtEffect />
224-
<UiKeycapWrapper char={is_alt_pressed ? '1' : undefined} full_width>
225-
<UiModeButton
226-
label={MODE.WEB}
224+
<UiKeycapWrapper
225+
char={is_alt_pressed ? '1' : undefined}
226+
full_width
227+
>
228+
<UiModeButton
229+
label={MODE.WEB}
227230
on_click={props.on_chatbots_click}
228231
/>
229232
</UiKeycapWrapper>
230-
<UiKeycapWrapper char={is_alt_pressed ? '2' : undefined} full_width>
231-
<UiModeButton
232-
label={MODE.API}
233+
<UiKeycapWrapper
234+
char={is_alt_pressed ? '2' : undefined}
235+
full_width
236+
>
237+
<UiModeButton
238+
label={MODE.API}
233239
on_click={props.on_api_calls_click}
234240
/>
235241
</UiKeycapWrapper>

‎apps/editor/src/views/prompt/frontend/Main/Main.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,7 @@ export const Main: React.FC<Props> = (props) => {
366366
return ''
367367
}
368368

369-
const handle_make_api_call = (
370-
use_quick_pick: boolean
371-
) => {
369+
const handle_make_api_call = (use_quick_pick: boolean) => {
372370
const instruction = get_current_instructions()
373371

374372
post_message(props.vscode, {

0 commit comments

Comments
 (0)