Skip to content

Commit 80e3069

Browse files
committed
Consolidate API call message handlers into a single unified implementation and update related commands
- rename 'ApiManager.get' to 'ApiManager.send_llm_message' - missing translations - the following handlers: `apps/editor/src/views/panel/backend/message-handlers/handle-edit-files.ts` `apps/editor/src/views/panel/backend/message-handlers/handle-code-at-cursor.ts` `apps/editor/src/views/panel/backend/message-handlers/handle-find-relevant-files.ts` should be integrated into a single handler 'handle-make-api-call' - rename 'send to browser' to 'autofill', e.g. 'handle autofill' etc.
1 parent fcf0ccd commit 80e3069

12 files changed

Lines changed: 573 additions & 1176 deletions

File tree

‎apps/editor/src/i18n/translations/features/search-files.ts‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -815,22 +815,22 @@ export const translations = {
815815
bg: 'Доставчикът на API не е намерен.'
816816
},
817817
'feature.search-files.progress.finding': {
818-
en: 'Finding relevant files',
819-
pl: 'Znajdowanie powiązanych plików',
820-
'zh-cn': '正在查找相关文件',
821-
ja: '関連ファイルを検索中',
822-
'zh-tw': '正在尋找相關檔案',
823-
de: 'Relevante Dateien werden gesucht',
824-
es: 'Encontrando archivos relevantes',
825-
fr: 'Recherche de fichiers pertinents',
826-
'pt-br': 'Encontrando arquivos relevantes',
827-
ru: 'Поиск релевантных файлов',
828-
ko: '관련 파일 찾는 중',
829-
it: 'Ricerca di file pertinenti',
830-
tr: 'İlgili dosyalar bulunuyor',
831-
cs: 'Hledání relevantních souborů',
832-
hu: 'Kapcsolódó fájlok keresése',
833-
bg: 'Търсене на подходящи файлове'
818+
en: 'Intelligent file search',
819+
pl: 'Inteligentne wyszukiwanie plików',
820+
'zh-cn': '智能文件搜索',
821+
ja: 'インテリジェントファイル検索',
822+
'zh-tw': '智能檔案搜尋',
823+
de: 'Intelligente Dateisuche',
824+
es: 'Búsqueda inteligente de archivos',
825+
fr: 'Recherche intelligente de fichiers',
826+
'pt-br': 'Pesquisa inteligente de arquivos',
827+
ru: 'Умный поиск файлов',
828+
ko: '지능형 파일 검색',
829+
it: 'Ricerca file intelligente',
830+
tr: 'Akıllı dosya arama',
831+
cs: 'Inteligentní vyhledávání souborů',
832+
hu: 'Intelligens fájlkeresés',
833+
bg: 'Интелигентно търсене на файлове'
834834
},
835835
'feature.search-files.cancel.user': {
836836
en: 'User canceled',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class ApiManager {
2525
this.api_manager_view_provider.send_message(message)
2626
}
2727

28-
public async get(params: {
28+
public async send_llm_message(params: {
2929
base_url: string
3030
api_key?: string
3131
body: any
@@ -154,7 +154,7 @@ export class ApiManager {
154154
throw error
155155
} else {
156156
Logger.error({
157-
function_name: 'get',
157+
function_name: 'send_llm_message',
158158
message: 'API call error',
159159
data: error
160160
})

apps/editor/src/views/panel/backend/message-handlers/handle-send-to-browser.ts renamed to apps/editor/src/views/panel/backend/message-handlers/handle-autofill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { replace_symbols } from '@/views/panel/backend/utils/symbols/replace-sym
2626
import { show_configuration_quick_pick } from '@/utils/show-configuration-quick-pick'
2727
import { PromptBuilder } from '@/utils/prompt-builder'
2828

29-
export const handle_send_to_browser = async (params: {
29+
export const handle_autofill = async (params: {
3030
panel_view_provider: PanelViewProvider
3131
invocation_count: number
3232
web_configuration_name?: string

‎apps/editor/src/views/panel/backend/message-handlers/handle-code-at-cursor.ts‎

Lines changed: 0 additions & 329 deletions
This file was deleted.

0 commit comments

Comments
 (0)