Skip to content

Commit 8cc232b

Browse files
committed
Enhance progress modal with status subtitles during intelligent search, preserve checked state on FRF mode toggle, and refactor localization file structure
- in case of 'find relevant files', should not use 'api calls manager' but call llm directly from `apps/editor/src/views/prompt/backend/message-handlers/handle-make-api-call.ts`. Use ProgressModal to report progress. - 'progress modal' should have optional subtitle, use it to display 'Waiting for server...', 'Thinking...', 'Receiving...' - translate 'waiting', 'receiving' 'thinking' in 'common'. other in `apps/editor/src/i18n/translations/views/prompt/handlers/make-api-call.ts` - add missing view in `apps/editor/src/i18n/index.ts` - add missing barrel files - frf selection should not be cleared each time we deactivate this mode ├── apps │ └── editor │ └── src │ ├── commands │ │ └── apply-response-command │ │ ├── apply-response-command.ts │ │ ├── response-processor.ts │ │ └── utils │ │ └── preview-handler.ts │ ├── context │ │ ├── context-initialization.ts │ │ ├── helpers │ │ │ ├── get-all-workspace-files.ts │ │ │ └── get-selected-files.ts │ │ ├── providers │ │ │ ├── open-editors │ │ │ │ └── open-editors-provider.ts │ │ │ ├── selected-files │ │ │ │ └── selected-files-provider.ts │ │ │ └── workspace │ │ │ ├── modules │ │ │ │ ├── index.ts │ │ │ │ └── token-calculator.ts │ │ │ └── workspace-provider.ts │ │ ├── shared-context-state.ts │ │ └── utils │ │ └── shrink-file │ │ ├── index.ts │ │ ├── languages │ │ │ ├── c-style.ts │ │ │ ├── css.ts │ │ │ ├── html.ts │ │ │ ├── jsx.ts │ │ │ ├── python.ts │ │ │ ├── ruby.ts │ │ │ └── sql.ts │ │ ├── shrink-file.spec.ts │ │ ├── shrink-file.ts │ │ └── test-cases │ │ ├── c-style │ │ │ ├── input.txt │ │ │ └── output.txt │ │ ├── css │ │ │ ├── input.txt │ │ │ └── output.txt │ │ ├── html │ │ │ ├── input.txt │ │ │ └── output.txt │ │ ├── jsx │ │ │ ├── input.txt │ │ │ └── output.txt │ │ ├── python │ │ │ ├── input.txt │ │ │ └── output.txt │ │ ├── ruby │ │ │ ├── input.txt │ │ │ └── output.txt │ │ ├── scss │ │ │ ├── input.txt │ │ │ └── output.txt │ │ └── sql │ │ ├── input.txt │ │ └── output.txt │ ├── i18n │ │ ├── index.ts │ │ └── translations │ │ ├── commands │ │ │ ├── apply-response.ts │ │ │ ├── code-at-cursor.ts │ │ │ ├── copy-paths.ts │ │ │ ├── generate-commit-message.ts │ │ │ ├── history.ts │ │ │ ├── index.ts │ │ │ ├── new-file.ts │ │ │ ├── new-folder.ts │ │ │ ├── rate.ts │ │ │ ├── rename.ts │ │ │ ├── restore-file-selection.ts │ │ │ ├── save-file-selection.ts │ │ │ ├── search-files.ts │ │ │ ├── select-changed-files.ts │ │ │ ├── select-clipboard-paths.ts │ │ │ ├── select-commit-files.ts │ │ │ ├── select-definition-file.ts │ │ │ ├── select-imported-files.ts │ │ │ ├── select-referencing-files.ts │ │ │ ├── select-unstaged-files.ts │ │ │ ├── select-workspace-file.ts │ │ │ └── set-ranges.ts │ │ ├── utils │ │ │ └── index.ts │ │ └── views │ │ ├── common │ │ │ ├── handlers │ │ │ │ ├── common.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── prompt │ │ │ ├── handlers │ │ │ │ ├── hash-sign.ts │ │ │ │ ├── index.ts │ │ │ │ ├── make-api-call.ts │ │ │ │ ├── select-edit-format.ts │ │ │ │ └── voice-input.ts │ │ │ └── index.ts │ │ ├── settings │ │ │ ├── handlers │ │ │ │ ├── index.ts │ │ │ │ ├── open-allow-patterns-settings.ts │ │ │ │ ├── open-ignore-patterns-settings.ts │ │ │ │ └── select-default-api-configuration.ts │ │ │ └── index.ts │ │ └── shared │ │ ├── actions │ │ │ ├── api │ │ │ │ ├── create │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── interactions │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── initial-select-model.ts │ │ │ │ │ ├── initial-select-provider.ts │ │ │ │ │ └── verify-model.ts │ │ │ │ ├── index.ts │ │ │ │ ├── pick-reasoning-effort.ts │ │ │ │ ├── update │ │ │ │ │ ├── index.ts │ │ │ │ │ └── interactions │ │ │ │ │ ├── edit-model-for-api-config.ts │ │ │ │ │ ├── edit-reasoning-effort-for-api-config.ts │ │ │ │ │ └── index.ts │ │ │ │ └── upsert-provider.ts │ │ │ ├── index.ts │ │ │ └── web │ │ │ ├── create.ts │ │ │ ├── delete.ts │ │ │ ├── index.ts │ │ │ ├── pick-chatbot.ts │ │ │ ├── pick-model.ts │ │ │ └── update.ts │ │ └── index.ts │ ├── services │ │ └── prompt-view-api-calls-manager.ts │ ├── utils │ │ └── send-llm-message.ts │ └── views │ └── prompt │ ├── backend │ │ ├── message-handlers │ │ │ └── handle-make-api-call.ts │ │ └── prompt-view-provider.ts │ ├── frontend │ │ ├── Prompt.tsx │ │ └── hooks │ │ ├── use-modal-manager.ts │ │ └── use-prompt │ │ └── use-prompt.ts │ └── types │ └── messages.ts └── packages └── ui └── src └── components └── editor └── prompt └── modals └── ProgressModal ├── ProgressModal.module.scss ├── ProgressModal.stories.tsx └── ProgressModal.tsx
1 parent d6b0321 commit 8cc232b

29 files changed

Lines changed: 359 additions & 73 deletions

File tree

‎apps/editor/src/context/providers/open-editors/open-editors-provider.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ export class OpenEditorsProvider
6363
if (this._is_frf_mode == is_frf) return
6464
this._is_frf_mode = is_frf
6565

66-
if (is_frf) {
67-
this._checked_items.clear()
68-
}
69-
7066
this.refresh()
7167
this._dispatch_change_events()
7268
}

‎apps/editor/src/context/providers/workspace/workspace-provider.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,8 @@ export class WorkspaceProvider
156156

157157
public switch_context_state(is_frf: boolean) {
158158
if (this._is_frf_mode == is_frf) return
159-
this._is_frf_mode = is_frf
160159

161-
if (is_frf) {
162-
this._checked_items.clear()
163-
this._checked_timestamps.clear()
164-
this._partially_checked_dirs.clear()
165-
}
160+
this._is_frf_mode = is_frf
166161

167162
this._token_calculator.clear_selected_counts()
168163
this.refresh()

‎apps/editor/src/context/shared-context-state.ts‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@ export class SharedContextState {
9292

9393
this._is_frf_mode = is_frf
9494

95-
if (is_frf) {
96-
this._unchecked_in_open_editors.clear()
97-
this._unchecked_in_workspace.clear()
98-
this._undo_stack = []
99-
this._redo_stack = []
100-
}
101-
10295
this.update_checked_files_set()
10396
this._on_did_change_checked_files.fire()
10497
} finally {

‎apps/editor/src/i18n/index.ts‎

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,18 @@
11
import * as vscode from 'vscode'
22
import { translations as commands } from './translations/commands'
33
import { translations as common } from './translations/common'
4-
import { translations as views_settings_handlers_open_allow_patterns_settings } from './translations/views/settings/handlers/open-allow-patterns-settings'
5-
import { translations as views_settings_handlers_open_ignore_patterns_settings } from './translations/views/settings/handlers/open-ignore-patterns-settings'
6-
import { translations as views_settings_handlers_select_default_api_configuration } from './translations/views/settings/handlers/select-default-api-configuration'
7-
import { translations as views_prompts_handlers_voice_input } from './translations/views/prompt/handlers/voice-input'
8-
import { translations as views_prompts_handlers_hash_sign } from './translations/views/prompt/handlers/hash-sign'
9-
import { translations as views_prompts_handlers_select_edit_format } from './translations/views/prompt/handlers/select-edit-format'
10-
import { translations as views_handlers_common } from './translations/views/common/handlers/common'
11-
import { translations as views_shared_actions_api_create_interactions_verify_model } from './translations/views/shared/actions/api/create/interactions/verify-model'
12-
import { translations as views_shared_actions_api_create_interactions_initial_select_provider } from './translations/views/shared/actions/api/create/interactions/initial-select-provider'
13-
import { translations as views_shared_actions_api_create_interactions_initial_select_model } from './translations/views/shared/actions/api/create/interactions/initial-select-model'
14-
import { translations as views_shared_actions_api_create_create } from './translations/views/shared/actions/api/create/create'
15-
import { translations as views_shared_actions_api_upsert_provider } from './translations/views/shared/actions/api/upsert-provider'
16-
import { translations as views_shared_actions_api_pick_reasoning_effort } from './translations/views/shared/actions/api/pick-reasoning-effort'
17-
import { translations as views_shared_actions_api_update_interactions_edit_model_for_api_config } from './translations/views/shared/actions/api/update/interactions/edit-model-for-api-config'
18-
import { translations as views_shared_actions_api_update_interactions_edit_reasoning_effort_for_api_config } from './translations/views/shared/actions/api/update/interactions/edit-reasoning-effort-for-api-config'
19-
import { translations as views_shared_actions_web_create } from './translations/views/shared/actions/web/create'
20-
import { translations as views_shared_actions_web_delete } from './translations/views/shared/actions/web/delete'
21-
import { translations as views_shared_actions_web_pick_chatbot } from './translations/views/shared/actions/web/pick-chatbot'
22-
import { translations as views_shared_actions_web_pick_model } from './translations/views/shared/actions/web/pick-model'
23-
import { translations as views_shared_actions_web_update } from './translations/views/shared/actions/web/update'
244
import { translations as features } from './translations/features'
25-
import { translations as utils_show_parent_folder_quick_pick } from './translations/utils/show-parent-folder-quick-pick'
5+
import { translations as utils } from './translations/utils'
6+
import { translations as views } from './translations/views'
267

278
export type TranslationKey = keyof typeof translations
289

2910
const translations = {
3011
...commands,
3112
...common,
32-
...views_settings_handlers_open_allow_patterns_settings,
33-
...views_settings_handlers_open_ignore_patterns_settings,
34-
...views_settings_handlers_select_default_api_configuration,
35-
...views_prompts_handlers_voice_input,
36-
...views_prompts_handlers_hash_sign,
37-
...views_prompts_handlers_select_edit_format,
38-
...views_handlers_common,
39-
...views_shared_actions_api_create_interactions_verify_model,
40-
...views_shared_actions_api_create_interactions_initial_select_provider,
41-
...views_shared_actions_api_create_interactions_initial_select_model,
42-
...views_shared_actions_api_create_create,
43-
...views_shared_actions_api_upsert_provider,
44-
...views_shared_actions_api_pick_reasoning_effort,
45-
...views_shared_actions_api_update_interactions_edit_model_for_api_config,
46-
...views_shared_actions_api_update_interactions_edit_reasoning_effort_for_api_config,
47-
...views_shared_actions_web_create,
48-
...views_shared_actions_web_delete,
49-
...views_shared_actions_web_pick_chatbot,
50-
...views_shared_actions_web_pick_model,
51-
...views_shared_actions_web_update,
5213
...features,
53-
...utils_show_parent_folder_quick_pick
14+
...utils,
15+
...views
5416
}
5517

5618
export const t = (
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { translations as show_parent_folder_quick_pick } from './show-parent-folder-quick-pick'
2+
3+
export const translations = {
4+
...show_parent_folder_quick_pick
5+
}

‎apps/editor/src/i18n/translations/views/common/handlers/common.ts‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,59 @@ export const translations = {
3535
cs: 'Pokud zahodíte, aktualizace {item_type} budou ztraceny.',
3636
hu: 'Ha elveti, a(z) {item_type} frissítései elvesznek.',
3737
bg: 'Ако отхвърлите, актуализациите на {item_type} ще бъдат загубени.'
38+
},
39+
'views.common.handlers.common.waiting-for-server': {
40+
en: 'Waiting for server...',
41+
pl: 'Oczekiwanie na serwer...',
42+
'zh-cn': '正在等待服务器...',
43+
ja: 'サーバーを待機中...',
44+
'zh-tw': '正在等待伺服器...',
45+
de: 'Warten auf Server...',
46+
es: 'Esperando al servidor...',
47+
fr: 'En attente du serveur...',
48+
'pt-br': 'Aguardando servidor...',
49+
ru: 'Ожидание сервера...',
50+
ko: '서버 대기 중...',
51+
it: 'In attesa del server...',
52+
tr: 'Sunucu bekleniyor...',
53+
cs: 'Čekání na server...',
54+
hu: 'Várakozás a szerverre...',
55+
bg: 'Изчакване на сървъра...'
56+
},
57+
'views.common.handlers.common.thinking': {
58+
en: 'Thinking...',
59+
pl: 'Myślenie...',
60+
'zh-cn': '思考中...',
61+
ja: '考え中...',
62+
'zh-tw': '思考中...',
63+
de: 'Denken...',
64+
es: 'Pensando...',
65+
fr: 'Réflexion...',
66+
'pt-br': 'Pensando...',
67+
ru: 'Думаю...',
68+
ko: '생각 중...',
69+
it: 'Pensiero...',
70+
tr: 'Düşünüyor...',
71+
cs: 'Přemýšlím...',
72+
hu: 'Gondolkodás...',
73+
bg: 'Мисли...'
74+
},
75+
'views.common.handlers.common.receiving': {
76+
en: 'Receiving...',
77+
pl: 'Pobieranie...',
78+
'zh-cn': '接收中...',
79+
ja: '受信中...',
80+
'zh-tw': '接收中...',
81+
de: 'Empfangen...',
82+
es: 'Recibiendo...',
83+
fr: 'Réception...',
84+
'pt-br': 'Recebendo...',
85+
ru: 'Получение...',
86+
ko: '수신 중...',
87+
it: 'Ricezione...',
88+
tr: 'Alınıyor...',
89+
cs: 'Přijímání...',
90+
hu: 'Fogadás...',
91+
bg: 'Получаване...'
3892
}
3993
} as const
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { translations as common } from './common'
2+
3+
export const translations = {
4+
...common
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { translations as handlers } from './handlers'
2+
3+
export const translations = {
4+
...handlers
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { translations as common } from './common'
2+
import { translations as prompt } from './prompt'
3+
import { translations as settings } from './settings'
4+
import { translations as shared } from './shared'
5+
6+
export const translations = {
7+
...common,
8+
...prompt,
9+
...settings,
10+
...shared
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { translations as hash_sign } from './hash-sign'
2+
import { translations as make_api_call } from './make-api-call'
3+
import { translations as select_edit_format } from './select-edit-format'
4+
import { translations as voice_input } from './voice-input'
5+
6+
export const translations = {
7+
...hash_sign,
8+
...make_api_call,
9+
...select_edit_format,
10+
...voice_input
11+
}

0 commit comments

Comments
 (0)